From cdd4ad30d82d2ec130405cc1a191211aae1b35b7 Mon Sep 17 00:00:00 2001 From: erdanergou Date: Thu, 25 May 2023 14:31:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=EF=BC=8C=E6=AF=8F=E5=A4=A9=E5=87=8C=E6=99=A8=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E5=87=BA=E5=BA=93=E6=95=B0=E9=87=8F=E4=B8=BA=E9=9B=B6?= =?UTF-8?q?=E7=9A=84=E5=87=BA=E5=BA=93=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DepositoryRecordServiceImpl.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java b/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java index be54ee2e..f00220a9 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java @@ -2049,10 +2049,14 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { for (ApplicationOutRecord record : applicationOutRecordPForBad) { Integer id = record.getId(); List applicationOutRecordMinByParent = depositoryRecordMapper.findApplicationOutRecordMinByParent(id); - if(applicationOutRecordMinByParent == null || applicationOutRecordMinByParent.size() <= 0){ - log.warn(DateUtil.getNowTime()+": 删除出错的出库订单:"+ JSONObject.toJSONString(record)); - depositoryRecordMapper.deleteApplicationOutRecordById(id); + if (applicationOutRecordMinByParent != null) { + for (ApplicationOutRecordMin outRecordMin : applicationOutRecordMinByParent) { + depositoryRecordMapper.deleteApplicationOutRecordMinById(outRecordMin.getId()); + log.warn(DateUtil.getNowTime() + ": 删除出错的出库子订单:" + JSONObject.toJSONString(record)); + } } + log.warn(DateUtil.getNowTime() + ": 删除出错的出库订单:" + JSONObject.toJSONString(record)); + depositoryRecordMapper.deleteApplicationOutRecordById(id); } }