Przeglądaj źródła

Merge branch 'bgy' of kn-cost/cost-backend into dev

bgy 1 rok temu
rodzic
commit
2b8a7364ce
100 zmienionych plików z 3370 dodań i 2436 usunięć
  1. 56
    12
      pom.xml
  2. 49
    2
      qomo-kn-cost-manage-start/pom.xml
  3. 6
    4
      qomo-kn-cost-manage-start/src/main/java/com/zzsmart/qomo/kn/cost/manage/QomoCostManageApplication.java
  4. 31
    39
      qomo-kn-cost-manage-start/src/main/resources/application-dev.yml
  5. 38
    20
      qomo-kn-cost-manage/pom.xml
  6. 165
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostCountController.java
  7. 115
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostModelController.java
  8. 179
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostResultValueController.java
  9. 2
    2
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/BomTreeController.java
  10. 0
    180
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/BudgetPriceController.java
  11. 0
    182
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/C7525costController.java
  12. 0
    178
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/CostCenterController.java
  13. 54
    4
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/CostMaterialBomController.java
  14. 20
    20
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/CostPartMissingInfoController.java
  15. 0
    237
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/CostStandardController.java
  16. 26
    16
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/CostStandardDetailController.java
  17. 33
    40
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/CostStandardVersionController.java
  18. 1
    1
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/HourRateController.java
  19. 0
    180
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/LatestPurchasePriceController.java
  20. 0
    181
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/ProduceBatchController.java
  21. 0
    178
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/SapSubfactoryController.java
  22. 85
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostCount.java
  23. 75
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostModel.java
  24. 118
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostResultValue.java
  25. 0
    78
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/BudgetPrice.java
  26. 0
    54
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/C7525cost.java
  27. 0
    55
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostCenter.java
  28. 6
    48
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostMaterialBom.java
  29. 1
    1
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostMaterialProcessHours.java
  30. 135
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostModel.java
  31. 2
    2
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostPartMissingInfo.java
  32. 1
    1
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostPurchasePrice.java
  33. 0
    132
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostStandard.java
  34. 33
    9
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostStandardDetail.java
  35. 54
    31
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostStandardVersion.java
  36. 1
    1
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/HourRate.java
  37. 0
    107
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/LatestPurchasePrice.java
  38. 0
    65
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/ProduceBatch.java
  39. 0
    47
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/SapSubfactory.java
  40. 61
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/FeeTypeEnum.java
  41. 11
    16
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/StandardStageEnum.java
  42. 14
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostCountMapper.java
  43. 15
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostModelMapper.java
  44. 15
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostResultValueMapper.java
  45. 0
    14
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/BudgetPriceMapper.java
  46. 0
    18
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/C7525costMapper.java
  47. 0
    17
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/CostCenterMapper.java
  48. 22
    3
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/CostMaterialBomMapper.java
  49. 0
    24
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/CostStandardMapper.java
  50. 0
    18
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/LatestPurchasePriceMapper.java
  51. 0
    18
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/ProduceBatchMapper.java
  52. 0
    17
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/SapSubfactoryMapper.java
  53. 1
    1
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostCountMapper.xml
  54. 1
    1
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostModelMapper.xml
  55. 1
    1
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostResultValueMapper.xml
  56. 0
    5
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/BudgetPriceMapper.xml
  57. 0
    5
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/C7525costMapper.xml
  58. 4
    4
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/CostStandardDetailMapper.xml
  59. 0
    42
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/CostStandardMapper.xml
  60. 0
    5
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/SapSubfactoryMapper.xml
  61. 534
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/StandardCostService.java
  62. 52
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/laborcost/LaborCostParameters.java
  63. 72
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/laborcost/LaborCostTask.java
  64. 52
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/laborcost/LaborCostTaskChannel.java
  65. 44
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/laborcost/LaborCostTaskChannelFactory.java
  66. 51
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/manufacturingcost/ManufacturingCostParameters.java
  67. 72
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/manufacturingcost/ManufacturingCostTask.java
  68. 52
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/manufacturingcost/ManufacturingCostTaskChannel.java
  69. 44
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/manufacturingcost/ManufacturingCostTaskChannelFactory.java
  70. 51
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialcost/MaterialCostParameters.java
  71. 72
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialcost/MaterialCostTask.java
  72. 52
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialcost/MaterialCostTaskChannel.java
  73. 44
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialcost/MaterialCostTaskChannelFactory.java
  74. 51
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialinput/MaterialInputParameters.java
  75. 72
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialinput/MaterialInputTask.java
  76. 52
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialinput/MaterialInputTaskChannel.java
  77. 44
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialinput/MaterialInputTaskChannelFactory.java
  78. 51
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/standardcost/StandardCostParameters.java
  79. 77
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/standardcost/StandardCostTask.java
  80. 52
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/standardcost/StandardCostTaskChannel.java
  81. 44
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/standardcost/StandardCostTaskChannelFactory.java
  82. 16
    2
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/CostMaterialBomService.java
  83. 7
    1
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/CostMaterialProcessHoursService.java
  84. 9
    1
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/CostPurchasePriceService.java
  85. 17
    3
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/CostStandardDetailService.java
  86. 32
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostCountService.java
  87. 24
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostModelService.java
  88. 21
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostResultValueService.java
  89. 0
    14
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IBudgetPriceService.java
  90. 0
    15
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IC7525costService.java
  91. 0
    14
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/ICostCenterService.java
  92. 0
    26
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/ICostStandardService.java
  93. 8
    1
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/ICostStandardVersionService.java
  94. 0
    15
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/ILatestPurchasePriceService.java
  95. 0
    14
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IProduceBatchService.java
  96. 0
    14
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/ISapSubfactoryService.java
  97. 88
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/AppSceneCostCountServiceImpl.java
  98. 34
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/AppSceneCostModelServiceImpl.java
  99. 48
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/AppSceneCostResultValueServiceImpl.java
  100. 0
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/BomTreeServiceImpl.java

+ 56
- 12
pom.xml Wyświetl plik

@@ -1,12 +1,17 @@
1
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0"
3
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3 5
     <modelVersion>4.0.0</modelVersion>
4 6
     <groupId>com.zzsmart.qomo</groupId>
5 7
     <artifactId>qomo-kn-forecast</artifactId>
6 8
     <version>${revision}</version>
7 9
     <packaging>pom</packaging>
8
-    <name>QOMO FORECAST</name>
9
-
10
+    <name>QOMO Cost Manage</name>
11
+    <modules>
12
+        <module>qomo-kn-cost-manage-start</module>
13
+        <module>qomo-kn-cost-manage</module>
14
+    </modules>
10 15
     <developers>
11 16
         <developer>
12 17
             <name>武汉中制智造</name>
@@ -24,13 +29,8 @@
24 29
     <properties>
25 30
         <revision>2.0.0-SNAPSHOT</revision>
26 31
         <adp.version>2.0.0-SNAPSHOT</adp.version>
32
+        <dmp.version>2.0.0-SNAPSHOT</dmp.version>
27 33
     </properties>
28
-
29
-    <modules>
30
-        <module>qomo-kn-cost-manage-start</module>
31
-        <module>qomo-kn-cost-manage</module>
32
-    </modules>
33
-
34 34
     <repositories>
35 35
         <repository>
36 36
             <id>zzzz</id>
@@ -98,9 +98,53 @@
98 98
                 <artifactId>qomo-kn-cost-manage</artifactId>
99 99
                 <version>${revision}</version>
100 100
             </dependency>
101
+            <dependency>
102
+                <groupId>com.zzsmart.qomo</groupId>
103
+                <artifactId>qomo-data-model</artifactId>
104
+                <version>${dmp.version}</version>
105
+            </dependency>
106
+
107
+            <dependency>
108
+                <groupId>com.zzsmart.qomo</groupId>
109
+                <artifactId>qomo-assets-management</artifactId>
110
+                <version>${dmp.version}</version>
111
+            </dependency>
112
+
113
+            <dependency>
114
+                <groupId>com.zzsmart.qomo</groupId>
115
+                <artifactId>qomo-data-integration</artifactId>
116
+                <version>${dmp.version}</version>
117
+            </dependency>
118
+
119
+            <dependency>
120
+                <groupId>com.zzsmart.qomo</groupId>
121
+                <artifactId>qomo-data-metadata</artifactId>
122
+                <version>${dmp.version}</version>
123
+            </dependency>
124
+
125
+            <dependency>
126
+                <groupId>com.zzsmart.qomo</groupId>
127
+                <artifactId>qomo-work-flow</artifactId>
128
+                <version>${dmp.version}</version>
129
+            </dependency>
130
+
131
+            <dependency>
132
+                <groupId>com.zzsmart.qomo</groupId>
133
+                <artifactId>qomo-data-warehouse</artifactId>
134
+                <version>${dmp.version}</version>
135
+            </dependency>
136
+            <dependency>
137
+                <groupId>com.zzsmart.qomo</groupId>
138
+                <artifactId>qomo-data-selfReport</artifactId>
139
+                <version>${dmp.version}</version>
140
+            </dependency>
141
+<!--            <dependency>-->
142
+<!--                <groupId>commons-io</groupId>-->
143
+<!--                <artifactId>commons-io</artifactId>-->
144
+<!--                <version>2.11.0</version>-->
145
+<!--            </dependency>-->
101 146
         </dependencies>
102 147
     </dependencyManagement>
103
-
104 148
     <!-- 环境 -->
105 149
     <profiles>
106 150
         <!-- 开发 -->
@@ -175,4 +219,4 @@
175 219
         </profile>
176 220
         <!-- SpringCloud运行环境 -->
177 221
     </profiles>
178
-</project>
222
+</project>

+ 49
- 2
qomo-kn-cost-manage-start/pom.xml Wyświetl plik

@@ -2,13 +2,12 @@
2 2
 <project xmlns="http://maven.apache.org/POM/4.0.0"
3 3
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 4
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
+    <modelVersion>4.0.0</modelVersion>
5 6
     <parent>
6 7
         <groupId>com.zzsmart.qomo</groupId>
7 8
         <artifactId>qomo-kn-forecast</artifactId>
8 9
         <version>${revision}</version>
9 10
     </parent>
10
-    <modelVersion>4.0.0</modelVersion>
11
-
12 11
     <artifactId>qomo-kn-cost-manage-start</artifactId>
13 12
 
14 13
     <properties>
@@ -52,4 +51,52 @@
52 51
             </plugin>
53 52
         </plugins>
54 53
     </build>
54
+    <profiles>
55
+        <profile>
56
+            <id>dmp</id>
57
+            <activation>
58
+                <!--默认激活配置-->
59
+                <activeByDefault>true</activeByDefault>
60
+            </activation>
61
+            <properties>
62
+                <profile.name>dmp</profile.name>
63
+            </properties>
64
+            <dependencies>
65
+                <dependency>
66
+                    <groupId>com.zzsmart.qomo</groupId>
67
+                    <artifactId>qomo-data-model</artifactId>
68
+                </dependency>
69
+
70
+                <dependency>
71
+                    <groupId>com.zzsmart.qomo</groupId>
72
+                    <artifactId>qomo-assets-management</artifactId>
73
+                </dependency>
74
+
75
+                <dependency>
76
+                    <groupId>com.zzsmart.qomo</groupId>
77
+                    <artifactId>qomo-data-integration</artifactId>
78
+                </dependency>
79
+
80
+                <dependency>
81
+                    <groupId>com.zzsmart.qomo</groupId>
82
+                    <artifactId>qomo-data-metadata</artifactId>
83
+                </dependency>
84
+
85
+                <dependency>
86
+                    <groupId>com.zzsmart.qomo</groupId>
87
+                    <artifactId>qomo-work-flow</artifactId>
88
+                </dependency>
89
+
90
+                <dependency>
91
+                    <groupId>com.zzsmart.qomo</groupId>
92
+                    <artifactId>qomo-data-warehouse</artifactId>
93
+                </dependency>
94
+                <dependency>
95
+                    <groupId>com.zzsmart.qomo</groupId>
96
+                    <artifactId>qomo-data-selfReport</artifactId>
97
+                </dependency>
98
+            </dependencies>
99
+        </profile>
100
+    </profiles>
101
+
55 102
 </project>

+ 6
- 4
qomo-kn-cost-manage-start/src/main/java/com/zzsmart/qomo/kn/cost/manage/QomoCostManageApplication.java Wyświetl plik

@@ -2,6 +2,7 @@ package com.zzsmart.qomo.kn.cost.manage;
2 2
 
3 3
 import lombok.extern.slf4j.Slf4j;
4 4
 import org.jeecg.common.util.oConvertUtils;
5
+import org.mybatis.spring.annotation.MapperScan;
5 6
 import org.springframework.boot.SpringApplication;
6 7
 import org.springframework.boot.autoconfigure.SpringBootApplication;
7 8
 import org.springframework.boot.builder.SpringApplicationBuilder;
@@ -14,11 +15,12 @@ import java.net.InetAddress;
14 15
 import java.net.UnknownHostException;
15 16
 
16 17
 /**
17
-* 单体启动类
18
-* 报错提醒: 未集成mongo报错,可以打开启动类上面的注释 exclude={MongoAutoConfiguration.class}
19
-*/
18
+ * 单体启动类
19
+ * 报错提醒: 未集成mongo报错,可以打开启动类上面的注释 exclude={MongoAutoConfiguration.class}
20
+ */
20 21
 @Slf4j
21
-@SpringBootApplication (scanBasePackages ={"org.jeecg", "com.zzsmart.qomo"})
22
+@SpringBootApplication(scanBasePackages = {"org.jeecg", "com.zzsmart.qomo"})
23
+//@MapperScan({"com.zzsmart.qomo.kn.cost.manage.mapper"})
22 24
 //@EnableAutoConfiguration(exclude={MongoAutoConfiguration.class})
23 25
 @EnableAsync
24 26
 public class QomoCostManageApplication extends SpringBootServletInitializer {

+ 31
- 39
qomo-kn-cost-manage-start/src/main/resources/application-dev.yml Wyświetl plik

@@ -3,19 +3,19 @@ v2:
3 3
   xnljmap:
4 4
     #win服务器  本地 注意!! 记住这个结尾有一个/
5 5
     oss: file:/data/qomo-boot/oss/
6
-#    oss: file:D:/upload/
6
+    #    oss: file:D:/upload/
7 7
     #linux服务器
8 8
     #oss: file:/home/webapps/oss/
9 9
   #虚拟路径映射路径 end
10 10
   #本地存放地址 注意!! 记住这个结尾没有/
11 11
   fileurl: /data/qomo-boot/oss
12
-#  fileurl: D:/upload
12
+  #  fileurl: D:/upload
13 13
   #http://127.0.0.1:8080/oss/{yy}/2022-12-22/c83a77ae134a540c30daa6a0666fa945.md
14 14
   httpurl: /qomo/
15 15
   defaultFormat: .png
16 16
 
17 17
 server:
18
-  port: 8095
18
+  port: 8082
19 19
   tomcat:
20 20
     max-swallow-size: -1
21 21
   error:
@@ -154,8 +154,7 @@ spring:
154 154
     prefer-file-system-access: false
155 155
     # 设置ftl文件路径
156 156
     template-loader-path:
157
-      - classpath:/template
158
-#      - d:/data
157
+      - classpath:/templates
159 158
     template_update_delay: 0
160 159
   # 设置静态文件路径,js,css等
161 160
   mvc:
@@ -207,13 +206,10 @@ spring:
207 206
         connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
208 207
       datasource:
209 208
         master:
210
-          url: jdbc:mysql://121.40.189.20:3306/knne?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai
211
-          username: root
212
-          password: YMzc157#
209
+          url: jdbc:mysql://192.168.50.9:2212/selef_report?useUnicode=true&allowMultiQueries=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&serverTimezone=Asia/Shanghai&useSSL=false
210
+          username: zzzz
211
+          password: knphm2021
213 212
           driver-class-name: com.mysql.cj.jdbc.Driver
214
-#          url: jdbc:mysql://192.168.50.9:2212/selef_report?useUnicode=true&allowMultiQueries=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&serverTimezone=Asia/Shanghai&useSSL=false
215
-#          username: root
216
-#          password: root
217 213
           # 多数据源配置
218 214
           #multi-datasource1:
219 215
           #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
@@ -222,12 +218,13 @@ spring:
222 218
           #driver-class-name: com.mysql.cj.jdbc.Driver
223 219
   #redis 配置
224 220
   redis:
225
-    database: 5
226
-#    host: 192.168.50.9
227
-#    port: 7379
228
-#    password: 'zzboard'
229
-    host: 121.40.189.20
230
-    port: 6389
221
+#    database: 5
222
+#      host: 121.40.189.20
223
+#      port: 6389
224
+    database: 9
225
+    host: 192.168.50.9
226
+    port: 7379
227
+    password: 'zzboard'
231 228
     main:
232 229
       allow-circular-references: true
233 230
 
@@ -235,7 +232,7 @@ spring:
235 232
   rabbitmq:
236 233
     host: 192.168.50.9
237 234
     port: 5672
238
-    virtual-host: /qomoflow-dev
235
+    virtual-host: /qomoflow-standardcost
239 236
     username: admin
240 237
     password: kncloud
241 238
     connection-timeout: 5000
@@ -260,7 +257,7 @@ mybatis-plus:
260 257
   configuration:
261 258
     # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
262 259
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
263
-#    log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
260
+    #    log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
264 261
     # 返回类型为Map,显示null对应的字段
265 262
     call-setters-on-nulls: true
266 263
 #jeecg专用配置
@@ -285,7 +282,8 @@ jeecg:
285 282
     #webapp文件路径
286 283
     webapp: /opt/webapp
287 284
   shiro:
288
-#    excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/api/getUserInfo,/sys/sysDepart/**,/taskSocket/**,/flowSocket/**
285
+#    excludeUrls: /api/**,/api/internalService/**,/test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/api/getUserInfo,/sys/sysDepart/**,/taskSocket/**,/flowSocket/**,/dataCheck/**
286
+#    excludeUrls: /api/internalService/**,/test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/api/getUserInfo,/sys/sysDepart/**,/taskSocket/**,/flowSocket/**,/dataCheck/**
289 287
     excludeUrls: /**/**,/**/**/**
290 288
 
291 289
   #阿里云oss存储和大鱼短信秘钥配置
@@ -294,11 +292,6 @@ jeecg:
294 292
     secretKey: ??
295 293
     endpoint: oss-cn-beijing.aliyuncs.com
296 294
     bucketName: jeecgdev
297
-  minio:
298
-    minio_url: http://192.168.50.102:9000
299
-    minio_name: admin
300
-    minio_pass: minioadmin
301
-    bucketName: bucket803
302 295
   # ElasticSearch 6设置
303 296
   elasticsearch:
304 297
     cluster-name: elasticsearch-cluster
@@ -308,14 +301,15 @@ jeecg:
308 301
     task-data-struct-index: task_data_struct_dev/_doc
309 302
     task-data-temp-index: task_data_temp_dev/_doc
310 303
     task-log-index: task_log_dev/_doc
304
+    task-record-index: clean_data_record/_doc
311 305
   # 在线预览文件服务器地址配置
312 306
   file-view-domain: http://fileview.jeecg.com
313 307
   # minio文件上传
314
-#  minio:
315
-#    minio_url: http://minio.jeecg.com
316
-#    minio_name: ??
317
-#    minio_pass: ??
318
-#    bucketName: otatest
308
+  minio:
309
+    minio_url: http://minio.jeecg.com
310
+    minio_name: ??
311
+    minio_pass: ??
312
+    bucketName: otatest
319 313
   #大屏报表参数设置
320 314
   jmreport:
321 315
     mode: dev
@@ -438,19 +432,17 @@ flowable:
438 432
 Qomo:
439 433
   version: @project.version@
440 434
 
441
-modelPath: /opt/services/deploy-jars/algo/model
435
+modelPath: /opt/deploy/qomo/backend/algo/model
442 436
 seaTunnelHome: /opt/service/apache-seatunnel-2.3.4
443 437
 hiveMetastoreUri: thrift://192.168.50.102:9083
438
+hiveSitePath: /opt/service/apache-seatunnel-2.3.4/deploy/hive-site.xml
439
+hdfsSitePath: /opt/service/apache-seatunnel-2.3.4/deploy/hdfs-site.xml
444 440
 
445 441
 minio:
446
-  server: http://192.168.50.102
447
-  port: 9000
442
+  server: http://192.168.50.9
443
+  port: 9100
448 444
   access-key: admin
449
-  secret-key: minioadmin
450
-  bucketName: bucket1
445
+  secret-key: qm123456
451 446
 
452 447
 condaEnv: py310
453
-
454
-analysis:
455
-  consistency:
456
-    url: http://192.168.50.9:1314/analysis
448
+tikaServerUrl: http://192.168.50.99:8099/qomo-tika/

+ 38
- 20
qomo-kn-cost-manage/pom.xml Wyświetl plik

@@ -2,42 +2,60 @@
2 2
 <project xmlns="http://maven.apache.org/POM/4.0.0"
3 3
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 4
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
+    <modelVersion>4.0.0</modelVersion>
5 6
     <parent>
6 7
         <groupId>com.zzsmart.qomo</groupId>
7 8
         <artifactId>qomo-kn-forecast</artifactId>
8 9
         <version>${revision}</version>
9 10
     </parent>
10
-    <modelVersion>4.0.0</modelVersion>
11
-
12 11
     <artifactId>qomo-kn-cost-manage</artifactId>
13
-
14
-    <properties>
15
-        <maven.compiler.source>8</maven.compiler.source>
16
-        <maven.compiler.target>8</maven.compiler.target>
17
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18
-    </properties>
19
-
20 12
     <dependencies>
21 13
         <dependency>
22 14
             <groupId>org.qomo.boot</groupId>
23 15
             <artifactId>qomo-system-biz</artifactId>
24
-            <version>2.0.1-SNAPSHOT</version>
16
+            <version>${revision}</version>
25 17
         </dependency>
26 18
         <dependency>
27
-            <groupId>org.springframework.boot</groupId>
28
-            <artifactId>spring-boot-test</artifactId>
29
-            <scope>test</scope>
19
+            <groupId>org.projectlombok</groupId>
20
+            <artifactId>lombok</artifactId>
21
+            <scope>provided</scope>
30 22
         </dependency>
31 23
         <dependency>
32
-            <groupId>junit</groupId>
33
-            <artifactId>junit</artifactId>
34
-            <scope>test</scope>
24
+            <groupId>com.google.auto.service</groupId>
25
+            <artifactId>auto-service</artifactId>
26
+            <scope>provided</scope>
35 27
         </dependency>
36 28
         <dependency>
37
-            <groupId>com.baomidou</groupId>
38
-            <artifactId>mybatis-plus-generator</artifactId>
39
-            <version>3.5.1</version>
29
+            <groupId>com.zzsmart.qomo</groupId>
30
+            <artifactId>qomo-data-integration</artifactId>
31
+        </dependency>
32
+        <dependency>
33
+            <groupId>org.projectlombok</groupId>
34
+            <artifactId>lombok</artifactId>
35
+            <version>RELEASE</version>
36
+            <scope>compile</scope>
37
+        </dependency>
38
+        <dependency>
39
+            <groupId>org.apache.poi</groupId>
40
+            <artifactId>poi</artifactId>
41
+            <version>5.2.3</version>
42
+        </dependency>
43
+        <dependency>
44
+            <groupId>org.apache.poi</groupId>
45
+            <artifactId>poi-ooxml</artifactId>
46
+            <version>5.2.3</version>
47
+        </dependency>
48
+        <!--自己添加的依赖-->
49
+<!--        <dependency>-->
50
+<!--            <groupId>commons-io</groupId>-->
51
+<!--            <artifactId>commons-io</artifactId>-->
52
+<!--            <version>2.11.0</version>-->
53
+<!--        </dependency>-->
54
+        <dependency>
55
+            <groupId>com.alibaba</groupId>
56
+            <artifactId>easyexcel</artifactId>
57
+            <version>4.0.1</version> <!-- 请检查并使用最新稳定版本 -->
40 58
         </dependency>
41
-    </dependencies>
42 59
 
60
+    </dependencies>
43 61
 </project>

+ 165
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostCountController.java Wyświetl plik

@@ -0,0 +1,165 @@
1
+package com.zzsmart.qomo.kn.cost.manage.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostCount;
7
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostCountService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiOperation;
10
+import lombok.extern.slf4j.Slf4j;
11
+import org.apache.shiro.authz.annotation.RequiresPermissions;
12
+import org.jeecg.common.api.vo.Result;
13
+import org.jeecg.common.aspect.annotation.AutoLog;
14
+import org.jeecg.common.system.base.controller.JeecgController;
15
+import org.jeecg.common.system.query.QueryGenerator;
16
+import org.springframework.beans.factory.annotation.Autowired;
17
+import org.springframework.web.bind.annotation.*;
18
+import org.springframework.web.servlet.ModelAndView;
19
+
20
+import javax.servlet.http.HttpServletRequest;
21
+import javax.servlet.http.HttpServletResponse;
22
+import java.util.Arrays;
23
+
24
+/**
25
+ * @Description: app_scene_cost_count
26
+ * @Author: jeecg-boot
27
+ * @Date: 2024-07-29
28
+ * @Version: V1.0
29
+ */
30
+@Api(tags = "cost-标准成本计算")
31
+@RestController
32
+@RequestMapping("//costCount")
33
+@Slf4j
34
+public class AppSceneCostCountController extends JeecgController<AppSceneCostCount, IAppSceneCostCountService> {
35
+    @Autowired
36
+    private IAppSceneCostCountService appSceneCostCountService;
37
+
38
+    /**
39
+     * 分页列表查询
40
+     *
41
+     * @param appSceneCostCount
42
+     * @param pageNo
43
+     * @param pageSize
44
+     * @param req
45
+     * @return
46
+     */
47
+    //@AutoLog(value = "app_scene_cost_count-分页列表查询")
48
+    @ApiOperation(value = "标准成本计算-分页列表查询", notes = "标准成本计算-分页列表查询")
49
+    @GetMapping(value = "/list")
50
+    public Result<IPage<AppSceneCostCount>> queryPageList(AppSceneCostCount appSceneCostCount,
51
+                                                          @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
52
+                                                          @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
53
+                                                          HttpServletRequest req) {
54
+        QueryWrapper<AppSceneCostCount> queryWrapper = QueryGenerator.initQueryWrapper(appSceneCostCount, req.getParameterMap());
55
+        Page<AppSceneCostCount> page = new Page<AppSceneCostCount>(pageNo, pageSize);
56
+        IPage<AppSceneCostCount> pageList = appSceneCostCountService.page(page, queryWrapper);
57
+        return Result.OK(pageList);
58
+    }
59
+
60
+    /**
61
+     * 添加标准成本计算任务
62
+     *
63
+     * @param appSceneCostCount
64
+     * @return
65
+     */
66
+    @AutoLog(value = "app_scene_cost_count-添加")
67
+    @ApiOperation(value = "添加标准成本计算任务", notes = "添加标准成本计算任务")
68
+    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_count:addCostCountTask")
69
+    @PostMapping(value = "/addCostCountTask")
70
+    public Result<String> addCostCountTask(@RequestBody AppSceneCostCount appSceneCostCount) {
71
+        appSceneCostCountService.addCostCountTask(appSceneCostCount);
72
+        return Result.OK("添加成功!");
73
+    }
74
+
75
+
76
+    /**
77
+     * 通过id删除
78
+     *
79
+     * @param id
80
+     * @return
81
+     */
82
+    @AutoLog(value = "app_scene_cost_count-通过id删除")
83
+    @ApiOperation(value = "标准成本计算-通过id删除", notes = "标准成本计算-通过id删除")
84
+    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_count:delete")
85
+    @DeleteMapping(value = "/delete")
86
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
87
+        appSceneCostCountService.removeById(id);
88
+        return Result.OK("删除成功!");
89
+    }
90
+
91
+    /**
92
+     * 批量删除
93
+     *
94
+     * @param ids
95
+     * @return
96
+     */
97
+    @AutoLog(value = "app_scene_cost_count-批量删除")
98
+    @ApiOperation(value = "app_scene_cost_count-批量删除", notes = "app_scene_cost_count-批量删除")
99
+    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_count:deleteBatch")
100
+    @DeleteMapping(value = "/deleteBatch")
101
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
102
+        this.appSceneCostCountService.removeByIds(Arrays.asList(ids.split(",")));
103
+        return Result.OK("批量删除成功!");
104
+    }
105
+
106
+    /**
107
+     * 重新计算
108
+     *
109
+     * @param id
110
+     * @return
111
+     */
112
+    //@AutoLog(value = "app_scene_cost_count-通过id查询")
113
+    @ApiOperation(value = "标准成本计算-重新计算", notes = "标准成本计算-重新计算")
114
+    @GetMapping(value = "/recountById")
115
+    public Result<AppSceneCostCount> recountById(@RequestParam(name = "id", required = true) Integer id) {
116
+        AppSceneCostCount appSceneCostCount = appSceneCostCountService.recountById(id);
117
+        if (appSceneCostCount == null) {
118
+            return Result.error("未找到对应数据");
119
+        }
120
+        return Result.OK(appSceneCostCount);
121
+    }
122
+
123
+    /**
124
+     * 查看关键缺失部件
125
+     *
126
+     * @param id
127
+     * @return
128
+     */
129
+    //@AutoLog(value = "app_scene_cost_count-通过id查询")
130
+    @ApiOperation(value = "标准成本计算-查看关键缺失部件", notes = "标准成本计算-查看关键缺失部件")
131
+    @GetMapping(value = "/queryMissingComponentById")
132
+    public Result<AppSceneCostCount> queryMissingComponentById(@RequestParam(name = "id", required = true) String id) {
133
+        AppSceneCostCount appSceneCostCount = appSceneCostCountService.queryMissingComponentById(id);
134
+        if (appSceneCostCount == null) {
135
+            return Result.error("未找到对应数据");
136
+        }
137
+        return Result.OK(appSceneCostCount);
138
+    }
139
+
140
+    /**
141
+     * 导出excel
142
+     *
143
+     * @param request
144
+     * @param appSceneCostCount
145
+     */
146
+    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_count:exportXls")
147
+    @RequestMapping(value = "/exportXls")
148
+    public ModelAndView exportXls(HttpServletRequest request, AppSceneCostCount appSceneCostCount) {
149
+        return super.exportXls(request, appSceneCostCount, AppSceneCostCount.class, "app_scene_cost_count");
150
+    }
151
+
152
+    /**
153
+     * 通过excel导入数据
154
+     *
155
+     * @param request
156
+     * @param response
157
+     * @return
158
+     */
159
+    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_count:importExcel")
160
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
161
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
162
+        return super.importExcel(request, response, AppSceneCostCount.class);
163
+    }
164
+
165
+}

+ 115
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostModelController.java Wyświetl plik

@@ -0,0 +1,115 @@
1
+package com.zzsmart.qomo.kn.cost.manage.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5
+import com.baomidou.mybatisplus.core.metadata.IPage;
6
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7
+import com.zzsmart.qomo.dao.entity.FlowDefinition;
8
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostModel;
9
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostModelService;
10
+import com.zzsmart.qomo.service.IDataFlowDefinitionService;
11
+import io.swagger.annotations.Api;
12
+import io.swagger.annotations.ApiOperation;
13
+import lombok.extern.slf4j.Slf4j;
14
+import org.apache.shiro.authz.annotation.RequiresPermissions;
15
+import org.jeecg.common.api.vo.Result;
16
+import org.jeecg.common.aspect.annotation.AutoLog;
17
+import org.jeecg.common.system.base.controller.JeecgController;
18
+import org.jeecg.common.system.query.QueryGenerator;
19
+import org.springframework.beans.factory.annotation.Autowired;
20
+import org.springframework.web.bind.annotation.*;
21
+
22
+import javax.servlet.http.HttpServletRequest;
23
+import java.util.List;
24
+
25
+/**
26
+ * @Description: app_scene_cost_model
27
+ * @Author: jeecg-boot
28
+ * @Date: 2024-07-29
29
+ * @Version: V1.0
30
+ */
31
+@Api(tags = "cost-标准成本-模型管理")
32
+@RestController
33
+@RequestMapping("//cost-model")
34
+@Slf4j
35
+public class AppSceneCostModelController  {
36
+    @Autowired
37
+    private IAppSceneCostModelService appSceneCostModelService;
38
+    @Autowired
39
+    private IDataFlowDefinitionService flowDefinitionService;
40
+
41
+    /**
42
+     * 标准成本模型分页列表查询
43
+     *
44
+     * @param flowDefinition
45
+     * @param pageNo
46
+     * @param pageSize
47
+     * @param req
48
+     * @return
49
+     */
50
+    //@AutoLog(value = "app_scene_cost_model-分页列表查询")
51
+    @ApiOperation(value = "标准成本模型分页列表查询", notes = "标准成本模型分页列表查询")
52
+    @GetMapping(value = "/pageList")
53
+    public Result<IPage<FlowDefinition>> queryPageList(FlowDefinition flowDefinition, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
54
+        QueryWrapper<FlowDefinition> queryWrapper = QueryGenerator.initQueryWrapper(flowDefinition, req.getParameterMap());
55
+        Page<FlowDefinition> page = new Page((long) pageNo, (long) pageSize);
56
+        LambdaQueryWrapper<FlowDefinition> wrapper = queryWrapper.lambda();
57
+        wrapper.orderByDesc(FlowDefinition::getCreateTime);
58
+        IPage<FlowDefinition> pageList = flowDefinitionService.queryPageList(page, wrapper);
59
+        return Result.OK(pageList);
60
+    }
61
+
62
+    @ApiOperation(value = "标准成本模型列表", notes = "标准成本模型列表")
63
+    @GetMapping(value = "/list")
64
+    public Result<List<FlowDefinition>> queryList(FlowDefinition flowDefinition, HttpServletRequest req) {
65
+        QueryWrapper<FlowDefinition> queryWrapper = QueryGenerator.initQueryWrapper(flowDefinition, req.getParameterMap());
66
+        LambdaQueryWrapper<FlowDefinition> wrapper = queryWrapper.lambda();
67
+        wrapper.orderByDesc(FlowDefinition::getCreateTime);
68
+        List<FlowDefinition> list = appSceneCostModelService.queryListResult(wrapper);
69
+        return Result.OK(list);
70
+    }
71
+
72
+    /**
73
+     * 添加标准成本模型
74
+     *
75
+     * @param flowDefinition
76
+     * @return
77
+     */
78
+    @AutoLog(value = "app_scene_cost_model-添加")
79
+    @ApiOperation(value = "app_scene_cost_model-添加", notes = "app_scene_cost_model-添加")
80
+    @PostMapping(value = "/add")
81
+    public Result<FlowDefinition> add(@RequestBody FlowDefinition flowDefinition) {
82
+        FlowDefinition definition = flowDefinitionService.add(flowDefinition);
83
+        return Result.OK(definition);
84
+    }
85
+
86
+    /**
87
+     * 编辑
88
+     *
89
+     * @param flowDefinition
90
+     * @return
91
+     */
92
+    @AutoLog(value = "app_scene_cost_model-编辑")
93
+    @ApiOperation(value = "app_scene_cost_model-编辑", notes = "app_scene_cost_model-编辑")
94
+    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_model:edit")
95
+    @PostMapping(value = "/edit")
96
+    public Result<FlowDefinition> edit(@RequestBody FlowDefinition flowDefinition) {
97
+        return Result.OK(flowDefinitionService.edit(flowDefinition));
98
+    }
99
+
100
+    /**
101
+     * 通过id删除
102
+     *
103
+     * @param id
104
+     * @return
105
+     */
106
+    @AutoLog(value = "app_scene_cost_model-通过id删除")
107
+    @ApiOperation(value = "app_scene_cost_model-通过id删除", notes = "app_scene_cost_model-通过id删除")
108
+    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_model:delete")
109
+    @DeleteMapping(value = "/delete")
110
+    public Result<String> delete(@RequestParam(name = "id", required = true) Integer id) {
111
+        flowDefinitionService.delete(id);
112
+        return Result.OK("删除成功!");
113
+    }
114
+
115
+}

