石广澎
2023-11-27 aef2a705884dbb25b24d23fc886c563327f4753e
consum-base/src/main/java/com/consum/base/service/LWhFormInventoryServiceImpl.java
@@ -21,9 +21,6 @@
import com.walker.infrastructure.utils.DateUtils;
import com.walker.infrastructure.utils.StringUtils;
import com.walker.jdbc.service.BaseServiceImpl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.BeanUtils;
@@ -31,6 +28,10 @@
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * @Description 盘点
@@ -199,7 +200,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 +226,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;
    }