jichaobo 4 rokov pred
rodič
commit
ac9ca7dd30

+ 1 - 1
WebRoot/view/springhandle/scripts/springHandle.js

@@ -2930,7 +2930,7 @@ Ext.onReady(function(){
 		        success: function(result){
 		            var json = eval('(' + result + ')');
 		            if(json.action=='getEventProcessingList'){
-		                ConfirmStore = json.RESULT;
+		                ConfirmStore = json.RESULT2;
 		                ConfirmStore1 = json.RESULT1;
 		                piedarHtml2();
 		       

+ 50 - 36
src/cn/com/usky/iot/xjeventprocessing/service/YtiotXjEventProcessingServicesImpl.java

@@ -540,50 +540,64 @@ public class YtiotXjEventProcessingServicesImpl implements YtiotXjEventProcessin
 						map.put("phone", "--");
 					}
 					
-					//人员总数量
-					if(V_LOGINNAME!=null) {
-						zsl_hqlwhere = " where u."+fieldname("data2")+"='"+V_LOGINNAME+"' and u."+fieldname("zn")+" in (4,5,6,7)";
+					JSONObject jSONObject = JSONObject.fromObject(map);
+					jSONArray.add(jSONObject);
+				}
+				json.put("RESULT", jSONArray);
+				
+
+			}
+
+		}
+
+
+		Map map = new HashMap();
+		//人员总数量
+		if(V_LOGINNAME!=null) {
+			zsl_hqlwhere = " where u."+fieldname("data2")+"='"+V_LOGINNAME+"' and u."+fieldname("zn")+" in (4,5,6,7)";
 //						System.out.println(xjrysl_hqlwhere);
-						int zrs = ytiotXjInspectorsDao.getCount(zsl_hqlwhere);
+			int zrs = ytiotXjInspectorsDao.getCount(zsl_hqlwhere);
 //						System.out.println(xjrysl);
-							map.put("zrs", zrs);
+			map.put("zrs", zrs);
 //							System.out.println("测试0"+zrs);
-							
-					}
-					
-					
-					//今日事件
-					if(dqsj!=null) {
-						jrrw_hqlwhere = " where u."+fieldname("y_complete_time")+" like '%"+dqsj+"%' and u."+fieldname("user_name")+"='"+V_LOGINNAME+"'";
+
+		}
+
+
+		//今日事件
+		if(dqsj!=null) {
+			jrrw_hqlwhere = " where u."+fieldname("y_complete_time")+" like '%"+dqsj+"%' and u."+fieldname("user_name")+"='"+V_LOGINNAME+"'";
 //						System.out.println(jrrw_hqlwhere);
-						int jrsj = ytiotXjEventProcessingDao.getCount(jrrw_hqlwhere);
+			int jrsj = ytiotXjEventProcessingDao.getCount(jrrw_hqlwhere);
 //						System.out.println("总数"+jrsj);
-						map.put("jrsj", jrsj);	
-					}
-					
-					//超时事件
-					if(V_LOGINNAME!=null) {
-						csrw_hqlwhere = " where u."+fieldname("user_name")+"='"+V_LOGINNAME+"' and u.clType=5";
+			map.put("jrsj", jrsj);
+		}else {
+			map.put("jrsj", 0);
+		}
+
+		//超时事件
+		if(V_LOGINNAME!=null) {
+			csrw_hqlwhere = " where u."+fieldname("user_name")+"='"+V_LOGINNAME+"' and u.clType=5";
 //						System.out.println(jrrw_hqlwhere);
-						int cssj = ytiotXjEventProcessingDao.getCount(csrw_hqlwhere);
-						map.put("cssj", cssj);
-					}
-					
-					//今日解决
-					if(V_LOGINNAME!=null&&dqsj!=null) {
-						jrjj_hqlwhere = " where u."+fieldname("user_name")+"='"+V_LOGINNAME+"' and u.clType=4 and u.shTime like '%"+dqsj+"%'";
+			int cssj = ytiotXjEventProcessingDao.getCount(csrw_hqlwhere);
+			map.put("cssj", cssj);
+		}else {
+			map.put("cssj", 0);
+		}
+
+		//今日解决
+		if(V_LOGINNAME!=null&&dqsj!=null) {
+			jrjj_hqlwhere = " where u."+fieldname("user_name")+"='"+V_LOGINNAME+"' and u.clType=4 and u.shTime like '%"+dqsj+"%'";
 //						System.out.println(jrrw_hqlwhere);
-						int jrjj = ytiotXjEventProcessingDao.getCount(jrjj_hqlwhere);
-						map.put("jrjj", jrjj);
-					}
-					
-					JSONObject jSONObject = JSONObject.fromObject(map);
-					jSONArray.add(jSONObject);
-				}
-				
-				json.put("RESULT", jSONArray);
-			}
+			int jrjj = ytiotXjEventProcessingDao.getCount(jrjj_hqlwhere);
+			map.put("jrjj", jrjj);
+		}else {
+			map.put("jrjj", 0);
 		}
+		JSONObject jSONObject = JSONObject.fromObject(map);
+		jSONArray.add(jSONObject);
+		json.put("RESULT2", jSONArray);
+
 		return json.toString();
 	}