| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | **/ |
| | | @Service |
| | | @Slf4j |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public class LWarehouseFlowCoreService { |
| | | |
| | | private final JdbcTemplate jdbcTemplate; |
| | |
| | | //采购方式(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) { |
| | |
| | | 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); |