#12 合并到主分支

Merged
bgy merged 54 commits from bgy into master 1 year ago
100 changed files with 26562 additions and 2 deletions
  1. 45
    0
      .gitignore
  2. 0
    2
      README.md
  3. 217
    0
      pom.xml
  4. 102
    0
      qomo-kn-cost-manage-start/pom.xml
  5. 41
    0
      qomo-kn-cost-manage-start/src/main/assembly/package.xml
  6. 48
    0
      qomo-kn-cost-manage-start/src/main/java/com/zzsmart/qomo/kn/cost/manage/QomoCostManageApplication.java
  7. 453
    0
      qomo-kn-cost-manage-start/src/main/resources/application-dev.yml
  8. 451
    0
      qomo-kn-cost-manage-start/src/main/resources/application-prod.yml
  9. 5
    0
      qomo-kn-cost-manage-start/src/main/resources/application.yml
  10. 29
    0
      qomo-kn-cost-manage-start/src/main/resources/jeecg/jeecg_config.properties
  11. 27
    0
      qomo-kn-cost-manage-start/src/main/resources/jeecg/jeecg_database.properties
  12. 96
    0
      qomo-kn-cost-manage-start/src/main/resources/liquibase/changelogs/change.sql
  13. 19122
    0
      qomo-kn-cost-manage-start/src/main/resources/liquibase/changelogs/qomo-boot-init.sql
  14. 9
    0
      qomo-kn-cost-manage-start/src/main/resources/liquibase/master.xml
  15. 27
    0
      qomo-kn-cost-manage/pom.xml
  16. 48
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/constants/Constants.java
  17. 179
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostCountController.java
  18. 162
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostHourRateController.java
  19. 190
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostMaterialBomController.java
  20. 159
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostMaterialProcessHoursController.java
  21. 115
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostModelController.java
  22. 159
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostPartMissingInfoController.java
  23. 162
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostPurchaseEvaluateController.java
  24. 159
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostPurchasePriceController.java
  25. 179
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostResultValueController.java
  26. 160
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostStandardDetailController.java
  27. 157
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostStandardVersionController.java
  28. 31
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/BomTreeController.java
  29. 106
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostCount.java
  30. 114
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostHourRate.java
  31. 261
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostMaterialBom.java
  32. 129
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostMaterialProcessHours.java
  33. 75
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostModel.java
  34. 61
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostPartMissingInfo.java
  35. 86
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostPurchaseEvaluate.java
  36. 173
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostPurchasePrice.java
  37. 137
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostResultValue.java
  38. 159
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostStandardDetail.java
  39. 106
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostStandardVersion.java
  40. 73
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/CostCountStatusEnum.java
  41. 59
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/FeeTypeEnum.java
  42. 69
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/HourOrRateTypeEnum.java
  43. 58
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/StandardStageEnum.java
  44. 61
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/TotalCostEnum.java
  45. 14
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostCountMapper.java
  46. 14
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostHourRateMapper.java
  47. 34
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostMaterialBomMapper.java
  48. 14
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostMaterialProcessHoursMapper.java
  49. 15
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostModelMapper.java
  50. 14
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostPartMissingInfoMapper.java
  51. 14
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostPurchaseEvaluateMapper.java
  52. 14
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostPurchasePriceMapper.java
  53. 15
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostResultValueMapper.java
  54. 15
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostStandardDetailMapper.java
  55. 17
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostStandardVersionMapper.java
  56. 5
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostCountMapper.xml
  57. 5
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostHourRateMapper.xml
  58. 5
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostMaterialBomMapper.xml
  59. 5
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostMaterialProcessHoursMapper.xml
  60. 5
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostModelMapper.xml
  61. 5
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostPartMissingInfoMapper.xml
  62. 5
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostPurchaseEvaluateMapper.xml
  63. 5
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostPurchasePriceMapper.xml
  64. 5
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostResultValueMapper.xml
  65. 5
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostStandardDetailMapper.xml
  66. 5
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostStandardVersionMapper.xml
  67. 721
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/StandardCostService.java
  68. 52
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/laborcost/LaborCostParameters.java
  69. 72
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/laborcost/LaborCostTask.java
  70. 52
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/laborcost/LaborCostTaskChannel.java
  71. 44
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/laborcost/LaborCostTaskChannelFactory.java
  72. 51
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/manufacturingcost/ManufacturingCostParameters.java
  73. 72
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/manufacturingcost/ManufacturingCostTask.java
  74. 52
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/manufacturingcost/ManufacturingCostTaskChannel.java
  75. 44
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/manufacturingcost/ManufacturingCostTaskChannelFactory.java
  76. 51
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialcost/MaterialCostParameters.java
  77. 72
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialcost/MaterialCostTask.java
  78. 52
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialcost/MaterialCostTaskChannel.java
  79. 44
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialcost/MaterialCostTaskChannelFactory.java
  80. 51
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialinput/MaterialInputParameters.java
  81. 72
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialinput/MaterialInputTask.java
  82. 52
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialinput/MaterialInputTaskChannel.java
  83. 44
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/materialinput/MaterialInputTaskChannelFactory.java
  84. 51
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/standardcost/StandardCostParameters.java
  85. 77
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/standardcost/StandardCostTask.java
  86. 52
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/standardcost/StandardCostTaskChannel.java
  87. 44
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/standardcost/StandardCostTaskChannelFactory.java
  88. 14
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/BomTreeService.java
  89. 35
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostCountService.java
  90. 14
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostHourRateService.java
  91. 28
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostMaterialBomService.java
  92. 22
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostMaterialProcessHoursService.java
  93. 24
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostModelService.java
  94. 14
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostPartMissingInfoService.java
  95. 14
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostPurchaseEvaluateService.java
  96. 22
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostPurchasePriceService.java
  97. 31
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostResultValueService.java
  98. 14
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostStandardDetailService.java
  99. 14
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostStandardVersionService.java
  100. 0
    0
      qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/AppSceneCostCountServiceImpl.java

+ 45
- 0
.gitignore View File

1
+target/
2
+!.mvn/wrapper/maven-wrapper.jar
3
+!**/src/main/**/target/
4
+!**/src/test/**/target/
5
+
6
+### IntelliJ IDEA ###
7
+.idea
8
+*.iws
9
+*.iml
10
+*.ipr
11
+
12
+### Eclipse ###
13
+.apt_generated
14
+.classpath
15
+.factorypath
16
+.project
17
+.settings
18
+.springBeans
19
+.sts4-cache
20
+
21
+### NetBeans ###
22
+/nbproject/private/
23
+/nbbuild/
24
+/dist/
25
+/nbdist/
26
+/.nb-gradle/
27
+build/
28
+!**/src/main/**/build/
29
+!**/src/test/**/build/
30
+
31
+### VS Code ###
32
+.vscode/
33
+
34
+### Mac OS ###
35
+.DS_Store
36
+
37
+## backend
38
+**/target
39
+**/logs
40
+*.log
41
+
42
+## front
43
+**/*.lock
44
+
45
+*.flattened-pom.xml

+ 0
- 2
README.md View File

1
-# cost-backend
2
-

+ 217
- 0
pom.xml View File

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">
5
+    <modelVersion>4.0.0</modelVersion>
6
+    <groupId>com.zzsmart.qomo</groupId>
7
+    <artifactId>qomo-kn-forecast</artifactId>
8
+    <version>${revision}</version>
9
+    <packaging>pom</packaging>
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>
15
+    <developers>
16
+        <developer>
17
+            <name>武汉中制智造</name>
18
+            <email>qomo@163.com</email>
19
+        </developer>
20
+    </developers>
21
+
22
+    <parent>
23
+        <groupId>org.qomo.boot</groupId>
24
+        <artifactId>qomo-base</artifactId>
25
+        <version>2.0.1-SNAPSHOT</version>
26
+        <relativePath/>
27
+    </parent>
28
+
29
+    <properties>
30
+        <revision>2.0.0-SNAPSHOT</revision>
31
+        <adp.version>2.0.0-SNAPSHOT</adp.version>
32
+        <dmp.version>2.0.0-SNAPSHOT</dmp.version>
33
+    </properties>
34
+    <repositories>
35
+        <repository>
36
+            <id>zzzz</id>
37
+            <name>zzzz Repository</name>
38
+            <url>http://192.168.50.9:8091/repository/maven-public/</url>
39
+            <releases>
40
+                <enabled>true</enabled>
41
+            </releases>
42
+            <snapshots>
43
+                <enabled>true</enabled>
44
+            </snapshots>
45
+        </repository>
46
+
47
+        <repository>
48
+            <id>aliyun</id>
49
+            <name>aliyun Repository</name>
50
+            <url>https://maven.aliyun.com/repository/public</url>
51
+            <snapshots>
52
+                <enabled>false</enabled>
53
+            </snapshots>
54
+        </repository>
55
+    </repositories>
56
+
57
+    <distributionManagement>
58
+        <repository>
59
+            <id>zzzz-releases</id>
60
+            <name>zzzz-releases Repository</name>
61
+            <url>http://192.168.50.9:8091/repository/zzzz-releases/</url>
62
+        </repository>
63
+
64
+        <snapshotRepository>
65
+            <id>zzzz-snapshots</id>
66
+            <name>zzzz Snapshot Repository</name>
67
+            <url>http://192.168.50.9:8091/repository/zzzz-snapshots/</url>
68
+        </snapshotRepository>
69
+    </distributionManagement>
70
+
71
+    <pluginRepositories>
72
+        <pluginRepository>
73
+            <id>zzzz</id>
74
+            <name>zzzz Repository</name>
75
+            <url>http://192.168.50.9:8091/repository/maven-public/</url>
76
+            <releases>
77
+                <enabled>true</enabled>
78
+            </releases>
79
+            <snapshots>
80
+                <enabled>true</enabled>
81
+            </snapshots>
82
+        </pluginRepository>
83
+
84
+        <pluginRepository>
85
+            <id>aliyun</id>
86
+            <name>aliyun Repository</name>
87
+            <url>https://maven.aliyun.com/repository/public</url>
88
+            <snapshots>
89
+                <enabled>false</enabled>
90
+            </snapshots>
91
+        </pluginRepository>
92
+    </pluginRepositories>
93
+
94
+    <dependencyManagement>
95
+        <dependencies>
96
+            <dependency>
97
+                <groupId>com.zzsmart.qomo</groupId>
98
+                <artifactId>qomo-kn-cost-manage</artifactId>
99
+                <version>${revision}</version>
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
+        </dependencies>
142
+    </dependencyManagement>
143
+    <!-- 环境 -->
144
+    <profiles>
145
+        <!-- 开发 -->
146
+        <profile>
147
+            <id>dev</id>
148
+            <activation>
149
+                <!--默认激活配置-->
150
+                <activeByDefault>true</activeByDefault>
151
+            </activation>
152
+            <properties>
153
+                <!--当前环境-->
154
+                <profile.name>dev</profile.name>
155
+                <!--Nacos服务地址-->
156
+                <config.server-addr>jeecg-boot-nacos:8848</config.server-addr>
157
+                <!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID,不能使用名称,默认为空-->
158
+                <config.namespace></config.namespace>
159
+                <!--Nacos配置分组名称-->
160
+                <config.group>DEFAULT_GROUP</config.group>
161
+                <!--Nacos用户名-->
162
+                <config.username></config.username>
163
+                <!--Nacos密码-->
164
+                <config.password></config.password>
165
+            </properties>
166
+        </profile>
167
+        <!-- 测试Nacos开启鉴权、设置分组和命名空间
168
+        <profile>
169
+            <id>dev</id>
170
+            <properties>
171
+                <profile.name>dev</profile.name>
172
+                <config.server-addr>jeecg-boot-nacos:8848</config.server-addr>
173
+                <config.namespace>ac14ab82-51f8-4f0c-aa5b-25fb8384bfb6</config.namespace>
174
+                <config.group>JEECGDEV_GROUP</config.group>
175
+                <config.username>nacos</config.username>
176
+                <config.password>nacos</config.password>
177
+            </properties>
178
+        </profile> -->
179
+        <!-- 测试 -->
180
+        <profile>
181
+            <id>test</id>
182
+            <properties>
183
+                <!--当前环境-->
184
+                <profile.name>test</profile.name>
185
+                <!--Nacos服务地址-->
186
+                <config.server-addr>jeecg-boot-nacos:8848</config.server-addr>
187
+                <!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID,不能使用名称,默认为空-->
188
+                <config.namespace></config.namespace>
189
+                <!--Nacos配置分组名称-->
190
+                <config.group>DEFAULT_GROUP</config.group>
191
+                <!--Nacos用户名-->
192
+                <config.username></config.username>
193
+                <!--Nacos密码-->
194
+                <config.password></config.password>
195
+            </properties>
196
+        </profile>
197
+        <!-- 生产 -->
198
+        <profile>
199
+            <id>prod</id>
200
+            <properties>
201
+                <!--当前环境-->
202
+                <profile.name>prod</profile.name>
203
+                <!--Nacos服务地址-->
204
+                <config.server-addr>jeecg-boot-nacos:8848</config.server-addr>
205
+                <!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID,不能使用名称,默认为空-->
206
+                <config.namespace></config.namespace>
207
+                <!--Nacos配置分组名称-->
208
+                <config.group>DEFAULT_GROUP</config.group>
209
+                <!--Nacos用户名-->
210
+                <config.username></config.username>
211
+                <!--Nacos密码-->
212
+                <config.password></config.password>
213
+            </properties>
214
+        </profile>
215
+        <!-- SpringCloud运行环境 -->
216
+    </profiles>
217
+</project>

+ 102
- 0
qomo-kn-cost-manage-start/pom.xml View File

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">
5
+    <modelVersion>4.0.0</modelVersion>
6
+    <parent>
7
+        <groupId>com.zzsmart.qomo</groupId>
8
+        <artifactId>qomo-kn-forecast</artifactId>
9
+        <version>${revision}</version>
10
+    </parent>
11
+    <artifactId>qomo-kn-cost-manage-start</artifactId>
12
+
13
+    <properties>
14
+        <maven.deploy.skip>true</maven.deploy.skip>
15
+    </properties>
16
+
17
+    <dependencies>
18
+        <dependency>
19
+            <groupId>org.springframework.boot</groupId>
20
+            <artifactId>spring-boot-starter-test</artifactId>
21
+            <scope>test</scope>
22
+            <exclusions>
23
+                <exclusion>
24
+                    <artifactId>spring-boot-starter-logging</artifactId>
25
+                    <groupId>org.springframework.boot</groupId>
26
+                </exclusion>
27
+            </exclusions>
28
+        </dependency>
29
+
30
+        <dependency>
31
+            <groupId>junit</groupId>
32
+            <artifactId>junit</artifactId>
33
+            <scope>test</scope>
34
+        </dependency>
35
+
36
+        <dependency>
37
+            <groupId>com.zzsmart.qomo</groupId>
38
+            <artifactId>qomo-kn-cost-manage</artifactId>
39
+        </dependency>
40
+    </dependencies>
41
+
42
+    <build>
43
+        <plugins>
44
+            <plugin>
45
+                <groupId>org.springframework.boot</groupId>
46
+                <artifactId>spring-boot-maven-plugin</artifactId>
47
+                <configuration>
48
+                    <!--                    <fork>true</fork> &lt;!&ndash; 如果没有该配置,devtools不会生效 &ndash;&gt;-->
49
+                    <includeSystemScope>true</includeSystemScope>
50
+                </configuration>
51
+            </plugin>
52
+        </plugins>
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
+
102
+</project>

+ 41
- 0
qomo-kn-cost-manage-start/src/main/assembly/package.xml View File

1
+<assembly>
2
+    <id>dist</id>
3
+    <formats>
4
+        <format>dir</format>
5
+    </formats>
6
+    <includeBaseDirectory>false</includeBaseDirectory>
7
+    <fileSets>
8
+        <fileSet>
9
+            <directory>${basedir}/src/main/bin</directory>
10
+            <lineEnding>unix</lineEnding>
11
+            <outputDirectory/>
12
+            <fileMode>755</fileMode>
13
+            <includes>
14
+                <include>*.sh</include>
15
+            </includes>
16
+        </fileSet>
17
+        <fileSet>
18
+            <directory>${basedir}/src/main/bin</directory>
19
+            <lineEnding>windows</lineEnding>
20
+            <outputDirectory/>
21
+            <includes>
22
+                <include>*.bat</include>
23
+            </includes>
24
+        </fileSet>
25
+        <fileSet>
26
+            <directory>target/classes</directory>
27
+            <outputDirectory>config</outputDirectory>
28
+            <includes>
29
+                <include>**/*.yml</include>
30
+                <include>**/*.yaml</include>
31
+                <include>**/logback-spring.xml</include>
32
+            </includes>
33
+        </fileSet>
34
+    </fileSets>
35
+    <dependencySets>
36
+        <dependencySet>
37
+            <outputDirectory>lib</outputDirectory>
38
+            <unpack>false</unpack>
39
+        </dependencySet>
40
+    </dependencySets>
41
+</assembly>

+ 48
- 0
qomo-kn-cost-manage-start/src/main/java/com/zzsmart/qomo/kn/cost/manage/QomoCostManageApplication.java View File

1
+package com.zzsmart.qomo.kn.cost.manage;
2
+
3
+import lombok.extern.slf4j.Slf4j;
4
+import org.jeecg.common.util.oConvertUtils;
5
+import org.mybatis.spring.annotation.MapperScan;
6
+import org.springframework.boot.SpringApplication;
7
+import org.springframework.boot.autoconfigure.SpringBootApplication;
8
+import org.springframework.boot.builder.SpringApplicationBuilder;
9
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
10
+import org.springframework.context.ConfigurableApplicationContext;
11
+import org.springframework.core.env.Environment;
12
+import org.springframework.scheduling.annotation.EnableAsync;
13
+
14
+import java.net.InetAddress;
15
+import java.net.UnknownHostException;
16
+
17
+/**
18
+ * 单体启动类
19
+ * 报错提醒: 未集成mongo报错,可以打开启动类上面的注释 exclude={MongoAutoConfiguration.class}
20
+ */
21
+@Slf4j
22
+@SpringBootApplication(scanBasePackages = {"org.jeecg", "com.zzsmart.qomo"})
23
+//@MapperScan({"com.zzsmart.qomo.kn.cost.manage.mapper"})
24
+//@EnableAutoConfiguration(exclude={MongoAutoConfiguration.class})
25
+@EnableAsync
26
+public class QomoCostManageApplication extends SpringBootServletInitializer {
27
+
28
+    @Override
29
+    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
30
+        return application.sources(QomoCostManageApplication.class);
31
+    }
32
+
33
+    public static void main(String[] args) throws UnknownHostException {
34
+        ConfigurableApplicationContext application = SpringApplication.run(QomoCostManageApplication.class, args);
35
+        Environment env = application.getEnvironment();
36
+        String ip = InetAddress.getLocalHost().getHostAddress();
37
+        String port = env.getProperty("server.port");
38
+        String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
39
+        log.info("\n----------------------------------------------------------\n\t" +
40
+                "Application Jeecg-Boot is running! Access URLs:\n\t" +
41
+                "Local: \t\thttp://localhost:" + port + path + "/\n\t" +
42
+                "External: \thttp://" + ip + ":" + port + path + "/\n\t" +
43
+                "Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
44
+                "----------------------------------------------------------");
45
+
46
+    }
47
+
48
+}

+ 453
- 0
qomo-kn-cost-manage-start/src/main/resources/application-dev.yml View File