+ 179
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostResultValueController.java Wyświetl plik

@@ -0,0 +1,179 @@
1
+package com.zzsmart.qomo.kn.cost.manage.controller;
2
+
3
+import java.util.Arrays;
4
+import java.util.List;
5
+import java.util.Map;
6
+import java.util.stream.Collectors;
7
+import java.io.IOException;
8
+import java.io.UnsupportedEncodingException;
9
+import java.net.URLDecoder;
10
+import javax.servlet.http.HttpServletRequest;
11
+import javax.servlet.http.HttpServletResponse;
12
+
13
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostResultValue;
14
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostResultValueService;
15
+import org.jeecg.common.api.vo.Result;
16
+import org.jeecg.common.system.query.QueryGenerator;
17
+import org.jeecg.common.util.oConvertUtils;
18
+
19
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
20
+import com.baomidou.mybatisplus.core.metadata.IPage;
21
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
22
+import lombok.extern.slf4j.Slf4j;
23
+
24
+import org.jeecgframework.poi.excel.ExcelImportUtil;
25
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
26
+import org.jeecgframework.poi.excel.entity.ExportParams;
27
+import org.jeecgframework.poi.excel.entity.ImportParams;
28
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
29
+import org.jeecg.common.system.base.controller.JeecgController;
30
+import org.springframework.beans.factory.annotation.Autowired;
31
+import org.springframework.web.bind.annotation.*;
32
+import org.springframework.web.multipart.MultipartFile;
33
+import org.springframework.web.multipart.MultipartHttpServletRequest;
34
+import org.springframework.web.servlet.ModelAndView;
35
+import com.alibaba.fastjson.JSON;
36
+import io.swagger.annotations.Api;
37
+import io.swagger.annotations.ApiOperation;
38
+import org.jeecg.common.aspect.annotation.AutoLog;
39
+import org.apache.shiro.authz.annotation.RequiresPermissions;
40
+
41
+ /**
42
+ * @Description: app_scene_cost_result_value
43
+ * @Author: jeecg-boot
44
+ * @Date:   2024-07-23
45
+ * @Version: V1.0
46
+ */
47
+@Api(tags="app_scene_cost_result_value")
48
+@RestController
49
+@RequestMapping("/com.zzsmart.qomo.kn.cost.manage/appSceneCostResultValue")
50
+@Slf4j
51
+public class AppSceneCostResultValueController extends JeecgController<AppSceneCostResultValue, IAppSceneCostResultValueService> {
52
+	@Autowired
53
+	private IAppSceneCostResultValueService appSceneCostResultValueService;
54
+	
55
+	/**
56
+	 * 分页列表查询
57
+	 *
58
+	 * @param appSceneCostResultValue
59
+	 * @param pageNo
60
+	 * @param pageSize
61
+	 * @param req
62
+	 * @return
63
+	 */
64
+	//@AutoLog(value = "app_scene_cost_result_value-分页列表查询")
65
+	@ApiOperation(value="app_scene_cost_result_value-分页列表查询", notes="app_scene_cost_result_value-分页列表查询")
66
+	@GetMapping(value = "/list")
67
+	public Result<IPage<AppSceneCostResultValue>> queryPageList(AppSceneCostResultValue appSceneCostResultValue,
68
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
69
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
70
+								   HttpServletRequest req) {
71
+		QueryWrapper<AppSceneCostResultValue> queryWrapper = QueryGenerator.initQueryWrapper(appSceneCostResultValue, req.getParameterMap());
72
+		Page<AppSceneCostResultValue> page = new Page<AppSceneCostResultValue>(pageNo, pageSize);
73
+		IPage<AppSceneCostResultValue> pageList = appSceneCostResultValueService.page(page, queryWrapper);
74
+		return Result.OK(pageList);
75
+	}
76
+	
77
+	/**
78
+	 *   添加
79
+	 *
80
+	 * @param appSceneCostResultValue
81
+	 * @return
82
+	 */
83
+	@AutoLog(value = "app_scene_cost_result_value-添加")
84
+	@ApiOperation(value="app_scene_cost_result_value-添加", notes="app_scene_cost_result_value-添加")
85
+	@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_result_value:add")
86
+	@PostMapping(value = "/add")
87
+	public Result<String> add(@RequestBody AppSceneCostResultValue appSceneCostResultValue) {
88
+		appSceneCostResultValueService.save(appSceneCostResultValue);
89
+		return Result.OK("添加成功!");
90
+	}
91
+	
92
+	/**
93
+	 *  编辑
94
+	 *
95
+	 * @param appSceneCostResultValue
96
+	 * @return
97
+	 */
98
+	@AutoLog(value = "app_scene_cost_result_value-编辑")
99
+	@ApiOperation(value="app_scene_cost_result_value-编辑", notes="app_scene_cost_result_value-编辑")
100
+	@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_result_value:edit")
101
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
102
+	public Result<String> edit(@RequestBody AppSceneCostResultValue appSceneCostResultValue) {
103
+		appSceneCostResultValueService.updateById(appSceneCostResultValue);
104
+		return Result.OK("编辑成功!");
105
+	}
106
+	
107
+	/**
108
+	 *   通过id删除
109
+	 *
110
+	 * @param id
111
+	 * @return
112
+	 */
113
+	@AutoLog(value = "app_scene_cost_result_value-通过id删除")
114
+	@ApiOperation(value="app_scene_cost_result_value-通过id删除", notes="app_scene_cost_result_value-通过id删除")
115
+	@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_result_value:delete")
116
+	@DeleteMapping(value = "/delete")
117
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
118
+		appSceneCostResultValueService.removeById(id);
119
+		return Result.OK("删除成功!");
120
+	}
121
+	
122
+	/**
123
+	 *  批量删除
124
+	 *
125
+	 * @param ids
126
+	 * @return
127
+	 */
128
+	@AutoLog(value = "app_scene_cost_result_value-批量删除")
129
+	@ApiOperation(value="app_scene_cost_result_value-批量删除", notes="app_scene_cost_result_value-批量删除")
130
+	@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_result_value:deleteBatch")
131
+	@DeleteMapping(value = "/deleteBatch")
132
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
133
+		this.appSceneCostResultValueService.removeByIds(Arrays.asList(ids.split(",")));
134
+		return Result.OK("批量删除成功!");
135
+	}
136
+	
137
+	/**
138
+	 * 通过id查询
139
+	 *
140
+	 * @param id
141
+	 * @return
142
+	 */
143
+	//@AutoLog(value = "app_scene_cost_result_value-通过id查询")
144
+	@ApiOperation(value="app_scene_cost_result_value-通过id查询", notes="app_scene_cost_result_value-通过id查询")
145
+	@GetMapping(value = "/queryById")
146
+	public Result<AppSceneCostResultValue> queryById(@RequestParam(name="id",required=true) String id) {
147
+		AppSceneCostResultValue appSceneCostResultValue = appSceneCostResultValueService.getById(id);
148
+		if(appSceneCostResultValue==null) {
149
+			return Result.error("未找到对应数据");
150
+		}
151
+		return Result.OK(appSceneCostResultValue);
152
+	}
153
+
154
+    /**
155
+    * 导出excel
156
+    *
157
+    * @param request
158
+    * @param appSceneCostResultValue
159
+    */
160
+    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_result_value:exportXls")
161
+    @RequestMapping(value = "/exportXls")
162
+    public ModelAndView exportXls(HttpServletRequest request, AppSceneCostResultValue appSceneCostResultValue) {
163
+        return super.exportXls(request, appSceneCostResultValue, AppSceneCostResultValue.class, "app_scene_cost_result_value");
164
+    }
165
+
166
+    /**
167
+      * 通过excel导入数据
168
+    *
169
+    * @param request
170
+    * @param response
171
+    * @return
172
+    */
173
+    @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_result_value:importExcel")
174
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
175
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
176
+        return super.importExcel(request, response, AppSceneCostResultValue.class);
177
+    }
178
+
179
+}

+ 2
- 2
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/BomTreeController.java Wyświetl plik

@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
14 14
 
15 15
 import java.util.List;
16 16
 
17
-@Api(tags = "结构树查询")
17
+@Api(tags = "cost-结构树查询")
18 18
 @RestController
19 19
 @RequestMapping("//bomTree")
20 20
 @Slf4j
@@ -24,7 +24,7 @@ public class BomTreeController {
24 24
 
25 25
     @ApiOperation(value = "结构树查询", notes = "结构树查询")
26 26
     @GetMapping(value = "/queryBomTree")
27
-    public Result queryBomTree(@RequestParam(name = "materialNumber", required = false) String materialNumber, @RequestParam(name = "versionNumber", required = false) String versionNumber) {
27
+    public Result<List<BomTreeInfoVO>> queryBomTree(@RequestParam(name = "materialNumber", required = false) String materialNumber, @RequestParam(name = "versionNumber", required = false) String versionNumber) {
28 28
         List<BomTreeInfoVO> bomTreeInfoVOS = bomTreeService.getBomTreeByMaterialNumber(materialNumber, versionNumber);
29 29
         return Result.OK(bomTreeInfoVOS);
30 30
     }

+ 0
- 180
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/BudgetPriceController.java Wyświetl plik

@@ -1,180 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.controller;
2
-
3
-import java.util.Arrays;
4
-import java.util.List;
5
-import java.util.Map;
6
-import java.util.stream.Collectors;
7
-import java.io.IOException;
8
-import java.io.UnsupportedEncodingException;
9
-import java.net.URLDecoder;
10
-import javax.servlet.http.HttpServletRequest;
11
-import javax.servlet.http.HttpServletResponse;
12
-import org.jeecg.common.api.vo.Result;
13
-import org.jeecg.common.system.query.QueryGenerator;
14
-import org.jeecg.common.util.oConvertUtils;
15
-import com.zzsmart.qomo.kn.cost.manage.entity.BudgetPrice;
16
-import com.zzsmart.qomo.kn.cost.manage.service.IBudgetPriceService;
17
-
18
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
19
-import com.baomidou.mybatisplus.core.metadata.IPage;
20
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
21
-import lombok.extern.slf4j.Slf4j;
22
-
23
-import org.jeecgframework.poi.excel.ExcelImportUtil;
24
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
25
-import org.jeecgframework.poi.excel.entity.ExportParams;
26
-import org.jeecgframework.poi.excel.entity.ImportParams;
27
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
28
-import org.jeecg.common.system.base.controller.JeecgController;
29
-import org.springframework.beans.factory.annotation.Autowired;
30
-import org.springframework.web.bind.annotation.*;
31
-import org.springframework.web.multipart.MultipartFile;
32
-import org.springframework.web.multipart.MultipartHttpServletRequest;
33
-import org.springframework.web.servlet.ModelAndView;
34
-import com.alibaba.fastjson.JSON;
35
-import io.swagger.annotations.Api;
36
-import io.swagger.annotations.ApiOperation;
37
-import org.jeecg.common.aspect.annotation.AutoLog;
38
-import org.apache.shiro.authz.annotation.RequiresPermissions;
39
-
40
- /**
41
- * @Description: budget_price
42
- * @Author: jeecg-boot
43
- * @Date:   2024-06-11
44
- * @Version: V1.0
45
- */
46
-@Api(tags="预算价格")
47
-@RestController
48
-@RequestMapping("//budgetPrice")
49
-@Slf4j
50
-public class BudgetPriceController extends JeecgController<BudgetPrice, IBudgetPriceService> {
51
-	@Autowired
52
-	private IBudgetPriceService budgetPriceService;
53
-	
54
-	/**
55
-	 * 分页列表查询
56
-	 *
57
-	 * @param budgetPrice
58
-	 * @param pageNo
59
-	 * @param pageSize
60
-	 * @param req
61
-	 * @return
62
-	 */
63
-	//@AutoLog(value = "budget_price-分页列表查询")
64
-	@ApiOperation(value="budget_price-分页列表查询", notes="budget_price-分页列表查询")
65
-	@GetMapping(value = "/list")
66
-	public Result<IPage<BudgetPrice>> queryPageList(BudgetPrice budgetPrice,
67
-								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
68
-								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
69
-								   HttpServletRequest req) {
70
-		QueryWrapper<BudgetPrice> queryWrapper = QueryGenerator.initQueryWrapper(budgetPrice, req.getParameterMap());
71
-		Page<BudgetPrice> page = new Page<BudgetPrice>(pageNo, pageSize);
72
-		IPage<BudgetPrice> pageList = budgetPriceService.page(page, queryWrapper);
73
-		return Result.OK(pageList);
74
-	}
75
-	
76
-	/**
77
-	 *   添加
78
-	 *
79
-	 * @param budgetPrice
80
-	 * @return
81
-	 */
82
-	@AutoLog(value = "budget_price-添加")
83
-	@ApiOperation(value="budget_price-添加", notes="budget_price-添加")
84
-	//@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:budget_price:add")
85
-	@PostMapping(value = "/add")
86
-	public Result<String> add(@RequestBody BudgetPrice budgetPrice) {
87
-		budgetPriceService.save(budgetPrice);
88
-		return Result.OK("添加成功!");
89
-	}
90
-	
91
-	/**
92
-	 *  编辑
93
-	 *
94
-	 * @param budgetPrice
95
-	 * @return
96
-	 */
97
-	@AutoLog(value = "budget_price-编辑")
98
-	@ApiOperation(value="budget_price-编辑", notes="budget_price-编辑")
99
-	//@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:budget_price:edit")
100
-	@RequestMapping(value = "/edit", method = {RequestMethod.POST})
101
-	public Result<String> edit(@RequestBody BudgetPrice budgetPrice) {
102
-		budgetPriceService.updateById(budgetPrice);
103
-		return Result.OK("编辑成功!");
104
-	}
105
-	
106
-	/**
107
-	 *   通过id删除
108
-	 *
109
-	 * @param id
110
-	 * @return
111
-	 */
112
-	@AutoLog(value = "budget_price-通过id删除")
113
-	@ApiOperation(value="budget_price-通过id删除", notes="budget_price-通过id删除")
114
-	//@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:budget_price:delete")
115
-	@DeleteMapping(value = "/delete")
116
-	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
117
-		budgetPriceService.removeById(id);
118
-		return Result.OK("删除成功!");
119
-	}
120
-	
121
-	/**
122
-	 *  批量删除
123
-	 *
124
-	 * @param ids
125
-	 * @return
126
-	 */
127
-	@AutoLog(value = "budget_price-批量删除")
128
-	@ApiOperation(value="budget_price-批量删除", notes="budget_price-批量删除")
129
-	//@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:budget_price:deleteBatch")
130
-	@DeleteMapping(value = "/deleteBatch")
131
-	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
132
-		this.budgetPriceService.removeByIds(Arrays.asList(ids.split(",")));
133
-		return Result.OK("批量删除成功!");
134
-	}
135
-	
136
-	/**
137
-	 * 通过id查询
138
-	 *
139
-	 * @param id
140
-	 * @return
141
-	 */
142
-	//@AutoLog(value = "budget_price-通过id查询")
143
-	@ApiOperation(value="budget_price-通过id查询", notes="budget_price-通过id查询")
144
-	@GetMapping(value = "/queryById")
145
-	public Result<BudgetPrice> queryById(@RequestParam(name="id",required=true) String id) {
146
-		BudgetPrice budgetPrice = budgetPriceService.getById(id);
147
-		if(budgetPrice==null) {
148
-			return Result.error("未找到对应数据");
149
-		}
150
-		return Result.OK(budgetPrice);
151
-	}
152
-
153
-    /**
154
-    * 导出excel
155
-    *
156
-    * @param request
157
-    * @param budgetPrice
158
-    */
159
-    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:budget_price:exportXls")
160
-    @GetMapping(value = "/exportXls")
161
-	@ApiOperation(value="导出excel", notes="导出excel")
162
-    public ModelAndView exportXls(HttpServletRequest request, BudgetPrice budgetPrice) {
163
-        return super.exportXls(request, budgetPrice, BudgetPrice.class, "budget_price");
164
-    }
165
-
166
-    /**
167
-      * 通过excel导入数据
168
-    *
169
-    * @param request
170
-    * @param response
171
-    * @return
172
-    */
173
-	@ApiOperation(value="excel导入数据", notes="excel导入数据")
174
-	//@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:budget_price:importExcel")
175
-    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
176
-    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
177
-        return super.importExcel(request, response, BudgetPrice.class);
178
-    }
179
-
180
-}

+ 0
- 182
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/C7525costController.java Wyświetl plik

@@ -1,182 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.controller;
2
-
3
-import java.util.Arrays;
4
-import java.util.List;
5
-import java.util.Map;
6
-import java.util.stream.Collectors;
7
-import java.io.IOException;
8
-import java.io.UnsupportedEncodingException;
9
-import java.net.URLDecoder;
10
-import javax.servlet.http.HttpServletRequest;
11
-import javax.servlet.http.HttpServletResponse;
12
-
13
-import com.zzsmart.qomo.kn.cost.manage.entity.C7525cost;
14
-import com.zzsmart.qomo.kn.cost.manage.service.IC7525costService;
15
-import org.jeecg.common.api.vo.Result;
16
-import org.jeecg.common.system.query.QueryGenerator;
17
-import org.jeecg.common.util.oConvertUtils;
18
-
19
-
20
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
21
-import com.baomidou.mybatisplus.core.metadata.IPage;
22
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
23
-import lombok.extern.slf4j.Slf4j;
24
-
25
-import org.jeecgframework.poi.excel.ExcelImportUtil;
26
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
27
-import org.jeecgframework.poi.excel.entity.ExportParams;
28
-import org.jeecgframework.poi.excel.entity.ImportParams;
29
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
30
-import org.jeecg.common.system.base.controller.JeecgController;
31
-import org.springframework.beans.factory.annotation.Autowired;
32
-import org.springframework.web.bind.annotation.*;
33
-import org.springframework.web.multipart.MultipartFile;
34
-import org.springframework.web.multipart.MultipartHttpServletRequest;
35
-import org.springframework.web.servlet.ModelAndView;
36
-import com.alibaba.fastjson.JSON;
37
-import io.swagger.annotations.Api;
38
-import io.swagger.annotations.ApiOperation;
39
-import org.jeecg.common.aspect.annotation.AutoLog;
40
-import org.apache.shiro.authz.annotation.RequiresPermissions;
41
-
42
- /**
43
- * @Description: c7525cost
44
- * @Author: jeecg-boot
45
- * @Date:   2024-06-06
46
- * @Version: V1.0
47
- */
48
-@Api(tags="7525单价")
49
-@RestController
50
-@RequestMapping("//c7525cost")
51
-@Slf4j
52
-public class C7525costController extends JeecgController<C7525cost, IC7525costService> {
53
-	@Autowired
54
-	private IC7525costService c7525costService;
55
-	
56
-	/**
57
-	 * 分页列表查询
58
-	 *
59
-	 * @param c7525cost
60
-	 * @param pageNo
61
-	 * @param pageSize
62
-	 * @param req
63
-	 * @return
64
-	 */
65
-	//@AutoLog(value = "c7525cost-分页列表查询")
66
-	@ApiOperation(value="c7525cost-分页列表查询", notes="c7525cost-分页列表查询")
67
-	@GetMapping(value = "/list")
68
-	public Result<IPage<C7525cost>> queryPageList(C7525cost c7525cost,
69
-								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
70
-								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
71
-								   HttpServletRequest req) {
72
-		QueryWrapper<C7525cost> queryWrapper = QueryGenerator.initQueryWrapper(c7525cost, req.getParameterMap());
73
-		Page<C7525cost> page = new Page<C7525cost>(pageNo, pageSize);
74
-		IPage<C7525cost> pageList = c7525costService.page(page, queryWrapper);
75
-		return Result.OK(pageList);
76
-	}
77
-	
78
-	/**
79
-	 *   添加
80
-	 *
81
-	 * @param c7525cost
82
-	 * @return
83
-	 */
84
-	@AutoLog(value = "c7525cost-添加")
85
-	@ApiOperation(value="c7525cost-添加", notes="c7525cost-添加")
86
-//	@RequiresPermissions(":c7525cost:add")
87
-	@PostMapping(value = "/add")
88
-	public Result<String> add(@RequestBody C7525cost c7525cost) {
89
-		c7525costService.save(c7525cost);
90
-		return Result.OK("添加成功!");
91
-	}
92
-	
93
-	/**
94
-	 *  编辑
95
-	 *
96
-	 * @param c7525cost
97
-	 * @return
98
-	 */
99
-	@AutoLog(value = "c7525cost-编辑")
100
-	@ApiOperation(value="c7525cost-编辑", notes="c7525cost-编辑")
101
-//	@RequiresPermissions(":c7525cost:edit")
102
-	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
103
-	public Result<String> edit(@RequestBody C7525cost c7525cost) {
104
-		c7525costService.updateById(c7525cost);
105
-		return Result.OK("编辑成功!");
106
-	}
107
-	
108
-	/**
109
-	 *   通过id删除
110
-	 *
111
-	 * @param id
112
-	 * @return
113
-	 */
114
-	@AutoLog(value = "c7525cost-通过id删除")
115
-	@ApiOperation(value="c7525cost-通过id删除", notes="c7525cost-通过id删除")
116
-//	@RequiresPermissions(":c7525cost:delete")
117
-	@DeleteMapping(value = "/delete")
118
-	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
119
-		c7525costService.removeById(id);
120
-		return Result.OK("删除成功!");
121
-	}
122
-	
123
-	/**
124
-	 *  批量删除
125
-	 *
126
-	 * @param ids
127
-	 * @return
128
-	 */
129
-	@AutoLog(value = "c7525cost-批量删除")
130
-	@ApiOperation(value="c7525cost-批量删除", notes="c7525cost-批量删除")
131
-//	@RequiresPermissions(":c7525cost:deleteBatch")
132
-	@DeleteMapping(value = "/deleteBatch")
133
-	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
134
-		this.c7525costService.removeByIds(Arrays.asList(ids.split(",")));
135
-		return Result.OK("批量删除成功!");
136
-	}
137
-	
138
-	/**
139
-	 * 通过id查询
140
-	 *
141
-	 * @param id
142
-	 * @return
143
-	 */
144
-	//@AutoLog(value = "c7525cost-通过id查询")
145
-	@ApiOperation(value="c7525cost-通过id查询", notes="c7525cost-通过id查询")
146
-	@GetMapping(value = "/queryById")
147
-	public Result<C7525cost> queryById(@RequestParam(name="id",required=true) String id) {
148
-		C7525cost c7525cost = c7525costService.getById(id);
149
-		if(c7525cost==null) {
150
-			return Result.error("未找到对应数据");
151
-		}
152
-		return Result.OK(c7525cost);
153
-	}
154
-
155
-    /**
156
-    * 导出excel
157
-    *
158
-    * @param request
159
-    * @param c7525cost
160
-    */
161
-//    @RequiresPermissions(":c7525cost:exportXls")
162
-	@ApiOperation(value="c7525cost-导出excel", notes="c7525cost-导出excel")
163
-    @RequestMapping(value = "/exportXls", method = RequestMethod.GET)
164
-    public ModelAndView exportXls(HttpServletRequest request, C7525cost c7525cost) {
165
-        return super.exportXls(request, c7525cost, C7525cost.class, "c7525cost");
166
-    }
167
-
168
-    /**
169
-      * 通过excel导入数据
170
-    *
171
-    * @param request
172
-    * @param response
173
-    * @return
174
-    */
175
-//    @RequiresPermissions(":c7525cost:importExcel")
176
-	@ApiOperation(value="c7525cost-通过excel导入数据", notes="c7525cost-通过excel导入数据")
177
-    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
178
-    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
179
-        return super.importExcel(request, response, C7525cost.class);
180
-    }
181
-
182
-}

+ 0
- 178
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/CostCenterController.java Wyświetl plik

@@ -1,178 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.controller;
2
-
3
-import java.util.Arrays;
4
-import java.util.List;
5
-import java.util.Map;
6
-import java.util.stream.Collectors;
7
-import java.io.IOException;
8
-import java.io.UnsupportedEncodingException;
9
-import java.net.URLDecoder;
10
-import javax.servlet.http.HttpServletRequest;
11
-import javax.servlet.http.HttpServletResponse;
12
-import org.jeecg.common.api.vo.Result;
13
-import org.jeecg.common.system.query.QueryGenerator;
14
-import org.jeecg.common.util.oConvertUtils;
15
-import com.zzsmart.qomo.kn.cost.manage.entity.CostCenter;
16
-import com.zzsmart.qomo.kn.cost.manage.service.ICostCenterService;
17
-
18
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
19
-import com.baomidou.mybatisplus.core.metadata.IPage;
20
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
21
-import lombok.extern.slf4j.Slf4j;
22
-
23
-import org.jeecgframework.poi.excel.ExcelImportUtil;
24
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
25
-import org.jeecgframework.poi.excel.entity.ExportParams;
26
-import org.jeecgframework.poi.excel.entity.ImportParams;
27
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
28
-import org.jeecg.common.system.base.controller.JeecgController;
29
-import org.springframework.beans.factory.annotation.Autowired;
30
-import org.springframework.web.bind.annotation.*;
31
-import org.springframework.web.multipart.MultipartFile;
32
-import org.springframework.web.multipart.MultipartHttpServletRequest;
33
-import org.springframework.web.servlet.ModelAndView;
34
-import com.alibaba.fastjson.JSON;
35
-import io.swagger.annotations.Api;
36
-import io.swagger.annotations.ApiOperation;
37
-import org.jeecg.common.aspect.annotation.AutoLog;
38
-import org.apache.shiro.authz.annotation.RequiresPermissions;
39
-
40
- /**
41
- * @Description: cost_center
42
- * @Author: jeecg-boot
43
- * @Date:   2024-06-11
44
- * @Version: V1.0
45
- */
46
-@Api(tags="成本中心")
47
-@RestController
48
-@RequestMapping("/com.zzsmart.qomo.kn.cost.manage/costCenter")
49
-@Slf4j
50
-public class CostCenterController extends JeecgController<CostCenter, ICostCenterService> {
51
-	@Autowired
52
-	private ICostCenterService costCenterService;
53
-	
54
-	/**
55
-	 * 分页列表查询
56
-	 *
57
-	 * @param costCenter
58
-	 * @param pageNo
59
-	 * @param pageSize
60
-	 * @param req
61
-	 * @return
62
-	 */
63
-	//@AutoLog(value = "cost_center-分页列表查询")
64
-	@ApiOperation(value="cost_center-分页列表查询", notes="cost_center-分页列表查询")
65
-	@GetMapping(value = "/list")
66
-	public Result<IPage<CostCenter>> queryPageList(CostCenter costCenter,
67
-								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
68
-								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
69
-								   HttpServletRequest req) {
70
-		QueryWrapper<CostCenter> queryWrapper = QueryGenerator.initQueryWrapper(costCenter, req.getParameterMap());
71
-		Page<CostCenter> page = new Page<CostCenter>(pageNo, pageSize);
72
-		IPage<CostCenter> pageList = costCenterService.page(page, queryWrapper);
73
-		return Result.OK(pageList);
74
-	}
75
-	
76
-	/**
77
-	 *   添加
78
-	 *
79
-	 * @param costCenter
80
-	 * @return
81
-	 */
82
-	@AutoLog(value = "cost_center-添加")
83
-	@ApiOperation(value="cost_center-添加", notes="cost_center-添加")
84
-	//@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:cost_center:add")
85
-	@PostMapping(value = "/add")
86
-	public Result<String> add(@RequestBody CostCenter costCenter) {
87
-		costCenterService.save(costCenter);
88
-		return Result.OK("添加成功!");
89
-	}
90
-	
91
-	/**
92
-	 *  编辑
93
-	 *
94
-	 * @param costCenter
95
-	 * @return
96
-	 */
97
-	@AutoLog(value = "cost_center-编辑")
98
-	@ApiOperation(value="cost_center-编辑", notes="cost_center-编辑")
99
-	//@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:cost_center:edit")
100
-	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
101
-	public Result<String> edit(@RequestBody CostCenter costCenter) {
102
-		costCenterService.updateById(costCenter);
103
-		return Result.OK("编辑成功!");
104
-	}
105
-	
106
-	/**
107
-	 *   通过id删除
108
-	 *
109
-	 * @param id
110
-	 * @return
111
-	 */
112
-	@AutoLog(value = "cost_center-通过id删除")
113
-	@ApiOperation(value="cost_center-通过id删除", notes="cost_center-通过id删除")
114
-	//@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:cost_center:delete")
115
-	@DeleteMapping(value = "/delete")
116
-	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
117
-		costCenterService.removeById(id);
118
-		return Result.OK("删除成功!");
119
-	}
120
-	
121
-	/**
122
-	 *  批量删除
123
-	 *
124
-	 * @param ids
125
-	 * @return
126
-	 */
127
-	@AutoLog(value = "cost_center-批量删除")
128
-	@ApiOperation(value="cost_center-批量删除", notes="cost_center-批量删除")
129
-	//@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:cost_center:deleteBatch")
130
-	@DeleteMapping(value = "/deleteBatch")
131
-	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
132
-		this.costCenterService.removeByIds(Arrays.asList(ids.split(",")));
133
-		return Result.OK("批量删除成功!");
134
-	}
135
-	
136
-	/**
137
-	 * 通过id查询
138
-	 *
139
-	 * @param id
140
-	 * @return
141
-	 */
142
-	//@AutoLog(value = "cost_center-通过id查询")
143
-	@ApiOperation(value="cost_center-通过id查询", notes="cost_center-通过id查询")
144
-	@GetMapping(value = "/queryById")
145
-	public Result<CostCenter> queryById(@RequestParam(name="id",required=true) String id) {
146
-		CostCenter costCenter = costCenterService.getById(id);
147
-		if(costCenter==null) {
148
-			return Result.error("未找到对应数据");
149
-		}
150
-		return Result.OK(costCenter);
151
-	}
152
-
153
-    /**
154
-    * 导出excel
155
-    *
156
-    * @param request
157
-    * @param costCenter
158
-    */
159
-    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:cost_center:exportXls")
160
-    @RequestMapping(value = "/exportXls")
161
-    public ModelAndView exportXls(HttpServletRequest request, CostCenter costCenter) {
162
-        return super.exportXls(request, costCenter, CostCenter.class, "cost_center");
163
-    }
164
-
165
-    /**
166
-      * 通过excel导入数据
167
-    *
168
-    * @param request
169
-    * @param response
170
-    * @return
171
-    */
172
-    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:cost_center:importExcel")
173
-    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
174
-    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
175
-        return super.importExcel(request, response, CostCenter.class);
176
-    }
177
-
178
-}

+ 54
- 4
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/CostMaterialBomController.java Wyświetl plik

@@ -1,20 +1,70 @@
1 1
 package com.zzsmart.qomo.kn.cost.manage.controller;
2 2
 
3 3
 
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5
+import com.baomidou.mybatisplus.core.metadata.IPage;
6
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7
+import com.zzsmart.qomo.kn.cost.manage.entity.CostMaterialBom;
8
+import com.zzsmart.qomo.kn.cost.manage.entity.CostStandardVersion;
9
+import com.zzsmart.qomo.kn.cost.manage.service.CostMaterialBomService;
10
+import io.swagger.annotations.Api;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.jeecg.common.api.vo.Result;
13
+import org.jeecg.common.system.query.QueryGenerator;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.web.bind.annotation.GetMapping;
4 16
 import org.springframework.web.bind.annotation.RequestMapping;
5 17
 
18
+import org.springframework.web.bind.annotation.RequestParam;
6 19
 import org.springframework.web.bind.annotation.RestController;
7 20
 
21
+import javax.servlet.http.HttpServletRequest;
22
+import java.util.List;
23
+
8 24
 /**
9 25
  * <p>
10 26
  * 物料bom 前端控制器
11 27
  * </p>
12 28
  *
13
- * @author  
14
- * @since 2024-06-19
29
+ * @author
30
+ * @since 2024-06-21
15 31
  */
32
+@RequestMapping("//cost-material-bom")
33
+@Api(tags="cost-标准成本-bom信息")
16 34
 @RestController
17
-@RequestMapping("/cost-material-bom")
18 35
 public class CostMaterialBomController {
19
-
36
+    @Autowired
37
+    CostMaterialBomService costMaterialBomService;
38
+    /**
39
+     * 分页列表查询
40
+     *
41
+     * @param costMaterialBom
42
+     * @param pageNo
43
+     * @param pageSize
44
+     * @param req
45
+     * @return
46
+     */
47
+    //@AutoLog(value = "app_scene_cost_standard_version-分页列表查询")
48
+    @ApiOperation(value="物料bom分页列表查询", notes="物料bom分页列表查询")
49
+    @GetMapping(value = "/pageList")
50
+    public Result<IPage<CostMaterialBom>> queryPageList(CostMaterialBom costMaterialBom,
51
+                                                            @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
52
+                                                            @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
53
+                                                            HttpServletRequest req) {
54
+        QueryWrapper<CostMaterialBom> queryWrapper = QueryGenerator.initQueryWrapper(costMaterialBom, req.getParameterMap());
55
+        Page<CostMaterialBom> page = new Page<CostMaterialBom>(pageNo, pageSize);
56
+        IPage<CostMaterialBom> pageList = costMaterialBomService.page(page, queryWrapper);
57
+        return Result.OK(pageList);
58
+    }
59
+    /**
60
+     * 列表查询
61
+     *
62
+     * @return
63
+     */
64
+    @ApiOperation(value="物料bom列表查询", notes="物料bom列表查询")
65
+    @GetMapping(value = "/list")
66
+    public Result<  List<CostMaterialBom>> queryList(@RequestParam(name = "materialNumber",required = false) String materialNumber) {
67
+        List<CostMaterialBom> list = costMaterialBomService.queryListResult(materialNumber);
68
+        return Result.OK(list);
69
+    }
20 70
 }

+ 20
- 20
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/CostPartMissingInfoController.java Wyświetl plik

@@ -44,7 +44,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
44 44
  * @Date:   2024-06-13
45 45
  * @Version: V1.0
46 46
  */
