From c53ef7cd7e45329eef47187a802263728a87a53f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E8=8D=A3=E6=99=9F?= <9691125+pan-rongsheng@user.noreply.gitee.com> Date: Fri, 28 Nov 2025 15:40:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=A0=E9=99=A4=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=AF=A5=E6=8A=A5=E9=94=99=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/purchaseorder/PrchOrdDtlServiceImpl.java | 3 ++- .../service/salesorder/SalesOrderDetailServiceImpl.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/purchaseorder/PrchOrdDtlServiceImpl.java b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/purchaseorder/PrchOrdDtlServiceImpl.java index c98e3a35..e8458108 100644 --- a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/purchaseorder/PrchOrdDtlServiceImpl.java +++ b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/purchaseorder/PrchOrdDtlServiceImpl.java @@ -2,6 +2,7 @@ package com.zt.plat.module.contractorder.service.purchaseorder; import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.zt.plat.framework.common.exception.ErrorCode; import com.zt.plat.framework.common.pojo.CommonResult; import com.zt.plat.framework.common.pojo.PageResult; import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PrchOrdDtlPageReqVO; @@ -88,7 +89,7 @@ public class PrchOrdDtlServiceImpl implements PrchOrdDtlService { CommonResult booleanCommonResult = billMainApi.notOffsetIsExistOrderDetailId(id); if (booleanCommonResult.isSuccess() && booleanCommonResult.getData()) { PrchOrdDtlDO prchOrdDtlDO = prchOrdDtlMapper.selectById(id); - throw new RuntimeException("行目为【" + prchOrdDtlDO.getOutLineNum() + "】的订单明细存在发货数据。不允许删除"); + throw exception(new ErrorCode(1_008_00_600, "销售订单明细【" + prchOrdDtlDO.getOutLineNum() + "】已生成销售订单,不能删除")); } }); } diff --git a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/salesorder/SalesOrderDetailServiceImpl.java b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/salesorder/SalesOrderDetailServiceImpl.java index 436b5702..a2e8f91a 100644 --- a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/salesorder/SalesOrderDetailServiceImpl.java +++ b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/salesorder/SalesOrderDetailServiceImpl.java @@ -1,6 +1,7 @@ package com.zt.plat.module.contractorder.service.salesorder; import cn.hutool.core.collection.CollUtil; +import com.zt.plat.framework.common.exception.ErrorCode; import com.zt.plat.framework.common.pojo.CommonResult; import com.zt.plat.module.contractorder.controller.admin.salesorder.vo.SalesOrderDetailPageReqVO; import com.zt.plat.module.contractorder.controller.admin.salesorder.vo.SalesOrderDetailRespVO; @@ -94,7 +95,7 @@ public class SalesOrderDetailServiceImpl implements SalesOrderDetailService { CommonResult booleanCommonResult = billMainApi.notOffsetIsExistOrderDetailId(id); if (booleanCommonResult.isSuccess() && booleanCommonResult.getData()) { SalesOrderDetailDO salesOrderDetailDO = salesOrderDetailMapper.selectById(id); - throw new RuntimeException("行目为【" + salesOrderDetailDO.getLineNumber() + "】的订单明细存在发货数据。不允许删除"); + throw exception(new ErrorCode(1_008_00_600, "销售订单明细【" + salesOrderDetailDO.getMaterialName() + "】已生成销售订单,不能删除")); } }); }