瀏覽代碼

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_freeway into feature_v1.0

tags/v1.2.0^2
chengwang 1 年之前
父節點
當前提交
29d2b60216
共有 3 個檔案被更改,包括 4 行新增7 行删除
  1. +2
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AccidentStatusEnum.java
  2. +2
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/verify/AccidentVerifyCompletedService.java
  3. +0
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/verify/AccidentVerifyService.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;

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

@@ -99,7 +99,7 @@ public class AccidentVerifyCompletedService {
if (ObjectUtil.isNull(accident)) {
throw new ServiceException("事故不存在");
}
if (AccidentStatusEnum.PROCESSED.getCode() == accident.getStatus()) {
if (AccidentStatusEnum.PROCESSED.getCode() != accident.getStatus()) {
throw new ServiceException("该事故未处理,不能核实完成");
}
return JsonResult.success(accident);
@@ -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("事故核实完成,修改预警信息失败");

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

@@ -125,12 +125,10 @@ public class AccidentVerifyService {
inspection.setCreateUser(userid);
inspection.setCreateTime(DateUtils.now());
inspection.setEmergencyDataInspectionId(oldInspection.getId());

inspection.setRoadId("");
inspection.setRoadName("");
inspection.setSectionId("");
inspection.setSectionName("");

Integer count = inspectionMapper.insert(inspection);
if (count <= 0) {
log.info("创建应急任务失败");

Loading…
取消
儲存