浏览代码

no message

FengChaoYu 7 月之前
父节点
当前提交
4b5393d785

+ 2 - 2
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/material/parts/NewRefundManageLogic.java

@@ -180,7 +180,7 @@ public class NewRefundManageLogic {
                 workerStockDTO.setGoodsStockUnit(refundManageItem.getGoodsStockUnit());
                 workerStockDTO.setPrice(BigDecimal.ZERO);
                 workerStockDTO.setRef(partsNewRefundManage.getApplyNo());
-                workerStockDTO.setRefType(PartsRefTypeEnum.NEW_REFUND.toString());
+                workerStockDTO.setRefType(PartsRefTypeEnum.NEW_REFUND.getRemark());
                 workerStockDTO.setPartsAttr(partsAttr1);
                 workerStockDTO.setChangeQty(refundManageItem.getQty());
                 workerStockDTO.setDirectFlag(DirectFlagEnum.SUB.getKey());
@@ -208,7 +208,7 @@ public class NewRefundManageLogic {
                 workerStockDTO.setGoodsStockUnit(refundManageItem.getGoodsStockUnit());
                 workerStockDTO.setPrice(BigDecimal.ZERO);
                 workerStockDTO.setRef(partsNewRefundManage.getApplyNo());
-                workerStockDTO.setRefType(PartsRefTypeEnum.NEW_REFUND.getKey());
+                workerStockDTO.setRefType(PartsRefTypeEnum.NEW_REFUND.getRemark());
                 workerStockDTO.setPartsAttr(partsAttr2);
                 workerStockDTO.setChangeQty(refundManageItem.getQty());
                 workerStockDTO.setDirectFlag(DirectFlagEnum.ADD.getKey());

+ 7 - 4
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/material/parts/WebsitPartsSalesOrderLogic.java

@@ -91,14 +91,14 @@ public class WebsitPartsSalesOrderLogic {
 
                 partsSalesOrderBean.setItemList(partsSalesOrderItemBeanList);
 
-                this.handleForwardShopAndWorkerStock(partsSalesOrderBean);
+                this.handleForwardWebsitAndWorkerStock(partsSalesOrderBean);
             }
 
             partsSalesOrder.updateById();
         }
     }
 
-    private void handleForwardShopAndWorkerStock(PartsSalesOrderBean partsSalesOrderBean) throws Exception {
+    private void handleForwardWebsitAndWorkerStock(PartsSalesOrderBean partsSalesOrderBean) throws Exception {
         // 扣减网点库存
         List<WebsitStockDTO> websitStockDTOList = this.getWebsitStock(partsSalesOrderBean, DirectFlagEnum.SUB);
         materialGoodsStockLogic.handleWebsitStock(websitStockDTOList);
@@ -108,7 +108,7 @@ public class WebsitPartsSalesOrderLogic {
             // 如果是快递并且销售类型为“服务人员”的单,需要增加师傅在途库存
             // 增加师傅在途库存
             List<WorkerStockDTO> workerStockDTOList = this.getWorkerStock(partsSalesOrderBean,
-                    PartsRefTypeEnum.SALES.toString(), null, PartsAttrEnum.WAY.toString());
+                    PartsRefTypeEnum.SALES.getRemark(), null, PartsAttrEnum.WAY.getKey());
 
             materialGoodsStockLogic.handleWorkerStock(workerStockDTOList);
         }
@@ -127,6 +127,7 @@ public class WebsitPartsSalesOrderLogic {
             websitStockDTO.setWebsitName(partsSalesOrderBean.getWebsitName());
             websitStockDTO.setSdate(new Date());
             websitStockDTO.setPartsWebsitId(item.getPartsWebsitId());
+            websitStockDTO.setGoodsType(WebsitGoodsTypeEnum.P.toString());
             websitStockDTO.setGoodsId(item.getPartsNumber());
             websitStockDTO.setGoodsName(item.getPartsName());
             websitStockDTO.setMaterialGroupName(item.getMaterialGroupName());
@@ -134,6 +135,8 @@ public class WebsitPartsSalesOrderLogic {
             websitStockDTO.setGoodsStockUnit(item.getGoodsStockUnit());
             websitStockDTO.setVoucherNo(partsSalesOrderBean.getId());
             websitStockDTO.setApplyNo(partsSalesOrderBean.getId());
+            websitStockDTO.setRef(partsSalesOrderBean.getId());
+            websitStockDTO.setRefType(PartsRefTypeEnum.SALES.getRemark());
             websitStockDTO.setObj(PartsRefTypeEnum.SALES.getKey());
             websitStockDTO.setPartsAttr(PartsAttrEnum.NEW.getKey());
             websitStockDTO.setChangeQty(item.getQty());
@@ -573,7 +576,7 @@ public class WebsitPartsSalesOrderLogic {
             partsSalesOrderBean.setPushFlag(PartsPushFlagEnum.SALES.toString());
             partsSalesOrderBean.setPayFlag(PartsPayFlagEnum.PAY_TAKE.getKey());
             // 师傅在途库存转移到新件库存
-            List<WorkerStockDTO> workerWayStockDTOList = this.getWorkerStock(partsSalesOrderBean, PartsRefTypeEnum.SALES.toString(),
+            List<WorkerStockDTO> workerWayStockDTOList = this.getWorkerStock(partsSalesOrderBean, PartsRefTypeEnum.SALES.getRemark(),
                     PartsAttrEnum.WAY.getKey(), PartsAttrEnum.NEW.getKey());
             materialGoodsStockLogic.handleWorkerStock(workerWayStockDTOList);