|
|
|
|
@ -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("移库任务失败"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|