From eb64e9563991587a122b69ad0710e7afc8cd17c3 Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Thu, 20 Feb 2025 14:35:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/inout/IoOrderController.java | 33 +++++++++++++++++++ .../inout/IoOrderDetailBizController.java | 8 +++++ src/main/resources/schemas/schema_v2.4.sql | 4 +++ 3 files changed, 45 insertions(+) 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 7f2921a2..147dd824 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderController.java @@ -345,6 +345,39 @@ public class IoOrderController extends BaseController { if (CollUtil.isEmpty(orderDetailCodeEntities)) { return ResultVOUtils.error(500, "单据还未扫码或和扫码校验存在异常无法提交!"); } + /** + * 1:必须全部扫齐,才可以通过 + * 2:必须选择了马上放心才能提交 + * 3:必须有码才可以 + */ + SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("create_order_pass_type"); + String passType = systemParamConfigEntity.getParamValue(); + + if (passType == "1"){ + + if (CollUtil.isNotEmpty(orderDetailBizEntities)){ + for (int i = 0; i < orderDetailBizEntities.size(); i++) { + IoOrderDetailBizEntity ioOrderDetailBizEntity = orderDetailBizEntities.get(i); + if (ioOrderDetailBizEntity.getScanCount() < ioOrderDetailBizEntity.getCount()){ + return ResultVOUtils.error(500, "单据未完全扫码,提交失败,请检查后重新提交!"); + } + } + } + + }else if (passType == "2"){ + + String aliOrderBillNo = orderEntity.getAliOrderBillNo(); + if (StrUtil.isEmpty(aliOrderBillNo)){ + return ResultVOUtils.error(500, "单据未选择[马上放心]相关,提交失败,请检查后重新提交!"); + } + + }else if (StrUtil.isEmpty(passType) || passType == "3"){ + + if (CollUtil.isEmpty(orderDetailCodeEntities)) { + return ResultVOUtils.error(500, "单据未扫码或扫码校验无法通过,提交失败,请检查后重新提交!"); + } + + } if (checkInoutService.checkManual(addOrderRequest.getBillNo())) { if (CollUtil.isNotEmpty(orderDetailBizEntities)) { diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java index 209661f4..60cd041d 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java @@ -805,6 +805,14 @@ public class IoOrderDetailBizController extends BaseController { // } AddOrderRequest addOrderRequest = new AddOrderRequest(); BeanUtils.copyProperties(ioOrderEntity, addOrderRequest); + if (StrUtil.isNotEmpty(ioOrderEntity.getBillNo())){ + String billNo = ioOrderEntity.getBillNo(); + IoOrderEntity beanIoOrder = orderService.findByBillNo(billNo); + if (beanIoOrder != null){ + beanIoOrder.setAliOrderBillNo(billCode); + orderService.update(beanIoOrder); + } + } for (int j = 0; j < aliYljgBillDetailDrugCodeList1.size(); j++) { AliYljgBillDetailDrugCode aliYljgBillDetailDrugCode = aliYljgBillDetailDrugCodeList1.get(j); diff --git a/src/main/resources/schemas/schema_v2.4.sql b/src/main/resources/schemas/schema_v2.4.sql index 82a0c982..1d1eca88 100644 --- a/src/main/resources/schemas/schema_v2.4.sql +++ b/src/main/resources/schemas/schema_v2.4.sql @@ -1274,3 +1274,7 @@ INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `rema ALTER TABLE rel_code_batch MODIFY COLUMN `batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '批次号'; + + +INSERT ignore INTO `sys_param_config` (`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`, `paramType`, `paramExplain`, `updateTime`) +VALUES (20101, 0, '新增送货单立即提交前置通过参数设置', 'create_order_pass_type', '3', 1, 0, '1:必须全部扫齐,才可以通过 2:必须选择了马上放心才能提交 3:必须有码才可以', NULL);