|
@@ -104,27 +104,29 @@ public class WebitPurchaseStockLogic {
|
|
|
List<WebsitStockDTO> shopStockDTOS = new ArrayList<>();
|
|
|
for (WebsitPurchaseAdjustmentItem adjustmentItem : changeAdjustList) {
|
|
|
// 入库注值
|
|
|
- WebsitStockDTO subStockDTO = new WebsitStockDTO();
|
|
|
- subStockDTO.setCompanyWechatId(purchaseAdjustment.getCompanyWechatId());
|
|
|
- subStockDTO.setCompanyWechatName(purchaseAdjustment.getCompanyWechatName());
|
|
|
- subStockDTO.setWebsitId(purchaseAdjustment.getWebsitId());
|
|
|
- subStockDTO.setWebsitName(purchaseAdjustment.getWebsitName());
|
|
|
- subStockDTO.setSdate(purchaseAdjustment.getCreateTime());
|
|
|
- subStockDTO.setPartsAttr(PartsAttrEnum.NEW.toString());
|
|
|
- subStockDTO.setGoodsId(adjustmentItem.getGoodsId());
|
|
|
- subStockDTO.setGoodsName(adjustmentItem.getGoodsName());
|
|
|
- subStockDTO.setGoodsType(WebsitGoodsTypeEnum.M.getKey());
|
|
|
- subStockDTO.setPrice(adjustmentItem.getCost());
|
|
|
- subStockDTO.setRef(adjustmentItem.getPurchaseAdjustmentId());
|
|
|
- subStockDTO.setRefType(refType);
|
|
|
- subStockDTO.setChangeQty(adjustmentItem.getInStockQty());
|
|
|
- subStockDTO.setDirectFlag(DirectFlagEnum.SUB.getKey());
|
|
|
- subStockDTO.setRemark(purchaseAdjustment.getRemark());
|
|
|
- subStockDTO.setOperateBy(purchaseAdjustment.getConfirmBy());
|
|
|
- subStockDTO.setOperateTime(purchaseAdjustment.getConfirmTime());
|
|
|
- subStockDTO.setObj("供应商");
|
|
|
- subStockDTO.setStorageId(purchaseAdjustment.getStorageId());
|
|
|
- shopStockDTOS.add(subStockDTO);
|
|
|
+ if (adjustmentItem.getInStockQty().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
+ WebsitStockDTO subStockDTO = new WebsitStockDTO();
|
|
|
+ subStockDTO.setCompanyWechatId(purchaseAdjustment.getCompanyWechatId());
|
|
|
+ subStockDTO.setCompanyWechatName(purchaseAdjustment.getCompanyWechatName());
|
|
|
+ subStockDTO.setWebsitId(purchaseAdjustment.getWebsitId());
|
|
|
+ subStockDTO.setWebsitName(purchaseAdjustment.getWebsitName());
|
|
|
+ subStockDTO.setSdate(purchaseAdjustment.getCreateTime());
|
|
|
+ subStockDTO.setPartsAttr(PartsAttrEnum.NEW.toString());
|
|
|
+ subStockDTO.setGoodsId(adjustmentItem.getGoodsId());
|
|
|
+ subStockDTO.setGoodsName(adjustmentItem.getGoodsName());
|
|
|
+ subStockDTO.setGoodsType(WebsitGoodsTypeEnum.M.getKey());
|
|
|
+ subStockDTO.setPrice(adjustmentItem.getCost());
|
|
|
+ subStockDTO.setRef(adjustmentItem.getPurchaseAdjustmentId());
|
|
|
+ subStockDTO.setRefType(refType);
|
|
|
+ subStockDTO.setChangeQty(adjustmentItem.getInStockQty());
|
|
|
+ subStockDTO.setDirectFlag(DirectFlagEnum.SUB.getKey());
|
|
|
+ subStockDTO.setRemark(purchaseAdjustment.getRemark());
|
|
|
+ subStockDTO.setOperateBy(purchaseAdjustment.getConfirmBy());
|
|
|
+ subStockDTO.setOperateTime(purchaseAdjustment.getConfirmTime());
|
|
|
+ subStockDTO.setObj("供应商");
|
|
|
+ subStockDTO.setStorageId(purchaseAdjustment.getStorageId());
|
|
|
+ shopStockDTOS.add(subStockDTO);
|
|
|
+ }
|
|
|
|
|
|
WebsitStockDTO addStockDTO = new WebsitStockDTO();
|
|
|
addStockDTO.setCompanyWechatId(purchaseAdjustment.getCompanyWechatId());
|