| | |
| | | import com.vincent.rsf.server.manager.entity.*; |
| | | import com.vincent.rsf.server.manager.enums.CommonExceStatus; |
| | | import com.vincent.rsf.server.manager.enums.OrderType; |
| | | import com.vincent.rsf.server.manager.enums.OrderWorkType; |
| | | import com.vincent.rsf.server.manager.mapper.ReviseLogMapper; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | if (Objects.isNull(loc)) { |
| | | throw new CoolException("库位不存在!!"); |
| | | } |
| | | List<LocItem> list = locItemService.list(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, loc.getId())); |
| | | if (!list.isEmpty()) { |
| | | throw new CoolException("库位:" + loc.getCode() + ", 调整信息为空!!"); |
| | | } |
| | | locItemService.remove(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, loc.getId())); |
| | | listMap.get(items).forEach(logItem -> { |
| | | LocItem locDetl = new LocItem(); |
| | | BeanUtils.copyProperties(logItem, locDetl); |
| | | locDetl.setLocId(loc.getId()) |
| | | .setType(OrderType.ORDER_REVISE.type) |
| | | .setWkType(Short.parseShort(OrderWorkType.ORDER_WORK_TYPE_STOCK_REVISE.type)) |
| | | .setLocCode(loc.getCode()) |
| | | .setAnfme(logItem.getReviseQty()) |
| | | .setUpdateBy(loginUserId) |
| | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | revise.setExceStatus(CommonExceStatus.COMMON_EXCE_STATUS_TASK_DONE.val); |
| | | if (!locReviseService.updateById(revise)) { |
| | | throw new CoolException("调整单修改失败!!"); |