- 浏览: 1118946 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (1055)
- quartz定时任务 (1)
- json (9)
- 接口 (1)
- http (1)
- sccket (2)
- xmlbean (1)
- webservice (1)
- flex (1)
- sitemesh (2)
- json组装 (2)
- 存储过程 (6)
- ajax后台返回前台上下问 (3)
- flect反射机制 (1)
- 页面列表 (1)
- oracal结果集合并 (1)
- lucene (1)
- 读取配置文件工具 (1)
- 框架整合 (1)
- jms (3)
- 断点续传 (1)
- 页面之间的传值 (1)
- jpa (6)
- sql (8)
- jsp跳转 (1)
- jsp (6)
- jquery (2)
- ui (1)
- js与jsp之间的值的交互应用 (1)
- js空值判断 (1)
- Ajax (9)
- web-inf 编译目录 (1)
- 多线程 (9)
- 资料 (0)
- oracal (4)
- 多线程webservice (1)
- ztree (1)
- 加载与内容的变化 (1)
- 页面的公用变量 (1)
- web-inf目录结构 (1)
- 登陆系列 (1)
- jass应用于webservice认证 (2)
- 路径问题 (1)
- list合并 (1)
- list map中的value获取 (2)
- 标签tag (4)
- 方法 (1)
- 树形数据及其渲染 (1)
- require js 回调 (1)
- tab 页面切换 (2)
- 计时获取验证码 (1)
- 模式 (6)
- easyui (3)
- dialog (2)
- 乱码问题 (1)
- spring (29)
- sqlserver (1)
- iis,netframework (0)
- iis (1)
- netframework (1)
- 处理乱码问题 (1)
- struts-ajax (0)
- ,理论,了;,; (0)
- 排错方法 (1)
- hibernate (1)
- 二级缓存 (1)
- portal (1)
- date类型 (0)
- jvm out of memery StackOverflowError (1)
- echart数据填充 (0)
- echart (1)
- jmv (1)
- 学习 (0)
- java基础 (1)
- oracle性能优化 (1)
- 数据库三范式 (1)
- easy UI (1)
- oracle11g (1)
- form (3)
- servlet (2)
- spring mvc (1)
- htm5 (0)
- ibatise (1)
- 序列化 (1)
- tomcat双认证 (1)
- maven Lib (1)
- tomcat eclipse (2)
- ehcache (1)
- http 代替 ajax (2)
- rest (6)
- script脚本占位模板 (1)
- strust 标签 el表达式 (1)
- js bo (1)
- 公司资料 (0)
- js return (1)
- spring 第三方插件的工具类 (1)
- linux (10)
- linux 克隆 (1)
- linux xshell连接 (1)
- yum expect (1)
- linux 应用命令 (1)
- yum 缓存rmp包 (1)
- yum 本地库离线安装 (2)
- yum错误 (1)
- jsp页面用定时调用 (1)
- ajax setup (2)
- Exception,RuntimeException (1)
- 对话框 dialog (1)
- maven (17)
- PropertyPlaceholderConfigurer properties文件 (1)
- 错误集 (1)
- mybatise (0)
- 拦截器filter (1)
- http get post 区别 (1)
- rest 客户端两种返回的数据处理方式 (1)
- listener (2)
- maven工程 (1)
- ContainerResponseFilter (1)
- ajax action 打印任意实体类jsp (1)
- yum svn mvn (1)
- 分页 (1)
- angularjs (1)
- memcached (1)
- git (12)
- yyyyyyyy (0)
- oracal安装 (4)
- jaxwswebservice (1)
- spring bean (1)
- 排方法 (0)
- java 生成pdf (2)
- 创建目录 (1)
- 下载与生产pdf文件 (1)
- base64 (2)
- 配置文件 (2)
- blob (1)
- pdf (1)
- yum linux 安装Oracle (1)
- excl 插入数据库 (1)
- 搭建框架 (1)
- .classpath和jdk jre (1)
- mybatise 配置文件通配 (1)
- 用Maven插件生成Mybatis代码 (2)
- springmvc值的传递 (1)
- js jsp html (1)
- ajax跨域 (1)
- javamail (0)
- 提交复杂格式json数据 (1)
- get中文乱码/post (1)
- 弹出框,承载弹出链接----页面,显示大图 (1)
- @RequestBody list bean (1)
- 隐藏域 (1)
- 多页保存 (1)
- form 校验 (1)
- 注册,上传图片 (1)
- 登录验证 (1)
- 全局的异常处理 (0)
- 异常捕获,显示在页面 (0)
- mybatise事物配置 (1)
- maven compile (1)
- 时间格式 (1)
- js 跳转页面 (1)
- pringsecurity 角色授资源要重启服务 (0)
- Retrofi restfull (1)
- session过期推出,直接点击退出,退出 (0)
- 参数放于requestbody (1)
- maven本地仓库jar包 (1)
- 编译环境出错jdk1.6 1,7 (1)
- jsonarray ---json数组格式 (1)
- java后台文件上传,接受的2种方式 (0)
- 生成保存图片 (1)
- 权限mysql数据库Md5加密sql (1)
- mysql一对多关联查询 (1)
- mysql批量更新 (0)
- oracle in exists 区别 (1)
- https (1)
- linux发布脚本 (1)
- dubbo zookeepr (1)
- request.getParameter() (1)
- request.setAttribute() (1)
- @RequestMapping @ResponseBody (1)
- @RequestMapping @responsebody src控件 后台如何写入src值 (1)
- dwz (8)
- lib jar maven (1)
- web服务访问名称 (1)
- mvc返回内容设置,拦截 (1)
- @ResponseBody 返回json处理 (1)
- 视图,函数,存储过程 (1)
- <context:annotation-config/> (1)
- <context:component-scan/> (1)
- xml路劲通配 (2)
- 杂项 (1)
- dubbo (34)
- redis (25)
- mybatis (34)
- springmvc (15)
- js (7)
- sprinvmvc (1)
- 设计理念 (1)
- 工程 (1)
- 其他 (149)
- 导出,下载 (1)
- session (4)
- token (1)
- Exception处理 (2)
- 注解 (2)
- 框架 (3)
- shrio (1)
- login (1)
- 项目结构设计 (1)
- mybatis两种关联查询 (1)
- mybaits (2)
- 迭代模式 (1)
- oralce树形数据结构构建 (2)
- 树形结构的jsp展现 (1)
- filter intecept(Struts) (1)
- 树形结构数据的提交 (1)
- @RequestBody @RequestParam (1)
- div (1)
- equals重写 (1)
- 程序设计 (1)
- f多层for循环跳出 (1)
- 看源码 (0)
- 权限系统普遍通性 (1)
- 设计程序 (1)
- 动态拼接元素样式问题 (1)
- sql迭代 (1)
- debug断点 (1)
- spring mvc 扫描注解(ioc (1)
- di) (1)
- jdk (2)
- cglib (1)
- mybatis 多层括号(超过三层)解析不了 (1)
- tiles (2)
- cacheManager缓存的切换 (1)
- jsp,xml中el表达式等占位符中的数据操作 (1)
- jpa 及spring data jpa开发 (1)
- compareTo equals toString (1)
- 子页面用父页面js (1)
- jsp相对路径自加问题 (1)
- bean之间的相互拷贝 (1)
- DECODE (2)
- 泛型 (2)
- NVL (1)
- jsp jstl函数 用标签声明页面变量,供jstl使用,时间格式问题 (1)
- form表单切换action值 (1)
- response.getWriter().write()功能优于springMvc的返回 (1)
- 快速复制构建项目 (1)
- activeMq (15)
- cache (2)
- sql获取序列号 (1)
- 上传 (2)
- tfs (1)
- jsp标签 (2)
- qita (1)
- 触发器 (1)
- Exception (1)
- mybais (1)
- 标签 (1)
- connect by (1)
- for ... in (1)
- map转化为list (1)
- 树形结构list构建(树形实体) (1)
- 左侧菜单的设计 (1)
- response.getWriter().write() (1)
- eclipse打断点之后断无效 (1)
- 直接访问/web-inf/下的页面 (1)
- clob (1)
- freemark (1)
- 框架的设计 (1)
- get方式处理乱码 (1)
- Request的getParameter和getAttribute方法的区别 (1)
- cas (9)
- 时间格式问题 (1)
- ResponseUtil.writeToResponse (1)
- 树形数据的反选 (1)
- spring data jpa (1)
- jsp异常提示 (1)
- jquery js (1)
- eclipse (1)
- 乱码 (1)
- Json OBJETC (1)
- PROCEDURE (1)
- pl/sql oracle (1)
- 设计 (1)
- el表达式 (3)
- iframe (1)
- map (1)
- jsp中调用Java (1)
- response.getWriter().write() ajax (1)
- mybatis xml 传入参数 (0)
- response与request在返回时作用区别 (1)
- spring cache (1)
- 模型驱动 (1)
- 关于mybatis传空值的处理 (1)
- 日志配置 (1)
- mapper (1)
- mapper mybatis (1)
- mapper mybatis-spring spring-data-jpa (1)
- js插件 (1)
- spring-data-jpa (2)
- 字节流转化过程 (1)
- 数据库 (11)
- jsp页面 (1)
- 局域网络访问问题 (1)
- plsql (2)
- response (1)
- plsq (1)
- Proxool (1)
- cas security (1)
- 系统配置化 (1)
- 集群 (4)
- springboot (24)
- 设计模式 (5)
- 通知 (1)
- 架构 (48)
- zookeeper (5)
- mvc框架 (1)
- 事物隔离策略 (1)
- jvm (8)
- 调研 (1)
- Java工具类 (1)
- 并发容器 (3)
- 多线程管理器 (4)
- 简历 (0)
- 查询 (1)
- 集群工具 (1)
- springMcv (1)
- ConcurrentHashMap (1)
- hashtable (1)
- cac (1)
- 树形结构 (1)
- 定时任务 (1)
- tortoiseGit (2)
- struts (11)
- shiro (31)
- log4j (3)
- struts2 (2)
- 编码 (1)
- request (3)
- Nginx (14)
- tomcat (1)
- idea (12)
- mvc (2)
- BeanUtils (2)
- image (1)
- mino (1)
- httpClient (1)
- volecity (1)
- swagger (3)
- 调错 (0)
- data (1)
- log (1)
- shell (1)
- 事物 (3)
- junit (1)
- RestTemplate (2)
- 线程 (0)
- Exception异常处理 (1)
- Exception异常注解 (1)
- lock (1)
- HashMap (1)
- 面试 (0)
- rabbitMq (1)
- rainCat (1)
- 其它 (1)
- activemq消息传送机制以及ACK机制详解 (0)
- mysql (7)
- fildder (1)
- UML (1)
- 校验 (1)
- 反射 (1)
- 切面 (1)
- springioc (1)
- urule2 (0)
- skywalking (1)
- urule (2)
- docker (2)
- 前端 (1)
- bootstrap (1)
- eureka (2)
- springcloud (16)
- jenkins (2)
- springsecurity (1)
- 数据结构 (4)
- gradle (1)
- mycat (3)
- nacos (1)
- canary (1)
- 线程池 (1)
- solr (1)
- resteasy (2)
- BI (1)
- dfs (2)
- elasticsearch (1)
- ruby (1)
- logstash (1)
- clickhouse (2)
- davinci (15)
- java (1)
- davinvi (1)
- fastdfs (1)
- vue (1)
- 《将博客搬至CSDN》 (1)
最新评论
-
nizhipeng123:
private SessionFactory sessio ...
用map接收参数的几个注意的问题
返回前台是对象用数组的形式拿出
===========================list<object>============================
===只要后台传的是对象不管是单个还是list,返回都是数组用0取第一个,可以去外层引号
@Modifying
@Query(value="select * from T_B_SJGD t where 1=1 and id in (?1) order by id",nativeQuery=true)
public List<WorkOrder> queryWorkOrderProcessById(String id);
public String queryWorkOrderProcessById() {
String id=model.getId();
WorkOrder a =new WorkOrder();
List<WorkOrder> tr = new ArrayList<WorkOrder>();
tr =this.getService().queryWorkOrderProcessById(id);
if(tr.size()>0){
a=tr.get(0) ;
JsonConfig config = new JsonConfig();
config.setExcludes(new String[]{"processLogs"});
String json = JSONArray.fromObject(a, config).toString();
HttpServletResponse response = ServletActionContext.getResponse();;
response.setCharacterEncoding("utf-8");
//ServletOutputStream out = null;
BufferedWriter write=null;
try
{
write = new BufferedWriter(new OutputStreamWriter(response
.getOutputStream(), "UTF-8"));
write.write(json);
// out = response.getOutputStream();
// out.write(json.getBytes());
}
catch (IOException e)
{
e.printStackTrace();
}
finally
{
try {
//out.flush();
//out.close();
write.flush();
write.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return null;
} else{
return null;
}
}
==========由于list中的原始数据是object所以返回前台的就是【object,object】===========================
var ry1;
var rey2;
var sb;
var lx;
var fl;
var jb;
var zy;
var cs;
var hs;
var pjhs;
$.ajax({
type:'post',
url:urltro,
async:false,
data:null,
dataType:'json',
success:function(data){
===================这里是不需要eval的============
var datas=eval(data);
//$.each(datas,function(i){
// });
if(datas){
for(var j=0;j<datas.length;j++){
//alert(data[j].status);
// alert(data[j].createTime);
ry1=data[j].bxlxr;
//alert(data[j].bxlxr);
rey2=data[j].XCCLR;
sb=data[j].relateResource;
lx=data[j].gzyelx;
fl=data[j].kind;
jb=data[j].gzdk;
zy=data[j].importance;
cs=data[j].outOfSla;
var name1 = document.getElementById("name1");
var name2 = document.getElementById("name2");
var equipment = document.getElementById("equipment");
var lxt = document.getElementById("lxt");
var flt = document.getElementById("flt");
var jbt = document.getElementById("jbt");
var yxdt = document.getElementById("yxdt");
var slat = document.getElementById("slat");
var hst = document.getElementById("hst");
var evaltime = document.getElementById("evaltime");
if(ry1==""||ry1==null){
ry1="未知";
}
if(rey2==""||rey2==null){
rey2="未知";
}
if(sb==""||sb==null){
sb="未知";
}
if(lx==""||lx==null){
lx="未知";
}
if(fl==""||fl==null){
fl="未知";
}
if(jb==""||jb==null){
jb="未知";
}
if(zy==""||zy==null){
zy="未知";
}
if(cs==""||cs==null){
cs="未知";
}
var til=data[j].title;
var stan=data[j].status;
if(til==""||til==null){
til="未知";
}
if(stan==""||stan==null){
stan="未知";
}
name1.innerHTML +=ry1;
name2.innerHTML +=rey2;
equipment.innerHTML +=sb;
lxt.innerHTML +=lx;
flt.innerHTML +=fl;
jbt.innerHTML +=jb;
yxdt.innerHTML +=zy;
slat.innerHTML +=cs;
name.innerHTML +=til.substr(0,8);
sta.innerHTML +=stan;
}
}
},
error:function(){
//$.message("失败");
}
});
==========================list<String[]>============================
@Modifying
@Query(value="select to_char(to_date(CREATETIME,'yyyy-mm-dd hh24:mi'),'yyyy') as a ,count(*) as b from T_B_SJGD group by to_char(to_date(CREATETIME,'yyyy-mm-dd hh24:mi'),'yyyy') order by to_char(to_date(CREATETIME,'yyyy-mm-dd hh24:mi'),'yyyy')",nativeQuery=true)
public List<String[]> queryWorkOrderProcessCount();
public String queryWorkOrderProcessCount() {
List<String[]> count = new ArrayList<String[]>();
count= this.getService().queryWorkOrderProcessCount();
//count.toArray(new String[count.size()])
//先转为一个大的数组
String[] toBeStored = convert(count);
//JsonUtil.stringArrayToJsonStr(toBeStored)
String jsonstr= JsonUtil.stringArrayToJsonStr(toBeStored);
HttpServletResponse response= ServletActionContext.getResponse();
response.setCharacterEncoding("utf-8");
BufferedWriter write=null;
try {
write = new BufferedWriter(new OutputStreamWriter(response
.getOutputStream(), "UTF-8"));
write.write(jsonstr);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
try {
//out.flush();
//out.close();
write.flush();
write.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return null;
}
static String[] convert(List<String[]> from) {
ArrayList<String> list = new ArrayList<String>();
for (Object[] strings : from) {
String[] a = new String[strings.length];
// for(int i=0;i<strings.length;i++){
// a[i]=strings[i].toString();
//
// }
String b= JSONArray.fromObject(strings).toString();
Collections.addAll(list, b);
}
return list.toArray(new String[list.size()]);
}
======================这种原始返回的list是string[]这种返回前台不是object需要用eval加工去【】""=========================
@SuppressWarnings("unchecked")
public String querySJ() {
List<String[]> count = new ArrayList<String[]>();
count= this.getService().querySJ();
//count.toArray(new String[count.size()])
String[] toBeStored = convert(count);
String jsonstr =JsonUtil.stringArrayToJsonStr(toBeStored);
// String jsonstr= JsonUtil.objectToJsonStr(count);
HttpServletResponse response= ServletActionContext.getResponse();
response.setCharacterEncoding("utf-8");
BufferedWriter write=null;
try {
write = new BufferedWriter(new OutputStreamWriter(response
.getOutputStream(), "UTF-8"));
write.write(jsonstr);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
try {
//out.flush();
//out.close();
write.flush();
write.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return null;
}
function doDetail(){var table;
$.ajax({
url:'${ctx}/current-alarm!querySJ.json',
type:'POST',
data:'',
async:false,
success:function(data){
$("#detail-form").append('');
table = '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
table +='<tr><th width="33%">创建时间</th><th width="33%">状态</th><th width="33%">当前处理人</th></tr>';
var detail =eval(data);
if(detail){
for(var i=0;i<detail.length;i++){
var tr='<tr>';
tr+='<td width="42%">'+detail[i][1]+'</td>';
tr+='<td width="10%">'+detail[i][2]+'</td>';
tr+='<td width="48%">'+detail[i][3]+'</td>';
tr+='</tr>';
table += tr;
}
}
table += '</table>';
$("#detail-form").append(table);
}
});
document.getElementById("detail-form").style.display= "block";
$("#detail-form").dialog({
autoOpen : false,
height : 'auto',
width : 490,
modal : true,
onClose:function(){
$("#detail-form").empty();
$("#detail-form").attr("style", "display: none;overflow-y:auto;height:100%;");
}
});
$("#detail-form").dialog("open");
}
===========================list<object>============================
===只要后台传的是对象不管是单个还是list,返回都是数组用0取第一个,可以去外层引号
@Modifying
@Query(value="select * from T_B_SJGD t where 1=1 and id in (?1) order by id",nativeQuery=true)
public List<WorkOrder> queryWorkOrderProcessById(String id);
public String queryWorkOrderProcessById() {
String id=model.getId();
WorkOrder a =new WorkOrder();
List<WorkOrder> tr = new ArrayList<WorkOrder>();
tr =this.getService().queryWorkOrderProcessById(id);
if(tr.size()>0){
a=tr.get(0) ;
JsonConfig config = new JsonConfig();
config.setExcludes(new String[]{"processLogs"});
String json = JSONArray.fromObject(a, config).toString();
HttpServletResponse response = ServletActionContext.getResponse();;
response.setCharacterEncoding("utf-8");
//ServletOutputStream out = null;
BufferedWriter write=null;
try
{
write = new BufferedWriter(new OutputStreamWriter(response
.getOutputStream(), "UTF-8"));
write.write(json);
// out = response.getOutputStream();
// out.write(json.getBytes());
}
catch (IOException e)
{
e.printStackTrace();
}
finally
{
try {
//out.flush();
//out.close();
write.flush();
write.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return null;
} else{
return null;
}
}
==========由于list中的原始数据是object所以返回前台的就是【object,object】===========================
var ry1;
var rey2;
var sb;
var lx;
var fl;
var jb;
var zy;
var cs;
var hs;
var pjhs;
$.ajax({
type:'post',
url:urltro,
async:false,
data:null,
dataType:'json',
success:function(data){
===================这里是不需要eval的============
var datas=eval(data);
//$.each(datas,function(i){
// });
if(datas){
for(var j=0;j<datas.length;j++){
//alert(data[j].status);
// alert(data[j].createTime);
ry1=data[j].bxlxr;
//alert(data[j].bxlxr);
rey2=data[j].XCCLR;
sb=data[j].relateResource;
lx=data[j].gzyelx;
fl=data[j].kind;
jb=data[j].gzdk;
zy=data[j].importance;
cs=data[j].outOfSla;
var name1 = document.getElementById("name1");
var name2 = document.getElementById("name2");
var equipment = document.getElementById("equipment");
var lxt = document.getElementById("lxt");
var flt = document.getElementById("flt");
var jbt = document.getElementById("jbt");
var yxdt = document.getElementById("yxdt");
var slat = document.getElementById("slat");
var hst = document.getElementById("hst");
var evaltime = document.getElementById("evaltime");
if(ry1==""||ry1==null){
ry1="未知";
}
if(rey2==""||rey2==null){
rey2="未知";
}
if(sb==""||sb==null){
sb="未知";
}
if(lx==""||lx==null){
lx="未知";
}
if(fl==""||fl==null){
fl="未知";
}
if(jb==""||jb==null){
jb="未知";
}
if(zy==""||zy==null){
zy="未知";
}
if(cs==""||cs==null){
cs="未知";
}
var til=data[j].title;
var stan=data[j].status;
if(til==""||til==null){
til="未知";
}
if(stan==""||stan==null){
stan="未知";
}
name1.innerHTML +=ry1;
name2.innerHTML +=rey2;
equipment.innerHTML +=sb;
lxt.innerHTML +=lx;
flt.innerHTML +=fl;
jbt.innerHTML +=jb;
yxdt.innerHTML +=zy;
slat.innerHTML +=cs;
name.innerHTML +=til.substr(0,8);
sta.innerHTML +=stan;
}
}
},
error:function(){
//$.message("失败");
}
});
==========================list<String[]>============================
@Modifying
@Query(value="select to_char(to_date(CREATETIME,'yyyy-mm-dd hh24:mi'),'yyyy') as a ,count(*) as b from T_B_SJGD group by to_char(to_date(CREATETIME,'yyyy-mm-dd hh24:mi'),'yyyy') order by to_char(to_date(CREATETIME,'yyyy-mm-dd hh24:mi'),'yyyy')",nativeQuery=true)
public List<String[]> queryWorkOrderProcessCount();
public String queryWorkOrderProcessCount() {
List<String[]> count = new ArrayList<String[]>();
count= this.getService().queryWorkOrderProcessCount();
//count.toArray(new String[count.size()])
//先转为一个大的数组
String[] toBeStored = convert(count);
//JsonUtil.stringArrayToJsonStr(toBeStored)
String jsonstr= JsonUtil.stringArrayToJsonStr(toBeStored);
HttpServletResponse response= ServletActionContext.getResponse();
response.setCharacterEncoding("utf-8");
BufferedWriter write=null;
try {
write = new BufferedWriter(new OutputStreamWriter(response
.getOutputStream(), "UTF-8"));
write.write(jsonstr);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
try {
//out.flush();
//out.close();
write.flush();
write.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return null;
}
static String[] convert(List<String[]> from) {
ArrayList<String> list = new ArrayList<String>();
for (Object[] strings : from) {
String[] a = new String[strings.length];
// for(int i=0;i<strings.length;i++){
// a[i]=strings[i].toString();
//
// }
String b= JSONArray.fromObject(strings).toString();
Collections.addAll(list, b);
}
return list.toArray(new String[list.size()]);
}
======================这种原始返回的list是string[]这种返回前台不是object需要用eval加工去【】""=========================
@SuppressWarnings("unchecked")
public String querySJ() {
List<String[]> count = new ArrayList<String[]>();
count= this.getService().querySJ();
//count.toArray(new String[count.size()])
String[] toBeStored = convert(count);
String jsonstr =JsonUtil.stringArrayToJsonStr(toBeStored);
// String jsonstr= JsonUtil.objectToJsonStr(count);
HttpServletResponse response= ServletActionContext.getResponse();
response.setCharacterEncoding("utf-8");
BufferedWriter write=null;
try {
write = new BufferedWriter(new OutputStreamWriter(response
.getOutputStream(), "UTF-8"));
write.write(jsonstr);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
try {
//out.flush();
//out.close();
write.flush();
write.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return null;
}
function doDetail(){var table;
$.ajax({
url:'${ctx}/current-alarm!querySJ.json',
type:'POST',
data:'',
async:false,
success:function(data){
$("#detail-form").append('');
table = '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
table +='<tr><th width="33%">创建时间</th><th width="33%">状态</th><th width="33%">当前处理人</th></tr>';
var detail =eval(data);
if(detail){
for(var i=0;i<detail.length;i++){
var tr='<tr>';
tr+='<td width="42%">'+detail[i][1]+'</td>';
tr+='<td width="10%">'+detail[i][2]+'</td>';
tr+='<td width="48%">'+detail[i][3]+'</td>';
tr+='</tr>';
table += tr;
}
}
table += '</table>';
$("#detail-form").append(table);
}
});
document.getElementById("detail-form").style.display= "block";
$("#detail-form").dialog({
autoOpen : false,
height : 'auto',
width : 490,
modal : true,
onClose:function(){
$("#detail-form").empty();
$("#detail-form").attr("style", "display: none;overflow-y:auto;height:100%;");
}
});
$("#detail-form").dialog("open");
}
相关推荐
下面我们将详细介绍如何在C#中将List<string>转换为string[]数组,以及如何将string[]数组转换为List<string>。 1. 从System.String[]转换到List<System.String> 当你有一个已存在的string[]数组,并希望将其转换为...
List<Integer> integerList = new ArrayList<>(); integerList.add(1); integerList.add(2); integerList.add(3); Integer[] integers = new Integer[3]; integerList.toArray(integers); ``` 需要注意的是,新生成...
List<Answer> answerList = new ArrayList<Answer>(); JSONArray jsonArray = JSONArray.fromObject(str); answerList = JSONArray.toList(jsonArray, Answer.class); ``` 反过来,若需要将Java对象的List转换为...
swift MD5加密源码的实例详解 ...#import <CommonCrypto>,md5加密方法需要使用的文件) 1.bridge.h桥接文件如下: #ifndef bridge_h #define bridge_h #import <CommonCrypto> #endif /* bridge_h */ 2. Sting+M
**Sting聚类算法概述** Sting(Small World Imbedding Technique for Graphs)是一种用于数据聚类的算法,由Watts和Strogatz在1998年提出。该算法基于图论理论,旨在发现数据中的潜在结构,特别是在复杂网络中寻找...
public static List<String> stringToList(String str) { return Arrays.asList(str.split(",")); } public static void main(String[] args) throws Exception { String str = "11111,21212,234234,23423424,...
<title>Test</title> <script type="text/javascript"> function StringBuffer() { this.__strings__ = []; } StringBuffer.prototype.append = function(str) { this.__strings__.push(str); }; ...
### STING:一种统计信息网格方法 #### 一、引言与背景 随着地理信息系统(Geographic Information System, GIS)的广泛应用以及空间数据的日益增长,如何有效地挖掘这些数据中的隐含模式和特性成为了研究的重点。...
Set<String> uniqueParts = new HashSet<>(Arrays.asList(parts)); // 转换成HashSet去重 String result = String.join(" ", uniqueParts); // 再将去重后的数组转换为字符串 ``` 在上述代码示例中,通过分割和重组...
转换xml到sting,把inputstream 转化成字符串
【前端开源库-sting-builder】是一个致力于帮助开发者构建多语言主干应用程序的工具。这个开源库的核心功能是生成高效、可维护的代码框架,适用于前端开发。Sting Builder旨在简化项目初始化过程,让开发者能够快速...
=`, `<`, `<=`, `>`, `>=`以及`compare()`用于比较字符串。 - `size()`和`length()`返回字符串的字符数量。 - `max_size()`返回字符串的最大可能长度。 - `empty()`检查字符串是否为空。 - `capacity()`返回当前...
6. STING (Statistical Information Grid):STING 是基于网格的聚类方法,它将数据空间划分为一个网格,然后在每个网格单元上统计信息以检测局部密度。这种方法可以快速识别高密度区域。 7. 离群点算法:离群点挖掘...
5. **Sunday算法**:Sunday算法与Boyer-Moore类似,但它使用滑动窗口哈希策略,通过预先计算模式串的多个子串哈希值,实现快速查找。在模式串中有重复子串的情况下,Sunday算法较具优势。 6. **Trie(字典树)**:...
public final class String implements java.io.Serializable, Comparable<String>, CharSequence { / The value is used for character storage. */ private final char value[]; } ``` 而在java 9 及之后,...
alfred-encode-decode-workflow, 将sting编码和解码为多个变体 编码/解码( 下载 v1.8 )将字符串编码和解码为多个变体。要求Alfred应用程序 v2 。安装点击下面的下载按钮双击以导入 Alfred 2查看工作流以添加自定义...
此外,还定义了一个友元函数`ostream &operator<<(ostream &os, String &s)`,使得`String`对象可以方便地输出到`std::ostream`,例如控制台。 模拟实现`std::string`可以帮助开发者理解字符串管理的底层细节,这...
Sting是一种快速,易于使用的编译时依赖项注入工具箱。该工具包接受一组带注释的Java类,并生成源代码以实例化这些组件并将它们连接在一起。 Sting的开发工作量很大,有时文档没有及时更新。但是,该工具箱的目标...