47
-@Api(tags="标准成本-部件缺失信息")
47
+@Api(tags="cost-标准成本-部件缺失信息")
48 48
 @RestController
49 49
 @RequestMapping("//costPartMissingInfo")
50 50
 @Slf4j
@@ -61,8 +61,8 @@ public class CostPartMissingInfoController extends JeecgController<CostPartMissi
61 61
 	 * @param req
62 62
 	 * @return
63 63
 	 */
64
-	//@AutoLog(value = "cost_part_missing_info-分页列表查询")
65
-	@ApiOperation(value="cost_part_missing_info-分页列表查询", notes="cost_part_missing_info-分页列表查询")
64
+	//@AutoLog(value = "app_scene_cost_part_missing_info-分页列表查询")
65
+	@ApiOperation(value="app_scene_cost_part_missing_info-分页列表查询", notes="app_scene_cost_part_missing_info-分页列表查询")
66 66
 	@GetMapping(value = "/list")
67 67
 	public Result<IPage<CostPartMissingInfo>> queryPageList(CostPartMissingInfo costPartMissingInfo,
68 68
 								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@@ -80,9 +80,9 @@ public class CostPartMissingInfoController extends JeecgController<CostPartMissi
80 80
 	 * @param costPartMissingInfo
81 81
 	 * @return
82 82
 	 */
83
-	@AutoLog(value = "cost_part_missing_info-添加")
84
-	@ApiOperation(value="cost_part_missing_info-添加", notes="cost_part_missing_info-添加")
85
-//	@RequiresPermissions(":cost_part_missing_info:add")
83
+	@AutoLog(value = "app_scene_cost_part_missing_info-添加")
84
+	@ApiOperation(value="app_scene_cost_part_missing_info-添加", notes="app_scene_cost_part_missing_info-添加")
85
+//	@RequiresPermissions(":app_scene_cost_part_missing_info:add")
86 86
 	@PostMapping(value = "/add")
87 87
 	public Result<String> add(@RequestBody CostPartMissingInfo costPartMissingInfo) {
88 88
 		costPartMissingInfoService.save(costPartMissingInfo);
@@ -95,9 +95,9 @@ public class CostPartMissingInfoController extends JeecgController<CostPartMissi
95 95
 	 * @param costPartMissingInfo
96 96
 	 * @return
97 97
 	 */
98
-	@AutoLog(value = "cost_part_missing_info-编辑")
99
-	@ApiOperation(value="cost_part_missing_info-编辑", notes="cost_part_missing_info-编辑")
100
-//	@RequiresPermissions(":cost_part_missing_info:edit")
98
+	@AutoLog(value = "app_scene_cost_part_missing_info-编辑")
99
+	@ApiOperation(value="app_scene_cost_part_missing_info-编辑", notes="app_scene_cost_part_missing_info-编辑")
100
+//	@RequiresPermissions(":app_scene_cost_part_missing_info:edit")
101 101
 	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
102 102
 	public Result<String> edit(@RequestBody CostPartMissingInfo costPartMissingInfo) {
103 103
 		costPartMissingInfoService.updateById(costPartMissingInfo);
@@ -110,9 +110,9 @@ public class CostPartMissingInfoController extends JeecgController<CostPartMissi
110 110
 	 * @param id
111 111
 	 * @return
112 112
 	 */
113
-	@AutoLog(value = "cost_part_missing_info-通过id删除")
114
-	@ApiOperation(value="cost_part_missing_info-通过id删除", notes="cost_part_missing_info-通过id删除")
115
-//	@RequiresPermissions(":cost_part_missing_info:delete")
113
+	@AutoLog(value = "app_scene_cost_part_missing_info-通过id删除")
114
+	@ApiOperation(value="app_scene_cost_part_missing_info-通过id删除", notes="app_scene_cost_part_missing_info-通过id删除")
115
+//	@RequiresPermissions(":app_scene_cost_part_missing_info:delete")
116 116
 	@DeleteMapping(value = "/delete")
117 117
 	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
118 118
 		costPartMissingInfoService.removeById(id);
@@ -125,9 +125,9 @@ public class CostPartMissingInfoController extends JeecgController<CostPartMissi
125 125
 	 * @param ids
126 126
 	 * @return
127 127
 	 */
128
-	@AutoLog(value = "cost_part_missing_info-批量删除")
129
-	@ApiOperation(value="cost_part_missing_info-批量删除", notes="cost_part_missing_info-批量删除")
130
-//	@RequiresPermissions(":cost_part_missing_info:deleteBatch")
128
+	@AutoLog(value = "app_scene_cost_part_missing_info-批量删除")
129
+	@ApiOperation(value="app_scene_cost_part_missing_info-批量删除", notes="app_scene_cost_part_missing_info-批量删除")
130
+//	@RequiresPermissions(":app_scene_cost_part_missing_info:deleteBatch")
131 131
 	@DeleteMapping(value = "/deleteBatch")
132 132
 	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
133 133
 		this.costPartMissingInfoService.removeByIds(Arrays.asList(ids.split(",")));
@@ -140,8 +140,8 @@ public class CostPartMissingInfoController extends JeecgController<CostPartMissi
140 140
 	 * @param id
141 141
 	 * @return
142 142
 	 */
143
-	//@AutoLog(value = "cost_part_missing_info-通过id查询")
144
-	@ApiOperation(value="cost_part_missing_info-通过id查询", notes="cost_part_missing_info-通过id查询")
143
+	//@AutoLog(value = "app_scene_cost_part_missing_info-通过id查询")
144
+	@ApiOperation(value="app_scene_cost_part_missing_info-通过id查询", notes="app_scene_cost_part_missing_info-通过id查询")
145 145
 	@GetMapping(value = "/queryById")
146 146
 	public Result<CostPartMissingInfo> queryById(@RequestParam(name="id",required=true) String id) {
147 147
 		CostPartMissingInfo costPartMissingInfo = costPartMissingInfoService.getById(id);
@@ -157,10 +157,10 @@ public class CostPartMissingInfoController extends JeecgController<CostPartMissi
157 157
     * @param request
158 158
     * @param costPartMissingInfo
159 159
     */
160
-//    @RequiresPermissions(":cost_part_missing_info:exportXls")
160
+//    @RequiresPermissions(":app_scene_cost_part_missing_info:exportXls")
161 161
     @RequestMapping(value = "/exportXls",method = RequestMethod.GET)
162 162
     public ModelAndView exportXls(HttpServletRequest request, CostPartMissingInfo costPartMissingInfo) {
163
-        return super.exportXls(request, costPartMissingInfo, CostPartMissingInfo.class, "cost_part_missing_info");
163
+        return super.exportXls(request, costPartMissingInfo, CostPartMissingInfo.class, "app_scene_cost_part_missing_info");
164 164
     }
165 165
 
166 166
     /**
@@ -170,7 +170,7 @@ public class CostPartMissingInfoController extends JeecgController<CostPartMissi
170 170
     * @param response
171 171
     * @return
172 172
     */
173
-//    @RequiresPermissions(":cost_part_missing_info:importExcel")
173
+//    @RequiresPermissions(":app_scene_cost_part_missing_info:importExcel")
174 174
     @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
175 175
     public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
176 176
         return super.importExcel(request, response, CostPartMissingInfo.class);

+ 0
- 237
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/CostStandardController.java Wyświetl plik

@@ -1,237 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.controller;
2
-
3
-import java.io.InputStream;
4
-import java.net.URL;
5
-import java.net.URLEncoder;
6
-import java.util.Arrays;
7
-import java.util.List;
8
-import java.util.Map;
9
-import java.util.stream.Collectors;
10
-import java.io.IOException;
11
-import java.io.UnsupportedEncodingException;
12
-import java.net.URLDecoder;
13
-import javax.servlet.http.HttpServletRequest;
14
-import javax.servlet.http.HttpServletResponse;
15
-
16
-import com.zzsmart.qomo.kn.cost.manage.entity.CostStandard;
17
-import com.zzsmart.qomo.kn.cost.manage.service.ICostStandardService;
18
-import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardVO;
19
-import org.apache.poi.ss.usermodel.*;
20
-import org.apache.poi.ss.util.CellRangeAddressList;
21
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
22
-import org.jeecg.common.api.vo.Result;
23
-import org.jeecg.common.system.query.QueryGenerator;
24
-import org.jeecg.common.util.oConvertUtils;
25
-
26
-
27
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
28
-import com.baomidou.mybatisplus.core.metadata.IPage;
29
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
30
-import lombok.extern.slf4j.Slf4j;
31
-
32
-import org.jeecg.modules.system.entity.SysUser;
33
-import org.jeecgframework.poi.excel.ExcelImportUtil;
34
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
35
-import org.jeecgframework.poi.excel.entity.ExportParams;
36
-import org.jeecgframework.poi.excel.entity.ImportParams;
37
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
38
-import org.jeecg.common.system.base.controller.JeecgController;
39
-import org.springframework.beans.factory.annotation.Autowired;
40
-import org.springframework.web.bind.annotation.*;
41
-import org.springframework.web.multipart.MultipartFile;
42
-import org.springframework.web.multipart.MultipartHttpServletRequest;
43
-import org.springframework.web.servlet.ModelAndView;
44
-import com.alibaba.fastjson.JSON;
45
-import io.swagger.annotations.Api;
46
-import io.swagger.annotations.ApiOperation;
47
-import org.jeecg.common.aspect.annotation.AutoLog;
48
-import org.apache.shiro.authz.annotation.RequiresPermissions;
49
-
50
- /**
51
- * @Description: 标准成本
52
- * @Author: wangqiong
53
- * @Date:   2024-06-13
54
- * @Version: V1.0
55
- */
56
-@Api(tags="标准成本计算")
57
-@RestController
58
-@RequestMapping("//costStandard")
59
-@Slf4j
60
-public class CostStandardController extends JeecgController<CostStandard, ICostStandardService> {
61
-	@Autowired
62
-	private ICostStandardService costStandardService;
63
-	
64
-	/**
65
-	 * 分页列表查询
66
-	 *
67
-	 * @param costStandard
68
-	 * @param pageNo
69
-	 * @param pageSize
70
-	 * @param req
71
-	 * @return
72
-	 */
73
-	//@AutoLog(value = "cost_standard-分页列表查询")
74
-	@ApiOperation(value="cost_standard-分页列表查询", notes="cost_standard-分页列表查询")
75
-	@GetMapping(value = "/list")
76
-	public Result<IPage<CostStandardVO>> queryPageList(CostStandardVO costStandard,
77
-								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
78
-								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
79
-								   HttpServletRequest req) {
80
-
81
-		Page<CostStandardVO> page = new Page<CostStandardVO>(pageNo, pageSize);
82
-		IPage<CostStandardVO> pageList = costStandardService.pageList(page, costStandard);
83
-		return Result.OK(pageList);
84
-	}
85
-	
86
-	/**
87
-	 *   添加
88
-	 *
89
-	 * @param costStandard
90
-	 * @return
91
-	 */
92
-	@AutoLog(value = "cost_standard-添加")
93
-	@ApiOperation(value="cost_standard-添加", notes="cost_standard-添加")
94
-//	@RequiresPermissions(":cost_standard:add")
95
-	@PostMapping(value = "/add")
96
-	public Result<String> add(@RequestBody CostStandard costStandard) {
97
-		costStandardService.save(costStandard);
98
-		return Result.OK("添加成功!");
99
-	}
100
-
101
-
102
-	 /**
103
-	 *  编辑
104
-	 *
105
-	 * @param costStandard
106
-	 * @return
107
-	 */
108
-	@AutoLog(value = "cost_standard-编辑")
109
-	@ApiOperation(value="cost_standard-编辑", notes="cost_standard-编辑")
110
-//	@RequiresPermissions(":cost_standard:edit")
111
-	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
112
-	public Result<String> edit(@RequestBody CostStandard costStandard) {
113
-		costStandardService.updateById(costStandard);
114
-		return Result.OK("编辑成功!");
115
-	}
116
-	
117
-	/**
118
-	 *   通过id删除
119
-	 *
120
-	 * @param id
121
-	 * @return
122
-	 */
123
-	@AutoLog(value = "cost_standard-通过id删除")
124
-	@ApiOperation(value="cost_standard-通过id删除", notes="cost_standard-通过id删除")
125
-//	@RequiresPermissions(":cost_standard:delete")
126
-	@DeleteMapping(value = "/delete")
127
-	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
128
-		costStandardService.removeById(id);
129
-		return Result.OK("删除成功!");
130
-	}
131
-	
132
-	/**
133
-	 *  批量删除
134
-	 *
135
-	 * @param ids
136
-	 * @return
137
-	 */
138
-	@AutoLog(value = "cost_standard-批量删除")
139
-	@ApiOperation(value="cost_standard-批量删除", notes="cost_standard-批量删除")
140
-//	@RequiresPermissions(":cost_standard:deleteBatch")
141
-	@DeleteMapping(value = "/deleteBatch")
142
-	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
143
-		this.costStandardService.removeByIds(Arrays.asList(ids.split(",")));
144
-		return Result.OK("批量删除成功!");
145
-	}
146
-	
147
-	/**
148
-	 * 通过id查询
149
-	 *
150
-	 * @param id
151
-	 * @return
152
-	 */
153
-	//@AutoLog(value = "cost_standard-通过id查询")
154
-	@ApiOperation(value="cost_standard-通过id查询", notes="cost_standard-通过id查询")
155
-	@GetMapping(value = "/queryById")
156
-	public Result<CostStandard> queryById(@RequestParam(name="id",required=true) String id) {
157
-		CostStandard costStandard = costStandardService.getById(id);
158
-		if(costStandard==null) {
159
-			return Result.error("未找到对应数据");
160
-		}
161
-		return Result.OK(costStandard);
162
-	}
163
-
164
-    /**
165
-    * 导出excel
166
-    *
167
-    * @param request
168
-    * @param costStandard
169
-    */
170
-//    @RequiresPermissions(":cost_standard:exportXls")
171
-    @RequestMapping(value = "/exportXls", method = RequestMethod.GET)
172
-    public ModelAndView exportXls(HttpServletRequest request, CostStandard costStandard) {
173
-        return super.exportXls(request, costStandard, CostStandard.class, "cost_standard");
174
-    }
175
-
176
-    /**
177
-      * 通过excel导入数据并进行批量计算
178
-    *
179
-    * @param request
180
-    * @param response
181
-    * @return
182
-    */
183
-//    @RequiresPermissions(":cost_standard:importExcel")
184
-    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
185
-    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
186
-        return super.importExcel(request, response, CostStandard.class);
187
-    }
188
-
189
-	 @GetMapping("/download/excel-template")
190
-	 public void downloadExcel(HttpServletResponse response) throws IOException {
191
-		 // 创建工作簿
192
-		 Workbook workbook = new XSSFWorkbook();
193
-		 Sheet sheet = workbook.createSheet("生变成版本号导入模板");
194
-
195
-		 // 创建表头行
196
-		 Row headerRow = sheet.createRow(0);
197
-		 // 设置字体
198
-		 Font headerFont = workbook.createFont();
199
-		 headerFont.setBold(true); // 设置字体为加粗
200
-		// headerFont.setFontHeightInPoints((short) 14); // 设置字体大小
201
-
202
-		 CellStyle headerCellStyle = workbook.createCellStyle();
203
-		 headerCellStyle.setFont(headerFont);
204
-		 Cell firstCell = headerRow.createCell(0);
205
-		 firstCell.setCellStyle(headerCellStyle);
206
-		 firstCell.setCellValue("物料号");
207
-		 Cell secondCell = headerRow.createCell(1);
208
-		 secondCell.setCellStyle(headerCellStyle);
209
-		 secondCell.setCellValue("图号");
210
-		 Cell thirdCell = headerRow.createCell(2);
211
-		 thirdCell.setCellStyle(headerCellStyle);
212
-		 thirdCell.setCellValue("项目阶段");
213
-
214
-		 // 设置下拉列表数据
215
-		 DataValidationHelper validationHelper = sheet.getDataValidationHelper();
216
-		 DataValidationConstraint constraint = validationHelper.createExplicitListConstraint(
217
-				 new String[]{"初始","首批","量产"}); // 下拉列表的选项
218
-
219
-		 // 应用下拉列表到第三列(索引为2)
220
-		 CellRangeAddressList addressList = new CellRangeAddressList(1, 65535, 2, 2); // 从第二行开始到第101行,第三列
221
-		 DataValidation validation = validationHelper.createValidation(constraint, addressList);
222
-		 sheet.addValidationData(validation);
223
-
224
-
225
-
226
-		 // 设置响应头
227
-		 response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
228
-		 response.setHeader("Content-Disposition", "attachment; filename=example-template.xlsx");
229
-
230
-		 // 将工作簿写入输出流
231
-		 workbook.write(response.getOutputStream());
232
-		 workbook.close();
233
-
234
-		 response.flushBuffer();
235
-	 }
236
-
237
-}

+ 26
- 16
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/CostStandardDetailController.java Wyświetl plik

@@ -1,38 +1,38 @@
1 1
 package com.zzsmart.qomo.kn.cost.manage.controller;
2 2
 
3 3
 
4
+import com.alibaba.fastjson.JSONObject;
4 5
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 6
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7
+import com.zzsmart.qomo.kn.cost.manage.entity.CostStandardDetail;
6 8
 import com.zzsmart.qomo.kn.cost.manage.service.CostStandardDetailService;
7
-import com.zzsmart.qomo.kn.cost.manage.service.ICostStandardService;
9
+import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardDetailSearch;
8 10
 import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardDetailVO;
9
-import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardVO;
10 11
 import io.swagger.annotations.Api;
11 12
 import io.swagger.annotations.ApiOperation;
12 13
 import lombok.extern.slf4j.Slf4j;
13 14
 import org.jeecg.common.api.vo.Result;
15
+import org.jeecg.common.system.base.controller.JeecgController;
14 16
 import org.springframework.beans.factory.annotation.Autowired;
15
-import org.springframework.web.bind.annotation.GetMapping;
16
-import org.springframework.web.bind.annotation.RequestMapping;
17
-
18
-import org.springframework.web.bind.annotation.RequestParam;
19
-import org.springframework.web.bind.annotation.RestController;
17
+import org.springframework.web.bind.annotation.*;
20 18
 
21 19
 import javax.servlet.http.HttpServletRequest;
20
+import javax.servlet.http.HttpServletResponse;
21
+import java.io.IOException;
22 22
 
23 23
 /**
24 24
  * <p>
25 25
  * 标准成本明细表 前端控制器
26 26
  * </p>
27 27
  *
28
- * @author cost_purchase_price
28
+ * @author app_scene_cost_purchase_price
29 29
  * @since 2024-06-19
30 30
  */
31
-@Api(tags="标准成本单行查询")
31
+@Api(tags = "cost-标准成本单行查询")
32 32
 @RestController
33 33
 @RequestMapping("//costStandardDetail")
34 34
 @Slf4j
35
-public class CostStandardDetailController {
35
+public class CostStandardDetailController extends JeecgController<CostStandardDetail, CostStandardDetailService> {
36 36
     @Autowired
37 37
     private CostStandardDetailService costStandardDetailService;
38 38
 
@@ -45,16 +45,26 @@ public class CostStandardDetailController {
45 45
      * @param req
46 46
      * @return
47 47
      */
48
-    //@AutoLog(value = "cost_standard-分页列表查询")
49
-    @ApiOperation(value="cost_standard_detail-分页列表查询", notes="cost_standard_detail-分页列表查询")
48
+    //@AutoLog(value = "标准成本单行列表查询")
49
+    @ApiOperation(value = "标准成本单行列表查询", notes = "标准成本单行列表查询")
50 50
     @GetMapping(value = "/list")
51
-    public Result<IPage<CostStandardDetailVO>> queryPageList(CostStandardDetailVO costStandard,
52
-                                                                @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
53
-                                                                @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
54
-                                                                HttpServletRequest req) {
51
+    public Result<IPage<CostStandardDetailVO>> queryPageList(CostStandardDetailVO costStandard, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
55 52
 
56 53
         Page<CostStandardDetailVO> page = new Page<CostStandardDetailVO>(pageNo, pageSize);
57 54
         IPage<CostStandardDetailVO> pageList = costStandardDetailService.pageList(page, costStandard);
58 55
         return Result.OK(pageList);
59 56
     }
57
+
58
+    /**
59
+     * 导出excel
60
+     *
61
+     * @param request
62
+     * @param costStandardDetailSearch
63
+     */
64
+    @RequestMapping(value = "/exportXls", method = RequestMethod.GET)
65
+    @ApiOperation(value = "单行查询导出", notes = "单行查询导出")
66
+    public Result exportXls(HttpServletRequest request, HttpServletResponse response, CostStandardDetailSearch costStandardDetailSearch) throws IOException {
67
+        JSONObject result = costStandardDetailService.exportExcel(request, response, costStandardDetailSearch);
68
+        return Result.OK(result);
69
+    }
60 70
 }

+ 33
- 40
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/CostStandardVersionController.java Wyświetl plik

@@ -2,51 +2,34 @@ package com.zzsmart.qomo.kn.cost.manage.controller;
2 2
 
3 3
 import java.util.Arrays;
4 4
 import java.util.List;
5
-import java.util.Map;
6
-import java.util.stream.Collectors;
7
-import java.io.IOException;
8
-import java.io.UnsupportedEncodingException;
9
-import java.net.URLDecoder;
10 5
 import javax.servlet.http.HttpServletRequest;
11 6
 import javax.servlet.http.HttpServletResponse;
12 7
 
13
-import com.zzsmart.qomo.kn.cost.manage.entity.CostStandard;
14 8
 import com.zzsmart.qomo.kn.cost.manage.entity.CostStandardVersion;
15 9
 import com.zzsmart.qomo.kn.cost.manage.service.ICostStandardVersionService;
16
-import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardVO;
17 10
 import org.jeecg.common.api.vo.Result;
18 11
 import org.jeecg.common.system.query.QueryGenerator;
19
-import org.jeecg.common.util.oConvertUtils;
20 12
 
21 13
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
22 14
 import com.baomidou.mybatisplus.core.metadata.IPage;
23 15
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
24 16
 import lombok.extern.slf4j.Slf4j;
25 17
 
26
-import org.jeecgframework.poi.excel.ExcelImportUtil;
27
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
28
-import org.jeecgframework.poi.excel.entity.ExportParams;
29
-import org.jeecgframework.poi.excel.entity.ImportParams;
30
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
31 18
 import org.jeecg.common.system.base.controller.JeecgController;
32 19
 import org.springframework.beans.factory.annotation.Autowired;
33 20
 import org.springframework.web.bind.annotation.*;
34
-import org.springframework.web.multipart.MultipartFile;
35
-import org.springframework.web.multipart.MultipartHttpServletRequest;
36 21
 import org.springframework.web.servlet.ModelAndView;
37
-import com.alibaba.fastjson.JSON;
38 22
 import io.swagger.annotations.Api;
39 23
 import io.swagger.annotations.ApiOperation;
40 24
 import org.jeecg.common.aspect.annotation.AutoLog;
41
-import org.apache.shiro.authz.annotation.RequiresPermissions;
42 25
 
43
- /**
26
+/**
44 27
  * @Description: 标准成本-版本号
45 28
  * @Author: wangqiong
46 29
  * @Date:   2024-06-13
47 30
  * @Version: V1.0
48 31
  */
49
-@Api(tags="标准成本-版本号")
32
+@Api(tags="cost-标准成本-版本号")
50 33
 @RestController
51 34
 @RequestMapping("//costStandardVersion")
52 35
 @Slf4j
@@ -63,9 +46,9 @@ public class CostStandardVersionController extends JeecgController<CostStandardV
63 46
 	 * @param req
64 47
 	 * @return
65 48
 	 */
66
-	//@AutoLog(value = "cost_standard_version-分页列表查询")
67
-	@ApiOperation(value="cost_standard_version-分页列表查询", notes="cost_standard_version-分页列表查询")
68
-	@GetMapping(value = "/list")
49
+	//@AutoLog(value = "app_scene_cost_standard_version-分页列表查询")
50
+	@ApiOperation(value="app_scene_cost_standard_version-分页列表查询", notes="app_scene_cost_standard_version-分页列表查询")
51
+	@GetMapping(value = "/pageList")
69 52
 	public Result<IPage<CostStandardVersion>> queryPageList(CostStandardVersion costStandardVersion,
70 53
 								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
71 54
 								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
@@ -75,16 +58,26 @@ public class CostStandardVersionController extends JeecgController<CostStandardV
75 58
 		IPage<CostStandardVersion> pageList = costStandardVersionService.page(page, queryWrapper);
76 59
 		return Result.OK(pageList);
77 60
 	}
78
-	
61
+	 /**
62
+	  * 列表查询
63
+	  *
64
+	  * @return
65
+	  */
66
+	 @ApiOperation(value="版本号列表查询", notes="版本号列表查询")
67
+	 @GetMapping(value = "/list")
68
+	 public Result<  List<CostStandardVersion>> queryList(@RequestParam(name = "versionNumber",required = false) String versionNumber) {
69
+		 List<CostStandardVersion> list = costStandardVersionService.queryListResult(versionNumber);
70
+		 return Result.OK(list);
71
+	 }
79 72
 	/**
80 73
 	 *   添加
81 74
 	 *
82 75
 	 * @param costStandardVersion
83 76
 	 * @return
84 77
 	 */
85
-	@AutoLog(value = "cost_standard_version-添加")
86
-	@ApiOperation(value="cost_standard_version-添加", notes="cost_standard_version-添加")
87
-//	@RequiresPermissions(":cost_standard_version:add")
78
+	@AutoLog(value = "app_scene_cost_standard_version-添加")
79
+	@ApiOperation(value="app_scene_cost_standard_version-添加", notes="app_scene_cost_standard_version-添加")
80
+//	@RequiresPermissions(":app_scene_cost_standard_version:add")
88 81
 	@PostMapping(value = "/add")
89 82
 	public Result<String> add(@RequestBody CostStandardVersion costStandardVersion) {
90 83
 		boolean save = costStandardVersionService.save(costStandardVersion);
@@ -101,9 +94,9 @@ public class CostStandardVersionController extends JeecgController<CostStandardV
101 94
 	 * @param costStandardVersion
102 95
 	 * @return
103 96
 	 */
104
-	@AutoLog(value = "cost_standard_version-编辑")
105
-	@ApiOperation(value="cost_standard_version-编辑", notes="cost_standard_version-编辑")
106
-//	@RequiresPermissions(":cost_standard_version:edit")
97
+	@AutoLog(value = "app_scene_cost_standard_version-编辑")
98
+	@ApiOperation(value="app_scene_cost_standard_version-编辑", notes="app_scene_cost_standard_version-编辑")
99
+//	@RequiresPermissions(":app_scene_cost_standard_version:edit")
107 100
 	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
108 101
 	public Result<String> edit(@RequestBody CostStandardVersion costStandardVersion) {
109 102
 		costStandardVersionService.updateById(costStandardVersion);
@@ -116,9 +109,9 @@ public class CostStandardVersionController extends JeecgController<CostStandardV
116 109
 	 * @param id
117 110
 	 * @return
118 111
 	 */
119
-	@AutoLog(value = "cost_standard_version-通过id删除")
120
-	@ApiOperation(value="cost_standard_version-通过id删除", notes="cost_standard_version-通过id删除")
121
-//	@RequiresPermissions(":cost_standard_version:delete")
112
+	@AutoLog(value = "app_scene_cost_standard_version-通过id删除")
113
+	@ApiOperation(value="app_scene_cost_standard_version-通过id删除", notes="app_scene_cost_standard_version-通过id删除")
114
+//	@RequiresPermissions(":app_scene_cost_standard_version:delete")
122 115
 	@DeleteMapping(value = "/delete")
123 116
 	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
124 117
 		costStandardVersionService.removeById(id);
@@ -131,9 +124,9 @@ public class CostStandardVersionController extends JeecgController<CostStandardV
131 124
 	 * @param ids
132 125
 	 * @return
133 126
 	 */
134
-	@AutoLog(value = "cost_standard_version-批量删除")
135
-	@ApiOperation(value="cost_standard_version-批量删除", notes="cost_standard_version-批量删除")
136
-//	@RequiresPermissions(":cost_standard_version:deleteBatch")
127
+	@AutoLog(value = "app_scene_cost_standard_version-批量删除")
128
+	@ApiOperation(value="app_scene_cost_standard_version-批量删除", notes="app_scene_cost_standard_version-批量删除")
129
+//	@RequiresPermissions(":app_scene_cost_standard_version:deleteBatch")
137 130
 	@DeleteMapping(value = "/deleteBatch")
138 131
 	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
139 132
 		this.costStandardVersionService.removeByIds(Arrays.asList(ids.split(",")));
@@ -146,8 +139,8 @@ public class CostStandardVersionController extends JeecgController<CostStandardV
146 139
 	 * @param id
147 140
 	 * @return
148 141
 	 */
149
-	//@AutoLog(value = "cost_standard_version-通过id查询")
150
-	@ApiOperation(value="cost_standard_version-通过id查询", notes="cost_standard_version-通过id查询")
142
+	//@AutoLog(value = "app_scene_cost_standard_version-通过id查询")
143
+	@ApiOperation(value="app_scene_cost_standard_version-通过id查询", notes="app_scene_cost_standard_version-通过id查询")
151 144
 	@GetMapping(value = "/queryById")
152 145
 	public Result<CostStandardVersion> queryById(@RequestParam(name="id",required=true) String id) {
153 146
 		CostStandardVersion costStandardVersion = costStandardVersionService.getById(id);
@@ -163,10 +156,10 @@ public class CostStandardVersionController extends JeecgController<CostStandardV
163 156
     * @param request
164 157
     * @param costStandardVersion
165 158
     */
166
-//    @RequiresPermissions(":cost_standard_version:exportXls")
159
+//    @RequiresPermissions(":app_scene_cost_standard_version:exportXls")
167 160
     @RequestMapping(value = "/exportXls", method = RequestMethod.GET)
168 161
     public ModelAndView exportXls(HttpServletRequest request, CostStandardVersion costStandardVersion) {
169
-        return super.exportXls(request, costStandardVersion, CostStandardVersion.class, "cost_standard_version");
162
+        return super.exportXls(request, costStandardVersion, CostStandardVersion.class, "app_scene_cost_standard_version");
170 163
     }
171 164
 
172 165
     /**
@@ -176,7 +169,7 @@ public class CostStandardVersionController extends JeecgController<CostStandardV
176 169
     * @param response
177 170
     * @return
178 171
     */
179
-//    @RequiresPermissions(":cost_standard_version:importExcel")
172
+//    @RequiresPermissions(":app_scene_cost_standard_version:importExcel")
180 173
     @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
181 174
     public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
182 175
         return this.costStandardVersionService.importExcel(request, response, CostStandardVersion.class);

+ 1
- 1
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/HourRateController.java Wyświetl plik

@@ -27,7 +27,7 @@ import java.util.Arrays;
27 27
  * @Date:   2024-06-06
28 28
  * @Version: V1.0
29 29
  */
30
-@Api(tags="小时费率")
30
+@Api(tags="cost-小时费率")
31 31
 @RestController
32 32
 @RequestMapping("//hourRate")
33 33
 @Slf4j

+ 0
- 180
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/LatestPurchasePriceController.java Wyświetl plik

@@ -1,180 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.controller;
2
-
3
-import java.util.Arrays;
4
-import java.util.List;
5
-import java.util.Map;
6
-import java.util.stream.Collectors;
7
-import java.io.IOException;
8
-import java.io.UnsupportedEncodingException;
9
-import java.net.URLDecoder;
10
-import javax.servlet.http.HttpServletRequest;
11
-import javax.servlet.http.HttpServletResponse;
12
-
13
-import com.zzsmart.qomo.kn.cost.manage.entity.LatestPurchasePrice;
14
-import com.zzsmart.qomo.kn.cost.manage.service.ILatestPurchasePriceService;
15
-import org.jeecg.common.api.vo.Result;
16
-import org.jeecg.common.system.query.QueryGenerator;
17
-import org.jeecg.common.util.oConvertUtils;
18
-
19
-
20
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
21
-import com.baomidou.mybatisplus.core.metadata.IPage;
22
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
23
-import lombok.extern.slf4j.Slf4j;
24
-
25
-import org.jeecgframework.poi.excel.ExcelImportUtil;
26
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
27
-import org.jeecgframework.poi.excel.entity.ExportParams;
28
-import org.jeecgframework.poi.excel.entity.ImportParams;
29
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
30
-import org.jeecg.common.system.base.controller.JeecgController;
31
-import org.springframework.beans.factory.annotation.Autowired;
32
-import org.springframework.web.bind.annotation.*;
33
-import org.springframework.web.multipart.MultipartFile;
34
-import org.springframework.web.multipart.MultipartHttpServletRequest;
35
-import org.springframework.web.servlet.ModelAndView;
36
-import com.alibaba.fastjson.JSON;
37
-import io.swagger.annotations.Api;
38
-import io.swagger.annotations.ApiOperation;
39
-import org.jeecg.common.aspect.annotation.AutoLog;
40
-import org.apache.shiro.authz.annotation.RequiresPermissions;
41
-
42
- /**
43
- * @Description: latest_purchase_price
44
- * @Author: jeecg-boot
45
- * @Date:   2024-06-11
46
- * @Version: V1.0
47
- */
48
-@Api(tags="最新采购价")
49
-@RestController
50
-@RequestMapping("//latestPurchasePrice")
51
-@Slf4j
52
-public class LatestPurchasePriceController extends JeecgController<LatestPurchasePrice, ILatestPurchasePriceService> {
53
-	@Autowired
54
-	private ILatestPurchasePriceService latestPurchasePriceService;
55
-	
56
-	/**
57
-	 * 分页列表查询
58
-	 *
59
-	 * @param latestPurchasePrice
60
-	 * @param pageNo
61
-	 * @param pageSize
62
-	 * @param req
63
-	 * @return
64
-	 */
65
-	//@AutoLog(value = "latest_purchase_price-分页列表查询")
66
-	@ApiOperation(value="latest_purchase_price-分页列表查询", notes="latest_purchase_price-分页列表查询")
67
-	@GetMapping(value = "/list")
68
-	public Result<IPage<LatestPurchasePrice>> queryPageList(LatestPurchasePrice latestPurchasePrice,
69
-								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
70
-								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
71
-								   HttpServletRequest req) {
72
-		QueryWrapper<LatestPurchasePrice> queryWrapper = QueryGenerator.initQueryWrapper(latestPurchasePrice, req.getParameterMap());
73
-		Page<LatestPurchasePrice> page = new Page<LatestPurchasePrice>(pageNo, pageSize);
74
-		IPage<LatestPurchasePrice> pageList = latestPurchasePriceService.page(page, queryWrapper);
75
-		return Result.OK(pageList);
76
-	}
77
-	
78
-	/**
79
-	 *   添加
80
-	 *
81
-	 * @param latestPurchasePrice
82
-	 * @return
83
-	 */
84
-	@AutoLog(value = "latest_purchase_price-添加")
85
-	@ApiOperation(value="latest_purchase_price-添加", notes="latest_purchase_price-添加")
86
-//	@RequiresPermissions(":latest_purchase_price:add")
87
-	@PostMapping(value = "/add")
88
-	public Result<String> add(@RequestBody LatestPurchasePrice latestPurchasePrice) {
89
-		latestPurchasePriceService.save(latestPurchasePrice);
90
-		return Result.OK("添加成功!");
91
-	}
92
-	
93
-	/**
94
-	 *  编辑
95
-	 *
96
-	 * @param latestPurchasePrice
97
-	 * @return
98
-	 */
99
-	@AutoLog(value = "latest_purchase_price-编辑")
100
-	@ApiOperation(value="latest_purchase_price-编辑", notes="latest_purchase_price-编辑")
101
-//	@RequiresPermissions(":latest_purchase_price:edit")
102
-	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
103
-	public Result<String> edit(@RequestBody LatestPurchasePrice latestPurchasePrice) {
104
-		latestPurchasePriceService.updateById(latestPurchasePrice);
105
-		return Result.OK("编辑成功!");
106
-	}
107
-	
108
-	/**
109
-	 *   通过id删除
110
-	 *
111
-	 * @param id
112
-	 * @return
113
-	 */
114
-	@AutoLog(value = "latest_purchase_price-通过id删除")
115
-	@ApiOperation(value="latest_purchase_price-通过id删除", notes="latest_purchase_price-通过id删除")
116
-//	@RequiresPermissions(":latest_purchase_price:delete")
117
-	@DeleteMapping(value = "/delete")
118
-	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
119
-		latestPurchasePriceService.removeById(id);
120
-		return Result.OK("删除成功!");
121
-	}
122
-	
123
-	/**
124
-	 *  批量删除
125
-	 *
126
-	 * @param ids
127
-	 * @return
128
-	 */
129
-	@AutoLog(value = "latest_purchase_price-批量删除")
130
-	@ApiOperation(value="latest_purchase_price-批量删除", notes="latest_purchase_price-批量删除")
131
-//	@RequiresPermissions(":latest_purchase_price:deleteBatch")
132
-	@DeleteMapping(value = "/deleteBatch")
133
-	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
134
-		this.latestPurchasePriceService.removeByIds(Arrays.asList(ids.split(",")));
135
-		return Result.OK("批量删除成功!");
136
-	}
137
-	
138
-	/**
139
-	 * 通过id查询
140
-	 *
141
-	 * @param id
142
-	 * @return
143
-	 */
144
-	//@AutoLog(value = "latest_purchase_price-通过id查询")
145
-	@ApiOperation(value="latest_purchase_price-通过id查询", notes="latest_purchase_price-通过id查询")
146
-	@GetMapping(value = "/queryById")
147
-	public Result<LatestPurchasePrice> queryById(@RequestParam(name="id",required=true) String id) {
148
-		LatestPurchasePrice latestPurchasePrice = latestPurchasePriceService.getById(id);
149
-		if(latestPurchasePrice==null) {
150
-			return Result.error("未找到对应数据");
151
-		}
152
-		return Result.OK(latestPurchasePrice);
153
-	}
154
-
155
-    /**
156
-    * 导出excel
157
-    *
158
-    * @param request
159
-    * @param latestPurchasePrice
160
-    */
161
-    @RequiresPermissions(":latest_purchase_price:exportXls")
162
-    @RequestMapping(value = "/exportXls", method = RequestMethod.GET)
163
-    public ModelAndView exportXls(HttpServletRequest request, LatestPurchasePrice latestPurchasePrice) {
164
-        return super.exportXls(request, latestPurchasePrice, LatestPurchasePrice.class, "latest_purchase_price");
165
-    }
166
-
167
-    /**
168
-      * 通过excel导入数据
169
-    *
170
-    * @param request
171
-    * @param response
172
-    * @return
173
-    */
174
-//    @RequiresPermissions(":latest_purchase_price:importExcel")
175
-    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
176
-    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
177
-        return super.importExcel(request, response, LatestPurchasePrice.class);
178
-    }
179
-
180
-}

+ 0
- 181
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/ProduceBatchController.java Wyświetl plik

@@ -1,181 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.controller;
2
-
3
-import java.util.ArrayList;
4
-import java.util.Arrays;
5
-import java.util.List;
6
-import java.util.Map;
7
-import java.util.stream.Collectors;
8
-import java.io.IOException;
9
-import java.io.UnsupportedEncodingException;
10
-import java.net.URLDecoder;
11
-import javax.servlet.http.HttpServletRequest;
12
-import javax.servlet.http.HttpServletResponse;
13
-
14
-import com.zzsmart.qomo.kn.cost.manage.entity.ProduceBatch;
15
-import com.zzsmart.qomo.kn.cost.manage.service.IProduceBatchService;
16
-import org.jeecg.common.api.vo.Result;
17
-import org.jeecg.common.system.query.QueryGenerator;
18
-import org.jeecg.common.util.oConvertUtils;
19
-
20
-
21
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
22
-import com.baomidou.mybatisplus.core.metadata.IPage;
23
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
24
-import lombok.extern.slf4j.Slf4j;
25
-
26
-import org.jeecgframework.poi.excel.ExcelImportUtil;
27
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
28
-import org.jeecgframework.poi.excel.entity.ExportParams;
29
-import org.jeecgframework.poi.excel.entity.ImportParams;
30
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
31
-import org.jeecg.common.system.base.controller.JeecgController;
32
-import org.springframework.beans.factory.annotation.Autowired;
33
-import org.springframework.web.bind.annotation.*;
34
-import org.springframework.web.multipart.MultipartFile;
35
-import org.springframework.web.multipart.MultipartHttpServletRequest;
36
-import org.springframework.web.servlet.ModelAndView;
37
-import com.alibaba.fastjson.JSON;
38
-import io.swagger.annotations.Api;
39
-import io.swagger.annotations.ApiOperation;
40
-import org.jeecg.common.aspect.annotation.AutoLog;
41
-import org.apache.shiro.authz.annotation.RequiresPermissions;
42
-
43
- /**
44
- * @Description: produce_batch
45
- * @Author: jeecg-boot
46
- * @Date:   2024-06-11
47
- * @Version: V1.0
48
- */
49
-@Api(tags="生产批量设置")
50
-@RestController
51
-@RequestMapping("//produceBatch")
52
-@Slf4j
53
-public class ProduceBatchController extends JeecgController<ProduceBatch, IProduceBatchService> {
54
-	@Autowired
55
-	private IProduceBatchService produceBatchService;
56
-	
57
-	/**
58
-	 * 分页列表查询
59
-	 *
60
-	 * @param produceBatch
61
-	 * @param pageNo
62
-	 * @param pageSize
63
-	 * @param req
64
-	 * @return
65
-	 */
66
-	//@AutoLog(value = "produce_batch-分页列表查询")
67
-	@ApiOperation(value="produce_batch-分页列表查询", notes="produce_batch-分页列表查询")
68
-	@GetMapping(value = "/list")
69
-	public Result<IPage<ProduceBatch>> queryPageList(ProduceBatch produceBatch,
70
-								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
71
-								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
72
-								   HttpServletRequest req) {
73
-		QueryWrapper<ProduceBatch> queryWrapper = QueryGenerator.initQueryWrapper(produceBatch, req.getParameterMap());
74
-		Page<ProduceBatch> page = new Page<ProduceBatch>(pageNo, pageSize);
75
-		IPage<ProduceBatch> pageList = produceBatchService.page(page, queryWrapper);
76
-		return Result.OK(pageList);
77
-	}
78
-	
79
-	/**
80
-	 *   添加
81
-	 *
82
-	 * @param produceBatch
83
-	 * @return
84
-	 */
85
-	@AutoLog(value = "produce_batch-添加")
86
-	@ApiOperation(value="produce_batch-添加", notes="produce_batch-添加")
87
-//	@RequiresPermissions(":produce_batch:add")
88
-	@PostMapping(value = "/add")
89
-	public Result<String> add(@RequestBody ProduceBatch produceBatch) {
90
-		produceBatchService.save(produceBatch);
91
-		return Result.OK("添加成功!");
92
-	}
93
-	
94
-	/**
95
-	 *  编辑
96
-	 *
97
-	 * @param produceBatch
98
-	 * @return
99
-	 */
100
-	@AutoLog(value = "produce_batch-编辑")
101
-	@ApiOperation(value="produce_batch-编辑", notes="produce_batch-编辑")
102
-//	@RequiresPermissions(":produce_batch:edit")
103
-	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
104
-	public Result<String> edit(@RequestBody ProduceBatch produceBatch) {
105
-		produceBatchService.updateById(produceBatch);
106
-		return Result.OK("编辑成功!");
107
-	}
108
-	
109
-	/**
110
-	 *   通过id删除
111
-	 *
112
-	 * @param id
113
-	 * @return
114
-	 */
115
-	@AutoLog(value = "produce_batch-通过id删除")
116
-	@ApiOperation(value="produce_batch-通过id删除", notes="produce_batch-通过id删除")
117
-//	@RequiresPermissions(":produce_batch:delete")
118
-	@DeleteMapping(value = "/delete")
119
-	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
120
-		produceBatchService.removeById(id);
121
-		return Result.OK("删除成功!");
122
-	}
123
-	
124
-	/**
125
-	 *  批量删除
126
-	 *
127
-	 * @param ids
128
-	 * @return
129
-	 */
130
-	@AutoLog(value = "produce_batch-批量删除")
131
-	@ApiOperation(value="produce_batch-批量删除", notes="produce_batch-批量删除")
132
-//	@RequiresPermissions(":produce_batch:deleteBatch")
133
-	@DeleteMapping(value = "/deleteBatch")
134
-	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
135
-		this.produceBatchService.removeByIds(Arrays.asList(ids.split(",")));
136
-
137
-		return Result.OK("批量删除成功!");
138
-	}
139
-	/**
140
-	 * 通过id查询
141
-	 *
142
-	 * @param id
143
-	 * @return
144
-	 */
145
-	//@AutoLog(value = "produce_batch-通过id查询")
146
-	@ApiOperation(value="produce_batch-通过id查询", notes="produce_batch-通过id查询")
147
-	@GetMapping(value = "/queryById")
148
-	public Result<ProduceBatch> queryById(@RequestParam(name="id",required=true) String id) {
149
-		ProduceBatch produceBatch = produceBatchService.getById(id);
150
-		if(produceBatch==null) {
151
-			return Result.error("未找到对应数据");
152
-		}
153
-		return Result.OK(produceBatch);
154
-	}
155
-
156
-    /**
157
-    * 导出excel
158
-    *
159
-    * @param request
160
-    * @param produceBatch
161
-    */
162
-    @RequiresPermissions(":produce_batch:exportXls")
163
-    @RequestMapping(value = "/exportXls", method = RequestMethod.GET)
164
-    public ModelAndView exportXls(HttpServletRequest request, ProduceBatch produceBatch) {
165
-        return super.exportXls(request, produceBatch, ProduceBatch.class, "produce_batch");
166
-    }
167
-
168
-    /**
169
-      * 通过excel导入数据
170
-    *
171
-    * @param request
172
-    * @param response
173
-    * @return
174
-    */
175
-//    @RequiresPermissions(":produce_batch:importExcel")
176
-    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
177
-    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
178
-        return super.importExcel(request, response, ProduceBatch.class);
179
-    }
180
-
181
-}

+ 0
- 178
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/SapSubfactoryController.java Wyświetl plik

@@ -1,178 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.controller;
2
-
3
-import java.util.Arrays;
4
-import java.util.List;
5
-import java.util.Map;
6
-import java.util.stream.Collectors;
7
-import java.io.IOException;
8
-import java.io.UnsupportedEncodingException;
9
-import java.net.URLDecoder;
10
-import javax.servlet.http.HttpServletRequest;
11
-import javax.servlet.http.HttpServletResponse;
12
-import org.jeecg.common.api.vo.Result;
13
-import org.jeecg.common.system.query.QueryGenerator;
14
-import org.jeecg.common.util.oConvertUtils;
15
-import com.zzsmart.qomo.kn.cost.manage.entity.SapSubfactory;
16
-import com.zzsmart.qomo.kn.cost.manage.service.ISapSubfactoryService;
17
-
18
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
19
-import com.baomidou.mybatisplus.core.metadata.IPage;
20
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
21
-import lombok.extern.slf4j.Slf4j;
22
-
23
-import org.jeecgframework.poi.excel.ExcelImportUtil;
24
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
25
-import org.jeecgframework.poi.excel.entity.ExportParams;
26
-import org.jeecgframework.poi.excel.entity.ImportParams;
27
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
28
-import org.jeecg.common.system.base.controller.JeecgController;
29
-import org.springframework.beans.factory.annotation.Autowired;
30
-import org.springframework.web.bind.annotation.*;
31
-import org.springframework.web.multipart.MultipartFile;
32
-import org.springframework.web.multipart.MultipartHttpServletRequest;
33
-import org.springframework.web.servlet.ModelAndView;
34
-import com.alibaba.fastjson.JSON;
35
-import io.swagger.annotations.Api;
36
-import io.swagger.annotations.ApiOperation;
37
-import org.jeecg.common.aspect.annotation.AutoLog;
38
-import org.apache.shiro.authz.annotation.RequiresPermissions;
39
-
40
- /**
41
- * @Description: sap_subfactory
42
- * @Author: jeecg-boot
43
- * @Date:   2024-06-11
44
- * @Version: V1.0
45
- */
46
-@Api(tags="工厂信息")
47
-@RestController
48
-@RequestMapping("/com.zzsmart.qomo.kn.cost.manage/sapSubfactory")
49
-@Slf4j
50
-public class SapSubfactoryController extends JeecgController<SapSubfactory, ISapSubfactoryService> {
51
-	@Autowired
52
-	private ISapSubfactoryService sapSubfactoryService;
53
-	
54
-	/**
55
-	 * 分页列表查询
56
-	 *
57
-	 * @param sapSubfactory
58
-	 * @param pageNo
59
-	 * @param pageSize
60
-	 * @param req
61
-	 * @return
62
-	 */
63
-	//@AutoLog(value = "sap_subfactory-分页列表查询")
64
-	@ApiOperation(value="sap_subfactory-分页列表查询", notes="sap_subfactory-分页列表查询")
65
-	@GetMapping(value = "/list")
66
-	public Result<IPage<SapSubfactory>> queryPageList(SapSubfactory sapSubfactory,
67
-								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
68
-								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
69
-								   HttpServletRequest req) {
70
-		QueryWrapper<SapSubfactory> queryWrapper = QueryGenerator.initQueryWrapper(sapSubfactory, req.getParameterMap());
71
-		Page<SapSubfactory> page = new Page<SapSubfactory>(pageNo, pageSize);
72
-		IPage<SapSubfactory> pageList = sapSubfactoryService.page(page, queryWrapper);
73
-		return Result.OK(pageList);
74
-	}
75
-	
76
-	/**
77
-	 *   添加
78
-	 *
79
-	 * @param sapSubfactory
80
-	 * @return
81
-	 */
82
-	@AutoLog(value = "sap_subfactory-添加")
83
-	@ApiOperation(value="sap_subfactory-添加", notes="sap_subfactory-添加")
84
-	//@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:sap_subfactory:add")
85
-	@PostMapping(value = "/add")
86
-	public Result<String> add(@RequestBody SapSubfactory sapSubfactory) {
87
-		sapSubfactoryService.save(sapSubfactory);
88
-		return Result.OK("添加成功!");
89
-	}
90
-	
91
-	/**
92
-	 *  编辑
93
-	 *
94
-	 * @param sapSubfactory
95
-	 * @return
96
-	 */
97
-	@AutoLog(value = "sap_subfactory-编辑")
98
-	@ApiOperation(value="sap_subfactory-编辑", notes="sap_subfactory-编辑")
99
-	//@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:sap_subfactory:edit")
100
-	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
101
-	public Result<String> edit(@RequestBody SapSubfactory sapSubfactory) {
102
-		sapSubfactoryService.updateById(sapSubfactory);
103
-		return Result.OK("编辑成功!");
104
-	}
105
-	
106
-	/**
107
-	 *   通过id删除
108
-	 *
109
-	 * @param id
110
-	 * @return
111
-	 */
112
-	@AutoLog(value = "sap_subfactory-通过id删除")
113
-	@ApiOperation(value="sap_subfactory-通过id删除", notes="sap_subfactory-通过id删除")
114
-	//@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:sap_subfactory:delete")
115
-	@DeleteMapping(value = "/delete")
116
-	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
117
-		sapSubfactoryService.removeById(id);
118
-		return Result.OK("删除成功!");
119
-	}
120
-	
121
-	/**
122
-	 *  批量删除
123
-	 *
124
-	 * @param ids
125
-	 * @return
126
-	 */
127
-	@AutoLog(value = "sap_subfactory-批量删除")
128
-	@ApiOperation(value="sap_subfactory-批量删除", notes="sap_subfactory-批量删除")
129
-	//@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:sap_subfactory:deleteBatch")
130
-	@DeleteMapping(value = "/deleteBatch")
131
-	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
132
-		this.sapSubfactoryService.removeByIds(Arrays.asList(ids.split(",")));
133
-		return Result.OK("批量删除成功!");
134
-	}
135
-	
136
-	/**
137
-	 * 通过id查询
138
-	 *
139
-	 * @param id
140
-	 * @return
141
-	 */
142
-	//@AutoLog(value = "sap_subfactory-通过id查询")
143
-	@ApiOperation(value="sap_subfactory-通过id查询", notes="sap_subfactory-通过id查询")
144
-	@GetMapping(value = "/queryById")
145
-	public Result<SapSubfactory> queryById(@RequestParam(name="id",required=true) String id) {
146
-		SapSubfactory sapSubfactory = sapSubfactoryService.getById(id);
147
-		if(sapSubfactory==null) {
148
-			return Result.error("未找到对应数据");
149
-		}
150
-		return Result.OK(sapSubfactory);
151
-	}
152
-
153
-    /**
154
-    * 导出excel
155
-    *
156
-    * @param request
157
-    * @param sapSubfactory
158
-    */
159
-    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:sap_subfactory:exportXls")
160
-    @RequestMapping(value = "/exportXls")
161
-    public ModelAndView exportXls(HttpServletRequest request, SapSubfactory sapSubfactory) {
162
-        return super.exportXls(request, sapSubfactory, SapSubfactory.class, "sap_subfactory");
163
-    }
164
-
165
-    /**
166
-      * 通过excel导入数据
167
-    *
168
-    * @param request
169
-    * @param response
170
-    * @return
171
-    */
172
-    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:sap_subfactory:importExcel")
173
-    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
174
-    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
175
-        return super.importExcel(request, response, SapSubfactory.class);
176
-    }
177
-
178
-}

