瀏覽代碼

事故状态添加已处理

tags/v1.2.0^2
wanjing 1 年之前
父節點
當前提交
ecca70ea40
共有 2 個檔案被更改,包括 3 行新增4 行删除
  1. +2
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AccidentStatusEnum.java
  2. +1
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/verify/AccidentVerifyCompletedService.java

+ 2
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AccidentStatusEnum.java 查看文件

@@ -9,12 +9,10 @@ import lombok.Getter;
public enum AccidentStatusEnum {

UNTREATED(1,"未处理"),

PROCESSING(2,"处理中"),

IGNORED(3,"已忽略"),
PROCESSED(4,"已处理");
PROCESSED(4,"已处理"),
COMPLETED(5,"已完成");

AccidentStatusEnum(int code, String description){
this.code = code;

+ 1
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/verify/AccidentVerifyCompletedService.java 查看文件

@@ -138,6 +138,7 @@ public class AccidentVerifyCompletedService {
accidentUpdate.setUpdateUser(userId);
accidentUpdate.setUpdateTime(DateUtils.now());
accidentUpdate.setEndTime(DateUtils.now());
accidentUpdate.setStatus(AccidentStatusEnum.COMPLETED.getCode());
Integer count = accidentMapper.updateById(accidentUpdate);
if (count <= 0) {
log.info("事故核实完成,修改预警信息失败");

Loading…
取消
儲存