Commit 49fab111e18f015c4b12e8df7da11f9ef82dd9cf
1 parent
6b857fe4
feat:利润率计算/利润分析新增两列字段(客户单价/总价人民币)
Showing
2 changed files
with
7 additions
and
4 deletions
src/main/java/com/order/erp/service/order/impl/OrderBaseInfoServiceImpl.java
@@ -1064,10 +1064,11 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O | @@ -1064,10 +1064,11 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O | ||
1064 | List<OrderFieldLockRecordDO> fieldLockRecordDOList = fieldLockRecordService.list(new LambdaQueryWrapper<OrderFieldLockRecordDO>() | 1064 | List<OrderFieldLockRecordDO> fieldLockRecordDOList = fieldLockRecordService.list(new LambdaQueryWrapper<OrderFieldLockRecordDO>() |
1065 | .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | 1065 | .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) |
1066 | .eq(OrderFieldLockRecordDO::getUserId, dataScope.getLoginUserId()) | 1066 | .eq(OrderFieldLockRecordDO::getUserId, dataScope.getLoginUserId()) |
1067 | - .in(OrderFieldLockRecordDO::getOrderId, orderIds)); | 1067 | + .in(OrderFieldLockRecordDO::getOrderId, orderIds) |
1068 | + .orderByAsc(OrderFieldLockRecordDO::getId)); | ||
1068 | 1069 | ||
1069 | if (CollectionUtils.isNotEmpty(fieldLockRecordDOList)) { | 1070 | if (CollectionUtils.isNotEmpty(fieldLockRecordDOList)) { |
1070 | - Map<Long, OrderFieldLockRecordDO> recordDOMap = fieldLockRecordDOList.stream().collect(Collectors.toMap(OrderFieldLockRecordDO::getOrderId, Function.identity())); | 1071 | + Map<Long, OrderFieldLockRecordDO> recordDOMap = fieldLockRecordDOList.stream().collect(Collectors.toMap(OrderFieldLockRecordDO::getOrderId, Function.identity(), (v1, v2) -> v1)); |
1071 | orderInfoResultVOList.forEach(x -> { | 1072 | orderInfoResultVOList.forEach(x -> { |
1072 | OrderFieldLockRecordDO recordDO = recordDOMap.get(x.getId()); | 1073 | OrderFieldLockRecordDO recordDO = recordDOMap.get(x.getId()); |
1073 | if (Objects.nonNull(recordDO)) { | 1074 | if (Objects.nonNull(recordDO)) { |
@@ -1448,7 +1449,7 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O | @@ -1448,7 +1449,7 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O | ||
1448 | orderBaseInfoDo.setOrderStatus(ApplyStatusEnum.AUDIT_PASS.getStatus().equals(orderFieldLockApplyDO.getStatus()) ? OrderStatusEnum.PROFIT_AUDIT_PASS.getStatus() | 1449 | orderBaseInfoDo.setOrderStatus(ApplyStatusEnum.AUDIT_PASS.getStatus().equals(orderFieldLockApplyDO.getStatus()) ? OrderStatusEnum.PROFIT_AUDIT_PASS.getStatus() |
1449 | : OrderStatusEnum.PROFIT_WAIT_AUDIT.getStatus()); | 1450 | : OrderStatusEnum.PROFIT_WAIT_AUDIT.getStatus()); |
1450 | optLogDO = buildOrderOptLogDo(updateVO.getOrderId(), userId, OrderOptTypeEnum.ORDER_PROFIT_EDIT_APPLY.getDesc(), orderFieldLockApplyDO.getFields()); | 1451 | optLogDO = buildOrderOptLogDo(updateVO.getOrderId(), userId, OrderOptTypeEnum.ORDER_PROFIT_EDIT_APPLY.getDesc(), orderFieldLockApplyDO.getFields()); |
1451 | - fieldLockRecordService.save(lockProfitField(updateVO.getOrderId(), userId)); | 1452 | + //fieldLockRecordService.save(lockProfitField(updateVO.getOrderId(), userId)); |
1452 | } | 1453 | } |
1453 | 1454 | ||
1454 | if (Objects.nonNull(updateVO.getReportInfo())) { | 1455 | if (Objects.nonNull(updateVO.getReportInfo())) { |
@@ -1458,7 +1459,7 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O | @@ -1458,7 +1459,7 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O | ||
1458 | 1459 | ||
1459 | orderBaseInfoDo.setOrderStatus(OrderStatusEnum.REPORT_WAIT_AUDIT.getStatus()); | 1460 | orderBaseInfoDo.setOrderStatus(OrderStatusEnum.REPORT_WAIT_AUDIT.getStatus()); |
1460 | optLogDO = buildOrderOptLogDo(updateVO.getOrderId(), userId, OrderOptTypeEnum.ORDER_REPORT_EDIT_APPLY.getDesc(), orderFieldLockApplyDO.getFields()); | 1461 | optLogDO = buildOrderOptLogDo(updateVO.getOrderId(), userId, OrderOptTypeEnum.ORDER_REPORT_EDIT_APPLY.getDesc(), orderFieldLockApplyDO.getFields()); |
1461 | - fieldLockRecordService.save(lockReportField(updateVO.getOrderId(), userId)); | 1462 | + //fieldLockRecordService.save(lockReportField(updateVO.getOrderId(), userId)); |
1462 | } | 1463 | } |
1463 | 1464 | ||
1464 | if (Objects.nonNull(updateVO.getTrackStageInfo())) { | 1465 | if (Objects.nonNull(updateVO.getTrackStageInfo())) { |
src/main/java/com/order/erp/service/order/impl/OrderFieldLockApplyServiceImpl.java
@@ -502,6 +502,8 @@ public class OrderFieldLockApplyServiceImpl extends ServiceImpl<OrderFieldLockAp | @@ -502,6 +502,8 @@ public class OrderFieldLockApplyServiceImpl extends ServiceImpl<OrderFieldLockAp | ||
502 | return OrderProfitAnalysisDO.builder() | 502 | return OrderProfitAnalysisDO.builder() |
503 | .orderId(profitAnalysisFieldVO.getOrderId()) | 503 | .orderId(profitAnalysisFieldVO.getOrderId()) |
504 | .profitType(StringUtils.isBlank(profitAnalysisFieldVO.getProfitType()) ? Constant.ZERO : Integer.parseInt(profitAnalysisFieldVO.getProfitType())) | 504 | .profitType(StringUtils.isBlank(profitAnalysisFieldVO.getProfitType()) ? Constant.ZERO : Integer.parseInt(profitAnalysisFieldVO.getProfitType())) |
505 | + .customerRmbPrice(Objects.nonNull(profitAnalysisFieldVO.getCustomerRmbPrice()) ? Double.valueOf(profitAnalysisFieldVO.getCustomerRmbPrice()) : null) | ||
506 | + .customerRmbTotalPrice(Objects.nonNull(profitAnalysisFieldVO.getCustomerRmbTotalPrice()) ? Double.valueOf(profitAnalysisFieldVO.getCustomerRmbTotalPrice()) : null) | ||
505 | .customerPrice(Objects.nonNull(profitAnalysisFieldVO.getCustomerPrice()) ? Double.valueOf(profitAnalysisFieldVO.getCustomerPrice()) : null) | 507 | .customerPrice(Objects.nonNull(profitAnalysisFieldVO.getCustomerPrice()) ? Double.valueOf(profitAnalysisFieldVO.getCustomerPrice()) : null) |
506 | .customerTotalPrice(Objects.nonNull(profitAnalysisFieldVO.getCustomerTotalPrice()) ? Double.valueOf(profitAnalysisFieldVO.getCustomerTotalPrice()) : null) | 508 | .customerTotalPrice(Objects.nonNull(profitAnalysisFieldVO.getCustomerTotalPrice()) ? Double.valueOf(profitAnalysisFieldVO.getCustomerTotalPrice()) : null) |
507 | .customerCurrency(StringUtils.isNotBlank(profitAnalysisFieldVO.getCustomerCurrency()) ? profitAnalysisFieldVO.getCustomerCurrency() : null) | 509 | .customerCurrency(StringUtils.isNotBlank(profitAnalysisFieldVO.getCustomerCurrency()) ? profitAnalysisFieldVO.getCustomerCurrency() : null) |