+ 85
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostCount.java Wyświetl plik

@@ -0,0 +1,85 @@
1
+package com.zzsmart.qomo.kn.cost.manage.entity;
2
+
3
+import java.io.Serializable;
4
+import java.io.UnsupportedEncodingException;
5
+import java.util.Date;
6
+import java.math.BigDecimal;
7
+import com.baomidou.mybatisplus.annotation.IdType;
8
+import com.baomidou.mybatisplus.annotation.TableId;
9
+import com.baomidou.mybatisplus.annotation.TableName;
10
+import com.baomidou.mybatisplus.annotation.TableLogic;
11
+import lombok.Builder;
12
+import lombok.Data;
13
+import com.fasterxml.jackson.annotation.JsonFormat;
14
+import org.springframework.format.annotation.DateTimeFormat;
15
+import org.jeecgframework.poi.excel.annotation.Excel;
16
+import org.jeecg.common.aspect.annotation.Dict;
17
+import io.swagger.annotations.ApiModel;
18
+import io.swagger.annotations.ApiModelProperty;
19
+import lombok.EqualsAndHashCode;
20
+import lombok.experimental.Accessors;
21
+
22
+/**
23
+ * @Description: app_scene_cost_count
24
+ * @Author: jeecg-boot
25
+ * @Date:   2024-07-29
26
+ * @Version: V1.0
27
+ */
28
+@Data
29
+@TableName("app_scene_cost_count")
30
+@Builder
31
+@Accessors(chain = true)
32
+@EqualsAndHashCode(callSuper = false)
33
+@ApiModel(value="app_scene_cost_count对象", description="app_scene_cost_count")
34
+public class AppSceneCostCount implements Serializable {
35
+    private static final long serialVersionUID = 1L;
36
+
37
+	/**主键*/
38
+	@TableId(type = IdType.ASSIGN_ID)
39
+    @ApiModelProperty(value = "主键")
40
+    private Integer id;
41
+	/**物料编号*/
42
+	@Excel(name = "物料编号", width = 15)
43
+    @ApiModelProperty(value = "物料编号")
44
+    private String materialNo;
45
+	/**图号*/
46
+	@Excel(name = "图号", width = 15)
47
+    @ApiModelProperty(value = "图号")
48
+    private String drawingNo;
49
+	/**stage*/
50
+	@Excel(name = "stage", width = 15)
51
+    @ApiModelProperty(value = "stage")
52
+    private String stage;
53
+	/**标准成本计算流程id*/
54
+	@Excel(name = "标准成本计算流程id", width = 15)
55
+    @ApiModelProperty(value = "标准成本计算流程id")
56
+    private Integer flowDefinitionId;
57
+	/**year*/
58
+	@Excel(name = "year", width = 15)
59
+    @ApiModelProperty(value = "year")
60
+    private String year;
61
+	/**状态*/
62
+	@Excel(name = "状态", width = 15)
63
+    @ApiModelProperty(value = "状态")
64
+    private Integer status;
65
+	/**模型版本*/
66
+	@Excel(name = "模型版本", width = 15)
67
+    @ApiModelProperty(value = "模型版本")
68
+    private String costVersion;
69
+	/**创建人*/
70
+    @ApiModelProperty(value = "创建人")
71
+    private Integer createBy;
72
+	/**创建时间*/
73
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
74
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
75
+    @ApiModelProperty(value = "创建时间")
76
+    private Date createTime;
77
+	/**更新人*/
78
+    @ApiModelProperty(value = "更新人")
79
+    private Integer updateBy;
80
+	/**更新时间*/
81
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
82
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
83
+    @ApiModelProperty(value = "更新时间")
84
+    private Date updateTime;
85
+}

+ 75
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostModel.java Wyświetl plik

@@ -0,0 +1,75 @@
1
+package com.zzsmart.qomo.kn.cost.manage.entity;
2
+
3
+import java.io.Serializable;
4
+import java.io.UnsupportedEncodingException;
5
+import java.util.Date;
6
+import java.math.BigDecimal;
7
+import com.baomidou.mybatisplus.annotation.IdType;
8
+import com.baomidou.mybatisplus.annotation.TableId;
9
+import com.baomidou.mybatisplus.annotation.TableName;
10
+import com.baomidou.mybatisplus.annotation.TableLogic;
11
+import lombok.Data;
12
+import com.fasterxml.jackson.annotation.JsonFormat;
13
+import org.springframework.format.annotation.DateTimeFormat;
14
+import org.jeecgframework.poi.excel.annotation.Excel;
15
+import org.jeecg.common.aspect.annotation.Dict;
16
+import io.swagger.annotations.ApiModel;
17
+import io.swagger.annotations.ApiModelProperty;
18
+import lombok.EqualsAndHashCode;
19
+import lombok.experimental.Accessors;
20
+
21
+/**
22
+ * @Description: app_scene_cost_model
23
+ * @Author: jeecg-boot
24
+ * @Date:   2024-07-29
25
+ * @Version: V1.0
26
+ */
27
+@Data
28
+@TableName("app_scene_cost_model")
29
+@Accessors(chain = true)
30
+@EqualsAndHashCode(callSuper = false)
31
+@ApiModel(value="app_scene_cost_model对象", description="app_scene_cost_model")
32
+public class AppSceneCostModel implements Serializable {
33
+    private static final long serialVersionUID = 1L;
34
+
35
+	/**主键*/
36
+	@TableId(type = IdType.ASSIGN_ID)
37
+    @ApiModelProperty(value = "主键")
38
+    private Integer id;
39
+	/**物料编号*/
40
+	@Excel(name = "物料编号", width = 15)
41
+    @ApiModelProperty(value = "物料编号")
42
+    private String materialNo;
43
+	/**图号*/
44
+	@Excel(name = "图号", width = 15)
45
+    @ApiModelProperty(value = "图号")
46
+    private String drawingNo;
47
+	/**标准成本计算流程id*/
48
+	@Excel(name = "标准成本计算流程id", width = 15)
49
+    @ApiModelProperty(value = "标准成本计算流程id")
50
+    private Integer flowDefinitionId;
51
+	/**状态*/
52
+	@Excel(name = "状态", width = 15)
53
+    @ApiModelProperty(value = "状态")
54
+    private Integer status;
55
+	/**模型版本*/
56
+	@Excel(name = "模型版本", width = 15)
57
+    @ApiModelProperty(value = "模型版本")
58
+    private String modelVersion;
59
+	/**创建人*/
60
+    @ApiModelProperty(value = "创建人")
61
+    private Integer createBy;
62
+	/**创建时间*/
63
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
64
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
65
+    @ApiModelProperty(value = "创建时间")
66
+    private Date createTime;
67
+	/**更新人*/
68
+    @ApiModelProperty(value = "更新人")
69
+    private Integer updateBy;
70
+	/**更新时间*/
71
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
72
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
73
+    @ApiModelProperty(value = "更新时间")
74
+    private Date updateTime;
75
+}

+ 118
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostResultValue.java Wyświetl plik

@@ -0,0 +1,118 @@
1
+package com.zzsmart.qomo.kn.cost.manage.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import com.fasterxml.jackson.annotation.JsonFormat;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Builder;
10
+import lombok.Data;
11
+import lombok.EqualsAndHashCode;
12
+import lombok.experimental.Accessors;
13
+import org.jeecgframework.poi.excel.annotation.Excel;
14
+import org.springframework.format.annotation.DateTimeFormat;
15
+
16
+import java.io.Serializable;
17
+import java.util.Date;
18
+
19
+/**
20
+ * @Description: app_scene_cost_result_value
21
+ * @Author: jeecg-boot
22
+ * @Date: 2024-07-25
23
+ * @Version: V1.0
24
+ */
25
+@Data
26
+@Builder
27
+@TableName("app_scene_cost_result_value")
28
+@Accessors(chain = true)
29
+@EqualsAndHashCode(callSuper = false)
30
+@ApiModel(value = "app_scene_cost_result_value对象", description = "app_scene_cost_result_value")
31
+public class AppSceneCostResultValue implements Serializable {
32
+    private static final long serialVersionUID = 1L;
33
+
34
+    /**
35
+     * 主键
36
+     */
37
+    @TableId(type = IdType.ASSIGN_ID)
38
+    @ApiModelProperty(value = "主键")
39
+    private Integer id;
40
+    /**
41
+     * 所属最上级物料号
42
+     */
43
+    @Excel(name = "所属最上级物料号", width = 15)
44
+    @ApiModelProperty(value = "所属最上级物料号")
45
+    private String belongTopMaterialNo;
46
+    /**
47
+     * 物料编号
48
+     */
49
+    @Excel(name = "物料编号", width = 15)
50
+    @ApiModelProperty(value = "物料编号")
51
+    private String marterialNo;
52
+    /**
53
+     * 父类物料编号
54
+     */
55
+    @Excel(name = "父类物料编号", width = 15)
56
+    @ApiModelProperty(value = "父类物料编号")
57
+    private String parentMarterialNo;
58
+    /**
59
+     * 数量
60
+     */
61
+    @Excel(name = "数量", width = 15)
62
+    @ApiModelProperty(value = "数量")
63
+    private Integer num;
64
+    /**
65
+     * 单位
66
+     */
67
+    @Excel(name = "单位", width = 15)
68
+    @ApiModelProperty(value = "单位")
69
+    private String unit;
70
+    /**
71
+     * 任务类型
72
+     */
73
+    @Excel(name = "任务类型", width = 15)
74
+    @ApiModelProperty(value = "任务类型")
75
+    private String taskType;
76
+    /**
77
+     * 任务代码
78
+     */
79
+    @Excel(name = "任务代码", width = 15)
80
+    @ApiModelProperty(value = "任务代码")
81
+    private String taskCode;
82
+    /**
83
+     * 流程id
84
+     */
85
+    @Excel(name = "流程id", width = 15)
86
+    @ApiModelProperty(value = "流程id")
87
+    private String flowInstanceId;
88
+    /**
89
+     * 本阶成本
90
+     */
91
+    @Excel(name = "本阶成本", width = 15)
92
+    @ApiModelProperty(value = "本阶成本")
93
+    private String countValue;
94
+    /**
95
+     * 创建时间
96
+     */
97
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
98
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
99
+    @ApiModelProperty(value = "创建时间")
100
+    private Date createTime;
101
+    /**
102
+     * 创建人
103
+     */
104
+    @ApiModelProperty(value = "创建人")
105
+    private Integer createBy;
106
+    /**
107
+     * 总计成本
108
+     */
109
+    @Excel(name = "总计成本", width = 15)
110
+    @ApiModelProperty(value = "总计成本")
111
+    private String totalValue;
112
+    /**
113
+     * 成本类别
114
+     */
115
+    @Excel(name = "成本类别", width = 15)
116
+    @ApiModelProperty(value = "成本类别")
117
+    private String costType;
118
+}

+ 0
- 78
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/BudgetPrice.java Wyświetl plik

@@ -1,78 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.entity;
2
-
3
-import com.baomidou.mybatisplus.annotation.IdType;
4
-import com.baomidou.mybatisplus.annotation.TableId;
5
-import com.baomidou.mybatisplus.annotation.TableName;
6
-import io.swagger.annotations.ApiModel;
7
-import io.swagger.annotations.ApiModelProperty;
8
-import lombok.Data;
9
-import lombok.EqualsAndHashCode;
10
-import lombok.experimental.Accessors;
11
-import org.jeecgframework.poi.excel.annotation.Excel;
12
-
13
-import java.io.Serializable;
14
-import java.math.BigDecimal;
15
-
16
-/**
17
- * @Description: budget_price
18
- * @Author: jeecg-boot
19
- * @Date: 2024-06-11
20
- * @Version: V1.0
21
- */
22
-@Data
23
-@TableName("budget_price")
24
-@Accessors(chain = true)
25
-@EqualsAndHashCode(callSuper = false)
26
-@ApiModel(value = "budget_price对象", description = "budget_price")
27
-public class BudgetPrice implements Serializable {
28
-    private static final long serialVersionUID = 1L;
29
-
30
-    /**
31
-     * 主键
32
-     */
33
-    @TableId(type = IdType.ASSIGN_ID)
34
-    @ApiModelProperty(value = "主键")
35
-    private Integer id;
36
-    /**
37
-     * 年份
38
-     */
39
-    @Excel(name = "年份", width = 15)
40
-    @ApiModelProperty(value = "年份")
41
-    private String year;
42
-    /**
43
-     * 物料编码
44
-     */
45
-    @Excel(name = "物料编码", width = 15)
46
-    @ApiModelProperty(value = "物料编码")
47
-    private String materialNumber;
48
-    /**
49
-     * 物料名称
50
-     */
51
-    @Excel(name = "物料名称", width = 15)
52
-    @ApiModelProperty(value = "物料名称")
53
-    private String materialName;
54
-    /**
55
-     * 项目编号
56
-     */
57
-    @Excel(name = "项目编号", width = 15)
58
-    @ApiModelProperty(value = "项目编号")
59
-    private String projectNumber;
60
-    /**
61
-     * 预算价格
62
-     */
63
-    @Excel(name = "预算价格", width = 15)
64
-    @ApiModelProperty(value = "预算价格")
65
-    private BigDecimal price;
66
-    /**
67
-     * dwerk
68
-     */
69
-    @Excel(name = "dwerk", width = 15)
70
-    @ApiModelProperty(value = "dwerk")
71
-    private String dwerk;
72
-    /**
73
-     * posid
74
-     */
75
-    @Excel(name = "posid", width = 15)
76
-    @ApiModelProperty(value = "posid")
77
-    private String posid;
78
-}

+ 0
- 54
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/C7525cost.java Wyświetl plik

@@ -1,54 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.entity;
2
-
3
-import java.io.Serializable;
4
-import java.io.UnsupportedEncodingException;
5
-import java.util.Date;
6
-import java.math.BigDecimal;
7
-
8
-import com.baomidou.mybatisplus.annotation.*;
9
-import lombok.Data;
10
-import com.fasterxml.jackson.annotation.JsonFormat;
11
-import org.springframework.format.annotation.DateTimeFormat;
12
-import org.jeecgframework.poi.excel.annotation.Excel;
13
-import org.jeecg.common.aspect.annotation.Dict;
14
-import io.swagger.annotations.ApiModel;
15
-import io.swagger.annotations.ApiModelProperty;
16
-import lombok.EqualsAndHashCode;
17
-import lombok.experimental.Accessors;
18
-
19
-/**
20
- * @Description: c7525cost
21
- * @Author: jeecg-boot
22
- * @Date:   2024-06-06
23
- * @Version: V1.0
24
- */
25
-@Data
26
-@TableName("c7525cost")
27
-@Accessors(chain = true)
28
-@EqualsAndHashCode(callSuper = false)
29
-@ApiModel(value="c7525cost对象", description="c7525cost")
30
-public class C7525cost implements Serializable {
31
-    private static final long serialVersionUID = 1L;
32
-
33
-	/**年份*/
34
-	@Excel(name = "年份", width = 15)
35
-    @ApiModelProperty(value = "年份")
36
-    private String year;
37
-	/**门控料号(物料id)*/
38
-	@Excel(name = "门控料号(物料id)", width = 15)
39
-    @ApiModelProperty(value = "门控料号(物料id)")
40
-    private String materialNumber;
41
-	/**物料规格信息*/
42
-	@Excel(name = "物料规格信息", width = 15)
43
-    @ApiModelProperty(value = "物料规格信息")
44
-    private String zzggxh;
45
-	/**价格*/
46
-	@Excel(name = "价格", width = 15)
47
-    @ApiModelProperty(value = "价格")
48
-    @TableField(value = "price_7525")
49
-    private BigDecimal price7525;
50
-	/**id*/
51
-	@TableId(type = IdType.ASSIGN_ID)
52
-    @ApiModelProperty(value = "id")
53
-    private Integer id;
54
-}

+ 0
- 55
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostCenter.java Wyświetl plik