1
+v2:
2
+  #虚拟路径映射路径 2个文件路径一一对应 第一个为主存储,其他为配置相关
3
+  xnljmap:
4
+    #win服务器  本地 注意!! 记住这个结尾有一个/
5
+    oss: file:/data/qomo-boot/oss/
6
+    #    oss: file:D:/upload/
7
+    #linux服务器
8
+    #oss: file:/home/webapps/oss/
9
+  #虚拟路径映射路径 end
10
+  #本地存放地址 注意!! 记住这个结尾没有/
11
+  fileurl: /data/qomo-boot/oss
12
+  #  fileurl: D:/upload
13
+  #http://127.0.0.1:8080/oss/{yy}/2022-12-22/c83a77ae134a540c30daa6a0666fa945.md
14
+  httpurl: /qomo/
15
+  defaultFormat: .png
16
+
17
+server:
18
+  port: 8098
19
+  tomcat:
20
+    max-swallow-size: -1
21
+  error:
22
+    include-exception: true
23
+    include-stacktrace: ALWAYS
24
+    include-message: ALWAYS
25
+  servlet:
26
+    context-path: /qomo
27
+  compression:
28
+    enabled: true
29
+    min-response-size: 1024
30
+    mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
31
+
32
+management:
33
+  endpoints:
34
+    web:
35
+      exposure:
36
+        include: metrics,httptrace
37
+
38
+spring:
39
+  servlet:
40
+    multipart:
41
+      max-file-size: 10MB
42
+      max-request-size: 10MB
43
+  mail:
44
+    host: smtp.163.com
45
+    username: jeecgos@163.com
46
+    password: ??
47
+    properties:
48
+      mail:
49
+        smtp:
50
+          auth: true
51
+          starttls:
52
+            enable: true
53
+            required: true
54
+  ## quartz定时任务,采用数据库方式
55
+  quartz:
56
+    job-store-type: jdbc
57
+    initialize-schema: embedded
58
+    #定时任务启动开关,true-开  false-关
59
+    auto-startup: true
60
+    #延迟1秒启动定时任务
61
+    startup-delay: 1s
62
+    #启动时更新己存在的Job
63
+    overwrite-existing-jobs: true
64
+    properties:
65
+      org:
66
+        quartz:
67
+          scheduler:
68
+            instanceName: MyScheduler
69
+            instanceId: AUTO
70
+          jobStore:
71
+            class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
72
+            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
73
+            tablePrefix: QRTZ_
74
+            isClustered: true
75
+            misfireThreshold: 12000
76
+            clusterCheckinInterval: 15000
77
+          threadPool:
78
+            class: org.quartz.simpl.SimpleThreadPool
79
+            threadCount: 10
80
+            threadPriority: 5
81
+            threadsInheritContextClassLoaderOfInitializingThread: true
82
+  #json 时间戳统一转换
83
+  jackson:
84
+    date-format: yyyy-MM-dd HH:mm:ss
85
+    time-zone: GMT+8
86
+  jpa:
87
+    open-in-view: false
88
+
89
+  # http请求配置
90
+  rest:
91
+    livy:
92
+      server: http://192.168.50.9:7997
93
+      spark:
94
+        # 组件部署路径,默认是部署在hdfs 如果是本地路径则在前面加上local:
95
+        main-jar: local:/opt/services/deploy-jars/dev/qomo-data-component-${Qomo.version}-jar-with-dependencies.jar
96
+        main-class: com.zzsmart.qomo.QomoSparkStarter
97
+        # spark默认运行参数
98
+        deploy-mode: cluster
99
+        queue: default
100
+        num-executors: 2
101
+        executor-cores: 1
102
+        executor-memory: 1G
103
+        driver-cores: 1
104
+        driver-memory: 512M
105
+    # 客户端类型
106
+    client-type: urlconnection
107
+    # URLConnection配置
108
+    url-connection:
109
+      # 客户端和服务器建立连接超时时间
110
+      connect-timeout: 2000
111
+      # 客户端从服务器读取数据包超时时间
112
+      read-timeout: 30000
113
+      # 是否长链接
114
+      keep-alive: false
115
+    # HttpClient配置
116
+    http-client:
117
+      # 连接池的最大连接数
118
+      max-total-connect: 200
119
+      # 相同域名允许创建的最大连接数
120
+      max-connect-per-route: 10
121
+      # 客户端和服务器建立连接超时时间
122
+      connect-timeout: 2000
123
+      # 读数据的超时时间
124
+      socket-timeout: 30000
125
+      # 连接池创建连接时的超时时间
126
+      connection-request-timout: 200
127
+    # OKHttp配置
128
+    ok-http:
129
+      # 失败后是否重试
130
+      retry-on-connection-failure: false
131
+      # 链接超时时间
132
+      connect-timeout: 2000
133
+      # 读超时时间
134
+      read-timeout: 10000
135
+      # 写超时时间
136
+      write-timeout: 10000
137
+      # 最大空闲的连接数
138
+      max-idle-connections: 5
139
+      # 最大的空闲时间
140
+      keep-alive-duration-ns: 3000
141
+
142
+  aop:
143
+    proxy-target-class: true
144
+  #配置freemarker
145
+  freemarker:
146
+    # 设置模板后缀名
147
+    suffix: .ftl
148
+    # 设置文档类型
149
+    content-type: text/html
150
+    # 设置页面编码格式
151
+    charset: UTF-8
152
+    # 设置页面缓存
153
+    cache: false
154
+    prefer-file-system-access: false
155
+    # 设置ftl文件路径
156
+    template-loader-path:
157
+      - classpath:/templates
158
+    template_update_delay: 0
159
+  # 设置静态文件路径,js,css等
160
+  mvc:
161
+    static-path-pattern: /**
162
+    #Spring Boot 2.6+后映射匹配的默认策略已从AntPathMatcher更改为PathPatternParser,需要手动指定为ant-path-matcher
163
+    pathmatch:
164
+      matching-strategy: ant_path_matcher
165
+  resource:
166
+    static-locations: classpath:/static/,classpath:/public/
167
+  autoconfigure:
168
+    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
169
+  datasource:
170
+    druid:
171
+      stat-view-servlet:
172
+        enabled: true
173
+        loginUsername: admin
174
+        loginPassword: 123456
175
+        allow:
176
+      web-stat-filter:
177
+        enabled: true
178
+    dynamic:
179
+      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
180
+        # 连接池的配置信息
181
+        # 初始化大小,最小,最大
182
+        initial-size: 5
183
+        min-idle: 5
184
+        maxActive: 20
185
+        # 配置获取连接等待超时的时间
186
+        maxWait: 60000
187
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
188
+        timeBetweenEvictionRunsMillis: 60000
189
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
190
+        minEvictableIdleTimeMillis: 300000
191
+        validationQuery: SELECT 1
192
+        testWhileIdle: true
193
+        testOnBorrow: false
194
+        testOnReturn: false
195
+        # 打开PSCache,并且指定每个连接上PSCache的大小
196
+        poolPreparedStatements: true
197
+        maxPoolPreparedStatementPerConnectionSize: 20
198
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
199
+        filters: stat,slf4j
200
+        filter:
201
+          wall:
202
+            config:
203
+              none-base-statement-allow: true
204
+              multi-statement-allow: true
205
+        # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
206
+        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
207
+      datasource:
208
+#        master:
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
212
+#          driver-class-name: com.mysql.cj.jdbc.Driver
213
+        master:
214
+          url: jdbc:mysql://158.158.4.51:13306/kn_otd_app?useUnicode=true&allowMultiQueries=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&serverTimezone=Asia/Shanghai&useSSL=false
215
+          username: knotd
216
+          password: otd@2024
217
+          driver-class-name: com.mysql.cj.jdbc.Driver
218
+          # 多数据源配置
219
+          #multi-datasource1:
220
+          #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
221
+          #username: root
222
+          #password: root
223
+          #driver-class-name: com.mysql.cj.jdbc.Driver
224
+  #redis 配置
225
+  redis:
226
+#    database: 5
227
+#      host: 121.40.189.20
228
+#      port: 6389
229
+    database: 9
230
+    host: 192.168.50.9
231
+    port: 7379
232
+    password: 'zzboard'
233
+    main:
234
+      allow-circular-references: true
235
+
236
+  #rabbitmq 配置
237
+  rabbitmq:
238
+    host: 192.168.50.9
239
+    port: 5672
240
+    virtual-host: /qomoflow-standardcost
241
+    username: admin
242
+    password: kncloud
243
+    connection-timeout: 5000
244
+    listener:
245
+      simple:
246
+        concurrency: 5 # 并发数量
247
+        max-concurrency: 10 # 最大并发数量
248
+        acknowledge-mode: manual # 开启手动签收
249
+        prefetch: 1 # 限制每次只消费一个(一个线程)
250
+
251
+#mybatis plus 设置
252
+mybatis-plus:
253
+  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml,classpath*:/mapper/*.xml,classpath*:com/zzsmart/qomo/**/mapper/xml/*.xml
254
+  global-config:
255
+    # 关闭MP3.0自带的banner
256
+    banner: false
257
+    db-config:
258
+      #主键类型  0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
259
+      id-type: ASSIGN_ID
260
+      # 默认数据库表下划线命名
261
+      table-underline: true
262
+  configuration:
263
+    # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
264
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
265
+    #    log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
266
+    # 返回类型为Map,显示null对应的字段
267
+    call-setters-on-nulls: true
268
+#jeecg专用配置
269
+minidao:
270
+  base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
271
+jeecg:
272
+  # 是否启用安全模式
273
+  safeMode: false
274
+  # 签名密钥串(前后端要一致,正式发布请自行修改)
275
+  signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
276
+  # 签名拦截接口
277
+  signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
278
+  #local、minio、alioss
279
+  uploadType: local
280
+  # 前端访问地址
281
+  domainUrl:
282
+    pc: http://localhost:3100
283
+    app: http://localhost:8051
284
+  path:
285
+    #文件上传根目录 设置
286
+    upload: /opt/upFiles
287
+    #webapp文件路径
288
+    webapp: /opt/webapp
289
+  shiro:
290
+#    excludeUrls: /api/internalService/**,/test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/api/getUserInfo,/sys/sysDepart/**,/taskSocket/**,/flowSocket/**,/dataCheck/**
291
+    excludeUrls: /**/**,/**/**/**
292
+
293
+  #阿里云oss存储和大鱼短信秘钥配置
294
+  oss:
295
+    accessKey: ??
296
+    secretKey: ??
297
+    endpoint: oss-cn-beijing.aliyuncs.com
298
+    bucketName: jeecgdev
299
+  # ElasticSearch 6设置
300
+  elasticsearch:
301
+    cluster-name: elasticsearch-cluster
302
+    cluster-nodes: 192.168.50.9:9200
303
+    check-enabled: false
304
+    task-data-index: task_data_dev/_doc
305
+    task-data-struct-index: task_data_struct_dev/_doc
306
+    task-data-temp-index: task_data_temp_dev/_doc
307
+    task-log-index: task_log_dev/_doc
308
+    task-record-index: clean_data_record/_doc
309
+  # 在线预览文件服务器地址配置
310
+  file-view-domain: http://fileview.jeecg.com
311
+  # minio文件上传
312
+  minio:
313
+    minio_url: http://minio.jeecg.com
314
+    minio_name: ??
315
+    minio_pass: ??
316
+    bucketName: otatest
317
+  #大屏报表参数设置
318
+  jmreport:
319
+    mode: dev
320
+    #数据字典是否进行saas数据隔离,自己看自己的字典
321
+    saas: false
322
+  #xxl-job配置
323
+  xxljob:
324
+    enabled: false
325
+    adminAddresses: http://127.0.0.1:9080/xxl-job-admin
326
+    appname: ${spring.application.name}
327
+    accessToken: ''
328
+    address: 127.0.0.1:30007
329
+    ip: 127.0.0.1
330
+    port: 30007
331
+    logPath: logs/jeecg/job/jobhandler/
332
+    logRetentionDays: 30
333
+  #分布式锁配置
334
+  redisson:
335
+    address: 127.0.0.1:6379
336
+    password:
337
+    type: STANDALONE
338
+    enabled: true
339
+#cas单点登录
340
+cas:
341
+  server:
342
+    host:
343
+      #CAS服务地址
344
+      url: http://192.168.50.9:8167/cas
345
+#Mybatis输出sql日志
346
+logging:
347
+  level:
348
+    org.jeecg.modules.system.mapper: info
349
+#swagger
350
+knife4j:
351
+  #开启增强配置
352
+  enable: true
353
+  #开启生产环境屏蔽
354
+  production: false
355
+  basic:
356
+    enable: false
357
+    username: jeecg
358
+    password: jeecg1314
359
+#第三方登录
360
+justauth:
361
+  enabled: true
362
+  type:
363
+    GITHUB:
364
+      client-id: ??
365
+      client-secret: ??
366
+      redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/github/callback
367
+    WECHAT_ENTERPRISE:
368
+      client-id: ??
369
+      client-secret: ??
370
+      redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/wechat_enterprise/callback
371
+      agent-id: ??
372
+    DINGTALK:
373
+      client-id: ??
374
+      client-secret: ??
375
+      redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/dingtalk/callback
376
+    WECHAT_OPEN:
377
+      client-id: ??
378
+      client-secret: ??
379
+      redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/wechat_open/callback
380
+  cache:
381
+    type: default
382
+    prefix: 'demo::'
383
+    timeout: 1h
384
+#第三方APP对接
385
+third-app:
386
+  enabled: false
387
+  type:
388
+    #企业微信
389
+    WECHAT_ENTERPRISE:
390
+      enabled: false
391
+      #CORP_ID
392
+      client-id: ??
393
+      #SECRET
394
+      client-secret: ??
395
+      #自建应用id
396
+      agent-id: ??
397
+      #自建应用秘钥(新版企微需要配置)
398
+      # agent-app-secret: ??
399
+    #钉钉
400
+    DINGTALK:
401
+      enabled: false
402
+      # appKey
403
+      client-id: ??
404
+      # appSecret
405
+      client-secret: ??
406
+      agent-id: ??
407
+
408
+spark:
409
+  app:
410
+    name: yl
411
+  home: 127.0.0.1
412
+  master:
413
+    uri: local[*]
414
+  driver:
415
+    memory: 2g
416
+  worker:
417
+    memory: 2g
418
+  executor:
419
+    memory: 1g
420
+  rpc:
421
+    message:
422
+      maxSize: 1024
423
+
424
+flowable:
425
+  process:
426
+    definition-cache-limit: -1
427
+  database-schema-update: true
428
+  activity-font-name: 宋体
429
+  label-font-name: 宋体
430
+  annotation-font-name: 宋体
431
+  #关闭定时任务JOB
432
+  async-executor-activate: false
433
+  #消息链接基地址
434
+  message-base-url: http://192.168.50.9:3000/flowable/task/record/
435
+
436
+Qomo:
437
+  version: @project.version@
438
+
439
+modelPath: /opt/deploy/qomo/backend/algo/model
440
+seaTunnelHome: /opt/service/apache-seatunnel-2.3.4
441
+hiveMetastoreUri: thrift://192.168.50.102:9083
442
+hiveSitePath: /opt/service/apache-seatunnel-2.3.4/deploy/hive-site.xml
443
+hdfsSitePath: /opt/service/apache-seatunnel-2.3.4/deploy/hdfs-site.xml
444
+hdfs:
445
+  enable: false
446
+minio:
447
+  server: http://192.168.50.9
448
+  port: 9100
449
+  access-key: admin
450
+  secret-key: qm123456
451
+
452
+condaEnv: py310
453
+tikaServerUrl: http://192.168.50.99:8099/qomo-tika/

+ 451
- 0
qomo-kn-cost-manage-start/src/main/resources/application-prod.yml View File

1
+v2:
2
+  #虚拟路径映射路径 2个文件路径一一对应 第一个为主存储,其他为配置相关
3
+  xnljmap:
4
+    #win服务器  本地 注意!! 记住这个结尾有一个/
5
+    oss: file:/data/qomo-boot/oss/
6
+    #    oss: file:D:/upload/
7
+    #linux服务器
8
+    #oss: file:/home/webapps/oss/
9
+  #虚拟路径映射路径 end
10
+  #本地存放地址 注意!! 记住这个结尾没有/
11
+  fileurl: /data/qomo-boot/oss
12
+  #  fileurl: D:/upload
13
+  #http://127.0.0.1:8080/oss/{yy}/2022-12-22/c83a77ae134a540c30daa6a0666fa945.md
14
+  httpurl: /qomo/
15
+  defaultFormat: .png
16
+
17
+server:
18
+  port: 8095
19
+  tomcat:
20
+    max-swallow-size: -1
21
+  error:
22
+    include-exception: true
23
+    include-stacktrace: ALWAYS
24
+    include-message: ALWAYS
25
+  servlet:
26
+    context-path: /qomo
27
+  compression:
28
+    enabled: true
29
+    min-response-size: 1024
30
+    mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
31
+
32
+management:
33
+  endpoints:
34
+    web:
35
+      exposure:
36
+        include: metrics,httptrace
37
+
38
+spring:
39
+  servlet:
40
+    multipart:
41
+      max-file-size: 10MB
42
+      max-request-size: 10MB
43
+  mail:
44
+    host: smtp.163.com
45
+    username: jeecgos@163.com
46
+    password: ??
47
+    properties:
48
+      mail:
49
+        smtp:
50
+          auth: true
51
+          starttls:
52
+            enable: true
53
+            required: true
54
+  ## quartz定时任务,采用数据库方式
55
+  quartz:
56
+    job-store-type: jdbc
57
+    initialize-schema: embedded
58
+    #定时任务启动开关,true-开  false-关
59
+    auto-startup: true
60
+    #延迟1秒启动定时任务
61
+    startup-delay: 1s
62
+    #启动时更新己存在的Job
63
+    overwrite-existing-jobs: true
64
+    properties:
65
+      org:
66
+        quartz:
67
+          scheduler:
68
+            instanceName: MyScheduler
69
+            instanceId: AUTO
70
+          jobStore:
71
+            class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
72
+            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
73
+            tablePrefix: QRTZ_
74
+            isClustered: true
75
+            misfireThreshold: 12000
76
+            clusterCheckinInterval: 15000
77
+          threadPool:
78
+            class: org.quartz.simpl.SimpleThreadPool
79
+            threadCount: 10
80
+            threadPriority: 5
81
+            threadsInheritContextClassLoaderOfInitializingThread: true
82
+  #json 时间戳统一转换
83
+  jackson:
84
+    date-format: yyyy-MM-dd HH:mm:ss
85
+    time-zone: GMT+8
86
+  jpa:
87
+    open-in-view: false
88
+
89
+  # http请求配置
90
+  rest:
91
+    livy:
92
+      server: http://192.168.50.9:7997
93
+      spark:
94
+        # 组件部署路径,默认是部署在hdfs 如果是本地路径则在前面加上local:
95
+        main-jar: local:/opt/services/deploy-jars/dev/qomo-data-component-${Qomo.version}-jar-with-dependencies.jar
96
+        main-class: com.zzsmart.qomo.QomoSparkStarter
97
+        # spark默认运行参数
98
+        deploy-mode: cluster
99
+        queue: default
100
+        num-executors: 2
101
+        executor-cores: 1
102
+        executor-memory: 1G
103
+        driver-cores: 1
104
+        driver-memory: 512M
105
+    # 客户端类型
106
+    client-type: urlconnection
107
+    # URLConnection配置
108
+    url-connection:
109
+      # 客户端和服务器建立连接超时时间
110
+      connect-timeout: 2000
111
+      # 客户端从服务器读取数据包超时时间
112
+      read-timeout: 30000
113
+      # 是否长链接
114
+      keep-alive: false
115
+    # HttpClient配置
116
+    http-client:
117
+      # 连接池的最大连接数
118
+      max-total-connect: 200
119
+      # 相同域名允许创建的最大连接数
120
+      max-connect-per-route: 10
121
+      # 客户端和服务器建立连接超时时间
122
+      connect-timeout: 2000
123
+      # 读数据的超时时间
124
+      socket-timeout: 30000
125
+      # 连接池创建连接时的超时时间
126
+      connection-request-timout: 200
127
+    # OKHttp配置
128
+    ok-http:
129
+      # 失败后是否重试
130
+      retry-on-connection-failure: false
131
+      # 链接超时时间
132
+      connect-timeout: 2000
133
+      # 读超时时间
134
+      read-timeout: 10000
135
+      # 写超时时间
136
+      write-timeout: 10000
137
+      # 最大空闲的连接数
138
+      max-idle-connections: 5
139
+      # 最大的空闲时间
140
+      keep-alive-duration-ns: 3000
141
+
142
+  aop:
143
+    proxy-target-class: true
144
+  #配置freemarker
145
+  freemarker:
146
+    # 设置模板后缀名
147
+    suffix: .ftl
148
+    # 设置文档类型
149
+    content-type: text/html
150
+    # 设置页面编码格式
151
+    charset: UTF-8
152
+    # 设置页面缓存
153
+    cache: false
154
+    prefer-file-system-access: false
155
+    # 设置ftl文件路径
156
+    template-loader-path:
157
+      - classpath:/template
158
+    #      - d:/data
159
+    template_update_delay: 0
160
+  # 设置静态文件路径,js,css等
161
+  mvc:
162
+    static-path-pattern: /**
163
+    #Spring Boot 2.6+后映射匹配的默认策略已从AntPathMatcher更改为PathPatternParser,需要手动指定为ant-path-matcher
164
+    pathmatch:
165
+      matching-strategy: ant_path_matcher
166
+  resource:
167
+    static-locations: classpath:/static/,classpath:/public/
168
+  autoconfigure:
169
+    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
170
+  datasource:
171
+    druid:
172
+      stat-view-servlet:
173
+        enabled: true
174
+        loginUsername: admin
175
+        loginPassword: 123456
176
+        allow:
177
+      web-stat-filter:
178
+        enabled: true
179
+    dynamic:
180
+      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
181
+        # 连接池的配置信息
182
+        # 初始化大小,最小,最大
183
+        initial-size: 5
184
+        min-idle: 5
185
+        maxActive: 20
186
+        # 配置获取连接等待超时的时间
187
+        maxWait: 60000
188
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
189
+        timeBetweenEvictionRunsMillis: 60000
190
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
191
+        minEvictableIdleTimeMillis: 300000
192
+        validationQuery: SELECT 1
193
+        testWhileIdle: true
194
+        testOnBorrow: false
195
+        testOnReturn: false
196
+        # 打开PSCache,并且指定每个连接上PSCache的大小
197
+        poolPreparedStatements: true
198
+        maxPoolPreparedStatementPerConnectionSize: 20
199
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
200
+        filters: stat,slf4j
201
+        filter:
202
+          wall:
203
+            config:
204
+              none-base-statement-allow: true
205
+              multi-statement-allow: true
206
+        # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
207
+        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
208
+      datasource:
209
+        master:
210
+          url: jdbc:mysql://192.168.50.9:2212/otd?useUnicode=true&allowMultiQueries=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&serverTimezone=Asia/Shanghai&useSSL=false
211
+          username: root
212
+          password: root
213
+          driver-class-name: com.mysql.cj.jdbc.Driver
214
+          # 多数据源配置
215
+          #multi-datasource1:
216
+          #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
217
+          #username: root
218
+          #password: root
219
+          #driver-class-name: com.mysql.cj.jdbc.Driver
220
+  #redis 配置
221
+  redis:
222
+    database: 9
223
+    host: 192.168.50.9
224
+    port: 7379
225
+    password: 'zzboard'
226
+    main:
227
+      allow-circular-references: true
228
+
229
+  #rabbitmq 配置
230
+  rabbitmq:
231
+    host: 192.168.50.9
232
+    port: 5672
233
+    virtual-host: /qomoflow-dev
234
+    username: admin
235
+    password: kncloud
236
+    connection-timeout: 5000
237
+    listener:
238
+      simple:
239
+        concurrency: 5 # 并发数量
240
+        max-concurrency: 10 # 最大并发数量
241
+        acknowledge-mode: manual # 开启手动签收
242
+        prefetch: 1 # 限制每次只消费一个(一个线程)
243
+
244
+#mybatis plus 设置
245
+mybatis-plus:
246
+  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml,classpath*:/mapper/*.xml,classpath*:com/zzsmart/qomo/**/mapper/xml/*.xml
247
+  global-config:
248
+    # 关闭MP3.0自带的banner
249
+    banner: false
250
+    db-config:
251
+      #主键类型  0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
252
+      id-type: ASSIGN_ID
253
+      # 默认数据库表下划线命名
254
+      table-underline: true
255
+  configuration:
256
+    # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
257
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
258
+    #    log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
259
+    # 返回类型为Map,显示null对应的字段
260
+    call-setters-on-nulls: true
261
+#jeecg专用配置
262
+minidao:
263
+  base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
264
+jeecg:
265
+  # 是否启用安全模式
266
+  safeMode: false
267
+  # 签名密钥串(前后端要一致,正式发布请自行修改)
268
+  signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
269
+  # 签名拦截接口
270
+  signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
271
+  #local、minio、alioss
272
+  uploadType: local
273
+  # 前端访问地址
274
+  domainUrl:
275
+    pc: http://localhost:3100
276
+    app: http://localhost:8051
277
+  path:
278
+    #文件上传根目录 设置
279
+    upload: /opt/upFiles
280
+    #webapp文件路径
281
+    webapp: /opt/webapp
282
+  shiro:
283
+    #    excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/api/getUserInfo,/sys/sysDepart/**,/taskSocket/**,/flowSocket/**
284
+    excludeUrls: /**/**,/**/**/**
285
+
286
+  #阿里云oss存储和大鱼短信秘钥配置
287
+  oss:
288
+    accessKey: ??
289
+    secretKey: ??
290
+    endpoint: oss-cn-beijing.aliyuncs.com
291
+    bucketName: jeecgdev
292
+  minio:
293
+    minio_url: http://192.168.50.102:9000
294
+    minio_name: admin
295
+    minio_pass: minioadmin
296
+    bucketName: bucket803
297
+  # ElasticSearch 6设置
298
+  elasticsearch:
299
+    cluster-name: elasticsearch-cluster
300
+    cluster-nodes: 192.168.50.9:9200
301
+    check-enabled: false
302
+    task-data-index: task_data_dev/_doc
303
+    task-data-struct-index: task_data_struct_dev/_doc
304
+    task-data-temp-index: task_data_temp_dev/_doc
305
+    task-log-index: task_log_dev/_doc
306
+  # 在线预览文件服务器地址配置
307
+  file-view-domain: http://fileview.jeecg.com
308
+  # minio文件上传
309
+  #  minio:
310
+  #    minio_url: http://minio.jeecg.com
311
+  #    minio_name: ??
312
+  #    minio_pass: ??
313
+  #    bucketName: otatest
314
+  #大屏报表参数设置
315
+  jmreport:
316
+    mode: dev
317
+    #数据字典是否进行saas数据隔离,自己看自己的字典
318
+    saas: false
319
+  #xxl-job配置
320
+  xxljob:
321
+    enabled: false
322
+    adminAddresses: http://127.0.0.1:9080/xxl-job-admin
323
+    appname: ${spring.application.name}
324
+    accessToken: ''
325
+    address: 127.0.0.1:30007
326
+    ip: 127.0.0.1
327
+    port: 30007
328
+    logPath: logs/jeecg/job/jobhandler/
329
+    logRetentionDays: 30
330
+  #分布式锁配置
331
+  redisson:
332
+    address: 127.0.0.1:6379
333
+    password:
334
+    type: STANDALONE
335
+    enabled: true
336
+#cas单点登录
337
+cas:
338
+  server:
339
+    host:
340
+      #CAS服务地址
341
+      url: http://192.168.50.9:8167/cas
342
+#Mybatis输出sql日志
343
+logging:
344
+  level:
345
+    org.jeecg.modules.system.mapper: info
346
+#swagger
347
+knife4j:
348
+  #开启增强配置
349
+  enable: true
350
+  #开启生产环境屏蔽
351
+  production: false
352
+  basic:
353
+    enable: false
354
+    username: jeecg
355
+    password: jeecg1314
356
+#第三方登录
357
+justauth:
358
+  enabled: true
359
+  type:
360
+    GITHUB:
361
+      client-id: ??
362
+      client-secret: ??
363
+      redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/github/callback
364
+    WECHAT_ENTERPRISE:
365
+      client-id: ??
366
+      client-secret: ??
367
+      redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/wechat_enterprise/callback
368
+      agent-id: ??
369
+    DINGTALK:
370
+      client-id: ??
371
+      client-secret: ??
372
+      redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/dingtalk/callback
373
+    WECHAT_OPEN:
374
+      client-id: ??
375
+      client-secret: ??
376
+      redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/wechat_open/callback
377
+  cache:
378
+    type: default
379
+    prefix: 'demo::'
380
+    timeout: 1h
381
+#第三方APP对接
382
+third-app:
383
+  enabled: false
384
+  type:
385
+    #企业微信
386
+    WECHAT_ENTERPRISE:
387
+      enabled: false
388
+      #CORP_ID
389
+      client-id: ??
390
+      #SECRET
391
+      client-secret: ??
392
+      #自建应用id
393
+      agent-id: ??
394
+      #自建应用秘钥(新版企微需要配置)
395
+      # agent-app-secret: ??
396
+    #钉钉
397
+    DINGTALK:
398
+      enabled: false
399
+      # appKey
400
+      client-id: ??
401
+      # appSecret
402
+      client-secret: ??
403
+      agent-id: ??
404
+
405
+spark:
406
+  app:
407
+    name: yl
408
+  home: 127.0.0.1
409
+  master:
410
+    uri: local[*]
411
+  driver:
412
+    memory: 2g
413
+  worker:
414
+    memory: 2g
415
+  executor:
416
+    memory: 1g
417
+  rpc:
418
+    message:
419
+      maxSize: 1024
420
+
421
+flowable:
422
+  process:
423
+    definition-cache-limit: -1
424
+  database-schema-update: true
425
+  activity-font-name: 宋体
426
+  label-font-name: 宋体
427
+  annotation-font-name: 宋体
428
+  #关闭定时任务JOB
429
+  async-executor-activate: false
430
+  #消息链接基地址
431
+  message-base-url: http://192.168.50.9:3000/flowable/task/record/
432
+
433
+Qomo:
434
+  version: @project.version@
435
+
436
+modelPath: /opt/services/deploy-jars/algo/model
437
+seaTunnelHome: /opt/service/apache-seatunnel-2.3.4
438
+hiveMetastoreUri: thrift://192.168.50.102:9083
439
+
440
+minio:
441
+  server: http://192.168.50.102
442
+  port: 9000
443
+  access-key: admin
444
+  secret-key: minioadmin
445
+  bucketName: bucket1
446
+
447
+condaEnv: py310
448
+
449
+analysis:
450
+  consistency:
451
+    url: http://192.168.50.9:1314/analysis

+ 5
- 0
qomo-kn-cost-manage-start/src/main/resources/application.yml View File

1
+spring:
2
+  application:
3
+    name: qomo-forecast
4
+  profiles:
5
+    active: dev

+ 29
- 0
qomo-kn-cost-manage-start/src/main/resources/jeecg/jeecg_config.properties View File

1
+#code_generate_project_path
2
+project_path=E:\\workspace\\qomoai
3
+#bussi_package[User defined]
4
+bussi_package=com.zzsmart.qomo.modules.demo
5
+
6
+
7
+#default code path
8
+#source_root_package=src
9
+#webroot_package=WebRoot
10
+
11
+#maven code path
12
+source_root_package=src.main.java
13
+webroot_package=src.main.webapp
14
+
15
+#ftl resource url
16
+templatepath=/jeecg/code-template
17
+system_encoding=utf-8
18
+
19
+#db Table id [User defined]
20
+db_table_id=id
21
+
22
+#db convert flag[true/false]
23
+db_filed_convert=true
24
+
25
+#page Search Field num [User defined]
26
+page_search_filed_num=1
27
+#page_filter_fields
28
+page_filter_fields=create_time,create_by,update_time,update_by
29
+exclude_table=act_,ext_act_,design_,onl_,sys_,qrtz_

+ 27
- 0
qomo-kn-cost-manage-start/src/main/resources/jeecg/jeecg_database.properties View File

1
+#mysql
2
+diver_name=com.mysql.jdbc.Driver
3
+url=jdbc:mysql://localhost:3306/qomo?useUnicode=true&characterEncoding=UTF-8
4
+username=root
5
+password=root
6
+database_name=qomo
7
+
8
+#oracle
9
+#diver_name=oracle.jdbc.driver.OracleDriver
10
+#url=jdbc:oracle:thin:@192.168.1.200:1521:ORCL
11
+#username=scott
12
+#password=tiger
13
+#database_name=ORCL
14
+
15
+#postgre
16
+#diver_name=org.postgresql.Driver
17
+#url=jdbc:postgresql://localhost:5432/qomo
18
+#username=postgres
19
+#password=postgres
20
+#database_name=qomo
21
+
22
+#SQLServer2005以上
23
+#diver_name=org.hibernate.dialect.SQLServerDialect
24
+#url=jdbc:sqlserver://192.168.1.200:1433;DatabaseName=qomo
25
+#username=sa
26
+#password=SA
27
+#database_name=qomo

+ 96
- 0
qomo-kn-cost-manage-start/src/main/resources/liquibase/changelogs/change.sql View File

1
+ALTER TABLE `sys_permission`
2
+    ADD COLUMN `type` varchar(255) NULL COMMENT '类型 CDM 公共层 ADS 应用层' AFTER `middle`;
3
+
4
+CREATE TABLE `sys_application`
5
+(
6
+    `id`              varchar(255)                                                 NOT NULL COMMENT '主键',
7
+    `app_name`        varchar(255)                                                 NULL COMMENT '应用名称',
8
+    `app_code`        varchar(255)                                                 NULL COMMENT '应用编码',
9
+    `app_icon`        varchar(255)                                                 NULL COMMENT '应用图标',
10
+    `app_color`       varchar(255)                                                 NULL COMMENT '应用颜色',
11
+    `app_belong`      varchar(255)                                                 NULL COMMENT '应用所属',
12
+    `app_kind`        varchar(255)                                                 NULL COMMENT '应用种类',
13
+    `app_type`        varchar(255)                                                 NULL COMMENT '应用类型',
14
+    `function_module` varchar(255)                                                 NULL COMMENT '功能模块',
15
+    `main_menu_url`   varchar(255)                                                 NULL COMMENT '主菜单路径',
16
+    `main_menu_name`  varchar(255)                                                 NULL COMMENT '主菜单名称',
17
+    `sort`            int                                                          NULL COMMENT '排序',
18
+    `create_by`       varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'creator id',
19
+    `create_time`     datetime(0)                                                  NULL DEFAULT NULL COMMENT 'create time',
20
+    `update_by`       varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'updator id',
21
+    `update_time`     datetime(0)                                                  NULL DEFAULT NULL COMMENT 'update time',
22
+    PRIMARY KEY (`id`)
23
+) COMMENT = '系统应用表';
24
+
25
+
26
+CREATE TABLE `sys_app_menu`
27
+(
28
+    `id`           varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
29
+    `app_id`       varchar(255)                                                  NULL COMMENT '应用id',
30
+    `menu_id`      varchar(255)                                                  NULL COMMENT '菜单id',
31
+    `create_by`    varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT 'creator id',
32
+    `create_time`  datetime(0)                                                   NULL DEFAULT NULL COMMENT 'create time',
33
+    `update_by`    varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT 'updator id',
34
+    `update_time`  datetime(0)                                                   NULL DEFAULT NULL COMMENT 'update time',
35
+    PRIMARY KEY (`id`)
36
+) COMMENT = '应用菜单';
37
+
38
+ALTER TABLE `qomo_database_file`
39
+    ADD COLUMN `record_count` bigint NULL COMMENT '记录数' AFTER `absolute_path`;
40
+
41
+CREATE TABLE `qomo_python_package`  (
42
+                                            `id` varchar(255) NOT NULL COMMENT '主键',
43
+                                            `package_name` varchar(255) NULL COMMENT '包名',
44
+                                            `version` varchar(255) NULL COMMENT '版本',
45
+                                            `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'creator id',
46
+                                            `create_time` datetime(0) NULL DEFAULT NULL COMMENT 'create time',
47
+                                            `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'updator id',
48
+                                            `update_time` datetime(0) NULL DEFAULT NULL COMMENT 'update time',
49
+                                            PRIMARY KEY (`id`)
50
+) COMMENT = 'python包管理';
51
+
52
+CREATE TABLE `sys_org`  (
53
+                                            `id` varchar(255) NOT NULL COMMENT 'ID',
54
+                                            `org_name` varchar(255) NULL COMMENT '组织名称',
55
+                                            `org_code` varchar(255) NULL COMMENT '组织编码',
56
+                                            `org_Industry` varchar(255) NULL COMMENT '所属行业',
57
+                                            `org_scale` varchar(255) NULL COMMENT '公司规模',
58
+                                            `org_addr` varchar(255) NULL COMMENT '公司地址',
59
+                                            `org_logo` varchar(255) NULL COMMENT '组织logo',
60
+                                            `org_state` varchar(255) NULL COMMENT '公司状态',
61
+                                            `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'creator id',
62
+                                            `create_time` datetime(0) NULL DEFAULT NULL COMMENT 'create time',
63
+                                            `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'updator id',
64
+                                            `update_time` datetime(0) NULL DEFAULT NULL COMMENT 'update time',
65
+                                            PRIMARY KEY (`id`)
66
+) COMMENT = '组织';
67
+
68
+CREATE TABLE `sys_app_org`  (
69
+                                            `id` varchar(255) NOT NULL COMMENT 'ID',
70
+                                            `app_id` varchar(255) NULL COMMENT '应用ID',
71
+                                            `org_id` varchar(255) NULL COMMENT '组织ID',
72
+                                            `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'creator id',
73
+                                            `create_time` datetime(0) NULL DEFAULT NULL COMMENT 'create time',
74
+                                            `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'updator id',
75
+                                            `update_time` datetime(0) NULL DEFAULT NULL COMMENT 'update time',
76
+                                            PRIMARY KEY (`id`)
77
+) COMMENT = '应用组织关联表';
78
+
79
+# 2024-03-27
80
+ALTER TABLE `sys_org`
81
+    ADD COLUMN `org_desc` varchar(255) NULL COMMENT '描述' AFTER `org_state`;
82
+
83
+# 2024-03-29
84
+ALTER TABLE `sys_depart`
85
+    MODIFY COLUMN `org_category` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT '1' COMMENT '机构类别 1公司,2组织机构,2岗位' AFTER `description`,
86
+    ADD COLUMN `org_id` varchar(255) NULL COMMENT '组织ID' AFTER `org_code`,
87
+    ADD COLUMN `depart_code` varchar(255) NULL COMMENT '组织ID' AFTER `org_code`;
88
+
89
+ALTER TABLE `sys_role`
90
+    ADD COLUMN `org_id` varchar(255) NULL COMMENT '组织ID' AFTER `role_code`;
91
+
92
+ALTER TABLE `sys_user`
93
+    ADD COLUMN `org_id` varchar(255) NULL COMMENT '组织ID' AFTER `bpm_status`;
94
+
95
+ALTER TABLE `sys_user`
96
+    ADD COLUMN `depart_code` varchar(255) NULL COMMENT '登录会话的部门编码' AFTER `org_code`;

+ 19122
- 0
qomo-kn-cost-manage-start/src/main/resources/liquibase/changelogs/qomo-boot-init.sql
File diff suppressed because it is too large
View File


+ 9
- 0
qomo-kn-cost-manage-start/src/main/resources/liquibase/master.xml View File

1
+<databaseChangeLog
2
+        xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
3
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
5
+   http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
6
+
7
+<!--    <include file="liquibase/changelogs/qomo-boot-init.sql" relativeToChangelogFile="false"/>-->
8
+<!--    <include file="liquibase/changelogs/change.sql" relativeToChangelogFile="false"/>-->
9
+</databaseChangeLog>

+ 27
- 0
qomo-kn-cost-manage/pom.xml View File

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">
5
+    <modelVersion>4.0.0</modelVersion>
6
+    <parent>
7
+        <groupId>com.zzsmart.qomo</groupId>
8
+        <artifactId>qomo-kn-forecast</artifactId>
9
+        <version>${revision}</version>
10
+    </parent>
11
+    <artifactId>qomo-kn-cost-manage</artifactId>
12
+    <dependencies>
13
+        <dependency>
14
+            <groupId>org.qomo.boot</groupId>
15
+            <artifactId>qomo-system-biz</artifactId>
16
+        </dependency>
17
+        <dependency>
18
+            <groupId>com.google.auto.service</groupId>
19
+            <artifactId>auto-service</artifactId>
20
+            <scope>provided</scope>
21
+        </dependency>
22
+        <dependency>
23
+            <groupId>com.zzsmart.qomo</groupId>
24
+            <artifactId>qomo-data-integration</artifactId>
25
+        </dependency>
26
+    </dependencies>
27
+</project>

+ 48
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/constants/Constants.java View File

1
+package com.zzsmart.qomo.kn.cost.manage.constants;
2
+
3
+import cn.hutool.core.collection.CollUtil;
4
+
5
+import java.util.List;
6
+
7
+/**
8
+ * @author WangBo
9
+ * @since 2024/5/17 下午3:05
10
+ */
11
+public interface Constants {
12
+
13
+    String TRACK = "轨道总部";
14
+
15
+    List<String> BUSINESS_SEGMENTS = CollUtil.newArrayList("国内业务", "维保业务", "海外业务", "安全门业务", "汽车门业务", "内装业务");
16
+
17
+    List<String> PROFIT_ITEM_NAMES = CollUtil.newArrayList(
18
+            "一、营业总收入",
19
+            "其中:营业成本",
20
+            "税金及附加",
21
+            "销售费用",
22
+            "管理费用",
23
+            "研发费用",
24
+            "财务费用",
25
+            "二、营业总成本",
26
+            "加:其他收益",
27
+            "投资收益(损失以“-”号填列)",
28
+            "公允价值变动收益(损失以“-”号填列)",
29
+            "信用减值损失(损失以“-”号填列)",
30
+            "资产减值损失(损失以“-”号填列)",
31
+            "资产处置收益(损失以“-”号填列)",
32
+            "三、营业利润",
33
+            "加:营业外收入",
34
+            "减:营业外支出",
35
+            "四、利润总额",
36
+            "减:所得税费用",
37
+            "五、净利润",
38
+            "六、归属于母公司的净利润",
39
+            "八、关键指标",
40
+            "产品毛利率",
41
+            "期间费用",
42
+            "期间费用率",
43
+            "净利率");
44
+    /**
45
+     * 下划线
46
+     */
47
+    String UNDER_LINE = "_";
48
+}

