|
@@ -561,7 +561,7 @@ public class WebsitPartsSalesOrderLogic {
|
|
|
|
|
|
private void handleForwardShopAndWorkerStock(WebsitPartsSalesBean partsSalesOrderBean) throws Exception {
|
|
private void handleForwardShopAndWorkerStock(WebsitPartsSalesBean partsSalesOrderBean) throws Exception {
|
|
// 扣减网点库存
|
|
// 扣减网点库存
|
|
- List<WebsitStockDTO> shopStockDTOList = this.getWebsitStock(partsSalesOrderBean, DirectFlagEnum.SUB);
|
|
|
|
|
|
+ List<WebsitStockDTO> shopStockDTOList = this.getWebsitStock(partsSalesOrderBean, DirectFlagEnum.SUB, PartsRefTypeEnum.SALES.getRemark());
|
|
materialGoodsStockLogic.handleWebsitStock(shopStockDTOList);
|
|
materialGoodsStockLogic.handleWebsitStock(shopStockDTOList);
|
|
|
|
|
|
if (DeliveryTypeEnum.EXPRESS.getValue().equals(partsSalesOrderBean.getDeliveryType())
|
|
if (DeliveryTypeEnum.EXPRESS.getValue().equals(partsSalesOrderBean.getDeliveryType())
|
|
@@ -577,7 +577,7 @@ public class WebsitPartsSalesOrderLogic {
|
|
|
|
|
|
private void handleReverseShopAndWorkerStock(WebsitPartsSalesBean partsSalesOrderBean) throws Exception {
|
|
private void handleReverseShopAndWorkerStock(WebsitPartsSalesBean partsSalesOrderBean) throws Exception {
|
|
//网点库存要加回去
|
|
//网点库存要加回去
|
|
- List<WebsitStockDTO> shopStockDTOList = this.getWebsitStock(partsSalesOrderBean, DirectFlagEnum.ADD);
|
|
|
|
|
|
+ List<WebsitStockDTO> shopStockDTOList = this.getWebsitStock(partsSalesOrderBean, DirectFlagEnum.ADD, PartsRefTypeEnum.SALES.getRemark());
|
|
|
|
|
|
materialGoodsStockLogic.handleWebsitStock(shopStockDTOList);
|
|
materialGoodsStockLogic.handleWebsitStock(shopStockDTOList);
|
|
|
|
|
|
@@ -905,7 +905,7 @@ public class WebsitPartsSalesOrderLogic {
|
|
return workerStockDTOList;
|
|
return workerStockDTOList;
|
|
}
|
|
}
|
|
|
|
|
|
- private List<WebsitStockDTO> getWebsitStock(WebsitPartsSalesBean partsSalesOrderBean, DirectFlagEnum directFlag) {
|
|
|
|
|
|
+ private List<WebsitStockDTO> getWebsitStock(WebsitPartsSalesBean partsSalesOrderBean, DirectFlagEnum directFlag, String refType) {
|
|
if(Collections.isEmpty(partsSalesOrderBean.getItemList())) {
|
|
if(Collections.isEmpty(partsSalesOrderBean.getItemList())) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
@@ -918,11 +918,14 @@ public class WebsitPartsSalesOrderLogic {
|
|
websitStockDTO.setWebsitName(partsSalesOrderBean.getWebsitName());
|
|
websitStockDTO.setWebsitName(partsSalesOrderBean.getWebsitName());
|
|
websitStockDTO.setSdate(new Date());
|
|
websitStockDTO.setSdate(new Date());
|
|
websitStockDTO.setPartsWebsitId(item.getPartsWebsitId());
|
|
websitStockDTO.setPartsWebsitId(item.getPartsWebsitId());
|
|
|
|
+ websitStockDTO.setGoodsType(WebsitGoodsTypeEnum.P.getKey());
|
|
websitStockDTO.setGoodsId(item.getPartsNumber());
|
|
websitStockDTO.setGoodsId(item.getPartsNumber());
|
|
websitStockDTO.setGoodsName(item.getPartsName());
|
|
websitStockDTO.setGoodsName(item.getPartsName());
|
|
websitStockDTO.setMaterialGroupName(item.getMaterialGroupName());
|
|
websitStockDTO.setMaterialGroupName(item.getMaterialGroupName());
|
|
- websitStockDTO.setPrice(item.getMarketPrice());
|
|
|
|
websitStockDTO.setGoodsStockUnit(item.getGoodsStockUnit());
|
|
websitStockDTO.setGoodsStockUnit(item.getGoodsStockUnit());
|
|
|
|
+ websitStockDTO.setPrice(item.getMarketPrice());
|
|
|
|
+ websitStockDTO.setRef(partsSalesOrderBean.getId());
|
|
|
|
+ websitStockDTO.setRefType(refType);
|
|
websitStockDTO.setVoucherNo(partsSalesOrderBean.getId());
|
|
websitStockDTO.setVoucherNo(partsSalesOrderBean.getId());
|
|
websitStockDTO.setApplyNo(partsSalesOrderBean.getId());
|
|
websitStockDTO.setApplyNo(partsSalesOrderBean.getId());
|
|
websitStockDTO.setObj(PartsRefTypeEnum.SALES.getKey());
|
|
websitStockDTO.setObj(PartsRefTypeEnum.SALES.getKey());
|