diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderController.java index 668a8925..27826c7f 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderController.java @@ -395,6 +395,10 @@ public class IoOrderController extends BaseController { @PostMapping("udiwms/inout/order/delete") @Log(title = "单据管理", businessType = BusinessType.DELETE) public BaseResponse deletById(@RequestBody DeleteRequest deleteRequest) { + IoOrderEntity orderEntity = orderService.findByBillNo(deleteRequest.getBillNo()); + if (orderEntity.getStatus() != 1 && orderEntity.getStatus() != 3 && orderEntity.getStatus() != 4 && orderEntity.getStatus() != 6) { + return ResultVOUtils.error(500, "单据已提交无法删除!"); + } orderService.deleteByBillNo(deleteRequest.getBillNo()); orderDetailBizService.deleteByOrderId(deleteRequest.getBillNo()); orderDetailCodeService.deleteByOrderId(deleteRequest.getBillNo()); diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java index ecf03798..020e1d1f 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java @@ -327,13 +327,15 @@ public class IoOrderReviewController extends BaseController { if (StrUtil.isNotEmpty(code)) { code = code.replace("\r\n", ""); } - if (code.endsWith("\u001D")) { code = code.replace("\u001D", ""); } - for (IoCodeEntity checkOrderCodesBean : codesList) { - if (checkOrderCodesBean.getCode().toUpperCase(Locale.ROOT).equals(code.toUpperCase(Locale.ROOT))) { + String checkCode = checkOrderCodesBean.getCode(); + if (checkCode.endsWith("\u001D")) { + checkCode = checkCode.replace("\u001D", ""); + } + if (checkCode.toUpperCase(Locale.ROOT).equals(code.toUpperCase(Locale.ROOT))) { if (checkOrderCodesBean.getStatus() == Constant.DB_CHECK_ED && IntUtil.value(checkOrderCodesBean.getReCount()) == checkOrderCodesBean.getScanCount()) { return Constant.CHECK_REPEAT; @@ -351,8 +353,18 @@ public class IoOrderReviewController extends BaseController { public IoCodeEntity isExit(List codeList, String code) { if (CollUtil.isNotEmpty(codeList)) { + if (StrUtil.isNotEmpty(code)) { + code = code.replace("\r\n", ""); + } + if (code.endsWith("\u001D")) { + code = code.replace("\u001D", ""); + } for (IoCodeEntity codeEntity : codeList) { - if (codeEntity.getCode().equals(code)) { + String checkCode = codeEntity.getCode(); + if (checkCode.endsWith("\u001D")) { + checkCode = checkCode.replace("\u001D", ""); + } + if (checkCode.equals(code)) { return codeEntity; } } diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java index b426efe3..b1d62bd0 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java @@ -276,6 +276,7 @@ public class IoOrderServiceImpl implements IoOrderService { } } + return 0; }