|
@@ -2980,6 +2980,9 @@ public class YtiotVAlarmServiceImpl implements YtiotVAlarmService {
|
|
|
String data2 = null;
|
|
|
JSONObject q_json = null;
|
|
|
JSONObject json = new JSONObject();
|
|
|
+ String Sql = null;
|
|
|
+ List pl_list = null;
|
|
|
+
|
|
|
json.put("action", "updateHj");
|
|
|
if(queryJson!=null) {
|
|
|
q_json = JSONObject.fromObject(queryJson);
|
|
@@ -3010,13 +3013,13 @@ public class YtiotVAlarmServiceImpl implements YtiotVAlarmService {
|
|
|
if(Integer.parseInt(confirmAll)==1) {
|
|
|
hqlwhere = " where u.id.deviceCode='"+device_code+"' and u.id.name='"+name+"' and u.id.status='"+status+"' and u.id.data4='"+data4+"' and u.id.data2='"+data2+"' and u.id.clzt=0";
|
|
|
sqlwhere = " where device_code='"+device_code+"' and name='"+name+"' and status='"+status+"' and data4='"+data4+"' and data2='"+data2+"' and clzt=0";
|
|
|
+ Sql="SELECT * from ytiot_v_hj WHERE device_code='"+device_code+"' AND clzt=0 and data4='"+data4+"' and data2='"+data2+"'";
|
|
|
+ pl_list = ytiotVAlarmDao.queryBySQL(Sql);
|
|
|
}else {
|
|
|
hqlwhere = " where u.id.id="+id+" ";
|
|
|
sqlwhere = " where id="+id+" ";
|
|
|
}
|
|
|
int RowCount = ytiotVAlarmDao.getHJCount(hqlwhere);
|
|
|
-// System.out.println("火警测试1"+hqlwhere);
|
|
|
-// System.out.println("火警测试2"+sqlwhere);
|
|
|
if(RowCount>0) {
|
|
|
ytiotVAlarmDao.execSQL(" update ytiot_v_hj2 set clwb='"+clwb+"', clnr='"+clnr+"', clzt=1 , clsj=now(), clr='"+V_LOGINNAME+"' "+sqlwhere);
|
|
|
System.out.println(" update ytiot_v_hj2 set clwb='"+clwb+"', clnr='"+clnr+"', clzt=1 , clsj=now(), clr='"+V_LOGINNAME+"' "+sqlwhere);
|
|
@@ -3030,6 +3033,24 @@ public class YtiotVAlarmServiceImpl implements YtiotVAlarmService {
|
|
|
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = HttpClientUtils.doPost("http://47.98.201.187:55335/report", null,json1);
|
|
|
// System.out.println("jsonObject = " + jsonObject);
|
|
|
+ }else{
|
|
|
+ if (pl_list.isEmpty()==false){
|
|
|
+ int Nrow = 0;
|
|
|
+ for(Iterator iterator = pl_list.iterator();iterator.hasNext();){
|
|
|
+ Object[] objects = (Object[]) iterator.next();
|
|
|
+ HashMap<String, Object> map = new HashMap<>();
|
|
|
+ System.out.println(objects[0]);
|
|
|
+ map.put("SubType",1);
|
|
|
+ map.put("DeviceId",device_code);
|
|
|
+ map.put("InsertId",objects[0]);
|
|
|
+ map.put("Confirmed",true);
|
|
|
+ com.alibaba.fastjson.JSONObject json1 = new com.alibaba.fastjson.JSONObject(map);
|
|
|
+ System.out.println(json1);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = HttpClientUtils.doPost("http://47.98.201.187:55335/report", null,json1);
|
|
|
+ Nrow++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
json.put("activerow", RowCount);
|
|
|
json.put("success", "true");
|