+ 179
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostCountController.java View File

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

+ 162
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostHourRateController.java View File

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.AppSceneCostHourRate;
7
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostHourRateService;
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_hour_rate
26
+ * @Author: jeecg-boot
27
+ * @Date: 2024-08-02
28
+ * @Version: V1.0
29
+ */
30
+@Api(tags="cost-小时费率")
31
+@RestController
32
+@RequestMapping("//hourRate")
33
+@Slf4j
34
+public class AppSceneCostHourRateController extends JeecgController<AppSceneCostHourRate, IAppSceneCostHourRateService> {
35
+    @Autowired
36
+    private IAppSceneCostHourRateService appSceneCostHourRateService;
37
+
38
+    /**
39
+     * 分页列表查询
40
+     *
41
+     * @param appSceneCostHourRate
42
+     * @param pageNo
43
+     * @param pageSize
44
+     * @param req
45
+     * @return
46
+     */
47
+    //@AutoLog(value = "app_scene_cost_hour_rate-分页列表查询")
48
+    @ApiOperation(value = "app_scene_cost_hour_rate-分页列表查询", notes = "app_scene_cost_hour_rate-分页列表查询")
49
+    @GetMapping(value = "/list")
50
+    public Result<IPage<AppSceneCostHourRate>> queryPageList(AppSceneCostHourRate appSceneCostHourRate,
51
+                                                             @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
52
+                                                             @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
53
+                                                             HttpServletRequest req) {
54
+        QueryWrapper<AppSceneCostHourRate> queryWrapper = QueryGenerator.initQueryWrapper(appSceneCostHourRate, req.getParameterMap());
55
+        Page<AppSceneCostHourRate> page = new Page<AppSceneCostHourRate>(pageNo, pageSize);
56
+        IPage<AppSceneCostHourRate> pageList = appSceneCostHourRateService.page(page, queryWrapper);
57
+        return Result.OK(pageList);
58
+    }
59
+
60
+    /**
61
+     * 添加
62
+     *
63
+     * @param appSceneCostHourRate
64
+     * @return
65
+     */
66
+    @AutoLog(value = "app_scene_cost_hour_rate-添加")
67
+    @ApiOperation(value = "app_scene_cost_hour_rate-添加", notes = "app_scene_cost_hour_rate-添加")
68
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_hour_rate:add")
69
+    @PostMapping(value = "/add")
70
+    public Result<String> add(@RequestBody AppSceneCostHourRate appSceneCostHourRate) {
71
+        appSceneCostHourRateService.save(appSceneCostHourRate);
72
+        return Result.OK("添加成功!");
73
+    }
74
+
75
+    /**
76
+     * 编辑
77
+     *
78
+     * @param appSceneCostHourRate
79
+     * @return
80
+     */
81
+    @AutoLog(value = "app_scene_cost_hour_rate-编辑")
82
+    @ApiOperation(value = "app_scene_cost_hour_rate-编辑", notes = "app_scene_cost_hour_rate-编辑")
83
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_hour_rate:edit")
84
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
85
+    public Result<String> edit(@RequestBody AppSceneCostHourRate appSceneCostHourRate) {
86
+        appSceneCostHourRateService.updateById(appSceneCostHourRate);
87
+        return Result.OK("编辑成功!");
88
+    }
89
+
90
+    /**
91
+     * 通过id删除
92
+     *
93
+     * @param id
94
+     * @return
95
+     */
96
+    @AutoLog(value = "app_scene_cost_hour_rate-通过id删除")
97
+    @ApiOperation(value = "app_scene_cost_hour_rate-通过id删除", notes = "app_scene_cost_hour_rate-通过id删除")
98
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_hour_rate:delete")
99
+    @DeleteMapping(value = "/delete")
100
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
101
+        appSceneCostHourRateService.removeById(id);
102
+        return Result.OK("删除成功!");
103
+    }
104
+
105
+//    /**
106
+//     * 批量删除
107
+//     *
108
+//     * @param ids
109
+//     * @return
110
+//     */
111
+//    @AutoLog(value = "app_scene_cost_hour_rate-批量删除")
112
+//    @ApiOperation(value = "app_scene_cost_hour_rate-批量删除", notes = "app_scene_cost_hour_rate-批量删除")
113
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_hour_rate:deleteBatch")
114
+//    @DeleteMapping(value = "/deleteBatch")
115
+//    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
116
+//        this.appSceneCostHourRateService.removeByIds(Arrays.asList(ids.split(",")));
117
+//        return Result.OK("批量删除成功!");
118
+//    }
119
+
120
+    /**
121
+     * 通过id查询
122
+     *
123
+     * @param id
124
+     * @return
125
+     */
126
+    //@AutoLog(value = "app_scene_cost_hour_rate-通过id查询")
127
+    @ApiOperation(value = "app_scene_cost_hour_rate-通过id查询", notes = "app_scene_cost_hour_rate-通过id查询")
128
+    @GetMapping(value = "/queryById")
129
+    public Result<AppSceneCostHourRate> queryById(@RequestParam(name = "id", required = true) String id) {
130
+        AppSceneCostHourRate appSceneCostHourRate = appSceneCostHourRateService.getById(id);
131
+        if (appSceneCostHourRate == null) {
132
+            return Result.error("未找到对应数据");
133
+        }
134
+        return Result.OK(appSceneCostHourRate);
135
+    }
136
+
137
+//    /**
138
+//     * 导出excel
139
+//     *
140
+//     * @param request
141
+//     * @param appSceneCostHourRate
142
+//     */
143
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_hour_rate:exportXls")
144
+//    @RequestMapping(value = "/exportXls")
145
+//    public ModelAndView exportXls(HttpServletRequest request, AppSceneCostHourRate appSceneCostHourRate) {
146
+//        return super.exportXls(request, appSceneCostHourRate, AppSceneCostHourRate.class, "app_scene_cost_hour_rate");
147
+//    }
148
+
149
+//    /**
150
+//     * 通过excel导入数据
151
+//     *
152
+//     * @param request
153
+//     * @param response
154
+//     * @return
155
+//     */
156
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_hour_rate:importExcel")
157
+//    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
158
+//    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
159
+//        return super.importExcel(request, response, AppSceneCostHourRate.class);
160
+//    }
161
+
162
+}

+ 190
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostMaterialBomController.java View File

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.AppSceneCostMaterialBom;
7
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostMaterialBomService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiOperation;
10
+import lombok.extern.slf4j.Slf4j;
11
+import org.jeecg.common.api.vo.Result;
12
+import org.jeecg.common.system.base.controller.JeecgController;
13
+import org.jeecg.common.system.query.QueryGenerator;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.web.bind.annotation.*;
16
+
17
+import javax.servlet.http.HttpServletRequest;
18
+import java.util.List;
19
+
20
+/**
21
+ * @Description: app_scene_cost_material_bom
22
+ * @Author: jeecg-boot
23
+ * @Date: 2024-08-02
24
+ * @Version: V1.0
25
+ */
26
+@RequestMapping("//cost-material-bom")
27
+@Api(tags="cost-标准成本-bom信息")
28
+@RestController
29
+@Slf4j
30
+public class AppSceneCostMaterialBomController extends JeecgController<AppSceneCostMaterialBom, IAppSceneCostMaterialBomService> {
31
+    @Autowired
32
+    private IAppSceneCostMaterialBomService costMaterialBomService;
33
+    /**
34
+     * 分页列表查询
35
+     *
36
+     * @param costMaterialBom
37
+     * @param pageNo
38
+     * @param pageSize
39
+     * @param req
40
+     * @return
41
+     */
42
+    //@AutoLog(value = "app_scene_cost_standard_version-分页列表查询")
43
+    @ApiOperation(value="物料bom分页列表查询", notes="物料bom分页列表查询")
44
+    @GetMapping(value = "/pageList")
45
+    public Result<IPage<AppSceneCostMaterialBom>> queryPageList(AppSceneCostMaterialBom costMaterialBom,
46
+                                                        @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
47
+                                                        @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
48
+                                                        HttpServletRequest req) {
49
+        QueryWrapper<AppSceneCostMaterialBom> queryWrapper = QueryGenerator.initQueryWrapper(costMaterialBom, req.getParameterMap());
50
+        Page<AppSceneCostMaterialBom> page = new Page<AppSceneCostMaterialBom>(pageNo, pageSize);
51
+        IPage<AppSceneCostMaterialBom> pageList = costMaterialBomService.page(page, queryWrapper);
52
+        return Result.OK(pageList);
53
+    }
54
+    /**
55
+     * 列表查询
56
+     *
57
+     * @return
58
+     */
59
+    @ApiOperation(value="物料bom列表查询", notes="物料bom列表查询")
60
+    @GetMapping(value = "/list")
61
+    public Result<List<AppSceneCostMaterialBom>> queryList(@RequestParam(name = "materialNumber",required = false) String materialNumber) {
62
+        List<AppSceneCostMaterialBom> list = costMaterialBomService.queryListResult(materialNumber);
63
+        return Result.OK(list);
64
+    }
65
+
66
+//    /**
67
+//     * 分页列表查询
68
+//     *
69
+//     * @param appSceneCostMaterialBom
70
+//     * @param pageNo
71
+//     * @param pageSize
72
+//     * @param req
73
+//     * @return
74
+//     */
75
+//    //@AutoLog(value = "app_scene_cost_material_bom-分页列表查询")
76
+//    @ApiOperation(value = "app_scene_cost_material_bom-分页列表查询", notes = "app_scene_cost_material_bom-分页列表查询")
77
+//    @GetMapping(value = "/list")
78
+//    public Result<IPage<AppSceneCostMaterialBom>> queryPageList(AppSceneCostMaterialBom appSceneCostMaterialBom,
79
+//                                                                @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
80
+//                                                                @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
81
+//                                                                HttpServletRequest req) {
82
+//        QueryWrapper<AppSceneCostMaterialBom> queryWrapper = QueryGenerator.initQueryWrapper(appSceneCostMaterialBom, req.getParameterMap());
83
+//        Page<AppSceneCostMaterialBom> page = new Page<AppSceneCostMaterialBom>(pageNo, pageSize);
84
+//        IPage<AppSceneCostMaterialBom> pageList = appSceneCostMaterialBomService.page(page, queryWrapper);
85
+//        return Result.OK(pageList);
86
+//    }
87
+//
88
+//    /**
89
+//     * 添加
90
+//     *
91
+//     * @param appSceneCostMaterialBom
92
+//     * @return
93
+//     */
94
+//    @AutoLog(value = "app_scene_cost_material_bom-添加")
95
+//    @ApiOperation(value = "app_scene_cost_material_bom-添加", notes = "app_scene_cost_material_bom-添加")
96
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_material_bom:add")
97
+//    @PostMapping(value = "/add")
98
+//    public Result<String> add(@RequestBody AppSceneCostMaterialBom appSceneCostMaterialBom) {
99
+//        appSceneCostMaterialBomService.save(appSceneCostMaterialBom);
100
+//        return Result.OK("添加成功!");
101
+//    }
102
+//
103
+//    /**
104
+//     * 编辑
105
+//     *
106
+//     * @param appSceneCostMaterialBom
107
+//     * @return
108
+//     */
109
+//    @AutoLog(value = "app_scene_cost_material_bom-编辑")
110
+//    @ApiOperation(value = "app_scene_cost_material_bom-编辑", notes = "app_scene_cost_material_bom-编辑")
111
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_material_bom:edit")
112
+//    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
113
+//    public Result<String> edit(@RequestBody AppSceneCostMaterialBom appSceneCostMaterialBom) {
114
+//        appSceneCostMaterialBomService.updateById(appSceneCostMaterialBom);
115
+//        return Result.OK("编辑成功!");
116
+//    }
117
+//
118
+//    /**
119
+//     * 通过id删除
120
+//     *
121
+//     * @param id
122
+//     * @return
123
+//     */
124
+//    @AutoLog(value = "app_scene_cost_material_bom-通过id删除")
125
+//    @ApiOperation(value = "app_scene_cost_material_bom-通过id删除", notes = "app_scene_cost_material_bom-通过id删除")
126
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_material_bom:delete")
127
+//    @DeleteMapping(value = "/delete")
128
+//    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
129
+//        appSceneCostMaterialBomService.removeById(id);
130
+//        return Result.OK("删除成功!");
131
+//    }
132
+//
133
+//    /**
134
+//     * 批量删除
135
+//     *
136
+//     * @param ids
137
+//     * @return
138
+//     */
139
+//    @AutoLog(value = "app_scene_cost_material_bom-批量删除")
140
+//    @ApiOperation(value = "app_scene_cost_material_bom-批量删除", notes = "app_scene_cost_material_bom-批量删除")
141
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_material_bom:deleteBatch")
142
+//    @DeleteMapping(value = "/deleteBatch")
143
+//    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
144
+//        this.appSceneCostMaterialBomService.removeByIds(Arrays.asList(ids.split(",")));
145
+//        return Result.OK("批量删除成功!");
146
+//    }
147
+//
148
+//    /**
149
+//     * 通过id查询
150
+//     *
151
+//     * @param id
152
+//     * @return
153
+//     */
154
+//    //@AutoLog(value = "app_scene_cost_material_bom-通过id查询")
155
+//    @ApiOperation(value = "app_scene_cost_material_bom-通过id查询", notes = "app_scene_cost_material_bom-通过id查询")
156
+//    @GetMapping(value = "/queryById")
157
+//    public Result<AppSceneCostMaterialBom> queryById(@RequestParam(name = "id", required = true) String id) {
158
+//        AppSceneCostMaterialBom appSceneCostMaterialBom = appSceneCostMaterialBomService.getById(id);
159
+//        if (appSceneCostMaterialBom == null) {
160
+//            return Result.error("未找到对应数据");
161
+//        }
162
+//        return Result.OK(appSceneCostMaterialBom);
163
+//    }
164
+//
165
+//    /**
166
+//     * 导出excel
167
+//     *
168
+//     * @param request
169
+//     * @param appSceneCostMaterialBom
170
+//     */
171
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_material_bom:exportXls")
172
+//    @RequestMapping(value = "/exportXls")
173
+//    public ModelAndView exportXls(HttpServletRequest request, AppSceneCostMaterialBom appSceneCostMaterialBom) {
174
+//        return super.exportXls(request, appSceneCostMaterialBom, AppSceneCostMaterialBom.class, "app_scene_cost_material_bom");
175
+//    }
176
+//
177
+//    /**
178
+//     * 通过excel导入数据
179
+//     *
180
+//     * @param request
181
+//     * @param response
182
+//     * @return
183
+//     */
184
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_material_bom:importExcel")
185
+//    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
186
+//    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
187
+//        return super.importExcel(request, response, AppSceneCostMaterialBom.class);
188
+//    }
189
+
190
+}

+ 159
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostMaterialProcessHoursController.java View File

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.AppSceneCostMaterialProcessHours;
7
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostMaterialProcessHoursService;
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_material_process_hours
26
+ * @Author: jeecg-boot
27
+ * @Date: 2024-08-02
28
+ * @Version: V1.0
29
+ */
30
+@Api(tags = "cost-工序工时")
31
+@RestController
32
+@RequestMapping("//processHours")
33
+@Slf4j
34
+public class AppSceneCostMaterialProcessHoursController extends JeecgController<AppSceneCostMaterialProcessHours, IAppSceneCostMaterialProcessHoursService> {
35
+    @Autowired
36
+    private IAppSceneCostMaterialProcessHoursService appSceneCostMaterialProcessHoursService;
37
+
38
+    /**
39
+     * 分页列表查询
40
+     *
41
+     * @param appSceneCostMaterialProcessHours
42
+     * @param pageNo
43
+     * @param pageSize
44
+     * @param req
45
+     * @return
46
+     */
47
+    //@AutoLog(value = "app_scene_cost_material_process_hours-分页列表查询")
48
+    @ApiOperation(value = "app_scene_cost_material_process_hours-分页列表查询", notes = "app_scene_cost_material_process_hours-分页列表查询")
49
+    @GetMapping(value = "/list")
50
+    public Result<IPage<AppSceneCostMaterialProcessHours>> queryPageList(AppSceneCostMaterialProcessHours appSceneCostMaterialProcessHours, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
51
+        QueryWrapper<AppSceneCostMaterialProcessHours> queryWrapper = QueryGenerator.initQueryWrapper(appSceneCostMaterialProcessHours, req.getParameterMap());
52
+        Page<AppSceneCostMaterialProcessHours> page = new Page<AppSceneCostMaterialProcessHours>(pageNo, pageSize);
53
+        IPage<AppSceneCostMaterialProcessHours> pageList = appSceneCostMaterialProcessHoursService.page(page, queryWrapper);
54
+        return Result.OK(pageList);
55
+    }
56
+
57
+    /**
58
+     * 添加
59
+     *
60
+     * @param appSceneCostMaterialProcessHours
61
+     * @return
62
+     */
63
+    @AutoLog(value = "app_scene_cost_material_process_hours-添加")
64
+    @ApiOperation(value = "app_scene_cost_material_process_hours-添加", notes = "app_scene_cost_material_process_hours-添加")
65
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_material_process_hours:add")
66
+    @PostMapping(value = "/add")
67
+    public Result<String> add(@RequestBody AppSceneCostMaterialProcessHours appSceneCostMaterialProcessHours) {
68
+        appSceneCostMaterialProcessHoursService.save(appSceneCostMaterialProcessHours);
69
+        return Result.OK("添加成功!");
70
+    }
71
+
72
+    /**
73
+     * 编辑
74
+     *
75
+     * @param appSceneCostMaterialProcessHours
76
+     * @return
77
+     */
78
+    @AutoLog(value = "app_scene_cost_material_process_hours-编辑")
79
+    @ApiOperation(value = "app_scene_cost_material_process_hours-编辑", notes = "app_scene_cost_material_process_hours-编辑")
80
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_material_process_hours:edit")
81
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
82
+    public Result<String> edit(@RequestBody AppSceneCostMaterialProcessHours appSceneCostMaterialProcessHours) {
83
+        appSceneCostMaterialProcessHoursService.updateById(appSceneCostMaterialProcessHours);
84
+        return Result.OK("编辑成功!");
85
+    }
86
+
87
+    /**
88
+     * 通过id删除
89
+     *
90
+     * @param id
91
+     * @return
92
+     */
93
+    @AutoLog(value = "app_scene_cost_material_process_hours-通过id删除")
94
+    @ApiOperation(value = "app_scene_cost_material_process_hours-通过id删除", notes = "app_scene_cost_material_process_hours-通过id删除")
95
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_material_process_hours:delete")
96
+    @DeleteMapping(value = "/delete")
97
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
98
+        appSceneCostMaterialProcessHoursService.removeById(id);
99
+        return Result.OK("删除成功!");
100
+    }
101
+
102
+//    /**
103
+//     * 批量删除
104
+//     *
105
+//     * @param ids
106
+//     * @return
107
+//     */
108
+//    @AutoLog(value = "app_scene_cost_material_process_hours-批量删除")
109
+//    @ApiOperation(value = "app_scene_cost_material_process_hours-批量删除", notes = "app_scene_cost_material_process_hours-批量删除")
110
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_material_process_hours:deleteBatch")
111
+//    @DeleteMapping(value = "/deleteBatch")
112
+//    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
113
+//        this.appSceneCostMaterialProcessHoursService.removeByIds(Arrays.asList(ids.split(",")));
114
+//        return Result.OK("批量删除成功!");
115
+//    }
116
+
117
+    /**
118
+     * 通过id查询
119
+     *
120
+     * @param id
121
+     * @return
122
+     */
123
+    //@AutoLog(value = "app_scene_cost_material_process_hours-通过id查询")
124
+    @ApiOperation(value = "app_scene_cost_material_process_hours-通过id查询", notes = "app_scene_cost_material_process_hours-通过id查询")
125
+    @GetMapping(value = "/queryById")
126
+    public Result<AppSceneCostMaterialProcessHours> queryById(@RequestParam(name = "id", required = true) String id) {
127
+        AppSceneCostMaterialProcessHours appSceneCostMaterialProcessHours = appSceneCostMaterialProcessHoursService.getById(id);
128
+        if (appSceneCostMaterialProcessHours == null) {
129
+            return Result.error("未找到对应数据");
130
+        }
131
+        return Result.OK(appSceneCostMaterialProcessHours);
132
+    }
133
+
134
+//    /**
135
+//     * 导出excel
136
+//     *
137
+//     * @param request
138
+//     * @param appSceneCostMaterialProcessHours
139
+//     */
140
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_material_process_hours:exportXls")
141
+//    @RequestMapping(value = "/exportXls")
142
+//    public ModelAndView exportXls(HttpServletRequest request, AppSceneCostMaterialProcessHours appSceneCostMaterialProcessHours) {
143
+//        return super.exportXls(request, appSceneCostMaterialProcessHours, AppSceneCostMaterialProcessHours.class, "app_scene_cost_material_process_hours");
144
+//    }
145
+
146
+//    /**
147
+//     * 通过excel导入数据
148
+//     *
149
+//     * @param request
150
+//     * @param response
151
+//     * @return
152
+//     */
153
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_material_process_hours:importExcel")
154
+//    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
155
+//    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
156
+//        return super.importExcel(request, response, AppSceneCostMaterialProcessHours.class);
157
+//    }
158
+
159
+}

+ 115
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostModelController.java View File

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