@@ -1,55 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.entity;
2
-
3
-import java.io.Serializable;
4
-import java.io.UnsupportedEncodingException;
5
-import java.util.Date;
6
-import java.math.BigDecimal;
7
-import com.baomidou.mybatisplus.annotation.IdType;
8
-import com.baomidou.mybatisplus.annotation.TableId;
9
-import com.baomidou.mybatisplus.annotation.TableName;
10
-import com.baomidou.mybatisplus.annotation.TableLogic;
11
-import lombok.Data;
12
-import com.fasterxml.jackson.annotation.JsonFormat;
13
-import org.springframework.format.annotation.DateTimeFormat;
14
-import org.jeecgframework.poi.excel.annotation.Excel;
15
-import org.jeecg.common.aspect.annotation.Dict;
16
-import io.swagger.annotations.ApiModel;
17
-import io.swagger.annotations.ApiModelProperty;
18
-import lombok.EqualsAndHashCode;
19
-import lombok.experimental.Accessors;
20
-
21
-/**
22
- * @Description: cost_center
23
- * @Author: jeecg-boot
24
- * @Date:   2024-06-11
25
- * @Version: V1.0
26
- */
27
-@Data
28
-@TableName("cost_center")
29
-@Accessors(chain = true)
30
-@EqualsAndHashCode(callSuper = false)
31
-@ApiModel(value="cost_center对象", description="cost_center")
32
-public class CostCenter implements Serializable {
33
-    private static final long serialVersionUID = 1L;
34
-
35
-	/**公司代码*/
36
-	@Excel(name = "公司代码", width = 15)
37
-    @ApiModelProperty(value = "公司代码")
38
-    private String companyCode;
39
-	/**成本中心代码*/
40
-	@Excel(name = "成本中心代码", width = 15)
41
-    @ApiModelProperty(value = "成本中心代码")
42
-    private String costCenterCode;
43
-	/**成本中心名称*/
44
-	@Excel(name = "成本中心名称", width = 15)
45
-    @ApiModelProperty(value = "成本中心名称")
46
-    private String costCenterName;
47
-	/**成本类型*/
48
-	@Excel(name = "成本类型", width = 15)
49
-    @ApiModelProperty(value = "成本类型")
50
-    private String costCategory;
51
-	/**状态*/
52
-	@Excel(name = "状态", width = 15)
53
-    @ApiModelProperty(value = "状态")
54
-    private String status;
55
-}

+ 6
- 48
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostMaterialBom.java Wyświetl plik

@@ -4,14 +4,9 @@ import com.baomidou.mybatisplus.annotation.IdType;
4 4
 import com.baomidou.mybatisplus.annotation.TableField;
5 5
 import com.baomidou.mybatisplus.annotation.TableId;
6 6
 import com.baomidou.mybatisplus.annotation.TableName;
7
-
8 7
 import java.io.Serializable;
9 8
 import java.math.BigDecimal;
10 9
 import java.time.LocalDateTime;
11
-
12
-import io.swagger.annotations.ApiModel;
13
-import io.swagger.annotations.ApiModelProperty;
14
-import lombok.EqualsAndHashCode;
15 10
 import lombok.Getter;
16 11
 import lombok.Setter;
17 12
 import lombok.experimental.Accessors;
@@ -21,14 +16,13 @@ import lombok.experimental.Accessors;
21 16
  * 物料bom
22 17
  * </p>
23 18
  *
24
- * @author
25
- * @since 2024-06-19
19
+ * @author  
20
+ * @since 2024-06-21
26 21
  */
27 22
 @Getter
28 23
 @Setter
29 24
 @Accessors(chain = true)
