Browse Source

3dDisplayEngine YtiotVAlarmServiceImpl.java 吉超博 commit at 2021-02-01

吉超博 4 năm trước cách đây
mục cha
commit
ecf7ff84a1
1 tập tin đã thay đổi với 84 bổ sung0 xóa
  1. 84 0
      3dDisplayEngine/buildingService/YtiotVAlarmServiceImpl.java

+ 84 - 0
3dDisplayEngine/buildingService/YtiotVAlarmServiceImpl.java

@@ -2925,3 +2925,87 @@ public class YtiotVAlarmServiceImpl implements YtiotVAlarmService {
 						String s_count = objects[1]==null?"0":objects[1].toString();
 						String s_sum = objects[2]==null?"0":objects[2].toString();
 						countlist.add(Integer.parseInt(s_count));
+						sumlist.add(Integer.parseInt(s_sum));
+						count += Integer.parseInt(s_count);
+						sum += Integer.parseInt(s_sum);
+						if((company_code!=null)&&(Nrow==0))
+							json.put("company_name", objects[3].toString());
+						Nrow++;
+					}
+				}
+				map2 = new HashMap();
+				map2.put("day_list", daylist);
+				map2.put("count_list", countlist);
+				map2.put("sum_list", sumlist);
+				map2.put("count", count);
+				map2.put("sum", sum);
+				map2.put("id", "lift_alarm");
+				jSONObject2 = JSONObject.fromObject(map2);
+				jSONArray.add(jSONObject2);
+			}
+
+
+
+
+
+			if((dwtype==null)||(dwtype.equals("7"))) {
+				wheresql = null;
+				if(COMMSTATUS!=null) {
+					if(COMMSTATUS.equals("NO"))
+						wheresql = chkhw(sqlwhere)+" data1<>'EF9' ";
+					else if(COMMSTATUS.equals("ONLY"))
+						wheresql = chkhw(sqlwhere)+" data1='EF9' ";
+					else
+						wheresql = sqlwhere;
+				}
+				list = ytiotVAlarmDao.queryBySQL(" select DATE_FORMAT(ytiot_v_efire.time, \"%Y-%m-%d\") as days, count(*) as count, sum(clzt) as sum, company_name from ytiot_v_efire "+((wheresql!=null)?wheresql:"")+" group by days order by days desc");
+				count=0;
+				sum=0;
+				daylist = new JSONArray();
+				countlist = new JSONArray();
+				sumlist = new JSONArray();
+				if(list.size()>0) {
+					int Nrow = 0;
+					for(Iterator iterator = list.iterator();iterator.hasNext();){
+						Object[] objects = (Object[]) iterator.next();
+						daylist.add(objects[0].toString());
+						String s_count = objects[1]==null?"0":objects[1].toString();
+						String s_sum = objects[2]==null?"0":objects[2].toString();
+						countlist.add(Integer.parseInt(s_count));
+						sumlist.add(Integer.parseInt(s_sum));
+						count += Integer.parseInt(s_count);
+						sum += Integer.parseInt(s_sum);
+						if((company_code!=null)&&(Nrow==0))
+							json.put("company_name", objects[3].toString());
+						Nrow++;
+					}
+				}
+				map2 = new HashMap();
+				map2.put("day_list", daylist);
+				map2.put("count_list", countlist);
+				map2.put("sum_list", sumlist);
+				map2.put("count", count);
+				map2.put("sum", sum);
+				map2.put("id", "efire_alarm");
+				jSONObject2 = JSONObject.fromObject(map2);
+				jSONArray.add(jSONObject2);
+			}
+			json.put("RESULT", jSONArray);
+			json.put("check", "true");
+		}else {
+			json.put("check", "false");
+		}
+		return json.toString();
+	}
+
+	@Override
+	public String updateHj(String queryJson) throws Exception {
+		// TODO Auto-generated method stub
+		String V_LOGINNAME = null;
+		String V_PASSWORD = null;
+		int E_STATUS=-1;
+		String clwb = null;
+		String clnr = null;
+		String id = null;
+		String status = null;
+		String device_code = null;