From 343bac2b82a3b0e57b68f39ef23f5a41ea76f922 Mon Sep 17 00:00:00 2001 From: wws <18630710203@163.com> Date: Thu, 14 Sep 2023 10:56:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BD=E5=9D=AF=E8=AE=A2=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/op/plan/service/impl/ProOrderServiceImpl.java | 4 +++- .../com/op/plan/service/impl/ProWhiteOrderServiceImpl.java | 4 +++- .../src/main/resources/mapper/plan/ProWhiteOrderMapper.xml | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java index f1f20319..1ced87ef 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java @@ -173,7 +173,9 @@ public class ProOrderServiceImpl implements IProOrderService { ProOrderWorkorderBatch proOrderWorkorderBatch = setCommonBatchAttribute(); // 设置工单 proOrderWorkorder.setWorkorderId(IdUtils.fastSimpleUUID()); - proOrderWorkorder.setWorkorderCode(proOrder.getOrderCode()+"-1"); + // 设置工单code + int endCode = getEndCode(proOrder.getId()); + proOrderWorkorder.setWorkorderCode(proOrder.getOrderCode()+"-"+endCode); proOrderWorkorder.setOrderId(proOrder.getId()); proOrderWorkorder.setOrderCode(proOrder.getOrderCode()); proOrderWorkorder.setUnit(proOrder.getUnit()); diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProWhiteOrderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProWhiteOrderServiceImpl.java index 8afda4c1..04c4757d 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProWhiteOrderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProWhiteOrderServiceImpl.java @@ -88,6 +88,7 @@ public class ProWhiteOrderServiceImpl implements IProWhiteOrderService { int num = 1; // 创建主订单 proOrder.setPlanFactoryCode(factory); + proOrder.setFactoryCode(factory); proOrder.setId(IdUtils.fastSimpleUUID()); proOrder.setParentOrder("0"); proOrder.setStatus("o0"); @@ -141,11 +142,12 @@ public class ProWhiteOrderServiceImpl implements IProWhiteOrderService { childProOrder.setProdDesc(prodDescs[i]); childProOrder.setProdCode(prodCodes[i]); childProOrder.setPlanFactoryCode(factory); + childProOrder.setFactoryCode(factory); childProOrder.setId(IdUtils.fastSimpleUUID()); childProOrder.setParentOrder(orderCode); childProOrder.setStatus("o0"); childProOrder.setOrderType(proOrder.getProdType()); - childProOrder.setOrderCode(orderCode+"-"+num++); + childProOrder.setOrderCode(orderCode+num++); childProOrder.setCreateBy(SecurityContextHolder.getUserName()); childProOrder.setCreateTime(DateUtils.getNowDate()); childProOrder.setUpdateBy(SecurityContextHolder.getUserName()); diff --git a/op-modules/op-plan/src/main/resources/mapper/plan/ProWhiteOrderMapper.xml b/op-modules/op-plan/src/main/resources/mapper/plan/ProWhiteOrderMapper.xml index 616aa83d..f53c7b1d 100644 --- a/op-modules/op-plan/src/main/resources/mapper/plan/ProWhiteOrderMapper.xml +++ b/op-modules/op-plan/src/main/resources/mapper/plan/ProWhiteOrderMapper.xml @@ -89,6 +89,7 @@ insert into pro_order id, + plan_factory_code, factory_code, order_type, order_code, @@ -113,6 +114,7 @@ #{id}, + #{planFactoryCode}, #{factoryCode}, #{orderType}, #{orderCode},