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