|
@@ -1,25 +1,22 @@
|
|
package com.ruoyi.ams.asn.service.impl;
|
|
package com.ruoyi.ams.asn.service.impl;
|
|
|
|
|
|
-import java.math.BigDecimal;
|
|
|
|
-import java.util.*;
|
|
|
|
-
|
|
|
|
|
|
+import com.ruoyi.ams.asn.domain.WmsDocAsnDetails;
|
|
|
|
+import com.ruoyi.ams.asn.domain.WmsDocAsnHeader;
|
|
import com.ruoyi.ams.asn.form.PaForm;
|
|
import com.ruoyi.ams.asn.form.PaForm;
|
|
import com.ruoyi.ams.asn.form.StockForm;
|
|
import com.ruoyi.ams.asn.form.StockForm;
|
|
import com.ruoyi.ams.asn.form.UnlockForm;
|
|
import com.ruoyi.ams.asn.form.UnlockForm;
|
|
import com.ruoyi.ams.asn.mapper.WmsDocAsnDetailsMapper;
|
|
import com.ruoyi.ams.asn.mapper.WmsDocAsnDetailsMapper;
|
|
|
|
+import com.ruoyi.ams.asn.mapper.WmsDocAsnHeaderMapper;
|
|
|
|
+import com.ruoyi.ams.asn.service.IWmsDocAsnHeaderService;
|
|
import com.ruoyi.ams.asn.vo.SearchStockVO;
|
|
import com.ruoyi.ams.asn.vo.SearchStockVO;
|
|
import com.ruoyi.ams.box.domain.WmsBoxInfo;
|
|
import com.ruoyi.ams.box.domain.WmsBoxInfo;
|
|
import com.ruoyi.ams.box.service.IWmsBoxInfoService;
|
|
import com.ruoyi.ams.box.service.IWmsBoxInfoService;
|
|
import com.ruoyi.ams.business.IBusinessService;
|
|
import com.ruoyi.ams.business.IBusinessService;
|
|
-import com.ruoyi.ams.config.domain.dto.AgvCallDTO;
|
|
|
|
import com.ruoyi.ams.config.domain.dto.LotattDTO;
|
|
import com.ruoyi.ams.config.domain.dto.LotattDTO;
|
|
import com.ruoyi.ams.config.domain.vo.FlowConfigHeaderVO;
|
|
import com.ruoyi.ams.config.domain.vo.FlowConfigHeaderVO;
|
|
import com.ruoyi.ams.config.service.IFlowConfigHeaderService;
|
|
import com.ruoyi.ams.config.service.IFlowConfigHeaderService;
|
|
-import com.ruoyi.ams.inv.domain.ActTransactionLog;
|
|
|
|
import com.ruoyi.ams.inv.domain.InvLotAtt;
|
|
import com.ruoyi.ams.inv.domain.InvLotAtt;
|
|
import com.ruoyi.ams.inv.domain.InvLotLocId;
|
|
import com.ruoyi.ams.inv.domain.InvLotLocId;
|
|
-import com.ruoyi.ams.inv.domain.form.InvLocIdSearchFrom;
|
|
|
|
-import com.ruoyi.ams.inv.domain.form.InvLotLocIdMoveForm;
|
|
|
|
import com.ruoyi.ams.inv.mapper.InvLotLocIdMapper;
|
|
import com.ruoyi.ams.inv.mapper.InvLotLocIdMapper;
|
|
import com.ruoyi.ams.inv.service.IActTransactionLogService;
|
|
import com.ruoyi.ams.inv.service.IActTransactionLogService;
|
|
import com.ruoyi.ams.inv.service.IInvLotAttService;
|
|
import com.ruoyi.ams.inv.service.IInvLotAttService;
|
|
@@ -30,9 +27,7 @@ import com.ruoyi.ams.order.domain.WmsDocOrderHeader;
|
|
import com.ruoyi.ams.order.dto.WmsDocOrderDTO;
|
|
import com.ruoyi.ams.order.dto.WmsDocOrderDTO;
|
|
import com.ruoyi.ams.order.mapper.WmsDocOrderDetailsMapper;
|
|
import com.ruoyi.ams.order.mapper.WmsDocOrderDetailsMapper;
|
|
import com.ruoyi.ams.order.service.IActAllocationDetailsService;
|
|
import com.ruoyi.ams.order.service.IActAllocationDetailsService;
|
|
-import com.ruoyi.ams.order.service.IWmsDocOrderDetailsService;
|
|
|
|
import com.ruoyi.ams.order.service.IWmsDocOrderHeaderService;
|
|
import com.ruoyi.ams.order.service.IWmsDocOrderHeaderService;
|
|
-import com.ruoyi.ams.task.domain.WcsTask;
|
|
|
|
import com.ruoyi.ams.task.service.IWcsTaskService;
|
|
import com.ruoyi.ams.task.service.IWcsTaskService;
|
|
import com.ruoyi.base.constant.Constant;
|
|
import com.ruoyi.base.constant.Constant;
|
|
import com.ruoyi.base.domain.BaseLocationInfo;
|
|
import com.ruoyi.base.domain.BaseLocationInfo;
|
|
@@ -48,16 +43,13 @@ import com.ruoyi.common.core.domain.model.LoginUser;
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
-import com.ruoyi.common.utils.uuid.SnowflakeIdWorker;
|
|
|
|
|
|
+import com.ruoyi.common.utils.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
-
|
|
|
|
-import com.ruoyi.common.utils.StringUtils;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
-import com.ruoyi.ams.asn.domain.WmsDocAsnDetails;
|
|
|
|
-import com.ruoyi.ams.asn.mapper.WmsDocAsnHeaderMapper;
|
|
|
|
-import com.ruoyi.ams.asn.domain.WmsDocAsnHeader;
|
|
|
|
-import com.ruoyi.ams.asn.service.IWmsDocAsnHeaderService;
|
|
|
|
|
|
+
|
|
|
|
+import java.math.BigDecimal;
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 入库单Service业务层处理
|
|
* 入库单Service业务层处理
|
|
@@ -196,6 +188,31 @@ public class WmsDocAsnHeaderServiceImpl implements IWmsDocAsnHeaderService {
|
|
return wmsDocAsnHeaderMapper.deleteWmsDocAsnHeaderByAsnNo(asnNo);
|
|
return wmsDocAsnHeaderMapper.deleteWmsDocAsnHeaderByAsnNo(asnNo);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public void createWmsDoc(FlowConfigHeaderVO flowConfigHeaderVO, String lotatt01) {
|
|
|
|
+ // 创建入库单
|
|
|
|
+ WmsDocAsnHeader header = new WmsDocAsnHeader();
|
|
|
|
+ header.setAsnStatus("99");
|
|
|
|
+ header.setAsnType("PR");
|
|
|
|
+ header.setCreateTime(new Date());
|
|
|
|
+ header.setCreateBy("pda");
|
|
|
|
+ header.setCustomerId(Constant.CUSTOMER_ID);
|
|
|
|
+ WmsDocAsnDetails details = new WmsDocAsnDetails();
|
|
|
|
+ details.setAsnNo(header.getAsnNo());
|
|
|
|
+ details.setSku(flowConfigHeaderVO.getSkuType());
|
|
|
|
+ details.setExpectedQty(new BigDecimal(flowConfigHeaderVO.getQty()));
|
|
|
|
+ details.setExpectedQtyEach(new BigDecimal(flowConfigHeaderVO.getQty()));
|
|
|
|
+ details.setReceivedQty(BigDecimal.ZERO);
|
|
|
|
+ details.setReceivedQtyEach(BigDecimal.ZERO);
|
|
|
|
+ details.setLineStatus("99");
|
|
|
|
+ details.setCreateBy("pda");
|
|
|
|
+ details.setCreateTime(new Date());
|
|
|
|
+ details.setLotatt01(StringUtils.isNotBlank(lotatt01) ? lotatt01 : null);
|
|
|
|
+ details.setLotatt02(flowConfigHeaderVO.getWeight().toString());
|
|
|
|
+ details.setLotatt05("DJ");
|
|
|
|
+ insertWmsDocAsnDetails(details);
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public int insertWmsDocAsnDetails(WmsDocAsnDetails wmsDocAsnDetails) {
|
|
public int insertWmsDocAsnDetails(WmsDocAsnDetails wmsDocAsnDetails) {
|
|
List<WmsDocAsnDetails> detailsList = new ArrayList<>();
|
|
List<WmsDocAsnDetails> detailsList = new ArrayList<>();
|