+ 159
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostPartMissingInfoController.java View File

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.AppSceneCostPartMissingInfo;
7
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostPartMissingInfoService;
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_part_missing_info
26
+ * @Author: jeecg-boot
27
+ * @Date: 2024-08-02
28
+ * @Version: V1.0
29
+ */
30
+@Api(tags = "cost-部件缺失信息")
31
+@RestController
32
+@RequestMapping("//partMissingInfo")
33
+@Slf4j
34
+public class AppSceneCostPartMissingInfoController extends JeecgController<AppSceneCostPartMissingInfo, IAppSceneCostPartMissingInfoService> {
35
+    @Autowired
36
+    private IAppSceneCostPartMissingInfoService appSceneCostPartMissingInfoService;
37
+
38
+    /**
39
+     * 分页列表查询
40
+     *
41
+     * @param appSceneCostPartMissingInfo
42
+     * @param pageNo
43
+     * @param pageSize
44
+     * @param req
45
+     * @return
46
+     */
47
+    //@AutoLog(value = "app_scene_cost_part_missing_info-分页列表查询")
48
+    @ApiOperation(value = "app_scene_cost_part_missing_info-分页列表查询", notes = "app_scene_cost_part_missing_info-分页列表查询")
49
+    @GetMapping(value = "/list")
50
+    public Result<IPage<AppSceneCostPartMissingInfo>> queryPageList(AppSceneCostPartMissingInfo appSceneCostPartMissingInfo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
51
+        QueryWrapper<AppSceneCostPartMissingInfo> queryWrapper = QueryGenerator.initQueryWrapper(appSceneCostPartMissingInfo, req.getParameterMap());
52
+        Page<AppSceneCostPartMissingInfo> page = new Page<AppSceneCostPartMissingInfo>(pageNo, pageSize);
53
+        IPage<AppSceneCostPartMissingInfo> pageList = appSceneCostPartMissingInfoService.page(page, queryWrapper);
54
+        return Result.OK(pageList);
55
+    }
56
+//
57
+//    /**
58
+//     * 添加
59
+//     *
60
+//     * @param appSceneCostPartMissingInfo
61
+//     * @return
62
+//     */
63
+//    @AutoLog(value = "app_scene_cost_part_missing_info-添加")
64
+//    @ApiOperation(value = "app_scene_cost_part_missing_info-添加", notes = "app_scene_cost_part_missing_info-添加")
65
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_part_missing_info:add")
66
+//    @PostMapping(value = "/add")
67
+//    public Result<String> add(@RequestBody AppSceneCostPartMissingInfo appSceneCostPartMissingInfo) {
68
+//        appSceneCostPartMissingInfoService.save(appSceneCostPartMissingInfo);
69
+//        return Result.OK("添加成功!");
70
+//    }
71
+//
72
+//    /**
73
+//     * 编辑
74
+//     *
75
+//     * @param appSceneCostPartMissingInfo
76
+//     * @return
77
+//     */
78
+//    @AutoLog(value = "app_scene_cost_part_missing_info-编辑")
79
+//    @ApiOperation(value = "app_scene_cost_part_missing_info-编辑", notes = "app_scene_cost_part_missing_info-编辑")
80
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_part_missing_info:edit")
81
+//    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
82
+//    public Result<String> edit(@RequestBody AppSceneCostPartMissingInfo appSceneCostPartMissingInfo) {
83
+//        appSceneCostPartMissingInfoService.updateById(appSceneCostPartMissingInfo);
84
+//        return Result.OK("编辑成功!");
85
+//    }
86
+//
87
+//    /**
88
+//     * 通过id删除
89
+//     *
90
+//     * @param id
91
+//     * @return
92
+//     */
93
+//    @AutoLog(value = "app_scene_cost_part_missing_info-通过id删除")
94
+//    @ApiOperation(value = "app_scene_cost_part_missing_info-通过id删除", notes = "app_scene_cost_part_missing_info-通过id删除")
95
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_part_missing_info:delete")
96
+//    @DeleteMapping(value = "/delete")
97
+//    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
98
+//        appSceneCostPartMissingInfoService.removeById(id);
99
+//        return Result.OK("删除成功!");
100
+//    }
101
+//
102
+//    /**
103
+//     * 批量删除
104
+//     *
105
+//     * @param ids
106
+//     * @return
107
+//     */
108
+//    @AutoLog(value = "app_scene_cost_part_missing_info-批量删除")
109
+//    @ApiOperation(value = "app_scene_cost_part_missing_info-批量删除", notes = "app_scene_cost_part_missing_info-批量删除")
110
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_part_missing_info:deleteBatch")
111
+//    @DeleteMapping(value = "/deleteBatch")
112
+//    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
113
+//        this.appSceneCostPartMissingInfoService.removeByIds(Arrays.asList(ids.split(",")));
114
+//        return Result.OK("批量删除成功!");
115
+//    }
116
+//
117
+//    /**
118
+//     * 通过id查询
119
+//     *
120
+//     * @param id
121
+//     * @return
122
+//     */
123
+//    //@AutoLog(value = "app_scene_cost_part_missing_info-通过id查询")
124
+//    @ApiOperation(value = "app_scene_cost_part_missing_info-通过id查询", notes = "app_scene_cost_part_missing_info-通过id查询")
125
+//    @GetMapping(value = "/queryById")
126
+//    public Result<AppSceneCostPartMissingInfo> queryById(@RequestParam(name = "id", required = true) String id) {
127
+//        AppSceneCostPartMissingInfo appSceneCostPartMissingInfo = appSceneCostPartMissingInfoService.getById(id);
128
+//        if (appSceneCostPartMissingInfo == null) {
129
+//            return Result.error("未找到对应数据");
130
+//        }
131
+//        return Result.OK(appSceneCostPartMissingInfo);
132
+//    }
133
+//
134
+//    /**
135
+//     * 导出excel
136
+//     *
137
+//     * @param request
138
+//     * @param appSceneCostPartMissingInfo
139
+//     */
140
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_part_missing_info:exportXls")
141
+//    @RequestMapping(value = "/exportXls")
142
+//    public ModelAndView exportXls(HttpServletRequest request, AppSceneCostPartMissingInfo appSceneCostPartMissingInfo) {
143
+//        return super.exportXls(request, appSceneCostPartMissingInfo, AppSceneCostPartMissingInfo.class, "app_scene_cost_part_missing_info");
144
+//    }
145
+//
146
+//    /**
147
+//     * 通过excel导入数据
148
+//     *
149
+//     * @param request
150
+//     * @param response
151
+//     * @return
152
+//     */
153
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_part_missing_info:importExcel")
154
+//    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
155
+//    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
156
+//        return super.importExcel(request, response, AppSceneCostPartMissingInfo.class);
157
+//    }
158
+
159
+}

+ 162
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostPurchaseEvaluateController.java View File

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.AppSceneCostPurchaseEvaluate;
7
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostPurchaseEvaluateService;
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_purchase_evaluate
26
+ * @Author: jeecg-boot
27
+ * @Date: 2024-08-02
28
+ * @Version: V1.0
29
+ */
30
+@Api(tags = "cost-采购合同")
31
+@RestController
32
+@RequestMapping("//PurchaseEvaluate")
33
+@Slf4j
34
+public class AppSceneCostPurchaseEvaluateController extends JeecgController<AppSceneCostPurchaseEvaluate, IAppSceneCostPurchaseEvaluateService> {
35
+    @Autowired
36
+    private IAppSceneCostPurchaseEvaluateService appSceneCostPurchaseEvaluateService;
37
+
38
+    /**
39
+     * 分页列表查询
40
+     *
41
+     * @param appSceneCostPurchaseEvaluate
42
+     * @param pageNo
43
+     * @param pageSize
44
+     * @param req
45
+     * @return
46
+     */
47
+    //@AutoLog(value = "app_scene_cost_purchase_evaluate-分页列表查询")
48
+    @ApiOperation(value = "app_scene_cost_purchase_evaluate-分页列表查询", notes = "app_scene_cost_purchase_evaluate-分页列表查询")
49
+    @GetMapping(value = "/list")
50
+    public Result<IPage<AppSceneCostPurchaseEvaluate>> queryPageList(AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate,
51
+                                                                     @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
52
+                                                                     @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
53
+                                                                     HttpServletRequest req) {
54
+        QueryWrapper<AppSceneCostPurchaseEvaluate> queryWrapper = QueryGenerator.initQueryWrapper(appSceneCostPurchaseEvaluate, req.getParameterMap());
55
+        Page<AppSceneCostPurchaseEvaluate> page = new Page<AppSceneCostPurchaseEvaluate>(pageNo, pageSize);
56
+        IPage<AppSceneCostPurchaseEvaluate> pageList = appSceneCostPurchaseEvaluateService.page(page, queryWrapper);
57
+        return Result.OK(pageList);
58
+    }
59
+
60
+    /**
61
+     * 添加
62
+     *
63
+     * @param appSceneCostPurchaseEvaluate
64
+     * @return
65
+     */
66
+    @AutoLog(value = "app_scene_cost_purchase_evaluate-添加")
67
+    @ApiOperation(value = "app_scene_cost_purchase_evaluate-添加", notes = "app_scene_cost_purchase_evaluate-添加")
68
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:add")
69
+    @PostMapping(value = "/add")
70
+    public Result<String> add(@RequestBody AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate) {
71
+        appSceneCostPurchaseEvaluateService.save(appSceneCostPurchaseEvaluate);
72
+        return Result.OK("添加成功!");
73
+    }
74
+
75
+    /**
76
+     * 编辑
77
+     *
78
+     * @param appSceneCostPurchaseEvaluate
79
+     * @return
80
+     */
81
+    @AutoLog(value = "app_scene_cost_purchase_evaluate-编辑")
82
+    @ApiOperation(value = "app_scene_cost_purchase_evaluate-编辑", notes = "app_scene_cost_purchase_evaluate-编辑")
83
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:edit")
84
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
85
+    public Result<String> edit(@RequestBody AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate) {
86
+        appSceneCostPurchaseEvaluateService.updateById(appSceneCostPurchaseEvaluate);
87
+        return Result.OK("编辑成功!");
88
+    }
89
+
90
+    /**
91
+     * 通过id删除
92
+     *
93
+     * @param id
94
+     * @return
95
+     */
96
+    @AutoLog(value = "app_scene_cost_purchase_evaluate-通过id删除")
97
+    @ApiOperation(value = "app_scene_cost_purchase_evaluate-通过id删除", notes = "app_scene_cost_purchase_evaluate-通过id删除")
98
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:delete")
99
+    @DeleteMapping(value = "/delete")
100
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
101
+        appSceneCostPurchaseEvaluateService.removeById(id);
102
+        return Result.OK("删除成功!");
103
+    }
104
+//
105
+//    /**
106
+//     * 批量删除
107
+//     *
108
+//     * @param ids
109
+//     * @return
110
+//     */
111
+//    @AutoLog(value = "app_scene_cost_purchase_evaluate-批量删除")
112
+//    @ApiOperation(value = "app_scene_cost_purchase_evaluate-批量删除", notes = "app_scene_cost_purchase_evaluate-批量删除")
113
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:deleteBatch")
114
+//    @DeleteMapping(value = "/deleteBatch")
115
+//    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
116
+//        this.appSceneCostPurchaseEvaluateService.removeByIds(Arrays.asList(ids.split(",")));
117
+//        return Result.OK("批量删除成功!");
118
+//    }
119
+//
120
+//    /**
121
+//     * 通过id查询
122
+//     *
123
+//     * @param id
124
+//     * @return
125
+//     */
126
+//    //@AutoLog(value = "app_scene_cost_purchase_evaluate-通过id查询")
127
+//    @ApiOperation(value = "app_scene_cost_purchase_evaluate-通过id查询", notes = "app_scene_cost_purchase_evaluate-通过id查询")
128
+//    @GetMapping(value = "/queryById")
129
+//    public Result<AppSceneCostPurchaseEvaluate> queryById(@RequestParam(name = "id", required = true) String id) {
130
+//        AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate = appSceneCostPurchaseEvaluateService.getById(id);
131
+//        if (appSceneCostPurchaseEvaluate == null) {
132
+//            return Result.error("未找到对应数据");
133
+//        }
134
+//        return Result.OK(appSceneCostPurchaseEvaluate);
135
+//    }
136
+//
137
+//    /**
138
+//     * 导出excel
139
+//     *
140
+//     * @param request
141
+//     * @param appSceneCostPurchaseEvaluate
142
+//     */
143
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:exportXls")
144
+//    @RequestMapping(value = "/exportXls")
145
+//    public ModelAndView exportXls(HttpServletRequest request, AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate) {
146
+//        return super.exportXls(request, appSceneCostPurchaseEvaluate, AppSceneCostPurchaseEvaluate.class, "app_scene_cost_purchase_evaluate");
147
+//    }
148
+//
149
+//    /**
150
+//     * 通过excel导入数据
151
+//     *
152
+//     * @param request
153
+//     * @param response
154
+//     * @return
155
+//     */
156
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:importExcel")
157
+//    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
158
+//    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
159
+//        return super.importExcel(request, response, AppSceneCostPurchaseEvaluate.class);
160
+//    }
161
+
162
+}

+ 159
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostPurchasePriceController.java View File

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.AppSceneCostPurchasePrice;
7
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostPurchasePriceService;
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_purchase_price
26
+ * @Author: jeecg-boot
27
+ * @Date: 2024-08-02
28
+ * @Version: V1.0
29
+ */
30
+@Api(tags = "cost-采购价")
31
+@RestController
32
+@RequestMapping("//purchasePrice")
33
+@Slf4j
34
+public class AppSceneCostPurchasePriceController extends JeecgController<AppSceneCostPurchasePrice, IAppSceneCostPurchasePriceService> {
35
+    @Autowired
36
+    private IAppSceneCostPurchasePriceService appSceneCostPurchasePriceService;
37
+
38
+    /**
39
+     * 分页列表查询
40
+     *
41
+     * @param appSceneCostPurchasePrice
42
+     * @param pageNo
43
+     * @param pageSize
44
+     * @param req
45
+     * @return
46
+     */
47
+    //@AutoLog(value = "app_scene_cost_purchase_price-分页列表查询")
48
+    @ApiOperation(value = "app_scene_cost_purchase_price-分页列表查询", notes = "app_scene_cost_purchase_price-分页列表查询")
49
+    @GetMapping(value = "/list")
50
+    public Result<IPage<AppSceneCostPurchasePrice>> queryPageList(AppSceneCostPurchasePrice appSceneCostPurchasePrice, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
51
+        QueryWrapper<AppSceneCostPurchasePrice> queryWrapper = QueryGenerator.initQueryWrapper(appSceneCostPurchasePrice, req.getParameterMap());
52
+        Page<AppSceneCostPurchasePrice> page = new Page<AppSceneCostPurchasePrice>(pageNo, pageSize);
53
+        IPage<AppSceneCostPurchasePrice> pageList = appSceneCostPurchasePriceService.page(page, queryWrapper);
54
+        return Result.OK(pageList);
55
+    }
56
+
57
+    /**
58
+     * 添加
59
+     *
60
+     * @param appSceneCostPurchasePrice
61
+     * @return
62
+     */
63
+    @AutoLog(value = "app_scene_cost_purchase_price-添加")
64
+    @ApiOperation(value = "app_scene_cost_purchase_price-添加", notes = "app_scene_cost_purchase_price-添加")
65
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_price:add")
66
+    @PostMapping(value = "/add")
67
+    public Result<String> add(@RequestBody AppSceneCostPurchasePrice appSceneCostPurchasePrice) {
68
+        appSceneCostPurchasePriceService.save(appSceneCostPurchasePrice);
69
+        return Result.OK("添加成功!");
70
+    }
71
+
72
+    /**
73
+     * 编辑
74
+     *
75
+     * @param appSceneCostPurchasePrice
76
+     * @return
77
+     */
78
+    @AutoLog(value = "app_scene_cost_purchase_price-编辑")
79
+    @ApiOperation(value = "app_scene_cost_purchase_price-编辑", notes = "app_scene_cost_purchase_price-编辑")
80
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_price:edit")
81
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
82
+    public Result<String> edit(@RequestBody AppSceneCostPurchasePrice appSceneCostPurchasePrice) {
83
+        appSceneCostPurchasePriceService.updateById(appSceneCostPurchasePrice);
84
+        return Result.OK("编辑成功!");
85
+    }
86
+
87
+    /**
88
+     * 通过id删除
89
+     *
90
+     * @param id
91
+     * @return
92
+     */
93
+    @AutoLog(value = "app_scene_cost_purchase_price-通过id删除")
94
+    @ApiOperation(value = "app_scene_cost_purchase_price-通过id删除", notes = "app_scene_cost_purchase_price-通过id删除")
95
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_price:delete")
96
+    @DeleteMapping(value = "/delete")
97
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
98
+        appSceneCostPurchasePriceService.removeById(id);
99
+        return Result.OK("删除成功!");
100
+    }
101
+
102
+    /**
103
+     * 批量删除
104
+     *
105
+     * @param ids
106
+     * @return
107
+     */
108
+    @AutoLog(value = "app_scene_cost_purchase_price-批量删除")
109
+    @ApiOperation(value = "app_scene_cost_purchase_price-批量删除", notes = "app_scene_cost_purchase_price-批量删除")
110
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_price:deleteBatch")
111
+    @DeleteMapping(value = "/deleteBatch")
112
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
113
+        this.appSceneCostPurchasePriceService.removeByIds(Arrays.asList(ids.split(",")));
114
+        return Result.OK("批量删除成功!");
115
+    }
116
+
117
+    /**
118
+     * 通过id查询
119
+     *
120
+     * @param id
121
+     * @return
122
+     */
123
+    //@AutoLog(value = "app_scene_cost_purchase_price-通过id查询")
124
+    @ApiOperation(value = "app_scene_cost_purchase_price-通过id查询", notes = "app_scene_cost_purchase_price-通过id查询")
125
+    @GetMapping(value = "/queryById")
126
+    public Result<AppSceneCostPurchasePrice> queryById(@RequestParam(name = "id", required = true) String id) {
127
+        AppSceneCostPurchasePrice appSceneCostPurchasePrice = appSceneCostPurchasePriceService.getById(id);
128
+        if (appSceneCostPurchasePrice == null) {
129
+            return Result.error("未找到对应数据");
130
+        }
131
+        return Result.OK(appSceneCostPurchasePrice);
132
+    }
133
+
134
+    /**
135
+     * 导出excel
136
+     *
137
+     * @param request
138
+     * @param appSceneCostPurchasePrice
139
+     */
140
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_price:exportXls")
141
+    @RequestMapping(value = "/exportXls")
142
+    public ModelAndView exportXls(HttpServletRequest request, AppSceneCostPurchasePrice appSceneCostPurchasePrice) {
143
+        return super.exportXls(request, appSceneCostPurchasePrice, AppSceneCostPurchasePrice.class, "app_scene_cost_purchase_price");
144
+    }
145
+
146
+    /**
147
+     * 通过excel导入数据
148
+     *
149
+     * @param request
150
+     * @param response
151
+     * @return
152
+     */
153
+    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_price:importExcel")
154
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
155
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
156
+        return super.importExcel(request, response, AppSceneCostPurchasePrice.class);
157
+    }
158
+
159
+}

+ 179
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostResultValueController.java View File

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
+}

+ 160
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostStandardDetailController.java View File

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.AppSceneCostStandardDetail;
7
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostStandardDetailService;
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.system.base.controller.JeecgController;
14
+import org.jeecg.common.system.query.QueryGenerator;
15
+import org.springframework.beans.factory.annotation.Autowired;
16
+import org.springframework.web.bind.annotation.GetMapping;
17
+import org.springframework.web.bind.annotation.RequestMapping;
18
+import org.springframework.web.bind.annotation.RequestParam;
19
+import org.springframework.web.bind.annotation.RestController;
20
+import org.springframework.web.servlet.ModelAndView;
21
+
22
+import javax.servlet.http.HttpServletRequest;
23
+
24
+/**
25
+ * @Description: app_scene_cost_standard_detail
26
+ * @Author: jeecg-boot
27
+ * @Date: 2024-07-31
28
+ * @Version: V1.0
29
+ */
30
+@Api(tags = "cost-标准成本单行查询")
31
+@RestController
32
+@RequestMapping("//costStandardDetail")
33
+@Slf4j
34
+public class AppSceneCostStandardDetailController extends JeecgController<AppSceneCostStandardDetail, IAppSceneCostStandardDetailService> {
35
+    @Autowired
36
+    private IAppSceneCostStandardDetailService appSceneCostStandardDetailService;
37
+
38
+    /**
39
+     * 分页列表查询
40
+     *
41
+     * @param appSceneCostStandardDetail
42
+     * @param pageNo
43
+     * @param pageSize
44
+     * @param req
45
+     * @return
46
+     */
47
+    //@AutoLog(value = "app_scene_cost_standard_detail-分页列表查询")
48
+    @ApiOperation(value = "app_scene_cost_standard_detail-分页列表查询", notes = "app_scene_cost_standard_detail-分页列表查询")
49
+    @GetMapping(value = "/list")
50
+    public Result<IPage<AppSceneCostStandardDetail>> queryPageList(AppSceneCostStandardDetail appSceneCostStandardDetail, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
51
+        QueryWrapper<AppSceneCostStandardDetail> queryWrapper = QueryGenerator.initQueryWrapper(appSceneCostStandardDetail, req.getParameterMap());
52
+        Page<AppSceneCostStandardDetail> page = new Page<AppSceneCostStandardDetail>(pageNo, pageSize);
53
+        IPage<AppSceneCostStandardDetail> pageList = appSceneCostStandardDetailService.page(page, queryWrapper);
54
+        return Result.OK(pageList);
55
+    }
56
+//
57
+//    /**
58
+//     * 添加
59
+//     *
60
+//     * @param appSceneCostStandardDetail
61
+//     * @return
62
+//     */
63
+//    @AutoLog(value = "app_scene_cost_standard_detail-添加")
64
+//    @ApiOperation(value = "app_scene_cost_standard_detail-添加", notes = "app_scene_cost_standard_detail-添加")
65
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_standard_detail:add")
66
+//    @PostMapping(value = "/add")
67
+//    public Result<String> add(@RequestBody AppSceneCostStandardDetail appSceneCostStandardDetail) {
68
+//        appSceneCostStandardDetailService.save(appSceneCostStandardDetail);
69
+//        return Result.OK("添加成功!");
70
+//    }
71
+
72
+//    /**
73
+//     * 编辑
74
+//     *
75
+//     * @param appSceneCostStandardDetail
76
+//     * @return
77
+//     */
78
+//    @AutoLog(value = "app_scene_cost_standard_detail-编辑")
79
+//    @ApiOperation(value = "app_scene_cost_standard_detail-编辑", notes = "app_scene_cost_standard_detail-编辑")
80
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_standard_detail:edit")
81
+//    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
82
+//    public Result<String> edit(@RequestBody AppSceneCostStandardDetail appSceneCostStandardDetail) {
83
+//        appSceneCostStandardDetailService.updateById(appSceneCostStandardDetail);
84
+//        return Result.OK("编辑成功!");
85
+//    }
86
+//
87
+//    /**
88
+//     * 通过id删除
89
+//     *
90
+//     * @param id
91
+//     * @return
92
+//     */
93
+//    @AutoLog(value = "app_scene_cost_standard_detail-通过id删除")
94
+//    @ApiOperation(value = "app_scene_cost_standard_detail-通过id删除", notes = "app_scene_cost_standard_detail-通过id删除")
95
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_standard_detail:delete")
96
+//    @DeleteMapping(value = "/delete")
97
+//    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
98
+//        appSceneCostStandardDetailService.removeById(id);
99
+//        return Result.OK("删除成功!");
100
+//    }
101
+//
102
+//    /**
103
+//     * 批量删除
104
+//     *
105
+//     * @param ids
106
+//     * @return
107
+//     */
108
+//    @AutoLog(value = "app_scene_cost_standard_detail-批量删除")
109
+//    @ApiOperation(value = "app_scene_cost_standard_detail-批量删除", notes = "app_scene_cost_standard_detail-批量删除")
110
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_standard_detail:deleteBatch")
111
+//    @DeleteMapping(value = "/deleteBatch")
112
+//    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
113
+//        this.appSceneCostStandardDetailService.removeByIds(Arrays.asList(ids.split(",")));
114
+//        return Result.OK("批量删除成功!");
115
+//    }
116
+
117
+//    /**
118
+//     * 通过id查询
119
+//     *
120
+//     * @param id
121
+//     * @return
122
+//     */
123
+//    //@AutoLog(value = "app_scene_cost_standard_detail-通过id查询")
124
+//    @ApiOperation(value = "app_scene_cost_standard_detail-通过id查询", notes = "app_scene_cost_standard_detail-通过id查询")
125
+//    @GetMapping(value = "/queryById")
126
+//    public Result<AppSceneCostStandardDetail> queryById(@RequestParam(name = "id", required = true) String id) {
127
+//        AppSceneCostStandardDetail appSceneCostStandardDetail = appSceneCostStandardDetailService.getById(id);
128
+//        if (appSceneCostStandardDetail == null) {
129
+//            return Result.error("未找到对应数据");
130
+//        }
131
+//        return Result.OK(appSceneCostStandardDetail);
132
+//    }
133
+
134
+    /**
135
+     * 导出excel
136
+     *
137
+     * @param request
138
+     * @param appSceneCostStandardDetail
139
+     */
140
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_standard_detail:exportXls")
141
+    @RequestMapping(value = "/exportXls")
142
+    @ApiOperation(value = "cost-单行查询导出", notes = "cost-单行查询导出")
143
+    public ModelAndView exportXls(HttpServletRequest request, AppSceneCostStandardDetail appSceneCostStandardDetail) {
144
+        return super.exportXls(request, appSceneCostStandardDetail, AppSceneCostStandardDetail.class, "app_scene_cost_standard_detail");
145
+    }
146
+
147
+//    /**
148
+//     * 通过excel导入数据
149
+//     *
150
+//     * @param request
151
+//     * @param response
152
+//     * @return
153
+//     */
154
+//    //@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_standard_detail:importExcel")
155
+//    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
156
+//    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
157
+//        return super.importExcel(request, response, AppSceneCostStandardDetail.class);
158
+//    }
159
+
160
+}

+ 157
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/AppSceneCostStandardVersionController.java View File

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

+ 31
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/controller/BomTreeController.java View File

1
+package com.zzsmart.qomo.kn.cost.manage.controller;
2
+
3
+import com.zzsmart.qomo.kn.cost.manage.service.BomTreeService;
4
+import com.zzsmart.qomo.kn.cost.manage.vo.BomTreeInfoVO;
5
+import io.swagger.annotations.Api;
6
+import io.swagger.annotations.ApiOperation;
7
+import lombok.extern.slf4j.Slf4j;
8
+import org.jeecg.common.api.vo.Result;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.web.bind.annotation.GetMapping;
11
+import org.springframework.web.bind.annotation.RequestMapping;
12
+import org.springframework.web.bind.annotation.RequestParam;
13
+import org.springframework.web.bind.annotation.RestController;
14
+
15
+import java.util.List;
16
+
17
+@Api(tags = "cost-结构树查询")
18
+@RestController
19
+@RequestMapping("//bomTree")
20
+@Slf4j
21
+public class BomTreeController {
22
+    @Autowired
23
+    BomTreeService bomTreeService;
24
+
25
+    @ApiOperation(value = "结构树查询", notes = "结构树查询")
26
+    @GetMapping(value = "/queryBomTree")
27
+    public Result<List<BomTreeInfoVO>> queryBomTree(@RequestParam(name = "materialNumber", required = false) String materialNumber, @RequestParam(name = "versionNumber", required = false) String versionNumber) {
28
+        List<BomTreeInfoVO> bomTreeInfoVOS = bomTreeService.getBomTreeByMaterialNumber(materialNumber, versionNumber);
29
+        return Result.OK(bomTreeInfoVOS);
30
+    }
31
+}

