| | |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | | import com.walker.web.ResponseValue; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | |
| | | @Api(value = "物品型号", tags = "物品型号") |
| | | @RestController |
| | | @RequestMapping("/pc/warehouse/procureModel") |
| | | public class LWhProcureModelController extends BaseController { |
| | |
| | | LWhProcureModelQry param2 = new LWhProcureModelQry(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | List<Map<String, Object>> ffOrderByGoodsIdAndDept = lWhProcureModelService.getFfOrderByGoodsIdAndDept(param.getBaseGoodsTemplateId(), param.getDepartmentId()); |
| | | List<Map<String, Object>> ffOrderByGoodsIdAndDept = |
| | | lWhProcureModelService.getFfOrderByGoodsIdAndDept(param.getBaseGoodsTemplateId(), param.getDepartmentId()); |
| | | if (CollectionUtils.isEmpty(ffOrderByGoodsIdAndDept)) { |
| | | return ResponseValue.success(); |
| | | } |
| | |
| | | LWhProcureModelQry param2 = new LWhProcureModelQry(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | List<Map<String, Object>> ffOrderByGoodsIdAndDept = lWhProcureModelService.getGoodsUseInfoByFfOrderAndGoodId(param.getBaseGoodsTemplateId(), param.getTransBusinessId()); |
| | | List<Map<String, Object>> ffOrderByGoodsIdAndDept = lWhProcureModelService |
| | | .getGoodsUseInfoByFfOrderAndGoodId(param.getBaseGoodsTemplateId(), param.getTransBusinessId()); |
| | | if (CollectionUtils.isEmpty(ffOrderByGoodsIdAndDept)) { |
| | | return ResponseValue.success(); |
| | | } |
| | | // 按型号分组返回 |
| | | return ResponseValue.success(ffOrderByGoodsIdAndDept.stream() |
| | | .collect(Collectors.groupingBy(map -> map.get("baseGoodsModelsId")))); |
| | | return ResponseValue.success( |
| | | ffOrderByGoodsIdAndDept.stream().collect(Collectors.groupingBy(map -> map.get("baseGoodsModelsId")))); |
| | | } |
| | | |
| | | |
| | | } |