cy
2023-12-02 69abbfbdbda77af152490e47851622905df7eb8e
consum-base/src/main/java/com/consum/base/service/LWarehouseFlowCoreService.java
@@ -1,9 +1,9 @@
package com.consum.base.service;
import com.consum.base.core.utils.IdUtil;
import com.consum.base.core.utils.LockManage;
import com.consum.model.po.*;
import com.walker.infrastructure.utils.CollectionUtils;
import com.walker.infrastructure.utils.NumberGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -12,6 +12,8 @@
import org.springframework.jdbc.core.namedparam.SqlParameterSource;
import org.springframework.jdbc.core.simple.SimpleJdbcCall;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
import java.util.List;
@@ -26,6 +28,7 @@
 **/
@Service
@Slf4j
@Transactional(propagation = Propagation.REQUIRED)
public class LWarehouseFlowCoreService {
    private final JdbcTemplate jdbcTemplate;
@@ -78,8 +81,8 @@
        //采购方式(1:集采;2=自采)
        short buyType = lWhFormProcure.getBuyType().shortValue();
        //采购时间
        Long procureTime = lWhFormProcure.getProcureTime();
        Long procureTime2 = lWhFormProcure.getProcureTime();
        Long procureTime = procureTime2 == null ? dealTime : procureTime2;
        // 插入流水总表
        int flowInsertFlag = lWarehouseFlowService.insert(warehouseFlow);
        if (flowInsertFlag == 0) {
@@ -109,7 +112,7 @@
            String goodsUnit = (String) tempGoodsInfo.get("unit");
            // 插入 各规格物品的进出库记录 L_WH_GOODS_RECORD
            long whGoodsRecordId = NumberGenerator.getLongSequenceNumberNano();
            long whGoodsRecordId = IdUtil.generateId();
            LWhGoodsRecord whGoodsRecord = new LWhGoodsRecord();
            whGoodsRecord.setId(whGoodsRecordId);
            whGoodsRecord.setWarehouseId(warehouseId);