Commit 834292aa0a67588883870273d6bbe0cc9f40a5e3

Authored by 2c
1 parent 3a23e09e

修复bug

trash-workFlow/src/main/java/com/trash/casefile/kafka/Consumer.java
@@ -98,7 +98,7 @@ public class Consumer { @@ -98,7 +98,7 @@ public class Consumer {
98 JSONArray company1 = null; 98 JSONArray company1 = null;
99 JSONObject basevehicleInfo = null; 99 JSONObject basevehicleInfo = null;
100 //这些类型无需累加 100 //这些类型无需累加
101 - if(violationTypeCode.equals("44030021") || violationTypeCode.equals("44030025")||violationTypeCode.equals("44030023")){ 101 + if(violationTypeCode.equals("44030021") || violationTypeCode.equals("44030025")||violationTypeCode.equals("44030023")){
102 violationWarningInformation1 = null; 102 violationWarningInformation1 = null;
103 }else if(violationTypeCode.equals("44030033")||violationTypeCode.equals("44030034")){//这两种类型根据公司累加 103 }else if(violationTypeCode.equals("44030033")||violationTypeCode.equals("44030034")){//这两种类型根据公司累加
104 company1 = redisCache.getCacheObject("companyList"); 104 company1 = redisCache.getCacheObject("companyList");
@@ -200,7 +200,7 @@ public class Consumer { @@ -200,7 +200,7 @@ public class Consumer {
200 jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType(); 200 jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType();
201 } 201 }
202 //报警次数等于5推送案卷 202 //报警次数等于5推送案卷
203 - if(count44030023==5){ 203 + if(count44030023==5&&isTimeWithinRange(alarmTimeString,transportEndTime,endTime)){
204 violationWarningInformation.setViolationObjectType("0"); 204 violationWarningInformation.setViolationObjectType("0");
205 violationWarningInformation.setSendObject("区管理部门"); 205 violationWarningInformation.setSendObject("区管理部门");
206 violationWarningInformation.setProjectName(jsonObject.getString("siteName")); 206 violationWarningInformation.setProjectName(jsonObject.getString("siteName"));
@@ -221,7 +221,7 @@ public class Consumer { @@ -221,7 +221,7 @@ public class Consumer {
221 jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType(); 221 jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType();
222 } 222 }
223 //报警次数等于5推送案卷 223 //报警次数等于5推送案卷
224 - if(countE==5){ 224 + if(countE==5&&isTimeWithinRange(alarmTimeString,startTime,transportStartTime)){
225 violationWarningInformation.setViolationObjectType("0"); 225 violationWarningInformation.setViolationObjectType("0");
226 violationWarningInformation.setSendObject("区管理部门"); 226 violationWarningInformation.setSendObject("区管理部门");
227 violationWarningInformation.setProjectName(jsonObject.getString("siteName")); 227 violationWarningInformation.setProjectName(jsonObject.getString("siteName"));
@@ -236,14 +236,14 @@ public class Consumer { @@ -236,14 +236,14 @@ public class Consumer {
236 //判断结束运输 236 //判断结束运输
237 if(isTimeWithinRange(alarmTimeString,transportEndTime,endTime)){ 237 if(isTimeWithinRange(alarmTimeString,transportEndTime,endTime)){
238 //次数+1 238 //次数+1
239 - redisCache.setCacheObject(countKey,count44030023,12, TimeUnit.HOURS); 239 + redisCache.setCacheObject(countKey,count44030023,1, TimeUnit.HOURS);
240 //累计描述 240 //累计描述
241 - redisCache.setCacheObject(describeKey,describe44030023,12, TimeUnit.HOURS); 241 + redisCache.setCacheObject(describeKey,describe44030023,1, TimeUnit.HOURS);
242 }else if(isTimeWithinRange(alarmTimeString,startTime,transportStartTime)){ 242 }else if(isTimeWithinRange(alarmTimeString,startTime,transportStartTime)){
243 //次数+1 243 //次数+1
244 - redisCache.setCacheObject(countEKey,countE,12, TimeUnit.HOURS); 244 + redisCache.setCacheObject(countEKey,countE,1, TimeUnit.HOURS);
245 //累计描述 245 //累计描述
246 - redisCache.setCacheObject(describeEKey,describeE,12, TimeUnit.HOURS); 246 + redisCache.setCacheObject(describeEKey,describeE,1, TimeUnit.HOURS);
247 } 247 }
248 }catch (NullPointerException e){ 248 }catch (NullPointerException e){
249 throw e; 249 throw e;