Commit a51d1892e83fa97f4df023d26050842e8cf7185b
1 parent
d5a76411
feat:利润率计算/利润分析新增两列字段(客户单价/总价人民币)
Showing
6 changed files
with
39 additions
and
0 deletions
sql/dml_20231223.sql
0 → 100644
src/main/java/com/order/erp/domain/dto/order/OrderProfitAnalysisDO.java
@@ -38,6 +38,15 @@ public class OrderProfitAnalysisDO extends BaseDO implements Serializable { | @@ -38,6 +38,15 @@ public class OrderProfitAnalysisDO extends BaseDO implements Serializable { | ||
38 | private Double customerTotalPrice; | 38 | private Double customerTotalPrice; |
39 | 39 | ||
40 | /** | 40 | /** |
41 | + * 客户单价¥ | ||
42 | + */ | ||
43 | + private Double customerRmbPrice; | ||
44 | + /** | ||
45 | + * 客户总价¥ | ||
46 | + */ | ||
47 | + private Double customerRmbTotalPrice; | ||
48 | + | ||
49 | + /** | ||
41 | * 客户价格货币 | 50 | * 客户价格货币 |
42 | */ | 51 | */ |
43 | private String customerCurrency; | 52 | private String customerCurrency; |
src/main/java/com/order/erp/domain/vo/order/OrderProfitAnalysisFieldVO.java
@@ -22,6 +22,14 @@ public class OrderProfitAnalysisFieldVO implements Serializable { | @@ -22,6 +22,14 @@ public class OrderProfitAnalysisFieldVO implements Serializable { | ||
22 | */ | 22 | */ |
23 | private Long orderId; | 23 | private Long orderId; |
24 | /** | 24 | /** |
25 | + * 客户单价¥ | ||
26 | + */ | ||
27 | + private String customerRmbPrice; | ||
28 | + /** | ||
29 | + * 客户总价¥ | ||
30 | + */ | ||
31 | + private String customerRmbTotalPrice; | ||
32 | + /** | ||
25 | * 客户单价$ | 33 | * 客户单价$ |
26 | */ | 34 | */ |
27 | private String customerPrice; | 35 | private String customerPrice; |
src/main/java/com/order/erp/domain/vo/order/OrderProfitAnalysisVO.java
@@ -34,6 +34,16 @@ public class OrderProfitAnalysisVO implements Serializable { | @@ -34,6 +34,16 @@ public class OrderProfitAnalysisVO implements Serializable { | ||
34 | */ | 34 | */ |
35 | private Double customerTotalPrice; | 35 | private Double customerTotalPrice; |
36 | 36 | ||
37 | + | ||
38 | + /** | ||
39 | + * 客户单价¥ | ||
40 | + */ | ||
41 | + private Double customerRmbPrice; | ||
42 | + /** | ||
43 | + * 客户总价¥ | ||
44 | + */ | ||
45 | + private Double customerRmbTotalPrice; | ||
46 | + | ||
37 | /** | 47 | /** |
38 | * 客户价格货币 | 48 | * 客户价格货币 |
39 | */ | 49 | */ |
src/main/java/com/order/erp/service/order/impl/OrderBaseInfoServiceImpl.java
@@ -351,6 +351,14 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O | @@ -351,6 +351,14 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O | ||
351 | OrderLockFieldEnum.SELECTED.getStatus().equals(profitAnalysisFields.getCustomerTotalPrice())) { | 351 | OrderLockFieldEnum.SELECTED.getStatus().equals(profitAnalysisFields.getCustomerTotalPrice())) { |
352 | map.put("客户总价$", profitAnalysisVO.getCustomerTotalPrice()); | 352 | map.put("客户总价$", profitAnalysisVO.getCustomerTotalPrice()); |
353 | } | 353 | } |
354 | + if (StringUtils.isNotBlank(profitAnalysisFields.getCustomerRmbPrice()) && | ||
355 | + OrderLockFieldEnum.SELECTED.getStatus().equals(profitAnalysisFields.getCustomerRmbPrice())) { | ||
356 | + map.put("客户单价¥", profitAnalysisVO.getCustomerRmbPrice()); | ||
357 | + } | ||
358 | + if (StringUtils.isNotBlank(profitAnalysisFields.getCustomerRmbTotalPrice()) && | ||
359 | + OrderLockFieldEnum.SELECTED.getStatus().equals(profitAnalysisFields.getCustomerRmbTotalPrice())) { | ||
360 | + map.put("客户总价¥", profitAnalysisVO.getCustomerRmbTotalPrice()); | ||
361 | + } | ||
354 | if (StringUtils.isNotBlank(profitAnalysisFields.getProductionDepartmentPrice()) && | 362 | if (StringUtils.isNotBlank(profitAnalysisFields.getProductionDepartmentPrice()) && |
355 | OrderLockFieldEnum.SELECTED.getStatus().equals(profitAnalysisFields.getProductionDepartmentPrice())) { | 363 | OrderLockFieldEnum.SELECTED.getStatus().equals(profitAnalysisFields.getProductionDepartmentPrice())) { |
356 | map.put("生成科单价¥", profitAnalysisVO.getProductionDepartmentPrice()); | 364 | map.put("生成科单价¥", profitAnalysisVO.getProductionDepartmentPrice()); |
src/main/java/com/order/erp/service/order/impl/OrderFieldLockApplyServiceImpl.java
@@ -449,6 +449,8 @@ public class OrderFieldLockApplyServiceImpl extends ServiceImpl<OrderFieldLockAp | @@ -449,6 +449,8 @@ public class OrderFieldLockApplyServiceImpl extends ServiceImpl<OrderFieldLockAp | ||
449 | profitAnalysisService.save(profitAnalysisDO); | 449 | profitAnalysisService.save(profitAnalysisDO); |
450 | } else { | 450 | } else { |
451 | profitAnalysisDO.setOrderStatus(OrderStatusEnum.PROFIT_AUDIT_PASS.getStatus()); | 451 | profitAnalysisDO.setOrderStatus(OrderStatusEnum.PROFIT_AUDIT_PASS.getStatus()); |
452 | + profitAnalysisDO.setCustomerRmbPrice(Objects.nonNull(profitAnalysisFieldVO.getCustomerRmbPrice()) ? Double.valueOf(profitAnalysisFieldVO.getCustomerRmbPrice()) : null); | ||
453 | + profitAnalysisDO.setCustomerRmbTotalPrice(Objects.nonNull(profitAnalysisFieldVO.getCustomerRmbTotalPrice()) ? Double.valueOf(profitAnalysisFieldVO.getCustomerRmbTotalPrice()) : null); | ||
452 | profitAnalysisDO.setCustomerPrice(Objects.nonNull(profitAnalysisFieldVO.getCustomerPrice()) ? Double.valueOf(profitAnalysisFieldVO.getCustomerPrice()) : null); | 454 | profitAnalysisDO.setCustomerPrice(Objects.nonNull(profitAnalysisFieldVO.getCustomerPrice()) ? Double.valueOf(profitAnalysisFieldVO.getCustomerPrice()) : null); |
453 | profitAnalysisDO.setCustomerTotalPrice(Objects.nonNull(profitAnalysisFieldVO.getCustomerTotalPrice()) ? Double.valueOf(profitAnalysisFieldVO.getCustomerTotalPrice()) : null); | 455 | profitAnalysisDO.setCustomerTotalPrice(Objects.nonNull(profitAnalysisFieldVO.getCustomerTotalPrice()) ? Double.valueOf(profitAnalysisFieldVO.getCustomerTotalPrice()) : null); |
454 | profitAnalysisDO.setCustomerCurrency(StringUtils.isNotBlank(profitAnalysisFieldVO.getCustomerCurrency()) ? profitAnalysisFieldVO.getCustomerCurrency() : null); | 456 | profitAnalysisDO.setCustomerCurrency(StringUtils.isNotBlank(profitAnalysisFieldVO.getCustomerCurrency()) ? profitAnalysisFieldVO.getCustomerCurrency() : null); |