From 20c7282bed8fbb7dd0bdb7fd3d805ddc6975802d Mon Sep 17 00:00:00 2001 From: zxy Date: Mon, 12 Jan 2026 16:35:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=9B=E5=BC=82=E5=B8=B8=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunxi/mes/module/heli/enums/ErrorCodeConstants.java | 2 ++ .../heli/service/taskinreport/TaskInReportServiceImpl.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ErrorCodeConstants.java b/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ErrorCodeConstants.java index b1039144..d0c79bad 100644 --- a/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ErrorCodeConstants.java +++ b/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ErrorCodeConstants.java @@ -165,5 +165,7 @@ public interface ErrorCodeConstants { ErrorCode MAT_REQ_NOT_EXISTS = new ErrorCode(1_013_003, "领料单不存在"); ErrorCode MAT_REQ_DETAIL_NOT_EXISTS = new ErrorCode(1_013_004, "领料单明细不存在"); ErrorCode TASK_IN_REPORT_NOT_EXISTS = new ErrorCode(1_013_005 , "该报工信息不存在,请退出刷新界面"); + ErrorCode TASK_IN_REPORT_IS_FINISH = new ErrorCode(1_013_006 , "该报工已完成,不允许删除,请确认"); + ErrorCode TASK_IN_REPORT_NOT_REWORK = new ErrorCode(1_013_007 , "该报工没有完成,不允许返工,请确认"); } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskinreport/TaskInReportServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskinreport/TaskInReportServiceImpl.java index a155614a..3ffb3bf3 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskinreport/TaskInReportServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskinreport/TaskInReportServiceImpl.java @@ -60,7 +60,7 @@ public class TaskInReportServiceImpl implements TaskInReportService { TaskDispatchDetailDO taskDispatchDetailDO = taskDispatchDetailMapper.selectById(taskInReportDO.getDispatchDetailId()); if (taskDispatchDetailDO != null) { if (taskDispatchDetailDO.getInReportProcess() != 2) { - throw new RuntimeException("当前报工状态不允许重新报工"); + throw exception(TASK_IN_REPORT_NOT_REWORK); } taskDispatchDetailDO.setInReportProcess(1); taskDispatchDetailDO.setReturnRemark(remark); @@ -79,7 +79,7 @@ public class TaskInReportServiceImpl implements TaskInReportService { TaskDispatchDetailDO taskDispatchDetailDO = taskDispatchDetailMapper.selectById(taskInReportDO.getDispatchDetailId()); if (taskDispatchDetailDO != null) { if (taskDispatchDetailDO.getInReportProcess() == 2) { - throw new RuntimeException("该报工已完成,不允许删除,请确认"); + throw exception(TASK_IN_REPORT_IS_FINISH); } else { List taskInReportDOS = taskInReportMapper.selectList(taskInReportDO.getDispatchDetailId(), taskInReportDO.getId()); if (taskInReportDOS.isEmpty()) {