30
-@TableName("cost_material_bom")
31
-@ApiModel(value = "cost_material_bom对象", description = "cost_material_bom")
25
+@TableName("app_scene_cost_material_bom")
32 26
 public class CostMaterialBom implements Serializable {
33 27
 
34 28
     private static final long serialVersionUID = 1L;
@@ -36,233 +30,198 @@ public class CostMaterialBom implements Serializable {
36 30
     /**
37 31
      * id
38 32
      */
39
-    @ApiModelProperty(value = "id")
40 33
     @TableId(value = "id", type = IdType.AUTO)
41 34
     private String id;
42 35
 
43 36
     /**
44 37
      * 物料编码
45 38
      */
46
-    @ApiModelProperty(value = "物料编码")
47 39
     @TableField("material_code")
48 40
     private String materialCode;
49 41
 
50 42
     /**
51 43
      * 物料名称
52 44
      */
53
-    @ApiModelProperty(value = "物料名称")
54 45
     @TableField("material_name")
55 46
     private String materialName;
56 47
 
57 48
     /**
58 49
      * 父级物料编码
59 50
      */
60
-    @ApiModelProperty(value = "父级物料编码")
61 51
     @TableField("parent_material_code")
62 52
     private String parentMaterialCode;
63 53
 
64 54
     /**
65 55
      * 级别
66 56
      */
67
-    @ApiModelProperty(value = "级别")
68 57
     @TableField("level")
69 58
     private String level;
70 59
 
71 60
     /**
72 61
      * 排序
73 62
      */
74
-    @ApiModelProperty(value = "排序")
75 63
     @TableField("sort")
76 64
     private Integer sort;
77 65
 
78 66
     /**
79 67
      * 计量单位
80 68
      */
81
-    @ApiModelProperty(value = "计量单位")
82 69
     @TableField("unit")
83 70
     private String unit;
84 71
 
85 72
     /**
86 73
      * 数量
87 74
      */
88
-    @ApiModelProperty(value = "id")
89
-    @TableField("数量")
75
+    @TableField("number")
90 76
     private Integer number;
91 77
 
92 78
     /**
93 79
      * 人工工时(分钟)
94 80
      */
95
-    @ApiModelProperty(value = "人工工时(分钟)")
96 81
     @TableField("labor_hours")
97 82
     private BigDecimal laborHours;
98 83
 
99 84
     /**
100 85
      * 设备工时
101 86
      */
102
-    @ApiModelProperty(value = "设备工时")
103 87
     @TableField("device_hours")
104 88
     private BigDecimal deviceHours;
105 89
 
106 90
     /**
107 91
      * 借用物料编码
108 92
      */
109
-    @ApiModelProperty(value = "借用物料编码")
110 93
     @TableField("borrow_material_code")
111 94
     private String borrowMaterialCode;
112 95
 
113 96
     /**
114 97
      * 参考物料编码
115 98
      */
116
-    @ApiModelProperty(value = "参考物料编码")
117 99
     @TableField("refer_material_code")
118 100
     private String referMaterialCode;
119 101
 
120 102
     /**
121 103
      * 采购类型
122 104
      */
123
-
124
-    @ApiModelProperty(value = "采购类型")
125 105
     @TableField("purchase_type")
126 106
     private String purchaseType;
127 107
 
128 108
     /**
129 109
      * 特殊采购类型
130 110
      */
131
-
132
-    @ApiModelProperty(value = "特殊采购类型")
133 111
     @TableField("special_purchase_type")
134 112
     private String specialPurchaseType;
135 113
 
136 114
     /**
137 115
      * 说明
138 116
      */
139
-    @ApiModelProperty(value = "说明")
140 117
     @TableField("explanation")
141 118
     private String explanation;
142 119
 
143 120
     /**
144 121
      * 单位数量
145 122
      */
146
-    @ApiModelProperty(value = "单位数量")
147 123
     @TableField("quantity")
148 124
     private BigDecimal quantity;
149 125
 
150 126
     /**
151 127
      * 重量(g)
152 128
      */
153
-    @ApiModelProperty(value = "重量(g)")
154 129
     @TableField("weight")
155 130
     private String weight;
156 131
 
157 132
     /**
158 133
      * 材料/牌号
159 134
      */
160
-    @ApiModelProperty(value = "材料/牌号")
161 135
     @TableField("material_and_brand")
162 136
     private String materialAndBrand;
163 137
 
164 138
     /**
165 139
      * 表面处理,材料
166 140
      */
167
-    @ApiModelProperty(value = "表面处理,材料")
168 141
     @TableField("surface_material")
169 142
     private String surfaceMaterial;
170 143
 
171 144
     /**
172 145
      * 厚度(mm)
173 146
      */
174
-    @ApiModelProperty(value = "厚度(mm)")
175 147
     @TableField("surface_thickness")
176 148
     private String surfaceThickness;
177 149
 
178 150
     /**
179 151
      * 表面积(mm²)
180 152
      */
181
-    @ApiModelProperty(value = "表面积(mm²)")
182 153
     @TableField("surface_area")
183 154
     private String surfaceArea;
184 155
 
185 156
     /**
186 157
      * 长(mm)
187 158
      */
188
-    @ApiModelProperty(value = "长(mm)")
189 159
     @TableField("length")
190 160
     private String length;
191 161
 
192 162
     /**
193 163
      * 宽(mm)
194 164
      */
195
-    @ApiModelProperty(value = "宽(mm)")
196 165
     @TableField("width")
197 166
     private String width;
198 167
 
199 168
     /**
200 169
      * 高(mm)
201 170
      */
202
-    @ApiModelProperty(value = "高(mm)")
203 171
     @TableField("height")
204 172
     private String height;
205 173
 
206 174
     /**
207 175
      * 图示/图档/文档 文件ID
208 176
      */
209
-    @ApiModelProperty(value = "图示/图档/文档 文件ID")
210 177
     @TableField("figure_file_id")
211 178
     private Long figureFileId;
212 179
 
213 180
     /**
214
-     * 是否新具(0否 1是)
181
+     * 是否新具(0否 1是)
215 182
      */
216
-    @ApiModelProperty(value = "是否新模具(0否 1是)")
217 183
     @TableField("new_tooling")
218 184
     private Boolean newTooling;
219 185
 
220 186
     /**
221 187
      * 成型方式(枚举)
222 188
      */
223
-    @ApiModelProperty(value = "成型方式(枚举)")
224 189
     @TableField("shaping_method")
225 190
     private String shapingMethod;
226 191
 
227 192
     /**
228 193
      * 作业内容
229 194
      */
230
-    @ApiModelProperty(value = "作业内容")
231 195
     @TableField("work_content")
232 196
     private String workContent;
233 197
 
234 198
     /**
235 199
      * 加工地点
236 200
      */
237
-    @ApiModelProperty(value = "加工地点")
238 201
     @TableField("process_location")
239 202
     private String processLocation;
240 203
 
241 204
     /**
242 205
      * 成本中心
243 206
      */
244
-    @ApiModelProperty(value = "成本中心")
245 207
     @TableField("cost_center")
246 208
     private String costCenter;
247 209
 
248 210
     /**
249 211
      * 单价(未税)
250 212
      */
251
-    @ApiModelProperty(value = "单价(未税)")
252 213
     @TableField("unit_price")
253 214
     private BigDecimal unitPrice;
254 215
 
255 216
     /**
256 217
      * 总价(未税)
257 218
      */
258
-    @ApiModelProperty(value = "总价(未税)")
259 219
     @TableField("total_price")
260 220
     private BigDecimal totalPrice;
261 221
 
262 222
     /**
263
-     * 具费(未税)
223
+     * 具费(未税)
264 224
      */
265
-    @ApiModelProperty(value = "模具费(未税)")
266 225
     @TableField("mould_price")
267 226
     private BigDecimal mouldPrice;
268 227
 
@@ -293,7 +252,6 @@ public class CostMaterialBom implements Serializable {
293 252
     /**
294 253
      * 备注(特殊技术信息)
295 254
      */
296
-    @ApiModelProperty(value = "备注(特殊技术信息)")
297 255
     @TableField("remark")
298 256
     private String remark;
299 257
 

+ 1
- 1
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostMaterialProcessHours.java Wyświetl plik

@@ -25,7 +25,7 @@ import lombok.experimental.Accessors;
25 25
 @Getter
26 26
 @Setter
27 27
 @Accessors(chain = true)
28
-@TableName("cost_material_process_hours")
28
+@TableName("app_scene_cost_material_process_hours")
29 29
 public class CostMaterialProcessHours implements Serializable {
30 30
 
31 31
     private static final long serialVersionUID = 1L;

+ 135
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostModel.java Wyświetl plik

@@ -0,0 +1,135 @@
1
+package com.zzsmart.qomo.kn.cost.manage.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import java.io.Serializable;
8
+import java.time.LocalDateTime;
9
+
10
+import io.swagger.annotations.ApiModelProperty;
11
+import lombok.Getter;
12
+import lombok.Setter;
13
+import lombok.experimental.Accessors;
14
+
15
+/**
16
+ * <p>
17
+ * 
18
+ * </p>
19
+ *
20
+ * @author  
21
+ * @since 2024-07-11
22
+ */
23
+@Getter
24
+@Setter
25
+@Accessors(chain = true)
26
+@TableName("app_scene_cost_model")
27
+public class CostModel implements Serializable {
28
+
29
+    private static final long serialVersionUID = 1L;
30
+
31
+    /**
32
+     * 主键
33
+     */
34
+    @TableId(value = "id", type = IdType.AUTO)
35
+    private Integer id;
36
+
37
+    /**
38
+     * 模型名称
39
+     */
40
+    @ApiModelProperty(value = "模型名称")
41
+    @TableField("model_name")
42
+    private String modelName;
43
+
44
+    /**
45
+     * 图号
46
+     */
47
+    @ApiModelProperty(value = "图号")
48
+    @TableField("drawing_no")
49
+    private Integer drawingNo;
50
+
51
+    /**
52
+     * 物料号
53
+     */
54
+    @ApiModelProperty(value = "物料号")
55
+    @TableField("material_no")
56
+    private Integer materialNo;
57
+
58
+    /**
59
+     * 物料类型
60
+     */
61
+    @ApiModelProperty(value = "物料类型")
62
+    @TableField("material_type")
63
+    private String materialType;
64
+
65
+    /**
66
+     * 模型版本
67
+     */
68
+    @ApiModelProperty(value = "模型版本")
69
+    @TableField("model_version")
70
+    private String modelVersion;
71
+
72
+    /**
73
+     * 状态
74
+     */
75
+    @ApiModelProperty(value = "状态")
76
+    @TableField("status")
77
+    private String status;
78
+
79
+    /**
80
+     * 创建时间
81
+     */
82
+    @ApiModelProperty(value = "创建时间")
83
+    @TableField("create_time")
84
+    private LocalDateTime createTime;
85
+
86
+    /**
87
+     * 创建人
88
+     */
89
+    @TableField("create_by")
90
+    private Integer createBy;
91
+
92
+    /**
93
+     * 更新时间
94
+     */
95
+    @TableField("update_time")
96
+    private LocalDateTime updateTime;
97
+
98
+    /**
99
+     * 更新人
100
+     */
101
+    @TableField("update_by")
102
+    private Integer updateBy;
103
+
104
+    /**
105
+     * 模型配置信息
106
+     */
107
+    @TableField("cost_model_detail")
108
+    private String costModelDetail;
109
+
110
+
111
+    public static final String ID = "id";
112
+
113
+    public static final String MODEL_NAME = "model_name";
114
+
115
+    public static final String DRAWING_NO = "drawing_no";
116
+
117
+    public static final String MATERIAL_NO = "material_no";
118
+
119
+    public static final String MATERIAL_TYPE = "material_type";
120
+
121
+    public static final String MODEL_VERSION = "model_version";
122
+
123
+    public static final String STATUS = "status";
124
+
125
+    public static final String CREATE_TIME = "create_time";
126
+
127
+    public static final String CREATE_BY = "create_by";
128
+
129
+    public static final String UPDATE_TIME = "update_time";
130
+
131
+    public static final String UPDATE_BY = "update_by";
132
+
133
+    public static final String COST_MODEL_DETAIL = "cost_model_detail";
134
+
135
+}

+ 2
- 2
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostPartMissingInfo.java Wyświetl plik

@@ -25,10 +25,10 @@ import lombok.experimental.Accessors;
25 25
  * @Version: V1.0
26 26
  */
27 27
 @Data
28
-@TableName("cost_part_missing_info")
28
+@TableName("app_scene_cost_part_missing_info")
29 29
 @Accessors(chain = true)
30 30
 @EqualsAndHashCode(callSuper = false)
31
-@ApiModel(value="cost_part_missing_info对象", description="cost_part_missing_info")
31
+@ApiModel(value="app_scene_cost_part_missing_info对象", description="app_scene_cost_part_missing_info")
32 32
 public class CostPartMissingInfo implements Serializable {
33 33
     private static final long serialVersionUID = 1L;
34 34
 

+ 1
- 1
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostPurchasePrice.java Wyświetl plik

@@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
22 22
 @Getter
23 23
 @Setter
24 24
 @Accessors(chain = true)
25
-@TableName("cost_purchase_price")
25
+@TableName("app_scene_cost_purchase_price")
26 26
 public class CostPurchasePrice implements Serializable {
27 27
 
28 28
     private static final long serialVersionUID = 1L;

+ 0
- 132
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostStandard.java Wyświetl plik

@@ -1,132 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.entity;
2
-
3
-import java.io.Serializable;
4
-import java.io.UnsupportedEncodingException;
5
-import java.util.Date;
6
-import java.math.BigDecimal;
7
-import com.baomidou.mybatisplus.annotation.IdType;
8
-import com.baomidou.mybatisplus.annotation.TableId;
9
-import com.baomidou.mybatisplus.annotation.TableName;
10
-import com.baomidou.mybatisplus.annotation.TableLogic;
11
-import lombok.Data;
12
-import com.fasterxml.jackson.annotation.JsonFormat;
13
-import org.springframework.format.annotation.DateTimeFormat;
14
-import org.jeecgframework.poi.excel.annotation.Excel;
15
-import org.jeecg.common.aspect.annotation.Dict;
16
-import io.swagger.annotations.ApiModel;
17
-import io.swagger.annotations.ApiModelProperty;
18
-import lombok.EqualsAndHashCode;
19
-import lombok.experimental.Accessors;
20
-
21
-/**
22
- * @Description: 标准成本
23
- * @Author: wangqiong
24
- * @Date:   2024-06-13
25
- * @Version: V1.0
26
- */
27
-@Data
28
-@TableName("cost_standard")
29
-@Accessors(chain = true)
30
-@EqualsAndHashCode(callSuper = false)
31
-@ApiModel(value="cost_standard对象", description="cost_standard")
32
-public class CostStandard implements Serializable {
33
-    private static final long serialVersionUID = 1L;
34
-
35
-	/**id*/
36
-	@TableId(type = IdType.ASSIGN_ID)
37
-    @ApiModelProperty(value = "id")
38
-    private String id;
39
-	/**物料号*/
40
-	@Excel(name = "物料号", width = 15)
41
-    @ApiModelProperty(value = "物料号")
42
-    private String materialNumber;
43
-
44
-    /**版本号ID*/
45
-    @Excel(name = "版本号ID", width = 15)
46
-    @ApiModelProperty(value = "版本号ID")
47
-    private String versionNumberId;
48
-
49
-	/**bom材料费*/
50
-	@Excel(name = "bom材料费", width = 15)
51
-    @ApiModelProperty(value = "bom材料费")
52
-    private BigDecimal bomCost;
53
-	/**包装费*/
54
-	@Excel(name = "包装费", width = 15)
55
-    @ApiModelProperty(value = "包装费")
56
-    private BigDecimal packingCost;
57
-	/**辅料费*/
58
-	@Excel(name = "辅料费", width = 15)
59
-    @ApiModelProperty(value = "辅料费")
60
-    private BigDecimal auxiliaryCost;
61
-	/**人工费*/
62
-	@Excel(name = "人工费", width = 15)
63
-    @ApiModelProperty(value = "人工费")
64
-    private BigDecimal laborCost;
65
-	/**机器折旧费*/
66
-	@Excel(name = "机器折旧费", width = 15)
67
-    @ApiModelProperty(value = "机器折旧费")
68
-    private BigDecimal euipDepreciationCost;
69
-	/**机物料消耗费*/
70
-	@Excel(name = "机物料消耗费", width = 15)
71
-    @ApiModelProperty(value = "机物料消耗费")
72
-    private BigDecimal equipConsumeCost;
73
-	/**水电费*/
74
-	@Excel(name = "水电费", width = 15)
75
-    @ApiModelProperty(value = "水电费")
76
-    private BigDecimal hydroelectricityCost;
77
-	/**其他制造费*/
78
-	@Excel(name = "其他制造费", width = 15)
79
-    @ApiModelProperty(value = "其他制造费")
80
-    private BigDecimal otherCost;
81
-	/**物流费*/
82
-	@Excel(name = "物流费", width = 15)
83
-    @ApiModelProperty(value = "物流费")
84
-    private BigDecimal trailCost;
85
-	/**制造成本*/
86
-	@Excel(name = "制造成本", width = 15)
87
-    @ApiModelProperty(value = "制造成本")
88
-    private BigDecimal manufactureCost;
89
-	/**工装费*/
90
-	@Excel(name = "工装费", width = 15)
91
-    @ApiModelProperty(value = "工装费")
92
-    private BigDecimal toolingCost;
93
-	/**检具费*/
94
-	@Excel(name = "检具费", width = 15)
95
-    @ApiModelProperty(value = "检具费")
96
-    private BigDecimal inspectionCost;
97
-	/**模具费*/
98
-	@Excel(name = "模具费", width = 15)
99
-    @ApiModelProperty(value = "模具费")
100
-    private BigDecimal moldCost;
101
-	/**测试费*/
102
-	@Excel(name = "测试费", width = 15)
103
-    @ApiModelProperty(value = "测试费")
104
-    private BigDecimal testCost;
105
-	/**总成本*/
106
-	@Excel(name = "总成本", width = 15)
107
-    @ApiModelProperty(value = "总成本")
108
-    private BigDecimal totalCost;
109
-    /**创建人*/
110
-    @Excel(name = "创建人", width = 15)
111
-    @ApiModelProperty(value = "创建人")
112
-    private String createBy;
113
-	/**创建日期*/
114
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
115
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
116
-    @ApiModelProperty(value = "创建日期")
117
-    private Date createTime;
118
-    /**修改人*/
119
-    @Excel(name = "修改人", width = 15)
120
-    @ApiModelProperty(value = "修改人")
121
-    private String updateBy;
122
-	/**修改日期*/
123
-	@Excel(name = "修改日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
124
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
125
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
126
-    @ApiModelProperty(value = "修改日期")
127
-    private Date updateTime;
128
-	/**备注*/
129
-	@Excel(name = "备注", width = 15)
130
-    @ApiModelProperty(value = "备注")
131
-    private String remark;
132
-}

+ 33
- 9
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostStandardDetail.java Wyświetl plik

@@ -4,28 +4,28 @@ import com.baomidou.mybatisplus.annotation.IdType;
4 4
 import com.baomidou.mybatisplus.annotation.TableField;
5 5
 import com.baomidou.mybatisplus.annotation.TableId;
6 6
 import com.baomidou.mybatisplus.annotation.TableName;
7
-import java.io.Serializable;
8
-import java.math.BigDecimal;
9
-import java.time.LocalDateTime;
10
-
11 7
 import io.swagger.annotations.ApiModelProperty;
12
-import lombok.Builder;
13 8
 import lombok.Data;
14
-import lombok.Getter;
15
-import lombok.Setter;
9
+import lombok.EqualsAndHashCode;
16 10
 import lombok.experimental.Accessors;
11
+import org.jeecgframework.poi.excel.annotation.Excel;
12
+
13
+import java.io.Serializable;
14
+import java.math.BigDecimal;
15
+import java.time.LocalDateTime;
17 16
 
18 17
 /**
19 18
  * <p>
20 19
  * 标准成本明细表
21 20
  * </p>
22 21
  *
23
- * @author  
22
+ * @author
24 23
  * @since 2024-06-20
25 24
  */
26 25
 @Data
27 26
 @Accessors(chain = true)
28
-@TableName("cost_standard_detail")
27
+@TableName("app_scene_cost_standard_detail")
28
+@EqualsAndHashCode
29 29
 public class CostStandardDetail implements Serializable {
30 30
 
31 31
     private static final long serialVersionUID = 1L;
@@ -41,6 +41,7 @@ public class CostStandardDetail implements Serializable {
41 41
      */
42 42
     @TableField("material_number")
43 43
     @ApiModelProperty(value = "物料号,关联kn_new_sap_mara表matnr字段")
44
+    @Excel(name = "物料号")
44 45
     private String materialNumber;
45 46
 
46 47
     /**
@@ -48,6 +49,7 @@ public class CostStandardDetail implements Serializable {
48 49
      */
49 50
     @TableField("material_name")
50 51
     @ApiModelProperty(value = "物料名称")
52
+    @Excel(name = "物料名称")
51 53
     private String materialName;
52 54
 
53 55
     /**
@@ -55,6 +57,7 @@ public class CostStandardDetail implements Serializable {
55 57
      */
56 58
     @TableField("parent_material_number")
57 59
     @ApiModelProperty(value = "父类物料号")
60
+    @Excel(name = "父类物料号")
58 61
     private String parentMaterialNumber;
59 62
 
60 63
     /**
@@ -69,6 +72,7 @@ public class CostStandardDetail implements Serializable {
69 72
      */
70 73
     @TableField("level")
71 74
     @ApiModelProperty(value = "层级")
75
+    @Excel(name = "层级")
72 76
     private Integer level;
73 77
 
74 78
     /**
@@ -76,6 +80,7 @@ public class CostStandardDetail implements Serializable {
76 80
      */
77 81
     @TableField("figure_number")
78 82
     @ApiModelProperty(value = "图号")
83
+    @Excel(name = "图号")
79 84
     private String figureNumber;
80 85
 
81 86
     /**
@@ -83,6 +88,7 @@ public class CostStandardDetail implements Serializable {
83 88
      */
84 89
     @TableField("dosage")
85 90
     @ApiModelProperty(value = "用量")
91
+    @Excel(name = "用量")
86 92
     private Double dosage;
87 93
 
88 94
     /**
@@ -90,6 +96,7 @@ public class CostStandardDetail implements Serializable {
90 96
      */
91 97
     @TableField("unit")
92 98
     @ApiModelProperty(value = "单位")
99
+    @Excel(name = "单位")
93 100
     private String unit;
94 101
 
95 102
     /**
@@ -97,6 +104,7 @@ public class CostStandardDetail implements Serializable {
97 104
      */
98 105
     @TableField("specification")
99 106
     @ApiModelProperty(value = "规格")
107
+    @Excel(name = "规格")
100 108
     private String specification;
101 109
 
102 110
     /**
@@ -104,6 +112,7 @@ public class CostStandardDetail implements Serializable {
104 112
      */
105 113
     @TableField("bom_cost")
106 114
     @ApiModelProperty(value = "bom材料费")
115
+    @Excel(name = "bom材料费")
107 116
     private BigDecimal bomCost;
108 117
 
109 118
     /**
@@ -111,6 +120,7 @@ public class CostStandardDetail implements Serializable {
111 120
      */
112 121
     @TableField("packing_cost")
113 122
     @ApiModelProperty(value = "包装费")
123
+    @Excel(name = "包装费")
114 124
     private BigDecimal packingCost;
115 125
 
116 126
     /**
@@ -118,6 +128,7 @@ public class CostStandardDetail implements Serializable {
118 128
      */
119 129
     @TableField("auxiliary_cost")
120 130
     @ApiModelProperty(value = "本阶辅料费")
131
+    @Excel(name = "本阶辅料费")
121 132
     private BigDecimal auxiliaryCost;
122 133
 
123 134
     /**
@@ -125,6 +136,7 @@ public class CostStandardDetail implements Serializable {
125 136
      */
126 137
     @TableField("labor_cost")
127 138
     @ApiModelProperty(value = "本阶人工费")
139
+    @Excel(name = "本阶人工费")
128 140
     private BigDecimal laborCost;
129 141
 
130 142
     /**
@@ -132,6 +144,7 @@ public class CostStandardDetail implements Serializable {
132 144
      */
133 145
     @TableField("euip_depreciation_cost")
134 146
     @ApiModelProperty(value = "机器折旧费")
147
+    @Excel(name = "机器折旧费")
135 148
     private BigDecimal euipDepreciationCost;
136 149
 
137 150
     /**
@@ -139,6 +152,7 @@ public class CostStandardDetail implements Serializable {
139 152
      */
140 153
     @TableField("equip_consume_cost")
141 154
     @ApiModelProperty(value = "机物料消耗费")
155
+    @Excel(name = "机物料消耗费")
142 156
     private BigDecimal equipConsumeCost;
143 157
 
144 158
     /**
@@ -146,6 +160,7 @@ public class CostStandardDetail implements Serializable {
146 160
      */
147 161
     @TableField("hydroelectricity_cost")
148 162
     @ApiModelProperty(value = "水电费")
163
+    @Excel(name = "水电费")
149 164
     private BigDecimal hydroelectricityCost;
150 165
 
151 166
     /**
@@ -153,6 +168,7 @@ public class CostStandardDetail implements Serializable {
153 168
      */
154 169
     @TableField("other_cost")
155 170
     @ApiModelProperty(value = "其他制造费")
171
+    @Excel(name = "其他制造费")
156 172
     private BigDecimal otherCost;
157 173
 
158 174
     /**
@@ -160,6 +176,7 @@ public class CostStandardDetail implements Serializable {
160 176
      */
161 177
     @TableField("trail_cost")
162 178
     @ApiModelProperty(value = "物流费")
179
+    @Excel(name = "物流费")
163 180
     private BigDecimal trailCost;
164 181
 
165 182
     /**
@@ -167,6 +184,7 @@ public class CostStandardDetail implements Serializable {
167 184
      */
168 185
     @TableField("manufacture_cost")
169 186
     @ApiModelProperty(value = "制造成本")
187
+    @Excel(name = "制造成本")
170 188
     private BigDecimal manufactureCost;
171 189
 
172 190
     /**
@@ -174,6 +192,7 @@ public class CostStandardDetail implements Serializable {
174 192
      */
175 193
     @TableField("total_labor_cost")
176 194
     @ApiModelProperty(value = "累计人工费")
195
+    @Excel(name = "累计人工费")
177 196
     private BigDecimal totalLaborCost;
178 197
 
179 198
     /**
@@ -181,6 +200,7 @@ public class CostStandardDetail implements Serializable {
181 200
      */
182 201
     @TableField("total_equip_consume_cost")
183 202
     @ApiModelProperty(value = "累计机器消耗费")
203
+    @Excel(name = "累计机器消耗费")
184 204
     private BigDecimal totalEquipConsumeCost;
185 205
 
186 206
     /**
@@ -188,6 +208,7 @@ public class CostStandardDetail implements Serializable {
188 208
      */
189 209
     @TableField("total_euip_depreciation_cost")
190 210
     @ApiModelProperty(value = "累计机器折旧费")
211
+    @Excel(name = "累计机器折旧费")
191 212
     private BigDecimal totalEuipDepreciationCost;
192 213
 
193 214
     /**
@@ -195,6 +216,7 @@ public class CostStandardDetail implements Serializable {
195 216
      */
196 217
     @TableField("total_hydroelectricity_cost")
197 218
     @ApiModelProperty(value = "累计水电费")
219
+    @Excel(name = "累计水电费")
198 220
     private BigDecimal totalHydroelectricityCost;
199 221
 
200 222
     /**
@@ -202,6 +224,7 @@ public class CostStandardDetail implements Serializable {
202 224
      */
203 225
     @TableField("total_other_cost")
204 226
     @ApiModelProperty(value = "累计其它费用")
227
+    @Excel(name = "累计其它费用")
205 228
     private BigDecimal totalOtherCost;
206 229
 
207 230
     /**
@@ -244,6 +267,7 @@ public class CostStandardDetail implements Serializable {
244 267
      */
245 268
     @TableField("sort")
246 269
     @ApiModelProperty(value = "序号")
270
+    @Excel(name = "序号")
247 271
     private Integer sort;
248 272
 
249 273
 }

+ 54
- 31
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/CostStandardVersion.java Wyświetl plik

@@ -1,80 +1,103 @@
1 1
 package com.zzsmart.qomo.kn.cost.manage.entity;
2 2
 
3
-import java.io.Serializable;
4
-import java.io.UnsupportedEncodingException;
5
-import java.util.Date;
6
-import java.math.BigDecimal;
7 3
 import com.baomidou.mybatisplus.annotation.IdType;
8 4
 import com.baomidou.mybatisplus.annotation.TableId;
9 5
 import com.baomidou.mybatisplus.annotation.TableName;
10
-import com.baomidou.mybatisplus.annotation.TableLogic;
11
-import lombok.Data;
12 6
 import com.fasterxml.jackson.annotation.JsonFormat;
13
-import org.springframework.format.annotation.DateTimeFormat;
14
-import org.jeecgframework.poi.excel.annotation.Excel;
15
-import org.jeecg.common.aspect.annotation.Dict;
16 7
 import io.swagger.annotations.ApiModel;
17 8
 import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Builder;
10
+import lombok.Data;
18 11
 import lombok.EqualsAndHashCode;
19 12
 import lombok.experimental.Accessors;
13
+import org.jeecgframework.poi.excel.annotation.Excel;
14
+import org.springframework.format.annotation.DateTimeFormat;
15
+
16
+import java.io.Serializable;
17
+import java.util.Date;
20 18
 
21 19
 /**
22 20
  * @Description: 标准成本-版本号
23 21
  * @Author: wangqiong
24
- * @Date:   2024-06-13
22
+ * @Date: 2024-06-13
25 23
  * @Version: V1.0
26 24
  */
27 25
 @Data
28
-@TableName("cost_standard_version")
26
+@TableName("app_scene_cost_standard_version")
27
+@Builder
29 28
 @Accessors(chain = true)
30 29
 @EqualsAndHashCode(callSuper = false)
31
-@ApiModel(value="cost_standard_version对象", description="cost_standard_version")
30
+@ApiModel(value = "app_scene_cost_standard_version对象", description = "app_scene_cost_standard_version")
32 31
 public class CostStandardVersion implements Serializable {
33 32
     private static final long serialVersionUID = 1L;
34 33
 
35
-	/**id*/
36
-	@TableId(type = IdType.ASSIGN_ID)
34
+    /**
35
+     * id
36
+     */
37
+    @TableId(type = IdType.ASSIGN_ID)
37 38
     @ApiModelProperty(value = "id")
38 39
     private String id;
39 40
 
40
-	/**图号*/
41
+    /**
42
+     * 图号
43
+     */
41 44
     @Excel(name = "图号", width = 15)
42 45
     @ApiModelProperty(value = "图号")
43 46
     private String figureNumber;
44
-	/**阶段,A-初始,B-首批,C-量产*/
45
-	@Excel(name = "阶段", width = 15)
47
+    /**
48
+     * 阶段,A-初始,B-首批,C-量产
49
+     */
50
+    @Excel(name = "阶段", width = 15)
46 51
     @ApiModelProperty(value = "阶段")
47 52
     private String stage;
48
-	/**物料号*/
49
-	@Excel(name = "物料号", width = 15)
53
+    /**
54
+     * 物料号
55
+     */
56
+    @Excel(name = "物料号", width = 15)
50 57
     @ApiModelProperty(value = "物料号")
51 58
     private String materialNumber;
52
-	/**版本号*/
59
+    /**
60
+     * 版本号
61
+     */
53 62
     @ApiModelProperty(value = "版本号")
54 63
     private String versionNumber;
55
-	/**版本状态*/
64
+    /**
65
+     * 版本状态
66
+     */
56 67
     @ApiModelProperty(value = "版本状态")
57 68
     private String versionStatus;
58
-	/**创建人*/
69
+    /**
70
+     * 创建人
71
+     */
59 72
     @ApiModelProperty(value = "创建人")
60 73
     private String createBy;
61
-	/**创建时间*/
62
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
63
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
74
+    /**
75
+     * 创建时间
76
+     */
77
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
78
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
64 79
     @ApiModelProperty(value = "创建时间")
65 80
     private Date createTime;
66
-	/**修改人*/
81
+    /**
82
+     * 修改人
83
+     */
67 84
     @ApiModelProperty(value = "修改人")
68 85
     private String updateBy;
69
-	/**修改时间*/
70
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
71
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
86
+    /**
87
+     * 修改时间
88
+     */
89
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
90
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
72 91
     @ApiModelProperty(value = "修改时间")
73 92
     private Date updateTime;
74
-	/**备注*/
93
+    /**
94
+     * 备注
95
+     */
75 96
     @ApiModelProperty(value = "备注")
76 97
     private String remark;
77
-    /**年份*/
98
+    /**
99
+     * 年份
100
+     */
78 101
     @ApiModelProperty(value = "年份")
79 102
     private String versionYear;
80 103
 }

+ 1
- 1
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/HourRate.java Wyświetl plik

@@ -23,7 +23,7 @@ import lombok.experimental.Accessors;
23 23
  * @Version: V1.0
24 24
  */
25 25
 @Data
26
-@TableName("cost_hour_rate")
26
+@TableName("app_scene_cost_hour_rate")
27 27
 @Accessors(chain = true)
28 28
 @EqualsAndHashCode(callSuper = false)
29 29
 @ApiModel(value="hour_rate对象", description="hour_rate")

+ 0
- 107
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/LatestPurchasePrice.java Wyświetl plik

@@ -1,107 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.entity;
2
-
3
-import java.io.Serializable;
4
-import java.io.UnsupportedEncodingException;
5
-import java.util.Date;
6
-import java.math.BigDecimal;
7
-import com.baomidou.mybatisplus.annotation.IdType;
8
-import com.baomidou.mybatisplus.annotation.TableId;
9
-import com.baomidou.mybatisplus.annotation.TableName;
10
-import com.baomidou.mybatisplus.annotation.TableLogic;
11
-import lombok.Data;
12
-import com.fasterxml.jackson.annotation.JsonFormat;
13
-import org.springframework.format.annotation.DateTimeFormat;
14
-import org.jeecgframework.poi.excel.annotation.Excel;
15
-import org.jeecg.common.aspect.annotation.Dict;
16
-import io.swagger.annotations.ApiModel;
17
-import io.swagger.annotations.ApiModelProperty;
18
-import lombok.EqualsAndHashCode;
19
-import lombok.experimental.Accessors;
20
-
21
-/**
22
- * @Description: latest_purchase_price
23
- * @Author: jeecg-boot
24
- * @Date:   2024-06-11
25
- * @Version: V1.0
26
- */
27
-@Data
28
-@TableName("latest_purchase_price")
29
-@Accessors(chain = true)
30
-@EqualsAndHashCode(callSuper = false)
31
-@ApiModel(value="latest_purchase_price对象", description="latest_purchase_price")
32
-public class LatestPurchasePrice implements Serializable {
33
-    private static final long serialVersionUID = 1L;
34
-
35
-	/**门控料号(物料id)*/
36
-	@Excel(name = "门控料号(物料id)", width = 15)
37
-    @ApiModelProperty(value = "门控料号(物料id)")
38
-    private String materialNumber;
39
-	/**产品名称*/
40
-	@Excel(name = "产品名称", width = 15)
41
-    @ApiModelProperty(value = "产品名称")
42
-    private String name;
43
-	/**规格*/
44
-	@Excel(name = "规格", width = 15)
45
-    @ApiModelProperty(value = "规格")
46
-    private String norms;
47
-	/**单位*/
48
-	@Excel(name = "单位", width = 15)
49
-    @ApiModelProperty(value = "单位")
50
-    private String unit;
51
-	/**latestInvoiceNo*/
52
-	@Excel(name = "latestInvoiceNo", width = 15)
53
-    @ApiModelProperty(value = "latestInvoiceNo")
54
-    private String latestInvoiceNo;
55
-	/**估算日期*/
56
-	@Excel(name = "估算日期", width = 15, format = "yyyy-MM-dd")
57
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
58
-    @DateTimeFormat(pattern="yyyy-MM-dd")
59
-    @ApiModelProperty(value = "估算日期")
60
-    private Date latestInvoiceDate;
61
-	/**latestInvoiceSupplier*/
62
-	@Excel(name = "latestInvoiceSupplier", width = 15)
63
-    @ApiModelProperty(value = "latestInvoiceSupplier")
64
-    private String latestInvoiceSupplier;
65
-	/**latestInvoicePrice*/
66
-	@Excel(name = "latestInvoicePrice", width = 15)
67
-    @ApiModelProperty(value = "latestInvoicePrice")
68
-    private BigDecimal latestInvoicePrice;
69
-	/**不含税价格*/
70
-	@Excel(name = "不含税价格", width = 15)
71
-    @ApiModelProperty(value = "不含税价格")
72
-    private BigDecimal unitPriceWithoutTax;
73
-	/**interExamCost*/
74
-	@Excel(name = "interExamCost", width = 15)
75
-    @ApiModelProperty(value = "interExamCost")
76
-    private BigDecimal interExamCost;
77
-	/**工厂代号(工厂id)*/
78
-	@Excel(name = "工厂代号(工厂id)", width = 15)
79
-    @ApiModelProperty(value = "工厂代号(工厂id)")
80
-    private String factory;
81
-	/**维护人*/
82
-	@Excel(name = "维护人", width = 15)
83
-    @ApiModelProperty(value = "维护人")
84
-    private String guardian;
85
-	/**维护时间*/
86
-	@Excel(name = "维护时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
87
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
88
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
89
-    @ApiModelProperty(value = "维护时间")
90
-    private Date maintenanceTime;
91
-	/**isadd*/
92
-	@Excel(name = "isadd", width = 15)
93
-    @ApiModelProperty(value = "isadd")
94
-    private Integer isadd;
95
-	/**采购类型*/
96
-	@Excel(name = "采购类型", width = 15)
97
-    @ApiModelProperty(value = "采购类型")
98
-    private String purchaseType;
99
-	/**是否启用*/
100
-	@Excel(name = "是否启用", width = 15)
101
-    @ApiModelProperty(value = "是否启用")
102
-    private Integer isinvalid;
103
-	/**id*/
104
-	@TableId(type = IdType.ASSIGN_ID)
105
-    @ApiModelProperty(value = "id")
106
-    private String id;
107
-}

+ 0
- 65
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/ProduceBatch.java Wyświetl plik

@@ -1,65 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.entity;
2
-
3
-import java.io.Serializable;
4
-import java.io.UnsupportedEncodingException;
5
-import java.util.Date;
6
-import java.math.BigDecimal;
7
-import com.baomidou.mybatisplus.annotation.IdType;
8
-import com.baomidou.mybatisplus.annotation.TableId;
9
-import com.baomidou.mybatisplus.annotation.TableName;
10
-import com.baomidou.mybatisplus.annotation.TableLogic;
11
-import lombok.Data;
12
-import com.fasterxml.jackson.annotation.JsonFormat;
13
-import org.springframework.format.annotation.DateTimeFormat;
14
-import org.jeecgframework.poi.excel.annotation.Excel;
15
-import org.jeecg.common.aspect.annotation.Dict;
16
-import io.swagger.annotations.ApiModel;
17
-import io.swagger.annotations.ApiModelProperty;
18
-import lombok.EqualsAndHashCode;
19
-import lombok.experimental.Accessors;
20
-
21
-/**
22
- * @Description: produce_batch
23
- * @Author: jeecg-boot
24
- * @Date:   2024-06-11
25
- * @Version: V1.0
26
- */
27
-@Data
28
-@TableName("produce_batch")
29
-@Accessors(chain = true)
30
-@EqualsAndHashCode(callSuper = false)
31
-@ApiModel(value="produce_batch对象", description="produce_batch")
32
-public class ProduceBatch implements Serializable {
33
-    private static final long serialVersionUID = 1L;
34
-
35
-	/**门控料号(物料id)*/
36
-	@Excel(name = "门控料号(物料id)", width = 15)
37
-    @ApiModelProperty(value = "门控料号(物料id)")
38
-    private String materialNumber;
39
-	/**工厂代号(工厂id)*/
40
-	@Excel(name = "工厂代号(工厂id)", width = 15)
41
-    @ApiModelProperty(value = "工厂代号(工厂id)")
42
-    private String factory;
43
-	/**生产批量*/
44
-	@Excel(name = "生产批量", width = 15)
45
-    @ApiModelProperty(value = "生产批量")
46
-    private BigDecimal batch;
47
-	/**维护人(用户id)*/
48
-	@Excel(name = "维护人(用户id)", width = 15)
49
-    @ApiModelProperty(value = "维护人(用户id)")
50
-    private String guardian;
51
-	/**维护时间*/
52
-	@Excel(name = "维护时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
53
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
54
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
55
-    @ApiModelProperty(value = "维护时间")
56
-    private Date maintenanceTime;
57
-	/**aufnr*/
58
-//	@Excel(name = "aufnr", width = 15)
59
-    @ApiModelProperty(value = "aufnr")
60
-    private String aufnr;
61
-    /**主键*/
62
-    @TableId(type = IdType.ASSIGN_ID)
63
-    @ApiModelProperty(value = "主键")
64
-    private String id;
65
-}

+ 0
- 47
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/SapSubfactory.java Wyświetl plik

@@ -1,47 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.entity;
2
-
3
-import java.io.Serializable;
4
-import java.io.UnsupportedEncodingException;
5
-import java.util.Date;
6
-import java.math.BigDecimal;
7
-import com.baomidou.mybatisplus.annotation.IdType;
8
-import com.baomidou.mybatisplus.annotation.TableId;
9
-import com.baomidou.mybatisplus.annotation.TableName;
10
-import com.baomidou.mybatisplus.annotation.TableLogic;
11
-import lombok.Data;
12
-import com.fasterxml.jackson.annotation.JsonFormat;
13
-import org.springframework.format.annotation.DateTimeFormat;
14
-import org.jeecgframework.poi.excel.annotation.Excel;
15
-import org.jeecg.common.aspect.annotation.Dict;
16
-import io.swagger.annotations.ApiModel;
17
-import io.swagger.annotations.ApiModelProperty;
18
-import lombok.EqualsAndHashCode;
19
-import lombok.experimental.Accessors;
20
-
21
-/**
22
- * @Description: sap_subfactory
23
- * @Author: jeecg-boot
24
- * @Date:   2024-06-11
25
- * @Version: V1.0
26
- */
27
-@Data
28
-@TableName("sap_subfactory")
29
-@Accessors(chain = true)
30
-@EqualsAndHashCode(callSuper = false)
31
-@ApiModel(value="sap_subfactory对象", description="sap_subfactory")
32
-public class SapSubfactory implements Serializable {
33
-    private static final long serialVersionUID = 1L;
34
-
35
-	/**主键*/
36
-	@TableId(type = IdType.ASSIGN_ID)
37
-    @ApiModelProperty(value = "主键")
38
-    private Integer id;
39
-	/**公司代码*/
40
-	@Excel(name = "公司代码", width = 15)
41
-    @ApiModelProperty(value = "公司代码")
42
-    private String companyCode;
43
-	/**工厂代码*/
44
-	@Excel(name = "工厂代码", width = 15)
45
-    @ApiModelProperty(value = "工厂代码")
46
-    private String factory;
47
-}

+ 61
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/FeeTypeEnum.java Wyświetl plik

@@ -0,0 +1,61 @@
1
+package com.zzsmart.qomo.kn.cost.manage.enums;
2
+
3
+/**
4
+ * @Classname StandardStageEnum
5
+ * @Description 阶段枚举
6
+ * @Version 1.0.0
7
+ * @Date 2024/6/18 9:51
8
+ * @Created wangqiong
9
+ */
10
+public enum FeeTypeEnum {
11
+
12
+    LaborCost("LaborCost", "人工成本"),
13
+    MaterialCost("MaterialCost", "物料成本"),
14
+    EquipmentFee("EquipmentFee", "设备费"), SupplyMaterialFee("SupplyMaterialFee", "辅料费"), DriverFee("DriverFee", "水电费"), OtherFee("OtherFee", "其他费用"), LogisticsFee("LogisticsFee", "物流费");
15
+
16
+    private final String code;
17
+    private final String text;
18
+
19
+    FeeTypeEnum(String code, String text) {
20
+        this.code = code;
21
+        this.text = text;
22
+    }
23
+
24
+    public String getCode() {
25
+        return code;
26
+    }
27
+
28
+    public String getText() {
29
+        return text;
30
+    }
31
+
32
+    /**
33
+     * 根据code获取text
34
+     *
35
+     * @param codeNo
36
+     * @return
37
+     */
38
+    public static String getTextByCode(String codeNo) {
39
+        for (FeeTypeEnum value : FeeTypeEnum.values()) {
40
+            if (value.getCode().equals(codeNo)) {
41
+                return value.getText();
42
+            }
43
+        }
44
+        return codeNo.toString();
45
+    }
46
+
47
+    /**
48
+     * 根据text获取code
49
+     *
50
+     * @param textStr
51
+     * @return
52
+     */
53
+    public static String getCodeByText(String textStr) {
54
+        for (FeeTypeEnum value : FeeTypeEnum.values()) {
55
+            if (value.getText().equals(textStr)) {
56
+                return value.getText();
57
+            }
58
+        }
59
+        return textStr;
60
+    }
61
+}

+ 11
- 16
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/StandardStageEnum.java Wyświetl plik

@@ -8,39 +8,33 @@ package com.zzsmart.qomo.kn.cost.manage.enums;
8 8
  * @Created wangqiong
9 9
  */
10 10
 public enum StandardStageEnum {
11
-    INIT("A", "初始"),
12
-    FIRST_BATCH("B", "首批"),
13
-    MASS_PRODUCTION("C", "量产"),
14
-
15
-
16
-    ;
11
+    INIT("A", "初始"), FIRST_BATCH("B", "首批"), MASS_PRODUCTION("C", "量产");
17 12
 
18 13
     private final String code;
19 14
     private final String text;
20 15
 
21
-    StandardStageEnum(String code, String text)
22
-    {
16
+    StandardStageEnum(String code, String text) {
23 17
         this.code = code;
24 18
         this.text = text;
25 19
     }
26 20
 
27
-    public String getCode()
28
-    {
21
+    public String getCode() {
29 22
         return code;
30 23
     }
31 24
 
32
-    public String getText()
33
-    {
25
+    public String getText() {
34 26
         return text;
35 27
     }
28
+
36 29
     /**
37 30
      * 根据code获取text
31
+     *
38 32
      * @param codeNo
39 33
      * @return
40 34
      */
41
-    public static String getTextByCode(String codeNo){
35
+    public static String getTextByCode(String codeNo) {
42 36
         for (StandardStageEnum value : StandardStageEnum.values()) {
43
-            if (value.getCode().equals(codeNo)){
37
+            if (value.getCode().equals(codeNo)) {
44 38
                 return value.getText();
45 39
             }
46 40
         }
@@ -49,12 +43,13 @@ public enum StandardStageEnum {
49 43
 
50 44
     /**
51 45
      * 根据text获取code
46
+     *
52 47
      * @param textStr
53 48
      * @return
54 49
      */
55
-    public static String getCodeByText(String textStr){
50
+    public static String getCodeByText(String textStr) {
56 51
         for (StandardStageEnum value : StandardStageEnum.values()) {
57
-            if (value.getText().equals(textStr)){
52
+            if (value.getText().equals(textStr)) {
58 53
                 return value.getText();
59 54
             }
60 55
         }

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostCountMapper.java Wyświetl plik

@@ -0,0 +1,14 @@
1
+package com.zzsmart.qomo.kn.cost.manage.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostCount;
5
+
6
+/**
7
+ * @Description: app_scene_cost_count
8
+ * @Author: jeecg-boot
9
+ * @Date: 2024-07-29
10
+ * @Version: V1.0
11
+ */
12
+public interface AppSceneCostCountMapper extends BaseMapper<AppSceneCostCount> {
13
+
14
+}

+ 15
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostModelMapper.java Wyświetl plik

@@ -0,0 +1,15 @@
1
+package com.zzsmart.qomo.kn.cost.manage.mapper;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostModel;
6
+
7
+/**
8
+ * @Description: app_scene_cost_model
9
+ * @Author: jeecg-boot
10
+ * @Date:   2024-07-29
11
+ * @Version: V1.0
12
+ */
13
+public interface AppSceneCostModelMapper extends BaseMapper<AppSceneCostModel> {
14
+
15
+}

+ 15
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostResultValueMapper.java Wyświetl plik

@@ -0,0 +1,15 @@
1
+package com.zzsmart.qomo.kn.cost.manage.mapper;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostResultValue;
6
+
7
+/**
8
+ * @Description: app_scene_cost_result_value
9
+ * @Author: jeecg-boot
10
+ * @Date: 2024-07-23
11
+ * @Version: V1.0
12
+ */
13
+public interface AppSceneCostResultValueMapper extends BaseMapper<AppSceneCostResultValue> {
14
+
15
+}

+ 0
- 14
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/BudgetPriceMapper.java Wyświetl plik

@@ -1,14 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.mapper;
2
-
3
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
-import com.zzsmart.qomo.kn.cost.manage.entity.BudgetPrice;
5
-
6
-/**
7
- * @Description: budget_price
8
- * @Author: jeecg-boot
9
- * @Date: 2024-06-11
10
- * @Version: V1.0
11
- */
12
-public interface BudgetPriceMapper extends BaseMapper<BudgetPrice> {
13
-
14
-}

+ 0
- 18
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/C7525costMapper.java Wyświetl plik

@@ -1,18 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.mapper;
2
-
3
-import java.util.List;
4
-
5
-import com.zzsmart.qomo.kn.cost.manage.entity.C7525cost;
6
-import org.apache.ibatis.annotations.Param;
7
-
8
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
9
-
10
-/**
11
- * @Description: c7525cost
12
- * @Author: jeecg-boot
13
- * @Date:   2024-06-06
14
- * @Version: V1.0
15
- */
16
-public interface C7525costMapper extends BaseMapper<C7525cost> {
17
-
18
-}

+ 0
- 17
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/CostCenterMapper.java Wyświetl plik

@@ -1,17 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.mapper;
2
-
3
-import java.util.List;
4
-
5
-import org.apache.ibatis.annotations.Param;
6
-import com.zzsmart.qomo.kn.cost.manage.entity.CostCenter;
7
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
8
-
9
-/**
10
- * @Description: cost_center
11
- * @Author: jeecg-boot
12
- * @Date:   2024-06-11
13
- * @Version: V1.0
14
- */
15
-public interface CostCenterMapper extends BaseMapper<CostCenter> {
16
-
17
-}

+ 22
- 3
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/CostMaterialBomMapper.java Wyświetl plik

@@ -1,18 +1,37 @@
1 1
 package com.zzsmart.qomo.kn.cost.manage.mapper;
2 2
 
3
-import com.zzsmart.qomo.kn.cost.manage.entity.CostMaterialBom;
3
+import com.alibaba.fastjson.JSONObject;
4 4
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.zzsmart.qomo.kn.cost.manage.entity.CostMaterialBom;
5 6
 import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
8
+import org.apache.ibatis.annotations.Select;
9
+
10
+import java.sql.Blob;
11
+import java.util.List;
6 12
 
7 13
 /**
8 14
  * <p>
9 15
  * 物料bom Mapper 接口
10 16
  * </p>
11 17
  *
12
- * @author  
13
- * @since 2024-06-19
18
+ * @author
19
+ * @since 2024-06-21
14 20
  */
15 21
 @Mapper
16 22
 public interface CostMaterialBomMapper extends BaseMapper<CostMaterialBom> {
23
+    /**
24
+     * 根据动态SQL语句查询物料BOM表
25
+     *
26
+     * @param selectCommand
27
+     * @return
28
+     */
29
+    @Select("${selectCommand}")
30
+    List<CostMaterialBom> customSelect(@Param("selectCommand") String selectCommand);
31
+
17 32
 
33
+    @Select("${selectSql}")
34
+    JSONObject customSelectOne(@Param("selectSql") String selectSql);
35
+    @Select("${SelectBlobModel}")
36
+    String customSelectBlobModelJson(@Param("SelectBlobModel") String SelectBlobModel);
18 37
 }

+ 0
- 24
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/CostStandardMapper.java Wyświetl plik

@@ -1,24 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.mapper;
2
-
3
-import java.util.List;
4
-
5
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
6
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
7
-import com.baomidou.mybatisplus.core.metadata.IPage;
8
-import com.baomidou.mybatisplus.core.toolkit.Constants;
9
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
10
-import com.zzsmart.qomo.kn.cost.manage.entity.CostStandard;
11
-import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardVO;
12
-import org.apache.ibatis.annotations.Param;
13
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
14
-
15
-/**
16
- * @Description: 标准成本
17
- * @Author: wangqiong
18
- * @Date:   2024-06-13
19
- * @Version: V1.0
20
- */
21
-public interface CostStandardMapper extends BaseMapper<CostStandard> {
22
-
23
-    IPage<CostStandardVO> pageList(@Param("page")Page<CostStandardVO> page , @Param(Constants.WRAPPER) Wrapper<CostStandardVO> wrapper);
24
-}

+ 0
- 18
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/LatestPurchasePriceMapper.java Wyświetl plik

@@ -1,18 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.mapper;
2
-
3
-import java.util.List;
4
-
5
-import com.zzsmart.qomo.kn.cost.manage.entity.LatestPurchasePrice;
6
-import org.apache.ibatis.annotations.Param;
7
-
8
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
9
-
10
-/**
11
- * @Description: latest_purchase_price
12
- * @Author: jeecg-boot
13
- * @Date:   2024-06-11
14
- * @Version: V1.0
15
- */
16
-public interface LatestPurchasePriceMapper extends BaseMapper<LatestPurchasePrice> {
17
-
18
-}

+ 0
- 18
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/ProduceBatchMapper.java Wyświetl plik

@@ -1,18 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.mapper;
2
-
3
-import java.util.List;
4
-
5
-import com.zzsmart.qomo.kn.cost.manage.entity.ProduceBatch;
6
-import org.apache.ibatis.annotations.Param;
7
-
8
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
9
-
10
-/**
11
- * @Description: produce_batch
12
- * @Author: jeecg-boot
13
- * @Date:   2024-06-11
14
- * @Version: V1.0
15
- */
16
-public interface ProduceBatchMapper extends BaseMapper<ProduceBatch> {
17
-
18
-}

+ 0
- 17
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/SapSubfactoryMapper.java Wyświetl plik

@@ -1,17 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.mapper;
2
-
3
-import java.util.List;
4
-
5
-import org.apache.ibatis.annotations.Param;
6
-import com.zzsmart.qomo.kn.cost.manage.entity.SapSubfactory;
7
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
8
-
9
-/**
10
- * @Description: sap_subfactory
11
- * @Author: jeecg-boot
12
- * @Date:   2024-06-11
13
- * @Version: V1.0
14
- */
15
-public interface SapSubfactoryMapper extends BaseMapper<SapSubfactory> {
16
-
17
-}

qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/ProduceBatchMapper.xml → qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostCountMapper.xml Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.ProduceBatchMapper">
3
+<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostCountMapper">
4 4
 
5 5
 </mapper>

qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/CostCenterMapper.xml → qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostModelMapper.xml Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.CostCenterMapper">
3
+<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostModelMapper">
4 4
 
5 5
 </mapper>

qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/LatestPurchasePriceMapper.xml → qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostResultValueMapper.xml Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.LatestPurchasePriceMapper">
3
+<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostResultValueMapper">
4 4
 
5 5
 </mapper>

+ 0
- 5
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/BudgetPriceMapper.xml Wyświetl plik

@@ -1,5 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.BudgetPriceMapper">
4
-
5
-</mapper>

+ 0
- 5
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/C7525costMapper.xml Wyświetl plik

@@ -1,5 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.C7525costMapper">
4
-
5
-</mapper>

+ 4
- 4
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/CostStandardDetailMapper.xml Wyświetl plik

@@ -40,8 +40,8 @@
40 40
     <select id="pageList" resultMap="CostStandardDetailVOResultMap">
41 41
         select c1.*, c2.version_number, c2.version_status, c2.stage,c2.version_year
42 42
         from
43
-            cost_standard_detail  c1
44
-                left join cost_standard_version  c2 on c1.version_number_id = c2.id
43
+            app_scene_cost_standard_detail  c1
44
+                left join app_scene_cost_standard_version  c2 on c1.version_number_id = c2.id
45 45
             ${ew.customSqlSegment}
46 46
         ORDER BY c1.create_time desc
47 47
 
@@ -49,8 +49,8 @@
49 49
     <select id="queryListResult" resultMap="CostStandardDetailVOResultMap">
50 50
         select c1.*, c2.version_number, c2.version_status, c2.stage,c2.version_year
51 51
         from
52
-            cost_standard_detail  c1
53
-                left join cost_standard_version  c2 on c1.version_number_id = c2.id
52
+            app_scene_cost_standard_detail  c1
53
+                left join app_scene_cost_standard_version  c2 on c1.version_number_id = c2.id
54 54
             ${ew.customSqlSegment}
55 55
         ORDER BY c1.create_time desc
56 56
 

+ 0
- 42
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/CostStandardMapper.xml Wyświetl plik

@@ -1,42 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.CostStandardMapper">
4
-    <resultMap id="CostStandardVOResultMap" type="com.zzsmart.qomo.kn.cost.manage.vo.CostStandardVO" >
5
-        <result column="id" property="id" />
6
-        <result column="material_number" property="materialNumber" />
7
-        <result column="version_number" property="versionNumber" />
8
-        <result column="version_number_id" property="versionNumberId" />
9
-        <result column="bom_cost" property="bomCost" />
10
-        <result column="packing_cost" property="packingCost" />
11
-        <result column="auxiliary_cost" property="auxiliaryCost" />
12
-        <result column="labor_cost" property="laborCost" />
13
-        <result column="euip_depreciation_cost" property="euipDepreciationCost" />
14
-        <result column="equip_consume_cost" property="equipConsumeCost" />
15
-        <result column="hydroelectricity_cost" property="hydroelectricityCost" />
16
-        <result column="other_cost" property="otherCost" />
17
-        <result column="trail_cost" property="trailCost" />
18
-        <result column="manufacture_cost" property="manufactureCost" />
19
-        <result column="tooling_cost" property="toolingCost" />
20
-        <result column="Inspection_cost" property="inspectionCost" />
21
-        <result column="mold_cost" property="moldCost" />
22
-        <result column="test_cost" property="testCost" />
23
-        <result column="total_cost" property="totalCost" />
24
-        <result column="create_by" property="createBy" />
25
-        <result column="create_time" property="createTime" />
26
-        <result column="update_by" property="updateBy" />
27
-        <result column="update_time" property="updateTime" />
28
-        <result column="remark" property="remark" />
29
-        <result column="version_status" property="versionStatus" />
30
-        <result column="stage" property="stage" />
31
-        <result column="version_year" property="versionYear" />
32
-    </resultMap>
33
-    <select id="pageList" resultMap="CostStandardVOResultMap">
34
- select c1.*, c2.version_number, c2.version_status, c2.stage,c2.version_year
35
-        from
36
-     cost_standard  c1
37
-         left join cost_standard_version  c2 on c1.version_number_id = c2.id
38
-        ${ew.customSqlSegment}
39
- ORDER BY c1.create_time desc
40
-
41
-    </select>
42
-</mapper>

+ 0
- 5
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/SapSubfactoryMapper.xml Wyświetl plik

@@ -1,5 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.SapSubfactoryMapper">
4
-
5
-</mapper>

+ 534
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/StandardCostService.java Wyświetl plik

@@ -0,0 +1,534 @@
1
+package com.zzsmart.qomo.kn.cost.manage.plugin;
2
+
3
+import com.alibaba.fastjson.JSON;
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.zzsmart.qomo.kn.cost.manage.entity.*;
6
+import com.zzsmart.qomo.kn.cost.manage.enums.FeeTypeEnum;
7
+import com.zzsmart.qomo.kn.cost.manage.mapper.CostMaterialBomMapper;
8
+import com.zzsmart.qomo.kn.cost.manage.service.*;
9
+import com.zzsmart.qomo.kn.cost.manage.vo.FlowTaskInfoVO;
10
+import com.zzsmart.qomo.plugin.task.api.TaskExecutionContext;
11
+import lombok.extern.slf4j.Slf4j;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.stereotype.Service;
14
+
15
+import javax.annotation.PostConstruct;
16
+import java.math.BigDecimal;
17
+import java.util.ArrayList;
18
+import java.util.List;
19
+import java.util.Map;
20
+import java.util.stream.Collectors;
21
+
22
+@Service
23
+@Slf4j
24
+public class StandardCostService {
25
+    /**
26
+     * 物料BOM信息
27
+     */
28
+    @Autowired
29
+    CostMaterialBomMapper costMaterialBomMapper;
30
+    @Autowired
31
+    CostMaterialBomService costMaterialBomService;
32
+
33
+    /**
34
+     * 小时费率
35
+     */
36
+    @Autowired
37
+    IHourRateService iHourRateService;
38
+    /**
39
+     * 采购单价
40
+     */
41
+    @Autowired
42
+    CostPurchasePriceService costPurchasePriceService;
43
+    /**
44
+     * 工序
45
+     */
46
+    @Autowired
47
+    CostMaterialProcessHoursService costMaterialProcessHoursService;
48
+    /**
49
+     * 标准成本计算结果
50
+     */
51
+    @Autowired
52
+    IAppSceneCostResultValueService iAppSceneCostResultValueService;
53
+    public static StandardCostService standardCostService;
54
+    @Autowired
55
+    IAppSceneCostCountService appSceneCostCountService;
56
+
57
+
58
+    @PostConstruct
59
+    public void init() {
60
+        standardCostService = this;
61
+        standardCostService.costMaterialBomMapper = this.costMaterialBomMapper;
62
+        standardCostService.appSceneCostCountService = this.appSceneCostCountService;
63
+        standardCostService.costMaterialBomService = this.costMaterialBomService;
64
+        standardCostService.costPurchasePriceService = this.costPurchasePriceService;
65
+        standardCostService.iHourRateService = this.iHourRateService;
66
+        standardCostService.costMaterialProcessHoursService = this.costMaterialProcessHoursService;
67
+        standardCostService.iAppSceneCostResultValueService = this.iAppSceneCostResultValueService;
68
+    }
69
+
70
+    /**
71
+     * 更新成本计算模型任务状态
72
+     */
73
+    public static void updateCostCountTaskStatus(Boolean isSuccess, Integer costCountTaskId) {
74
+        log.info("更新成本计算模型任务状态");
75
+        standardCostService.appSceneCostCountService.updateById(AppSceneCostCount.builder().id(costCountTaskId).status(isSuccess != null && isSuccess ? 1 : 0).build());
76
+    }
77
+
78
+    /**
79
+     * 1.物料编号输入任务
80
+     */
81
+    public static void materialInputTask(TaskExecutionContext parameters) {
82
+        try {
83
+            //获取任务流程相关信息
84
+            FlowTaskInfoVO flowTaskInfoVO = analysisFlowTaskInfo(parameters);
85
+            //获取最上层的物料号
86
+            String topMaterialCode = flowTaskInfoVO.getTopMaterialCode();
87
+            //获取任务类型
88
+            String taskType = parameters.getTaskType();
89
+            //获取任务代码
90
+            String taskCode = flowTaskInfoVO.getTaskCode();
91
+            //获取流程id
92
+            String flowInstanceId = flowTaskInfoVO.getFlowInstanceId();
93
+            //1.查询出所有满足物料编号的物料(BOM物料)
94
+            String sql = flowTaskInfoVO.getSqlString();
95
+            log.info("传递过来的SQL语句:" + sql);
96
+            List<CostMaterialBom> list = standardCostService.costMaterialBomService.queryAllBomInfoBytopMaterialCode(topMaterialCode);
97
+            log.info("Full EmptyTask list: {}", list);
98
+            //2.把查询的结果存放在临时表里(表命名规则:前缀_流程id_组件code)
99
+            for (int i = 0; list != null && i < list.size(); i++) {
100
+                CostMaterialBom material = list.get(i);
101
+                AppSceneCostResultValue appSceneCostResultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(material.getMaterialCode()).parentMarterialNo(material.getParentMaterialCode()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).num(material.getNumber()).build();
102
+                standardCostService.iAppSceneCostResultValueService.save(appSceneCostResultValue);
103
+            }
104
+        } catch (Exception e) {
105
+            throw new RuntimeException(e);
106
+        }
107
+    }
108
+
109
+    /**
110
+     * 获取任务流程相关信息
111
+     *
112
+     * @param parameters
113
+     * @return
114
+     */
115
+    private static FlowTaskInfoVO analysisFlowTaskInfo(TaskExecutionContext parameters) {
116
+        FlowTaskInfoVO flowTaskInfoVO = new FlowTaskInfoVO();
117
+        if (parameters != null) {
118
+            String s = parameters.toString();
119
+            String[] split = s.split(",");
120
+            for (int i = 0; i < split.length; i++) {
121
+                String s1 = split[i];
122
+                if (s1.contains("taskType")) {
123
+                    String[] split1 = s1.split("=");
124
+                    if (split1[1].contains("\"")) {
125
+                        split1[1] = split1[1].replaceAll("^\"|\"$", ""); // 去除首尾引号
126
+                        flowTaskInfoVO.setTaskType(split1[1]);
127
+                    } else {
128
+                        flowTaskInfoVO.setTaskType(split1[1]);
129
+                    }
130
+                } else if (s1.contains("taskCode")) {
131
+                    String[] split1 = s1.split(":");
132
+                    if (split1[1].contains("\"")) {
133
+                        split1[1] = split1[1].replaceAll("^\"|\"$", ""); // 去除首尾引号
134
+                        flowTaskInfoVO.setTaskCode(split1[1]);
135
+                    } else {
136
+                        flowTaskInfoVO.setTaskCode(split1[1]);
137
+                    }
138
+                } else if (s1.contains("flowInstanceId")) {
139
+                    String[] split1 = s1.split("=");
140
+                    if (split1[1].contains("\"")) {
141
+                        split1[1] = split1[1].replaceAll("^\"|\"$", ""); // 去除首尾引号
142
+                        flowTaskInfoVO.setFlowInstanceId(split1[1]);
143
+                    } else {
144
+                        flowTaskInfoVO.setFlowInstanceId(split1[1]);
145
+                    }
146
+                } else if (s1.contains("sqlString")) {
147
+                    String[] split1 = s1.split(":");
148
+                    if (split1[1].contains("\"")) {
149
+                        split1[1] = split1[1].replaceAll("^\"|\"$", ""); // 去除首尾引号
150
+                        flowTaskInfoVO.setSqlString(split1[1]);
151
+                    } else {
152
+                        flowTaskInfoVO.setSqlString(split1[1]);
153
+                    }
154
+                } else if (s.contains("feeType") && s1.contains("feeType")) {
155
+                    String[] split1 = s1.split(":");
156
+                    if (split1[1].contains("\"")) {
157
+                        split1[1] = split1[1].replaceAll("^\"|\"$", ""); // 去除首尾引号
158
+                        flowTaskInfoVO.setFeeType(split1[1]);
159
+                    } else {
160
+                        flowTaskInfoVO.setFeeType(split1[1]);
161
+                    }
162
+                }
163
+            }
164
+        }
165
+        //通过任务流程id查询流程定义信息(qomo_flow_definition)
166
+        flowTaskInfoVO = queryFlowDefinitionByFlowInstanceId(flowTaskInfoVO);
167
+        return flowTaskInfoVO;
168
+    }
169
+
170
+    /**
171
+     * @param flowTaskInfoVO
172
+     */
173
+    private static FlowTaskInfoVO queryFlowDefinitionByFlowInstanceId(FlowTaskInfoVO flowTaskInfoVO) {
174
+        String sql = "SELECT A.model_json from qomo_flow_definition as A LEFT JOIN   qomo_flow_instance AS B ON A.`code`=B.flow_definition_code  WHERE B.id=" + flowTaskInfoVO.getFlowInstanceId() + " limit 1";
175
+        String blob = standardCostService.costMaterialBomMapper.customSelectBlobModelJson(sql);
176
+        if (blob != null) {
177
+            if (blob != null && blob.contains("topMaterialCode")) {
178
+                JSONObject jsonObject1 = JSON.parseObject(blob);
179
+                String topMaterialCode = jsonObject1.getString("topMaterialCode");
180
+                flowTaskInfoVO.setTopMaterialCode(topMaterialCode);
181
+            }
182
+        }
183
+        return flowTaskInfoVO;
184
+    }
185
+
186
+    /**
187
+     * 2. 物料成本任务
188
+     */
189
+    public static void materialCostTask(TaskExecutionContext parameters) {
190
+        try {
191
+            //获取任务流程相关信息
192
+            FlowTaskInfoVO flowTaskInfoVO = analysisFlowTaskInfo(parameters);
193
+            //获取最上层的物料号
194
+            String topMaterialCode = flowTaskInfoVO.getTopMaterialCode();
195
+            //获取任务类型
196
+            String taskType = parameters.getTaskType();
197
+            //获取任务代码
198
+            String taskCode = flowTaskInfoVO.getTaskCode();
199
+            //获取流程id
200
+            String flowInstanceId = flowTaskInfoVO.getFlowInstanceId();
201
+            //成本类型
202
+            String feeType = FeeTypeEnum.MaterialCost.getCode();
203
+            //1.查询出物料编号对应的下所有的BOM信息
204
+            List<AppSceneCostResultValue> list = standardCostService.iAppSceneCostResultValueService.getResultValueByTopMaterialNo(topMaterialCode, "MaterialInput", flowInstanceId);
205
+            //2.计算出所有的单个物料的物料成本
206
+            //2.1查询出物料的单价和采购数量
207
+            List<String> MarterialNoList = new ArrayList<>();
208
+            if (list != null && list.size() > 0) {
209
+                MarterialNoList = list.stream().filter(s -> s.getMarterialNo() != null).map(AppSceneCostResultValue::getMarterialNo).collect(Collectors.toList());
210
+            }
211
+            //查询物料的采购价
212
+            Map<String, BigDecimal> purchasePriceMap = standardCostService.costPurchasePriceService.getMinCostPurchasePriceByMaterialNo(MarterialNoList);
213
+            for (int i = 0; i < list.size(); i++) {
214
+                AppSceneCostResultValue appSceneCostResultValue = list.get(i);
215
+                String marterialNo = appSceneCostResultValue.getMarterialNo();
216
+                Integer num = appSceneCostResultValue.getNum();
217
+                if (marterialNo != null && num != null) {
218
+                    BigDecimal price = purchasePriceMap.get(marterialNo);
219
+                    BigDecimal number = new BigDecimal(num.toString());
220
+                    //单价乘以数量
221
+                    BigDecimal totalCost = price.multiply(number);
222
+                    //2.2计算出人工成本并存储到成本结果数据表中
223
+                    AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(marterialNo).parentMarterialNo(appSceneCostResultValue.getParentMarterialNo()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(totalCost + "").build();
224
+                    standardCostService.iAppSceneCostResultValueService.save(resultValue);
225
+                }
226
+            }
227
+        } catch (Exception e) {
228
+            throw new RuntimeException(e);
229
+        }
230
+    }
231
+
232
+    /**
233
+     * 3.人工成本任务
234
+     */
235
+    public static void laborCostTask(TaskExecutionContext parameters) {
236
+        try {
237
+            //获取任务流程相关信息
238
+            FlowTaskInfoVO flowTaskInfoVO = analysisFlowTaskInfo(parameters);
239
+            //获取最上层的物料号
240
+            String topMaterialCode = flowTaskInfoVO.getTopMaterialCode();
241
+            //获取任务类型
242
+            String taskType = parameters.getTaskType();
243
+            //获取任务代码
244
+            String taskCode = flowTaskInfoVO.getTaskCode();
245
+            //获取流程id
246
+            String flowInstanceId = flowTaskInfoVO.getFlowInstanceId();
247
+            //成本类型
248
+            String feeType = FeeTypeEnum.LaborCost.getCode();
249
+            String sql1 = flowTaskInfoVO.getSqlString();
250
+            log.info("sql1:" + sql1);
251
+            String sql = sql1.replaceAll("^\"|\"$", ""); // 去除首尾引号
252
+            log.info("sql:" + sql);
253
+            JSONObject jsonObject = standardCostService.costMaterialBomMapper.customSelectOne(sql);
254
+            BigDecimal hourRate = new BigDecimal("0");
255
+            if (jsonObject != null) {
256
+                HourRate rate = JSON.toJavaObject(jsonObject, HourRate.class);
257
+                hourRate = rate.getLaborHourRate();
258
+            }
259
+            //1.查询出物料编号对应的下所有的BOM信息
260
+            List<AppSceneCostResultValue> list = standardCostService.iAppSceneCostResultValueService.getResultValueByTopMaterialNo(topMaterialCode, "MaterialInput", flowInstanceId);
261
+            //2.计算出所有的单个物料的人工成本
262
+            //2.1查询出物料的人员工时和人工小时费率(涉及:小时费率表和工序表)
263
+            List<String> MarterialNoList = new ArrayList<>();
264
+            if (list != null && list.size() > 0) {
265
+                MarterialNoList = list.stream().filter(s -> s.getMarterialNo() != null).map(AppSceneCostResultValue::getMarterialNo).collect(Collectors.toList());
266
+            }
267
+            //查询工序工时
268
+            Map<String, List<CostMaterialProcessHours>> processHoursMap = standardCostService.costMaterialProcessHoursService.getProcessHoursByMaterialNo(MarterialNoList);
269
+            for (int i = 0; i < list.size(); i++) {
270
+                AppSceneCostResultValue appSceneCostResultValue = list.get(i);
271
+                String marterialNo = appSceneCostResultValue.getMarterialNo();
272
+                if (marterialNo != null) {
273
+                    BigDecimal totalCost = new BigDecimal("0.0");
274
+                    List<CostMaterialProcessHours> costMaterialProcessHours = processHoursMap.get(marterialNo);
275
+                    if (costMaterialProcessHours != null && costMaterialProcessHours.size() > 0) {
276
+                        for (int j = 0; j < costMaterialProcessHours.size(); j++) {
277
+                            CostMaterialProcessHours processHours = costMaterialProcessHours.get(j);
278
+                            BigDecimal laborHours = processHours.getLaborHours();
279
+                            //计算总人工成本
280
+                            totalCost = totalCost.add(laborHours.multiply(hourRate));
281
+                        }
282
+                    }
283
+                    //2.2计算出人工成本并存储到成本结果数据表中
284
+                    AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(marterialNo).parentMarterialNo(appSceneCostResultValue.getParentMarterialNo()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(totalCost + "").costType(feeType).build();
285
+                    standardCostService.iAppSceneCostResultValueService.save(resultValue);
286
+                }
287
+            }
288
+        } catch (Exception e) {
289
+            throw new RuntimeException(e);
290
+        }
291
+
292
+    }
293
+
294
+    /**
295
+     * 4.制造费用成本任务
296
+     */
297
+    public static void manufacturingCostTask(TaskExecutionContext parameters) {
298
+        try {
299
+            //获取任务流程相关信息
300
+            FlowTaskInfoVO flowTaskInfoVO = analysisFlowTaskInfo(parameters);
301
+            //获取最上层的物料号
302
+            String topMaterialCode = flowTaskInfoVO.getTopMaterialCode();
303
+            //获取任务类型
304
+            String taskType = parameters.getTaskType();
305
+            //获取任务代码
306
+            String taskCode = flowTaskInfoVO.getTaskCode();
307
+            //获取流程id
308
+            String flowInstanceId = flowTaskInfoVO.getFlowInstanceId();
309
+            /**
310
+             * 费用类别
311
+             */
312
+            String feeType = flowTaskInfoVO.getFeeType();
313
+            /**
314
+             * 小时费率
315
+             */
316
+            String sql1 = flowTaskInfoVO.getSqlString();
317
+            log.info("sql1:" + sql1);
318
+            String sql = sql1.replaceAll("^\"|\"$", ""); // 去除首尾引号
319
+            log.info("sql:" + sql);
320
+            JSONObject jsonObject = standardCostService.costMaterialBomMapper.customSelectOne(sql);
321
+            BigDecimal hourRate = new BigDecimal("0");
322
+            if (jsonObject != null) {
323
+                HourRate rate = JSON.toJavaObject(jsonObject, HourRate.class);
324
+                hourRate = rate.getLaborHourRate();
325
+            }
326
+            //1.查询出物料编号对应的下所有的BOM信息
327
+            List<AppSceneCostResultValue> list = standardCostService.iAppSceneCostResultValueService.getResultValueByTopMaterialNo(topMaterialCode, "MaterialInput", flowInstanceId);
328
+            //2.根据费用类型进行不同的费用计算
329
+            //查询工序工时
330
+            List<String> MarterialNoList = new ArrayList<>();
331
+            if (list != null && list.size() > 0) {
332
+                MarterialNoList = list.stream().filter(s -> s.getMarterialNo() != null).map(AppSceneCostResultValue::getMarterialNo).collect(Collectors.toList());
333
+            }
334
+            Map<String, List<CostMaterialProcessHours>> processHoursMap = standardCostService.costMaterialProcessHoursService.getProcessHoursByMaterialNo(MarterialNoList);
335
+            //2.1机器折旧费(机器工时*费率)
336
+            if (FeeTypeEnum.EquipmentFee.getCode().equals(feeType)) {
337
+                for (int i = 0; i < list.size(); i++) {
338
+                    AppSceneCostResultValue appSceneCostResultValue = list.get(i);
339
+                    String marterialNo = appSceneCostResultValue.getMarterialNo();
340
+                    if (marterialNo != null) {
341
+                        BigDecimal totalCost = new BigDecimal("0.0");
342
+                        List<CostMaterialProcessHours> costMaterialProcessHours = processHoursMap.get(marterialNo);
343
+                        if (costMaterialProcessHours != null && costMaterialProcessHours.size() > 0) {
344
+                            for (int j = 0; j < costMaterialProcessHours.size(); j++) {
345
+                                CostMaterialProcessHours processHours = costMaterialProcessHours.get(j);
346
+                                BigDecimal laborHours = processHours.getDeviceHours();
347
+                                //计算机器成本
348
+                                totalCost = totalCost.add(laborHours.multiply(hourRate));
349
+                            }
350
+                        }
351
+                        //2.2计算机器成本并存储到成本结果数据表中
352
+                        AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(marterialNo).parentMarterialNo(appSceneCostResultValue.getParentMarterialNo()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(totalCost + "").costType(feeType).build();
353
+                        standardCostService.iAppSceneCostResultValueService.save(resultValue);
354
+                    }
355
+                }
356
+            } else if (FeeTypeEnum.SupplyMaterialFee.getCode().equals(feeType)) {
357
+                //机物料消耗(辅料工时*费率)
358
+                for (int i = 0; i < list.size(); i++) {
359
+                    AppSceneCostResultValue appSceneCostResultValue = list.get(i);
360
+                    String marterialNo = appSceneCostResultValue.getMarterialNo();
361
+                    if (marterialNo != null) {
362
+                        BigDecimal totalCost = new BigDecimal("0.0");
363
+                        List<CostMaterialProcessHours> costMaterialProcessHours = processHoursMap.get(marterialNo);
364
+                        if (costMaterialProcessHours != null && costMaterialProcessHours.size() > 0) {
365
+                            for (int j = 0; j < costMaterialProcessHours.size(); j++) {
366
+                                CostMaterialProcessHours processHours = costMaterialProcessHours.get(j);
367
+                                //TODO 辅料工时来源
368
+                                BigDecimal laborHours = processHours.getLaborHours();
369
+                                //机物料消耗
370
+                                totalCost = totalCost.add(laborHours.multiply(hourRate));
371
+                            }
372
+                        }
373
+                        //2.2计算机物料消耗存储到成本结果数据表中
374
+                        AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(marterialNo).parentMarterialNo(appSceneCostResultValue.getParentMarterialNo()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(totalCost + "").costType(feeType).build();
375
+                        standardCostService.iAppSceneCostResultValueService.save(resultValue);
376
+                    }
377
+                }
378
+            } else if (FeeTypeEnum.DriverFee.getCode().equals(feeType)) {
379
+                //2.3水电费(燃动力工时*费率)
380
+                for (int i = 0; i < list.size(); i++) {
381
+                    AppSceneCostResultValue appSceneCostResultValue = list.get(i);
382
+                    String marterialNo = appSceneCostResultValue.getMarterialNo();
383
+                    if (marterialNo != null) {
384
+                        BigDecimal totalCost = new BigDecimal("0.0");
385
+                        List<CostMaterialProcessHours> costMaterialProcessHours = processHoursMap.get(marterialNo);
386
+                        if (costMaterialProcessHours != null && costMaterialProcessHours.size() > 0) {
387
+                            for (int j = 0; j < costMaterialProcessHours.size(); j++) {
388
+                                CostMaterialProcessHours processHours = costMaterialProcessHours.get(j);
389
+                                //TODO 燃动力工时来源
390
+                                BigDecimal laborHours = processHours.getLaborHours();
391
+                                //机物料消耗
392
+                                totalCost = totalCost.add(laborHours.multiply(hourRate));
393
+                            }
394
+                        }
395
+                        //2.2计算机物料消耗存储到成本结果数据表中
396
+                        AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(marterialNo).parentMarterialNo(appSceneCostResultValue.getParentMarterialNo()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(totalCost + "").costType(feeType).build();
397
+                        standardCostService.iAppSceneCostResultValueService.save(resultValue);
398
+                    }
399
+                }
400
+            } else if (FeeTypeEnum.OtherFee.getCode().equals(feeType)) {
401
+                //2.4其他制费(其他工时*费率)
402
+                for (int i = 0; i < list.size(); i++) {
403
+                    AppSceneCostResultValue appSceneCostResultValue = list.get(i);
404
+                    String marterialNo = appSceneCostResultValue.getMarterialNo();
405
+                    if (marterialNo != null) {
406
+                        BigDecimal totalCost = new BigDecimal("0.0");
407
+                        List<CostMaterialProcessHours> costMaterialProcessHours = processHoursMap.get(marterialNo);
408
+                        if (costMaterialProcessHours != null && costMaterialProcessHours.size() > 0) {
409
+                            for (int j = 0; j < costMaterialProcessHours.size(); j++) {
410
+                                CostMaterialProcessHours processHours = costMaterialProcessHours.get(j);
411
+                                //TODO 其他工时来源
412
+                                BigDecimal laborHours = processHours.getLaborHours();
413
+                                //机物料消耗
414
+                                totalCost = totalCost.add(laborHours.multiply(hourRate));
415
+                            }
416
+                        }
417
+                        //2.2计算机物料消耗存储到成本结果数据表中
418
+                        AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(marterialNo).parentMarterialNo(appSceneCostResultValue.getParentMarterialNo()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(totalCost + "").costType(feeType).build();
419
+                        standardCostService.iAppSceneCostResultValueService.save(resultValue);
420
+                    }
421
+                }
422
+            } else if (FeeTypeEnum.LogisticsFee.getCode().equals(feeType)) {
423
+                //查出所有的机器折旧费、机物料消耗、水电费、其他制费
424
+                list = standardCostService.iAppSceneCostResultValueService.getResultValueByTopMaterialNo(topMaterialCode, "ManufacturingCost", flowInstanceId);
425
+                //2.5物流费((机器折旧+机物料消耗+水电费+其他制费)*10.16%)
426
+                //按照物料编号进行分组
427
+                Map<String, List<AppSceneCostResultValue>> materialNoMap = list.stream().collect(Collectors.groupingBy(AppSceneCostResultValue::getMarterialNo));
428
+                for (String key : materialNoMap.keySet()) {
429
+                    List<AppSceneCostResultValue> appSceneCostResultValues = materialNoMap.get(key);
430
+                    BigDecimal totalCost = new BigDecimal("0.0");
431
+                    for (int j = 0; j < appSceneCostResultValues.size(); j++) {
432
+                        AppSceneCostResultValue appSceneCostResultValue = appSceneCostResultValues.get(j);
433
+                        String countValue = appSceneCostResultValue.getCountValue();
434
+                        if (countValue != null) {
435
+                            totalCost = totalCost.add(new BigDecimal(countValue));
436
+                        }
437
+                    }
438
+                    AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(key).parentMarterialNo(appSceneCostResultValues.get(0).getParentMarterialNo()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(totalCost.multiply(new BigDecimal("0.1016")).toString()).costType(feeType).build();
439
+                    standardCostService.iAppSceneCostResultValueService.save(resultValue);
440
+                }
441
+            }
442
+        } catch (Exception e) {
443
+            throw new RuntimeException(e);
444
+        }
445
+
446
+    }
447
+
448
+    /**
449
+     * 5.标准成本计算任务
450
+     */
451
+    public static void standardCostTask(TaskExecutionContext parameters) {
452
+        //获取任务流程相关信息
453
+        FlowTaskInfoVO flowTaskInfoVO = analysisFlowTaskInfo(parameters);
454
+        //获取最上层的物料号
455
+        String topMaterialCode = flowTaskInfoVO.getTopMaterialCode();
456
+        //获取任务类型
457
+        String taskType = parameters.getTaskType();
458
+        //获取任务代码
459
+        String taskCode = flowTaskInfoVO.getTaskCode();
460
+        //获取流程id
461
+        String flowInstanceId = flowTaskInfoVO.getFlowInstanceId();
462
+        //1.查询出物料编号对应的下所有的BOM信息
463
+        List<AppSceneCostResultValue> list = standardCostService.iAppSceneCostResultValueService.getResultValueByTopMaterialNo(topMaterialCode, null, flowInstanceId);
464
+        //2.计算出所有的单个物料的本阶的标准成本(标准成本=物料成本+人工成本+制造费用)
465
+        //按照物料编号进行分组
466
+        Map<String, List<AppSceneCostResultValue>> materialNoMap = list.stream().collect(Collectors.groupingBy(AppSceneCostResultValue::getMarterialNo));
467
+        for (String key : materialNoMap.keySet()) {
468
+            List<AppSceneCostResultValue> appSceneCostResultValues = materialNoMap.get(key);
469
+            //本阶成本
470
+            BigDecimal currentCost = new BigDecimal("0.0");
471
+            for (int j = 0; j < appSceneCostResultValues.size(); j++) {
472
+                AppSceneCostResultValue appSceneCostResultValue = appSceneCostResultValues.get(j);
473
+                String countValue = appSceneCostResultValue.getCountValue();
474
+                if (countValue != null) {
475
+                    currentCost = currentCost.add(new BigDecimal(countValue));
476
+                }
477
+            }
478
+            AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(key).parentMarterialNo(appSceneCostResultValues.get(0).getParentMarterialNo()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(currentCost.toString()).build();
479
+            standardCostService.iAppSceneCostResultValueService.save(resultValue);
480
+        }
481
+        //3.计算出所有的单个物料的累计标准成本
482
+        List<AppSceneCostResultValue> standardCostList = standardCostService.iAppSceneCostResultValueService.getResultValueByTopMaterialNo(topMaterialCode, taskType, flowInstanceId);
483
+        //TODO 优化累计成本的计算
484
+        totalCountCost(standardCostList, topMaterialCode, taskType, taskCode, flowInstanceId);
485
+    }
486
+
487
+    /**
488
+     * 循环算出各个物料的累计成本
489
+     *
490
+     * @param standardCostList
491
+     * @param topMaterialCode
492
+     * @param taskType
493
+     * @param taskCode
494
+     * @param flowInstanceId
495
+     */
496
+    private static void totalCountCost(List<AppSceneCostResultValue> standardCostList, String topMaterialCode, String taskType, String taskCode, String flowInstanceId) {
497
+        Map<String, List<AppSceneCostResultValue>> parentMaterialNoMap = standardCostList.stream().filter(appSceneCostResultValue -> appSceneCostResultValue.getParentMarterialNo() != null).collect(Collectors.groupingBy(AppSceneCostResultValue::getParentMarterialNo));
498
+        for (int i = 0; i < standardCostList.size(); i++) {
499
+            AppSceneCostResultValue oldAppSceneCostResultValue = standardCostList.get(i);
500
+            BigDecimal totalCost = new BigDecimal(oldAppSceneCostResultValue.getCountValue());
501
+            totalCost = loopCount(oldAppSceneCostResultValue, parentMaterialNoMap, topMaterialCode, taskType, taskCode, flowInstanceId, totalCost);
502
+            oldAppSceneCostResultValue.setTotalValue(totalCost.toString());
503
+            standardCostService.iAppSceneCostResultValueService.updateById(oldAppSceneCostResultValue);
504
+            //TODO 更新结果集到标准成本单行查询中去
505
+        }
506
+    }
507
+
508
+    /**
509
+     * //循环算出各个物料的累计成本
510
+     * 递归计算出累计成本
511
+     *
512
+     * @param appSceneCostResultValue
513
+     * @param parentMaterialNoMap
514
+     * @param topMaterialCode
515
+     * @param taskType
516
+     * @param taskCode
517
+     * @param flowInstanceId
518
+     */
519
+    private static BigDecimal loopCount(AppSceneCostResultValue appSceneCostResultValue, Map<String, List<AppSceneCostResultValue>> parentMaterialNoMap, String topMaterialCode, String taskType, String taskCode, String flowInstanceId, BigDecimal totalCost) {
520
+        String marterialNo = appSceneCostResultValue.getMarterialNo();
521
+        if (parentMaterialNoMap.containsKey(marterialNo)) {
522
+            List<AppSceneCostResultValue> appSceneCostResultValues = parentMaterialNoMap.get(marterialNo);
523
+            for (int j = 0; j < appSceneCostResultValues.size(); j++) {
524
+                AppSceneCostResultValue appSceneCostResultValue1 = appSceneCostResultValues.get(j);
525
+                String countValue = appSceneCostResultValue1.getCountValue();
526
+                if (countValue != null) {
527
+                    totalCost = totalCost.add(new BigDecimal(countValue));
528
+                }
529
+                loopCount(appSceneCostResultValue1, parentMaterialNoMap, topMaterialCode, taskType, taskCode, flowInstanceId, totalCost);
530
+            }
531
+        }
532
+        return totalCost;
533
+    }
534
+}

+ 52
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/laborcost/LaborCostParameters.java Wyświetl plik

@@ -0,0 +1,52 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.laborcost;
19
+
20
+
21
+import com.zzsmart.qomo.plugin.task.api.model.ResourceInfo;
22
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
23
+
24
+import java.util.ArrayList;
25
+import java.util.List;
26
+
27
+/**
28
+ *
29
+ */
30
+public class LaborCostParameters extends AbstractParameters {
31
+    @Override
32
+    public boolean checkParameters() {
33
+        return true;
34
+    }
35
+
36
+    @Override
37
+    public List<ResourceInfo> getResourceFilesList() {
38
+        return new ArrayList<>();
39
+    }
40
+
41
+    @Override
42
+    public void dealOutParam(String result) {
43
+
44
+    }
45
+
46
+    @Override
47
+    public String toString() {
48
+        return getLocalParams().toString();
49
+//        return "人工成本任务";
50
+    }
51
+
52
+}

+ 72
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/laborcost/LaborCostTask.java Wyświetl plik

@@ -0,0 +1,72 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.laborcost;
19
+
20
+import com.zzsmart.qomo.kn.cost.manage.plugin.StandardCostService;
21
+import com.zzsmart.qomo.plugin.task.api.*;
22
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
23
+
24
+/**
25
+ * 人工成本计算任务
26
+ */
27
+public class LaborCostTask extends AbstractTask {
28
+    /**
29
+     * taskExecutionContext
30
+     */
31
+    private TaskExecutionContext taskExecutionContext;
32
+
33
+    /**
34
+     * sql parameters
35
+     */
36
+    private LaborCostParameters emptyParameters;
37
+
38
+
39
+    /**
40
+     * Abstract Yarn Task
41
+     *
42
+     * @param taskRequest taskRequest
43
+     */
44
+    public LaborCostTask(TaskExecutionContext taskRequest) {
45
+        super(taskRequest);
46
+        this.taskExecutionContext = taskRequest;
47
+        this.emptyParameters = new LaborCostParameters();
48
+    }
49
+
50
+    @Override
51
+    public AbstractParameters getParameters() {
52
+        return emptyParameters;
53
+    }
54
+
55
+    @Override
56
+    public void handle(TaskCallBack taskCallBack) throws TaskException {
57
+        log.info("Full EmptyTask parameters: {}", taskExecutionContext);
58
+        try {
59
+            StandardCostService.laborCostTask(taskExecutionContext);
60
+        } catch (Exception e) {
61
+            //运行失败退出
62
+            setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
63
+        }
64
+        //运行成功退出
65
+        setExitStatusCode(TaskConstants.EXIT_CODE_SUCCESS);
66
+    }
67
+
68
+    @Override
69
+    public void cancel() throws TaskException {
70
+
71
+    }
72
+}

+ 52
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/laborcost/LaborCostTaskChannel.java Wyświetl plik

@@ -0,0 +1,52 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.laborcost;
19
+
20
+
21
+import com.zzsmart.qomo.common.utils.JSONUtils;
22
+import com.zzsmart.qomo.plugin.task.api.AbstractTask;
23
+import com.zzsmart.qomo.plugin.task.api.TaskChannel;
24
+import com.zzsmart.qomo.plugin.task.api.TaskExecutionContext;
25
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
26
+import com.zzsmart.qomo.plugin.task.api.parameters.ParametersNode;
27
+import com.zzsmart.qomo.plugin.task.api.parameters.resource.ResourceParametersHelper;
28
+
29
+
30
+public class LaborCostTaskChannel implements TaskChannel {
31
+
32
+    @Override
33
+    public void cancelApplication(boolean status) {
34
+
35
+    }
36
+
37
+    @Override
38
+    public AbstractTask createTask(TaskExecutionContext taskRequest) {
39
+        return new LaborCostTask(taskRequest);
40
+    }
41
+
42
+    @Override
43
+    public AbstractParameters parseParameters(ParametersNode parametersNode) {
44
+        return JSONUtils.parseObject(parametersNode.getTaskParams(), LaborCostParameters.class);
45
+    }
46
+
47
+    @Override
48
+    public ResourceParametersHelper getResources(String parameters) {
49
+        return JSONUtils.parseObject(parameters, LaborCostParameters.class).getResources();
50
+    }
51
+
52
+}

+ 44
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/laborcost/LaborCostTaskChannelFactory.java Wyświetl plik

@@ -0,0 +1,44 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.laborcost;
19
+
20
+import com.google.auto.service.AutoService;
21
+import com.zzsmart.qomo.plugin.task.api.TaskChannel;
22
+import com.zzsmart.qomo.plugin.task.api.TaskChannelFactory;
23
+import com.zzsmart.qomo.spi.params.base.PluginParams;
24
+
25
+import java.util.List;
26
+
27
+@AutoService(TaskChannelFactory.class)
28
+public class LaborCostTaskChannelFactory implements TaskChannelFactory {
29
+
30
+    @Override
31
+    public String getName() {
32
+        return "LaborCost";
33
+    }
34
+
35
+    @Override
36
+    public List<PluginParams> getParams() {
37
+        return null;
38
+    }
39
+
40
+    @Override
41
+    public TaskChannel create() {
42
+        return new LaborCostTaskChannel();
43
+    }
44
+}

+ 51
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/manufacturingcost/ManufacturingCostParameters.java Wyświetl plik

@@ -0,0 +1,51 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.manufacturingcost;
19
+
20
+
21
+import com.zzsmart.qomo.plugin.task.api.model.ResourceInfo;
22
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
23
+
24
+import java.util.ArrayList;
25
+import java.util.List;
26
+
27
+/**
28
+ *
29
+ */
30
+public class ManufacturingCostParameters extends AbstractParameters {
31
+    @Override
32
+    public boolean checkParameters() {
33
+        return true;
34
+    }
35
+
36
+    @Override
37
+    public List<ResourceInfo> getResourceFilesList() {
38
+        return new ArrayList<>();
39
+    }
40
+
41
+    @Override
42
+    public void dealOutParam(String result) {
43
+
44
+    }
45
+
46
+    @Override
47
+    public String toString() {
48
+        return "制造费用成本任务";
49
+    }
50
+
51
+}

+ 72
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/manufacturingcost/ManufacturingCostTask.java Wyświetl plik

@@ -0,0 +1,72 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.manufacturingcost;
19
+
20
+import com.zzsmart.qomo.kn.cost.manage.plugin.StandardCostService;
21
+import com.zzsmart.qomo.plugin.task.api.*;
22
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
23
+
24
+/**
25
+ * 制造费用成本任务
26
+ */
27
+public class ManufacturingCostTask extends AbstractTask {
28
+    /**
29
+     * taskExecutionContext
30
+     */
31
+    private TaskExecutionContext taskExecutionContext;
32
+
33
+    /**
34
+     * sql parameters
35
+     */
36
+    private ManufacturingCostParameters emptyParameters;
37
+
38
+
39
+    /**
40
+     * Abstract Yarn Task
41
+     *
42
+     * @param taskRequest taskRequest
43
+     */
44
+    public ManufacturingCostTask(TaskExecutionContext taskRequest) {
45
+        super(taskRequest);
46
+        this.taskExecutionContext = taskRequest;
47
+        this.emptyParameters = new ManufacturingCostParameters();
48
+    }
49
+
50
+    @Override
51
+    public AbstractParameters getParameters() {
52
+        return emptyParameters;
53
+    }
54
+
55
+    @Override
56
+    public void handle(TaskCallBack taskCallBack) throws TaskException {
57
+        log.info("Full EmptyTask parameters: {}", taskRequest);
58
+        try {
59
+            StandardCostService.manufacturingCostTask(taskRequest);
60
+        } catch (Exception e) {
61
+            //运行失败退出
62
+            setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
63
+        }
64
+        //运行成功退出
65
+        setExitStatusCode(TaskConstants.EXIT_CODE_SUCCESS);
66
+    }
67
+
68
+    @Override
69
+    public void cancel() throws TaskException {
70
+
71
+    }
72
+}

+ 52
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/manufacturingcost/ManufacturingCostTaskChannel.java Wyświetl plik

@@ -0,0 +1,52 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.manufacturingcost;
19
+
20
+
21
+import com.zzsmart.qomo.common.utils.JSONUtils;
22
+import com.zzsmart.qomo.plugin.task.api.AbstractTask;
23
+import com.zzsmart.qomo.plugin.task.api.TaskChannel;
24
+import com.zzsmart.qomo.plugin.task.api.TaskExecutionContext;
25
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
26
+import com.zzsmart.qomo.plugin.task.api.parameters.ParametersNode;
27
+import com.zzsmart.qomo.plugin.task.api.parameters.resource.ResourceParametersHelper;
28
+
29
+
30
+public class ManufacturingCostTaskChannel implements TaskChannel {
31
+
32
+    @Override
33
+    public void cancelApplication(boolean status) {
34
+
35
+    }
36
+
37
+    @Override
38
+    public AbstractTask createTask(TaskExecutionContext taskRequest) {
39
+        return new ManufacturingCostTask(taskRequest);
40
+    }
41
+
42
+    @Override
43
+    public AbstractParameters parseParameters(ParametersNode parametersNode) {
44
+        return JSONUtils.parseObject(parametersNode.getTaskParams(), ManufacturingCostParameters.class);
45
+    }
46
+
47
+    @Override
48
+    public ResourceParametersHelper getResources(String parameters) {
49
+        return JSONUtils.parseObject(parameters, ManufacturingCostParameters.class).getResources();
50
+    }
51
+
52
+}

+ 44
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/manufacturingcost/ManufacturingCostTaskChannelFactory.java Wyświetl plik

@@ -0,0 +1,44 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.manufacturingcost;
19
+
20
+import com.google.auto.service.AutoService;
21
+import com.zzsmart.qomo.plugin.task.api.TaskChannel;
22
+import com.zzsmart.qomo.plugin.task.api.TaskChannelFactory;
23
+import com.zzsmart.qomo.spi.params.base.PluginParams;
24
+
25
+import java.util.List;
26
+
27
+@AutoService(TaskChannelFactory.class)
28
+public class ManufacturingCostTaskChannelFactory implements TaskChannelFactory {
29
+
30
+    @Override
31
+    public String getName() {
32
+        return "ManufacturingCost";
33
+    }
34
+
35
+    @Override
36
+    public List<PluginParams> getParams() {
37
+        return null;
38
+    }
39
+
40
+    @Override
41
+    public TaskChannel create() {
42
+        return new ManufacturingCostTaskChannel();
43
+    }
44
+}

+ 51
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialcost/MaterialCostParameters.java Wyświetl plik

@@ -0,0 +1,51 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.materialcost;
19
+
20
+
21
+import com.zzsmart.qomo.plugin.task.api.model.ResourceInfo;
22
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
23
+
24
+import java.util.ArrayList;
25
+import java.util.List;
26
+
27
+/**
28
+ *
29
+ */
30
+public class MaterialCostParameters extends AbstractParameters {
31
+    @Override
32
+    public boolean checkParameters() {
33
+        return true;
34
+    }
35
+
36
+    @Override
37
+    public List<ResourceInfo> getResourceFilesList() {
38
+        return new ArrayList<>();
39
+    }
40
+
41
+    @Override
42
+    public void dealOutParam(String result) {
43
+
44
+    }
45
+
46
+    @Override
47
+    public String toString() {
48
+        return "物料成本任务";
49
+    }
50
+
51
+}

+ 72
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialcost/MaterialCostTask.java Wyświetl plik

@@ -0,0 +1,72 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.materialcost;
19
+
20
+import com.zzsmart.qomo.kn.cost.manage.plugin.StandardCostService;
21
+import com.zzsmart.qomo.plugin.task.api.*;
22
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
23
+
24
+/**
25
+ * 物料成本计算任务
26
+ */
27
+public class MaterialCostTask extends AbstractTask {
28
+    /**
29
+     * taskExecutionContext
30
+     */
31
+    private TaskExecutionContext taskExecutionContext;
32
+
33
+    /**
34
+     * sql parameters
35
+     */
36
+    private MaterialCostParameters emptyParameters;
37
+
38
+
39
+    /**
40
+     * Abstract Yarn Task
41
+     *
42
+     * @param taskRequest taskRequest
43
+     */
44
+    public MaterialCostTask(TaskExecutionContext taskRequest) {
45
+        super(taskRequest);
46
+        this.taskExecutionContext = taskRequest;
47
+        this.emptyParameters = new MaterialCostParameters();
48
+    }
49
+
50
+    @Override
51
+    public AbstractParameters getParameters() {
52
+        return emptyParameters;
53
+    }
54
+
55
+    @Override
56
+    public void handle(TaskCallBack taskCallBack) throws TaskException {
57
+        log.info("Full EmptyTask parameters: {}", taskExecutionContext);
58
+        try {
59
+            StandardCostService.materialCostTask(taskExecutionContext);
60
+        } catch (Exception e) {
61
+            //运行失败退出
62
+            setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
63
+        }
64
+        //运行成功退出
65
+        setExitStatusCode(TaskConstants.EXIT_CODE_SUCCESS);
66
+    }
67
+
68
+    @Override
69
+    public void cancel() throws TaskException {
70
+
71
+    }
72
+}

+ 52
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialcost/MaterialCostTaskChannel.java Wyświetl plik

@@ -0,0 +1,52 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.materialcost;
19
+
20
+
21
+import com.zzsmart.qomo.common.utils.JSONUtils;
22
+import com.zzsmart.qomo.plugin.task.api.AbstractTask;
23
+import com.zzsmart.qomo.plugin.task.api.TaskChannel;
24
+import com.zzsmart.qomo.plugin.task.api.TaskExecutionContext;
25
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
26
+import com.zzsmart.qomo.plugin.task.api.parameters.ParametersNode;
27
+import com.zzsmart.qomo.plugin.task.api.parameters.resource.ResourceParametersHelper;
28
+
29
+
30
+public class MaterialCostTaskChannel implements TaskChannel {
31
+
32
+    @Override
33
+    public void cancelApplication(boolean status) {
34
+
35
+    }
36
+
37
+    @Override
38
+    public AbstractTask createTask(TaskExecutionContext taskRequest) {
39
+        return new MaterialCostTask(taskRequest);
40
+    }
41
+
42
+    @Override
43
+    public AbstractParameters parseParameters(ParametersNode parametersNode) {
44
+        return JSONUtils.parseObject(parametersNode.getTaskParams(), MaterialCostParameters.class);
45
+    }
46
+
47
+    @Override
48
+    public ResourceParametersHelper getResources(String parameters) {
49
+        return JSONUtils.parseObject(parameters, MaterialCostParameters.class).getResources();
50
+    }
51
+
52
+}

+ 44
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialcost/MaterialCostTaskChannelFactory.java Wyświetl plik

@@ -0,0 +1,44 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.materialcost;
19
+
20
+import com.google.auto.service.AutoService;
21
+import com.zzsmart.qomo.plugin.task.api.TaskChannel;
22
+import com.zzsmart.qomo.plugin.task.api.TaskChannelFactory;
23
+import com.zzsmart.qomo.spi.params.base.PluginParams;
24
+
25
+import java.util.List;
26
+
27
+@AutoService(TaskChannelFactory.class)
28
+public class MaterialCostTaskChannelFactory implements TaskChannelFactory {
29
+
30
+    @Override
31
+    public String getName() {
32
+        return "MaterialCost";
33
+    }
34
+
35
+    @Override
36
+    public List<PluginParams> getParams() {
37
+        return null;
38
+    }
39
+
40
+    @Override
41
+    public TaskChannel create() {
42
+        return new MaterialCostTaskChannel();
43
+    }
44
+}

+ 51
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialinput/MaterialInputParameters.java Wyświetl plik

@@ -0,0 +1,51 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.materialinput;
19
+
20
+
21
+import com.zzsmart.qomo.plugin.task.api.model.ResourceInfo;
22
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
23
+
24
+import java.util.ArrayList;
25
+import java.util.List;
26
+
27
+/**
28
+ *
29
+ */
30
+public class MaterialInputParameters extends AbstractParameters {
31
+    @Override
32
+    public boolean checkParameters() {
33
+        return true;
34
+    }
35
+
36
+    @Override
37
+    public List<ResourceInfo> getResourceFilesList() {
38
+        return new ArrayList<>();
39
+    }
40
+
41
+    @Override
42
+    public void dealOutParam(String result) {
43
+
44
+    }
45
+
46
+    @Override
47
+    public String toString() {
48
+        return "物料编号输入任务";
49
+    }
50
+
51
+}

+ 72
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialinput/MaterialInputTask.java Wyświetl plik

@@ -0,0 +1,72 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.materialinput;
19
+
20
+import com.zzsmart.qomo.kn.cost.manage.plugin.StandardCostService;
21
+import com.zzsmart.qomo.plugin.task.api.*;
22
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
23
+
24
+/**
25
+ * 物料编号输入任务
26
+ */
27
+public class MaterialInputTask extends AbstractTask {
28
+    /**
29
+     * taskExecutionContext
30
+     */
31
+    private TaskExecutionContext taskExecutionContext;
32
+
33
+    /**
34
+     * sql parameters
35
+     */
36
+    private MaterialInputParameters emptyParameters;
37
+
38
+
39
+    /**
40
+     * Abstract Yarn Task
41
+     *
42
+     * @param taskRequest taskRequest
43
+     */
44
+    public MaterialInputTask(TaskExecutionContext taskRequest) {
45
+        super(taskRequest);
46
+        this.taskExecutionContext = taskRequest;
47
+        this.emptyParameters = new MaterialInputParameters();
48
+    }
49
+
50
+    @Override
51
+    public AbstractParameters getParameters() {
52
+        return emptyParameters;
53
+    }
54
+
55
+    @Override
56
+    public void handle(TaskCallBack taskCallBack) throws TaskException {
57
+        log.info("Full EmptyTask parameters: {}", taskExecutionContext);
58
+        try {
59
+            StandardCostService.materialInputTask(taskExecutionContext);
60
+        } catch (Exception e) {
61
+            //运行失败退出
62
+            setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
63
+        }
64
+        //运行成功退出
65
+        setExitStatusCode(TaskConstants.EXIT_CODE_SUCCESS);
66
+    }
67
+
68
+    @Override
69
+    public void cancel() throws TaskException {
70
+
71
+    }
72
+}

+ 52
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialinput/MaterialInputTaskChannel.java Wyświetl plik

@@ -0,0 +1,52 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.materialinput;
19
+
20
+
21
+import com.zzsmart.qomo.common.utils.JSONUtils;
22
+import com.zzsmart.qomo.plugin.task.api.AbstractTask;
23
+import com.zzsmart.qomo.plugin.task.api.TaskChannel;
24
+import com.zzsmart.qomo.plugin.task.api.TaskExecutionContext;
25
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
26
+import com.zzsmart.qomo.plugin.task.api.parameters.ParametersNode;
27
+import com.zzsmart.qomo.plugin.task.api.parameters.resource.ResourceParametersHelper;
28
+
29
+
30
+public class MaterialInputTaskChannel implements TaskChannel {
31
+
32
+    @Override
33
+    public void cancelApplication(boolean status) {
34
+
35
+    }
36
+
37
+    @Override
38
+    public AbstractTask createTask(TaskExecutionContext taskRequest) {
39
+        return new MaterialInputTask(taskRequest);
40
+    }
41
+
42
+    @Override
43
+    public AbstractParameters parseParameters(ParametersNode parametersNode) {
44
+        return JSONUtils.parseObject(parametersNode.getTaskParams(), MaterialInputParameters.class);
45
+    }
46
+
47
+    @Override
48
+    public ResourceParametersHelper getResources(String parameters) {
49
+        return JSONUtils.parseObject(parameters, MaterialInputParameters.class).getResources();
50
+    }
51
+
52
+}

+ 44
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialinput/MaterialInputTaskChannelFactory.java Wyświetl plik

@@ -0,0 +1,44 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.materialinput;
19
+
20
+import com.google.auto.service.AutoService;
21
+import com.zzsmart.qomo.plugin.task.api.TaskChannel;
22
+import com.zzsmart.qomo.plugin.task.api.TaskChannelFactory;
23
+import com.zzsmart.qomo.spi.params.base.PluginParams;
24
+
25
+import java.util.List;
26
+
27
+@AutoService(TaskChannelFactory.class)
28
+public class MaterialInputTaskChannelFactory implements TaskChannelFactory {
29
+
30
+    @Override
31
+    public String getName() {
32
+        return "MaterialInput";
33
+    }
34
+
35
+    @Override
36
+    public List<PluginParams> getParams() {
37
+        return null;
38
+    }
39
+
40
+    @Override
41
+    public TaskChannel create() {
42
+        return new MaterialInputTaskChannel();
43
+    }
44
+}

+ 51
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/standardcost/StandardCostParameters.java Wyświetl plik

@@ -0,0 +1,51 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.standardcost;
19
+
20
+
21
+import com.zzsmart.qomo.plugin.task.api.model.ResourceInfo;
22
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
23
+
24
+import java.util.ArrayList;
25
+import java.util.List;
26
+
27
+/**
28
+ *
29
+ */
30
+public class StandardCostParameters extends AbstractParameters {
31
+    @Override
32
+    public boolean checkParameters() {
33
+        return true;
34
+    }
35
+
36
+    @Override
37
+    public List<ResourceInfo> getResourceFilesList() {
38
+        return new ArrayList<>();
39
+    }
40
+
41
+    @Override
42
+    public void dealOutParam(String result) {
43
+
44
+    }
45
+
46
+    @Override
47
+    public String toString() {
48
+        return "标准成本计算任务";
49
+    }
50
+
51
+}

+ 77
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/standardcost/StandardCostTask.java Wyświetl plik

@@ -0,0 +1,77 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.standardcost;
19
+
20
+import com.zzsmart.qomo.kn.cost.manage.plugin.StandardCostService;
21
+import com.zzsmart.qomo.plugin.task.api.*;
22
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
23
+
24
+/**
25
+ * 标准成本计算任务
26
+ */
27
+public class StandardCostTask extends AbstractTask {
28
+
29
+    /**
30
+     * taskExecutionContext
31
+     */
32
+    private TaskExecutionContext taskExecutionContext;
33
+
34
+    /**
35
+     * sql parameters
36
+     */
37
+    private StandardCostParameters emptyParameters;
38
+
39
+
40
+    /**
41
+     * Abstract Yarn Task
42
+     *
43
+     * @param taskRequest taskRequest
44
+     */
45
+    public StandardCostTask(TaskExecutionContext taskRequest) {
46
+        super(taskRequest);
47
+        this.taskExecutionContext = taskRequest;
48
+        this.emptyParameters = new StandardCostParameters();
49
+    }
50
+
51
+    @Override
52
+    public AbstractParameters getParameters() {
53
+        return emptyParameters;
54
+    }
55
+
56
+    @Override
57
+    public void handle(TaskCallBack taskCallBack) throws TaskException {
58
+        log.info("Full EmptyTask parameters: {}", taskRequest);
59
+        try {
60
+            StandardCostService.standardCostTask(taskRequest);
61
+        } catch (Exception e) {
62
+            //TODO 更新成本计算模型任务状态
63
+            StandardCostService.updateCostCountTaskStatus(false, 1);
64
+            //运行失败退出
65
+            setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
66
+        }
67
+        //运行成功退出
68
+        //TODO 更新成本计算模型任务状态
69
+        StandardCostService.updateCostCountTaskStatus(true, 1);
70
+        setExitStatusCode(TaskConstants.EXIT_CODE_SUCCESS);
71
+    }
72
+
73
+    @Override
74
+    public void cancel() throws TaskException {
75
+
76
+    }
77
+}

+ 52
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/standardcost/StandardCostTaskChannel.java Wyświetl plik

@@ -0,0 +1,52 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.standardcost;
19
+
20
+
21
+import com.zzsmart.qomo.common.utils.JSONUtils;
22
+import com.zzsmart.qomo.plugin.task.api.AbstractTask;
23
+import com.zzsmart.qomo.plugin.task.api.TaskChannel;
24
+import com.zzsmart.qomo.plugin.task.api.TaskExecutionContext;
25
+import com.zzsmart.qomo.plugin.task.api.parameters.AbstractParameters;
26
+import com.zzsmart.qomo.plugin.task.api.parameters.ParametersNode;
27
+import com.zzsmart.qomo.plugin.task.api.parameters.resource.ResourceParametersHelper;
28
+
29
+
30
+public class StandardCostTaskChannel implements TaskChannel {
31
+
32
+    @Override
33
+    public void cancelApplication(boolean status) {
34
+
35
+    }
36
+
37
+    @Override
38
+    public AbstractTask createTask(TaskExecutionContext taskRequest) {
39
+        return new StandardCostTask(taskRequest);
40
+    }
41
+
42
+    @Override
43
+    public AbstractParameters parseParameters(ParametersNode parametersNode) {
44
+        return JSONUtils.parseObject(parametersNode.getTaskParams(), StandardCostParameters.class);
45
+    }
46
+
47
+    @Override
48
+    public ResourceParametersHelper getResources(String parameters) {
49
+        return JSONUtils.parseObject(parameters, StandardCostParameters.class).getResources();
50
+    }
51
+
52
+}

+ 44
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/standardcost/StandardCostTaskChannelFactory.java Wyświetl plik

@@ -0,0 +1,44 @@
1
+/*
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements.  See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License.  You may obtain a copy of the License at
8
+ *
9
+ *    http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+package com.zzsmart.qomo.kn.cost.manage.plugin.standardcost;
19
+
20
+import com.google.auto.service.AutoService;
21
+import com.zzsmart.qomo.plugin.task.api.TaskChannel;
22
+import com.zzsmart.qomo.plugin.task.api.TaskChannelFactory;
23
+import com.zzsmart.qomo.spi.params.base.PluginParams;
24
+
25
+import java.util.List;
26
+
27
+@AutoService(TaskChannelFactory.class)
28
+public class StandardCostTaskChannelFactory implements TaskChannelFactory {
29
+
30
+    @Override
31
+    public String getName() {
32
+        return "StandardCost";
33
+    }
34
+
35
+    @Override
36
+    public List<PluginParams> getParams() {
37
+        return null;
38
+    }
39
+
40
+    @Override
41
+    public TaskChannel create() {
42
+        return new StandardCostTaskChannel();
43
+    }
44
+}

+ 16
- 2
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/CostMaterialBomService.java Wyświetl plik

@@ -3,14 +3,28 @@ package com.zzsmart.qomo.kn.cost.manage.service;
3 3
 import com.zzsmart.qomo.kn.cost.manage.entity.CostMaterialBom;
4 4
 import com.baomidou.mybatisplus.extension.service.IService;
5 5
 
6
+import java.util.List;
7
+
6 8
 /**
7 9
  * <p>
8 10
  * 物料bom 服务类
9 11
  * </p>
10 12
  *
11
- * @author  
12
- * @since 2024-06-19
13
+ * @author
14
+ * @since 2024-06-21
13 15
  */
14 16
 public interface CostMaterialBomService extends IService<CostMaterialBom> {
17
+    /**
18
+     * 分页查询
19
+     * @param
20
+     * @return
21
+     */
22
+    List<CostMaterialBom> queryListResult(String materialNumber);
15 23
 
24
+    /**
25
+     * 查询最顶层物料编号下所有的物料
26
+     * @param topMaterialCode
27
+     * @return
28
+     */
29
+    List<CostMaterialBom> queryAllBomInfoBytopMaterialCode(String topMaterialCode);
16 30
 }

+ 7
- 1
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/CostMaterialProcessHoursService.java Wyświetl plik

@@ -3,6 +3,9 @@ package com.zzsmart.qomo.kn.cost.manage.service;
3 3
 import com.zzsmart.qomo.kn.cost.manage.entity.CostMaterialProcessHours;
4 4
 import com.baomidou.mybatisplus.extension.service.IService;
5 5
 
6
+import java.util.List;
7
+import java.util.Map;
8
+
6 9
 /**
7 10
  * <p>
8 11
  * 物料工时工序表 服务类
@@ -12,5 +15,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
12 15
  * @since 2024-06-19
13 16
  */
14 17
 public interface CostMaterialProcessHoursService extends IService<CostMaterialProcessHours> {
15
-
18
+/**
19
+ * 查询满足物料编号的工时工序
20
+ */
21
+ Map<String,List<CostMaterialProcessHours>> getProcessHoursByMaterialNo(List<String> materialNos);
16 22
 }

+ 9
- 1
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/CostPurchasePriceService.java Wyświetl plik

@@ -1,8 +1,13 @@
1 1
 package com.zzsmart.qomo.kn.cost.manage.service;
2 2
 
3
+import com.zzsmart.qomo.kn.cost.manage.entity.CostMaterialProcessHours;
3 4
 import com.zzsmart.qomo.kn.cost.manage.entity.CostPurchasePrice;
4 5
 import com.baomidou.mybatisplus.extension.service.IService;
5 6
 
7
+import java.math.BigDecimal;
8
+import java.util.List;
9
+import java.util.Map;
10
+
6 11
 /**
7 12
  * <p>
8 13
  * 物料采购单价 服务类
@@ -12,5 +17,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
12 17
  * @since 2024-06-19
13 18
  */
14 19
 public interface CostPurchasePriceService extends IService<CostPurchasePrice> {
15
-
20
+    /**
21
+     * 查询满足物料编号的最低采购价
22
+     */
23
+    Map<String, BigDecimal> getMinCostPurchasePriceByMaterialNo(List<String> materialNos);
16 24
 }

+ 17
- 3
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/CostStandardDetailService.java Wyświetl plik

@@ -1,27 +1,41 @@
1 1
 package com.zzsmart.qomo.kn.cost.manage.service;
2 2
 
3
+import com.alibaba.fastjson.JSONObject;
3 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
-import com.zzsmart.qomo.kn.cost.manage.entity.CostStandardDetail;
6 6
 import com.baomidou.mybatisplus.extension.service.IService;
7
+import com.zzsmart.qomo.kn.cost.manage.entity.CostStandardDetail;
8
+import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardDetailSearch;
7 9
 import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardDetailVO;
8
-import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardVO;
10
+
11
+import javax.servlet.http.HttpServletRequest;
12
+import javax.servlet.http.HttpServletResponse;
9 13
 
10 14
 /**
11 15
  * <p>
12 16
  * 标准成本明细表 服务类
13 17
  * </p>
14 18
  *
15
- * @author cost_purchase_price
19
+ * @author app_scene_cost_purchase_price
16 20
  * @since 2024-06-19
17 21
  */
18 22
 public interface CostStandardDetailService extends IService<CostStandardDetail> {
19 23
     /**
20 24
      * 分页查询
25
+     *
21 26
      * @param page
22 27
      * @param
23 28
      * @return
24 29
      */
25 30
     IPage<CostStandardDetailVO> pageList(Page<CostStandardDetailVO> page, CostStandardDetailVO costStandard);
26 31
 
32
+    /**
33
+     * 导出列表信息为Excel文件
34
+     *
35
+     * @param request
36
+     * @param response
37
+     * @param costStandardDetailSearch
38
+     * @return
39
+     */
40
+    JSONObject exportExcel(HttpServletRequest request, HttpServletResponse response, CostStandardDetailSearch costStandardDetailSearch);
27 41
 }

+ 32
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostCountService.java Wyświetl plik

@@ -0,0 +1,32 @@
1
+package com.zzsmart.qomo.kn.cost.manage.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostCount;
5
+
6
+/**
7
+ * @Description: app_scene_cost_count
8
+ * @Author: jeecg-boot
9
+ * @Date:   2024-07-29
10
+ * @Version: V1.0
11
+ */
12
+public interface IAppSceneCostCountService extends IService<AppSceneCostCount> {
13
+    /**
14
+     * 查看关键缺失部件
15
+     * @param id
16
+     * @return
17
+     */
18
+    AppSceneCostCount queryMissingComponentById(String id);
19
+
20
+    /**
21
+     * 重新计算
22
+     * @param id
23
+     * @return
24
+     */
25
+    AppSceneCostCount recountById(Integer id);
26
+
27
+    /**
28
+     * 添加标准成本计算任务
29
+     * @param appSceneCostCount
30
+     */
31
+    void addCostCountTask(AppSceneCostCount appSceneCostCount);
32
+}

+ 24
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostModelService.java Wyświetl plik

@@ -0,0 +1,24 @@
1
+package com.zzsmart.qomo.kn.cost.manage.service;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+import com.zzsmart.qomo.dao.entity.FlowDefinition;
6
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostModel;
7
+
8
+import java.util.List;
9
+
10
+/**
11
+ * @Description: app_scene_cost_model
12
+ * @Author: jeecg-boot
13
+ * @Date: 2024-07-29
14
+ * @Version: V1.0
15
+ */
16
+public interface IAppSceneCostModelService {
17
+    /**
18
+     * 查询标准成本模型列表
19
+     *
20
+     * @param queryWrapper
21
+     * @return
22
+     */
23
+    List<FlowDefinition> queryListResult(Wrapper<FlowDefinition> queryWrapper);
24
+}

+ 21
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostResultValueService.java Wyświetl plik

@@ -0,0 +1,21 @@
1
+package com.zzsmart.qomo.kn.cost.manage.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostResultValue;
5
+
6
+import java.util.List;
7
+
8
+/**
9
+ * @Description: app_scene_cost_result_value
10
+ * @Author: jeecg-boot
11
+ * @Date:   2024-07-22
12
+ * @Version: V1.0
13
+ */
14
+public interface IAppSceneCostResultValueService extends IService<AppSceneCostResultValue> {
15
+    /**
16
+     * 根据顶级物料编码查询满足条件的结果值
17
+     * @param topMaterialCode
18
+     * @return
19
+     */
20
+    List<AppSceneCostResultValue> getResultValueByTopMaterialNo(String topMaterialCode,String taskType,String flowInstanceId);
21
+}

+ 0
- 14
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IBudgetPriceService.java Wyświetl plik

@@ -1,14 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.service;
2
-
3
-import com.zzsmart.qomo.kn.cost.manage.entity.BudgetPrice;
4
-import com.baomidou.mybatisplus.extension.service.IService;
5
-
6
-/**
7
- * @Description: budget_price
8
- * @Author: jeecg-boot
9
- * @Date:   2024-06-11
10
- * @Version: V1.0
11
- */
12
-public interface IBudgetPriceService extends IService<BudgetPrice> {
13
-
14
-}

+ 0
- 15
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IC7525costService.java Wyświetl plik

@@ -1,15 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.service;
2
-
3
-
4
-import com.baomidou.mybatisplus.extension.service.IService;
5
-import com.zzsmart.qomo.kn.cost.manage.entity.C7525cost;
6
-
7
-/**
8
- * @Description: c7525cost
9
- * @Author: jeecg-boot
10
- * @Date:   2024-06-06
11
- * @Version: V1.0
12
- */
13
-public interface IC7525costService extends IService<C7525cost> {
14
-
15
-}

+ 0
- 14
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/ICostCenterService.java Wyświetl plik

@@ -1,14 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.service;
2
-
3
-import com.zzsmart.qomo.kn.cost.manage.entity.CostCenter;
4
-import com.baomidou.mybatisplus.extension.service.IService;
5
-
6
-/**
7
- * @Description: cost_center
8
- * @Author: jeecg-boot
9
- * @Date:   2024-06-11
10
- * @Version: V1.0
11
- */
12
-public interface ICostCenterService extends IService<CostCenter> {
13
-
14
-}

+ 0
- 26
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/ICostStandardService.java Wyświetl plik

@@ -1,26 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.service;
2
-
3
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
-import com.baomidou.mybatisplus.core.metadata.IPage;
5
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
-import com.baomidou.mybatisplus.extension.service.IService;
7
-import com.zzsmart.qomo.kn.cost.manage.entity.CostStandard;
8
-import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardVO;
9
-
10
-import javax.servlet.http.HttpServletRequest;
11
-
12
-/**
13
- * @Description: 标准成本
14
- * @Author: wangqiong
15
- * @Date:   2024-06-13
16
- * @Version: V1.0
17
- */
18
-public interface ICostStandardService extends IService<CostStandard> {
19
-    /**
20
-     * 分页查询
21
-     * @param page
22
-     * @param
23
-     * @return
24
-     */
25
-    IPage<CostStandardVO> pageList(Page<CostStandardVO> page, CostStandardVO costStandard);
26
-}

+ 8
- 1
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/ICostStandardVersionService.java Wyświetl plik

@@ -2,11 +2,13 @@ package com.zzsmart.qomo.kn.cost.manage.service;
2 2
 
3 3
 
4 4
 import com.baomidou.mybatisplus.extension.service.IService;
5
+import com.zzsmart.qomo.kn.cost.manage.entity.CostMaterialBom;
5 6
 import com.zzsmart.qomo.kn.cost.manage.entity.CostStandardVersion;
6 7
 import org.jeecg.common.api.vo.Result;
7 8
 
8 9
 import javax.servlet.http.HttpServletRequest;
9 10
 import javax.servlet.http.HttpServletResponse;
11
+import java.util.List;
10 12
 
11 13
 
12 14
 /**
@@ -24,5 +26,10 @@ public interface ICostStandardVersionService extends IService<CostStandardVersio
24 26
      * @return
25 27
      */
26 28
     Result<?> importExcel(HttpServletRequest request, HttpServletResponse response, Class<CostStandardVersion> costStandardVersionClass);
27
-
29
+    /**
30
+     * 分页查询
31
+     * @param
32
+     * @return
33
+     */
34
+    List<CostStandardVersion> queryListResult(String versionNumber);
28 35
 }

+ 0
- 15
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/ILatestPurchasePriceService.java Wyświetl plik

@@ -1,15 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.service;
2
-
3
-
4
-import com.baomidou.mybatisplus.extension.service.IService;
5
-import com.zzsmart.qomo.kn.cost.manage.entity.LatestPurchasePrice;
6
-
7
-/**
8
- * @Description: latest_purchase_price
9
- * @Author: jeecg-boot
10
- * @Date:   2024-06-11
11
- * @Version: V1.0
12
- */
13
-public interface ILatestPurchasePriceService extends IService<LatestPurchasePrice> {
14
-
15
-}

+ 0
- 14
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IProduceBatchService.java Wyświetl plik

@@ -1,14 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.service;
2
-
3
-import com.baomidou.mybatisplus.extension.service.IService;
4
-import com.zzsmart.qomo.kn.cost.manage.entity.ProduceBatch;
5
-
6
-/**
7
- * @Description: produce_batch
8
- * @Author: jeecg-boot
9
- * @Date:   2024-06-11
10
- * @Version: V1.0
11
- */
12
-public interface IProduceBatchService extends IService<ProduceBatch> {
13
-
14
-}

+ 0
- 14
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/ISapSubfactoryService.java Wyświetl plik

@@ -1,14 +0,0 @@
1
-package com.zzsmart.qomo.kn.cost.manage.service;
2
-
3
-import com.zzsmart.qomo.kn.cost.manage.entity.SapSubfactory;
4
-import com.baomidou.mybatisplus.extension.service.IService;
5
-
6
-/**
7
- * @Description: sap_subfactory
8
- * @Author: jeecg-boot
9
- * @Date:   2024-06-11
10
- * @Version: V1.0
11
- */
12
-public interface ISapSubfactoryService extends IService<SapSubfactory> {
13
-
14
-}

+ 88
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/AppSceneCostCountServiceImpl.java Wyświetl plik

@@ -0,0 +1,88 @@
1
+package com.zzsmart.qomo.kn.cost.manage.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostCount;
5
+import com.zzsmart.qomo.kn.cost.manage.entity.CostStandardVersion;
6
+import com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostCountMapper;
7
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostCountService;
8
+import com.zzsmart.qomo.kn.cost.manage.service.ICostStandardVersionService;
9
+import com.zzsmart.qomo.service.IDataFlowInstanceService;
10
+import org.springframework.beans.factory.annotation.Autowired;
11
+import org.springframework.stereotype.Service;
12
+
13
+import java.util.Date;
14
+
15
+/**
16
+ * @Description: app_scene_cost_count
17
+ * @Author: jeecg-boot
18
+ * @Date: 2024-07-29
19
+ * @Version: V1.0
20
+ */
21
+@Service
22
+public class AppSceneCostCountServiceImpl extends ServiceImpl<AppSceneCostCountMapper, AppSceneCostCount> implements IAppSceneCostCountService {
23
+    @Autowired
24
+    private ICostStandardVersionService costStandardVersionService;
25
+    @Autowired
26
+    private IDataFlowInstanceService flowInstanceService;
27
+
28
+    /**
29
+     * 查看关键缺失部件
30
+     *
31
+     * @param id
32
+     * @return
33
+     */
34
+    @Override
35
+    public AppSceneCostCount queryMissingComponentById(String id) {
36
+        return null;
37
+    }
38
+
39
+    /**
40
+     * 重新计算
41
+     *
42
+     * @param id
43
+     * @return
44
+     */
45
+    @Override
46
+    public AppSceneCostCount recountById(Integer id) {
47
+        if (id != null) {
48
+            AppSceneCostCount appSceneCostCount = getById(id);
49
+            if (appSceneCostCount != null) {
50
+                //执行标准成本计算
51
+                executeStandardCost(id, appSceneCostCount.getFlowDefinitionId());
52
+            }
53
+        }
54
+        return null;
55
+    }
56
+
57
+    /**
58
+     * 执行标准成本计算
59
+     *
60
+     * @param id
61
+     * @param flowDefinitionId
62
+     */
63
+    private void executeStandardCost(Integer id, Integer flowDefinitionId) {
64
+        //TODO 执行标准成本计算(参数传递)
65
+        flowInstanceService.execute(flowDefinitionId, null, null);
66
+    }
67
+
68
+    /**
69
+     * 添加标准成本计算任务
70
+     *
71
+     * @param appSceneCostCount
72
+     */
73
+    @Override
74
+    public void addCostCountTask(AppSceneCostCount appSceneCostCount) {
75
+        //1.新增版本号记录成功后
76
+        CostStandardVersion costStandardVersion = CostStandardVersion.builder().figureNumber(appSceneCostCount.getDrawingNo()).materialNumber(appSceneCostCount.getMaterialNo()).stage(appSceneCostCount.getStage()).versionNumber(appSceneCostCount.getCostVersion()).versionYear(appSceneCostCount.getYear()).build();
77
+        boolean save = costStandardVersionService.save(costStandardVersion);
78
+        //2.新增标准成本计算任务,并立即执行标准成本计算
79
+        if (save) {
80
+            AppSceneCostCount appSceneCostCount1 = AppSceneCostCount.builder().materialNo(appSceneCostCount.getMaterialNo()).drawingNo(appSceneCostCount.getDrawingNo()).stage(appSceneCostCount.getStage()).flowDefinitionId(appSceneCostCount.getFlowDefinitionId()).year(appSceneCostCount.getYear()).costVersion(appSceneCostCount.getCostVersion()).status(0).createTime(new Date()).build();
81
+            boolean flag = save(appSceneCostCount1);
82
+            if (flag) {
83
+                //执行标准成本计算
84
+                executeStandardCost(appSceneCostCount1.getId(), appSceneCostCount1.getFlowDefinitionId());
85
+            }
86
+        }
87
+    }
88
+}

+ 34
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/AppSceneCostModelServiceImpl.java Wyświetl plik

@@ -0,0 +1,34 @@
1
+package com.zzsmart.qomo.kn.cost.manage.service.impl;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
4
+import com.zzsmart.qomo.dao.entity.FlowDefinition;
5
+import com.zzsmart.qomo.dao.mapper.FlowDefinitionMapper;
6
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostModelService;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.stereotype.Service;
9
+
10
+import java.util.List;
11
+
12
+/**
13
+ * @Description: app_scene_cost_model
14
+ * @Author: jeecg-boot
15
+ * @Date: 2024-07-29
16
+ * @Version: V1.0
17
+ */
18
+@Service
19
+public class AppSceneCostModelServiceImpl implements IAppSceneCostModelService {
20
+    @Autowired
21
+    FlowDefinitionMapper flowDefinitionMapper;
22
+
23
+    /**
24
+     * 查询标准成本模型列表
25
+     *
26
+     * @param queryWrapper
27
+     * @return
28
+     */
29
+    @Override
30
+    public List<FlowDefinition> queryListResult(Wrapper<FlowDefinition> queryWrapper) {
31
+        List list = flowDefinitionMapper.selectList(queryWrapper);
32
+        return list;
33
+    }
34
+}

+ 48
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/AppSceneCostResultValueServiceImpl.java Wyświetl plik

@@ -0,0 +1,48 @@
1
+package com.zzsmart.qomo.kn.cost.manage.service.impl;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
6
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostResultValue;
7
+import com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostResultValueMapper;
8
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostResultValueService;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.stereotype.Service;
11
+
12
+import java.util.ArrayList;
13
+import java.util.List;
14
+
15
+
16
+/**
17
+ * @Description: app_scene_cost_result_value
18
+ * @Author: jeecg-boot
19
+ * @Date: 2024-07-22
20
+ * @Version: V1.0
21
+ */
22
+@Service
23
+public class AppSceneCostResultValueServiceImpl extends ServiceImpl<AppSceneCostResultValueMapper, AppSceneCostResultValue> implements IAppSceneCostResultValueService {
24
+    @Autowired
25
+    private AppSceneCostResultValueMapper appSceneCostResultValueMapper;
26
+
27
+    /**
28
+     * 根据顶级物料编码查询满足条件的结果值
29
+     *
30
+     * @param topMaterialCode
31
+     * @param lastTaskType
32
+     * @param flowInstanceId
33
+     * @return
34
+     */
35
+    @Override
36
+    public List<AppSceneCostResultValue> getResultValueByTopMaterialNo(String topMaterialCode, String lastTaskType, String flowInstanceId) {
37
+        List<AppSceneCostResultValue> result = new ArrayList<>();
38
+        QueryWrapper<AppSceneCostResultValue> queryWrapper = new QueryWrapper<>();
39
+        if (topMaterialCode != null && !topMaterialCode.equals("") && lastTaskType != null && !lastTaskType.equals("") && flowInstanceId != null && !flowInstanceId.equals("")) {
40
+            queryWrapper.eq("belong_top_material_no", topMaterialCode).eq("task_type", lastTaskType).eq("flow_instance_id", flowInstanceId);
41
+            result = appSceneCostResultValueMapper.selectList(queryWrapper);
42
+        } else if (topMaterialCode != null && !topMaterialCode.equals("") && flowInstanceId != null && !flowInstanceId.equals("")) {
43
+            queryWrapper.eq("belong_top_material_no", topMaterialCode).eq("flow_instance_id", flowInstanceId);
44
+            result = appSceneCostResultValueMapper.selectList(queryWrapper);
45
+        }
46
+        return result;
47
+    }
48
+}

+ 0
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/BomTreeServiceImpl.java Wyświetl plik


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików