From 87dafe79fbd21ac4a0775eb61edf49cf01747b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Thu, 15 Sep 2022 01:04:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B7=B2=E7=BB=8F=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E6=98=8E=E7=BB=86=E7=9A=84=E6=8E=A5=E5=8F=A3=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=80=80=E8=B4=A7=E5=8D=95=E7=9A=84=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsh/erp/service/depotItem/DepotItemService.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java index 6cf814e8..2fb7c9b8 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java @@ -909,16 +909,27 @@ public class DepotItemService { DepotHead depotHead =depotHeadMapper.selectByPrimaryKey(headerId); String linkNumber = depotHead.getNumber(); //订单号 if("purchase".equals(linkType)) { + //针对以销定购的情况 if(BusinessConstants.SUB_TYPE_SALES_ORDER.equals(depotHead.getSubType())) { goToType = BusinessConstants.SUB_TYPE_PURCHASE_ORDER; } } else { + //采购订单转采购入库 if(BusinessConstants.SUB_TYPE_PURCHASE_ORDER.equals(depotHead.getSubType())) { goToType = BusinessConstants.SUB_TYPE_PURCHASE; } + //销售订单转销售出库 if(BusinessConstants.SUB_TYPE_SALES_ORDER.equals(depotHead.getSubType())) { goToType = BusinessConstants.SUB_TYPE_SALES; } + //采购入库转采购退货 + if(BusinessConstants.SUB_TYPE_PURCHASE.equals(depotHead.getSubType())) { + goToType = BusinessConstants.SUB_TYPE_PURCHASE_RETURN; + } + //销售出库转销售退货 + if(BusinessConstants.SUB_TYPE_SALES.equals(depotHead.getSubType())) { + goToType = BusinessConstants.SUB_TYPE_SALES_RETURN; + } } BigDecimal count = depotItemMapperEx.getFinishNumber(meId, linkId, linkNumber, goToType); //根据多单位情况进行数量的转换