| | |
| | | @Autowired |
| | | private WaveItemService waveItemService; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private TaskItemService taskItemService; |
| | | @Autowired |
| | | private LocItemService locItemService; |
| | | @Autowired |
| | | private LocService locService; |
| | | @Autowired |
| | | private OutStockService outStockService; |
| | | @Autowired |
| | | private WaveService waveService; |
| | | @Autowired |
| | | private WaveRuleServiceImpl waveRuleService; |
| | | @Autowired |
| | |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | List<Long> WaveIds = JSONArray.parseArray(JSON.toJSONString(map.get("ids")), Long.class); |
| | | List<Wave> waves = waveService.listByIds(WaveIds); |
| | | List<Wave> waves = this.listByIds(WaveIds); |
| | | if (Objects.isNull(waves)) { |
| | | throw new CoolException("数据错误: 波次不存在!!"); |
| | | } |
| | |
| | | wave.setExceStatus(WaveExceStatus.WAVE_EXCE_STATUS_EXCING.val); |
| | | } |
| | | wave.setMemo("-->库存不足"); |
| | | waveService.updateById(wave); |
| | | this.updateById(wave); |
| | | return R.ok(); |
| | | } |
| | | try { |
| | |
| | | Double sum = taskItems.stream().mapToDouble(TaskItem::getAnfme).sum(); |
| | | Double v = Math.round((wave.getWorkQty() + sum) * 1000000) / 1000000.0; |
| | | if (wave.getAnfme().compareTo(v) == 0) { |
| | | if (!waveService.update(new LambdaUpdateWrapper<Wave>() |
| | | if (!this.update(new LambdaUpdateWrapper<Wave>() |
| | | .set(Wave::getExceStatus, WaveExceStatus.WAVE_EXCE_STATUS_TASK.val) |
| | | .set(Wave::getWorkQty, v) |
| | | .set(Wave::getUpdateBy, loginUserId) |
| | |
| | | throw new CoolException("波次状态修改失败!!"); |
| | | } |
| | | } else { |
| | | if (!waveService.update(new LambdaUpdateWrapper<Wave>() |
| | | if (!this.update(new LambdaUpdateWrapper<Wave>() |
| | | .set(Wave::getExceStatus, WaveExceStatus.WAVE_EXCE_STATUS_EXCING.val) |
| | | .set(Wave::getWorkQty, v) |
| | | .set(Wave::getUpdateBy, loginUserId) |