| | |
| | | if (Objects.isNull(locWorking)) { |
| | | throw new CoolException("数据错误,作业中库存数据丢失!!"); |
| | | } |
| | | if (task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_IN.type)) { |
| | | locWorking.setWorkQty(0.0); |
| | | locWorking.setAnfme(taskItem.getAnfme()); |
| | | } else { |
| | | if (locWorking.getAnfme().compareTo(taskItem.getAnfme()) >= 0) { |
| | | locWorking.setWorkQty(0.0); |
| | | locWorking.setAnfme(Math.round((locWorking.getAnfme() - taskItem.getAnfme()) * 10000) / 10000.0); |
| | | } else { |
| | | continue; |
| | | } |
| | | |
| | | } |
| | | BeanUtils.copyProperties(locWorking, locItem); |
| | | locItem.setLocCode(loc.getCode()).setLocId(loc.getId()).setId(null); |
| | | items.add(locItem); |