Commit 5dd2ab6b39b973015f2756e96c9ba0be96271885
1 parent
44e397b3
feat: 问题修复项
1、设计师权重导出 2、订单列表多选
Showing
4 changed files
with
39 additions
and
6 deletions
src/main/java/com/order/erp/common/utils/OrderFieldUtils.java
src/main/java/com/order/erp/domain/vo/order/OrderFieldLockApplyQueryVO.java
... | ... | @@ -58,6 +58,25 @@ public class OrderFieldLockApplyQueryVO extends BasePageVO implements Serializab |
58 | 58 | */ |
59 | 59 | private Integer type; |
60 | 60 | |
61 | + /** | |
62 | + * 项目号 | |
63 | + */ | |
64 | + private List<String> projectNo; | |
65 | + | |
66 | + /** | |
67 | + * 客户编码集合 | |
68 | + */ | |
69 | + private List<String> customerCode; | |
70 | + | |
71 | + /** | |
72 | + * 内部编号 | |
73 | + */ | |
74 | + private List<String> innerNo; | |
75 | + | |
76 | + /** | |
77 | + * 生产科 | |
78 | + */ | |
79 | + private List<String> productionDepartment; | |
61 | 80 | |
62 | 81 | } |
63 | 82 | ... | ... |
src/main/java/com/order/erp/service/order/impl/OrderFieldLockApplyServiceImpl.java
... | ... | @@ -30,10 +30,7 @@ import org.springframework.stereotype.Service; |
30 | 30 | import org.springframework.transaction.annotation.Transactional; |
31 | 31 | |
32 | 32 | import javax.annotation.Resource; |
33 | -import java.util.List; | |
34 | -import java.util.Map; | |
35 | -import java.util.Objects; | |
36 | -import java.util.Set; | |
33 | +import java.util.*; | |
37 | 34 | import java.util.function.Function; |
38 | 35 | import java.util.stream.Collectors; |
39 | 36 | |
... | ... | @@ -304,12 +301,28 @@ public class OrderFieldLockApplyServiceImpl extends ServiceImpl<OrderFieldLockAp |
304 | 301 | if (!resultVO.getIsAdmin()) { |
305 | 302 | queryVO.setApplyUserId(Objects.nonNull(resultVO.getUserVO()) ? resultVO.getUserVO().getId() : -1); |
306 | 303 | } |
304 | + Set<Long> orderIds = new HashSet<>(); | |
305 | + if (CollectionUtils.isNotEmpty(queryVO.getCustomerCode()) || CollectionUtils.isNotEmpty(queryVO.getInnerNo()) | |
306 | + || CollectionUtils.isNotEmpty(queryVO.getProductionDepartment()) || CollectionUtils.isNotEmpty(queryVO.getProjectNo())) { | |
307 | + List<OrderBaseInfoDO> orderBaseInfoDOList = orderBaseInfoService.list(new LambdaQueryWrapper<OrderBaseInfoDO>() | |
308 | + .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | |
309 | + .in(CollectionUtils.isNotEmpty(queryVO.getCustomerCode()), OrderBaseInfoDO::getCustomerCode, queryVO.getCustomerCode()) | |
310 | + .in(CollectionUtils.isNotEmpty(queryVO.getInnerNo()), OrderBaseInfoDO::getInnerNo, queryVO.getInnerNo()) | |
311 | + .in(CollectionUtils.isNotEmpty(queryVO.getProductionDepartment()), OrderBaseInfoDO::getProductionDepartment, queryVO.getProductionDepartment()) | |
312 | + .in(CollectionUtils.isNotEmpty(queryVO.getProjectNo()), OrderBaseInfoDO::getProjectNo, queryVO.getProjectNo())); | |
313 | + if (CollectionUtils.isNotEmpty(orderBaseInfoDOList)) { | |
314 | + orderIds = orderBaseInfoDOList.stream().map(OrderBaseInfoDO::getId).collect(Collectors.toSet()); | |
315 | + } else { | |
316 | + orderIds.add(-1L); | |
317 | + } | |
318 | + } | |
307 | 319 | return new LambdaQueryWrapper<OrderFieldLockApplyDO>() |
308 | 320 | .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) |
309 | 321 | .eq(Objects.nonNull(queryVO.getApplyUserId()), OrderFieldLockApplyDO::getApplyUserId, queryVO.getApplyUserId()) |
310 | 322 | .eq(Objects.nonNull(queryVO.getStatus()), OrderFieldLockApplyDO::getStatus, queryVO.getStatus()) |
311 | 323 | .eq(Objects.nonNull(queryVO.getType()), OrderFieldLockApplyDO::getType, queryVO.getType()) |
312 | - .in(CollectionUtils.isNotEmpty(queryVO.getStatusList()), OrderFieldLockApplyDO::getStatus, queryVO.getStatusList()); | |
324 | + .in(CollectionUtils.isNotEmpty(queryVO.getStatusList()), OrderFieldLockApplyDO::getStatus, queryVO.getStatusList()) | |
325 | + .in(CollectionUtils.isNotEmpty(orderIds), OrderFieldLockApplyDO::getOrderId, orderIds); | |
313 | 326 | } |
314 | 327 | |
315 | 328 | /** | ... | ... |