订单删除修改该报错逻辑
This commit is contained in:
@@ -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<Boolean> 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() + "】已生成销售订单,不能删除"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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<Boolean> 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() + "】已生成销售订单,不能删除"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user