| | |
| | | locWorking.setAnfme(taskItem.getAnfme()); |
| | | } |
| | | BeanUtils.copyProperties(locWorking, locItem); |
| | | locItem.setWorkQty(0.0).setLocCode(loc.getCode()).setLocId(loc.getId()).setId(null).setUpdateBy(loginUserId).setUpdateTime(new Date()); |
| | | locItem.setWorkQty(0.0).setQty(0.0).setLocCode(loc.getCode()).setLocId(loc.getId()).setId(null).setUpdateBy(loginUserId).setUpdateTime(new Date()); |
| | | items.add(locItem); |
| | | } |
| | | |
| | |
| | | TaskItem taskItem = taskItems.stream().findFirst().get(); |
| | | taskItem.setMatnrId(working.getMatnrId()) |
| | | .setMaktx(working.getMaktx()) |
| | | .setMatnrId(working.getMatnrId()) |
| | | .setMatnrCode(working.getMatnrCode()) |
| | | .setSpec(working.getSpec()) |
| | | .setAnfme(working.getAnfme()) |
| | |
| | | LocItem locItem = locItemService.getOne(new LambdaQueryWrapper<LocItem>() |
| | | .eq(LocItem::getMatnrId, taskItem.getMatnrId()) |
| | | .eq(LocItem::getLocId, loc.getId()) |
| | | .eq(StringUtils.isNoneBlank(taskItem.getBatch()), LocItem::getBatch, taskItem.getBatch()) |
| | | .eq(StringUtils.isNoneBlank(taskItem.getFieldsIndex()), LocItem::getFieldsIndex, taskItem.getFieldsIndex())); |
| | | .eq(StringUtils.isNotBlank(taskItem.getBatch()), LocItem::getBatch, taskItem.getBatch()) |
| | | .eq(StringUtils.isNotBlank(taskItem.getFieldsIndex()), LocItem::getFieldsIndex, taskItem.getFieldsIndex())); |
| | | if (Objects.isNull(locItem)) { |
| | | BeanUtils.copyProperties(taskItem, item); |
| | | item.setLocCode(loc.getCode()) |
| | |
| | | throw new CoolException("库位明细更新失败!!"); |
| | | } |
| | | } else { |
| | | locItem.setAnfme(Math.round((locItem.getAnfme() + taskItem.getAnfme()) * 1000000) / 1000000.0) |
| | | .setUpdateTime(new Date()); |
| | | if (!locItemService.saveOrUpdate(locItem)) { |
| | | throw new CoolException("库位明细更新失败!!"); |
| | | } |
| | | throw new CoolException("当前票号已在库内,请检查后再操作!!"); |
| | | // locItem.setAnfme(Math.round((locItem.getAnfme() + taskItem.getAnfme()) * 1000000) / 1000000.0) |
| | | // .setUpdateTime(new Date()); |
| | | // if (!locItemService.saveOrUpdate(locItem)) { |
| | | // throw new CoolException("库位明细更新失败!!"); |
| | | // } |
| | | } |
| | | }); |
| | | |