From ed94033b3816ee0922666a9809ce203077e39446 Mon Sep 17 00:00:00 2001
From: wws <18630710203@163.com>
Date: Fri, 15 Sep 2023 15:58:45 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=A8=A1=E5=9D=97(=E7=99=BD?=
=?UTF-8?q?=E5=9D=AF=E8=AE=A2=E5=8D=95=E6=8B=86=E5=88=86BUG=E8=A7=A3?=
=?UTF-8?q?=E5=86=B3)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/op/plan/service/impl/ProOrderServiceImpl.java | 7 ++++++-
.../com/op/plan/service/impl/ProWhiteOrderServiceImpl.java | 5 +++--
.../src/main/resources/mapper/plan/ProOrderMapper.xml | 2 ++
3 files changed, 11 insertions(+), 3 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 a78935fa..ce230ee7 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
@@ -162,7 +162,12 @@ public class ProOrderServiceImpl implements IProOrderService {
proOrder.setQuantitySplit(splitOrderDTO.getSplitNum());
proOrder.setQuantity(proOrder.getQuantitySplit());
proOrder.setStatus("o1");
- proOrder.setCarNum(proOrder.getCarNum()+splitOrderDTO.getCarNum());
+ if (proOrder.getCarNum() != null) {
+ proOrder.setCarNum(proOrder.getCarNum()+splitOrderDTO.getCarNum());
+ }else {
+ proOrder.setCarNum(splitOrderDTO.getCarNum());
+ }
+
if (flag) {
proOrder.setStatus("o2");
}
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 ae6820ac..5ccbee5e 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
@@ -207,7 +207,9 @@ public class ProWhiteOrderServiceImpl implements IProWhiteOrderService {
return error("订单下存在已下发湿料计划工单,不可删除!");
}
}
-
+ }
+ // 删除逻辑
+ if (proOrderWorkorderList.size() > 0) {
for (ProOrderWorkorder workorder : proOrderWorkorderList) {
// 删除批次信息
proOrderWorkorderBatchMapper.deleteProOrderWorkorderBatchByWorkorderId(workorder.getWorkorderId());
@@ -216,7 +218,6 @@ public class ProWhiteOrderServiceImpl implements IProWhiteOrderService {
// 删除工单
proOrderWorkorderMapper.deleteProOrderWorkorderByWorkorderId(workorder.getWorkorderId());
}
-
}
}
// 删除子订单
diff --git a/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderMapper.xml b/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderMapper.xml
index 0ffc94c9..34cd4907 100644
--- a/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderMapper.xml
+++ b/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderMapper.xml
@@ -278,6 +278,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_by = #{updateBy},
update_time = #{updateTime},
status = #{status},
+ car_num = #{carNum},
where id = #{id}
@@ -331,6 +332,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_by = #{updateBy},
update_time = #{updateTime},
status = #{status},
+ car_num = #{carNum},
where id = #{id}