Commit 834292aa0a67588883870273d6bbe0cc9f40a5e3
1 parent
3a23e09e
修复bug
Showing
1 changed file
with
7 additions
and
7 deletions
trash-workFlow/src/main/java/com/trash/casefile/kafka/Consumer.java
| ... | ... | @@ -98,7 +98,7 @@ public class Consumer { |
| 98 | 98 | JSONArray company1 = null; |
| 99 | 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 | 102 | violationWarningInformation1 = null; |
| 103 | 103 | }else if(violationTypeCode.equals("44030033")||violationTypeCode.equals("44030034")){//这两种类型根据公司累加 |
| 104 | 104 | company1 = redisCache.getCacheObject("companyList"); |
| ... | ... | @@ -200,7 +200,7 @@ public class Consumer { |
| 200 | 200 | jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType(); |
| 201 | 201 | } |
| 202 | 202 | //报警次数等于5推送案卷 |
| 203 | - if(count44030023==5){ | |
| 203 | + if(count44030023==5&&isTimeWithinRange(alarmTimeString,transportEndTime,endTime)){ | |
| 204 | 204 | violationWarningInformation.setViolationObjectType("0"); |
| 205 | 205 | violationWarningInformation.setSendObject("区管理部门"); |
| 206 | 206 | violationWarningInformation.setProjectName(jsonObject.getString("siteName")); |
| ... | ... | @@ -221,7 +221,7 @@ public class Consumer { |
| 221 | 221 | jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType(); |
| 222 | 222 | } |
| 223 | 223 | //报警次数等于5推送案卷 |
| 224 | - if(countE==5){ | |
| 224 | + if(countE==5&&isTimeWithinRange(alarmTimeString,startTime,transportStartTime)){ | |
| 225 | 225 | violationWarningInformation.setViolationObjectType("0"); |
| 226 | 226 | violationWarningInformation.setSendObject("区管理部门"); |
| 227 | 227 | violationWarningInformation.setProjectName(jsonObject.getString("siteName")); |
| ... | ... | @@ -236,14 +236,14 @@ public class Consumer { |
| 236 | 236 | //判断结束运输 |
| 237 | 237 | if(isTimeWithinRange(alarmTimeString,transportEndTime,endTime)){ |
| 238 | 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 | 242 | }else if(isTimeWithinRange(alarmTimeString,startTime,transportStartTime)){ |
| 243 | 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 | 248 | }catch (NullPointerException e){ |
| 249 | 249 | throw e; | ... | ... |