|
|
|
@ -621,6 +621,8 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper, |
|
|
|
|
|
|
|
|
|
|
|
//出库成功写入wcs异常点位为0
|
|
|
|
//出库成功写入wcs异常点位为0
|
|
|
|
outEliminateAlarms(layer); |
|
|
|
outEliminateAlarms(layer); |
|
|
|
|
|
|
|
Long containerId = updList.get(0).getContainerId(); |
|
|
|
|
|
|
|
redisTemplate.delete(RedisConstant.redisOutBound + containerId); |
|
|
|
}catch (Exception e){ |
|
|
|
}catch (Exception e){ |
|
|
|
log.info("出库确认异常 手动回滚 {}", bos+e.getMessage()); |
|
|
|
log.info("出库确认异常 手动回滚 {}", bos+e.getMessage()); |
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
|
|
|
@ -711,6 +713,7 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper, |
|
|
|
throw new RuntimeException("业务处理中,请稍后再试"); |
|
|
|
throw new RuntimeException("业务处理中,请稍后再试"); |
|
|
|
} |
|
|
|
} |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
Long containerId = null; |
|
|
|
List<String> moldBarcodeList = bo.getMoldBarcodeList(); |
|
|
|
List<String> moldBarcodeList = bo.getMoldBarcodeList(); |
|
|
|
List<BaseMold> baseMoldBarcodeList = baseMoldService.queryByMoldBarcodeList(moldBarcodeList); |
|
|
|
List<BaseMold> baseMoldBarcodeList = baseMoldService.queryByMoldBarcodeList(moldBarcodeList); |
|
|
|
if (CollectionUtils.isEmpty(baseMoldBarcodeList)) { |
|
|
|
if (CollectionUtils.isEmpty(baseMoldBarcodeList)) { |
|
|
|
@ -755,6 +758,14 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper, |
|
|
|
return Result.err().msg(voResult.getMsg()); |
|
|
|
return Result.err().msg(voResult.getMsg()); |
|
|
|
} |
|
|
|
} |
|
|
|
SysStockDetailVo data = voResult.getData(); |
|
|
|
SysStockDetailVo data = voResult.getData(); |
|
|
|
|
|
|
|
// 查询redis
|
|
|
|
|
|
|
|
containerId = data.getContainerId(); |
|
|
|
|
|
|
|
Integer layer = (Integer) redisTemplate.opsForValue().get(RedisConstant.redisOutBound + containerId); |
|
|
|
|
|
|
|
if (layer != null) { |
|
|
|
|
|
|
|
if(!bo.getLayer().equals(layer)){ |
|
|
|
|
|
|
|
return Result.err().msg("此托盘已存在"+layer+"层的出库任务!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
outPlan.setLocationId(data.getLocationId()); |
|
|
|
outPlan.setLocationId(data.getLocationId()); |
|
|
|
outPlan.setContainerId(data.getContainerId()); |
|
|
|
outPlan.setContainerId(data.getContainerId()); |
|
|
|
outPlan.setContainerCode(data.getContainerCode()); |
|
|
|
outPlan.setContainerCode(data.getContainerCode()); |
|
|
|
@ -809,6 +820,8 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper, |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
this.updateBatchById(outPlans); |
|
|
|
this.updateBatchById(outPlans); |
|
|
|
|
|
|
|
//存入redis
|
|
|
|
|
|
|
|
redisTemplate.opsForValue().set(RedisConstant.redisOutBound + containerId,bo.getLayer()); |
|
|
|
} finally { |
|
|
|
} finally { |
|
|
|
//释放锁
|
|
|
|
//释放锁
|
|
|
|
lockTemplate.releaseLock(lockInfo); |
|
|
|
lockTemplate.releaseLock(lockInfo); |
|
|
|
@ -836,6 +849,7 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper, |
|
|
|
} |
|
|
|
} |
|
|
|
return Result.err().msg(sb.substring(0,sb.length()-1)+"已存在出库计划"); |
|
|
|
return Result.err().msg(sb.substring(0,sb.length()-1)+"已存在出库计划"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//根据所做的出库模具,查询模具所在的托盘,根据所在的托盘生成不同的单据
|
|
|
|
//根据所做的出库模具,查询模具所在的托盘,根据所在的托盘生成不同的单据
|
|
|
|
List<SysStockDetail> sysStockDetails = sysStockDetailService.queryByMoldBarcodeLocationList(moldBarcodeList); |
|
|
|
List<SysStockDetail> sysStockDetails = sysStockDetailService.queryByMoldBarcodeLocationList(moldBarcodeList); |
|
|
|
|
|
|
|
|
|
|
|
@ -879,7 +893,6 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper, |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
this.saveBatch(outPlans); |
|
|
|
this.saveBatch(outPlans); |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e){ |
|
|
|
} catch (Exception e){ |
|
|
|
log.error("新增出库计划失败:"+e.getMessage()); |
|
|
|
log.error("新增出库计划失败:"+e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|