Commit a4a79e4a4b66493231e3ef482465d825ef10fc48
1 parent
b7725274
修复bug
Showing
2 changed files
with
7 additions
and
4 deletions
trash-workFlow/src/main/java/com/trash/casefile/kafka/Consumer.java
| @@ -54,7 +54,6 @@ public class Consumer { | @@ -54,7 +54,6 @@ public class Consumer { | ||
| 54 | 54 | ||
| 55 | @Transactional | 55 | @Transactional |
| 56 | public void autoViolationWarning(String data,String id) throws InterruptedException { | 56 | public void autoViolationWarning(String data,String id) throws InterruptedException { |
| 57 | - log.info("开始报警,data:" + data); | ||
| 58 | 57 | ||
| 59 | String[] code = {"44030020=工地预警-未报开工作业", "44030021=工地预警-视频设备离线超时报警", "44030022=工地预警-三无车辆进入工地", "44030023=工地预警未按时间作业", | 58 | String[] code = {"44030020=工地预警-未报开工作业", "44030021=工地预警-视频设备离线超时报警", "44030022=工地预警-三无车辆进入工地", "44030023=工地预警未按时间作业", |
| 60 | "44030024=消纳场预警-未报开工作业", "44030025=消纳场预警-视频设备离线超时报警", "44030026=消纳场预警-三无车辆进入消纳场", "44030027=消纳场预警-未到指定的消纳场作业", | 59 | "44030024=消纳场预警-未报开工作业", "44030025=消纳场预警-视频设备离线超时报警", "44030026=消纳场预警-三无车辆进入消纳场", "44030027=消纳场预警-未到指定的消纳场作业", |
| @@ -182,12 +181,10 @@ public class Consumer { | @@ -182,12 +181,10 @@ public class Consumer { | ||
| 182 | kafkaCompensation.setId(Long.valueOf(id)); | 181 | kafkaCompensation.setId(Long.valueOf(id)); |
| 183 | kafkaCompensation.setStatus(1); | 182 | kafkaCompensation.setStatus(1); |
| 184 | SpringUtils.getBean(KafkaCompensationMapper.class).updateKafkaCompensation(kafkaCompensation); | 183 | SpringUtils.getBean(KafkaCompensationMapper.class).updateKafkaCompensation(kafkaCompensation); |
| 185 | - log.info("报警结束,data:" + data); | ||
| 186 | } | 184 | } |
| 187 | 185 | ||
| 188 | @Transactional | 186 | @Transactional |
| 189 | public String insertKafkaCompensation(String data){ | 187 | public String insertKafkaCompensation(String data){ |
| 190 | - log.info("添加kafka补偿信息,data:" + data); | ||
| 191 | KafkaCompensation kafkaCompensation = new KafkaCompensation(); | 188 | KafkaCompensation kafkaCompensation = new KafkaCompensation(); |
| 192 | kafkaCompensation.setData(data); | 189 | kafkaCompensation.setData(data); |
| 193 | kafkaCompensation.setCreateTime(DateUtils.getNowDate()); | 190 | kafkaCompensation.setCreateTime(DateUtils.getNowDate()); |
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationWarningInformationServiceImpl.java
| @@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONArray; | @@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONArray; | ||
| 8 | import com.alibaba.fastjson.JSONObject; | 8 | import com.alibaba.fastjson.JSONObject; |
| 9 | import com.trash.casefile.domain.ViolationCaseFile; | 9 | import com.trash.casefile.domain.ViolationCaseFile; |
| 10 | import com.trash.casefile.domain.vo.ViolationWarningInformationVo; | 10 | import com.trash.casefile.domain.vo.ViolationWarningInformationVo; |
| 11 | +import com.trash.casefile.kafka.Consumer; | ||
| 11 | import com.trash.common.core.redis.RedisCache; | 12 | import com.trash.common.core.redis.RedisCache; |
| 12 | import com.trash.common.utils.DateUtils; | 13 | import com.trash.common.utils.DateUtils; |
| 13 | import com.trash.common.utils.SecurityUtils; | 14 | import com.trash.common.utils.SecurityUtils; |
| @@ -19,6 +20,8 @@ import com.trash.office.domain.vo.LeaveApplicationVo; | @@ -19,6 +20,8 @@ import com.trash.office.domain.vo.LeaveApplicationVo; | ||
| 19 | import com.trash.office.mapper.UploadFileMapper; | 20 | import com.trash.office.mapper.UploadFileMapper; |
| 20 | import com.trash.workflow.domain.Workflow; | 21 | import com.trash.workflow.domain.Workflow; |
| 21 | import com.trash.workflow.service.IWorkflowService; | 22 | import com.trash.workflow.service.IWorkflowService; |
| 23 | +import org.slf4j.Logger; | ||
| 24 | +import org.slf4j.LoggerFactory; | ||
| 22 | import org.springframework.beans.factory.annotation.Autowired; | 25 | import org.springframework.beans.factory.annotation.Autowired; |
| 23 | import org.springframework.stereotype.Service; | 26 | import org.springframework.stereotype.Service; |
| 24 | import com.trash.casefile.mapper.ViolationWarningInformationMapper; | 27 | import com.trash.casefile.mapper.ViolationWarningInformationMapper; |
| @@ -34,8 +37,9 @@ import org.springframework.web.multipart.MultipartFile; | @@ -34,8 +37,9 @@ import org.springframework.web.multipart.MultipartFile; | ||
| 34 | * @date 2023-05-09 | 37 | * @date 2023-05-09 |
| 35 | */ | 38 | */ |
| 36 | @Service | 39 | @Service |
| 37 | -public class ViolationWarningInformationServiceImpl implements IViolationWarningInformationService | 40 | +public class ViolationWarningInformationServiceImpl implements IViolationWarningInformationService |
| 38 | { | 41 | { |
| 42 | + private static final Logger log = LoggerFactory.getLogger(Consumer.class); | ||
| 39 | @Autowired | 43 | @Autowired |
| 40 | private ViolationWarningInformationMapper violationWarningInformationMapper; | 44 | private ViolationWarningInformationMapper violationWarningInformationMapper; |
| 41 | @Autowired | 45 | @Autowired |
| @@ -103,7 +107,9 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | @@ -103,7 +107,9 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | ||
| 103 | } | 107 | } |
| 104 | violationWarningInformation.setCreateTime(DateUtils.getNowDate()); | 108 | violationWarningInformation.setCreateTime(DateUtils.getNowDate()); |
| 105 | violationWarningInformation.setStatus(0); | 109 | violationWarningInformation.setStatus(0); |
| 110 | + log.info("违规预警信息新增"); | ||
| 106 | Integer result = violationWarningInformationMapper.insertViolationWarningInformation(violationWarningInformation); | 111 | Integer result = violationWarningInformationMapper.insertViolationWarningInformation(violationWarningInformation); |
| 112 | + log.info("违规预警信息新增成功,resultSize:"+result); | ||
| 107 | if(StringUtils.isNotEmpty(files)){ | 113 | if(StringUtils.isNotEmpty(files)){ |
| 108 | //文件上传 | 114 | //文件上传 |
| 109 | for (MultipartFile file : files) { | 115 | for (MultipartFile file : files) { |