Commit 742caae277480a37c94494978f2fa49c1e38a1da
1 parent
b249845c
feat: 问题修复项
1、设计师权重导出 2、订单列表多选
Showing
3 changed files
with
12 additions
and
6 deletions
src/main/java/com/order/erp/domain/vo/order/OrderBaseInfoQueryVO.java
src/main/java/com/order/erp/service/order/impl/OrderBaseInfoServiceImpl.java
... | ... | @@ -1224,7 +1224,7 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O |
1224 | 1224 | } |
1225 | 1225 | // 业务员 |
1226 | 1226 | if (Objects.nonNull(roleEnum) && roleEnum.getId().equals(RoleEnum.BUSINESS_USER.getId())) { |
1227 | - queryVO.setBusinessPerson(dataScope.getUser().getNickName()); | |
1227 | + queryVO.setBusinessPerson(Arrays.asList(dataScope.getUser().getNickName())); | |
1228 | 1228 | } |
1229 | 1229 | if (StringUtils.isNotBlank(queryVO.getCommitUserPhone())) { |
1230 | 1230 | AdminUserDO userDO = userService.getOne(new LambdaQueryWrapper<AdminUserDO>() |
... | ... | @@ -1368,7 +1368,7 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O |
1368 | 1368 | .in(CollectionUtils.isNotEmpty(queryVO.getInnerNo()), OrderBaseInfoDO::getInnerNo, queryVO.getInnerNo()) |
1369 | 1369 | .in(CollectionUtils.isNotEmpty(queryVO.getProductionDepartment()), OrderBaseInfoDO::getProductionDepartment, queryVO.getProductionDepartment()) |
1370 | 1370 | .eq(StringUtils.isNotBlank(queryVO.getCreateBy()), OrderBaseInfoDO::getCreateBy, queryVO.getCreateBy()) |
1371 | - .eq(StringUtils.isNotBlank(queryVO.getBusinessPerson()), OrderBaseInfoDO::getBusinessPerson, queryVO.getBusinessPerson()) | |
1371 | + .in(CollectionUtils.isNotEmpty(queryVO.getBusinessPerson()), OrderBaseInfoDO::getBusinessPerson, queryVO.getBusinessPerson()) | |
1372 | 1372 | .ge(StringUtils.isNotBlank(queryVO.getProductionDepartmentConsignStartTime()), OrderBaseInfoDO::getProductionDepartmentConsignTime, queryVO.getProductionDepartmentConsignStartTime()) |
1373 | 1373 | .le(StringUtils.isNotBlank(queryVO.getProductionDepartmentConsignEndTime()), OrderBaseInfoDO::getProductionDepartmentConsignTime, queryVO.getProductionDepartmentConsignEndTime()) |
1374 | 1374 | .ge(StringUtils.isNotBlank(queryVO.getOrderHodStartTime()), OrderBaseInfoDO::getOrderHodTime, queryVO.getOrderHodStartTime()) | ... | ... |
src/main/java/com/order/erp/service/order/impl/OrderProfitAnalysisServiceImpl.java
... | ... | @@ -27,8 +27,10 @@ import org.springframework.stereotype.Service; |
27 | 27 | |
28 | 28 | import javax.annotation.Resource; |
29 | 29 | import java.math.BigDecimal; |
30 | +import java.util.HashSet; | |
30 | 31 | import java.util.List; |
31 | 32 | import java.util.Objects; |
33 | +import java.util.Set; | |
32 | 34 | import java.util.stream.Collectors; |
33 | 35 | |
34 | 36 | /** |
... | ... | @@ -222,10 +224,14 @@ public class OrderProfitAnalysisServiceImpl extends ServiceImpl<OrderProfitAnaly |
222 | 224 | } |
223 | 225 | List<OrderBaseInfoDO> orderBaseInfoDOS = orderBaseInfoService.listByIds(orderProfits.stream().map(OrderProfitAnalysisDO::getOrderId).collect(Collectors.toSet())); |
224 | 226 | int orderTotalNum = 0; |
227 | + Set<String> innerNoSet = new HashSet<>(); | |
225 | 228 | for (OrderBaseInfoDO orderBaseInfoDO : orderBaseInfoDOS) { |
226 | - if (Objects.nonNull(orderBaseInfoDO.getOrderCount())) { | |
227 | - orderTotalNum += orderBaseInfoDO.getOrderCount(); | |
229 | + if (!innerNoSet.contains(orderBaseInfoDO.getInnerNo())) { | |
230 | + if (Objects.nonNull(orderBaseInfoDO.getOrderCount())) { | |
231 | + orderTotalNum += orderBaseInfoDO.getOrderCount(); | |
232 | + } | |
228 | 233 | } |
234 | + innerNoSet.add(orderBaseInfoDO.getInnerNo()); | |
229 | 235 | } |
230 | 236 | OrderProfitAnalysisVO profitAnalysisVO = new OrderProfitAnalysisVO(); |
231 | 237 | profitAnalysisVO.setPacketTotalPrice(packetTotalPrice.doubleValue()); |
... | ... | @@ -238,7 +244,7 @@ public class OrderProfitAnalysisServiceImpl extends ServiceImpl<OrderProfitAnaly |
238 | 244 | .packetTotalPrice(packetTotalPrice.doubleValue()) |
239 | 245 | .customerTotalPrice(customerTotalPrice.doubleValue()).build())); |
240 | 246 | profitAnalysisVO.setOrderTotalNum(orderTotalNum); |
241 | - profitAnalysisVO.setRecordNum(orderProfits.size()); | |
247 | + profitAnalysisVO.setRecordNum(innerNoSet.size()); | |
242 | 248 | |
243 | 249 | return ServerResult.success(profitAnalysisVO); |
244 | 250 | } | ... | ... |