+ 106
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostCount.java View File

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.*;
10
+import lombok.experimental.Accessors;
11
+import org.jeecgframework.poi.excel.annotation.Excel;
12
+import org.springframework.format.annotation.DateTimeFormat;
13
+
14
+import java.io.Serializable;
15
+import java.util.Date;
16
+
17
+/**
18
+ * @Description: app_scene_cost_count
19
+ * @Author: jeecg-boot
20
+ * @Date: 2024-07-29
21
+ * @Version: V1.0
22
+ */
23
+@Data
24
+@TableName("app_scene_cost_count")
25
+@Builder
26
+@NoArgsConstructor
27
+@AllArgsConstructor
28
+@Accessors(chain = true)
29
+@EqualsAndHashCode(callSuper = false)
30
+@ApiModel(value = "app_scene_cost_count对象", description = "app_scene_cost_count")
31
+public class AppSceneCostCount 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 materialNo;
46
+    /**
47
+     * 图号
48
+     */
49
+    @Excel(name = "图号", width = 15)
50
+    @ApiModelProperty(value = "图号")
51
+    private String drawingNo;
52
+    /**
53
+     * stage
54
+     */
55
+    @Excel(name = "阶段", width = 15)
56
+    @ApiModelProperty(value = "stage")
57
+    private String stage;
58
+    /**
59
+     * 标准成本计算流程id
60
+     */
61
+    @Excel(name = "标准成本计算流程id", width = 15)
62
+    @ApiModelProperty(value = "标准成本计算流程id")
63
+    private Integer flowDefinitionId;
64
+    /**
65
+     * year
66
+     */
67
+    @Excel(name = "年份", width = 15)
68
+    @ApiModelProperty(value = "year")
69
+    private String year;
70
+    /**
71
+     * 状态
72
+     */
73
+    @Excel(name = "状态", width = 15)
74
+    @ApiModelProperty(value = "状态")
75
+    private Integer status;
76
+    /**
77
+     * 模型版本
78
+     */
79
+    @Excel(name = "标准成本版本", width = 15)
80
+    @ApiModelProperty(value = "标准成本版本")
81
+    private String costVersion;
82
+    /**
83
+     * 创建人
84
+     */
85
+    @ApiModelProperty(value = "创建人")
86
+    private Integer createBy;
87
+    /**
88
+     * 创建时间
89
+     */
90
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
91
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
92
+    @ApiModelProperty(value = "创建时间")
93
+    private Date createTime;
94
+    /**
95
+     * 更新人
96
+     */
97
+    @ApiModelProperty(value = "更新人")
98
+    private Integer updateBy;
99
+    /**
100
+     * 更新时间
101
+     */
102
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
103
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
104
+    @ApiModelProperty(value = "更新时间")
105
+    private Date updateTime;
106
+}

+ 114
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostHourRate.java View File

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.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+import org.jeecgframework.poi.excel.annotation.Excel;
13
+import org.springframework.format.annotation.DateTimeFormat;
14
+
15
+import java.io.Serializable;
16
+import java.math.BigDecimal;
17
+import java.util.Date;
18
+
19
+/**
20
+ * @Description: app_scene_cost_hour_rate
21
+ * @Author: jeecg-boot
22
+ * @Date: 2024-08-02
23
+ * @Version: V1.0
24
+ */
25
+@Data
26
+@TableName("app_scene_cost_hour_rate")
27
+@Accessors(chain = true)
28
+@EqualsAndHashCode(callSuper = false)
29
+@ApiModel(value = "app_scene_cost_hour_rate对象", description = "app_scene_cost_hour_rate")
30
+public class AppSceneCostHourRate implements Serializable {
31
+    private static final long serialVersionUID = 1L;
32
+    /**
33
+     * 主键
34
+     */
35
+    @TableId(type = IdType.ASSIGN_ID)
36
+    @ApiModelProperty(value = "主键")
37
+    private String id;
38
+    /**
39
+     * 年度
40
+     */
41
+    @Excel(name = "年度", width = 15)
42
+    @ApiModelProperty(value = "年度")
43
+    private String year;
44
+    /**
45
+     * 成本中心代码
46
+     */
47
+    @Excel(name = "成本中心代码", width = 15)
48
+    @ApiModelProperty(value = "成本中心代码")
49
+    private String costCenterCode;
50
+    /**
51
+     * 工厂代码
52
+     */
53
+    @Excel(name = "工厂代码", width = 15)
54
+    @ApiModelProperty(value = "工厂代码")
55
+    private String factory;
56
+    /**
57
+     * 人工小时费率
58
+     */
59
+    @Excel(name = "人工小时费率", width = 15)
60
+    @ApiModelProperty(value = "人工小时费率")
61
+    private BigDecimal laborHourRate;
62
+    /**
63
+     * 设备小时费率
64
+     */
65
+    @Excel(name = "设备小时费率", width = 15)
66
+    @ApiModelProperty(value = "设备小时费率")
67
+    private BigDecimal equipHourRate;
68
+    /**
69
+     * 燃动小时费率
70
+     */
71
+    @Excel(name = "燃动小时费率", width = 15)
72
+    @ApiModelProperty(value = "燃动小时费率")
73
+    private BigDecimal fuelHourRate;
74
+    /**
75
+     * 辅料小时费率
76
+     */
77
+    @Excel(name = "辅料小时费率", width = 15)
78
+    @ApiModelProperty(value = "辅料小时费率")
79
+    private BigDecimal auxiliaryHourRate;
80
+    /**
81
+     * 其他小时费率
82
+     */
83
+    @Excel(name = "其他小时费率", width = 15)
84
+    @ApiModelProperty(value = "其他小时费率")
85
+    private BigDecimal otherHourRate;
86
+    /**
87
+     * 生效日期
88
+     */
89
+    @Excel(name = "生效日期", width = 15, format = "yyyy-MM-dd")
90
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
91
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
92
+    @ApiModelProperty(value = "生效日期")
93
+    private Date effectiveDate;
94
+    /**
95
+     * 失效日期
96
+     */
97
+    @Excel(name = "失效日期", width = 15, format = "yyyy-MM-dd")
98
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
99
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
100
+    @ApiModelProperty(value = "失效日期")
101
+    private Date expirationDate;
102
+    /**
103
+     * 维护人员
104
+     */
105
+    @Excel(name = "维护人员", width = 15)
106
+    @ApiModelProperty(value = "维护人员")
107
+    private String guardian;
108
+    /**
109
+     * 维护时间
110
+     */
111
+    @Excel(name = "维护时间", width = 15)
112
+    @ApiModelProperty(value = "维护时间")
113
+    private String maintenanceTime;
114
+}

+ 261
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostMaterialBom.java View File

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.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+import org.jeecgframework.poi.excel.annotation.Excel;
13
+import org.springframework.format.annotation.DateTimeFormat;
14
+
15
+import java.io.Serializable;
16
+import java.math.BigDecimal;
17
+import java.util.Date;
18
+
19
+/**
20
+ * @Description: app_scene_cost_material_bom
21
+ * @Author: jeecg-boot
22
+ * @Date: 2024-08-02
23
+ * @Version: V1.0
24
+ */
25
+@Data
26
+@TableName("app_scene_cost_material_bom")
27
+@Accessors(chain = true)
28
+@EqualsAndHashCode(callSuper = false)
29
+@ApiModel(value = "app_scene_cost_material_bom对象", description = "app_scene_cost_material_bom")
30
+public class AppSceneCostMaterialBom implements Serializable {
31
+    private static final long serialVersionUID = 1L;
32
+
33
+    /**
34
+     * id
35
+     */
36
+    @TableId(type = IdType.ASSIGN_ID)
37
+    @ApiModelProperty(value = "id")
38
+    private String id;
39
+    /**
40
+     * 物料编码
41
+     */
42
+    @Excel(name = "物料编码", width = 15)
43
+    @ApiModelProperty(value = "物料编码")
44
+    private String materialCode;
45
+    /**
46
+     * 物料名称
47
+     */
48
+    @Excel(name = "物料名称", width = 15)
49
+    @ApiModelProperty(value = "物料名称")
50
+    private String materialName;
51
+    /**
52
+     * 父级物料编码
53
+     */
54
+    @Excel(name = "父级物料编码", width = 15)
55
+    @ApiModelProperty(value = "父级物料编码")
56
+    private String parentMaterialCode;
57
+    /**
58
+     * 级别
59
+     */
60
+    @Excel(name = "级别", width = 15)
61
+    @ApiModelProperty(value = "级别")
62
+    private String level;
63
+    /**
64
+     * 排序
65
+     */
66
+    @Excel(name = "排序", width = 15)
67
+    @ApiModelProperty(value = "排序")
68
+    private Integer sort;
69
+    /**
70
+     * 计量单位
71
+     */
72
+    @Excel(name = "计量单位", width = 15)
73
+    @ApiModelProperty(value = "计量单位")
74
+    private String unit;
75
+    /**
76
+     * 数量
77
+     */
78
+    @Excel(name = "数量", width = 15)
79
+    @ApiModelProperty(value = "数量")
80
+    private Integer number;
81
+    /**
82
+     * 人工工时(分钟)
83
+     */
84
+    @Excel(name = "人工工时(分钟)", width = 15)
85
+    @ApiModelProperty(value = "人工工时(分钟)")
86
+    private BigDecimal laborHours;
87
+    /**
88
+     * 设备工时
89
+     */
90
+    @Excel(name = "设备工时", width = 15)
91
+    @ApiModelProperty(value = "设备工时")
92
+    private BigDecimal deviceHours;
93
+    /**
94
+     * 借用物料编码
95
+     */
96
+    @Excel(name = "借用物料编码", width = 15)
97
+    @ApiModelProperty(value = "借用物料编码")
98
+    private String borrowMaterialCode;
99
+    /**
100
+     * 参考物料编码
101
+     */
102
+    @Excel(name = "参考物料编码", width = 15)
103
+    @ApiModelProperty(value = "参考物料编码")
104
+    private String referMaterialCode;
105
+    /**
106
+     * 采购类型
107
+     */
108
+    @Excel(name = "采购类型", width = 15)
109
+    @ApiModelProperty(value = "采购类型")
110
+    private String purchaseType;
111
+    /**
112
+     * 特殊采购类型
113
+     */
114
+    @Excel(name = "特殊采购类型", width = 15)
115
+    @ApiModelProperty(value = "特殊采购类型")
116
+    private String specialPurchaseType;
117
+    /**
118
+     * 说明
119
+     */
120
+    @Excel(name = "说明", width = 15)
121
+    @ApiModelProperty(value = "说明")
122
+    private String explanation;
123
+    /**
124
+     * 单位数量
125
+     */
126
+    @Excel(name = "单位数量", width = 15)
127
+    @ApiModelProperty(value = "单位数量")
128
+    private BigDecimal quantity;
129
+    /**
130
+     * 重量(g)
131
+     */
132
+    @Excel(name = "重量(g)", width = 15)
133
+    @ApiModelProperty(value = "重量(g)")
134
+    private String weight;
135
+    /**
136
+     * 材料/牌号
137
+     */
138
+    @Excel(name = "材料/牌号", width = 15)
139
+    @ApiModelProperty(value = "材料/牌号")
140
+    private String materialAndBrand;
141
+    /**
142
+     * 表面处理,材料
143
+     */
144
+    @Excel(name = "表面处理,材料", width = 15)
145
+    @ApiModelProperty(value = "表面处理,材料")
146
+    private String surfaceMaterial;
147
+    /**
148
+     * 厚度(mm)
149
+     */
150
+    @Excel(name = "厚度(mm)", width = 15)
151
+    @ApiModelProperty(value = "厚度(mm)")
152
+    private String surfaceThickness;
153
+    /**
154
+     * 表面积(mm²)
155
+     */
156
+    @Excel(name = "表面积(mm²)", width = 15)
157
+    @ApiModelProperty(value = "表面积(mm²)")
158
+    private String surfaceArea;
159
+    /**
160
+     * 长(mm)
161
+     */
162
+    @Excel(name = "长(mm)", width = 15)
163
+    @ApiModelProperty(value = "长(mm)")
164
+    private String length;
165
+    /**
166
+     * 宽(mm)
167
+     */
168
+    @Excel(name = "宽(mm)", width = 15)
169
+    @ApiModelProperty(value = "宽(mm)")
170
+    private String width;
171
+    /**
172
+     * 高(mm)
173
+     */
174
+    @Excel(name = "高(mm)", width = 15)
175
+    @ApiModelProperty(value = "高(mm)")
176
+    private String height;
177
+    /**
178
+     * 图示/图档/文档 文件ID
179
+     */
180
+    @Excel(name = "图示/图档/文档 文件ID", width = 15)
181
+    @ApiModelProperty(value = "图示/图档/文档 文件ID")
182
+    private Integer figureFileId;
183
+    /**
184
+     * 是否新摸具(0否 1是)
185
+     */
186
+    @Excel(name = "是否新摸具(0否 1是)", width = 15)
187
+    @ApiModelProperty(value = "是否新摸具(0否 1是)")
188
+    private Integer newTooling;
189
+    /**
190
+     * 成型方式(枚举)
191
+     */
192
+    @Excel(name = "成型方式(枚举)", width = 15)
193
+    @ApiModelProperty(value = "成型方式(枚举)")
194
+    private String shapingMethod;
195
+    /**
196
+     * 作业内容
197
+     */
198
+    @Excel(name = "作业内容", width = 15)
199
+    @ApiModelProperty(value = "作业内容")
200
+    private String workContent;
201
+    /**
202
+     * 加工地点
203
+     */
204
+    @Excel(name = "加工地点", width = 15)
205
+    @ApiModelProperty(value = "加工地点")
206
+    private String processLocation;
207
+    /**
208
+     * 成本中心
209
+     */
210
+    @Excel(name = "成本中心", width = 15)
211
+    @ApiModelProperty(value = "成本中心")
212
+    private String costCenter;
213
+    /**
214
+     * 单价(未税)
215
+     */
216
+    @Excel(name = "单价(未税)", width = 15)
217
+    @ApiModelProperty(value = "单价(未税)")
218
+    private BigDecimal unitPrice;
219
+    /**
220
+     * 总价(未税)
221
+     */
222
+    @Excel(name = "总价(未税)", width = 15)
223
+    @ApiModelProperty(value = "总价(未税)")
224
+    private BigDecimal totalPrice;
225
+    /**
226
+     * 摸具费(未税)
227
+     */
228
+    @Excel(name = "摸具费(未税)", width = 15)
229
+    @ApiModelProperty(value = "摸具费(未税)")
230
+    private BigDecimal mouldPrice;
231
+    /**
232
+     * 创建人
233
+     */
234
+    @ApiModelProperty(value = "创建人")
235
+    private String createBy;
236
+    /**
237
+     * 创建时间
238
+     */
239
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
240
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
241
+    @ApiModelProperty(value = "创建时间")
242
+    private Date createTime;
243
+    /**
244
+     * 修改人
245
+     */
246
+    @ApiModelProperty(value = "修改人")
247
+    private String updateBy;
248
+    /**
249
+     * 修改时间
250
+     */
251
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
252
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
253
+    @ApiModelProperty(value = "修改时间")
254
+    private Date updateTime;
255
+    /**
256
+     * 备注(特殊技术信息)
257
+     */
258
+    @Excel(name = "备注(特殊技术信息)", width = 15)
259
+    @ApiModelProperty(value = "备注(特殊技术信息)")
260
+    private String remark;
261
+}

+ 129
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostMaterialProcessHours.java View File

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.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+import org.jeecgframework.poi.excel.annotation.Excel;
13
+import org.springframework.format.annotation.DateTimeFormat;
14
+
15
+import java.io.Serializable;
16
+import java.math.BigDecimal;
17
+import java.util.Date;
18
+
19
+/**
20
+ * @Description: app_scene_cost_material_process_hours
21
+ * @Author: jeecg-boot
22
+ * @Date: 2024-08-02
23
+ * @Version: V1.0
24
+ */
25
+@Data
26
+@TableName("app_scene_cost_material_process_hours")
27
+@Accessors(chain = true)
28
+@EqualsAndHashCode(callSuper = false)
29
+@ApiModel(value = "app_scene_cost_material_process_hours对象", description = "app_scene_cost_material_process_hours")
30
+public class AppSceneCostMaterialProcessHours implements Serializable {
31
+    private static final long serialVersionUID = 1L;
32
+
33
+    /**
34
+     * 主键
35
+     */
36
+    @TableId(type = IdType.ASSIGN_ID)
37
+    @ApiModelProperty(value = "主键")
38
+    private String id;
39
+    /**
40
+     * 物料编码
41
+     */
42
+    @Excel(name = "物料编码", width = 15)
43
+    @ApiModelProperty(value = "物料编码")
44
+    private String materialCode;
45
+    /**
46
+     * 物料名称
47
+     */
48
+    @Excel(name = "物料名称", width = 15)
49
+    @ApiModelProperty(value = "物料名称")
50
+    private String materialName;
51
+    /**
52
+     * 层级
53
+     */
54
+    @Excel(name = "层级", width = 15)
55
+    @ApiModelProperty(value = "层级")
56
+    private String level;
57
+    /**
58
+     * 数量
59
+     */
60
+    @Excel(name = "数量", width = 15)
61
+    @ApiModelProperty(value = "数量")
62
+    private BigDecimal quantity;
63
+    /**
64
+     * 采购类型
65
+     */
66
+    @Excel(name = "采购类型", width = 15)
67
+    @ApiModelProperty(value = "采购类型")
68
+    private String purchaseType;
69
+    /**
70
+     * 工序
71
+     */
72
+    @Excel(name = "工序", width = 15)
73
+    @ApiModelProperty(value = "工序")
74
+    private String workProcess;
75
+    /**
76
+     * 描述
77
+     */
78
+    @Excel(name = "描述", width = 15)
79
+    @ApiModelProperty(value = "描述")
80
+    private String described;
81
+    /**
82
+     * 人工工时
83
+     */
84
+    @Excel(name = "人工工时", width = 15)
85
+    @ApiModelProperty(value = "人工工时")
86
+    private BigDecimal laborHours;
87
+    /**
88
+     * 设备工时
89
+     */
90
+    @Excel(name = "设备工时", width = 15)
91
+    @ApiModelProperty(value = "设备工时")
92
+    private BigDecimal deviceHours;
93
+    /**
94
+     * 工作中心
95
+     */
96
+    @Excel(name = "工作中心", width = 15)
97
+    @ApiModelProperty(value = "工作中心")
98
+    private String workCenter;
99
+    /**
100
+     * 创建人
101
+     */
102
+    @ApiModelProperty(value = "创建人")
103
+    private String createBy;
104
+    /**
105
+     * 创建时间
106
+     */
107
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
108
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
109
+    @ApiModelProperty(value = "创建时间")
110
+    private Date createTime;
111
+    /**
112
+     * 修改人
113
+     */
114
+    @ApiModelProperty(value = "修改人")
115
+    private String updateBy;
116
+    /**
117
+     * 修改时间
118
+     */
119
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
120
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
121
+    @ApiModelProperty(value = "修改时间")
122
+    private Date updateTime;
123
+    /**
124
+     * 备注
125
+     */
126
+    @Excel(name = "备注", width = 15)
127
+    @ApiModelProperty(value = "备注")
128
+    private String remark;
129
+}

+ 75
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostModel.java View File

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
+}

+ 61
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostPartMissingInfo.java View File

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.Builder;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+import org.jeecgframework.poi.excel.annotation.Excel;
13
+
14
+import java.io.Serializable;
15
+
16
+/**
17
+ * @Description: app_scene_cost_part_missing_info
18
+ * @Author: jeecg-boot
19
+ * @Date: 2024-08-02
20
+ * @Version: V1.0
21
+ */
22
+@Data
23
+@Builder
24
+@TableName("app_scene_cost_part_missing_info")
25
+@Accessors(chain = true)
26
+@EqualsAndHashCode(callSuper = false)
27
+@ApiModel(value = "app_scene_cost_part_missing_info对象", description = "app_scene_cost_part_missing_info")
28
+public class AppSceneCostPartMissingInfo implements Serializable {
29
+    private static final long serialVersionUID = 1L;
30
+
31
+    /**
32
+     * id
33
+     */
34
+    @TableId(type = IdType.ASSIGN_ID)
35
+    @ApiModelProperty(value = "id")
36
+    private String id;
37
+    /**
38
+     * 物料号
39
+     */
40
+    @Excel(name = "物料号", width = 15)
41
+    @ApiModelProperty(value = "物料号")
42
+    private String materialNumber;
43
+    /**
44
+     * 版本号
45
+     */
46
+    @Excel(name = "版本号", width = 15)
47
+    @ApiModelProperty(value = "版本号")
48
+    private String versionNumber;
49
+    /**
50
+     * 缺失信息
51
+     */
52
+    @Excel(name = "缺失信息", width = 15)
53
+    @ApiModelProperty(value = "缺失信息")
54
+    private String missingInfo;
55
+    /**
56
+     * 标准成本表主键id
57
+     */
58
+    @Excel(name = "标准成本表主键id", width = 15)
59
+    @ApiModelProperty(value = "标准成本表主键id")
60
+    private String costStandardId;
61
+}

+ 86
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostPurchaseEvaluate.java View File

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.IdType;
9
+import com.baomidou.mybatisplus.annotation.TableId;
10
+import com.baomidou.mybatisplus.annotation.TableName;
11
+import com.baomidou.mybatisplus.annotation.TableLogic;
12
+import lombok.Builder;
13
+import lombok.Data;
14
+import com.fasterxml.jackson.annotation.JsonFormat;
15
+import org.springframework.format.annotation.DateTimeFormat;
16
+import org.jeecgframework.poi.excel.annotation.Excel;
17
+import org.jeecg.common.aspect.annotation.Dict;
18
+import io.swagger.annotations.ApiModel;
19
+import io.swagger.annotations.ApiModelProperty;
20
+import lombok.EqualsAndHashCode;
21
+import lombok.experimental.Accessors;
22
+
23
+/**
24
+ * @Description: app_scene_cost_purchase_evaluate
25
+ * @Author: jeecg-boot
26
+ * @Date: 2024-08-02
27
+ * @Version: V1.0
28
+ */
29
+@Data
30
+@Builder
31
+@TableName("app_scene_cost_purchase_evaluate")
32
+@Accessors(chain = true)
33
+@EqualsAndHashCode(callSuper = false)
34
+@ApiModel(value = "app_scene_cost_purchase_evaluate对象", description = "app_scene_cost_purchase_evaluate")
35
+public class AppSceneCostPurchaseEvaluate implements Serializable {
36
+    private static final long serialVersionUID = 1L;
37
+
38
+    /**
39
+     * 主键
40
+     */
41
+    @TableId(type = IdType.ASSIGN_ID)
42
+    @ApiModelProperty(value = "主键")
43
+    private Integer id;
44
+    /**
45
+     * 合同编号
46
+     */
47
+    @Excel(name = "合同编号", width = 15)
48
+    @ApiModelProperty(value = "合同编号")
49
+    private String contractNo;
50
+    /**
51
+     * 估价
52
+     */
53
+    @Excel(name = "估价", width = 15)
54
+    @ApiModelProperty(value = "估价")
55
+    private BigDecimal evaluate;
56
+    /**
57
+     * 合同名称
58
+     */
59
+    @Excel(name = "合同名称", width = 15)
60
+    @ApiModelProperty(value = "合同名称")
61
+    private String contractName;
62
+    /**
63
+     * 创建时间
64
+     */
65
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
66
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
67
+    @ApiModelProperty(value = "创建时间")
68
+    private Date createTime;
69
+    /**
70
+     * 创建人
71
+     */
72
+    @ApiModelProperty(value = "创建人")
73
+    private Integer createBy;
74
+    /**
75
+     * 更新时间
76
+     */
77
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
78
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
79
+    @ApiModelProperty(value = "更新时间")
80
+    private Date updateTime;
81
+    /**
82
+     * 更新人
83
+     */
84
+    @ApiModelProperty(value = "更新人")
85
+    private Integer updateBy;
86
+}

