|
@@ -12,6 +12,9 @@ import com.ruoyi.ams.business.IBusinessService;
|
|
|
import com.ruoyi.ams.config.domain.dto.AgvCallDTO;
|
|
|
import com.ruoyi.ams.config.domain.dto.AgvCallItemDTO;
|
|
|
import com.ruoyi.ams.config.domain.dto.LotattDTO;
|
|
|
+import com.ruoyi.ams.order.domain.WmsDocOrderHeader;
|
|
|
+import com.ruoyi.ams.order.service.IWmsDocOrderDetailsService;
|
|
|
+import com.ruoyi.ams.order.service.IWmsDocOrderHeaderService;
|
|
|
import com.ruoyi.ams.task.service.IWcsTaskService;
|
|
|
import com.ruoyi.ams.xuankuang.domain.form.AgvInTaskForm;
|
|
|
import com.ruoyi.ams.xuankuang.domain.vo.WcsResponseVo;
|
|
@@ -27,10 +30,12 @@ import com.ruoyi.common.utils.StringUtils;
|
|
|
import com.ruoyi.system.service.ISysConfigService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -61,6 +66,10 @@ public class AgvCallProxyService {
|
|
|
@Autowired
|
|
|
private IWmsDocAsnDetailsService iWmsDocAsnDetailsService;
|
|
|
@Autowired
|
|
|
+ private IWmsDocOrderHeaderService iWmsDocOrderHeaderService;
|
|
|
+ @Autowired
|
|
|
+ private IWmsDocOrderDetailsService iWmsDocOrderDetailsService;
|
|
|
+ @Autowired
|
|
|
private WcsTaskSubService wcsTaskSubService;
|
|
|
@Autowired
|
|
|
private WmsToWcsApiService wmsToWcsApiService;
|
|
@@ -75,7 +84,7 @@ public class AgvCallProxyService {
|
|
|
* 桶装入库
|
|
|
* @return
|
|
|
*/
|
|
|
- public void theBucketIsLoadedIntoTheLibrary(String palletNo, String materialType,
|
|
|
+ public void bucketIntoStorage(String palletNo, String materialType,
|
|
|
String agvSourceLocationId, Double quantity) {
|
|
|
//1.预备参数设置
|
|
|
BaseSku baseSku = iBaseSkuService.selectBaseSkuByMaterialType(materialType);
|
|
@@ -112,6 +121,19 @@ public class AgvCallProxyService {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public void bucketOutOfStorage(String palletNo, String materialType, String targetLocationId, Double quantity) {
|
|
|
+ BaseSku baseSku = iBaseSkuService.selectBaseSkuByMaterialType(materialType);
|
|
|
+ Assert.isTrue(ObjectUtil.isNotNull(baseSku) && StringUtils.isNotBlank(baseSku.getSku()), "the materialType is illegal");
|
|
|
+ String orderNo = idSequenceUtils.generateId(Constant.ID_TYPE.ORDERNO.getDesc());
|
|
|
+ Assert.isTrue(ObjectUtil.isNotNull(quantity) && quantity > 0, "quantity is illegal");
|
|
|
+ BigDecimal quantityDecimal = new BigDecimal(quantity);
|
|
|
+
|
|
|
+ iWmsDocOrderHeaderService.createOrderHeader(orderNo, Constant.ORDER_TYP.TZ.getValue(), Constant.ORDER_STS.STS00.getValue());
|
|
|
+ iWmsDocOrderDetailsService.createOrderDetail(orderNo, baseSku.getSku(), quantityDecimal);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 桶装出库
|
|
|
*
|
|
@@ -119,7 +141,7 @@ public class AgvCallProxyService {
|
|
|
* @param locationTo
|
|
|
* @return
|
|
|
*/
|
|
|
- public AjaxResult barrelsOutOfStorage(String locationFrom, String locationTo,String palletNo,String wcsId) {
|
|
|
+ public AjaxResult barrelsOutOfStorage(String locationFrom, String locationTo, String palletNo, String wcsId) {
|
|
|
AgvCallDTO agvCallDTO = new AgvCallDTO();
|
|
|
agvCallDTO.setLocationFrom(locationFrom);
|
|
|
agvCallDTO.setLocationTo(locationTo);
|
|
@@ -177,4 +199,5 @@ public class AgvCallProxyService {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
}
|