Commit cb23428a2ba5ab4fcde3e0f26088bb88f22cd8fe

Authored by 273548560@qq.com
1 parent 32cd2a02

修复bug

trash-workFlow/src/main/java/com/trash/casefile/kafka/Consumer.java
... ... @@ -148,21 +148,21 @@ public class Consumer {
148 148 count = redisCache.getCacheObject(nowDate+jsonObject.getString("siteId")+"44030020")==null?1:Integer.parseInt(redisCache.getCacheObject(nowDate+jsonObject.getString("siteId")+"44030020").toString())+1;
149 149 //获取累计报警描述
150 150 describe = redisCache.getCacheObject(nowDate+jsonObject.getString("siteId")+"44030020describe")==null?"":redisCache.getCacheObject(nowDate+jsonObject.getString("siteId")+"44030020describe").toString();
151   -
  151 + if(!StringUtils.isEmpty(describe)){
  152 + describe = describe + ";\n" + DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
  153 + + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "在" +
  154 + jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType();
  155 + }else{
  156 + describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
  157 + + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "在" +
  158 + jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType();
  159 + }
152 160 //报警次数等于5推送案卷
153 161 if(count==5){
154 162 violationWarningInformation.setViolationObjectType("0");
155 163 violationWarningInformation.setSendObject("区管理部门");
156 164 violationWarningInformation.setProjectName(jsonObject.getString("siteName"));
157   - if(!StringUtils.isEmpty(describe)){
158   - describe = describe + ";\n" + DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
159   - + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "在" +
160   - jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType();
161   - }else{
162   - describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
163   - + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "在" +
164   - jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType();
165   - }
  165 +
166 166  
167 167 violationWarningInformation.setCreateTime(alarmTime);
168 168 violationWarningInformation.setDescribe(describe);
... ... @@ -278,21 +278,21 @@ public class Consumer {
278 278 count = redisCache.getCacheObject(nowDate+jsonObject.getString("siteId")+"44030024")==null?1:Integer.parseInt(redisCache.getCacheObject(nowDate+jsonObject.getString("siteId")+"44030024").toString())+1;
279 279 //获取累计报警描述
280 280 describe = redisCache.getCacheObject(nowDate+jsonObject.getString("siteId")+"44030024describe")==null?"":redisCache.getCacheObject(nowDate+jsonObject.getString("siteId")+"44030024describe").toString();
281   -
  281 + if(!StringUtils.isEmpty(describe)){
  282 + describe = describe + ";\n" + DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
  283 + + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "在" +
  284 + jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType();
  285 + }else{
  286 + describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
  287 + + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "在" +
  288 + jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType();
  289 + }
282 290 //报警次数等于5推送案卷
283 291 if(count==5){
284 292 violationWarningInformation.setViolationObjectType("1");
285 293 violationWarningInformation.setSendObject("区管理部门");
286 294 violationWarningInformation.setProjectName(jsonObject.getString("siteName"));
287   - if(!StringUtils.isEmpty(describe)){
288   - describe = describe + ";\n" + DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
289   - + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "在" +
290   - jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType();
291   - }else{
292   - describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
293   - + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "在" +
294   - jsonObject.get("siteName") + "出现" + violationWarningInformation.getViolationType();
295   - }
  295 +
296 296 violationWarningInformation.setCreateTime(alarmTime);
297 297 violationWarningInformation.setDescribe(describe);
298 298 // 业务逻辑
... ...