diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayTypeClient.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayTypeClient.java index 51ee3966c..334043acd 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayTypeClient.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayTypeClient.java @@ -18,6 +18,7 @@ package com.logpm.warehouse.feign; import org.springblade.common.constant.ModuleNameConstant; +import org.springblade.core.tool.api.R; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -44,4 +45,7 @@ public interface IWarehouseTrayTypeClient { @PostMapping(TOP+"/delEntityByMasterId") Boolean removeByMasterId(@RequestParam Long id); + @PostMapping(API_PREFIX+"/selectListByTrayCode") + R selectListByTrayCode(@RequestParam String trayCode); + } diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TrayTypeDataVO.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TrayTypeDataVO.java index 5d7c46d5a..7b004904f 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TrayTypeDataVO.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TrayTypeDataVO.java @@ -1,5 +1,6 @@ package com.logpm.warehouse.vo; +import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity; import lombok.Data; import java.io.Serializable; @@ -34,4 +35,6 @@ public class TrayTypeDataVO implements Serializable { private List list = new ArrayList<>(); + private List goodsLsit = new ArrayList<>(); + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayTypeClient.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayTypeClient.java index 263e8a844..93d8acf1c 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayTypeClient.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayTypeClient.java @@ -2,6 +2,7 @@ package com.logpm.warehouse.feign; import com.logpm.warehouse.service.IWarehouseTrayTypeService; import lombok.AllArgsConstructor; +import org.springblade.core.tool.api.R; import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; @@ -18,4 +19,9 @@ public class WarehouseTrayTypeClient implements IWarehouseTrayTypeClient { public Boolean removeByMasterId(Long id) { return warehouseTrayTypeService.deleteByMasterId(id); } + + @Override + public R selectListByTrayCode(String trayCode) { + return warehouseTrayTypeService.selectListByTrayCode(trayCode); + } } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayTypeService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayTypeService.java index 5ff92a1cd..974ef1048 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayTypeService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayTypeService.java @@ -85,4 +85,6 @@ public interface IWarehouseTrayTypeService extends BaseService queryTrayTypeWrapper = new QueryWrapper<>(); + queryTrayTypeWrapper.eq("is_deleted",0) + .eq("tray_code",trayCode); + WarehouseTrayTypeEntity trayTypeEntity = baseMapper.selectOne(queryTrayTypeWrapper); + if(Objects.isNull(trayTypeEntity)){ + //没有查询到托盘打托信息 + return null; + } + String type = trayTypeEntity.getType();//类型 1扫码分拣(订制品) 2人工分拣(零担) 3库存品 + Long trayTypeId = trayTypeEntity.getId();//打托方式id + String trayType = trayTypeEntity.getTrayType(); + Long wId = trayTypeEntity.getWarehouseId();//托盘打托仓库 + + TrayTypeDataVO trayTypeDataVO = new TrayTypeDataVO(); + trayTypeDataVO.setTrayTypeId(trayTypeId); + trayTypeDataVO.setType(type); + trayTypeDataVO.setTrayCode(trayTypeEntity.getTrayCode()); + trayTypeDataVO.setTrayNum(trayTypeEntity.getTotalNum()); + trayTypeDataVO.setName(trayTypeEntity.getFilterValue()); + trayTypeDataVO.setOrderTotalNum(trayTypeEntity.getOrderTotalNum()); + trayTypeDataVO.setTrayType(trayType); + trayTypeDataVO.setMarketId(trayTypeEntity.getMarketId()); + trayTypeDataVO.setMarketName(trayTypeEntity.getMarketName()); + trayTypeDataVO.setReamrk(trayTypeEntity.getRemark()); + trayTypeDataVO.setWarehosueId(wId); + + QueryWrapper queryWrapper =new QueryWrapper<>(); + queryWrapper.eq("tray_type_id",trayTypeId); + + List goodsList = warehouseTrayGoodsService.list(queryWrapper); + trayTypeDataVO.setGoodsLsit(goodsList); + +// if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){//订制品打托 +// String trayTypeName = DictBizCache.getValue(DictBizConstant.PALLET_ORDER_TYPE, trayTypeEntity.getTrayType()); +// trayTypeDataVO.setTrayTypeName(trayTypeName); +// List list = warehouseTrayGoodsService.getListByTrayTypeId(trayTypeId); +// trayTypeDataVO.setList(list); +// }else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){ +// String trayTypeName = DictBizCache.getValue(DictBizConstant.PALLET_ZERO_TYPE, trayTypeEntity.getTrayType()); +// trayTypeDataVO.setTrayTypeName(trayTypeName); +// List list = warehouseTrayGoodsService.getZeroListByTrayTypeId(trayTypeId); +// trayTypeDataVO.setList(list); +// }else if(PalletProductTypeConstant.STOCKDATA.equals(type)){ +// String trayTypeName = DictBizCache.getValue(DictBizConstant.PALLET_STOCK_TYPE, trayTypeEntity.getTrayType()); +// trayTypeDataVO.setTrayTypeName(trayTypeName); +// List list = warehouseTrayGoodsService.getStockListByTrayTypeId(trayTypeId); +// trayTypeDataVO.setList(list); +// }else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){ +// String trayTypeName = DictBizCache.getValue(DictBizConstant.PALLET_STOCKNODATA_TYPE, trayTypeEntity.getTrayType()); +// trayTypeDataVO.setTrayTypeName(trayTypeName); +// List list = warehouseTrayGoodsService.getStockListByTrayTypeId(trayTypeId); +// trayTypeDataVO.setList(list); +// }else { +// log.warn("##################getEntityByTrayCode: 未知的打托类型"); +// } +// return trayTypeDataVO; + return R.data(trayTypeDataVO); + } + private R moveTrayOrderPackageCode(WarehouseTrayTypeEntity trayTypeEntity, String orderPackageCode) { DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCode(orderPackageCode);