From f28da0f4705921b88d94c4531fa89753c4bb9f52 Mon Sep 17 00:00:00 2001 From: Bang Hu <hu_bang@hotmail.com> Date: 星期四, 28 八月 2025 12:21:30 +0800 Subject: [PATCH] 参考买家中心服务查询API添加交易审批模查询服务API --- src/main/java/com/webmanage/service/impl/OrderInfoServiceImpl.java | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/webmanage/service/impl/OrderInfoServiceImpl.java b/src/main/java/com/webmanage/service/impl/OrderInfoServiceImpl.java index 94a5ab0..552ce54 100644 --- a/src/main/java/com/webmanage/service/impl/OrderInfoServiceImpl.java +++ b/src/main/java/com/webmanage/service/impl/OrderInfoServiceImpl.java @@ -186,6 +186,51 @@ } @Override + public PageResult<OrderInfo> getPendingApprovalOrderPageWithProductConditions(OrderQueryDTO queryDTO) { + // 鏍规嵁浜у搧鏉′欢鏌ヨ浜у搧ID鍒楄〃 + List<String> productIds = null; + if (StringUtils.hasText(queryDTO.getIndustryId()) || StringUtils.hasText(queryDTO.getUnitProjectId()) || + StringUtils.hasText(queryDTO.getProductTypeId()) || StringUtils.hasText(queryDTO.getProductSubTypeId())) { + productIds = reportResultSubmissionMapper.selectProductIdsByConditions( + queryDTO.getIndustryId(), queryDTO.getUnitProjectId(), + queryDTO.getProductTypeId(), queryDTO.getProductSubTypeId() + ); + + // 濡傛灉娌℃湁鎵惧埌鍖归厤鐨勪骇鍝侊紝鐩存帴杩斿洖绌虹粨鏋� + if (CollectionUtils.isEmpty(productIds)) { + return new PageResult<OrderInfo>( + java.util.Collections.emptyList(), + 0L, + queryDTO.getPageNum().longValue(), + queryDTO.getPageSize().longValue(), + 0L + ); + } + } + + // 鍒涘缓鍒嗛〉瀵硅薄 + Page<OrderInfo> page = new Page<>(queryDTO.getPageNum(), queryDTO.getPageSize()); + + // 鎵ц鍒嗛〉鏌ヨ + IPage<OrderInfo> result = baseMapper.selectPendingApprovalOrderPageWithProductConditions( + page, queryDTO.getOrderStatus(), queryDTO.getProductName(), queryDTO.getProviderName(), + queryDTO.getOrderId(), + queryDTO.getApplyTimeStart() != null ? queryDTO.getApplyTimeStart().toString() : null, + queryDTO.getApplyTimeEnd() != null ? queryDTO.getApplyTimeEnd().toString() : null, + queryDTO.getOrderBy(), queryDTO.getOrderDirection(), productIds + ); + + // 鏋勫缓杩斿洖缁撴灉 + return new PageResult<OrderInfo>( + result.getRecords(), + result.getTotal(), + queryDTO.getPageNum().longValue(), + queryDTO.getPageSize().longValue(), + result.getPages() + ); + } + + @Override public PageResult<OrderDetailVO> getBuyerOrderPageWithProductConditions(OrderQueryDTO queryDTO) { // 鍙傛暟鏍¢獙 if (queryDTO.getUserId() == null) { -- Gitblit v1.8.0