futian.liu
2023-11-28 c29479a57db73c4dd379788d1b819e716ff7e1c1
consum-base/src/main/java/com/consum/base/service/LWhFormInventoryServiceImpl.java
@@ -46,11 +46,7 @@
    @Autowired
    private BaseWarehouseServiceImpl baseWarehouseService;
    @Autowired
    private FinSysTenantUserServiceImpl finSysTenantUserService;
    @Autowired
    private LWhFormInventoryGoodsServiceImpl inventoryGoodsService;
    @Autowired
    private BaseGoodsTemplateServiceImpl baseGoodsTemplateService;
    @Autowired
    private LWhGoodsService lWhGoodsService;
    @Autowired
@@ -199,7 +195,14 @@
            log.error("根据盘点单id查询盘点单失败");
            return 0;
        }
        //2.修改盘点单
        //添加盘点单物品
        List<FormInventoryGoodsVO> inventoryGoodsList = dto.getInventoryGoodsList();
        if (CollectionUtils.isEmpty(inventoryGoodsList)) {
            log.error("盘点单物品为空");
            return 0;
        }
        this.inventoryGoodsService.updateInventoryGoods(inventoryGoodsList);
        //修改盘点单
        if (state == 2) {
            //完成盘点时设置完成盘点时间
            lWhFormInventory.setStopTime(DateUtils.getDateTimeNumber(System.currentTimeMillis()));
@@ -218,13 +221,7 @@
            log.error("修改盘点单失败");
            return 0;
        }
        //3.添加盘点单物品
        List<FormInventoryGoodsVO> inventoryGoodsList = dto.getInventoryGoodsList();
        if (CollectionUtils.isEmpty(inventoryGoodsList)) {
            log.error("盘点单物品为空");
            return 0;
        }
        this.inventoryGoodsService.updateInventoryGoods(inventoryGoodsList);
        return 1;
    }
@@ -343,6 +340,7 @@
                formInventoryDetailVO.getInventoryResult() == null ? null : (formInventoryDetailVO.getInventoryResult() == 2 ? "盘盈" : "盘亏"));
            formInventoryDetailVO.setInventoryType(
                formInventoryDetailVO.getInventoryResult() == null ? null : (formInventoryDetailVO.getInventoryResult() == 2 ? "盘盈入库" : "盘亏出库"));
            formInventoryDetailVO.setWarehouseFormCode(formInventoryDetailVO.getWarehouseFormCode());
            result.add(formInventoryDetailVO);
        });
        pageUtil.setDatas(result);