|
@@ -5,9 +5,7 @@ import com.ruoyi.ams.agv.ndc.common.ByteUtil;
|
|
|
import com.ruoyi.ams.agv.ndc.common.CRC16Util;
|
|
|
import com.ruoyi.ams.agv.ndc.domain.AmsTask;
|
|
|
import com.ruoyi.ams.agv.ndc.service.IAmsTaskService;
|
|
|
-import com.ruoyi.ams.box.domain.WmsBoxInfo;
|
|
|
import com.ruoyi.ams.box.service.IWmsBoxInfoService;
|
|
|
-import com.ruoyi.ams.business.domain.FilterLockInvLocationDTO;
|
|
|
import com.ruoyi.ams.config.domain.AsnSoStrategy;
|
|
|
import com.ruoyi.ams.config.domain.dto.*;
|
|
|
import com.ruoyi.ams.config.domain.vo.FlowConfigHeaderVO;
|
|
@@ -37,7 +35,6 @@ import com.ruoyi.common.exception.ServiceException;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
import com.ruoyi.common.utils.uuid.SnowflakeIdWorker;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -143,6 +140,14 @@ public class BusinessServiceImpl implements IBusinessService {
|
|
|
}
|
|
|
|
|
|
if (flowConfigHeaderVO.getFlowType().equals("ASN")) {
|
|
|
+ // 统计入库箱数
|
|
|
+ List<AgvCallItemDTO> agvCallItemDTOList = agvCallDTO.getAgvCallItemDTOList();
|
|
|
+ int boxNum = agvCallItemDTOList.stream()
|
|
|
+ .mapToInt(v -> v.getQty().intValue())
|
|
|
+ .reduce(Integer::sum).getAsInt();
|
|
|
+ asnSoStrategy.setAsnHeightLimit(boxNum + "");
|
|
|
+ log.info("统计箱数量:" + boxNum);
|
|
|
+
|
|
|
List<BaseLocationInfo> locationFromList = this.convertLocation(paramLocationFrom, agvCallDTO.getWarehouseId(), null);
|
|
|
List<BaseLocationInfo> locationToList = this.convertLocation(paramLocationTo, agvCallDTO.getWarehouseId(), "shift_no+ 0,shift_index");
|
|
|
locationFrom = this.zoneLocationAllocation(locationFromList, "locationFrom", "ASN", asnSoStrategy, token);
|
|
@@ -296,7 +301,17 @@ public class BusinessServiceImpl implements IBusinessService {
|
|
|
if (!b.getStockStatus().equals("00") || !b.getIsEmpty().equals("Y") || redisCache.checkIsLock(RedisKey.LOCK_LOCATION + b.getId())) {
|
|
|
continue;
|
|
|
}
|
|
|
- // todo 第六层不能放数量超过2的货
|
|
|
+ // 第六层不能放数量超过2的货
|
|
|
+ int boxNum = Integer.parseInt(asnSoStrategy.getAsnHeightLimit());
|
|
|
+ if (b.getShiftNo().equals("6")) {
|
|
|
+ if (boxNum > 2) continue;
|
|
|
+ } else {
|
|
|
+ // 其他层数放置箱子数量不能超过6
|
|
|
+ if (boxNum > 6) {
|
|
|
+ log.error("入库箱数量不能超过6!");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (!redisCache.lockCacheObject(RedisKey.LOCK_LOCATION + b.getId(), b.getId().toString(), token)) {
|
|
|
continue;
|
|
|
}
|