启用禁用货位及货位移动

main
judy 1 year ago
parent 86412110dc
commit bbd1a0f560
  1. 2
      shkj-wms/src/main/java/com/shkj/wms/controller/base/BaseLocationController.java
  2. 20
      shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java
  3. 1
      shkj-wms/src/main/resources/mapper/wms/BaseLocationMapper.xml

@ -89,7 +89,7 @@ public class BaseLocationController extends BaseController {
* 禁用启用货位
*/
@PostMapping("/enableDisableLocation")
public Result<Boolean> enableDisableLocation(@Valid @RequestBody BaseLocationRemoveBo bo) {
public Result<Boolean> enableDisableLocation(@RequestBody BaseLocationRemoveBo bo) {
return iBaseLocationService.deleteWithValidById(bo.getIds(), bo.getStatus());
}

@ -30,13 +30,16 @@ import com.shkj.wms.third.rcs.enums.RCSTaskTypeEnum;
import com.shkj.wms.utils.JsonUtil;
import com.shkj.wms.utils.TunnelTaskUtil;
import com.shkj.wms.vo.*;
import io.lettuce.core.api.async.RedisTransactionalAsyncCommands;
import lombok.extern.slf4j.Slf4j;
import net.bytebuddy.asm.Advice;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.math3.linear.ConjugateGradient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import javax.annotation.Resource;
import javax.validation.Valid;
@ -1919,6 +1922,7 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B
* 2.4 堆垛机放货完成时处理库存
*/
try {
// 查询移出货位是否有库存
Long outLocationId = bo.getOutLocationId();
SysStockDetailQueryBo stockDetailQueryBo = new SysStockDetailQueryBo();
@ -2051,6 +2055,14 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B
taskGoodsOut.setBranchId(SecurityUtils.getCurrentBranchId());
taskGoodsOut.setTaskCode(taskOutId);
taskGoodsList.add(taskGoodsOut);
}else{
BusinDataTaskGoods taskGoodsAdd = new BusinDataTaskGoods();
taskGoodsAdd.setGoodsNo(sysStockDetailVo.getGoodsNo());
taskGoodsAdd.setIsPunching(sysStockDetailVo.getIsPuch());
taskGoodsAdd.setBranchId(SecurityUtils.getCurrentBranchId());
taskGoodsAdd.setTaskCode(taskOutId);
taskGoodsList.add(taskGoodsAdd);
taskGoodsList.add(taskGoodsAdd);
}
// //出库预占
@ -2062,7 +2074,13 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B
// iSysStockDetailService.updateBatchById(sysStockDetails);
return iBusinDataTaskGoodsService.saveBatch(taskGoodsList) ? Result.ok() : Result.err().msg("移库任务失败");
iBusinDataTaskGoodsService.saveBatch(taskGoodsList);
return Result.ok().msg("移库任务成功");
}catch (Exception e){
log.info("移库任务失败:"+e.getMessage());
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return Result.err().msg("移库任务失败");
}
}

@ -555,6 +555,7 @@
JOIN base_storage s ON a.storage_id = s.id
WHERE
l.is_del = '0' AND a.is_del = '0'
and l.location_status='0'
and l.id not in (select distinct location_id from sys_stock_detail)
<if test="locationName != null and locationName != ''">
and l.location_name like concat('%', #{locationName},'%')

Loading…
Cancel
Save