|
@@ -1,21 +1,21 @@
|
|
|
package com.ruoyi.ams.asn.service.impl;
|
|
|
|
|
|
-import java.math.BigDecimal;
|
|
|
-import java.util.*;
|
|
|
-
|
|
|
import cn.hutool.core.comparator.CompareUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
+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.StockForm;
|
|
|
import com.ruoyi.ams.asn.form.UnlockForm;
|
|
|
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.box.domain.WmsBoxInfo;
|
|
|
import com.ruoyi.ams.box.service.IWmsBoxInfoService;
|
|
|
import com.ruoyi.ams.business.IBusinessService;
|
|
|
import com.ruoyi.ams.config.domain.dto.LotattDTO;
|
|
|
import com.ruoyi.ams.config.domain.vo.FlowConfigHeaderVO;
|
|
|
-import com.ruoyi.ams.config.service.IFlowConfigHeaderService;
|
|
|
import com.ruoyi.ams.erp.domain.ErpBarcodes;
|
|
|
import com.ruoyi.ams.erp.domain.ErpOrderList;
|
|
|
import com.ruoyi.ams.erp.service.IErpBarcodesService;
|
|
@@ -24,16 +24,12 @@ import com.ruoyi.ams.inv.domain.InvLotLocId;
|
|
|
import com.ruoyi.ams.inv.domain.form.InvLocIdSearchFrom;
|
|
|
import com.ruoyi.ams.inv.domain.vo.InvLotLocIdLotattVO;
|
|
|
import com.ruoyi.ams.inv.mapper.InvLotLocIdMapper;
|
|
|
-import com.ruoyi.ams.inv.service.IActTransactionLogService;
|
|
|
import com.ruoyi.ams.inv.service.IInvLotAttService;
|
|
|
import com.ruoyi.ams.inv.service.IInvLotLocIdService;
|
|
|
import com.ruoyi.ams.lineCall.domain.form.LineCallForm;
|
|
|
import com.ruoyi.ams.lineCall.domain.form.LineCallListFrom;
|
|
|
import com.ruoyi.ams.order.domain.WmsDocOrderDetails;
|
|
|
import com.ruoyi.ams.order.domain.WmsDocOrderHeader;
|
|
|
-import com.ruoyi.ams.order.mapper.WmsDocOrderDetailsMapper;
|
|
|
-import com.ruoyi.ams.order.mapper.WmsDocOrderHeaderMapper;
|
|
|
-import com.ruoyi.ams.order.service.IActAllocationDetailsService;
|
|
|
import com.ruoyi.ams.order.service.IWmsDocOrderHeaderService;
|
|
|
import com.ruoyi.base.constant.Constant;
|
|
|
import com.ruoyi.base.domain.BaseLocationInfo;
|
|
@@ -46,22 +42,19 @@ import com.ruoyi.base.service.ICodeSkuRelationshipService;
|
|
|
import com.ruoyi.base.utils.IdSequenceUtils;
|
|
|
import com.ruoyi.common.constant.Constants;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
-import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
+import com.ruoyi.common.utils.StringUtils;
|
|
|
import io.jsonwebtoken.lang.Assert;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
-import com.ruoyi.common.utils.StringUtils;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
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业务层处理
|
|
@@ -71,6 +64,8 @@ import com.ruoyi.ams.asn.service.IWmsDocAsnHeaderService;
|
|
|
*/
|
|
|
@Service
|
|
|
public class WmsDocAsnHeaderServiceImpl implements IWmsDocAsnHeaderService {
|
|
|
+ @Autowired
|
|
|
+ private IWmsDocAsnHeaderService wmsDocAsnHeaderService;
|
|
|
@Autowired
|
|
|
private WmsDocAsnHeaderMapper wmsDocAsnHeaderMapper;
|
|
|
@Autowired
|
|
@@ -82,28 +77,18 @@ public class WmsDocAsnHeaderServiceImpl implements IWmsDocAsnHeaderService {
|
|
|
@Autowired
|
|
|
private IWmsDocOrderHeaderService wmsDocOrderHeaderService;
|
|
|
@Autowired
|
|
|
- private WmsDocOrderDetailsMapper wmsDocOrderDetailsMapper;
|
|
|
- @Autowired
|
|
|
- private WmsDocOrderHeaderMapper wmsDocOrderHeaderMapper;
|
|
|
- @Autowired
|
|
|
private IBaseSkuService baseSkuService;
|
|
|
@Autowired
|
|
|
private IWmsBoxInfoService wmsBoxInfoService;
|
|
|
@Autowired
|
|
|
- private IActTransactionLogService actTransactionLogService;
|
|
|
- @Autowired
|
|
|
private IdSequenceUtils idSequenceUtils;
|
|
|
@Autowired
|
|
|
private IInvLotAttService invLotAttService;
|
|
|
@Autowired
|
|
|
private InvLotLocIdMapper invLotLocIdMapper;
|
|
|
@Autowired
|
|
|
- private IActAllocationDetailsService actAllocationDetailsService;
|
|
|
- @Autowired
|
|
|
private ICodeSkuRelationshipService codeSkuRelationshipService;
|
|
|
@Autowired
|
|
|
- private IFlowConfigHeaderService flowConfigHeaderService;
|
|
|
- @Autowired
|
|
|
private IBusinessService businessService;
|
|
|
@Autowired
|
|
|
private IBaseLocationInfoService baseLocationInfoService;
|
|
@@ -277,15 +262,25 @@ public class WmsDocAsnHeaderServiceImpl implements IWmsDocAsnHeaderService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 入库码盘异步处理
|
|
|
+ * @param stockForm
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public synchronized AjaxResult syncDoStock(StockForm stockForm){
|
|
|
+ return wmsDocAsnHeaderService.doStock(stockForm);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 入库码盘
|
|
|
*
|
|
|
* @param stockForm
|
|
|
* @return
|
|
|
*/
|
|
|
- @Transactional
|
|
|
+ @Transactional(propagation = Propagation.REQUIRES_NEW)
|
|
|
@Override
|
|
|
- public synchronized AjaxResult doStock(StockForm stockForm) {
|
|
|
+ public AjaxResult doStock(StockForm stockForm) {
|
|
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
|
|
Long STAGE01 = Constant.LOC_STAGE_CACHE;
|
|
|
WmsDocOrderHeader wmsDocOrderHeader;
|