时间:2021-07-01 10:21:17 帮助过:9人阅读
1.页面
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> <%@page import="net.e_lian.bpm.core.user.action.WebUser"%> <%@page import="net.e_lian.bpm.constans.Web"%> <%@ taglib uri="/struts-tags" prefix="s"%> <%@ taglib uri="bpm" prefix="o"%> <% WebUser webUser = (WebUser) session .getAttribute(Web.SESSION_ATTRIBUTE_FRONT_USER); String domainid = webUser.getDomainid(); String applicationid = request.getParameter("application"); String path = request.getContextPath(); %> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Highcharts Example</title> <script src='<s:url value="/script/My97DatePicker/WdatePicker.js"/>'></script> <script src="../../script/jquery-ui/js/jquery-1.8.3.js"></script> <script type="text/javascript" src="../../script/highcharts/highcharts.js" charset="utf-8"></script> <script type="text/javascript" src="../../script/highcharts/highcharts-more.js"></script> <style type="text/css"> .tbInput { border-collapse: collapse; width: 100%; border: 1px solid #E5F4FB; margin-bottom: 5px; margin-right: 0px; margin-top: 8px; } .tdHeadTitle { background-color:#dbf1fe; height: 30px; background-repeat: repeat-x; text-align: left; color: #000; font-size: 14px; font-weight:normal; border-left: #e5f4fb 1px solid; border-right: #e5f4fb 1px solid; } .tdLeft { background: #F8FBFF; vertical-align: middle; font-size: 12px; text-align: right; width: 15%; border: 1px solid #E5F4FB; empty-cells: show; } .tdRight { border: 1px solid #E5F4FB; empty-cells: show; vertical-align: middle; padding-left: 5px; padding-top: 2px; padding-bottom: 2px; font-size: 12px; width: 85%; } .tdRight1 { border: 1px solid #E5F4FB; empty-cells: show; vertical-align: middle; padding-left: 5px; padding-top: 2px; padding-bottom: 2px; font-size: 12px; width: 35%; } .d1 { background-color:#F7FAFF; height: 30px; text-align: center; color:#173E5B; font-size: 14px; border-style:solid; border-width:1px; } .d2 { vertical-align: middle; font-size: 12px; text-align: center; empty-cells: show; border-style:solid; border-width:1px; } .pp{ border: 1px solid #BDC1C4; padding-top:10px; width: 100%; } #box1{ border:1px solid #F8FBFF; padding-top:10px; padding-left:20px; padding-right:20px; margin:10px; height:700px; } .yincang{ display:none; } .zhidu{ disabled:disabled; } .xianshi{ display:block; } .div2{ margin-top:10px; } .div1{ border:1px solid #000; margin-top:1170px; } .ddd{ padding-right:80px; } </style> <script type="text/javascript"> var contextPath='<%=path%>'; var domainid='<%=domainid%>'; var applicationid='<%=applicationid%>'; var bg=0;//主要用来判断继续分析后面有无单选项 var c="";//关联分析y轴未转码值 var s="";//关联分析series的未转码值 var conditions="";//关联分析y轴已转码值 var seriesname="";//关联分析series的已转码值 var tjsj="";//接收选择柱状图条件 var sjsz="";//接收继续关联选中复选框值 var titles="";//highscharts标题 var fxk;//所选复选框文本内容 var fxk1;//所选复选框文本内容] var yysj=new Array();//医院name值 var wpdlname=new Array();//物品大类name值 var wpzlname=new Array();//物品中类name值 var checksj=new Array();//录入数据复选框的name值 $(function(){ document.getElementById('jixuguanlian').className='yincang'; var quxz="<table border=1 cellSpacing=0 cellPadding=0 align=left rules=all class='pp' > <tr><td class='tdHeadTitle' colSpan='4' style='border-bottom: #b4ccee 1px solid; border-left: #b4ccee 1px solid; border-top: #b4ccee 1px solid; border-right: #b4ccee 1px solid'>Ⅰ区域选择";// var htmlfd="<table border=1 cellSpacing=0 cellPadding=0 align=left rules=all class='pp' > <tr><td class='tdHeadTitle' colSpan='4' style='border-bottom: #b4ccee 1px solid; border-left: #b4ccee 1px solid; border-top: #b4ccee 1px solid; border-right: #b4ccee 1px solid'>Ⅱ患者一般信息</td></tr><tr><td class='tdLeft'>基本信息:</td><td class='tdRight' colSpan='3'>姓名:<input id='xm' type='text' > <br>性别:<input name='xb' type='radio' value='1' />男 <input name='xb' type='radio' value='2' />女 <br>联系电话:<input name='dh' type='radio' value='1' />有<input name='dh' type='radio' value='2' /> 无<br></td></tr>";//物品名称 var bms=["HJ_dic","WHCD2015_dic","ZY_dic","SHFSYY_dic","SHFSDD_dic","SHFSSHD2015_dic","SFGY_dic","YJQK_dic","SHXZ_dic","SHBW2015_dic","SHLJXT_dic","SHYZCD_dic","SHJJ2015_dic","CPSYGX_dic","DXAL_dic"]; var bname=["户籍","受教育程度","职业","伤害发生原因","伤害发生地点","伤害发生时活动","是否故意"," 饮酒情况","伤害性质","伤害部位","伤害累及系统","伤害严重程度","伤害结局","与该产品使用的关系"," 典型案例"]; var zd=["VC_HJ","VC_WHCD","VC_ZY","VC_SHFSYY","VC_SHFSDD","VC_SHFSSHD","VC_SFGY","VC_YJQK","VC_SHXZ","VC_SHBW","VC_SHLJXT","VC_SHYZCD","VC_SHJJ","VC_CPZLSFYG","VC_DXALLX"]; var tdleft="";//录入表数据 var table1=""; var qyleft="";//区域数据 var sfgy="";//是否故意数据项 var r=0; var qy=new Array();//医院区域 //自动获取录入表数据 $.ajax({ url : contextPath + "/portal/custom/getDataItem.action", dataType : 'json', success: function(item_objid){ var json = eval(item_objid); for(var i=0;i<bms.length;i++){ if(bms[i]!="SFGY_dic"){ tdleft+="<tr> <td class='tdLeft' >"+bname[i]+"<input type=checkbox name=All"+i+" onclick=\"checkAll('mm"+i+"')\">:</td><td class='tdRight' colSpan='3'>"; } for(var key in json.list){ if(json.list[key].formname.indexOf(bms[i]) > 0){ if(json.list[key].formname.indexOf("SFGY_dic") > 0){ sfgy+="<input type=checkbox name=sfgy value=\""+json.list[key].item_objid+"\" onclick=\"checkItem('sfgy1')\">"+json.list[key].item_objjc; }else{ tdleft+="<input type=checkbox name=mm"+i+" value=\""+bms[i]+","+zd[i]+","+json.list[key].item_objid+","+bname[i]+"\" onclick=\"checkItem('All"+i+"')\">"+json.list[key].item_objjc; } } } checksj[i]="mm"+i; tdleft+="</td></tr>"; if(i==2){ tdleft+="<tr><td class='tdHeadTitle' colSpan='4' style='border-bottom: #b4ccee 1px solid; border-left: #b4ccee 1px solid; border-top: #b4ccee 1px solid; border-right: #b4ccee 1pxsolid'>Ⅲ 伤害事件的基本情况</td></tr>"; } if(i==7){ tdleft+="<tr><td class='tdHeadTitle' colSpan='4' style='border-bottom: #b4ccee 1px solid; border-left: #b4ccee 1px solid; border-top: #b4ccee 1px solid; border-right: #b4ccee 1pxsolid'> Ⅳ 伤害临床信息</td></tr>"; } if(i==11){ tdleft+="<tr><td class='tdLeft'>伤害临床诊断:</td><td class='tdRight' colSpan='3'><input id='LCZD' type='text' ></td></tr>"; } } table1=htmlfd+tdleft+"<tr><td align=right colspan='4'><button id='tongji' type='button' onclick=\"Highscat()\" >统计</button></td></tr></table>"; document.getElementById("aaaaaas"). innerHTML=table1; document.getElementById("sfgy"). innerHTML=sfgy; //document.getElementById("aaaaaas").innerText=table1; } }); //自动获取区域数据 $.ajax({ url : contextPath + "/portal/custom/getAreaDic.action", dataType : 'json', success: function(code){ var json = eval(code); for(var key in json.list){ qy[r]=json.list[key].qy; r++; } uniqueArray(qy); for(var i=0;i<qy.length;i++){ qyleft+="<tr> <td class='tdLeft' >"+qy[i]+"<input type=checkbox name=Agg"+i+" onclick=\"checkAll('mg"+i+"')\">:</td><td class='tdRight' colSpan='3'>"; for(var key in json.list){ if(json.list[key].qy==(qy[i])){ qyleft+="<input type=checkbox name=mg"+i+" value=\""+json.list[key].code+"\" onclick=\"checkItem('Agg"+i+"')\">"+json.list[key].ares; } } yysj[i]="mg"+i; qyleft+="</td></tr>"; } document.getElementById("qysj"). innerHTML=quxz+qyleft+"</table>"; //document.getElementById("aaaaaas"). innerText=htmlfd+qyleft+"</table>"; } }); //var selects = document.getElementById('selectData1'); //selects.length = 0; var wpsj="<table border=1 cellSpacing=0 cellPadding=0 align=left rules=all class='pp' > <tr> <td class='tdLeft' >物品大类<input type=checkbox name=wpdl1 onclick=\"checkAll('wpdl')\" >:</td><td class='tdRight' colSpan='3'> ";// $.ajax({ url : contextPath + "/portal/custom/getWpdldic.action", dataType : 'json', success: function(dlid){ var json = eval(dlid); for(var key in json.list){ wpsj+="<input type=checkbox name=wpdl value=\""+json.list[key].dlid+"\" onclick=\"checkItem('wpdl1')\" onchange=\"getSelectData2(this.value)\">"+json.list[key].dlname; //var objid= json.list[key].dlid; //var objjc= json.list[key].dlname; //selects.options.add(new Option(objjc,objid)); } wpsj+="</td></tr> <tr> <td id='wpzls' class='tdLeft' >物品中类 <input type=checkbox name=wpzl1 onclick=\"checkAll('wpzl')\">:</td><td id='wpzl' class='tdRight' colSpan='3'> </tr><tr> <td id='wpxls' class='tdLeft' >物品小类 <input type=checkbox name=wpxl1 onclick=\"checkAll('wpxl')\">:</td><td id='wpxl' class='tdRight' colSpan='3'> </tr><tr><td class='tdLeft'>物品名称:</td><td class='tdRight1' colSpan='3'><input id='wpname' type='text' /></td></tr>"; document.getElementById("wpsj"). innerHTML=wpsj+"</table>"; } }) }); function checkAll(str) { var a = document.getElementsByName(str); var n = a.length; for (var i=0; i<n; i++) a[i].checked = window.event.srcElement.checked; if(str=="wpdl"){ getSelectData2("wpdl"); } if(str=="wpzl"){ getSelectData3("wpzl"); } } function getSelectData2(dataid){ var wpzl="<br />"; var wpzls=0; var wpdlsj="";//所有复选框的值 传递给后台 var wpdlss=new Array();//所有复选框的值 前台用 var str=document.getElementsByName("wpdl"); for (i=0;i<str.length;i++) { if(str[i].checked == true) { wpdlsj+=str[i].value+"::"; } } wpdlss=wpdlsj.split("::"); $.ajax({ dataType : 'json', data: {"id":wpdlsj}, url : contextPath + "/portal/custom/getWpzldic.action", success: function(zlid){ var json = eval(zlid); for(var i=0;i<wpdlss.length;i++){ for(var key in json.list){ if(wpdlss[i]==json.list[key].dlid){ wpzl+="<input type=checkbox name=wpzl value=\""+json.list[key].zlid+"\" onclick=\"checkItem('wpzl1')\" onchange=\"getSelectData3(this.value)\">"+json.list[key].zlname; } } wpzl+="<br />"; } document.getElementById("wpzls").innerHTML="物品中类 <input type=checkbox name=wpzl1 onclick=\"checkAll('wpzl')\">:"; document.getElementById("wpzl").innerHTML=wpzl; document.getElementById("wpxls").innerHTML="物品小类 <input type=checkbox name=wpxl1 onclick=\"checkAll('wpxl')\">:"; document.getElementById("wpxl").innerHTML=""; } }) }; function getSelectData3(dataid){ var wpxl="<br />"; var wpdlsj="";//所有复选框的值 传递给后台 var wpdlss=new Array();//所有复选框的值 前台用 var str=document.getElementsByName("wpzl"); for (i=0;i<str.length;i++) { if(str[i].checked == true) { wpdlsj+=str[i].value+"::"; } } wpdlss=wpdlsj.split("::"); $.ajax({ dataType : 'json', data: {"id":wpdlsj}, url : contextPath + "/portal/custom/getWpxldic.action", success: function(xlid){ var json = eval(xlid); for(var i=0;i<wpdlss.length;i++){ for(var key in json.list){ if(wpdlss[i]==json.list[key].zlid){ wpxl+="<input type=checkbox name=wpxl value=\""+json.list[key].xlid+"\" onclick=\"checkItem('wpxl1')\" >"+json.list[key].xlname; } } wpxl+="<br />"; } document.getElementById("wpxls").innerHTML="物品小类 <input type=checkbox name=wpxl1 onclick=\"checkAll('wpxl')\">:"; document.getElementById("wpxl").innerHTML=wpxl; } }) }; function checkItem(str) { var e = window.event.srcElement; var all = eval("document.all."+ str); if (e.checked) { var a = document.getElementsByName(e.name); all.checked = true; for (var i=0; i<a.length; i++) { if (!a[i].checked) { all.checked = false; break; } } } else all.checked = false; }; //数组去重 function uniqueArray(data){ data = data || []; var a = {}; for (var i=0; i<data.length; i++) { var v = data[i]; if (typeof(a[v]) == 'undefined'){ a[v] = 1; } }; data.length=0; for (var i in a){ data[data.length] = i; } return data; }; function Highscat() { var sfgysj="";//是否故意 var sfgj=document.getElementsByName("sfgy"); for (i=0;i<sfgj.length;i++) { if(sfgj[i].checked == true) { sfgysj+=sfgj[i].value+"::"; } } if(sfgysj== ""){ alert("是否故意必须填写!"); }else{ var chestr="";//所有复选框的值 var rnt=new Array(); for(var jj=0;jj<checksj.length;jj++){ var str=document.getElementsByName(checksj[jj]); var jjk="";//一类复选框的值 for (i=0;i<str.length;i++) { if(str[i].checked == true) { chestr+=str[i].value+";"; jjk+=str[i].value+";"; } } if(jjk == ""){ }else{ chestr+="::";//主要用来区分多少个不同类的复选框有值 } } if(chestr == "") { alert("请选择两类数据进行关联分析!"); } else { rnt=chestr.split("::"); if(rnt.length==2){ alert("必须选择两类复选框"); }else if(rnt.length>3){ alert("只能选择两类复选框"); }else{ var shujuss=new Array(); var table1=new Array(); var table2=new Array(); var table4=new Array(); var table5=new Array(); shujuss=chestr.split("::"); table1=shujuss[0].split(";"); table2=shujuss[1].split(";"); table4=table1[0].split(","); table5=table2[0].split(","); fxk=table4[3];//所选复选框文本内容 fxk1=table5[3];//所选复选框文本内容 var bm=table4[0]; var bm1=table5[0]; document.getElementById(bm).className='yincang'; document.getElementById(bm1).className='yincang'; var starttime=document.getElementById('shfssj').value;//伤害开始时间 var shendtime=document.getElementById('shjssj').value;//伤害结束时间 var gxstarttime=document.getElementById('sjgxsj').value;//数据更新开始时间 var gxendtime=document.getElementById('gxjssj').value;//数据更新结束时间 var wpdlsj="";//物品大类 var wpdl=document.getElementsByName("wpdl"); for (i=0;i<wpdl.length;i++) { if(wpdl[i].checked == true) { wpdlsj+=wpdl[i].value+"::"; } } var wpzlsj="";//物品中类 var wpzl=document.getElementsByName("wpzl"); for (i=0;i<wpzl.length;i++) { if(wpzl[i].checked == true) { wpzlsj+=wpzl[i].value+"::"; } } var wpxlsj="";//物品小类 var wpxl=document.getElementsByName("wpxl"); for (i=0;i<wpxl.length;i++) { if(wpxl[i].checked == true) { wpxlsj+=wpxl[i].value+"::"; } } //var wpdl=document.getElementById('selectData1').value;//物品大类 //var wpzl=document.getElementById('selectData2').value;//物品中类 //var wpxl=document.getElementById('selectData3').value;//物品小类 var wpmc=encodeURIComponent(document.getElementById('wpname').value);//物品名称 var LCZD= encodeURIComponent(document.getElementById('LCZD').value);//临床诊断 var yyvalues="";//所有医院的值 var rnt=new Array(); for(var jj=0;jj<yysj.length;jj++){ var str=document.getElementsByName(yysj[jj]); var jjk="";//一类复选框的值 for (i=0;i<str.length;i++) { if(str[i].checked == true) { yyvalues+=str[i].value+";"; jjk+=str[i].value+";"; } } if(jjk == ""){ }else{ yyvalues+="::";//主要用来区分多少个不同类的复选框有值 } } var lx=1;//类型 var xm= encodeURIComponent(document.getElementById('xm').value);//对汉字进行转码 var chestr= encodeURIComponent(chestr);//对汉字进行转码 var xb1=""; var xb=document.getElementsByName('xb');//性别 for(var i=0; i<xb.length; i ++){ if(xb[i].checked){ xb1=xb[i].value; } } var dh1=""; var dh=document.getElementsByName('dh');//联系电话 for(var i=0; i<dh.length; i ++){ if(dh[i].checked){ dh1=dh[i].value; } } var r=0; var htmlfd="<table border=1 cellSpacing=0 cellPadding=0 align=left rules=all class='pp' ><tr><td class='d1'></td>";//物品名称 //var wpname="<tr><td class='d1'>伤害人次</td>";//伤害人次表格 var sjbg="<table border=1 cellSpacing=0 cellPadding=0 align=left rules=all class='pp' ><tr><td class='d1'></td>";//关联分析图表格 var jjjj=new Array();//x轴值 var xtext =new Array();//y轴 var bkl=new Array() ;//人次 var options; $.ajax({ type : 'get', url : contextPath + "/portal/custom/getCdcgl.action", dataType : 'json', data: {"checks":chestr,"xm":xm,"xb":xb1,"dh":dh1,"lx":lx,"starttime":starttime,"shendtime":shendtime,"gxstarttime":gxstarttime,"gxendtime":gxendtime,"wpdl":wpdlsj,"wpzl":wpzlsj,"wpxl":wpxlsj,"wpname":wpmc,"yys":yyvalues,"sfgy":sfgysj,"LCZD":LCZD},//给后台传值 success : function(data) { var json = eval(data); for(var key in json.list){ jjjj[r]=json.list[key].glgx; xtext[r] = json.list[key].name; r++; } uniqueArray(jjjj); uniqueArray(xtext); for (var jk=0;jk<xtext.length;jk++){ var hj="test"+jk; bkl[jk]=hj; } for (var jk=0;jk<jjjj.length;jk++){ sjbg+="<td class='d1'>"+jjjj[jk]+"</td>"; } sjbg+="</tr>"; for (var jk=0;jk<xtext.length;jk++){ bkl[jk]=new Array(); sjbg+="<tr><td class='d1'>"+xtext[jk]+"</td>"; for (var i=0;i<jjjj.length;i++){ bkl[jk][i]=0; var bgss="<td class='d2'>0</td>"; for(var key in json.list){ var nnn=json.list[key].glgx; var mmmm=json.list[key].name; if((xtext[jk]==(mmmm))&&(jjjj[i]==(nnn))){ bkl[jk][i]=json.list[key].data; bgss="<td class='d2'>"+json.list[key].data+"</td>"; } } sjbg+=bgss; } sjbg+="</tr>"; options.series[jk].name=xtext[jk]; options.series[jk].data=bkl[jk]; } document.getElementById("biaoge").innerHTML=sjbg+"</table>"; chart = new Highcharts.Chart(options); for(var i=0;i<20;i++){ if(chart.series.length>xtext.length){ var j=chart.series.length; chart.series[j-1].remove(); } } }, error : function(e) { alert("error: " + e.responseText); } }); document.getElementById('container').className='div1'; options = { chart: { renderTo:'container', type: 'column' }, title: { text: fxk+"与"+fxk1+"关联分析图" }, subtitle: { text: '' }, xAxis: { categories:jjjj }, yAxis: { min: 0, title: { text: '' } }, tooltip: { headerFormat: '<span style="font-size:10px">{point.key}</span><table>', pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' + '<td style="padding:0"><b>{point.y:.1f} 人次</b></td></tr>', footerFormat: '</table>', shared: true, useHTML: true }, plotOptions: { /*series : { events : { legendItemClick: function(event) { alert("点击了:"+this.name); } } },*/ column: { pointPadding: 0.2, borderWidth: 0, point: { events: { click: function (e) { c=e.point.category; s=e.point.series.name; conditions= encodeURIComponent(e.point.category);//对汉字进行转码 seriesname=encodeURIComponent(e.point.series.name); document.getElementById('jixuguanlian').className='xianshi'; document.getElementById('box1').className='yincang'; //var conditions=encodeURI(encodeURI(e.point.category)); //var seriesname=encodeURI(encodeURI(e.point.series.name)); //window.open(contextPath+'/portal/share/custom/highcharts/CDCSkip.jsp?_formid=11e5-3738-24a2e744-8637-0d6c93828b97&conditions='+conditions+'&seriesname='+seriesname,'_self','width=200,height=100'); } } } } }, series: [ { },{ },{ },{ }, { },{ },{ },{ }, { },{ },{ },{ }, { },{ },{ },{ } /*<c:forEach var="x" begin="0" end="11"> {}, </c:forEach>*/ ] }; } } } }; function Highscat1() { document.getElementById('box1').disabled="disabled";//设定div为只读 document.getElementById('tongji').disabled="disabled";//设定button按钮只读 var xtext =new Array();//X轴TEXT var ytext =new Array();//Y轴 var Sname =new Array();//serres name属性值 var name;//serres name属性值 var r=0; var options; var sj="";//当前的 var radios = document.getElementsByName("sj"); var sjbg="<table border=1 cellSpacing=0 cellPadding=0 align=left rules=all class='pp' ><tr>";//关联分析图表格 var bgsj="<tr>";//次数 //根据 name集合长度 遍历name集合 for(var i=0;i<radios.length;i++) { //判断那个单选按钮为选中状态 if(radios[i].checked) { //弹出选中单选按钮的值 sj=radios[i].value; radios[i].checked=false; } } if(sj == "") { alert("请选择一项数据"); }else{ Sname=sj.split(","); sjsz=sjsz+Sname[0]+","+Sname[1]+";"; bm2=Sname[0]; name=Sname[2]; document.getElementById('box1').className='xianshi'; document.getElementById('jixuguanlian').className='yincang'; document.getElementById(bm2).className='yincang'; $.ajax({ type : 'get', url : contextPath + "/portal/custom/getCDCcontinuegl.action", dataType : 'json', data: {"seriesname":seriesname,"conditions":conditions,"sj":sj,"tjsj":tjsj,"sjsz":sjsz}, success : function(data) { var json = eval(data); for(var key in json.list){ json.list[key].y = json.list[key].data; //给Y轴赋值 sjbg+="<td class='d1'>"+json.list[key].name+"</td>"; bgsj+="<td class='d2'>"+json.list[key].data+"</td>"; xtext[r] = json.list[key].name;//给X轴TEXT赋值 r++; json.list[key].color= "#558ED5"; } sjbg+="</tr>"; bgsj+="</tr>"; document.getElementById("biaoge").innerHTML=sjbg+bgsj+"</table>"; chart.series[0].setData(json.list);//数据填充到highcharts上面 }, }); document.getElementById('container').className='div1'; var chart = new Highcharts.Chart({ chart : { renderTo : 'container', type : 'column' //显示类型 柱形 }, title : { text: fxk+"/"+s+"---->"+fxk1+"/"+c+titles+"---->"+name+"关联分析图"//图表的标题 }, plotOptions: { column: { pointWidth: 30,//设定柱子宽度 point: { events: { click: function (e) { //alert(event.point.y); //alert(event.point.category); //var conditions=encodeURI(encodeURI(e.point.category)); //window.open(contextPath+'/portal/share/custom/highcharts/CDCSkip1.jsp?_formid=11e5-3738-24a2e744-8637-0d6c93828b97&conditions1='+conditions,'_self'); if(bg<8){ titles=titles+"--->"+name+"/"+e.point.category; tjsj=tjsj+encodeURIComponent(e.point.category); bg++; document.getElementById('jixuguanlian').className='xianshi'; document.getElementById('box1').className='yincang'; } } } } }, }, xAxis : { categories : xtext }, yAxis : { min: 0, title : { text : '伤害次数' //Y轴的名称 }, }, series : [ { name : name } ] }); } }; </script> </head> <body> <div id="box1" > <table border=1 cellSpacing=0 cellPadding=0 align=center class='tbInput' > <tr> <td class='tdLeft'> 伤害发生时间: </td> <td class='tdRight1'> <input id="shfssj" type="text" class="Wdate" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd ',maxDate:'#F{$dp.$D(\'shjssj\')||\'2020-10-01\'}'})"/> </td> <td class='tdLeft'> 至 </td> <td class='tdRight1'> <input id="shjssj" type="text" class="Wdate" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd ',minDate:'#F{$dp.$D(\'shfssj\')}',maxDate:'2020-10-01'})"/> </td> </tr> <tr> <td class='tdLeft'> 数据更新时间: </td> <td class='tdRight1'> <input id="sjgxsj" type="text" class="Wdate" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd ',maxDate:'#F{$dp.$D(\'gxjssj\')||\'2020-10-01\'}'})"/> </td> <td class='tdLeft'> 至 </td> <td class='tdRight1'> <input id="gxjssj" type="text" class="Wdate" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd ',minDate:'#F{$dp.$D(\'sjgxsj\')}',maxDate:'2020-10-01'})"/> </td> </tr> <tr> <td class='tdLeft' >是否故意<font color='red'>*</font> <input type=checkbox name=sfgy1 onclick="checkAll('sfgy')">: </td> <td id='sfgy' class='tdRight' colSpan='3'> </td> </tr> </table> <div id="wpsj" ></div> <div id="qysj" ></div> <div id="aaaaaas" class='div2' ></div> <div id="container" ></div> <div id="biaoge" class='div2' ></div> </div> <div id="jixuguanlian" > <table border=1 cellSpacing=0 cellPadding=0 align=center class='tbInput' style="width:50%" > <tr> <td class='tdLeft' style="width:10%" > 数据: </td> <td class='tdRight1'> <font id="HJ_dic" ><input name="sj" type="radio" value="HJ_dic,VC_HJ,户籍" >户籍</font> <font id="WHCD2015_dic" ><input name="sj" type="radio" value="WHCD2015_dic,VC_WHCD,受教育程度" >受教育程度</font> <font id="ZY_dic" ><input name="sj" type="radio" value="ZY_dic,VC_ZY,职业" >职业</font> <font id="SHFSYY_dic" ><input name="sj" type="radio" value="SHFSYY_dic,VC_SHFSYY,伤害发生原因" >伤害发生原因</font><br/> <font id="SHFSDD_dic" ><input name="sj" type="radio" value="SHFSDD_dic,VC_SHFSDD,伤害发生地点" >伤害发生地点</font> <font id="SHFSSHD2015_dic" ><input name="sj" type="radio" value="SHFSSHD2015_dic,VC_SHFSSHD,伤害发生时活动" >伤害发生时活动</font> <font id="SFGY_dic" ><input name="sj" type="radio" value="SFGY_dic,VC_SFGY,是否故意" >是否故意</font> <font id="YJQK_dic" ><input name="sj" type="radio" value="YJQK_dic,VC_YJQK,饮酒情况" >饮酒情况</font><br/> <font id="SHXZ_dic" ><input name="sj" type="radio" value="SHXZ_dic,VC_SHXZ,伤害性质" >伤害性质</font> <font id="SHBW2015_dic" ><input name="sj" type="radio" value="SHBW2015_dic,VC_SHBW,伤害部位" >伤害部位</font> <font id="SHLJXT_dic" ><input name="sj" type="radio" value="SHLJXT_dic,VC_SHLJXT,伤害累及系统" >伤害累及系统</font> <font id="SHYZCD_dic" ><input name="sj" type="radio" value="SHYZCD_dic,VC_SHYZCD,伤害严重程度" >伤害严重程度</font> <br/> <font id="SHJJ2015_dic" ><input name="sj" type="radio" value="SHJJ2015_dic,VC_SHJJ,伤害结局" >伤害结局</font> <font id="CPSYGX_dic" ><input name="sj" type="radio" value="CPSYGX_dic,VC_CPZLSFYG,与该产品使用的关系" >与该产品使用的关系</font> <font id="DXAL_dic" ><input name="sj" type="radio" value="DXAL_dic,VC_DXALLX,典型案例" >典型案例</font> </td> </tr> <tr> <td align=right colspan=2> <button type="button" onclick="Highscat1()" >继续统计</button> </td> </tr> </table> </div> </body> </html>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <!-- domain package --> <package name="highcharts-front" extends="bpm-default" namespace="/portal/custom"> <action name="qureybyid" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="QureyByid"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highcharts-index.jsp </result> <interceptor-ref name="params" /> </action> <action name="demo3" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="demo3"> <interceptor-ref name="params" /> </action> <action name="getHighChartsData" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getHighChartsData"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getCdcgl" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getCdcgl"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getCDCcontinuegl" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getCDCcontinuegl"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getCDCdh" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getCDCdh"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getCDCxc" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getCDCxc"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getCDCzl" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getCDCzl"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getDataItem" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getDataItem"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getWSDataItem" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getWSDataItem"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getOnlnegl" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getOnlnegl"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getOnlinecontinuegl" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getOnlinecontinuegl"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getHighChartsOnline" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getHighChartsOnline"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getWpStatistics" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getWpStatistics"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getOnlineWpStatistics" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getOnlineWpStatistics"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getWpname" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getWpname"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getWpNumber" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getWpNumber"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getWpzldic" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getWpzldic"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getPm" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getPm"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getDHsj" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getDHsj"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getAreaDic" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getAreaDic"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getWpdldic" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getWpdldic"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getWpxldic" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getWpxldic"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getShengdic" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getShengdic"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getShidic" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getShidic"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="getXiandic" class="net.e_lian.bpm.custom.highcharts.action.highchartsDateAction" method="getXiandic"> <result name="success" type="dispatcher"> /portal/share/custom/highcharts/highchartsDemo.jsp </result> <interceptor-ref name="params" /> </action> <action name="save" class="net.e_lian.bpm.core.domain.action.DomainAction" method="doSave"> <result name="input" type="dispatcher"> /portal/share/uManageDomainInfo.jsp </result> <result name="success" type="dispatcher"> /portal/share/uManageDomainInfo.jsp </result> <interceptor-ref name="defaultStack"> <param name="workflow.excludeMethods">default</param> </interceptor-ref> </action> </package> </struts>3.建立实体类
package net.e_lian.bpm.custom.highcharts.action; import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletResponse; import net.e_lian.bpm.util.http.ResponseUtil; import net.e_lian.bpm.util.json.JsonUtil; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionSupport; public class highchartsDateAction extends ActionSupport { final static String APPLICATIONID = "11e5-2f5a-1002d0a2-bd9d-990d0d4debcd"; Connection conn; Statement psts; ResultSet rs; private static final long serialVersionUID = 1L; /** * highcharts用的 * * @Title: chart * @Description: 直接转出JSON传递给前台页面接受 * @return * @throws Exception */ public void getHighChartsData() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.chart(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss); } //CDC电话 public void getCDCdh() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.CDCdh(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss); } //CDC现场 public void getCDCxc() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.CDCxc(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss); } //CDC质量统计 public void getCDCzl() throws Exception { chartDao cDao = new chartDao(); System.out.println("1111111"); List<Map<String, Object>> list = cDao.CDCzl(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss); } public void getWpStatistics() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.Wptj(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss); } public void getCdcgl() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.CDCglfx(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss); } public void getCDCcontinuegl() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.CDCcontinuegl(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss); } public void getDataItem() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.DataItem(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss); } public void getWSDataItem() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.WSDataItem(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss); } public void getOnlnegl() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.Onlneglfx(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss); } public void getOnlinecontinuegl() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.Onlinecontinuegl(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss = JsonUtil.toJson(map); //System.out.println("ss========"+ss); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss); } public void getOnlineWpStatistics() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.onlineWptj(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss); } public void getHighChartsOnline() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.online(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss); } public void getAreaDic() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.aredic(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss1 = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss1); } public void getDHsj() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.DHsj(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss1 = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss1); } public void getWpdldic() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.wpdldic(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss1 = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss1); } public void getWpname() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.wpdic(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss1 = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss1); } public void getWpNumber() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.WpNumber(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss1 = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss1); } public void getWpzldic() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.wpzldic(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss2 = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss2); } public void getWpxldic() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.wpxldic(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss2 = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss2); } public void getShengdic() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.Shengdic(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss2 = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss2); } public void getShidic() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.Shidic(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss2 = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss2); } public void getXiandic() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.Xiandic(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss2 = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss2); } public void getPm() throws Exception { chartDao cDao = new chartDao(); List<Map<String, Object>> list = cDao.pm(); Map<String, Object> map = new HashMap<String, Object>(); map.put("list", list); String ss2 = JsonUtil.toJson(map); HttpServletResponse response = ServletActionContext.getResponse(); ResponseUtil.setJsonToResponse(response, ss2); } /** * 喷出json数据 */ public void printWriter(String json) { HttpServletResponse response = ServletActionContext.getResponse(); response.setContentType("application/json;charset=UTF-8"); PrintWriter writer; try { writer = response.getWriter(); writer.write(json); writer.close(); } catch (IOException e) { e.printStackTrace(); } } }
package net.e_lian.bpm.custom.highcharts.action; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.apache.struts2.ServletActionContext; import net.e_lian.bpm.base.action.BaseAction; import net.e_lian.bpm.base.action.ParamsTable; import net.e_lian.bpm.core.user.ejb.UserDefined; import net.e_lian.bpm.custom.db.DataBaseConnection; import net.e_lian.bpm.custom.highcharts.action.DataEntity; /*** * @see 传参数调用 数据库连接 * @author niuchunlei * @since 2015-11-05 * @param APPLICATIONID * 国家产品伤害监测系统 */ public class chartDao { final static String APPLICATIONID = "11e5-2f5a-1002d0a2-bd9d-990d0d4debcd"; Connection conn; Statement psts; ResultSet rs; ResultSet qy; String bmsum=""; DataBaseConnection dbc = new DataBaseConnection(); HttpServletRequest request = ServletActionContext.getRequest(); //CDC分析(包含2012,2015,排名分析) public List<Map<String, Object>> chart() throws UnsupportedEncodingException { List<Map<String, Object>> dalist = new ArrayList<Map<String, Object>>(); HttpServletRequest request = ServletActionContext.getRequest(); String starttime=request.getParameter("starttime");//伤害发生时间 String shendtime=request.getParameter("shendtime");//伤害结束时间 String gxstarttime=request.getParameter("gxstarttime");//数据更新开始时间 String gxendtime=request.getParameter("gxendtime");//数据更新结束时间 String yys=request.getParameter("yys"); String wpdl=request.getParameter("wpdl");//物品大类 String wpzl=request.getParameter("wpzl");//物品中类 String wpxl=request.getParameter("wpxl");//物品小类 String wpname=request.getParameter("wpname");//物品名称 String gy=request.getParameter("datatime");//数据项 String pm=request.getParameter("pm");//排名 String xm=request.getParameter("xm"); String xb=request.getParameter("xb"); String dh=request.getParameter("dh"); String LCZD=request.getParameter("LCZD");//临床诊断 String sfgy=request.getParameter("sfgy");//对汉字进行解码;//是否故意 if(""!=xm&&null!=xm){ xm=java.net.URLDecoder.decode(xm,"utf-8");//对汉字进行解码 } if(""!=wpname&&null!=wpname){ wpname=java.net.URLDecoder.decode(wpname,"utf-8");//对汉字进行解码 } if(""!=LCZD&&null!=LCZD){ LCZD=java.net.URLDecoder.decode(LCZD,"utf-8");//对汉字进行解码 } String lx=request.getParameter("lx");//CDC类型区分2012,2015 String checkss=request.getParameter("checks");//所选中复选框的值 String sql=""; if(""!=checkss&&null!=checkss){ String checks=java.net.URLDecoder.decode(checkss,"utf-8");//对汉字进行解码 String shuju[]=checks.split("::"); for(int i=0;i<shuju.length;i++){ String table1[]=shuju[i].split(";"); String zd="";//字段名 String jk="";//条件 for(int j=0;j<table1.length;j++){ String table3[]=table1[j].split(","); zd=table3[1]; if(j==(table1.length-1)){ jk+="'"+table3[2]+"'"; sql+=" and to_char(item_"+zd+") in ("+jk+") "; }else{ jk+="'"+table3[2]+"',"; } } } } if(""!=starttime&&null!=starttime){ sql += " and item_VC_SHFSSJ >= to_date('"+starttime +"','yyyy-mm-dd ') "; } if(""!=shendtime&&null!=shendtime){ sql += " and item_VC_SHFSSJ <= to_date('"+shendtime +"','yyyy-mm-dd ')+1 "; } if(""!=gxstarttime&&null!=gxstarttime){ sql += " and item_INTANALYSISDBTime >= to_date('"+gxstarttime +"','yyyy-mm-dd ') "; } if(""!=gxendtime&&null!=gxendtime){ sql += " and item_INTANALYSISDBTime <= to_date('"+gxendtime +"','yyyy-mm-dd ')+1 "; } if(""!=yys&&null!=yys){ String yyshuju[]=yys.split("::"); String yytj="";//条件 for(int i=0;i<yyshuju.length;i++){ String yytl[]=yyshuju[i].split(";"); for(int j=0;j<yytl.length;j++){ if(j==(yytl.length-1)){ yytj+="'"+yytl[j]+"'"; }else{ yytj+="'"+yytl[j]+"',"; } } } sql += " and ITEM_VC_JCYYBH in("+ yytj+") "; } if(""!=wpdl&&null!=wpdl){ String yyshuju[]=wpdl.split("::"); String yytj="";//条件 for(int i=0;i<yyshuju.length;i++){ if(i==(yyshuju.length-1)){ yytj+="'"+yyshuju[i]+"'"; }else{ yytj+="'"+yyshuju[i]+"',"; } } sql += " and ITEM_VC_WP1_DLDM in ("+yytj+") "; } if(""!=wpzl&&null!=wpzl){ String yyshuju[]=wpzl.split("::"); String yytj="";//条件 for(int i=0;i<yyshuju.length;i++){ if(i==(yyshuju.length-1)){ yytj+="'"+yyshuju[i]+"'"; }else{ yytj+="'"+yyshuju[i]+"',"; } } sql += " and ITEM_VC_WP1_ZLDM in("+yytj+") "; } if(""!=wpxl&&null!=wpxl){ String yyshuju[]=wpxl.split("::"); String yytj="";//条件 for(int i=0;i<yyshuju.length;i++){ if(i==(yyshuju.length-1)){ yytj+="'&qu