| | |
| | | import com.vincent.rsf.server.manager.entity.*; |
| | | import com.vincent.rsf.server.manager.mapper.*; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.vincent.rsf.server.manager.service.impl.BasContainerServiceImpl; |
| | | import com.vincent.rsf.server.system.constant.CodeRes; |
| | | import com.vincent.rsf.server.system.constant.GlobalConfigCode; |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | |
| | | private CompanysService companysService; |
| | | @Autowired |
| | | private OutStockService outStockService; |
| | | @Autowired |
| | | private BasContainerService basContainerService; |
| | | |
| | | /** |
| | | * @return |
| | |
| | | Object asnCode = params.get("asnCode"); |
| | | Object crushNo = params.get("fieldsIndex"); |
| | | Object batch = params.get("batch"); |
| | | |
| | | if (Objects.isNull(crushNo)) { |
| | | throw new CoolException("票号不能为空!!"); |
| | | } |
| | | if (Objects.isNull(code)) { |
| | | throw new CoolException("容器号不能为空!!"); |
| | | } |
| | | BasContainer container = basContainerService.getOne(new LambdaQueryWrapper<BasContainer>().eq(BasContainer::getCode, code.toString())); |
| | | if (Objects.isNull(container)) { |
| | | throw new CoolException("容器不存在!!"); |
| | | } |
| | | if (!Objects.isNull(params.get("isHalf")) && !params.get("isHalf").equals("0")) { |
| | | container.setIsHalf(1); |
| | | if (!basContainerService.updateById(container)) { |
| | | throw new CoolException("容器状态修改失败!!"); |
| | | } |
| | | } |
| | | |
| | | String fieldIndex = null; |
| | | if (!Objects.isNull(crushNo)) { |
| | | FieldsItem fieldsItem = fieldsItemService.getOne(new LambdaQueryWrapper<FieldsItem>().eq(FieldsItem::getValue, crushNo).last("Limit 1")); |
| | | |
| | | if (!Objects.isNull(fieldsItem)) { |
| | | fieldIndex = fieldsItem.getUuid(); |
| | | } |
| | |
| | | LambdaQueryWrapper<WarehouseAreasItem> queryWrapper = new LambdaQueryWrapper<WarehouseAreasItem>() |
| | | .or().eq(!Cools.isEmpty(code), WarehouseAreasItem::getTrackCode, code) |
| | | .or().eq(!Cools.isEmpty(batch), WarehouseAreasItem::getSplrBatch, batch) |
| | | .or().eq(!Cools.isEmpty(fieldIndex), WarehouseAreasItem::getFieldsIndex, fieldIndex) |
| | | .or().eq(WarehouseAreasItem::getFieldsIndex, fieldIndex) |
| | | .or().eq(!Cools.isEmpty(matnrCode), WarehouseAreasItem::getMatnrCode, matnrCode) |
| | | .or().eq(!Cools.isEmpty(asnCode), WarehouseAreasItem::getAsnCode, asnCode); |
| | | List<WarehouseAreasItem> list = warehouseAreasItemService.list(queryWrapper); |