|
@@ -1,13 +1,11 @@
|
|
|
package com.ruoyi.ams.inv.service.impl;
|
|
|
|
|
|
-import com.ruoyi.ams.asn.vo.StockingListVO;
|
|
|
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.AgvCallDTO;
|
|
|
import com.ruoyi.ams.config.domain.dto.AgvCallItemDTO;
|
|
|
import com.ruoyi.ams.config.domain.dto.LotattDTO;
|
|
|
-import com.ruoyi.ams.inv.domain.ActTransactionLog;
|
|
|
import com.ruoyi.ams.inv.domain.InvLotAtt;
|
|
|
import com.ruoyi.ams.inv.domain.InvLotLocId;
|
|
|
import com.ruoyi.ams.inv.domain.form.InvLocIdSearchFrom;
|
|
@@ -20,13 +18,13 @@ import com.ruoyi.ams.inv.service.IInvLotLocIdService;
|
|
|
import com.ruoyi.ams.task.domain.WcsTask;
|
|
|
import com.ruoyi.base.constant.Constant;
|
|
|
import com.ruoyi.base.domain.BaseLocationInfo;
|
|
|
+import com.ruoyi.base.domain.BaseLocationZone;
|
|
|
import com.ruoyi.base.service.IBaseLocationInfoService;
|
|
|
import com.ruoyi.base.utils.IdSequenceUtils;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
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;
|
|
@@ -285,7 +283,7 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AjaxResult movePallet(String palletNo, String locationTo, String isCallCar, String reason
|
|
|
+ public AjaxResult movePalletTo(String palletNo, String locationTo, String isCallCar, String reason
|
|
|
, Long warehouseId, String updateBy) {
|
|
|
String locationFrom;
|
|
|
boolean callCar = false; // 是否叫车(不传默认不叫车)
|
|
@@ -724,4 +722,32 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
|
|
|
throw new ServiceException("查询不到库存信息");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public AjaxResult releaseLocation(String locationFrom, Long warehouseId, String updateBy) {
|
|
|
+
|
|
|
+ BaseLocationInfo baseLocationInfo = baseLocationInfoService.selectBaseLocationInfoByIdOrNo(locationFrom, Constant.WAREHOUSE_ID);
|
|
|
+ if (null == baseLocationInfo) return AjaxResult.error("查无库位信息");
|
|
|
+ InvLotLocId invLotLocIdQuery = new InvLotLocId();
|
|
|
+ invLotLocIdQuery.setLocationId(String.valueOf(baseLocationInfo.getId()));
|
|
|
+ List<InvLotLocId> invLotLocIdList = selectInvLotLocIdList(invLotLocIdQuery);
|
|
|
+
|
|
|
+ if (BaseLocationZone.ZONE_OUTBOUND == baseLocationInfo.getZoneId().intValue()) {
|
|
|
+
|
|
|
+ for (InvLotLocId invLotLocId : invLotLocIdList) {
|
|
|
+
|
|
|
+ invLotLocIdMapper.updateLocation(Long.parseLong(invLotLocId.getLocationId()), Constant.LOC_SORTATION_CACHE);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+
|
|
|
+ deleteInvLotLocIdById(baseLocationInfo.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ //修改托盘库位绑定关系
|
|
|
+ WmsBoxInfo wmsBoxInfo = iWmsBoxInfoService.selectByLocationId(String.valueOf(baseLocationInfo.getId()));
|
|
|
+ iWmsBoxInfoService.updateLocationBind(baseLocationInfo.getId(), Constant.LOC_SORTATION_CACHE, wmsBoxInfo.getIsFull());
|
|
|
+
|
|
|
+ //释放库位状态
|
|
|
+ return adjLocationIsEmpty(locationFrom, Constant.WAREHOUSE_ID, updateBy);
|
|
|
+ }
|
|
|
}
|