Browse Source

修改核实完成代码

tags/v1.2.0^2
wanjing 1 year ago
parent
commit
f34447c377
2 changed files with 1 additions and 3 deletions
  1. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/verify/AccidentVerifyCompletedService.java
  2. +0
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/verify/AccidentVerifyService.java

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/verify/AccidentVerifyCompletedService.java View File

if (ObjectUtil.isNull(accident)) { if (ObjectUtil.isNull(accident)) {
throw new ServiceException("事故不存在"); throw new ServiceException("事故不存在");
} }
if (AccidentStatusEnum.PROCESSED.getCode() == accident.getStatus()) {
if (AccidentStatusEnum.PROCESSED.getCode() != accident.getStatus()) {
throw new ServiceException("该事故未处理,不能核实完成"); throw new ServiceException("该事故未处理,不能核实完成");
} }
return JsonResult.success(accident); return JsonResult.success(accident);

+ 0
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/verify/AccidentVerifyService.java View File

inspection.setCreateUser(userid); inspection.setCreateUser(userid);
inspection.setCreateTime(DateUtils.now()); inspection.setCreateTime(DateUtils.now());
inspection.setEmergencyDataInspectionId(oldInspection.getId()); inspection.setEmergencyDataInspectionId(oldInspection.getId());

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

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

Loading…
Cancel
Save