| | |
| | | import com.ruoyi.basic.dto.InsSampleReceiveDto; |
| | | import com.ruoyi.basic.dto.ProductDto; |
| | | import com.ruoyi.basic.dto.ResetTreeDragDTO; |
| | | import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper; |
| | | import com.ruoyi.basic.mapper.StandardProductListMapper; |
| | | import com.ruoyi.basic.mapper.StandardProductListSupplierAskMapper; |
| | | import com.ruoyi.basic.mapper.StandardTreeMapper; |
| | |
| | | private StandardTreeMapper standardTreeMapper; |
| | | |
| | | private StandardProductListService2 standardProductListService2; |
| | | |
| | | private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; |
| | | |
| | | private StandardProductListSupplierAskMapper standardProductListSupplierAskMapper; |
| | | |
| | |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | |
| | | // 查询厂家是否有特殊要求值 |
| | | if (insSample.getIfsInventoryId() != null) { |
| | | // 查询原材料厂家名称 |
| | | String supplierName = ifsInventoryQuantityMapper.selectById(insSample.getIfsInventoryId()) |
| | | .getSupplierName(); |
| | | List<Long> collect = list.stream().map(StandardProductList::getId).collect(Collectors.toList()); |
| | | if (CollectionUtils.isNotEmpty(collect)) { |
| | | List<StandardProductListSupplierAsk> supplierAsks = standardProductListSupplierAskMapper.selectList(Wrappers.<StandardProductListSupplierAsk>lambdaQuery() |
| | | .in(StandardProductListSupplierAsk::getProductListId, collect) |
| | | .eq(StandardProductListSupplierAsk::getSupplierName, supplierName)); |
| | | |
| | | // 判断有没有特殊值绑定 |
| | | if (CollectionUtils.isNotEmpty(supplierAsks)) { |
| | | for (StandardProductList standardProductList : list) { |
| | | for (StandardProductListSupplierAsk supplierAsk : supplierAsks) { |
| | | if (standardProductList.getId().equals(supplierAsk.getProductListId())) { |
| | | // 重新赋值要求值和要求描述 |
| | | standardProductList.setAsk(supplierAsk.getAsk()); |
| | | standardProductList.setTell(supplierAsk.getTell()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | return list; |
| | | } |