+ 173
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostPurchasePrice.java View File

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.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+import org.jeecgframework.poi.excel.annotation.Excel;
13
+import org.springframework.format.annotation.DateTimeFormat;
14
+
15
+import java.io.Serializable;
16
+import java.math.BigDecimal;
17
+import java.util.Date;
18
+
19
+/**
20
+ * @Description: app_scene_cost_purchase_price
21
+ * @Author: jeecg-boot
22
+ * @Date: 2024-08-02
23
+ * @Version: V1.0
24
+ */
25
+@Data
26
+@TableName("app_scene_cost_purchase_price")
27
+@Accessors(chain = true)
28
+@EqualsAndHashCode(callSuper = false)
29
+@ApiModel(value = "app_scene_cost_purchase_price对象", description = "app_scene_cost_purchase_price")
30
+public class AppSceneCostPurchasePrice implements Serializable {
31
+    private static final long serialVersionUID = 1L;
32
+
33
+    /**
34
+     * 主键
35
+     */
36
+    @TableId(type = IdType.ASSIGN_ID)
37
+    @ApiModelProperty(value = "主键")
38
+    private String id;
39
+    /**
40
+     * 物料编码
41
+     */
42
+    @Excel(name = "物料编码", width = 15)
43
+    @ApiModelProperty(value = "物料编码")
44
+    private String materialCode;
45
+    /**
46
+     * 物料名称
47
+     */
48
+    @Excel(name = "物料名称", width = 15)
49
+    @ApiModelProperty(value = "物料名称")
50
+    private String materialName;
51
+    /**
52
+     * 规格型号
53
+     */
54
+    @Excel(name = "规格型号", width = 15)
55
+    @ApiModelProperty(value = "规格型号")
56
+    private String specification;
57
+    /**
58
+     * 采购类型
59
+     */
60
+    @Excel(name = "采购类型", width = 15)
61
+    @ApiModelProperty(value = "采购类型")
62
+    private String purchaseType;
63
+    /**
64
+     * 供应商代码
65
+     */
66
+    @Excel(name = "供应商代码", width = 15)
67
+    @ApiModelProperty(value = "供应商代码")
68
+    private String supplierCode;
69
+    /**
70
+     * 供应商名称
71
+     */
72
+    @Excel(name = "供应商名称", width = 15)
73
+    @ApiModelProperty(value = "供应商名称")
74
+    private String supplierName;
75
+    /**
76
+     * 采购价时间
77
+     */
78
+    @Excel(name = "采购价时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
79
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
80
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
81
+    @ApiModelProperty(value = "采购价时间")
82
+    private Date purchasePriceTime;
83
+    /**
84
+     * 采购价合计
85
+     */
86
+    @Excel(name = "采购价合计", width = 15)
87
+    @ApiModelProperty(value = "采购价合计")
88
+    private BigDecimal purchasePriceSum;
89
+    /**
90
+     * 最低采购单价
91
+     */
92
+    @Excel(name = "最低采购单价", width = 15)
93
+    @ApiModelProperty(value = "最低采购单价")
94
+    private BigDecimal minPurchasePrice;
95
+    /**
96
+     * 最新采购单价
97
+     */
98
+    @Excel(name = "最新采购单价", width = 15)
99
+    @ApiModelProperty(value = "最新采购单价")
100
+    private BigDecimal lastPurchasePrice;
101
+    /**
102
+     * 平均采购价
103
+     */
104
+    @Excel(name = "平均采购价", width = 15)
105
+    @ApiModelProperty(value = "平均采购价")
106
+    private BigDecimal purchasePriceAvg;
107
+    /**
108
+     * 直接材料费
109
+     */
110
+    @Excel(name = "直接材料费", width = 15)
111
+    @ApiModelProperty(value = "直接材料费")
112
+    private BigDecimal directMaterialCost;
113
+    /**
114
+     * 工艺加工费用
115
+     */
116
+    @Excel(name = "工艺加工费用", width = 15)
117
+    @ApiModelProperty(value = "工艺加工费用")
118
+    private BigDecimal processCost;
119
+    /**
120
+     * 运输费用
121
+     */
122
+    @Excel(name = "运输费用", width = 15)
123
+    @ApiModelProperty(value = "运输费用")
124
+    private BigDecimal transportCost;
125
+    /**
126
+     * 模具费用
127
+     */
128
+    @Excel(name = "模具费用", width = 15)
129
+    @ApiModelProperty(value = "模具费用")
130
+    private BigDecimal mouldCost;
131
+    /**
132
+     * 其他费用
133
+     */
134
+    @Excel(name = "其他费用", width = 15)
135
+    @ApiModelProperty(value = "其他费用")
136
+    private BigDecimal ortherCost;
137
+    /**
138
+     * 税率
139
+     */
140
+    @Excel(name = "税率", width = 15)
141
+    @ApiModelProperty(value = "税率")
142
+    private BigDecimal taxTate;
143
+    /**
144
+     * 创建人
145
+     */
146
+    @ApiModelProperty(value = "创建人")
147
+    private String createBy;
148
+    /**
149
+     * 创建时间
150
+     */
151
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
152
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
153
+    @ApiModelProperty(value = "创建时间")
154
+    private Date createTime;
155
+    /**
156
+     * 修改人
157
+     */
158
+    @ApiModelProperty(value = "修改人")
159
+    private String updateBy;
160
+    /**
161
+     * 修改时间
162
+     */
163
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
164
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
165
+    @ApiModelProperty(value = "修改时间")
166
+    private Date updateTime;
167
+    /**
168
+     * 备注
169
+     */
170
+    @Excel(name = "备注", width = 15)
171
+    @ApiModelProperty(value = "备注")
172
+    private String remark;
173
+}

+ 137
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostResultValue.java View File

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.math.BigDecimal;
18
+import java.util.Date;
19
+
20
+/**
21
+ * @Description: app_scene_cost_result_value
22
+ * @Author: jeecg-boot
23
+ * @Date: 2024-07-25
24
+ * @Version: V1.0
25
+ */
26
+@Data
27
+@Builder
28
+@TableName("app_scene_cost_result_value")
29
+@Accessors(chain = true)
30
+@EqualsAndHashCode(callSuper = false)
31
+@ApiModel(value = "app_scene_cost_result_value对象", description = "app_scene_cost_result_value")
32
+public class AppSceneCostResultValue implements Serializable {
33
+    private static final long serialVersionUID = 1L;
34
+
35
+    /**
36
+     * 主键
37
+     */
38
+    @TableId(type = IdType.AUTO)
39
+    @ApiModelProperty(value = "主键")
40
+    private Integer id;
41
+    /**
42
+     * 所属最上级物料号
43
+     */
44
+    @Excel(name = "所属最上级物料号", width = 15)
45
+    @ApiModelProperty(value = "所属最上级物料号")
46
+    private String belongTopMaterialNo;
47
+    /**
48
+     * 物料编号
49
+     */
50
+    @Excel(name = "物料编号", width = 15)
51
+    @ApiModelProperty(value = "物料编号")
52
+    private String marterialNo;
53
+    /**
54
+     * 父类物料编号
55
+     */
56
+    @Excel(name = "父类物料编号", width = 15)
57
+    @ApiModelProperty(value = "父类物料编号")
58
+    private String parentMarterialNo;
59
+    /**
60
+     * 数量
61
+     */
62
+    @Excel(name = "数量", width = 15)
63
+    @ApiModelProperty(value = "数量")
64
+    private Integer num;
65
+    /**
66
+     * 单位
67
+     */
68
+    @Excel(name = "单位", width = 15)
69
+    @ApiModelProperty(value = "单位")
70
+    private String unit;
71
+    /**
72
+     * 任务类型
73
+     */
74
+    @Excel(name = "任务类型", width = 15)
75
+    @ApiModelProperty(value = "任务类型")
76
+    private String taskType;
77
+    /**
78
+     * 任务代码
79
+     */
80
+    @Excel(name = "任务代码", width = 15)
81
+    @ApiModelProperty(value = "任务代码")
82
+    private String taskCode;
83
+    /**
84
+     * 流程id
85
+     */
86
+    @Excel(name = "流程id", width = 15)
87
+    @ApiModelProperty(value = "流程id")
88
+    private String flowInstanceId;
89
+    /**
90
+     * 本阶成本
91
+     */
92
+    @Excel(name = "本阶成本", width = 15)
93
+    @ApiModelProperty(value = "本阶成本")
94
+    private String countValue;
95
+    /**
96
+     * 创建时间
97
+     */
98
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
99
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
100
+    @ApiModelProperty(value = "创建时间")
101
+    private Date createTime;
102
+    /**
103
+     * 创建人
104
+     */
105
+    @ApiModelProperty(value = "创建人")
106
+    private Integer createBy;
107
+    /**
108
+     * 总计成本
109
+     */
110
+    @Excel(name = "总计成本", width = 15)
111
+    @ApiModelProperty(value = "总计成本")
112
+    private String totalValue;
113
+    /**
114
+     * 成本类别
115
+     */
116
+    @Excel(name = "成本类别", width = 15)
117
+    @ApiModelProperty(value = "成本类别")
118
+    private String costType;
119
+    /**
120
+     * 成本明细
121
+     */
122
+    @Excel(name = "成本明细", width = 15)
123
+    @ApiModelProperty(value = "成本明细")
124
+    private String costDetail;
125
+    /**
126
+     * 单价或费率
127
+     */
128
+    @Excel(name = "单价或费率", width = 15)
129
+    @ApiModelProperty(value = "单价或费率")
130
+    private BigDecimal priceOrRate;
131
+    /**
132
+     * 工时
133
+     */
134
+    @Excel(name = "工时", width = 15)
135
+    @ApiModelProperty(value = "工时")
136
+    private BigDecimal hour;
137
+}

+ 159
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostStandardDetail.java View File

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.math.BigDecimal;
18
+import java.util.Date;
19
+
20
+/**
21
+ * @Description: app_scene_cost_standard_detail
22
+ * @Author: jeecg-boot
23
+ * @Date: 2024-07-31
24
+ * @Version: V1.0
25
+ */
26
+@Data
27
+@Builder
28
+@TableName("app_scene_cost_standard_detail")
29
+@Accessors(chain = true)
30
+@EqualsAndHashCode(callSuper = false)
31
+@ApiModel(value = "app_scene_cost_standard_detail对象", description = "app_scene_cost_standard_detail")
32
+public class AppSceneCostStandardDetail 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 figureNumber;
43
+    /**物料号,关联kn_new_sap_mara表matnr字段*/
44
+    @Excel(name = "物料号,关联kn_new_sap_mara表matnr字段", width = 15)
45
+    @ApiModelProperty(value = "物料号,关联kn_new_sap_mara表matnr字段")
46
+    private String materialNumber;
47
+    /**物料名称*/
48
+    @Excel(name = "物料名称", width = 15)
49
+    @ApiModelProperty(value = "物料名称")
50
+    private String materialName;
51
+    /**父类物料号*/
52
+    @Excel(name = "父类物料号", width = 15)
53
+    @ApiModelProperty(value = "父类物料号")
54
+    private String parentMaterialNumber;
55
+    /**版本号*/
56
+    @Excel(name = "版本号", width = 15)
57
+    @ApiModelProperty(value = "版本号")
58
+    private String versionNumber;
59
+    /**层级*/
60
+    @Excel(name = "层级", width = 15)
61
+    @ApiModelProperty(value = "层级")
62
+    private Integer level;
63
+    /**序号*/
64
+    @Excel(name = "序号", width = 15)
65
+    @ApiModelProperty(value = "序号")
66
+    private Integer sort;
67
+    /**用量*/
68
+    @Excel(name = "用量", width = 15)
69
+    @ApiModelProperty(value = "用量")
70
+    private Double dosage;
71
+    /**单位*/
72
+    @Excel(name = "单位", width = 15)
73
+    @ApiModelProperty(value = "单位")
74
+    private String unit;
75
+    /**本阶材料费*/
76
+    @Excel(name = "本阶材料费", width = 15)
77
+    @ApiModelProperty(value = "本阶材料费")
78
+    private BigDecimal materialCost;
79
+    /**本阶人工费*/
80
+    @Excel(name = "本阶人工陈本", width = 15)
81
+    @ApiModelProperty(value = "本阶人工成本")
82
+    private BigDecimal laborCost;
83
+    /**本阶辅料费*/
84
+    @Excel(name = "本阶辅料费", width = 15)
85
+    @ApiModelProperty(value = "本阶辅料费")
86
+    private BigDecimal supplyMaterialCost;
87
+    /**本阶机器折旧费*/
88
+    @Excel(name = "本阶机器折旧费", width = 15)
89
+    @ApiModelProperty(value = "本阶机器折旧费")
90
+    private BigDecimal equipmentCost;
91
+    /**本阶水电费(燃动费)*/
92
+    @Excel(name = "本阶水电费(燃动费)", width = 15)
93
+    @ApiModelProperty(value = "本阶水电费(燃动费)")
94
+    private BigDecimal driveCost;
95
+    /**本阶其他制造费*/
96
+    @Excel(name = "本阶其他费用", width = 15)
97
+    @ApiModelProperty(value = "本阶其他费用")
98
+    private BigDecimal otherCost;
99
+    /**本阶物流费*/
100
+    @Excel(name = "本阶物流费", width = 15)
101
+    @ApiModelProperty(value = "本阶物流费")
102
+    private BigDecimal logisticsCost;
103
+    /**累计物料成本*/
104
+    @Excel(name = "累计物料成本", width = 15)
105
+    @ApiModelProperty(value = "累计物料成本")
106
+    private BigDecimal totalMaterialCost;
107
+    /**累计人工成本*/
108
+    @Excel(name = "累计人工成本", width = 15)
109
+    @ApiModelProperty(value = "累计人工成本")
110
+    private BigDecimal totalLaborCost;
111
+    /**累计辅料费*/
112
+    @Excel(name = "累计辅料费", width = 15)
113
+    @ApiModelProperty(value = "累计辅料费")
114
+    private BigDecimal totalSupplyMaterialCost;
115
+    /**累计机器折旧费*/
116
+    @Excel(name = "累计机器折旧费", width = 15)
117
+    @ApiModelProperty(value = "累计机器折旧费")
118
+    private BigDecimal totalEquipmentCost;
119
+    /**累计水电费(燃动费)*/
120
+    @Excel(name = "累计水电费(燃动费)", width = 15)
121
+    @ApiModelProperty(value = "累计水电费(燃动费)")
122
+    private BigDecimal totalDriveCost;
123
+    /**累计其他费用*/
124
+    @Excel(name = "累计其他费用", width = 15)
125
+    @ApiModelProperty(value = "累计其他费用")
126
+    private BigDecimal totalOtherCost;
127
+    /**累计物流费用*/
128
+    @Excel(name = "累计物流费用", width = 15)
129
+    @ApiModelProperty(value = "累计物流费用")
130
+    private BigDecimal totalLogisticsCost;
131
+    /**本阶标准成本*/
132
+    @Excel(name = "本阶标准成本", width = 15)
133
+    @ApiModelProperty(value = "本阶标准成本")
134
+    private BigDecimal currentStandardCost;
135
+    /**累计标准成本*/
136
+    @Excel(name = "累计标准成本", width = 15)
137
+    @ApiModelProperty(value = "累计标准成本")
138
+    private BigDecimal totalStandardCost;
139
+    /**创建人*/
140
+    @ApiModelProperty(value = "创建人")
141
+    private String createBy;
142
+    /**创建日期*/
143
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
144
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
145
+    @ApiModelProperty(value = "创建日期")
146
+    private Date createTime;
147
+    /**修改人*/
148
+    @ApiModelProperty(value = "修改人")
149
+    private String updateBy;
150
+    /**修改日期*/
151
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
152
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
153
+    @ApiModelProperty(value = "修改日期")
154
+    private Date updateTime;
155
+    /**备注*/
156
+    @Excel(name = "备注", width = 15)
157
+    @ApiModelProperty(value = "备注")
158
+    private String remark;
159
+}

+ 106
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/entity/AppSceneCostStandardVersion.java View File

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_standard_version
21
+ * @Author: jeecg-boot
22
+ * @Date: 2024-08-02
23
+ * @Version: V1.0
24
+ */
25
+@Data
26
+@Builder
27
+@TableName("app_scene_cost_standard_version")
28
+@Accessors(chain = true)
29
+@EqualsAndHashCode(callSuper = false)
30
+@ApiModel(value = "app_scene_cost_standard_version对象", description = "app_scene_cost_standard_version")
31
+public class AppSceneCostStandardVersion implements Serializable {
32
+    private static final long serialVersionUID = 1L;
33
+
34
+    /**
35
+     * id
36
+     */
37
+    @TableId(type = IdType.ASSIGN_ID)
38
+    @ApiModelProperty(value = "id")
39
+    private String id;
40
+    /**
41
+     * 图号
42
+     */
43
+    @Excel(name = "图号", width = 15)
44
+    @ApiModelProperty(value = "图号")
45
+    private String figureNumber;
46
+    /**
47
+     * 阶段,A-初始,B-首批,C-量产
48
+     */
49
+    @Excel(name = "阶段,A-初始,B-首批,C-量产", width = 15)
50
+    @ApiModelProperty(value = "阶段,A-初始,B-首批,C-量产")
51
+    private String stage;
52
+    /**
53
+     * 物料号,关联kn_new_sap_mara表matnr字段
54
+     */
55
+    @Excel(name = "物料号,关联kn_new_sap_mara表matnr字段", width = 15)
56
+    @ApiModelProperty(value = "物料号,关联kn_new_sap_mara表matnr字段")
57
+    private String materialNumber;
58
+    /**
59
+     * 版本号
60
+     */
61
+    @Excel(name = "版本号", width = 15)
62
+    @ApiModelProperty(value = "版本号")
63
+    private String versionNumber;
64
+    /**
65
+     * 版本状态
66
+     */
67
+    @Excel(name = "版本状态", width = 15)
68
+    @ApiModelProperty(value = "版本状态")
69
+    private String versionStatus;
70
+    /**
71
+     * 创建人
72
+     */
73
+    @ApiModelProperty(value = "创建人")
74
+    private String createBy;
75
+    /**
76
+     * 创建时间
77
+     */
78
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
79
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
80
+    @ApiModelProperty(value = "创建时间")
81
+    private Date createTime;
82
+    /**
83
+     * 修改人
84
+     */
85
+    @ApiModelProperty(value = "修改人")
86
+    private String updateBy;
87
+    /**
88
+     * 修改时间
89
+     */
90
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
91
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
92
+    @ApiModelProperty(value = "修改时间")
93
+    private Date updateTime;
94
+    /**
95
+     * 备注
96
+     */
97
+    @Excel(name = "备注", width = 15)
98
+    @ApiModelProperty(value = "备注")
99
+    private String remark;
100
+    /**
101
+     * 年份
102
+     */
103
+    @Excel(name = "年份", width = 15)
104
+    @ApiModelProperty(value = "年份")
105
+    private String versionYear;
106
+}

+ 73
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/CostCountStatusEnum.java View File

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 CostCountStatusEnum {
11
+
12
+    NotExecute("NotExecute", "未执行", 0), Executing("Executing", "计算中", 1), ExecutedFinished("ExecutedFinished", "计算完成", 2), ExecutedError("ExecutedError", "出错中止", 3);
13
+    private final String code;
14
+    private final String name;
15
+    private final Integer value;
16
+
17
+    CostCountStatusEnum(String code, String name, Integer value) {
18
+        this.code = code;
19
+        this.name = name;
20
+        this.value = value;
21
+    }
22
+
23
+    public String getCode() {
24
+        return code;
25
+    }
26
+
27
+    public String getName() {
28
+        return name;
29
+    }
30
+
31
+    public Integer getValue() {
32
+        return value;
33
+    }
34
+
35
+    /**
36
+     * 根据code获取text
37
+     *
38
+     * @param codeNo
39
+     * @return
40
+     */
41
+    public static String getTextByCode(String codeNo) {
42
+        for (CostCountStatusEnum value : CostCountStatusEnum.values()) {
43
+            if (value.getCode().equals(codeNo)) {
44
+                return value.name();
45
+            }
46
+        }
47
+        return codeNo.toString();
48
+    }
49
+
50
+    public static String getTextByValue(Integer indexNo) {
51
+        for (CostCountStatusEnum value : CostCountStatusEnum.values()) {
52
+            if (value.getValue().equals(indexNo)) {
53
+                return value.name();
54
+            }
55
+        }
56
+        return indexNo.toString();
57
+    }
58
+
59
+    /**
60
+     * 根据text获取code
61
+     *
62
+     * @param name
63
+     * @return
64
+     */
65
+    public static String getCodeByName(String name) {
66
+        for (CostCountStatusEnum value : CostCountStatusEnum.values()) {
67
+            if (value.name().equals(name)) {
68
+                return value.name();
69
+            }
70
+        }
71
+        return name;
72
+    }
73
+}

+ 59
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/FeeTypeEnum.java View File

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", "人工成本"), MaterialCost("MaterialCost", "物料成本"), EquipmentFee("EquipmentFee", "设备费"), SupplyMaterialFee("SupplyMaterialFee", "辅料费"), DriverFee("DriverFee", "水电费"), OtherFee("OtherFee", "其他费用"), LogisticsFee("LogisticsFee", "物流费"), StandardCost("StandardCost", "标准成本");
13
+
14
+    private final String code;
15
+    private final String name;
16
+
17
+    FeeTypeEnum(String code, String name) {
18
+        this.code = code;
19
+        this.name = name;
20
+    }
21
+
22
+    public String getCode() {
23
+        return code;
24
+    }
25
+
26
+    public String getName() {
27
+        return name;
28
+    }
29
+
30
+    /**
31
+     * 根据code获取text
32
+     *
33
+     * @param codeNo
34
+     * @return
35
+     */
36
+    public static String getTextByCode(String codeNo) {
37
+        for (FeeTypeEnum value : FeeTypeEnum.values()) {
38
+            if (value.getCode().equals(codeNo)) {
39
+                return value.name();
40
+            }
41
+        }
42
+        return codeNo.toString();
43
+    }
44
+
45
+    /**
46
+     * 根据text获取code
47
+     *
48
+     * @param name
49
+     * @return
50
+     */
51
+    public static String getCodeByName(String name) {
52
+        for (FeeTypeEnum value : FeeTypeEnum.values()) {
53
+            if (value.name().equals(name)) {
54
+                return value.name();
55
+            }
56
+        }
57
+        return name;
58
+    }
59
+}

+ 69
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/HourOrRateTypeEnum.java View File

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 HourOrRateTypeEnum {
11
+
12
+    LaborHour("LaborHour", "人员工时"),
13
+    LaborHourRate("LaborHourRate", "人员小时费率"),
14
+    MaterialUnitPrice("MaterialUnitPrice", "物料采购单价"),
15
+    EquipmentHour("EquipmentHour", "设备工时"),
16
+    EquipmentHourRate("EquipmentHourRate", "设备小时费率"),
17
+    SupplyMaterialHour("SupplyMaterialHour", "辅料工时"),
18
+    SupplyMaterialHourRate("SupplyMaterialHourRate", "辅料小时费率"),
19
+    DriverHour("DriverHour", "燃动工时"),
20
+    DriverHourRate("DriverHourRate", "燃动小时费率"),
21
+    OtherHour("OtherHour", "其他工时"),
22
+    OtherHourRate("OtherHourRate", "其他小时费率");
23
+
24
+    private final String code;
25
+    private final String name;
26
+
27
+    HourOrRateTypeEnum(String code, String name) {
28
+        this.code = code;
29
+        this.name = name;
30
+    }
31
+
32
+    public String getCode() {
33
+        return code;
34
+    }
35
+
36
+    public String getName() {
37
+        return name;
38
+    }
39
+
40
+    /**
41
+     * 根据code获取text
42
+     *
43
+     * @param codeNo
44
+     * @return
45
+     */
46
+    public static String getTextByCode(String codeNo) {
47
+        for (HourOrRateTypeEnum value : HourOrRateTypeEnum.values()) {
48
+            if (value.getCode().equals(codeNo)) {
49
+                return value.name();
50
+            }
51
+        }
52
+        return codeNo.toString();
53
+    }
54
+
55
+    /**
56
+     * 根据text获取code
57
+     *
58
+     * @param name
59
+     * @return
60
+     */
61
+    public static String getCodeByName(String name) {
62
+        for (HourOrRateTypeEnum value : HourOrRateTypeEnum.values()) {
63
+            if (value.name().equals(name)) {
64
+                return value.name();
65
+            }
66
+        }
67
+        return name;
68
+    }
69
+}

+ 58
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/StandardStageEnum.java View File

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

+ 61
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/enums/TotalCostEnum.java View File

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 TotalCostEnum {
11
+
12
+
13
+    TotalLaborCost("TotalLaborCost", "总人工成本"), TotalMaterialCost("TotalMaterialCost", "总物料成本"), TotalEquipmentFee("TotalEquipmentFee", "总设备费"), TotalSupplyMaterialFee("TotalSupplyMaterialFee", "总辅料费"), TotalDriverFee("TotalDriverFee", "总水电费"), TotalOtherFee("TotalOtherFee", "总其他费用"), TotalLogisticsFee("TotalLogisticsFee", "总物流费"), TotalStandardCost("TotalStandardCost", "总标准成本");
14
+
15
+
16
+    private final String code;
17
+    private final String name;
18
+
19
+    TotalCostEnum(String code, String name) {
20
+        this.code = code;
21
+        this.name = name;
22
+    }
23
+
24
+    public String getCode() {
25
+        return code;
26
+    }
27
+
28
+    public String getName() {
29
+        return name;
30
+    }
31
+
32
+    /**
33
+     * 根据code获取text
34
+     *
35
+     * @param codeNo
36
+     * @return
37
+     */
38
+    public static String getTextByCode(String codeNo) {
39
+        for (TotalCostEnum value : TotalCostEnum.values()) {
40
+            if (value.getCode().equals(codeNo)) {
41
+                return value.name();
42
+            }
43
+        }
44
+        return codeNo.toString();
45
+    }
46
+
47
+    /**
48
+     * 根据text获取code
49
+     *
50
+     * @param name
51
+     * @return
52
+     */
53
+    public static String getCodeByName(String name) {
54
+        for (TotalCostEnum value : TotalCostEnum.values()) {
55
+            if (value.name().equals(name)) {
56
+                return value.name();
57
+            }
58
+        }
59
+        return name;
60
+    }
61
+}

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostCountMapper.java View File

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
+}

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostHourRateMapper.java View File

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.AppSceneCostHourRate;
5
+
6
+/**
7
+ * @Description: app_scene_cost_hour_rate
8
+ * @Author: jeecg-boot
9
+ * @Date: 2024-08-02
10
+ * @Version: V1.0
11
+ */
12
+public interface AppSceneCostHourRateMapper extends BaseMapper<AppSceneCostHourRate> {
13
+
14
+}

+ 34
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostMaterialBomMapper.java View File

1
+package com.zzsmart.qomo.kn.cost.manage.mapper;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostMaterialBom;
6
+import org.apache.ibatis.annotations.Param;
7
+import org.apache.ibatis.annotations.Select;
8
+
9
+import java.util.List;
10
+
11
+/**
12
+ * @Description: app_scene_cost_material_bom
13
+ * @Author: jeecg-boot
14
+ * @Date: 2024-08-02
15
+ * @Version: V1.0
16
+ */
17
+public interface AppSceneCostMaterialBomMapper extends BaseMapper<AppSceneCostMaterialBom> {
18
+    /**
19
+     * 根据动态SQL语句查询物料BOM表
20
+     *
21
+     * @param selectCommand
22
+     * @return
23
+     */
24
+    @Select("${selectCommand}")
25
+    List<AppSceneCostMaterialBom> customSelect(@Param("selectCommand") String selectCommand);
26
+
27
+
28
+    @Select("${selectSql}")
29
+    JSONObject customSelectOne(@Param("selectSql") String selectSql);
30
+
31
+    @Select("${SelectBlobModel}")
32
+    String customSelectBlobModelJson(@Param("SelectBlobModel") String SelectBlobModel);
33
+
34
+}

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostMaterialProcessHoursMapper.java View File

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.AppSceneCostMaterialProcessHours;
5
+
6
+/**
7
+ * @Description: app_scene_cost_material_process_hours
8
+ * @Author: jeecg-boot
9
+ * @Date: 2024-08-02
10
+ * @Version: V1.0
11
+ */
12
+public interface AppSceneCostMaterialProcessHoursMapper extends BaseMapper<AppSceneCostMaterialProcessHours> {
13
+
14
+}

+ 15
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostModelMapper.java View File

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
+}

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostPartMissingInfoMapper.java View File

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.AppSceneCostPartMissingInfo;
5
+
6
+/**
7
+ * @Description: app_scene_cost_part_missing_info
8
+ * @Author: jeecg-boot
9
+ * @Date: 2024-08-02
10
+ * @Version: V1.0
11
+ */
12
+public interface AppSceneCostPartMissingInfoMapper extends BaseMapper<AppSceneCostPartMissingInfo> {
13
+
14
+}

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostPurchaseEvaluateMapper.java View File

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.AppSceneCostPurchaseEvaluate;
5
+
6
+/**
7
+ * @Description: app_scene_cost_purchase_evaluate
8
+ * @Author: jeecg-boot
9
+ * @Date: 2024-08-02
10
+ * @Version: V1.0
11
+ */
12
+public interface AppSceneCostPurchaseEvaluateMapper extends BaseMapper<AppSceneCostPurchaseEvaluate> {
13
+
14
+}

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostPurchasePriceMapper.java View File

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.AppSceneCostPurchasePrice;
5
+
6
+/**
7
+ * @Description: app_scene_cost_purchase_price
8
+ * @Author: jeecg-boot
9
+ * @Date: 2024-08-02
10
+ * @Version: V1.0
11
+ */
12
+public interface AppSceneCostPurchasePriceMapper extends BaseMapper<AppSceneCostPurchasePrice> {
13
+
14
+}

+ 15
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostResultValueMapper.java View File

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
+}

+ 15
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostStandardDetailMapper.java View File

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.AppSceneCostStandardDetail;
6
+
7
+/**
8
+ * @Description: app_scene_cost_standard_detail
9
+ * @Author: jeecg-boot
10
+ * @Date:   2024-07-31
11
+ * @Version: V1.0
12
+ */
13
+public interface AppSceneCostStandardDetailMapper extends BaseMapper<AppSceneCostStandardDetail> {
14
+
15
+}

+ 17
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/AppSceneCostStandardVersionMapper.java View File

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.AppSceneCostStandardVersion;
6
+import org.apache.ibatis.annotations.Param;
7
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
8
+
9
+/**
10
+ * @Description: app_scene_cost_standard_version
11
+ * @Author: jeecg-boot
12
+ * @Date:   2024-08-02
13
+ * @Version: V1.0
14
+ */
15
+public interface AppSceneCostStandardVersionMapper extends BaseMapper<AppSceneCostStandardVersion> {
16
+
17
+}

+ 5
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostCountMapper.xml View File

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.AppSceneCostCountMapper">
4
+
5
+</mapper>

+ 5
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostHourRateMapper.xml View File

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.AppSceneCostHourRateMapper">
4
+
5
+</mapper>

+ 5
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostMaterialBomMapper.xml View File

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.AppSceneCostMaterialBomMapper">
4
+
5
+</mapper>

+ 5
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostMaterialProcessHoursMapper.xml View File

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.AppSceneCostMaterialProcessHoursMapper">
4
+
5
+</mapper>

+ 5
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostModelMapper.xml View File

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.AppSceneCostModelMapper">
4
+
5
+</mapper>

+ 5
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostPartMissingInfoMapper.xml View File

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.AppSceneCostPartMissingInfoMapper">
4
+
5
+</mapper>

+ 5
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostPurchaseEvaluateMapper.xml View File

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.AppSceneCostPurchaseEvaluateMapper">
4
+
5
+</mapper>

+ 5
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostPurchasePriceMapper.xml View File

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.AppSceneCostPurchasePriceMapper">
4
+
5
+</mapper>

