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
@@ -178,7 +178,7 @@ public class OrderBaseInfoQueryVO extends BasePageVO implements Serializable { | @@ -178,7 +178,7 @@ public class OrderBaseInfoQueryVO extends BasePageVO implements Serializable { | ||
178 | /** | 178 | /** |
179 | * 业务员 | 179 | * 业务员 |
180 | */ | 180 | */ |
181 | - private String businessPerson; | 181 | + private List<String> businessPerson; |
182 | 182 | ||
183 | 183 | ||
184 | private List<Long> exportOrderIds; | 184 | private List<Long> exportOrderIds; |
src/main/java/com/order/erp/service/order/impl/OrderBaseInfoServiceImpl.java
@@ -1224,7 +1224,7 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O | @@ -1224,7 +1224,7 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O | ||
1224 | } | 1224 | } |
1225 | // 业务员 | 1225 | // 业务员 |
1226 | if (Objects.nonNull(roleEnum) && roleEnum.getId().equals(RoleEnum.BUSINESS_USER.getId())) { | 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 | if (StringUtils.isNotBlank(queryVO.getCommitUserPhone())) { | 1229 | if (StringUtils.isNotBlank(queryVO.getCommitUserPhone())) { |
1230 | AdminUserDO userDO = userService.getOne(new LambdaQueryWrapper<AdminUserDO>() | 1230 | AdminUserDO userDO = userService.getOne(new LambdaQueryWrapper<AdminUserDO>() |
@@ -1368,7 +1368,7 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O | @@ -1368,7 +1368,7 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O | ||
1368 | .in(CollectionUtils.isNotEmpty(queryVO.getInnerNo()), OrderBaseInfoDO::getInnerNo, queryVO.getInnerNo()) | 1368 | .in(CollectionUtils.isNotEmpty(queryVO.getInnerNo()), OrderBaseInfoDO::getInnerNo, queryVO.getInnerNo()) |
1369 | .in(CollectionUtils.isNotEmpty(queryVO.getProductionDepartment()), OrderBaseInfoDO::getProductionDepartment, queryVO.getProductionDepartment()) | 1369 | .in(CollectionUtils.isNotEmpty(queryVO.getProductionDepartment()), OrderBaseInfoDO::getProductionDepartment, queryVO.getProductionDepartment()) |
1370 | .eq(StringUtils.isNotBlank(queryVO.getCreateBy()), OrderBaseInfoDO::getCreateBy, queryVO.getCreateBy()) | 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 | .ge(StringUtils.isNotBlank(queryVO.getProductionDepartmentConsignStartTime()), OrderBaseInfoDO::getProductionDepartmentConsignTime, queryVO.getProductionDepartmentConsignStartTime()) | 1372 | .ge(StringUtils.isNotBlank(queryVO.getProductionDepartmentConsignStartTime()), OrderBaseInfoDO::getProductionDepartmentConsignTime, queryVO.getProductionDepartmentConsignStartTime()) |
1373 | .le(StringUtils.isNotBlank(queryVO.getProductionDepartmentConsignEndTime()), OrderBaseInfoDO::getProductionDepartmentConsignTime, queryVO.getProductionDepartmentConsignEndTime()) | 1373 | .le(StringUtils.isNotBlank(queryVO.getProductionDepartmentConsignEndTime()), OrderBaseInfoDO::getProductionDepartmentConsignTime, queryVO.getProductionDepartmentConsignEndTime()) |
1374 | .ge(StringUtils.isNotBlank(queryVO.getOrderHodStartTime()), OrderBaseInfoDO::getOrderHodTime, queryVO.getOrderHodStartTime()) | 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,8 +27,10 @@ import org.springframework.stereotype.Service; | ||
27 | 27 | ||
28 | import javax.annotation.Resource; | 28 | import javax.annotation.Resource; |
29 | import java.math.BigDecimal; | 29 | import java.math.BigDecimal; |
30 | +import java.util.HashSet; | ||
30 | import java.util.List; | 31 | import java.util.List; |
31 | import java.util.Objects; | 32 | import java.util.Objects; |
33 | +import java.util.Set; | ||
32 | import java.util.stream.Collectors; | 34 | import java.util.stream.Collectors; |
33 | 35 | ||
34 | /** | 36 | /** |
@@ -222,10 +224,14 @@ public class OrderProfitAnalysisServiceImpl extends ServiceImpl<OrderProfitAnaly | @@ -222,10 +224,14 @@ public class OrderProfitAnalysisServiceImpl extends ServiceImpl<OrderProfitAnaly | ||
222 | } | 224 | } |
223 | List<OrderBaseInfoDO> orderBaseInfoDOS = orderBaseInfoService.listByIds(orderProfits.stream().map(OrderProfitAnalysisDO::getOrderId).collect(Collectors.toSet())); | 225 | List<OrderBaseInfoDO> orderBaseInfoDOS = orderBaseInfoService.listByIds(orderProfits.stream().map(OrderProfitAnalysisDO::getOrderId).collect(Collectors.toSet())); |
224 | int orderTotalNum = 0; | 226 | int orderTotalNum = 0; |
227 | + Set<String> innerNoSet = new HashSet<>(); | ||
225 | for (OrderBaseInfoDO orderBaseInfoDO : orderBaseInfoDOS) { | 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 | OrderProfitAnalysisVO profitAnalysisVO = new OrderProfitAnalysisVO(); | 236 | OrderProfitAnalysisVO profitAnalysisVO = new OrderProfitAnalysisVO(); |
231 | profitAnalysisVO.setPacketTotalPrice(packetTotalPrice.doubleValue()); | 237 | profitAnalysisVO.setPacketTotalPrice(packetTotalPrice.doubleValue()); |
@@ -238,7 +244,7 @@ public class OrderProfitAnalysisServiceImpl extends ServiceImpl<OrderProfitAnaly | @@ -238,7 +244,7 @@ public class OrderProfitAnalysisServiceImpl extends ServiceImpl<OrderProfitAnaly | ||
238 | .packetTotalPrice(packetTotalPrice.doubleValue()) | 244 | .packetTotalPrice(packetTotalPrice.doubleValue()) |
239 | .customerTotalPrice(customerTotalPrice.doubleValue()).build())); | 245 | .customerTotalPrice(customerTotalPrice.doubleValue()).build())); |
240 | profitAnalysisVO.setOrderTotalNum(orderTotalNum); | 246 | profitAnalysisVO.setOrderTotalNum(orderTotalNum); |
241 | - profitAnalysisVO.setRecordNum(orderProfits.size()); | 247 | + profitAnalysisVO.setRecordNum(innerNoSet.size()); |
242 | 248 | ||
243 | return ServerResult.success(profitAnalysisVO); | 249 | return ServerResult.success(profitAnalysisVO); |
244 | } | 250 | } |