+ 5
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostResultValueMapper.xml View File

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.AppSceneCostResultValueMapper">
4
+
5
+</mapper>

+ 5
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostStandardDetailMapper.xml View File

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.AppSceneCostStandardDetailMapper">
4
+
5
+</mapper>

+ 5
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/mapper/xml/AppSceneCostStandardVersionMapper.xml View File

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.AppSceneCostStandardVersionMapper">
4
+
5
+</mapper>

+ 721
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/StandardCostService.java View File

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.enums.HourOrRateTypeEnum;
8
+import com.zzsmart.qomo.kn.cost.manage.enums.TotalCostEnum;
9
+import com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostMaterialBomMapper;
10
+import com.zzsmart.qomo.kn.cost.manage.service.*;
11
+import com.zzsmart.qomo.kn.cost.manage.vo.FlowTaskInfoVO;
12
+import com.zzsmart.qomo.kn.cost.manage.vo.TotalResultValue;
13
+import com.zzsmart.qomo.plugin.task.api.TaskExecutionContext;
14
+import lombok.extern.slf4j.Slf4j;
15
+import org.springframework.beans.factory.annotation.Autowired;
16
+import org.springframework.stereotype.Service;
17
+import org.springframework.transaction.annotation.Transactional;
18
+
19
+import javax.annotation.PostConstruct;
20
+import java.math.BigDecimal;
21
+import java.util.ArrayList;
22
+import java.util.Date;
23
+import java.util.List;
24
+import java.util.Map;
25
+import java.util.stream.Collectors;
26
+
27
+@Service
28
+@Slf4j
29
+@Transactional
30
+public class StandardCostService {
31
+    /**
32
+     * 物料BOM信息
33
+     */
34
+    @Autowired
35
+    AppSceneCostMaterialBomMapper costMaterialBomMapper;
36
+    @Autowired
37
+    IAppSceneCostMaterialBomService costMaterialBomService;
38
+
39
+    /**
40
+     * 小时费率
41
+     */
42
+    @Autowired
43
+    IAppSceneCostHourRateService iHourRateService;
44
+    /**
45
+     * 采购单价
46
+     */
47
+    @Autowired
48
+    IAppSceneCostPurchasePriceService costPurchasePriceService;
49
+    /**
50
+     * 工序
51
+     */
52
+    @Autowired
53
+    IAppSceneCostMaterialProcessHoursService costMaterialProcessHoursService;
54
+    /**
55
+     * 标准成本计算结果
56
+     */
57
+    @Autowired
58
+    IAppSceneCostResultValueService iAppSceneCostResultValueService;
59
+    /**
60
+     * 标准成本服务
61
+     */
62
+    public static StandardCostService standardCostService;
63
+    /**
64
+     * 成本计算服务
65
+     */
66
+    @Autowired
67
+    IAppSceneCostCountService appSceneCostCountService;
68
+    /**
69
+     * 标准成本明细服务(单行查询服务)
70
+     */
71
+    @Autowired
72
+    private IAppSceneCostStandardDetailService iAppSceneCostStandardDetailService;
73
+
74
+    @PostConstruct
75
+    public void init() {
76
+        standardCostService = this;
77
+        standardCostService.costMaterialBomMapper = this.costMaterialBomMapper;
78
+        standardCostService.appSceneCostCountService = this.appSceneCostCountService;
79
+        standardCostService.costMaterialBomService = this.costMaterialBomService;
80
+        standardCostService.costPurchasePriceService = this.costPurchasePriceService;
81
+        standardCostService.iHourRateService = this.iHourRateService;
82
+        standardCostService.costMaterialProcessHoursService = this.costMaterialProcessHoursService;
83
+        standardCostService.iAppSceneCostResultValueService = this.iAppSceneCostResultValueService;
84
+        standardCostService.iAppSceneCostStandardDetailService = this.iAppSceneCostStandardDetailService;
85
+    }
86
+
87
+    /**
88
+     * 更新成本计算模型任务状态
89
+     */
90
+    public static void updateCostCountTaskStatus(Boolean isSuccess, Integer costCountTaskId) {
91
+        log.info("更新成本计算模型任务状态");
92
+        standardCostService.appSceneCostCountService.updateById(AppSceneCostCount.builder().id(costCountTaskId).status(isSuccess != null && isSuccess ? 1 : 0).build());
93
+    }
94
+
95
+    /**
96
+     * 1.物料编号输入任务
97
+     */
98
+    public static void materialInputTask(TaskExecutionContext parameters) {
99
+        try {
100
+            //获取任务流程相关信息
101
+            FlowTaskInfoVO flowTaskInfoVO = analysisFlowTaskInfo(parameters);
102
+            //获取最上层的物料号
103
+            String topMaterialCode = flowTaskInfoVO.getTopMaterialCode();
104
+            //获取任务类型
105
+            String taskType = parameters.getTaskType();
106
+            //获取任务代码
107
+            String taskCode = flowTaskInfoVO.getTaskCode();
108
+            //获取流程id
109
+            String flowInstanceId = flowTaskInfoVO.getFlowInstanceId();
110
+            //1.查询出所有满足物料编号的物料(BOM物料)
111
+            String sql = flowTaskInfoVO.getSqlString();
112
+            log.info("传递过来的SQL语句:" + sql);
113
+            //TODO 查询最顶部的BOM物料编号下所有的物料并进行层级排序
114
+            List<AppSceneCostMaterialBom> list = standardCostService.costMaterialBomService.queryAllBomInfoBytopMaterialCode(topMaterialCode);
115
+            log.info("Full EmptyTask list: {}", list);
116
+            //2.把查询的结果存放在临时表里(表命名规则:前缀_流程id_组件code)
117
+            for (int i = 0; list != null && i < list.size(); i++) {
118
+                AppSceneCostMaterialBom material = list.get(i);
119
+                AppSceneCostResultValue appSceneCostResultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(material.getMaterialCode()).parentMarterialNo(material.getParentMaterialCode()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).num(material.getNumber()).build();
120
+                standardCostService.iAppSceneCostResultValueService.save(appSceneCostResultValue);
121
+            }
122
+        } catch (Exception e) {
123
+            throw new RuntimeException(e);
124
+        }
125
+    }
126
+
127
+    /**
128
+     * 获取任务流程相关信息
129
+     *
130
+     * @param parameters
131
+     * @return
132
+     */
133
+    private static FlowTaskInfoVO analysisFlowTaskInfo(TaskExecutionContext parameters) {
134
+        FlowTaskInfoVO flowTaskInfoVO = new FlowTaskInfoVO();
135
+        if (parameters != null) {
136
+            String s = parameters.toString();
137
+            String[] split = s.split(",");
138
+            for (int i = 0; i < split.length; i++) {
139
+                String s1 = split[i];
140
+                if (s1.contains("taskType")) {
141
+                    String[] split1 = s1.split("=");
142
+                    if (split1[1].contains("\"")) {
143
+                        split1[1] = split1[1].replaceAll("^\"|\"$", ""); // 去除首尾引号
144
+                        flowTaskInfoVO.setTaskType(split1[1]);
145
+                    } else {
146
+                        flowTaskInfoVO.setTaskType(split1[1]);
147
+                    }
148
+                } else if (s1.contains("taskCode")) {
149
+                    String[] split1 = s1.split(":");
150
+                    if (split1[1].contains("\"")) {
151
+                        split1[1] = split1[1].replaceAll("^\"|\"$", ""); // 去除首尾引号
152
+                        flowTaskInfoVO.setTaskCode(split1[1]);
153
+                    } else {
154
+                        flowTaskInfoVO.setTaskCode(split1[1]);
155
+                    }
156
+                } else if (s1.contains("flowInstanceId")) {
157
+                    String[] split1 = s1.split("=");
158
+                    if (split1[1].contains("\"")) {
159
+                        split1[1] = split1[1].replaceAll("^\"|\"$", ""); // 去除首尾引号
160
+                        flowTaskInfoVO.setFlowInstanceId(split1[1]);
161
+                    } else {
162
+                        flowTaskInfoVO.setFlowInstanceId(split1[1]);
163
+                    }
164
+                } else if (s1.contains("sqlString")) {
165
+                    String[] split1 = s1.split(":");
166
+                    if (split1[1].contains("\"")) {
167
+                        split1[1] = split1[1].replaceAll("^\"|\"$", ""); // 去除首尾引号
168
+                        flowTaskInfoVO.setSqlString(split1[1]);
169
+                    } else {
170
+                        flowTaskInfoVO.setSqlString(split1[1]);
171
+                    }
172
+                } else if (s.contains("feeType") && s1.contains("feeType")) {
173
+                    String[] split1 = s1.split(":");
174
+                    if (split1[1].contains("\"")) {
175
+                        split1[1] = split1[1].replaceAll("^\"|\"$", ""); // 去除首尾引号
176
+                        flowTaskInfoVO.setFeeType(split1[1]);
177
+                    } else {
178
+                        flowTaskInfoVO.setFeeType(split1[1]);
179
+                    }
180
+                }
181
+            }
182
+        }
183
+        //通过任务流程id查询流程定义信息(qomo_flow_definition)
184
+        flowTaskInfoVO = queryFlowDefinitionByFlowInstanceId(flowTaskInfoVO);
185
+        return flowTaskInfoVO;
186
+    }
187
+
188
+    /**
189
+     * @param flowTaskInfoVO
190
+     */
191
+    private static FlowTaskInfoVO queryFlowDefinitionByFlowInstanceId(FlowTaskInfoVO flowTaskInfoVO) {
192
+        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";
193
+        String blob = standardCostService.costMaterialBomMapper.customSelectBlobModelJson(sql);
194
+        if (blob != null) {
195
+            if (blob != null && blob.contains("topMaterialCode")) {
196
+                JSONObject jsonObject1 = JSON.parseObject(blob);
197
+                String topMaterialCode = jsonObject1.getString("topMaterialCode");
198
+                flowTaskInfoVO.setTopMaterialCode(topMaterialCode);
199
+            }
200
+        }
201
+        return flowTaskInfoVO;
202
+    }
203
+
204
+    /**
205
+     * 2. 物料成本任务
206
+     */
207
+    public static void materialCostTask(TaskExecutionContext parameters) {
208
+        try {
209
+            //获取任务流程相关信息
210
+            FlowTaskInfoVO flowTaskInfoVO = analysisFlowTaskInfo(parameters);
211
+            //获取最上层的物料号
212
+            String topMaterialCode = flowTaskInfoVO.getTopMaterialCode();
213
+            //获取任务类型
214
+            String taskType = parameters.getTaskType();
215
+            //获取任务代码
216
+            String taskCode = flowTaskInfoVO.getTaskCode();
217
+            //获取流程id
218
+            String flowInstanceId = flowTaskInfoVO.getFlowInstanceId();
219
+            //成本类型
220
+            String feeType = FeeTypeEnum.MaterialCost.getCode();
221
+            //1.查询出物料编号对应的下所有的BOM信息
222
+            List<AppSceneCostResultValue> list = standardCostService.iAppSceneCostResultValueService.getResultValueByTopMaterialNo(topMaterialCode, "MaterialInput", flowInstanceId);
223
+            //2.计算出所有的单个物料的物料成本
224
+            //2.1查询出物料的单价和采购数量
225
+            List<String> MarterialNoList = new ArrayList<>();
226
+            if (list != null && list.size() > 0) {
227
+                MarterialNoList = list.stream().filter(s -> s.getMarterialNo() != null).map(AppSceneCostResultValue::getMarterialNo).collect(Collectors.toList());
228
+            }
229
+            //查询物料的采购价
230
+            Map<String, BigDecimal> purchasePriceMap = standardCostService.costPurchasePriceService.getMinCostPurchasePriceByMaterialNo(MarterialNoList);
231
+            for (int i = 0; i < list.size(); i++) {
232
+                AppSceneCostResultValue appSceneCostResultValue = list.get(i);
233
+                String marterialNo = appSceneCostResultValue.getMarterialNo();
234
+                Integer num = appSceneCostResultValue.getNum();
235
+                if (marterialNo != null && num != null) {
236
+                    BigDecimal price = purchasePriceMap.get(marterialNo);
237
+                    BigDecimal number = new BigDecimal(num.toString());
238
+                    //单价乘以数量
239
+                    BigDecimal totalCost = price.multiply(number);
240
+                    //2.2计算出人工成本并存储到成本结果数据表中
241
+                    AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(marterialNo).parentMarterialNo(appSceneCostResultValue.getParentMarterialNo()).taskType(taskType).costType(feeType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(totalCost + "").priceOrRate(price).build();
242
+                    standardCostService.iAppSceneCostResultValueService.save(resultValue);
243
+                }
244
+            }
245
+        } catch (Exception e) {
246
+            throw new RuntimeException(e);
247
+        }
248
+    }
249
+
250
+    /**
251
+     * 3.人工成本任务
252
+     */
253
+    public static void laborCostTask(TaskExecutionContext parameters) {
254
+        try {
255
+            //获取任务流程相关信息
256
+            FlowTaskInfoVO flowTaskInfoVO = analysisFlowTaskInfo(parameters);
257
+            //获取最上层的物料号
258
+            String topMaterialCode = flowTaskInfoVO.getTopMaterialCode();
259
+            //获取任务类型
260
+            String taskType = parameters.getTaskType();
261
+            //获取任务代码
262
+            String taskCode = flowTaskInfoVO.getTaskCode();
263
+            //获取流程id
264
+            String flowInstanceId = flowTaskInfoVO.getFlowInstanceId();
265
+            //成本类型
266
+            String feeType = FeeTypeEnum.LaborCost.getCode();
267
+            String sql1 = flowTaskInfoVO.getSqlString();
268
+            log.info("sql1:" + sql1);
269
+            String sql = sql1.replaceAll("^\"|\"$", ""); // 去除首尾引号
270
+            log.info("sql:" + sql);
271
+            JSONObject jsonObject = standardCostService.costMaterialBomMapper.customSelectOne(sql);
272
+            BigDecimal hourRate = new BigDecimal("0");
273
+            if (jsonObject != null) {
274
+                AppSceneCostHourRate rate = JSON.toJavaObject(jsonObject, AppSceneCostHourRate.class);
275
+                hourRate = rate.getLaborHourRate();
276
+            }
277
+            //1.查询出物料编号对应的下所有的BOM信息
278
+            List<AppSceneCostResultValue> list = standardCostService.iAppSceneCostResultValueService.getResultValueByTopMaterialNo(topMaterialCode, "MaterialInput", flowInstanceId);
279
+            //2.计算出所有的单个物料的人工成本
280
+            //2.1查询出物料的人员工时和人工小时费率(涉及:小时费率表和工序表)
281
+            List<String> MarterialNoList = new ArrayList<>();
282
+            if (list != null && list.size() > 0) {
283
+                MarterialNoList = list.stream().filter(s -> s.getMarterialNo() != null).map(AppSceneCostResultValue::getMarterialNo).collect(Collectors.toList());
284
+            }
285
+            //查询工序工时
286
+            Map<String, List<AppSceneCostMaterialProcessHours>> processHoursMap = standardCostService.costMaterialProcessHoursService.getProcessHoursByMaterialNo(MarterialNoList);
287
+            for (int i = 0; i < list.size(); i++) {
288
+                AppSceneCostResultValue appSceneCostResultValue = list.get(i);
289
+                String marterialNo = appSceneCostResultValue.getMarterialNo();
290
+                if (marterialNo != null) {
291
+                    BigDecimal totalCost = new BigDecimal("0.0");
292
+                    BigDecimal laborHours = new BigDecimal("0.0");
293
+                    List<AppSceneCostMaterialProcessHours> costMaterialProcessHours = processHoursMap.get(marterialNo);
294
+                    if (costMaterialProcessHours != null && costMaterialProcessHours.size() > 0) {
295
+                        for (int j = 0; j < costMaterialProcessHours.size(); j++) {
296
+                            AppSceneCostMaterialProcessHours processHours = costMaterialProcessHours.get(j);
297
+                            laborHours = laborHours.add(processHours.getLaborHours());
298
+                            //计算总人工成本
299
+                            totalCost = totalCost.add(processHours.getLaborHours().multiply(hourRate));
300
+                        }
301
+                    }
302
+                    //2.2计算出人工成本并存储到成本结果数据表中
303
+                    AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(marterialNo).parentMarterialNo(appSceneCostResultValue.getParentMarterialNo()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(totalCost + "").costType(feeType).priceOrRate(hourRate).hour(laborHours).build();
304
+                    standardCostService.iAppSceneCostResultValueService.save(resultValue);
305
+                }
306
+            }
307
+        } catch (Exception e) {
308
+            throw new RuntimeException(e);
309
+        }
310
+
311
+    }
312
+
313
+    /**
314
+     * 4.制造费用成本任务
315
+     */
316
+    public static void manufacturingCostTask(TaskExecutionContext parameters) {
317
+        try {
318
+            //获取任务流程相关信息
319
+            FlowTaskInfoVO flowTaskInfoVO = analysisFlowTaskInfo(parameters);
320
+            //获取最上层的物料号
321
+            String topMaterialCode = flowTaskInfoVO.getTopMaterialCode();
322
+            //获取任务类型
323
+            String taskType = parameters.getTaskType();
324
+            //获取任务代码
325
+            String taskCode = flowTaskInfoVO.getTaskCode();
326
+            //获取流程id
327
+            String flowInstanceId = flowTaskInfoVO.getFlowInstanceId();
328
+            /**
329
+             * 费用类别
330
+             */
331
+            String feeType = flowTaskInfoVO.getFeeType();
332
+            /**
333
+             * 小时费率
334
+             */
335
+            String sql1 = flowTaskInfoVO.getSqlString();
336
+            log.info("sql1:" + sql1);
337
+            String sql = sql1.replaceAll("^\"|\"$", ""); // 去除首尾引号
338
+            log.info("sql:" + sql);
339
+            JSONObject jsonObject = standardCostService.costMaterialBomMapper.customSelectOne(sql);
340
+            BigDecimal hourRate = new BigDecimal("0");
341
+            if (jsonObject != null) {
342
+                AppSceneCostHourRate rate = JSON.toJavaObject(jsonObject, AppSceneCostHourRate.class);
343
+                hourRate = rate.getLaborHourRate();
344
+            }
345
+            //1.查询出物料编号对应的下所有的BOM信息
346
+            List<AppSceneCostResultValue> list = standardCostService.iAppSceneCostResultValueService.getResultValueByTopMaterialNo(topMaterialCode, "MaterialInput", flowInstanceId);
347
+            //2.根据费用类型进行不同的费用计算
348
+            //查询工序工时
349
+            List<String> MarterialNoList = new ArrayList<>();
350
+            if (list != null && list.size() > 0) {
351
+                MarterialNoList = list.stream().filter(s -> s.getMarterialNo() != null).map(AppSceneCostResultValue::getMarterialNo).collect(Collectors.toList());
352
+            }
353
+            Map<String, List<AppSceneCostMaterialProcessHours>> processHoursMap = standardCostService.costMaterialProcessHoursService.getProcessHoursByMaterialNo(MarterialNoList);
354
+            //2.1机器折旧费(机器工时*费率)
355
+            if (FeeTypeEnum.EquipmentFee.getCode().equals(feeType)) {
356
+                for (int i = 0; i < list.size(); i++) {
357
+                    AppSceneCostResultValue appSceneCostResultValue = list.get(i);
358
+                    String marterialNo = appSceneCostResultValue.getMarterialNo();
359
+                    if (marterialNo != null) {
360
+                        BigDecimal totalCost = new BigDecimal("0.0");
361
+                        BigDecimal laborHours = new BigDecimal("0.0");
362
+                        List<AppSceneCostMaterialProcessHours> costMaterialProcessHours = processHoursMap.get(marterialNo);
363
+                        if (costMaterialProcessHours != null && costMaterialProcessHours.size() > 0) {
364
+                            for (int j = 0; j < costMaterialProcessHours.size(); j++) {
365
+                                AppSceneCostMaterialProcessHours processHours = costMaterialProcessHours.get(j);
366
+                                laborHours = laborHours.add(processHours.getDeviceHours());
367
+                                //计算机器成本
368
+                                totalCost = totalCost.add(processHours.getDeviceHours().multiply(hourRate));
369
+                            }
370
+                        }
371
+                        //2.2计算机器成本并存储到成本结果数据表中
372
+                        AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(marterialNo).parentMarterialNo(appSceneCostResultValue.getParentMarterialNo()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(totalCost + "").costType(feeType).priceOrRate(hourRate).hour(laborHours).build();
373
+                        standardCostService.iAppSceneCostResultValueService.save(resultValue);
374
+                    }
375
+                }
376
+            } else if (FeeTypeEnum.SupplyMaterialFee.getCode().equals(feeType)) {
377
+                //机物料消耗(辅料工时*费率)
378
+                for (int i = 0; i < list.size(); i++) {
379
+                    AppSceneCostResultValue appSceneCostResultValue = list.get(i);
380
+                    String marterialNo = appSceneCostResultValue.getMarterialNo();
381
+                    if (marterialNo != null) {
382
+                        BigDecimal totalCost = new BigDecimal("0.0");
383
+                        BigDecimal laborHours = new BigDecimal("0.0");
384
+                        List<AppSceneCostMaterialProcessHours> costMaterialProcessHours = processHoursMap.get(marterialNo);
385
+                        if (costMaterialProcessHours != null && costMaterialProcessHours.size() > 0) {
386
+                            for (int j = 0; j < costMaterialProcessHours.size(); j++) {
387
+                                AppSceneCostMaterialProcessHours processHours = costMaterialProcessHours.get(j);
388
+                                //TODO 辅料工时来源
389
+                                laborHours = laborHours.add(processHours.getDeviceHours());
390
+                                //机物料消耗
391
+                                totalCost = totalCost.add(processHours.getDeviceHours().multiply(hourRate));
392
+                            }
393
+                        }
394
+                        //2.2计算机物料消耗存储到成本结果数据表中
395
+                        AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(marterialNo).parentMarterialNo(appSceneCostResultValue.getParentMarterialNo()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(totalCost + "").costType(feeType).priceOrRate(hourRate).hour(laborHours).build();
396
+                        standardCostService.iAppSceneCostResultValueService.save(resultValue);
397
+                    }
398
+                }
399
+            } else if (FeeTypeEnum.DriverFee.getCode().equals(feeType)) {
400
+                //2.3水电费(燃动力工时*费率)
401
+                for (int i = 0; i < list.size(); i++) {
402
+                    AppSceneCostResultValue appSceneCostResultValue = list.get(i);
403
+                    String marterialNo = appSceneCostResultValue.getMarterialNo();
404
+                    if (marterialNo != null) {
405
+                        BigDecimal totalCost = new BigDecimal("0.0");
406
+                        BigDecimal laborHours = new BigDecimal("0.0");
407
+                        List<AppSceneCostMaterialProcessHours> costMaterialProcessHours = processHoursMap.get(marterialNo);
408
+                        if (costMaterialProcessHours != null && costMaterialProcessHours.size() > 0) {
409
+                            for (int j = 0; j < costMaterialProcessHours.size(); j++) {
410
+                                AppSceneCostMaterialProcessHours processHours = costMaterialProcessHours.get(j);
411
+                                //TODO 燃动力工时来源
412
+                                laborHours = laborHours.add(processHours.getDeviceHours());
413
+                                //水电费(燃动力工时*费率)成本
414
+                                totalCost = totalCost.add(processHours.getDeviceHours().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).priceOrRate(hourRate).hour(laborHours).build();
419
+                        standardCostService.iAppSceneCostResultValueService.save(resultValue);
420
+                    }
421
+                }
422
+            } else if (FeeTypeEnum.OtherFee.getCode().equals(feeType)) {
423
+                //2.4其他制费(其他工时*费率)
424
+                for (int i = 0; i < list.size(); i++) {
425
+                    AppSceneCostResultValue appSceneCostResultValue = list.get(i);
426
+                    String marterialNo = appSceneCostResultValue.getMarterialNo();
427
+                    if (marterialNo != null) {
428
+                        BigDecimal totalCost = new BigDecimal("0.0");
429
+                        BigDecimal laborHours = new BigDecimal("0.0");
430
+                        List<AppSceneCostMaterialProcessHours> costMaterialProcessHours = processHoursMap.get(marterialNo);
431
+                        if (costMaterialProcessHours != null && costMaterialProcessHours.size() > 0) {
432
+                            for (int j = 0; j < costMaterialProcessHours.size(); j++) {
433
+                                AppSceneCostMaterialProcessHours processHours = costMaterialProcessHours.get(j);
434
+                                //TODO 其他工时来源
435
+                                laborHours = laborHours.add(processHours.getDeviceHours());
436
+                                //其他制费成本
437
+                                totalCost = totalCost.add(processHours.getDeviceHours().multiply(hourRate));
438
+                            }
439
+                        }
440
+                        //2.2计算机物料消耗存储到成本结果数据表中
441
+                        AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(marterialNo).parentMarterialNo(appSceneCostResultValue.getParentMarterialNo()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(totalCost + "").costType(feeType).priceOrRate(hourRate).hour(laborHours).build();
442
+                        standardCostService.iAppSceneCostResultValueService.save(resultValue);
443
+                    }
444
+                }
445
+            } else if (FeeTypeEnum.LogisticsFee.getCode().equals(feeType)) {
446
+                //查出所有的机器折旧费、机物料消耗、水电费、其他制费
447
+                list = standardCostService.iAppSceneCostResultValueService.getResultValueByTopMaterialNo(topMaterialCode, "ManufacturingCost", flowInstanceId);
448
+                //2.5物流费((机器折旧+机物料消耗+水电费+其他制费)*10.16%)
449
+                //按照物料编号进行分组
450
+                Map<String, List<AppSceneCostResultValue>> materialNoMap = list.stream().collect(Collectors.groupingBy(AppSceneCostResultValue::getMarterialNo));
451
+                for (String key : materialNoMap.keySet()) {
452
+                    List<AppSceneCostResultValue> appSceneCostResultValues = materialNoMap.get(key);
453
+                    BigDecimal totalCost = new BigDecimal("0.0");
454
+                    for (int j = 0; j < appSceneCostResultValues.size(); j++) {
455
+                        AppSceneCostResultValue appSceneCostResultValue = appSceneCostResultValues.get(j);
456
+                        String countValue = appSceneCostResultValue.getCountValue();
457
+                        if (countValue != null) {
458
+                            totalCost = totalCost.add(new BigDecimal(countValue));
459
+                        }
460
+                    }
461
+                    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();
462
+                    standardCostService.iAppSceneCostResultValueService.save(resultValue);
463
+                }
464
+            }
465
+        } catch (Exception e) {
466
+            throw new RuntimeException(e);
467
+        }
468
+
469
+    }
470
+
471
+    /**
472
+     * 5.标准成本计算任务
473
+     */
474
+    public static void standardCostTask(TaskExecutionContext parameters) {
475
+        try {
476
+            //获取任务流程相关信息
477
+            FlowTaskInfoVO flowTaskInfoVO = analysisFlowTaskInfo(parameters);
478
+            //获取最上层的物料号
479
+            String topMaterialCode = flowTaskInfoVO.getTopMaterialCode();
480
+            //获取任务类型
481
+            String taskType = parameters.getTaskType();
482
+            //获取任务代码
483
+            String taskCode = flowTaskInfoVO.getTaskCode();
484
+            //获取流程id
485
+            String flowInstanceId = flowTaskInfoVO.getFlowInstanceId();
486
+            String costType = FeeTypeEnum.StandardCost.getCode();
487
+            //1.查询出根物料编号对应的下所有的BOM信息结果值
488
+            List<AppSceneCostResultValue> list = standardCostService.iAppSceneCostResultValueService.getAllResultValueByTopMaterialNo(topMaterialCode, flowInstanceId);
489
+            //2.计算出所有的单个物料的本阶的标准成本(标准成本=物料成本+人工成本+制造费用)
490
+            //按照物料编号进行分组
491
+            Map<String, List<AppSceneCostResultValue>> materialNoMap = list.stream().collect(Collectors.groupingBy(AppSceneCostResultValue::getMarterialNo));
492
+            //遍历根物料下所有的物料进行该物料本阶成本和费用类别的统计
493
+            for (String key : materialNoMap.keySet()) {
494
+                List<AppSceneCostResultValue> appSceneCostResultValues = materialNoMap.get(key);
495
+                //按照费用类别进行分组
496
+                Map<String, List<AppSceneCostResultValue>> costTypeMap = appSceneCostResultValues.stream().filter(s -> s.getCostType() != null).collect(Collectors.groupingBy(AppSceneCostResultValue::getCostType));
497
+                //【本阶标准成本】
498
+                BigDecimal currentCost = new BigDecimal("0.0");
499
+                //1.本阶物料成本
500
+                BigDecimal materialCost = new BigDecimal("0.0");
501
+                //2.本阶人工成本
502
+                BigDecimal laborCost = new BigDecimal("0.0");
503
+                //3.本阶制造费(设备费)
504
+                BigDecimal equipmentCost = new BigDecimal("0.0");
505
+                //4.本阶制造费(辅料费用)
506
+                BigDecimal supplyMaterialCost = new BigDecimal("0.0");
507
+                //5.本阶制造费(水电费、燃动费)
508
+                BigDecimal driveCost = new BigDecimal("0.0");
509
+                //6.本阶制造费(其他制造费用)
510
+                BigDecimal otherCost = new BigDecimal("0.0");
511
+                //7.本阶制造费(物流费)
512
+                BigDecimal logisticsCost = new BigDecimal("0.0");
513
+                //物料单价
514
+                BigDecimal materialUnitPrice = new BigDecimal("0.0");
515
+                //人员工时、小时费率
516
+                BigDecimal laborHour = new BigDecimal("0.0");
517
+                BigDecimal laborHourRate = new BigDecimal("0.0");
518
+                //设备工时、小时费率
519
+                BigDecimal equipmentHour = new BigDecimal("0.0");
520
+                BigDecimal equipmentHourRate = new BigDecimal("0.0");
521
+                //辅料工时、小时费率
522
+                BigDecimal supplyMaterialHour = new BigDecimal("0.0");
523
+                BigDecimal supplyMaterialHourRate = new BigDecimal("0.0");
524
+                //燃动工时、小时费率
525
+                BigDecimal driveHour = new BigDecimal("0.0");
526
+                BigDecimal driveHourRate = new BigDecimal("0.0");
527
+                //其他工时、小时费率
528
+                BigDecimal otherHour = new BigDecimal("0.0");
529
+                BigDecimal otherHourRate = new BigDecimal("0.0");
530
+                AppSceneCostResultValue currentMaterialCost = null;
531
+                //遍历所有费用类别计算本阶标准成本
532
+                for (int j = 0; j < appSceneCostResultValues.size(); j++) {
533
+                    if (j == 0) {
534
+                        currentMaterialCost = appSceneCostResultValues.get(0);
535
+                    }
536
+                    AppSceneCostResultValue appSceneCostResultValue = appSceneCostResultValues.get(j);
537
+                    String countValue = appSceneCostResultValue.getCountValue();
538
+                    if (countValue != null) {
539
+                        currentCost = currentCost.add(new BigDecimal(countValue));
540
+                    }
541
+                }
542
+                //计算本阶各个费用类别费用以及记录本阶物料的工时和小时费率
543
+                for (String feeType : costTypeMap.keySet()) {
544
+                    List<AppSceneCostResultValue> appSceneCostResultValues1 = costTypeMap.get(feeType);
545
+                    for (int m = 0; m < appSceneCostResultValues1.size(); m++) {
546
+                        if (FeeTypeEnum.MaterialCost.getCode().equals(feeType)) {
547
+                            //物料成本
548
+                            materialCost = materialCost.add(new BigDecimal(appSceneCostResultValues1.get(m).getCountValue()));
549
+                            //物料单价
550
+                            materialUnitPrice = appSceneCostResultValues1.get(m).getPriceOrRate();
551
+                        } else if (FeeTypeEnum.LaborCost.getCode().equals(feeType)) {
552
+                            //人工成本
553
+                            laborCost = laborCost.add(new BigDecimal(appSceneCostResultValues1.get(m).getCountValue()));
554
+                            //人工工时、小时费率
555
+                            laborHour = laborHour.add(appSceneCostResultValues1.get(m).getHour());
556
+                            laborHourRate = laborHourRate.add(appSceneCostResultValues1.get(m).getPriceOrRate());
557
+                        } else if (FeeTypeEnum.EquipmentFee.getCode().equals(feeType)) {
558
+                            //设备费用
559
+                            equipmentCost = equipmentCost.add(new BigDecimal(appSceneCostResultValues1.get(m).getCountValue()));
560
+                            //设备工时、小时费率
561
+                            equipmentHour = equipmentHour.add(appSceneCostResultValues1.get(m).getHour());
562
+                            equipmentHourRate = equipmentHourRate.add(appSceneCostResultValues1.get(m).getPriceOrRate());
563
+                        } else if (FeeTypeEnum.SupplyMaterialFee.getCode().equals(feeType)) {
564
+                            //辅料费用
565
+                            supplyMaterialCost = supplyMaterialCost.add(new BigDecimal(appSceneCostResultValues1.get(m).getCountValue()));
566
+                            //辅料工时、小时费率
567
+                            supplyMaterialHour = supplyMaterialHour.add(appSceneCostResultValues1.get(m).getHour());
568
+                            supplyMaterialHourRate = supplyMaterialHourRate.add(appSceneCostResultValues1.get(m).getPriceOrRate());
569
+                        } else if (FeeTypeEnum.DriverFee.getCode().equals(feeType)) {
570
+                            //燃动费用
571
+                            driveCost = driveCost.add(new BigDecimal(appSceneCostResultValues1.get(m).getCountValue()));
572
+                            //燃动工时、小时费率
573
+                            driveHour = driveHour.add(appSceneCostResultValues1.get(m).getHour());
574
+                            driveHourRate = driveHourRate.add(appSceneCostResultValues1.get(m).getPriceOrRate());
575
+                        } else if (FeeTypeEnum.LogisticsFee.getCode().equals(feeType)) {
576
+                            //物流费用
577
+                            logisticsCost = logisticsCost.add(new BigDecimal(appSceneCostResultValues1.get(m).getCountValue()));
578
+                        } else if (FeeTypeEnum.OtherFee.getCode().equals(feeType)) {
579
+                            //其他费用
580
+                            otherCost = otherCost.add(new BigDecimal(appSceneCostResultValues1.get(m).getCountValue()));
581
+                            //其他工时、小时费率
582
+                            otherHour = otherHour.add(appSceneCostResultValues1.get(m).getHour());
583
+                            otherHourRate = otherHourRate.add(appSceneCostResultValues1.get(m).getPriceOrRate());
584
+                        }
585
+                    }
586
+                }
587
+                //本阶不同费用类别成本统计
588
+                JSONObject currentLevelCostTypeDetail = new JSONObject();
589
+                currentLevelCostTypeDetail.put(FeeTypeEnum.MaterialCost.getCode(), materialCost);
590
+                currentLevelCostTypeDetail.put(FeeTypeEnum.LaborCost.getCode(), laborCost);
591
+                currentLevelCostTypeDetail.put(FeeTypeEnum.EquipmentFee.getCode(), equipmentCost);
592
+                currentLevelCostTypeDetail.put(FeeTypeEnum.SupplyMaterialFee.getCode(), supplyMaterialCost);
593
+                currentLevelCostTypeDetail.put(FeeTypeEnum.DriverFee.getCode(), driveCost);
594
+                currentLevelCostTypeDetail.put(FeeTypeEnum.LogisticsFee.getCode(), logisticsCost);
595
+                currentLevelCostTypeDetail.put(FeeTypeEnum.OtherFee.getCode(), otherCost);
596
+                //统计本阶不同费用类别工时、小时费率
597
+                currentLevelCostTypeDetail.put(HourOrRateTypeEnum.MaterialUnitPrice.getCode(), materialUnitPrice);
598
+                currentLevelCostTypeDetail.put(HourOrRateTypeEnum.LaborHour.getCode(), laborHour);
599
+                currentLevelCostTypeDetail.put(HourOrRateTypeEnum.LaborHourRate.getCode(), laborHourRate);
600
+                currentLevelCostTypeDetail.put(HourOrRateTypeEnum.EquipmentHour.getCode(), equipmentHour);
601
+                currentLevelCostTypeDetail.put(HourOrRateTypeEnum.EquipmentHourRate.getCode(), equipmentHourRate);
602
+                currentLevelCostTypeDetail.put(HourOrRateTypeEnum.SupplyMaterialHour.getCode(), supplyMaterialHour);
603
+                currentLevelCostTypeDetail.put(HourOrRateTypeEnum.SupplyMaterialHourRate.getCode(), supplyMaterialHourRate);
604
+                currentLevelCostTypeDetail.put(HourOrRateTypeEnum.DriverHour.getCode(), driveHour);
605
+                currentLevelCostTypeDetail.put(HourOrRateTypeEnum.DriverHourRate.getCode(), driveHourRate);
606
+                currentLevelCostTypeDetail.put(HourOrRateTypeEnum.OtherHour.getCode(), otherHour);
607
+                currentLevelCostTypeDetail.put(HourOrRateTypeEnum.OtherHourRate.getCode(), otherHourRate);
608
+                AppSceneCostResultValue resultValue = AppSceneCostResultValue.builder().belongTopMaterialNo(topMaterialCode).marterialNo(key).parentMarterialNo(currentMaterialCost.getParentMarterialNo()).taskType(taskType).taskCode(taskCode).flowInstanceId(flowInstanceId).countValue(currentCost.toString()).costDetail(JSON.toJSONString(currentLevelCostTypeDetail)).costType(costType).build();
609
+                standardCostService.iAppSceneCostResultValueService.save(resultValue);
610
+            }
611
+            //3.计算出所有的单个物料的累计标准成本
612
+            List<AppSceneCostResultValue> standardCostList = standardCostService.iAppSceneCostResultValueService.getResultValueByTopMaterialNo(topMaterialCode, taskType, flowInstanceId);
613
+            //【累计成本】的计算
614
+            totalCountCost(standardCostList, topMaterialCode, taskType, taskCode, flowInstanceId);
615
+        } catch (Exception e) {
616
+            e.printStackTrace();
617
+            throw new RuntimeException("计算成本失败");
618
+        }
619
+    }
620
+
621
+    /**
622
+     * 循环算出各个物料的累计成本
623
+     *
624
+     * @param standardCostList
625
+     * @param topMaterialCode
626
+     * @param taskType
627
+     * @param taskCode
628
+     * @param flowInstanceId
629
+     */
630
+    private static void totalCountCost(List<AppSceneCostResultValue> standardCostList, String topMaterialCode, String taskType, String taskCode, String flowInstanceId) {
631
+        try {
632
+            List<AppSceneCostStandardDetail> costStandardDetails = new ArrayList<>();
633
+            //父类对应的子节点(除了最上层节点)
634
+            Map<String, List<AppSceneCostResultValue>> parentMaterialNoMap = standardCostList.stream().filter(appSceneCostResultValue -> appSceneCostResultValue.getParentMarterialNo() != null).collect(Collectors.groupingBy(AppSceneCostResultValue::getParentMarterialNo));
635
+            for (int i = 0; i < standardCostList.size(); i++) {
636
+                //当前节点及其对应的本阶成本
637
+                AppSceneCostResultValue oldAppSceneCostResultValue = standardCostList.get(i);
638
+                BigDecimal totalCost = new BigDecimal(oldAppSceneCostResultValue.getCountValue());
639
+                //循环计算出当前节点的累计成本
640
+                String costDetail = oldAppSceneCostResultValue.getCostDetail();
641
+                //查询当前节点各个类型的成本
642
+                BigDecimal totalMaterialCost = new BigDecimal(0);
643
+                BigDecimal totalLabourCost = new BigDecimal(0);
644
+                BigDecimal totalEquipmentCost = new BigDecimal(0);
645
+                BigDecimal totalSupplyMaterialCost = new BigDecimal(0);
646
+                BigDecimal totalDriveCost = new BigDecimal(0);
647
+                BigDecimal totalLogisticsCost = new BigDecimal(0);
648
+                BigDecimal totalOtherCost = new BigDecimal(0);
649
+                JSONObject costDetailJson = JSON.parseObject(costDetail);
650
+                TotalResultValue hourOrRateResultValue = loopCount(oldAppSceneCostResultValue, parentMaterialNoMap, totalMaterialCost, totalLabourCost, totalEquipmentCost, totalSupplyMaterialCost, totalDriveCost, totalLogisticsCost, totalOtherCost, totalCost);
651
+                costDetailJson.put(TotalCostEnum.TotalMaterialCost.getCode(), hourOrRateResultValue.getTotalMaterialCost());
652
+                costDetailJson.put(TotalCostEnum.TotalLaborCost.getCode(), hourOrRateResultValue.getTotalLabourCost());
653
+                costDetailJson.put(TotalCostEnum.TotalEquipmentFee.getCode(), hourOrRateResultValue.getTotalEquipmentCost());
654
+                costDetailJson.put(TotalCostEnum.TotalSupplyMaterialFee.getCode(), hourOrRateResultValue.getTotalSupplyMaterialCost());
655
+                costDetailJson.put(TotalCostEnum.TotalDriverFee.getCode(), hourOrRateResultValue.getTotalDriveCost());
656
+                costDetailJson.put(TotalCostEnum.TotalLogisticsFee.getCode(), hourOrRateResultValue.getTotalLogisticsCost());
657
+                costDetailJson.put(TotalCostEnum.TotalOtherFee.getCode(), hourOrRateResultValue.getTotalOtherCost());
658
+                costDetailJson.put(TotalCostEnum.TotalStandardCost.getCode(), hourOrRateResultValue.getTotalCost());
659
+                oldAppSceneCostResultValue.setCostDetail(costDetailJson.toJSONString());
660
+                oldAppSceneCostResultValue.setTotalValue(hourOrRateResultValue.getTotalCost().toString());
661
+                standardCostService.iAppSceneCostResultValueService.updateById(oldAppSceneCostResultValue);
662
+                //构造单行成本查询记录
663
+                AppSceneCostStandardDetail costStandardDetail = AppSceneCostStandardDetail.builder().materialNumber(oldAppSceneCostResultValue.getMarterialNo()).materialName(oldAppSceneCostResultValue.getMarterialNo()).parentMaterialNumber(oldAppSceneCostResultValue.getParentMarterialNo())
664
+//                    .versionNumber()
665
+//                    .level()
666
+//                    .sort()
667
+//                    .figureNumber()
668
+                        .dosage(oldAppSceneCostResultValue.getNum() != null ? new Double(oldAppSceneCostResultValue.getNum()) : 0).unit(oldAppSceneCostResultValue.getUnit()).materialCost(costDetailJson.getBigDecimal(FeeTypeEnum.MaterialCost.getCode())).laborCost(costDetailJson.getBigDecimal(FeeTypeEnum.LaborCost.getCode())).equipmentCost(costDetailJson.getBigDecimal(FeeTypeEnum.EquipmentFee.getCode())).supplyMaterialCost(costDetailJson.getBigDecimal(FeeTypeEnum.SupplyMaterialFee.getCode())).driveCost(costDetailJson.getBigDecimal(FeeTypeEnum.DriverFee.getCode())).logisticsCost(costDetailJson.getBigDecimal(FeeTypeEnum.LogisticsFee.getCode())).otherCost(costDetailJson.getBigDecimal(FeeTypeEnum.OtherFee.getCode())).currentStandardCost(new BigDecimal(oldAppSceneCostResultValue.getCountValue())).totalMaterialCost(costDetailJson.getBigDecimal(TotalCostEnum.TotalMaterialCost.getCode())).totalLaborCost(costDetailJson.getBigDecimal(TotalCostEnum.TotalLaborCost.getCode())).totalEquipmentCost(costDetailJson.getBigDecimal(TotalCostEnum.TotalEquipmentFee.getCode())).totalSupplyMaterialCost(costDetailJson.getBigDecimal(TotalCostEnum.TotalSupplyMaterialFee.getCode())).totalDriveCost(costDetailJson.getBigDecimal(TotalCostEnum.TotalDriverFee.getCode())).totalLogisticsCost(costDetailJson.getBigDecimal(TotalCostEnum.TotalLogisticsFee.getCode())).totalOtherCost(costDetailJson.getBigDecimal(TotalCostEnum.TotalOtherFee.getCode())).totalStandardCost(costDetailJson.getBigDecimal(TotalCostEnum.TotalStandardCost.getCode())).createTime(new Date()).build();
669
+                costStandardDetails.add(costStandardDetail);
670
+            }
671
+            //更新结果集到标准成本单行查询中去
672
+            standardCostService.iAppSceneCostStandardDetailService.saveBatch(costStandardDetails);
673
+        } catch (Exception e) {
674
+            e.printStackTrace();
675
+        }
676
+    }
677
+
678
+    /**
679
+     * //循环算出各个物料的累计成本
680
+     * 递归计算出累计成本
681
+     *
682
+     * @param appSceneCostResultValue
683
+     * @param parentMaterialNoMap
684
+     */
685
+    private static TotalResultValue loopCount(AppSceneCostResultValue appSceneCostResultValue, Map<String, List<AppSceneCostResultValue>> parentMaterialNoMap, BigDecimal totalMaterialCost, BigDecimal totalLabourCost, BigDecimal totalEquipmentCost, BigDecimal totalSupplyMaterialCost, BigDecimal totalDriveCost, BigDecimal totalLogisticsCost, BigDecimal totalOtherCost, BigDecimal totalCost) {
686
+        String marterialNo = appSceneCostResultValue.getMarterialNo();
687
+        if (parentMaterialNoMap.containsKey(marterialNo)) {
688
+            //获取当前节点的子节点并遍历
689
+            List<AppSceneCostResultValue> appSceneCostResultValues = parentMaterialNoMap.get(marterialNo);
690
+            for (int j = 0; j < appSceneCostResultValues.size(); j++) {
691
+                AppSceneCostResultValue appSceneCostResultValue1 = appSceneCostResultValues.get(j);
692
+                String countValue = appSceneCostResultValue1.getCountValue();
693
+                //标准成本累计
694
+                if (countValue != null) {
695
+                    totalCost = totalCost.add(new BigDecimal(countValue));
696
+                }
697
+                //各个费用类别成本累计
698
+                if (appSceneCostResultValue1.getCostDetail() != null) {
699
+                    JSONObject costDetailJson = JSON.parseObject(appSceneCostResultValue1.getCostDetail());
700
+                    if (costDetailJson != null) {
701
+                        totalMaterialCost = totalMaterialCost.add(costDetailJson.getBigDecimal(FeeTypeEnum.MaterialCost.getCode()));
702
+                        totalLabourCost = totalLabourCost.add(costDetailJson.getBigDecimal(FeeTypeEnum.LaborCost.getCode()));
703
+                        totalEquipmentCost = totalEquipmentCost.add(costDetailJson.getBigDecimal(FeeTypeEnum.EquipmentFee.getCode()));
704
+                        totalSupplyMaterialCost = totalSupplyMaterialCost.add(costDetailJson.getBigDecimal(FeeTypeEnum.SupplyMaterialFee.getCode()));
705
+                        totalDriveCost = totalDriveCost.add(costDetailJson.getBigDecimal(FeeTypeEnum.DriverFee.getCode()));
706
+                        totalLogisticsCost = totalLogisticsCost.add(costDetailJson.getBigDecimal(FeeTypeEnum.LogisticsFee.getCode()));
707
+                        totalOtherCost = totalOtherCost.add(costDetailJson.getBigDecimal(FeeTypeEnum.OtherFee.getCode()));
708
+                    }
709
+                }
710
+                //判断当前子节点是否还有子节点
711
+                if (parentMaterialNoMap.containsKey(appSceneCostResultValue1.getMarterialNo())) {
712
+                    //如果还有子节点则继续递归
713
+                    loopCount(appSceneCostResultValue1, parentMaterialNoMap, totalMaterialCost, totalLabourCost, totalEquipmentCost, totalSupplyMaterialCost, totalDriveCost, totalLogisticsCost, totalOtherCost, totalCost);
714
+                }
715
+            }
716
+        }
717
+        TotalResultValue hourOrRateResultValue = TotalResultValue.builder().totalMaterialCost(totalMaterialCost).totalLabourCost(totalLabourCost).totalEquipmentCost(totalEquipmentCost).totalSupplyMaterialCost(totalSupplyMaterialCost).totalDriveCost(totalDriveCost).totalLogisticsCost(totalLogisticsCost).totalOtherCost(totalOtherCost).totalCost(totalCost).build();
718
+        appSceneCostResultValue.setTotalValue(totalCost.toString());
719
+        return hourOrRateResultValue;
720
+    }
721
+}

+ 52
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/plugin/laborcost/LaborCostParameters.java View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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
+}

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/BomTreeService.java View File

1
+package com.zzsmart.qomo.kn.cost.manage.service;
2
+
3
+import com.zzsmart.qomo.kn.cost.manage.vo.BomTreeInfoVO;
4
+
5
+import java.util.List;
6
+
7
+public interface BomTreeService {
8
+    /**
9
+     * 根据物料号查询物料树
10
+     * @param materialNumber
11
+     * @return
12
+     */
13
+    List<BomTreeInfoVO> getBomTreeByMaterialNumber(String materialNumber, String version_number);
14
+}

+ 35
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostCountService.java View File

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
+import com.zzsmart.qomo.kn.cost.manage.vo.MissingComponentVO;
6
+
7
+import java.util.List;
8
+
9
+/**
10
+ * @Description: app_scene_cost_count
11
+ * @Author: jeecg-boot
12
+ * @Date:   2024-07-29
13
+ * @Version: V1.0
14
+ */
15
+public interface IAppSceneCostCountService extends IService<AppSceneCostCount> {
16
+    /**
17
+     * 查看关键缺失部件
18
+     * @param id
19
+     * @return
20
+     */
21
+    List<MissingComponentVO> queryMissingComponentById(String id);
22
+
23
+    /**
24
+     * 重新计算
25
+     * @param id
26
+     * @return
27
+     */
28
+    AppSceneCostCount recountById(Integer id);
29
+
30
+    /**
31
+     * 添加标准成本计算任务
32
+     * @param appSceneCostCount
33
+     */
34
+    void addCostCountTask(AppSceneCostCount appSceneCostCount);
35
+}

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostHourRateService.java View File

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.AppSceneCostHourRate;
5
+
6
+/**
7
+ * @Description: app_scene_cost_hour_rate
8
+ * @Author: jeecg-boot
9
+ * @Date:   2024-08-02
10
+ * @Version: V1.0
11
+ */
12
+public interface IAppSceneCostHourRateService extends IService<AppSceneCostHourRate> {
13
+
14
+}

+ 28
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostMaterialBomService.java View File

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.AppSceneCostMaterialBom;
5
+
6
+import java.util.List;
7
+
8
+/**
9
+ * @Description: app_scene_cost_material_bom
10
+ * @Author: jeecg-boot
11
+ * @Date:   2024-08-02
12
+ * @Version: V1.0
13
+ */
14
+public interface IAppSceneCostMaterialBomService extends IService<AppSceneCostMaterialBom> {
15
+    /**
16
+     * 分页查询
17
+     * @param
18
+     * @return
19
+     */
20
+    List<AppSceneCostMaterialBom> queryListResult(String materialNumber);
21
+
22
+    /**
23
+     * 查询最顶层物料编号下所有的物料
24
+     * @param topMaterialCode
25
+     * @return
26
+     */
27
+    List<AppSceneCostMaterialBom> queryAllBomInfoBytopMaterialCode(String topMaterialCode);
28
+}

+ 22
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostMaterialProcessHoursService.java View File

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.AppSceneCostMaterialProcessHours;
5
+import com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostMaterialProcessHoursMapper;
6
+
7
+import java.util.List;
8
+import java.util.Map;
9
+
10
+/**
11
+ * @Description: app_scene_cost_material_process_hours
12
+ * @Author: jeecg-boot
13
+ * @Date:   2024-08-02
14
+ * @Version: V1.0
15
+ */
16
+public interface IAppSceneCostMaterialProcessHoursService extends IService<AppSceneCostMaterialProcessHours> {
17
+    /**
18
+     * 查询满足物料编号的工时工序
19
+     */
20
+    Map<String, List<AppSceneCostMaterialProcessHours>> getProcessHoursByMaterialNo(List<String> materialNos);
21
+
22
+}

+ 24
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostModelService.java View File

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
+}

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostPartMissingInfoService.java View File

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.AppSceneCostPartMissingInfo;
5
+
6
+/**
7
+ * @Description: app_scene_cost_part_missing_info
8
+ * @Author: jeecg-boot
9
+ * @Date: 2024-08-02
10
+ * @Version: V1.0
11
+ */
12
+public interface IAppSceneCostPartMissingInfoService extends IService<AppSceneCostPartMissingInfo> {
13
+
14
+}

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostPurchaseEvaluateService.java View File

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.AppSceneCostPurchaseEvaluate;
5
+
6
+/**
7
+ * @Description: app_scene_cost_purchase_evaluate
8
+ * @Author: jeecg-boot
9
+ * @Date: 2024-08-02
10
+ * @Version: V1.0
11
+ */
12
+public interface IAppSceneCostPurchaseEvaluateService extends IService<AppSceneCostPurchaseEvaluate> {
13
+
14
+}

+ 22
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostPurchasePriceService.java View File

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.AppSceneCostPurchasePrice;
5
+
6
+import java.math.BigDecimal;
7
+import java.util.List;
8
+import java.util.Map;
9
+
10
+/**
11
+ * @Description: app_scene_cost_purchase_price
12
+ * @Author: jeecg-boot
13
+ * @Date:   2024-08-02
14
+ * @Version: V1.0
15
+ */
16
+public interface IAppSceneCostPurchasePriceService extends IService<AppSceneCostPurchasePrice> {
17
+    /**
18
+     * 查询满足物料编号的最低采购价
19
+     */
20
+    Map<String, BigDecimal> getMinCostPurchasePriceByMaterialNo(List<String> materialNos);
21
+
22
+}

+ 31
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostResultValueService.java View File

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
+     *
18
+     * @param topMaterialCode
19
+     * @return
20
+     */
21
+    List<AppSceneCostResultValue> getResultValueByTopMaterialNo(String topMaterialCode, String taskType, String flowInstanceId);
22
+
23
+    /**
24
+     * 查询根物料的某次成本计算流程下的所有结果值
25
+     *
26
+     * @param topMaterialCode
27
+     * @param flowInstanceId
28
+     * @return
29
+     */
30
+    List<AppSceneCostResultValue> getAllResultValueByTopMaterialNo(String topMaterialCode, String flowInstanceId);
31
+}

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostStandardDetailService.java View File

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.AppSceneCostStandardDetail;
5
+
6
+/**
7
+ * @Description: app_scene_cost_standard_detail
8
+ * @Author: jeecg-boot
9
+ * @Date:   2024-07-31
10
+ * @Version: V1.0
11
+ */
12
+public interface IAppSceneCostStandardDetailService extends IService<AppSceneCostStandardDetail> {
13
+
14
+}

+ 14
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/IAppSceneCostStandardVersionService.java View File

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.AppSceneCostStandardVersion;
5
+
6
+/**
7
+ * @Description: app_scene_cost_standard_version
8
+ * @Author: jeecg-boot
9
+ * @Date:   2024-08-02
10
+ * @Version: V1.0
11
+ */
12
+public interface IAppSceneCostStandardVersionService extends IService<AppSceneCostStandardVersion> {
13
+
14
+}

+ 0
- 0
qomo-kn-cost-manage/src/main/java/com/zzsmart/qomo/kn/cost/manage/service/impl/AppSceneCostCountServiceImpl.java View File


Some files were not shown because too many files changed in this diff