Compare commits
382 Commits
685ba9473b
...
7e2473051b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e2473051b | ||
|
|
ea02e5af4e | ||
|
|
dad22ec7ec | ||
|
|
ca62e80e37 | ||
|
|
75c1de4f90 | ||
|
|
d2b814bb7d | ||
|
|
5a6e561eb8 | ||
|
|
324d07d6c7 | ||
|
|
240b64c41f | ||
|
|
2b7dd97c64 | ||
|
|
7e08ec9ec4 | ||
|
|
923e420027 | ||
|
|
be915bff5d | ||
|
|
8d8a5eba9a | ||
|
|
9a82f22ce7 | ||
|
|
b84faed0cc | ||
|
|
b934996b74 | ||
|
|
ec2d913bbf | ||
|
|
8216466ee7 | ||
|
|
707e7d779a | ||
|
|
1779f48a43 | ||
|
|
6ba4bdec2c | ||
|
|
3352f6cbac | ||
|
|
b8de5bfda7 | ||
|
|
71ba93c7db | ||
|
|
dc037e6abf | ||
|
|
515b79d115 | ||
|
|
cc0f004288 | ||
|
|
07e921da06 | ||
|
|
51638fa623 | ||
|
|
0b83979dfc | ||
|
|
d71300ee7f | ||
|
|
8bb76b85ab | ||
|
|
41634a720a | ||
|
|
1bb5c117d2 | ||
|
|
47473d9844 | ||
|
|
62fe6fb7cc | ||
|
|
33e5478ae3 | ||
|
|
4007160524 | ||
|
|
15a3c07e8b | ||
|
|
fec079e2fe | ||
|
|
6d9dafe364 | ||
|
|
a5f972db14 | ||
|
|
7f271ce807 | ||
|
|
b597920d55 | ||
|
|
65dc1db9c1 | ||
|
|
5f14fe798d | ||
|
|
6602fcd6e3 | ||
|
|
2963fab2a6 | ||
|
|
bee606926a | ||
|
|
78cd6e4cbd | ||
|
|
251176c88d | ||
|
|
8d201b41f3 | ||
|
|
3ca290e274 | ||
|
|
49b84fbf7b | ||
|
|
bcf01d452d | ||
|
|
3ef89280ee | ||
|
|
05de361806 | ||
|
|
79e1f91a1e | ||
|
|
38a6b695f0 | ||
|
|
27a61f78a3 | ||
|
|
5bcf34ab44 | ||
|
|
d77f4b1411 | ||
|
|
4d2c2ce6c4 | ||
|
|
d5df640fbf | ||
|
|
897d7e4d3e | ||
|
|
ed8b9c808a | ||
|
|
5fd5b1fc35 | ||
|
|
98dc345c5f | ||
|
|
3277fd5d89 | ||
|
|
08a0b4c1c9 | ||
|
|
2466b022cc | ||
|
|
6e5b24bb3a | ||
|
|
793a5acba9 | ||
|
|
93aff069c5 | ||
|
|
f2f4170b0e | ||
|
|
5d812fb149 | ||
|
|
e7e1f0ace6 | ||
|
|
cd5a942f7b | ||
|
|
b819904205 | ||
|
|
7c61b8eacf | ||
|
|
22e0a30a74 | ||
|
|
a279414aef | ||
|
|
34205bc1a6 | ||
|
|
b2e56f1c7f | ||
|
|
5877705ac3 | ||
|
|
b5f142cc3e | ||
|
|
62914e6055 | ||
|
|
af6b6342c1 | ||
|
|
11318f10b1 | ||
|
|
97b71a1e8c | ||
|
|
1732d1424b | ||
|
|
f8d83607a7 | ||
|
|
9ea70b0dc4 | ||
|
|
bea4a3fe74 | ||
|
|
f33259910b | ||
|
|
c31b08f648 | ||
|
|
cd294b3d3f | ||
|
|
3e93981058 | ||
|
|
9f2f242dd8 | ||
|
|
2ebfa4ab9a | ||
|
|
00c0a53c68 | ||
|
|
078dca116a | ||
|
|
ae4371be81 | ||
|
|
b0a1c62c1e | ||
|
|
438955dd63 | ||
|
|
44ee8b5ec9 | ||
|
|
08a8929829 | ||
|
|
537bbc0742 | ||
|
|
77603fa14a | ||
|
|
e2db356035 | ||
|
|
0627738efb | ||
|
|
1b61bd576b | ||
|
|
6a25cd9c2c | ||
|
|
47fd100b44 | ||
|
|
1ea3e847b4 | ||
|
|
57d07bc1da | ||
|
|
10d0dd1dc2 | ||
|
|
512c998d7d | ||
|
|
9d4c938083 | ||
|
|
47b256c8d0 | ||
|
|
c5da270de1 | ||
|
|
5add91ea01 | ||
|
|
6760ba3662 | ||
|
|
351d406af4 | ||
|
|
7f6f84ccf1 | ||
|
|
3827d7050f | ||
|
|
5586e714a9 | ||
|
|
84b297f05f | ||
|
|
991bba95f0 | ||
|
|
dde9805c05 | ||
|
|
c32d27ad3f | ||
|
|
098dc4c572 | ||
|
|
4b6bd9cec5 | ||
|
|
7a0dbadf2e | ||
|
|
cb554f35f3 | ||
|
|
426c410818 | ||
|
|
960c5b5b25 | ||
|
|
9eb3198ce1 | ||
|
|
73df6ca1a5 | ||
|
|
73b1a59a66 | ||
|
|
cbc1f0f853 | ||
|
|
64fc98a479 | ||
|
|
7a05d1bd3f | ||
|
|
3c29066d5c | ||
|
|
92819cee70 | ||
|
|
60f73d545a | ||
|
|
e09f094939 | ||
|
|
9be0745c03 | ||
|
|
7bc4577ff5 | ||
|
|
90d3db4f6d | ||
|
|
be7bee1300 | ||
|
|
69375988c2 | ||
|
|
4bc69718d8 | ||
|
|
791fe644bf | ||
|
|
b3cbd8cec1 | ||
|
|
9c02a24642 | ||
|
|
6c9cb29af2 | ||
|
|
52a97db86e | ||
|
|
1ece64e911 | ||
|
|
960a34428e | ||
|
|
836b2ba65d | ||
|
|
146f59c091 | ||
|
|
39034b257e | ||
|
|
d3df4bb2c7 | ||
|
|
529728fc0f | ||
|
|
59067c07a5 | ||
|
|
80128e275d | ||
|
|
cc5ba069b6 | ||
|
|
3a682d0b23 | ||
|
|
398432ddd1 | ||
|
|
84b44166ee | ||
|
|
a2b9e04571 | ||
|
|
c0958dc342 | ||
|
|
d2471d3d8a | ||
|
|
8d0175a13d | ||
|
|
ac27409776 | ||
|
|
7defbbed90 | ||
|
|
ec06f67098 | ||
|
|
44d7945f0d | ||
|
|
227c9afc4c | ||
|
|
ec1d99d06b | ||
|
|
51ab71dc4c | ||
|
|
fe27a36e7c | ||
|
|
f088f78338 | ||
|
|
2f82bf5d10 | ||
|
|
bb4043d8ce | ||
|
|
6ff755a3da | ||
|
|
823e66198c | ||
|
|
a71c6756a4 | ||
|
|
9ac3405048 | ||
|
|
f4d4a2afe2 | ||
|
|
2cec8e01db | ||
|
|
088a7c3f2d | ||
|
|
93104c7cbb | ||
|
|
37a9d622ee | ||
|
|
335ea4d9ec | ||
|
|
3a5ec948fd | ||
|
|
b510dfa731 | ||
|
|
ac06ad62d0 | ||
|
|
0a803c367d | ||
|
|
8a4c49059d | ||
|
|
2aed717aa1 | ||
|
|
d821b9616e | ||
|
|
969882b618 | ||
|
|
04e94b752f | ||
|
|
0c49865166 | ||
|
|
7b8787d096 | ||
|
|
4ffa9eeb8f | ||
|
|
e803bee452 | ||
|
|
c3c004804b | ||
|
|
67d77b1765 | ||
|
|
d2f460b62f | ||
|
|
ad0312fc39 | ||
|
|
c53ef7cd7e | ||
|
|
250c0d9700 | ||
|
|
f30abf806b | ||
|
|
48d6408e92 | ||
|
|
240ad85a60 | ||
|
|
49fcf1086d | ||
|
|
64e93cc009 | ||
|
|
bd873339ee | ||
|
|
b82e7f127f | ||
|
|
d356f0af46 | ||
|
|
843dc28373 | ||
|
|
c4095ebe01 | ||
|
|
c936f5a5d3 | ||
|
|
66bb1f6334 | ||
|
|
084cecd7a5 | ||
|
|
4a08a2bebd | ||
|
|
1273f2433a | ||
|
|
4652df3572 | ||
|
|
322a454afa | ||
|
|
7a403d226c | ||
|
|
8a77acfa8b | ||
|
|
0b695b0ed9 | ||
|
|
bad4a03b39 | ||
|
|
a3fe2403a7 | ||
|
|
6bb603ea94 | ||
|
|
770036aecd | ||
|
|
a9a12c3044 | ||
|
|
2a3c10a84d | ||
|
|
d212a14840 | ||
|
|
75341ca6a9 | ||
|
|
f8522ef6ae | ||
|
|
a533b1eb49 | ||
|
|
0a178dc3f5 | ||
|
|
176933b606 | ||
|
|
7b6fd3b390 | ||
|
|
696accd8d2 | ||
|
|
75d08e32b1 | ||
|
|
b237f3ea7b | ||
|
|
2febb69147 | ||
|
|
1690dfe87c | ||
|
|
e19056f021 | ||
|
|
1b5f5f3874 | ||
|
|
bbc1970215 | ||
|
|
306d969bc1 | ||
|
|
f4bb887f09 | ||
|
|
6adda4ac72 | ||
|
|
2e65960bf1 | ||
|
|
4f50e517b8 | ||
|
|
116f2ba386 | ||
|
|
1b9e28be5a | ||
|
|
26be89f0c7 | ||
|
|
d6eaa44020 | ||
|
|
68af18ffa3 | ||
|
|
a3e3e1c2bc | ||
|
|
a0a9d741dd | ||
|
|
b4905ba143 | ||
|
|
584998b129 | ||
|
|
b2c7ca399a | ||
|
|
5a4d79449e | ||
|
|
216ecf75c5 | ||
|
|
b337a9412c | ||
|
|
cff5a9d31d | ||
|
|
feb7b490c9 | ||
|
|
8b187a6ff8 | ||
|
|
d325ceb06a | ||
|
|
7e282e80e4 | ||
|
|
7ca81a74b5 | ||
|
|
58612efd77 | ||
|
|
adcafa3784 | ||
|
|
05069e2846 | ||
|
|
f596500151 | ||
|
|
c39ffa54ee | ||
|
|
d5572c200b | ||
|
|
fb3dfaec48 | ||
|
|
dc37a2f587 | ||
|
|
b7cfe7485e | ||
|
|
ed94355886 | ||
|
|
925f4ab650 | ||
|
|
a65938b6af | ||
|
|
9603c7f1a7 | ||
|
|
3230fb9a44 | ||
|
|
b5c7c9b479 | ||
|
|
0d98763496 | ||
|
|
2d93ceda4f | ||
|
|
c6b01740ea | ||
|
|
e72e1c529c | ||
|
|
333cc203c3 | ||
|
|
1410eea250 | ||
|
|
f5c580cee6 | ||
|
|
e5e583d2c7 | ||
|
|
08f6177007 | ||
|
|
1395e89633 | ||
|
|
d7084b4f90 | ||
|
|
758477f666 | ||
|
|
1282ef43cc | ||
|
|
8acfaffb62 | ||
|
|
7cbb53856d | ||
|
|
d2b8f099ff | ||
|
|
0e66bdd8c9 | ||
|
|
078de8d7d4 | ||
|
|
61387b5698 | ||
|
|
2654acf624 | ||
|
|
d7960a138c | ||
|
|
b6086b7118 | ||
|
|
e6458fbb68 | ||
|
|
2117db4f1d | ||
|
|
b31d0a5ae1 | ||
|
|
f79074496b | ||
|
|
0e14063fd7 | ||
|
|
ad83edbc58 | ||
|
|
0550711c90 | ||
|
|
6e7822adef | ||
|
|
f8fa25eaba | ||
|
|
088e7ee26b | ||
|
|
4349503b33 | ||
|
|
13e6ca65a8 | ||
|
|
f4a84dfd80 | ||
|
|
e15918f787 | ||
|
|
3b26c22811 | ||
|
|
5c0d724619 | ||
|
|
6ce81171c3 | ||
|
|
901a748920 | ||
|
|
0a5f8c67f9 | ||
|
|
a63d90faf2 | ||
|
|
9ed4562cf3 | ||
|
|
302ef4c97d | ||
|
|
dc8117e330 | ||
|
|
cb6842bae8 | ||
|
|
fe6720a473 | ||
|
|
599e2a56ef | ||
|
|
52ae765c54 | ||
|
|
45d943a2dc | ||
|
|
806cf51cee | ||
|
|
35018c8695 | ||
|
|
9c2fa2667f | ||
|
|
ac7f461e85 | ||
|
|
7a2e1c478c | ||
|
|
6f53f89d10 | ||
|
|
b09e813518 | ||
|
|
c7d7679b6b | ||
|
|
1e9666e574 | ||
|
|
f4d33f7f10 | ||
|
|
53e8820378 | ||
|
|
491ac810db | ||
|
|
f4cb41323a | ||
|
|
264596e542 | ||
|
|
75280ec096 | ||
|
|
9ac4547d60 | ||
|
|
4956f81a83 | ||
|
|
6cb5903305 | ||
|
|
895aaf7c2e | ||
|
|
f76338cf8a | ||
|
|
556a7f5413 | ||
|
|
526ba98270 | ||
|
|
69680f83a2 | ||
|
|
c2170cb7e4 | ||
|
|
2dc7e2b312 | ||
|
|
86724233c8 | ||
|
|
ccf3cf125f | ||
|
|
a3611ee6f8 | ||
|
|
32a5bb7d0a | ||
|
|
128f97f073 | ||
|
|
da3065c637 | ||
|
|
ba69d40776 | ||
|
|
e3b918f0cb | ||
|
|
7683356829 | ||
|
|
94cf112651 | ||
|
|
b53dac572f |
@@ -1,23 +1,13 @@
|
||||
ARG BASE_IMAGE=172.16.46.66:10043/base-service/skywalking-agent-jre:9.7.0
|
||||
FROM ${BASE_IMAGE}
|
||||
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
||||
|
||||
# 设置应用目录
|
||||
RUN mkdir -p /app
|
||||
WORKDIR /app
|
||||
|
||||
# 复制应用文件
|
||||
COPY target/base-server.jar app.jar
|
||||
|
||||
# 设置环境变量
|
||||
ENV TZ=Asia/Shanghai
|
||||
ENV JAVA_OPTS="-Xms512m -Xmx512m"
|
||||
ENV SW_AGENT_HOME=/opt/skywalking/agent
|
||||
ENV SW_AGENT_NAME=base-server
|
||||
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES=172.16.46.63:30201
|
||||
ENV AGENT_JAVA_OPTS="-javaagent:${SW_AGENT_HOME}/skywalking-agent.jar -Dskywalking.agent.service_name=${SW_AGENT_NAME} -Dskywalking.collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES}"
|
||||
COPY target/base-server.jar /app/base-server.jar
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 48200
|
||||
|
||||
# 运行应用
|
||||
CMD java ${AGENT_JAVA_OPTS} ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar
|
||||
ENTRYPOINT ["java", "-jar", "/app/base-server.jar"]
|
||||
|
||||
@@ -82,6 +82,12 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- Seata 达梦数据库补丁,必须最先引入以覆盖 seata-all 中的类 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-seata-dm</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.seata</groupId>
|
||||
<artifactId>seata-spring-boot-starter</artifactId>
|
||||
|
||||
@@ -37,14 +37,26 @@ spring:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#username: SYSDBA
|
||||
#password: pgbsci6ddJ6Sqj@e
|
||||
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
|
||||
username: SYSDBA
|
||||
password: pgbsci6ddJ6Sqj@e
|
||||
password: P@ssword25
|
||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#username: SYSDBA
|
||||
#password: pgbsci6ddJ6Sqj@e
|
||||
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
|
||||
username: SYSDBA
|
||||
password: pgbsci6ddJ6Sqj@e
|
||||
password: P@ssword25
|
||||
mdm: # 主数据同步专用数据源(使用已引入的旧版 MySQL JDBC)
|
||||
url: jdbc:mysql://172.16.38.10:3306/mdmdev?useSSL=false&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai
|
||||
username: iworker
|
||||
password: iwork_87871A
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
|
||||
|
||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||
data:
|
||||
@@ -105,9 +117,13 @@ justauth:
|
||||
prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
|
||||
timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
|
||||
|
||||
# erp相关配置
|
||||
erp:
|
||||
address: hana-dev.yncic.com
|
||||
sapsys: ZTDEV203
|
||||
sapsys: ZTQAS600 # 测试
|
||||
#sapsys: ZTPRD800 # 正式
|
||||
srcsys: JYGK
|
||||
secret-key: JYGK # erp秘钥
|
||||
|
||||
eplat:
|
||||
share:
|
||||
|
||||
@@ -39,14 +39,20 @@ spring:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#username: SYSDBA
|
||||
#password: pgbsci6ddJ6Sqj@e
|
||||
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
|
||||
username: SYSDBA
|
||||
password: pgbsci6ddJ6Sqj@e
|
||||
password: P@ssword25
|
||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#username: SYSDBA
|
||||
#password: pgbsci6ddJ6Sqj@e
|
||||
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
|
||||
username: SYSDBA
|
||||
password: pgbsci6ddJ6Sqj@e
|
||||
password: P@ssword25
|
||||
|
||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||
data:
|
||||
@@ -95,9 +101,13 @@ zt:
|
||||
access-log: # 访问日志的配置项
|
||||
enable: true
|
||||
|
||||
# erp相关配置
|
||||
erp:
|
||||
address: hana-dev.yncic.com
|
||||
sapsys: ZTDEV203
|
||||
sapsys: ZTQAS600 # 测试
|
||||
#sapsys: ZTPRD800 # 正式
|
||||
srcsys: JYGK
|
||||
secret-key: JYGK # erp秘钥
|
||||
|
||||
eplat:
|
||||
share:
|
||||
|
||||
@@ -72,6 +72,8 @@ knife4j:
|
||||
|
||||
# MyBatis Plus 的配置项
|
||||
mybatis-plus:
|
||||
mapper-locations:
|
||||
- classpath*:mapper/**/*.xml
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
||||
global-config:
|
||||
|
||||
120
base-server/src/main/resources/logback-spring.xml
Normal file
120
base-server/src/main/resources/logback-spring.xml
Normal file
@@ -0,0 +1,120 @@
|
||||
<configuration>
|
||||
<!-- 引用 Spring Boot 的 logback 基础配置 -->
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
|
||||
<!-- 变量 zt.info.base-package,基础业务包 -->
|
||||
<springProperty scope="context" name="zt.info.base-package" source="zt.info.base-package"/>
|
||||
<!-- 格式化输出:%d 表示日期,%X{tid} SkWalking 链路追踪编号,%thread 表示线程名,%-5level:级别从左显示 5 个字符宽度,%msg:日志消息,%n是换行符 -->
|
||||
<property name="PATTERN_DEFAULT" value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} | %highlight(${LOG_LEVEL_PATTERN:-%5p} ${PID:- }) | %boldYellow(%thread [%tid]) %boldGreen(%-40.40logger{39}) | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
|
||||
<!--应用名称-->
|
||||
<springProperty scope="context" name="spring.application.name" source="spring.application.name"/>
|
||||
<!-- 日志输出路径 -->
|
||||
<property name="LOG_DIR" value="${user.home}/logs/${spring.application.name}"/>
|
||||
|
||||
<!-- 控制台 Appender -->
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
||||
<pattern>${PATTERN_DEFAULT}</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 文件 Appender -->
|
||||
<!-- 参考 Spring Boot 的 file-appender.xml 编写 -->
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
||||
<pattern>${PATTERN_DEFAULT}</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
<!-- 日志文件名 -->
|
||||
<file>${LOG_FILE}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!-- 滚动后的日志文件名 -->
|
||||
<fileNamePattern>${LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN:-${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz}</fileNamePattern>
|
||||
<!-- 启动服务时,是否清理历史日志,一般不建议清理 -->
|
||||
<cleanHistoryOnStart>${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false}</cleanHistoryOnStart>
|
||||
<!-- 日志文件,到达多少容量,进行滚动 -->
|
||||
<maxFileSize>${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-50MB}</maxFileSize>
|
||||
<!-- 日志文件的总大小,0 表示不限制 -->
|
||||
<totalSizeCap>${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0}</totalSizeCap>
|
||||
<!-- 日志文件的保留天数 -->
|
||||
<maxHistory>${LOGBACK_ROLLINGPOLICY_MAX_HISTORY:-30}</maxHistory>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
<!-- 异步写入日志,提升性能 -->
|
||||
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<!-- 不丢失日志。默认的,如果队列的 80% 已满,则会丢弃 TRACT、DEBUG、INFO 级别的日志 -->
|
||||
<discardingThreshold>0</discardingThreshold>
|
||||
<!-- 更改默认的队列的深度,该值会影响性能。默认值为 256 -->
|
||||
<queueSize>256</queueSize>
|
||||
<appender-ref ref="FILE"/>
|
||||
</appender>
|
||||
|
||||
<!-- SkyWalking GRPC 日志收集,实现日志中心。注意:SkyWalking 8.4.0 版本开始支持 -->
|
||||
<appender name="GRPC" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
||||
<pattern>${PATTERN_DEFAULT}</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- ERROR 级别日志 -->
|
||||
<appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_DIR}-error.log</file>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_DIR}-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<maxHistory>30</maxHistory> <!-- 保留30天的日志 -->
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--logback的日志级别 FATAL > ERROR > WARN > INFO > DEBUG-->
|
||||
<!-- 本地环境 -->
|
||||
<springProfile name="local,dev,fupf">
|
||||
<root level="WARN">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="ERROR"/>
|
||||
<appender-ref ref="GRPC"/> <!-- 本地环境下,如果不想接入 SkyWalking 日志服务,可以注释掉本行 -->
|
||||
<appender-ref ref="ASYNC"/> <!-- 本地环境下,如果不想打印日志,可以注释掉本行 -->
|
||||
</root>
|
||||
<!--针对不同的业务路径,配置dao层的sql打印日志级别为DEBUG-->
|
||||
<logger name="com.zt.plat.module.base.dal.mysql" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
<logger name="com.zt.plat.module.base.dal.dao" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
<logger name="com.zt.plat.module.contractorder.dal.mysql" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
<logger name="com.zt.plat.module.contractorder.dal.mysql" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
<logger name="com.zt.plat.module.erp.dal.mysql" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
|
||||
<logger name="com.zt.plat.module.base.dal.dao" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
</springProfile>
|
||||
|
||||
<!-- 其它环境 -->
|
||||
<springProfile name="test,stage,prod,default,fupf">
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="ERROR"/>
|
||||
<appender-ref ref="ASYNC"/>
|
||||
<appender-ref ref="GRPC"/>
|
||||
</root>
|
||||
</springProfile>
|
||||
</configuration>
|
||||
@@ -23,18 +23,21 @@ spec:
|
||||
containers:
|
||||
- name: base-server
|
||||
image: 172.16.46.66:10043/yudao/base-server:VERSION_PLACEHOLDER
|
||||
env:
|
||||
- name: TZ
|
||||
value: Asia/Shanghai
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 48100
|
||||
initialDelaySeconds: 10
|
||||
initialDelaySeconds: 50
|
||||
periodSeconds: 5
|
||||
failureThreshold: 3
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 48100
|
||||
initialDelaySeconds: 30
|
||||
initialDelaySeconds: 50
|
||||
periodSeconds: 10
|
||||
failureThreshold: 5
|
||||
resources:
|
||||
|
||||
58
pom.xml
58
pom.xml
@@ -19,7 +19,7 @@
|
||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||
|
||||
<properties>
|
||||
<revision>3.0.43</revision>
|
||||
<revision>3.0.47-SNAPSHOT</revision>
|
||||
<!-- Maven 相关 -->
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
@@ -63,6 +63,10 @@
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<!-- Java 9+ 推荐使用 release 参数 -->
|
||||
<release>${java.version}</release>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -145,7 +149,7 @@
|
||||
<repository>
|
||||
<id>ZT</id>
|
||||
<name>中铜 ZStack 私服</name>
|
||||
<url>http://172.16.46.63:30708/repository/test/</url>
|
||||
<url>http://172.16.46.63:30708/repository/zt-cloud/</url>
|
||||
<releases>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
<checksumPolicy>warn</checksumPolicy>
|
||||
@@ -163,14 +167,27 @@
|
||||
<name>中铜 ZStack 私服</name>
|
||||
<url>http://172.16.46.63:30708/repository/test/</url>
|
||||
</repository>
|
||||
<!-- <snapshotRepository>-->
|
||||
<!-- <id>ZT</id>-->
|
||||
<!-- <name>中铜 ZStack 私服</name>-->
|
||||
<!-- <url>https://your-nexus.example.com/repository/maven-snapshots/</url>-->
|
||||
<!-- </snapshotRepository>-->
|
||||
<snapshotRepository>
|
||||
<id>ZT-snap</id>
|
||||
<name>中铜 ZStack 私服</name>
|
||||
<url>http://172.16.46.63:30708/repository/test-snap/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>env-fupf</id>
|
||||
<properties>
|
||||
<env.name>fupf</env.name>
|
||||
<!--Nacos 配置-->
|
||||
<config.server-addr>172.16.46.63:30848</config.server-addr>
|
||||
<config.namespace>fupf</config.namespace>
|
||||
<config.group>DEFAULT_GROUP</config.group>
|
||||
<config.username>nacos</config.username>
|
||||
<config.password>P@ssword25</config.password>
|
||||
<config.version>1.0.0</config.version>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>env-dev</id>
|
||||
<properties>
|
||||
@@ -179,8 +196,8 @@
|
||||
<config.server-addr>172.16.46.63:30848</config.server-addr>
|
||||
<config.namespace>dev</config.namespace>
|
||||
<config.group>DEFAULT_GROUP</config.group>
|
||||
<config.username/>
|
||||
<config.password/>
|
||||
<config.username>nacos</config.username>
|
||||
<config.password>P@ssword25</config.password>
|
||||
<config.version>1.0.0</config.version>
|
||||
</properties>
|
||||
</profile>
|
||||
@@ -192,8 +209,8 @@
|
||||
<config.server-addr>172.16.46.63:30848</config.server-addr>
|
||||
<config.namespace>prod</config.namespace>
|
||||
<config.group>DEFAULT_GROUP</config.group>
|
||||
<config.username/>
|
||||
<config.password/>
|
||||
<config.username>nacos</config.username>
|
||||
<config.password>P@ssword25</config.password>
|
||||
<config.version>1.0.0</config.version>
|
||||
</properties>
|
||||
</profile>
|
||||
@@ -205,8 +222,8 @@
|
||||
<config.server-addr>172.16.46.63:30848</config.server-addr>
|
||||
<config.namespace>local</config.namespace>
|
||||
<config.group>DEFAULT_GROUP</config.group>
|
||||
<config.username/>
|
||||
<config.password/>
|
||||
<config.username>nacos</config.username>
|
||||
<config.password>P@ssword25</config.password>
|
||||
<config.version>1.0.0</config.version>
|
||||
</properties>
|
||||
</profile>
|
||||
@@ -219,7 +236,22 @@
|
||||
<profile>
|
||||
<id>qsj</id>
|
||||
<properties>
|
||||
<env.name>dev</env.name>
|
||||
<!--Nacos 配置-->
|
||||
<config.server-addr>172.16.46.63:30848</config.server-addr>
|
||||
<config.namespace>qsj</config.namespace>
|
||||
<config.group>DEFAULT_GROUP</config.group>
|
||||
<config.username>nacos</config.username>
|
||||
<config.password>P@ssword25</config.password>
|
||||
<config.version>1.0.0</config.version>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>klw-dev</id>
|
||||
<properties>
|
||||
<env.name>dev</env.name>
|
||||
<!--Nacos 配置-->
|
||||
<config.namespace>klw</config.namespace>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
35
sql/dm/2026-01-14帆软报表上传菜单.sql
Normal file
35
sql/dm/2026-01-14帆软报表上传菜单.sql
Normal file
@@ -0,0 +1,35 @@
|
||||
-- 帆软报表上传菜单(父级 1965981757204459521),请根据需要调整排序/图标
|
||||
|
||||
-- DM8 兼容写法:匿名块 + 变量赋值 + SELECT ... INTO
|
||||
BEGIN
|
||||
DECLARE
|
||||
v_parent_id BIGINT;
|
||||
v_menu_id BIGINT;
|
||||
v_button_id BIGINT;
|
||||
BEGIN
|
||||
v_parent_id := 1965981757204459521;
|
||||
|
||||
-- 计算主菜单 ID(非自增:使用当前最大值 + 1)
|
||||
SELECT COALESCE(MAX(id), 0) + 1 INTO v_menu_id FROM system_menu;
|
||||
|
||||
INSERT INTO system_menu(
|
||||
id, name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
) VALUES (
|
||||
v_menu_id, '帆软报表上传', '', 2, 0, v_parent_id,
|
||||
'fine-report-upload', 'ep:upload-filled', 'base/fineReportUpload/index', 0, 'FineReportUpload'
|
||||
);
|
||||
|
||||
-- 计算按钮 ID(非自增:再取最大值 + 1)
|
||||
SELECT COALESCE(MAX(id), 0) + 1 INTO v_button_id FROM system_menu;
|
||||
|
||||
INSERT INTO system_menu(
|
||||
id, name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
) VALUES (
|
||||
v_button_id, '帆软报表上传-上传', 'base:fine-report-template:upload', 3, 1, v_menu_id,
|
||||
'', '', '', 0
|
||||
);
|
||||
END;
|
||||
END;
|
||||
/
|
||||
29
sql/dm/2026-1-14物料相关表增加索引.sql
Normal file
29
sql/dm/2026-1-14物料相关表增加索引.sql
Normal file
@@ -0,0 +1,29 @@
|
||||
CREATE INDEX idx_hs_cls_tenant_deleted_cls
|
||||
ON bse_mtrl_hs_cls(tenant_id, deleted, CLS_ID, INF_ID);
|
||||
|
||||
CREATE INDEX idx_hs_cls_composite
|
||||
ON bse_mtrl_hs_cls(tenant_id, deleted, CLS_ID);
|
||||
|
||||
CREATE INDEX idx_mtrl_inf_tenant_deleted_id
|
||||
ON bse_mtrl_inf(tenant_id, deleted, id);
|
||||
|
||||
CREATE INDEX idx_mtrl_inf_tenant_deleted_cd
|
||||
ON bse_mtrl_inf(tenant_id, deleted, CD, id);
|
||||
|
||||
CREATE INDEX idx_mtrl_inf_cover
|
||||
ON bse_mtrl_inf(tenant_id, deleted, CD, id, NAME, RMK, create_time, update_time, creator, updater);
|
||||
|
||||
CREATE INDEX idx_hs_prps_tenant_deleted_inf
|
||||
ON bse_mtrl_hs_prps(tenant_id, deleted, INF_ID, PRPS_ID);
|
||||
|
||||
CREATE INDEX idx_hs_prps_tenant_inf_deleted
|
||||
ON bse_mtrl_hs_prps(tenant_id, INF_ID, deleted);
|
||||
|
||||
CREATE INDEX idx_hs_prps_cover
|
||||
ON bse_mtrl_hs_prps(tenant_id, deleted, INF_ID, PRPS_ID, UNT_ID, IS_KY, IS_MTNG, SRT, DEPT_ID);
|
||||
|
||||
CREATE INDEX idx_mtrl_prps_tenant_deleted_id
|
||||
ON bse_mtrl_prps(tenant_id, deleted, id);
|
||||
|
||||
CREATE INDEX idx_mtrl_prps_cover
|
||||
ON bse_mtrl_prps(tenant_id, deleted, id, CD, NAME, UNT_QTY_ID, DIC_DAT_VAL, DAT_TP, RMK, DEPT_ID);
|
||||
5
sql/dm/2026-1-8物料属性表新增字段.sql
Normal file
5
sql/dm/2026-1-8物料属性表新增字段.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE "BSE_MTRL_PRPS" ADD COLUMN "DEPT_ID" BIGINT;
|
||||
COMMENT ON COLUMN "BSE_MTRL_PRPS"."DEPT_ID" IS '部门ID,如果为空则表示通用属性,不为空则是对应部门的私有属性';
|
||||
|
||||
ALTER TABLE "BSE_MTRL_HS_PRPS" ADD COLUMN "DEPT_ID" BIGINT;
|
||||
COMMENT ON COLUMN "BSE_MTRL_HS_PRPS"."DEPT_ID" IS '部门ID,如果为空则表示通用属性,不为空则是对应部门的私有属性';
|
||||
@@ -35,6 +35,11 @@
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.zt.plat.module.api;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.api.dto.internalsupplyfactory.InternalSupplyFactoryDTO;
|
||||
import com.zt.plat.module.base.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - base")
|
||||
public interface InternalSupplyFactoryApi {
|
||||
String PREFIX = ApiConstants.PREFIX + "/internal-supply-factory";
|
||||
//批量创建
|
||||
@PostMapping(PREFIX + "/batch-create")
|
||||
CommonResult<List<InternalSupplyFactoryDTO>> batchCreate(@Valid @RequestBody List<InternalSupplyFactoryDTO> reqVO);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.zt.plat.module.api.dto.internalsupplyfactory;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 内部工厂新增/修改 Request VO")
|
||||
@Data
|
||||
public class InternalSupplyFactoryDTO {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9235")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@NotEmpty(message = "工厂名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "工厂编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "工厂编码不能为空")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "公司编号")
|
||||
private String erpCompanyNumber;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "绑定工厂名")
|
||||
private String relName;
|
||||
|
||||
@Schema(description = "绑定工厂编码")
|
||||
private String relnumber;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "操作类型")
|
||||
private String operationType;
|
||||
|
||||
@Schema(description = "公司名称-业务")
|
||||
private String erpCompanyName;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.zt.plat.module.base.api.businessdictionarytype;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.api.businessdictionarytype.dto.BusinessDictionaryDataDTO;
|
||||
import com.zt.plat.module.base.api.businessdictionarytype.dto.BusinessDictionaryTypePageReqDTO;
|
||||
import com.zt.plat.module.base.api.businessdictionarytype.dto.BusinessDictionaryTypeRespDTO;
|
||||
import com.zt.plat.module.base.api.businessdictionarytype.dto.BusinessDictionaryTypeSaveReqDTO;
|
||||
import com.zt.plat.module.base.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - 业务字典类型")
|
||||
public interface BusinessDictionaryTypeApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/business-dictionary-type";
|
||||
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "创建业务字典类型")
|
||||
CommonResult<BusinessDictionaryTypeRespDTO> createBusinessDictionaryType(@Valid @RequestBody BusinessDictionaryTypeSaveReqDTO createReqDTO);
|
||||
|
||||
@PutMapping(PREFIX + "/update")
|
||||
@Operation(summary = "更新业务字典类型")
|
||||
CommonResult<Boolean> updateBusinessDictionaryType(@Valid @RequestBody BusinessDictionaryTypeSaveReqDTO updateReqDTO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除业务字典类型")
|
||||
CommonResult<Boolean> deleteBusinessDictionaryType(@RequestParam("id") Long id);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete-list")
|
||||
@Operation(summary = "批量删除业务字典类型")
|
||||
CommonResult<Boolean> deleteBusinessDictionaryTypeList(@RequestBody List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "获得业务字典类型")
|
||||
CommonResult<BusinessDictionaryTypeRespDTO> getBusinessDictionaryType(@RequestParam("id") Long id);
|
||||
|
||||
@PostMapping(PREFIX + "/page")
|
||||
@Operation(summary = "获得业务字典类型分页")
|
||||
CommonResult<PageResult<BusinessDictionaryTypeRespDTO>> getBusinessDictionaryTypePage(@Valid @RequestBody BusinessDictionaryTypePageReqDTO pageReqDTO);
|
||||
|
||||
@GetMapping(PREFIX + "/business-dictionary-data/list-by-dictionary-type-id")
|
||||
@Operation(summary = "获得业务字典数据列表")
|
||||
CommonResult<List<BusinessDictionaryDataDTO>> getBusinessDictionaryDataListByDictionaryTypeId(@RequestParam("dictionaryTypeId") Long dictionaryTypeId);
|
||||
|
||||
@GetMapping(PREFIX + "/business-dictionary-data/list-by-type")
|
||||
@Operation(summary = "根据字典类型编码获取业务字典数据列表")
|
||||
CommonResult<List<BusinessDictionaryDataDTO>> getBusinessDictionaryDataListByType(@RequestParam("type") String type);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.zt.plat.module.base.api.businessdictionarytype.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 业务字典数据 DTO
|
||||
*/
|
||||
@Data
|
||||
public class BusinessDictionaryDataDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "1001")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "上级字典", example = "2001")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "字典类型", example = "3001")
|
||||
private Long dictionaryTypeId;
|
||||
|
||||
@Schema(description = "排序号", example = "10")
|
||||
private Long sort;
|
||||
|
||||
@Schema(description = "字典标签", example = "状态")
|
||||
private String label;
|
||||
|
||||
@Schema(description = "字典值", example = "ENABLE")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", example = "0")
|
||||
private Long status;
|
||||
|
||||
@Schema(description = "备注", example = "同义词")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.zt.plat.module.base.api.businessdictionarytype.dto;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 业务字典类型分页 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class BusinessDictionaryTypePageReqDTO extends PageParam {
|
||||
|
||||
@Schema(description = "字典名称", example = "物料状态")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "字典类型", example = "base_material_status")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", example = "0")
|
||||
private Long status;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.zt.plat.module.base.api.businessdictionarytype.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 业务字典类型 Response DTO
|
||||
*/
|
||||
@Data
|
||||
public class BusinessDictionaryTypeRespDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "11771")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "字典名称", example = "物料状态")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "字典类型", example = "base_material_status")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", example = "0")
|
||||
private Long status;
|
||||
|
||||
@Schema(description = "备注", example = "基础物料状态")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.zt.plat.module.base.api.businessdictionarytype.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务字典类型新增/修改 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class BusinessDictionaryTypeSaveReqDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "11771")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "字典名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "物料状态")
|
||||
@NotEmpty(message = "字典名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "字典类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "base_material_status")
|
||||
@NotEmpty(message = "字典类型不能为空")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", example = "0")
|
||||
private Long status;
|
||||
|
||||
@Schema(description = "备注", example = "基础物料状态")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "删除时间")
|
||||
private LocalDateTime delTime;
|
||||
|
||||
@Schema(description = "业务字典数据列表")
|
||||
private List<BusinessDictionaryDataDTO> businessDictionaryDatas;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.zt.plat.module.base.api.departmentmaterial;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.api.departmentmaterial.dto.DepartmentMaterialPageReqDTO;
|
||||
import com.zt.plat.module.base.api.departmentmaterial.dto.DepartmentMaterialRespDTO;
|
||||
import com.zt.plat.module.base.api.departmentmaterial.dto.DepartmentMaterialSaveReqDTO;
|
||||
import com.zt.plat.module.base.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - 组织架构物料")
|
||||
public interface DepartmentMaterialApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/department-material";
|
||||
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "创建组织架构物料")
|
||||
CommonResult<DepartmentMaterialRespDTO> createDepartmentMaterial(@Valid @RequestBody DepartmentMaterialSaveReqDTO createReqDTO);
|
||||
|
||||
@PutMapping(PREFIX + "/update")
|
||||
@Operation(summary = "更新组织架构物料")
|
||||
CommonResult<Boolean> updateDepartmentMaterial(@Valid @RequestBody DepartmentMaterialSaveReqDTO updateReqDTO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除组织架构物料")
|
||||
CommonResult<Boolean> deleteDepartmentMaterial(@RequestParam("id") Long id);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete-list")
|
||||
@Operation(summary = "批量删除组织架构物料")
|
||||
CommonResult<Boolean> deleteDepartmentMaterialList(@RequestBody List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "获得组织架构物料")
|
||||
CommonResult<DepartmentMaterialRespDTO> getDepartmentMaterial(@RequestParam("id") Long id);
|
||||
|
||||
@PostMapping(PREFIX + "/page")
|
||||
@Operation(summary = "获得组织架构物料分页")
|
||||
CommonResult<PageResult<DepartmentMaterialRespDTO>> getDepartmentMaterialPage(@Valid @RequestBody DepartmentMaterialPageReqDTO pageReqDTO);
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.zt.plat.module.base.api.departmentmaterial.dto;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* 组织架构物料分页 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class DepartmentMaterialPageReqDTO extends PageParam {
|
||||
|
||||
@Schema(description = "物料信息ID", example = "3923")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "物料信息ID集合(内部使用)")
|
||||
private List<Long> infomationIds;
|
||||
|
||||
@Schema(description = "物料分类ID", example = "30114")
|
||||
private Long classesId;
|
||||
|
||||
@Schema(description = "部门ID", example = "1001")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "字典数据值-物料类型")
|
||||
private String dictionaryDataValue;
|
||||
|
||||
@Schema(description = "状态编码", example = "1")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "是否是公司")
|
||||
private Boolean isCompany;
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.zt.plat.module.base.api.departmentmaterial.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 组织架构物料 Response DTO
|
||||
*/
|
||||
@Data
|
||||
public class DepartmentMaterialRespDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "5674")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料信息ID", example = "3923")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "物料分类ID", example = "30114")
|
||||
private Long classesId;
|
||||
|
||||
@Schema(description = "字典数据值-物料类型")
|
||||
private String dictionaryDataValue;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "部门ID")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料大类名称")
|
||||
private String categoryLargeName;
|
||||
|
||||
@Schema(description = "物料中类名称")
|
||||
private String categoryMediumName;
|
||||
|
||||
@Schema(description = "物料小类名称")
|
||||
private String categorySmallName;
|
||||
|
||||
@Schema(description = "物料分类路径")
|
||||
private String categoryPath;
|
||||
|
||||
@Schema(description = "组织物料类型名称")
|
||||
private String dictionaryDataLabel;
|
||||
|
||||
@Schema(description = "状态编码")
|
||||
private String status;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "物料基础字段 + 属性编码->原值的动态键值,基础字段优先,序列化时直接展开为顶层字段")
|
||||
private Map<String, Object> flatAttributes;
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getFlatAttributes() {
|
||||
return flatAttributes;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.zt.plat.module.base.api.departmentmaterial.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 组织架构物料新增/修改 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class DepartmentMaterialSaveReqDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "5674")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "部门ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001")
|
||||
@NotNull(message = "部门ID不能为空")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "物料信息ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3923")
|
||||
@NotNull(message = "物料信息ID不能为空")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "物料分类ID", example = "30114")
|
||||
private Long classesId;
|
||||
|
||||
@Schema(description = "字典数据值-物料类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "字典数据值-物料类型不能为空")
|
||||
private String dictionaryDataValue;
|
||||
|
||||
@Schema(description = "状态编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "状态不能为空")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.zt.plat.module.base.api.materialclasses;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.api.materialclasses.dto.MaterialClassesPageReqDTO;
|
||||
import com.zt.plat.module.base.api.materialclasses.dto.MaterialClassesRespDTO;
|
||||
import com.zt.plat.module.base.api.materialclasses.dto.MaterialClassesSaveReqDTO;
|
||||
import com.zt.plat.module.base.api.materialclasses.dto.MaterialClassesTreeRespDTO;
|
||||
import com.zt.plat.module.base.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - 物料分类")
|
||||
public interface MaterialClassesApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/material-classes";
|
||||
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "创建物料分类")
|
||||
CommonResult<MaterialClassesRespDTO> createMaterialClasses(@Valid @RequestBody MaterialClassesSaveReqDTO createReqDTO);
|
||||
|
||||
@PutMapping(PREFIX + "/update")
|
||||
@Operation(summary = "更新物料分类")
|
||||
CommonResult<Boolean> updateMaterialClasses(@Valid @RequestBody MaterialClassesSaveReqDTO updateReqDTO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除物料分类")
|
||||
CommonResult<Boolean> deleteMaterialClasses(@RequestParam("id") Long id);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete-list")
|
||||
@Operation(summary = "批量删除物料分类")
|
||||
CommonResult<Boolean> deleteMaterialClassesList(@RequestBody List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "获得物料分类")
|
||||
CommonResult<MaterialClassesRespDTO> getMaterialClasses(@RequestParam("id") Long id);
|
||||
|
||||
@PostMapping(PREFIX + "/page")
|
||||
@Operation(summary = "获得物料分类分页")
|
||||
CommonResult<PageResult<MaterialClassesRespDTO>> getMaterialClassesPage(@Valid @RequestBody MaterialClassesPageReqDTO pageReqDTO);
|
||||
|
||||
@GetMapping(PREFIX + "/tree")
|
||||
@Operation(summary = "获得物料分类树")
|
||||
CommonResult<List<MaterialClassesTreeRespDTO>> getMaterialClassesTree();
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.zt.plat.module.base.api.materialclasses.dto;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* 物料分类分页 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialClassesPageReqDTO extends PageParam {
|
||||
|
||||
@Schema(description = "父级ID", example = "20706")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "分类编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "分类名称", example = "原材料")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "分类级别-用于类别层级(大/中/小类)")
|
||||
private Long level;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.zt.plat.module.base.api.materialclasses.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 物料分类 Response DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialClassesRespDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "4051")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父级ID", example = "20706")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "分类编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "分类名称", example = "原材料")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "分类级别-用于类别层级(大/中/小类)")
|
||||
private Long level;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.zt.plat.module.base.api.materialclasses.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 物料分类新增/修改 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialClassesSaveReqDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "4051")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父级ID", example = "20706")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "分类编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "分类编码不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "原材料")
|
||||
@NotEmpty(message = "分类名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "分类级别-用于类别层级(大/中/小类)")
|
||||
private Long level;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.zt.plat.module.base.api.materialclasses.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料分类树 Response DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialClassesTreeRespDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "1001")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父级ID", example = "0")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "分类编码", example = "CL-001")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "分类名称", example = "原材料")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "分类级别")
|
||||
private Long level;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "子节点")
|
||||
private List<MaterialClassesTreeRespDTO> children = new ArrayList<>();
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.zt.plat.module.base.api.materialgradeext;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.api.materialgradeext.dto.MaterialGradeExtPageReqDTO;
|
||||
import com.zt.plat.module.base.api.materialgradeext.dto.MaterialGradeExtRespDTO;
|
||||
import com.zt.plat.module.base.api.materialgradeext.dto.MaterialGradeExtSaveReqDTO;
|
||||
import com.zt.plat.module.base.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - 物料牌号扩展")
|
||||
public interface MaterialGradeExtApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/material-grade-ext";
|
||||
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "创建物料牌号扩展")
|
||||
CommonResult<MaterialGradeExtRespDTO> create(@Valid @RequestBody MaterialGradeExtSaveReqDTO reqDTO);
|
||||
|
||||
@PutMapping(PREFIX + "/update")
|
||||
@Operation(summary = "更新物料牌号扩展")
|
||||
CommonResult<Boolean> update(@Valid @RequestBody MaterialGradeExtSaveReqDTO reqDTO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除物料牌号扩展")
|
||||
CommonResult<Boolean> delete(@RequestParam("id") Long id);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete-list")
|
||||
@Operation(summary = "批量删除物料牌号扩展")
|
||||
CommonResult<Boolean> deleteList(@RequestBody List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "获得物料牌号扩展")
|
||||
CommonResult<MaterialGradeExtRespDTO> get(@RequestParam("id") Long id);
|
||||
|
||||
@PostMapping(PREFIX + "/page")
|
||||
@Operation(summary = "获得物料牌号扩展分页")
|
||||
CommonResult<PageResult<MaterialGradeExtRespDTO>> getPage(@Valid @RequestBody MaterialGradeExtPageReqDTO pageReqDTO);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.zt.plat.module.base.api.materialgradeext.dto;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Data
|
||||
public class MaterialGradeExtPageReqDTO extends PageParam {
|
||||
|
||||
private String companyCode;
|
||||
private String companyName;
|
||||
private String materialCode;
|
||||
private String materialName;
|
||||
private String chineseBrand;
|
||||
private String englishBrand;
|
||||
private String specificationModel;
|
||||
private String lineType;
|
||||
private String packageDesc;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.zt.plat.module.base.api.materialgradeext.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class MaterialGradeExtRespDTO {
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
private Long id;
|
||||
|
||||
private String companyCode;
|
||||
private String companyName;
|
||||
private String materialCode;
|
||||
private String materialName;
|
||||
private String chineseBrand;
|
||||
private String englishBrand;
|
||||
private String specificationModel;
|
||||
private String lineType;
|
||||
private String packageDesc;
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.zt.plat.module.base.api.materialgradeext.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MaterialGradeExtSaveReqDTO {
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "公司编码")
|
||||
private String companyCode;
|
||||
|
||||
@Schema(description = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "中文牌号")
|
||||
private String chineseBrand;
|
||||
|
||||
@Schema(description = "英文牌号")
|
||||
private String englishBrand;
|
||||
|
||||
@Schema(description = "规格型号")
|
||||
private String specificationModel;
|
||||
|
||||
@Schema(description = "线别")
|
||||
private String lineType;
|
||||
|
||||
@Schema(description = "包装描述")
|
||||
private String packageDesc;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.zt.plat.module.base.api.materialhasclasses;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.api.materialhasclasses.dto.MaterialHasClassesPageReqDTO;
|
||||
import com.zt.plat.module.base.api.materialhasclasses.dto.MaterialHasClassesRespDTO;
|
||||
import com.zt.plat.module.base.api.materialhasclasses.dto.MaterialHasClassesSaveReqDTO;
|
||||
import com.zt.plat.module.base.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - 物料持有分类")
|
||||
public interface MaterialHasClassesApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/material-has-classes";
|
||||
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "创建物料持有分类")
|
||||
CommonResult<MaterialHasClassesRespDTO> createMaterialHasClasses(@Valid @RequestBody MaterialHasClassesSaveReqDTO createReqDTO);
|
||||
|
||||
@PutMapping(PREFIX + "/update")
|
||||
@Operation(summary = "更新物料持有分类")
|
||||
CommonResult<Boolean> updateMaterialHasClasses(@Valid @RequestBody MaterialHasClassesSaveReqDTO updateReqDTO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除物料持有分类")
|
||||
CommonResult<Boolean> deleteMaterialHasClasses(@RequestParam("id") Long id);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete-list")
|
||||
@Operation(summary = "批量删除物料持有分类")
|
||||
CommonResult<Boolean> deleteMaterialHasClassesList(@RequestBody List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "获得物料持有分类")
|
||||
CommonResult<MaterialHasClassesRespDTO> getMaterialHasClasses(@RequestParam("id") Long id);
|
||||
|
||||
@PostMapping(PREFIX + "/page")
|
||||
@Operation(summary = "获得物料持有分类分页")
|
||||
CommonResult<PageResult<MaterialHasClassesRespDTO>> getMaterialHasClassesPage(@Valid @RequestBody MaterialHasClassesPageReqDTO pageReqDTO);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.zt.plat.module.base.api.materialhasclasses.dto;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* 物料持有分类分页 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialHasClassesPageReqDTO extends PageParam {
|
||||
|
||||
@Schema(description = "物料信息ID", example = "31031")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "分类ID", example = "5914")
|
||||
private Long classesId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.zt.plat.module.base.api.materialhasclasses.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 物料持有分类 Response DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialHasClassesRespDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "16228")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料信息ID", example = "31031")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "分类ID", example = "5914")
|
||||
private Long classesId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.zt.plat.module.base.api.materialhasclasses.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 物料持有分类新增/修改 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialHasClassesSaveReqDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "16228")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料信息ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31031")
|
||||
@NotNull(message = "物料信息ID不能为空")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "分类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5914")
|
||||
@NotNull(message = "分类ID不能为空")
|
||||
private Long classesId;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.zt.plat.module.base.api.materialhasproperties;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.api.materialhasproperties.dto.MaterialHasPropertiesPageReqDTO;
|
||||
import com.zt.plat.module.base.api.materialhasproperties.dto.MaterialHasPropertiesRespDTO;
|
||||
import com.zt.plat.module.base.api.materialhasproperties.dto.MaterialHasPropertiesSaveReqDTO;
|
||||
import com.zt.plat.module.base.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - 物料持有属性")
|
||||
public interface MaterialHasPropertiesApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/material-has-properties";
|
||||
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "创建物料持有属性")
|
||||
CommonResult<MaterialHasPropertiesRespDTO> createMaterialHasProperties(@Valid @RequestBody MaterialHasPropertiesSaveReqDTO createReqDTO);
|
||||
|
||||
@PutMapping(PREFIX + "/update")
|
||||
@Operation(summary = "更新物料持有属性")
|
||||
CommonResult<Boolean> updateMaterialHasProperties(@Valid @RequestBody MaterialHasPropertiesSaveReqDTO updateReqDTO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除物料持有属性")
|
||||
CommonResult<Boolean> deleteMaterialHasProperties(@RequestParam("id") Long id);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete-list")
|
||||
@Operation(summary = "批量删除物料持有属性")
|
||||
CommonResult<Boolean> deleteMaterialHasPropertiesList(@RequestBody List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "获得物料持有属性")
|
||||
CommonResult<MaterialHasPropertiesRespDTO> getMaterialHasProperties(@RequestParam("id") Long id);
|
||||
|
||||
@PostMapping(PREFIX + "/page")
|
||||
@Operation(summary = "获得物料持有属性分页")
|
||||
CommonResult<PageResult<MaterialHasPropertiesRespDTO>> getMaterialHasPropertiesPage(@Valid @RequestBody MaterialHasPropertiesPageReqDTO pageReqDTO);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.zt.plat.module.base.api.materialhasproperties.dto;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* 物料持有属性分页 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialHasPropertiesPageReqDTO extends PageParam {
|
||||
|
||||
@Schema(description = "物料信息ID", example = "2614")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "属性ID", example = "8607")
|
||||
private Long propertiesId;
|
||||
|
||||
@Schema(description = "计量单位ID-默认计量单位", example = "23731")
|
||||
private Long unitId;
|
||||
|
||||
@Schema(description = "属性值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "是否关键属性-关键属性表示物料唯一性")
|
||||
private Integer isKey;
|
||||
|
||||
@Schema(description = "是否计量定价")
|
||||
private Integer isMetering;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Long sort;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.zt.plat.module.base.api.materialhasproperties.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 物料持有属性 Response DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialHasPropertiesRespDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "6800")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料信息ID", example = "2614")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "属性ID", example = "8607")
|
||||
private Long propertiesId;
|
||||
|
||||
@Schema(description = "计量单位ID-默认计量单位", example = "23731")
|
||||
private Long unitId;
|
||||
|
||||
@Schema(description = "属性值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "是否关键属性-关键属性表示物料唯一性")
|
||||
private Integer isKey;
|
||||
|
||||
@Schema(description = "是否计量定价")
|
||||
private Integer isMetering;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Long sort;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.zt.plat.module.base.api.materialhasproperties.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 物料持有属性新增/修改 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialHasPropertiesSaveReqDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "6800")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料信息ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2614")
|
||||
@NotNull(message = "物料信息ID不能为空")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "属性ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8607")
|
||||
@NotNull(message = "属性ID不能为空")
|
||||
private Long propertiesId;
|
||||
|
||||
@Schema(description = "计量单位ID-默认计量单位", example = "23731")
|
||||
private Long unitId;
|
||||
|
||||
@Schema(description = "属性值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "属性值不能为空")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "是否关键属性-关键属性表示物料唯一性")
|
||||
private Integer isKey;
|
||||
|
||||
@Schema(description = "是否计量定价")
|
||||
private Integer isMetering;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Long sort;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.zt.plat.module.base.api.materialinfomation;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.api.materialinfomation.dto.MaterialInfomationPageReqDTO;
|
||||
import com.zt.plat.module.base.api.materialinfomation.dto.MaterialInfomationRespDTO;
|
||||
import com.zt.plat.module.base.api.materialinfomation.dto.MaterialInfomationSaveReqDTO;
|
||||
import com.zt.plat.module.base.api.materialinfomation.dto.MaterialInfomationSimplePageReqDTO;
|
||||
import com.zt.plat.module.base.api.materialinfomation.dto.MaterialInfomationSimpleRespDTO;
|
||||
import com.zt.plat.module.base.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - 物料信息")
|
||||
public interface MaterialInfomationApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/base/material-infomation";
|
||||
|
||||
/*
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "创建物料信息")
|
||||
CommonResult<MaterialInfomationRespDTO> createMaterialInfomation(@Valid @RequestBody MaterialInfomationSaveReqDTO createReqDTO);
|
||||
*/
|
||||
|
||||
@PutMapping(PREFIX + "/update")
|
||||
@Operation(summary = "更新物料信息")
|
||||
CommonResult<Boolean> updateMaterialInfomation(@Valid @RequestBody MaterialInfomationSaveReqDTO updateReqDTO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除物料信息")
|
||||
CommonResult<Boolean> deleteMaterialInfomation(@RequestParam("id") Long id);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete-list")
|
||||
@Operation(summary = "批量删除物料信息")
|
||||
CommonResult<Boolean> deleteMaterialInfomationList(@RequestBody List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "获得物料信息")
|
||||
CommonResult<MaterialInfomationRespDTO> getMaterialInfomation(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/list-by-ids")
|
||||
@Operation(summary = "按 ID 批量获得物料信息")
|
||||
CommonResult<List<MaterialInfomationRespDTO>> getMaterialInfomationListByIds(@RequestParam("ids") List<Long> ids);
|
||||
|
||||
@PostMapping(PREFIX + "/page")
|
||||
@Operation(summary = "获得物料信息分页")
|
||||
CommonResult<PageResult<MaterialInfomationRespDTO>> getMaterialInfomationPage(@Valid @RequestBody MaterialInfomationPageReqDTO pageReqDTO);
|
||||
|
||||
@PostMapping(PREFIX + "/simple-page")
|
||||
@Operation(summary = "获得物料信息精简分页")
|
||||
CommonResult<PageResult<MaterialInfomationSimpleRespDTO>> getMaterialInfomationSimplePage(@Valid @RequestBody MaterialInfomationSimplePageReqDTO pageReqDTO);
|
||||
}
|
||||
@@ -1,28 +1,33 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessdimension.vo;
|
||||
package com.zt.plat.module.base.api.materialinfomation.dto;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 经营指标维度分页 Request VO")
|
||||
/**
|
||||
* 物料信息分页 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class BusinessDimensionPageReqVO extends PageParam {
|
||||
public class MaterialInfomationPageReqDTO extends PageParam {
|
||||
|
||||
@Schema(description = "维度类型")
|
||||
private String typeValue;
|
||||
|
||||
@Schema(description = "维度编码")
|
||||
@Schema(description = "物料编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "维度名称", example = "王五")
|
||||
@Schema(description = "物料名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "分类ID", example = "1024")
|
||||
private Long classesId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.zt.plat.module.base.api.materialinfomation.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 物料信息 Response DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialInfomationRespDTO {
|
||||
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3326")
|
||||
private Long id;
|
||||
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
@Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String code;
|
||||
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
@Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
private String name;
|
||||
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
@Schema(description = "分类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long classesId;
|
||||
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String remark;
|
||||
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "物料基础字段 + 属性编码->原值的动态键值")
|
||||
private Map<String, Object> flatAttributes = new LinkedHashMap<>();
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getFlatAttributes() {
|
||||
return flatAttributes;
|
||||
}
|
||||
|
||||
@JsonAnySetter
|
||||
public void addAttribute(String key, Object value) {
|
||||
if (flatAttributes == null) {
|
||||
flatAttributes = new LinkedHashMap<>();
|
||||
}
|
||||
flatAttributes.put(key, value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.zt.plat.module.base.api.materialinfomation.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 物料信息新增/修改 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialInfomationSaveReqDTO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3326")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "物料编码不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "物料名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "分类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "所属分类不能为空")
|
||||
private Long classesId;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.zt.plat.module.base.api.materialinfomation.dto;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 物料信息精简分页 Request DTO
|
||||
*/
|
||||
@Schema(description = "物料信息精简分页 Request DTO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MaterialInfomationSimplePageReqDTO extends PageParam {
|
||||
|
||||
@Schema(description = "关键字(编码/名称模糊匹配)")
|
||||
private String keyword;
|
||||
|
||||
@Schema(description = "分类 ID")
|
||||
private Long classesId;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.zt.plat.module.base.api.materialinfomation.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 物料信息精简 Response DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialInfomationSimpleRespDTO {
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "物料信息ID", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "物料编码")
|
||||
private String code;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "物料名称")
|
||||
private String name;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "分类ID")
|
||||
private Long classesId;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "物料基础字段 + 属性编码->原值的动态键值,基础字段优先,序列化时直接展开为顶层字段")
|
||||
private Map<String, Object> flatAttributes;
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getFlatAttributes() {
|
||||
return flatAttributes;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.zt.plat.module.base.api.materialproperties;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.api.materialproperties.dto.MaterialPropertiesPageReqDTO;
|
||||
import com.zt.plat.module.base.api.materialproperties.dto.MaterialPropertiesRespDTO;
|
||||
import com.zt.plat.module.base.api.materialproperties.dto.MaterialPropertiesSaveReqDTO;
|
||||
import com.zt.plat.module.base.api.materialproperties.dto.MaterialPropertiesSimplePageReqDTO;
|
||||
import com.zt.plat.module.base.api.materialproperties.dto.MaterialPropertiesSimpleRespDTO;
|
||||
import com.zt.plat.module.base.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - 物料属性")
|
||||
public interface MaterialPropertiesApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/material-properties";
|
||||
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "创建物料属性")
|
||||
CommonResult<MaterialPropertiesRespDTO> createMaterialProperties(@Valid @RequestBody MaterialPropertiesSaveReqDTO createReqDTO);
|
||||
|
||||
@PutMapping(PREFIX + "/update")
|
||||
@Operation(summary = "更新物料属性")
|
||||
CommonResult<Boolean> updateMaterialProperties(@Valid @RequestBody MaterialPropertiesSaveReqDTO updateReqDTO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除物料属性")
|
||||
CommonResult<Boolean> deleteMaterialProperties(@RequestParam("id") Long id);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete-list")
|
||||
@Operation(summary = "批量删除物料属性")
|
||||
CommonResult<Boolean> deleteMaterialPropertiesList(@RequestBody List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "获得物料属性")
|
||||
CommonResult<MaterialPropertiesRespDTO> getMaterialProperties(@RequestParam("id") Long id);
|
||||
|
||||
@PostMapping(PREFIX + "/page")
|
||||
@Operation(summary = "获得物料属性分页")
|
||||
CommonResult<PageResult<MaterialPropertiesRespDTO>> getMaterialPropertiesPage(@Valid @RequestBody MaterialPropertiesPageReqDTO pageReqDTO);
|
||||
|
||||
@PostMapping(PREFIX + "/simple-page")
|
||||
@Operation(summary = "获得物料属性精简分页")
|
||||
CommonResult<PageResult<MaterialPropertiesSimpleRespDTO>> getMaterialPropertiesSimplePage(@Valid @RequestBody MaterialPropertiesSimplePageReqDTO pageReqDTO);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.zt.plat.module.base.api.materialproperties.dto;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* 物料属性分页 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialPropertiesPageReqDTO extends PageParam {
|
||||
|
||||
@Schema(description = "属性编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "属性名称", example = "含量")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "关键字(编码/名称模糊匹配)")
|
||||
private String keyword;
|
||||
|
||||
@Schema(description = "计量单位量ID", example = "30468")
|
||||
private Long unitQuantityId;
|
||||
|
||||
@Schema(description = "属性类型")
|
||||
private String dictionaryDataValue;
|
||||
|
||||
@Schema(description = "数据类型", example = "1")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.zt.plat.module.base.api.materialproperties.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 物料属性 Response DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialPropertiesRespDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "10591")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "属性编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "属性名称", example = "含量")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "计量单位量ID", example = "30468")
|
||||
private Long unitQuantityId;
|
||||
|
||||
@Schema(description = "属性类型")
|
||||
private String dictionaryDataValue;
|
||||
|
||||
@Schema(description = "属性类型名称")
|
||||
private String dictionaryDataLabel;
|
||||
|
||||
@Schema(description = "数据类型", example = "1")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "量纲名称")
|
||||
private String unitQuantityName;
|
||||
|
||||
@Schema(description = "计量单位名称")
|
||||
private String unitName;
|
||||
|
||||
@Schema(description = "计量单位符号")
|
||||
private String unitSymbol;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.zt.plat.module.base.api.materialproperties.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 物料属性新增/修改 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialPropertiesSaveReqDTO {
|
||||
|
||||
@Schema(description = "主键ID", example = "10591")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "属性编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "属性编码不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "属性名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "含量")
|
||||
@NotEmpty(message = "属性名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "计量单位量ID", example = "30468")
|
||||
private Long unitQuantityId;
|
||||
|
||||
@Schema(description = "属性类型(业务字典数据值)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "属性类型不能为空")
|
||||
private String dictionaryDataValue;
|
||||
|
||||
@Schema(description = "数据类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "数据类型不能为空")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.zt.plat.module.base.api.materialproperties.dto;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 物料属性精简分页 Request DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialPropertiesSimplePageReqDTO extends PageParam {
|
||||
|
||||
@Schema(description = "关键字(编码/名称模糊匹配)")
|
||||
private String keyword;
|
||||
|
||||
@Schema(description = "属性类型")
|
||||
private String dictionaryDataValue;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.zt.plat.module.base.api.materialproperties.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 物料属性精简 Response DTO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialPropertiesSimpleRespDTO {
|
||||
|
||||
@Schema(description = "物料属性ID", example = "1001")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "属性编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "属性名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@Schema(description = "单位符号")
|
||||
private String unitSymbol;
|
||||
|
||||
@Schema(description = "属性类型")
|
||||
private String dictionaryDataValue;
|
||||
|
||||
@Schema(description = "属性类型名称")
|
||||
private String dictionaryDataLabel;
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
package com.zt.plat.module.base.controller.admin.templtp.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 业务实例字段值 Response VO")
|
||||
@Data
|
||||
@@ -26,12 +27,12 @@ public class TmplInscDatBsnRespVO {
|
||||
|
||||
@Schema(description = "用户填写的值")
|
||||
@ExcelProperty("用户填写的值")
|
||||
private String fldVal;
|
||||
private List<String> fldVal;
|
||||
|
||||
|
||||
@Schema(description = "字段标识")
|
||||
@ExcelProperty("字段标识")
|
||||
private String fldKy;
|
||||
private List<String> fldKy;
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.zt.plat.module.base.controller.admin.templtp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 业务实例字段值新增/修改 Request VO")
|
||||
@@ -4,7 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 业务实例条款值 Response VO")
|
||||
@@ -2,7 +2,6 @@ package com.zt.plat.module.base.controller.admin.templtp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 业务实例条款值新增/修改 Request VO")
|
||||
@@ -22,15 +22,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode WAREHOUSE_CODE_EXISTS = new ErrorCode(1_001_000_002, "库位编码已存在");
|
||||
ErrorCode FACTORY_NOT_EXISTS = new ErrorCode(1_001_000_001, "工厂不存在");
|
||||
ErrorCode TAX_NOT_EXISTS = new ErrorCode(1_001_000_001, "公司关系不存在");
|
||||
|
||||
|
||||
ErrorCode BUSINESS_RULE_NOT_EXISTS = new ErrorCode(1_027_100_001, "规则模型不存在");
|
||||
ErrorCode BUSINESS_ALGORITHM_NOT_EXISTS = new ErrorCode(1_027_100_002, "算法模型不存在");
|
||||
ErrorCode BUSINESS_DIMENSION_NOT_EXISTS = new ErrorCode(1_027_200_001, "经营指标维度不存在");
|
||||
ErrorCode BUSINESS_INDICATOR_NOT_EXISTS = new ErrorCode(1_027_200_002, "经营指标不存在");
|
||||
ErrorCode BUSINESS_DICTIONARY_TYPE_NOT_EXISTS = new ErrorCode(1_027_200_003, "业务字典类型不存在");
|
||||
ErrorCode BUSINESS_DEPARTMENT_INDICATOR_NOT_EXISTS = new ErrorCode(1_027_200_004, "部门持有指标不存在");
|
||||
|
||||
// ========== 模板文档管理系统 1-006-xxx-xxx ==========
|
||||
// 模板分类 1-006-001-xxx
|
||||
ErrorCode TEMPLATE_CATEGORY_NOT_EXISTS = new ErrorCode(1_006_001_001, "模板分类不存在");
|
||||
@@ -55,8 +47,10 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode MATERIAL_PROPERTIES_NOT_EXISTS = new ErrorCode(1_027_101_001, "物料属性不存在");
|
||||
ErrorCode MATERIAL_HAS_PROPERTIES_NOT_EXISTS = new ErrorCode(1_027_101_002, "物料持有属性不存在");
|
||||
ErrorCode MATERIAL_CLASSES_NOT_EXISTS = new ErrorCode(1_027_101_003, "物料分类不存在");
|
||||
ErrorCode DEPARTMENT_MATERIAL_EXISTS = new ErrorCode(1_027_101_004, "组织物料已存在");
|
||||
ErrorCode DEPARTMENT_MATERIAL_NOT_EXISTS = new ErrorCode(1_027_101_004, "组织物料不存在");
|
||||
ErrorCode MATERIAL_HAS_CLASSES_NOT_EXISTS = new ErrorCode(1_027_101_004, "物料持有属性不存在");
|
||||
ErrorCode MATERIAL_HAS_PROPERTIES_CODE_DUPLICATE = new ErrorCode(1_027_101_106, "同一物料下该属性编码已存在");
|
||||
|
||||
ErrorCode MATERIAL_CLASSES_HIERARCHY_INVALID = new ErrorCode(1_027_101_101, "物料分类层级不符合 1-2-3 的层级规则");
|
||||
ErrorCode MATERIAL_CLASSES_PARENT_NOT_EXISTS = new ErrorCode(1_027_101_102, "上级物料分类不存在");
|
||||
@@ -64,9 +58,18 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode MATERIAL_CLASSES_LEVEL_CONFLICT_WITH_CHILDREN = new ErrorCode(1_027_101_104, "存在下级分类,无法调整当前分类层级");
|
||||
ErrorCode MATERIAL_CLASSES_LEVEL3_REQUIRED_FOR_MATERIAL = new ErrorCode(1_027_101_105, "仅允许三级物料分类关联物料");
|
||||
|
||||
// ========== 物料牌号扩展 ==========
|
||||
ErrorCode MATERIAL_GRADE_EXT_NOT_EXISTS = new ErrorCode(1_027_101_201, "物料牌号扩展不存在");
|
||||
|
||||
// ========== 工艺信息属性 ==========
|
||||
ErrorCode PROCESSING_INFOMATION_NOT_EXISTS = new ErrorCode(1_027_101_005, "工艺信息不存在");
|
||||
ErrorCode PROCESSING_INFOMATION_OPERATION_NOT_EXISTS = new ErrorCode(1_027_101_006, "工艺工序不存在");
|
||||
ErrorCode PROCESSING_OPERATION_NOT_EXISTS = new ErrorCode(1_027_101_007, "工序不存在");
|
||||
ErrorCode PROCESSING_OPERATION_MATERIAL_NOT_EXISTS = new ErrorCode(1_027_101_008, "工艺工序物料不存在");
|
||||
ErrorCode PLAN_DATE_NOT_EXISTS = new ErrorCode(1_027_101_009, "计划数据不存在");
|
||||
ErrorCode PLAN_ORD_NOT_EXISTS = new ErrorCode(1_027_101_010, "计划与订单关系不存在");
|
||||
ErrorCode PLAN_ORD_EXISTS = new ErrorCode(1_027_101_011, "该种类的绑定关系已存在");
|
||||
// ========== 主数据同步 ==========
|
||||
ErrorCode MASTER_DATA_SYNC_DISABLED = new ErrorCode(1_027_900_001, "主数据同步功能已禁用");
|
||||
ErrorCode MASTER_DATA_SYNC_BATCH_SIZE_TOO_LARGE = new ErrorCode(1_027_900_002, "最大批次不得超过 1000");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.zt.plat.module.base.enums;
|
||||
|
||||
public class PlanConstants {
|
||||
private PlanConstants() {
|
||||
}
|
||||
public static final Long ROOT_PARENT_ID = 0L;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.zt.plat.module.erpmonthproductiveplancheck;
|
||||
|
||||
import com.zt.plat.framework.common.exception.ErrorCode;
|
||||
|
||||
public interface ErrorCodeConstants {
|
||||
|
||||
// ========== 示例模块 1-001-000-000 ==========
|
||||
//模块 base 错误码区间[1-027-000-000 ~1-028-000-000)
|
||||
|
||||
ErrorCode ERP_MONTH_PRODUCTIVE_PLAN_CHECK_NOT_EXISTS = new ErrorCode(1_027_000_709, "ERP月度产品计划核对不存在");
|
||||
ErrorCode ERP_MONTH_PRODUCTIVE_PLAN_CHECK_DETAIL_NOT_EXISTS = new ErrorCode(1_027_000_710, "ERP月度产品计划核对明细不存在");
|
||||
ErrorCode DATA_NOT_ERROR = new ErrorCode(1_027_000_711, "数据错误");
|
||||
}
|
||||
|
||||
@@ -34,6 +34,9 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode TMPL_INSC_DAT_BSN_NOT_EXISTS = new ErrorCode(1_027_000_530, "业务实例字段不存在");
|
||||
ErrorCode TMPL_INSC_ITM_BSN_EXISTS = new ErrorCode(1_027_000_540, "业务实例条款已存在");
|
||||
ErrorCode TMPL_INSC_DAT_BSN_EXISTS = new ErrorCode(1_027_000_541, "业务实例字段已存在");
|
||||
ErrorCode INTERNAL_SUPPLY_FACTORY_EXISTS=new ErrorCode(1_027_000_579, "自定义工厂编码已存在");
|
||||
ErrorCode INTERNAL_SUPPLY_FACTORY_NOT_EXISTS=new ErrorCode(1_027_000_580, "自定义工厂不存在");
|
||||
ErrorCode INTERNAL_SUPPLY_FACTORY_DONT_DELETE=new ErrorCode(1_027_000_581, "自定义工厂不能删除");
|
||||
//Illegal operation type
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,20 @@
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-mybatis</artifactId>
|
||||
<exclusions>
|
||||
<!-- 避免上游引入 com.mysql:mysql-connector-j 8/9 系列,与目标 MySQL 5.1 不兼容 -->
|
||||
<exclusion>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- 强制使用 MySQL 5.1 驱动,避免继承的高版本驱动与目标库不兼容 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.49</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -152,6 +166,12 @@
|
||||
<artifactId>zt-spring-boot-starter-biz-business</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-contract-order-api</artifactId>
|
||||
<version>3.0.47-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.zt.plat.module.base.api.businessdictionarytype;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.base.api.businessdictionarytype.dto.BusinessDictionaryDataDTO;
|
||||
import com.zt.plat.module.base.api.businessdictionarytype.dto.BusinessDictionaryTypePageReqDTO;
|
||||
import com.zt.plat.module.base.api.businessdictionarytype.dto.BusinessDictionaryTypeRespDTO;
|
||||
import com.zt.plat.module.base.api.businessdictionarytype.dto.BusinessDictionaryTypeSaveReqDTO;
|
||||
import com.zt.plat.module.base.controller.admin.businessdictionarytype.vo.BusinessDictionaryTypePageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.businessdictionarytype.vo.BusinessDictionaryTypeRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.businessdictionarytype.vo.BusinessDictionaryTypeSaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.businessdictionarytype.BusinessDictionaryDataDO;
|
||||
import com.zt.plat.module.base.dal.dataobject.businessdictionarytype.BusinessDictionaryTypeDO;
|
||||
import com.zt.plat.module.base.service.businessdictionarytype.BusinessDictionaryTypeService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
public class BusinessDictionaryTypeApiImpl implements BusinessDictionaryTypeApi {
|
||||
|
||||
@Resource
|
||||
private BusinessDictionaryTypeService businessDictionaryTypeService;
|
||||
|
||||
@Override
|
||||
public CommonResult<BusinessDictionaryTypeRespDTO> createBusinessDictionaryType(BusinessDictionaryTypeSaveReqDTO createReqDTO) {
|
||||
BusinessDictionaryTypeRespVO respVO = businessDictionaryTypeService.createBusinessDictionaryType(convertSaveReq(createReqDTO));
|
||||
return success(BeanUtils.toBean(respVO, BusinessDictionaryTypeRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> updateBusinessDictionaryType(BusinessDictionaryTypeSaveReqDTO updateReqDTO) {
|
||||
businessDictionaryTypeService.updateBusinessDictionaryType(convertSaveReq(updateReqDTO));
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> deleteBusinessDictionaryType(Long id) {
|
||||
businessDictionaryTypeService.deleteBusinessDictionaryType(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> deleteBusinessDictionaryTypeList(List<Long> ids) {
|
||||
businessDictionaryTypeService.deleteBusinessDictionaryTypeListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<BusinessDictionaryTypeRespDTO> getBusinessDictionaryType(Long id) {
|
||||
BusinessDictionaryTypeDO typeDO = businessDictionaryTypeService.getBusinessDictionaryType(id);
|
||||
return success(BeanUtils.toBean(typeDO, BusinessDictionaryTypeRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<PageResult<BusinessDictionaryTypeRespDTO>> getBusinessDictionaryTypePage(BusinessDictionaryTypePageReqDTO pageReqDTO) {
|
||||
BusinessDictionaryTypePageReqVO pageReqVO = BeanUtils.toBean(pageReqDTO, BusinessDictionaryTypePageReqVO.class);
|
||||
PageResult<BusinessDictionaryTypeDO> pageResult = businessDictionaryTypeService.getBusinessDictionaryTypePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, BusinessDictionaryTypeRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<BusinessDictionaryDataDTO>> getBusinessDictionaryDataListByDictionaryTypeId(Long dictionaryTypeId) {
|
||||
List<BusinessDictionaryDataDO> list = businessDictionaryTypeService.getBusinessDictionaryDataListByDictionaryTypeId(dictionaryTypeId);
|
||||
return success(BeanUtils.toBean(list, BusinessDictionaryDataDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<BusinessDictionaryDataDTO>> getBusinessDictionaryDataListByType(String type) {
|
||||
List<BusinessDictionaryDataDO> list = businessDictionaryTypeService.getBusinessDictionaryDataListByType(type);
|
||||
return success(BeanUtils.toBean(list, BusinessDictionaryDataDTO.class));
|
||||
}
|
||||
|
||||
private BusinessDictionaryTypeSaveReqVO convertSaveReq(BusinessDictionaryTypeSaveReqDTO dto) {
|
||||
BusinessDictionaryTypeSaveReqVO reqVO = BeanUtils.toBean(dto, BusinessDictionaryTypeSaveReqVO.class);
|
||||
if (dto.getBusinessDictionaryDatas() != null && !dto.getBusinessDictionaryDatas().isEmpty()) {
|
||||
reqVO.setBusinessDictionaryDatas(BeanUtils.toBean(dto.getBusinessDictionaryDatas(), BusinessDictionaryDataDO.class));
|
||||
}
|
||||
return reqVO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zt.plat.module.base.api.departmentmaterial;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.base.api.departmentmaterial.dto.DepartmentMaterialPageReqDTO;
|
||||
import com.zt.plat.module.base.api.departmentmaterial.dto.DepartmentMaterialRespDTO;
|
||||
import com.zt.plat.module.base.api.departmentmaterial.dto.DepartmentMaterialSaveReqDTO;
|
||||
import com.zt.plat.module.base.controller.admin.departmentmaterial.vo.DepartmentMaterialPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.departmentmaterial.vo.DepartmentMaterialRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.departmentmaterial.vo.DepartmentMaterialSaveReqVO;
|
||||
import com.zt.plat.module.base.service.departmentmaterial.DepartmentMaterialService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
public class DepartmentMaterialApiImpl implements DepartmentMaterialApi {
|
||||
|
||||
@Resource
|
||||
private DepartmentMaterialService departmentMaterialService;
|
||||
|
||||
@Override
|
||||
public CommonResult<DepartmentMaterialRespDTO> createDepartmentMaterial(DepartmentMaterialSaveReqDTO createReqDTO) {
|
||||
DepartmentMaterialRespVO respVO = departmentMaterialService.createDepartmentMaterial(BeanUtils.toBean(createReqDTO, DepartmentMaterialSaveReqVO.class));
|
||||
return success(BeanUtils.toBean(respVO, DepartmentMaterialRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> updateDepartmentMaterial(DepartmentMaterialSaveReqDTO updateReqDTO) {
|
||||
departmentMaterialService.updateDepartmentMaterial(BeanUtils.toBean(updateReqDTO, DepartmentMaterialSaveReqVO.class));
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> deleteDepartmentMaterial(Long id) {
|
||||
departmentMaterialService.deleteDepartmentMaterial(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> deleteDepartmentMaterialList(List<Long> ids) {
|
||||
departmentMaterialService.deleteDepartmentMaterialListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<DepartmentMaterialRespDTO> getDepartmentMaterial(Long id) {
|
||||
DepartmentMaterialRespVO respVO = departmentMaterialService.getDepartmentMaterial(id);
|
||||
return success(BeanUtils.toBean(respVO, DepartmentMaterialRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<PageResult<DepartmentMaterialRespDTO>> getDepartmentMaterialPage(DepartmentMaterialPageReqDTO pageReqDTO) {
|
||||
DepartmentMaterialPageReqVO pageReqVO = BeanUtils.toBean(pageReqDTO, DepartmentMaterialPageReqVO.class);
|
||||
PageResult<DepartmentMaterialRespVO> pageResult = departmentMaterialService.getDepartmentMaterialPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, DepartmentMaterialRespDTO.class));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.zt.plat.module.base.api.internalsupplyfactory;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.api.InternalSupplyFactoryApi;
|
||||
import com.zt.plat.module.api.dto.internalsupplyfactory.InternalSupplyFactoryDTO;
|
||||
import com.zt.plat.module.base.dal.dataobject.internalsupplyfactory.InternalSupplyFactoryDO;
|
||||
import com.zt.plat.module.base.service.internalsupplyfactory.InternalSupplyFactoryService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
public class InternalSupplyFactoryImpl implements InternalSupplyFactoryApi {
|
||||
@Resource
|
||||
private InternalSupplyFactoryService internalSupplyFactoryService;
|
||||
@Override
|
||||
public CommonResult<List<InternalSupplyFactoryDTO>> batchCreate(List<InternalSupplyFactoryDTO> reqVOS) {
|
||||
List<InternalSupplyFactoryDO> factoryDOS =new ArrayList<>();
|
||||
for (InternalSupplyFactoryDTO reqVO : reqVOS) {
|
||||
InternalSupplyFactoryDO factoryDO = BeanUtils.toBean(reqVO, InternalSupplyFactoryDO.class);
|
||||
factoryDO.setCompanyIdCustom(reqVO.getErpCompanyNumber());
|
||||
factoryDO.setCompanyNameCustom(reqVO.getErpCompanyName());
|
||||
factoryDOS.add(factoryDO);
|
||||
}
|
||||
//internalSupplyFactoryService.bindFactory(factoryDOS);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.zt.plat.module.base.api.materialclasses;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.base.api.materialclasses.dto.MaterialClassesPageReqDTO;
|
||||
import com.zt.plat.module.base.api.materialclasses.dto.MaterialClassesRespDTO;
|
||||
import com.zt.plat.module.base.api.materialclasses.dto.MaterialClassesSaveReqDTO;
|
||||
import com.zt.plat.module.base.api.materialclasses.dto.MaterialClassesTreeRespDTO;
|
||||
import com.zt.plat.module.base.controller.admin.materialclasses.vo.MaterialClassesPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.materialclasses.vo.MaterialClassesRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.materialclasses.vo.MaterialClassesSaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.materialclasses.MaterialClassesDO;
|
||||
import com.zt.plat.module.base.service.materialclasses.MaterialClassesService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
public class MaterialClassesApiImpl implements MaterialClassesApi {
|
||||
|
||||
@Resource
|
||||
private MaterialClassesService materialClassesService;
|
||||
|
||||
@Override
|
||||
public CommonResult<MaterialClassesRespDTO> createMaterialClasses(MaterialClassesSaveReqDTO createReqDTO) {
|
||||
MaterialClassesRespVO respVO = materialClassesService.createMaterialClasses(BeanUtils.toBean(createReqDTO, MaterialClassesSaveReqVO.class));
|
||||
return success(BeanUtils.toBean(respVO, MaterialClassesRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> updateMaterialClasses(MaterialClassesSaveReqDTO updateReqDTO) {
|
||||
materialClassesService.updateMaterialClasses(BeanUtils.toBean(updateReqDTO, MaterialClassesSaveReqVO.class));
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> deleteMaterialClasses(Long id) {
|
||||
materialClassesService.deleteMaterialClasses(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> deleteMaterialClassesList(List<Long> ids) {
|
||||
materialClassesService.deleteMaterialClassesListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<MaterialClassesRespDTO> getMaterialClasses(Long id) {
|
||||
MaterialClassesDO classesDO = materialClassesService.getMaterialClasses(id);
|
||||
return success(BeanUtils.toBean(classesDO, MaterialClassesRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<PageResult<MaterialClassesRespDTO>> getMaterialClassesPage(MaterialClassesPageReqDTO pageReqDTO) {
|
||||
MaterialClassesPageReqVO pageReqVO = BeanUtils.toBean(pageReqDTO, MaterialClassesPageReqVO.class);
|
||||
PageResult<MaterialClassesDO> pageResult = materialClassesService.getMaterialClassesPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MaterialClassesRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<MaterialClassesTreeRespDTO>> getMaterialClassesTree() {
|
||||
List<MaterialClassesDO> list = materialClassesService.getMaterialClassesList();
|
||||
return success(buildTree(list));
|
||||
}
|
||||
|
||||
private List<MaterialClassesTreeRespDTO> buildTree(List<MaterialClassesDO> list) {
|
||||
if (list == null || list.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
Map<Long, MaterialClassesTreeRespDTO> nodeMap = new LinkedHashMap<>();
|
||||
list.stream()
|
||||
.sorted(Comparator.comparing(MaterialClassesDO::getId))
|
||||
.forEach(item -> nodeMap.put(item.getId(), BeanUtils.toBean(item, MaterialClassesTreeRespDTO.class)));
|
||||
List<MaterialClassesTreeRespDTO> roots = new ArrayList<>();
|
||||
nodeMap.values().forEach(node -> {
|
||||
Long parentId = node.getParentId();
|
||||
if (parentId == null || parentId == 0 || !nodeMap.containsKey(parentId)) {
|
||||
roots.add(node);
|
||||
} else {
|
||||
nodeMap.get(parentId).getChildren().add(node);
|
||||
}
|
||||
});
|
||||
return roots;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.zt.plat.module.base.api.materialgradeext;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.base.api.materialgradeext.dto.MaterialGradeExtPageReqDTO;
|
||||
import com.zt.plat.module.base.api.materialgradeext.dto.MaterialGradeExtRespDTO;
|
||||
import com.zt.plat.module.base.api.materialgradeext.dto.MaterialGradeExtSaveReqDTO;
|
||||
import com.zt.plat.module.base.controller.admin.materialgradeext.vo.MaterialGradeExtPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.materialgradeext.vo.MaterialGradeExtRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.materialgradeext.vo.MaterialGradeExtSaveReqVO;
|
||||
import com.zt.plat.module.base.service.materialgradeext.MaterialGradeExtService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
public class MaterialGradeExtApiImpl implements MaterialGradeExtApi {
|
||||
|
||||
@Resource
|
||||
private MaterialGradeExtService materialGradeExtService;
|
||||
|
||||
@Override
|
||||
public CommonResult<MaterialGradeExtRespDTO> create(MaterialGradeExtSaveReqDTO reqDTO) {
|
||||
MaterialGradeExtRespVO respVO = materialGradeExtService.create(BeanUtils.toBean(reqDTO, MaterialGradeExtSaveReqVO.class));
|
||||
return success(BeanUtils.toBean(respVO, MaterialGradeExtRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> update(MaterialGradeExtSaveReqDTO reqDTO) {
|
||||
materialGradeExtService.update(BeanUtils.toBean(reqDTO, MaterialGradeExtSaveReqVO.class));
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> delete(Long id) {
|
||||
materialGradeExtService.delete(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> deleteList(List<Long> ids) {
|
||||
materialGradeExtService.deleteByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<MaterialGradeExtRespDTO> get(Long id) {
|
||||
MaterialGradeExtRespVO respVO = materialGradeExtService.get(id);
|
||||
return success(BeanUtils.toBean(respVO, MaterialGradeExtRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<PageResult<MaterialGradeExtRespDTO>> getPage(@RequestBody MaterialGradeExtPageReqDTO pageReqDTO) {
|
||||
MaterialGradeExtPageReqVO pageReqVO = BeanUtils.toBean(pageReqDTO, MaterialGradeExtPageReqVO.class);
|
||||
PageResult<MaterialGradeExtRespVO> pageResult = materialGradeExtService.getPage(pageReqVO);
|
||||
PageResult<MaterialGradeExtRespDTO> dtoResult = BeanUtils.toBean(pageResult, MaterialGradeExtRespDTO.class);
|
||||
return success(dtoResult);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.zt.plat.module.base.api.materialinfomation;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.base.api.materialinfomation.dto.MaterialInfomationPageReqDTO;
|
||||
import com.zt.plat.module.base.api.materialinfomation.dto.MaterialInfomationRespDTO;
|
||||
import com.zt.plat.module.base.api.materialinfomation.dto.MaterialInfomationSaveReqDTO;
|
||||
import com.zt.plat.module.base.api.materialinfomation.dto.MaterialInfomationSimplePageReqDTO;
|
||||
import com.zt.plat.module.base.api.materialinfomation.dto.MaterialInfomationSimpleRespDTO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationSaveReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationSimplePageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationSimpleRespVO;
|
||||
import com.zt.plat.module.base.service.base.MaterialInfomationService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
public class MaterialInfomationApiImpl implements MaterialInfomationApi {
|
||||
|
||||
@Resource
|
||||
private MaterialInfomationService materialInfomationService;
|
||||
|
||||
/* @Override
|
||||
public CommonResult<MaterialInfomationRespDTO> createMaterialInfomation(MaterialInfomationSaveReqDTO createReqDTO) {
|
||||
MaterialInfomationRespVO respVO = materialInfomationService.createMaterialInfomation(
|
||||
BeanUtils.toBean(createReqDTO, MaterialInfomationSaveReqVO.class));
|
||||
return success(BeanUtils.toBean(respVO, MaterialInfomationRespDTO.class));
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> updateMaterialInfomation(MaterialInfomationSaveReqDTO updateReqDTO) {
|
||||
materialInfomationService.updateMaterialInfomation(BeanUtils.toBean(updateReqDTO, MaterialInfomationSaveReqVO.class));
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> deleteMaterialInfomation(Long id) {
|
||||
materialInfomationService.deleteMaterialInfomation(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> deleteMaterialInfomationList(List<Long> ids) {
|
||||
materialInfomationService.deleteMaterialInfomationListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<MaterialInfomationRespDTO> getMaterialInfomation(Long id) {
|
||||
MaterialInfomationRespVO respVO = materialInfomationService.getMaterialInfomation(id);
|
||||
return success(BeanUtils.toBean(respVO, MaterialInfomationRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<MaterialInfomationRespDTO>> getMaterialInfomationListByIds(List<Long> ids) {
|
||||
List<MaterialInfomationRespVO> list = materialInfomationService.getMaterialInfomationListByIds(ids);
|
||||
List<MaterialInfomationRespDTO> respList = list.stream()
|
||||
.map(item -> BeanUtils.toBean(item, MaterialInfomationRespDTO.class))
|
||||
.toList();
|
||||
return success(respList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<PageResult<MaterialInfomationRespDTO>> getMaterialInfomationPage(MaterialInfomationPageReqDTO pageReqDTO) {
|
||||
MaterialInfomationPageReqVO pageReqVO = BeanUtils.toBean(pageReqDTO, MaterialInfomationPageReqVO.class);
|
||||
PageResult<MaterialInfomationRespVO> pageResult = materialInfomationService.getMaterialInfomationPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MaterialInfomationRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<PageResult<MaterialInfomationSimpleRespDTO>> getMaterialInfomationSimplePage(MaterialInfomationSimplePageReqDTO pageReqDTO) {
|
||||
MaterialInfomationSimplePageReqVO pageReqVO = BeanUtils.toBean(pageReqDTO, MaterialInfomationSimplePageReqVO.class);
|
||||
PageResult<MaterialInfomationSimpleRespVO> pageResult = materialInfomationService.getMaterialInfomationSimplePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MaterialInfomationSimpleRespDTO.class));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.zt.plat.module.base.config;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 帆软上传配置
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "finereport.upload")
|
||||
public class FineReportUploadProperties {
|
||||
|
||||
/**
|
||||
* 上传目标地址(sidecar 内部 Service),默认指向集群内 fine-report-upload 服务
|
||||
*/
|
||||
private String url = "http://fine-report-upload.ns-f16a3067ca7b434aad127d15eac82503.svc.cluster.local:8081/upload";
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
}
|
||||
@@ -40,14 +40,14 @@ public class AccountController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建账户条款")
|
||||
@PreAuthorize("@ss.hasPermission('base:account:create')")
|
||||
// @PreAuthorize("@ss.hasPermission('base:account:create')")
|
||||
public CommonResult<AccountRespVO> createAccount(@Valid @RequestBody AccountSaveReqVO createReqVO) {
|
||||
return success(accountService.createAccount(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新账户条款")
|
||||
@PreAuthorize("@ss.hasPermission('base:account:update')")
|
||||
//@PreAuthorize("@ss.hasPermission('base:account:update')")
|
||||
public CommonResult<Boolean> updateAccount(@Valid @RequestBody AccountSaveReqVO updateReqVO) {
|
||||
accountService.updateAccount(updateReqVO);
|
||||
return success(true);
|
||||
@@ -56,7 +56,7 @@ public class AccountController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除账户条款")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:account:delete')")
|
||||
//@PreAuthorize("@ss.hasPermission('base:account:delete')")
|
||||
public CommonResult<Boolean> deleteAccount(@RequestParam("id") Long id) {
|
||||
accountService.deleteAccount(id);
|
||||
return success(true);
|
||||
@@ -65,7 +65,7 @@ public class AccountController {
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除账户条款")
|
||||
@PreAuthorize("@ss.hasPermission('base:account:delete')")
|
||||
//@PreAuthorize("@ss.hasPermission('base:account:delete')")
|
||||
public CommonResult<Boolean> deleteAccountList(@RequestBody BatchDeleteReqVO req) {
|
||||
accountService.deleteAccountListByIds(req.getIds());
|
||||
return success(true);
|
||||
@@ -103,7 +103,7 @@ public class AccountController {
|
||||
|
||||
@PutMapping("/enable-list")
|
||||
@Operation(summary = "批量更新账户条款")
|
||||
@PreAuthorize("@ss.hasPermission('base:account:update')")
|
||||
// @PreAuthorize("@ss.hasPermission('base:account:update')")
|
||||
public CommonResult<Boolean> enableAccountList(@RequestBody List<AccountSaveReqVO> saveReqVOS) {
|
||||
accountService.enableAccountList(saveReqVOS);
|
||||
return success(true);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.zt.plat.module.base.controller.admin.base;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
@@ -40,14 +41,14 @@ public class ContactController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建联系人信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:contact:create')")
|
||||
//@PreAuthorize("@ss.hasPermission('basic:contact-config:create')")
|
||||
public CommonResult<ContactRespVO> createContact(@Valid @RequestBody ContactSaveReqVO createReqVO) {
|
||||
return success(contactService.createContact(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新联系人信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:contact:update')")
|
||||
//@PreAuthorize("@ss.hasPermission('basic:contact-config:update')")
|
||||
public CommonResult<Boolean> updateContact(@Valid @RequestBody ContactSaveReqVO updateReqVO) {
|
||||
contactService.updateContact(updateReqVO);
|
||||
return success(true);
|
||||
@@ -56,7 +57,7 @@ public class ContactController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除联系人信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:contact:delete')")
|
||||
//@PreAuthorize("@ss.hasPermission('basic:contact-config:delete')")
|
||||
public CommonResult<Boolean> deleteContact(@RequestParam("id") Long id) {
|
||||
contactService.deleteContact(id);
|
||||
return success(true);
|
||||
@@ -65,7 +66,7 @@ public class ContactController {
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除联系人信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:contact:delete')")
|
||||
//@PreAuthorize("@ss.hasPermission('basic:contact-config:delete')")
|
||||
public CommonResult<Boolean> deleteContactList(@RequestBody BatchDeleteReqVO req) {
|
||||
contactService.deleteContactListByIds(req.getIds());
|
||||
return success(true);
|
||||
@@ -103,7 +104,7 @@ public class ContactController {
|
||||
|
||||
@PutMapping("/enable-list")
|
||||
@Operation(summary = "批量更新")
|
||||
@PreAuthorize("@ss.hasPermission('base:contact:update')")
|
||||
//@PreAuthorize("@ss.hasAnyPermissions({'base:contact:update','basic:contact-config:disable','basic:contact-config:enable'})")
|
||||
public CommonResult<Boolean> enableContactList(@RequestBody List<ContactSaveReqVO> saveReqVOS) {
|
||||
contactService.enableContactList(saveReqVOS);
|
||||
return success(true);
|
||||
|
||||
@@ -40,14 +40,14 @@ public class ElementController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建金属元素")
|
||||
@PreAuthorize("@ss.hasPermission('base:element:create')")
|
||||
@PreAuthorize("@ss.hasPermission('basic:metal-config:create')")
|
||||
public CommonResult<ElementRespVO> createElement(@Valid @RequestBody ElementSaveReqVO createReqVO) {
|
||||
return success(elementService.createElement(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新金属元素")
|
||||
@PreAuthorize("@ss.hasPermission('base:element:update')")
|
||||
@PreAuthorize("@ss.hasPermission('basic:metal-config:update')")
|
||||
public CommonResult<Boolean> updateElement(@Valid @RequestBody ElementSaveReqVO updateReqVO) {
|
||||
elementService.updateElement(updateReqVO);
|
||||
return success(true);
|
||||
@@ -56,7 +56,7 @@ public class ElementController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除金属元素")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:element:delete')")
|
||||
@PreAuthorize("@ss.hasPermission('basic:metal-config:delete')")
|
||||
public CommonResult<Boolean> deleteElement(@RequestParam("id") Long id) {
|
||||
elementService.deleteElement(id);
|
||||
return success(true);
|
||||
@@ -65,7 +65,7 @@ public class ElementController {
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除金属元素")
|
||||
@PreAuthorize("@ss.hasPermission('base:element:delete')")
|
||||
@PreAuthorize("@ss.hasPermission('basic:metal-config:delete')")
|
||||
public CommonResult<Boolean> deleteElementList(@RequestBody BatchDeleteReqVO req) {
|
||||
elementService.deleteElementListByIds(req.getIds());
|
||||
return success(true);
|
||||
@@ -98,7 +98,7 @@ public class ElementController {
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出金属元素 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:element:export')")
|
||||
@PreAuthorize("@ss.hasPermission('basic:metal-config:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportElementExcel(@Valid ElementPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
@@ -111,7 +111,7 @@ public class ElementController {
|
||||
|
||||
@PutMapping("/enable-list")
|
||||
@Operation(summary = "批量更新")
|
||||
@PreAuthorize("@ss.hasPermission('base:element:update')")
|
||||
@PreAuthorize("@ss.hasPermission('basic:metal-config:update')")
|
||||
public CommonResult<Boolean> enableElementList(@RequestBody List<ElementRespVO> saveReqVOS) {
|
||||
elementService.enableElementList(saveReqVOS);
|
||||
return success(true);
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.zt.plat.module.base.controller.admin.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MasterDataSyncReqVO;
|
||||
import com.zt.plat.module.base.service.masterdatasync.MasterDataCategorySyncService;
|
||||
import com.zt.plat.module.base.service.masterdatasync.MasterDataSyncService;
|
||||
import com.zt.plat.module.base.service.masterdatasync.dto.MasterDataSyncCommand;
|
||||
import com.zt.plat.module.base.service.masterdatasync.dto.MasterDataSyncReport;
|
||||
import com.zt.plat.module.base.service.masterdatasync.dto.MasterDataCategorySyncReport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 主数据同步")
|
||||
@RestController
|
||||
@RequestMapping("/base/master-data-sync")
|
||||
@Validated
|
||||
public class MasterDataSyncController {
|
||||
|
||||
@Resource
|
||||
private MasterDataSyncService masterDataSyncService;
|
||||
@Resource
|
||||
private MasterDataCategorySyncService masterDataCategorySyncService;
|
||||
|
||||
@PostMapping("/execute")
|
||||
@Operation(summary = "执行主数据同步")
|
||||
@PreAuthorize("@ss.hasPermission('base:master-data-sync:execute')")
|
||||
public CommonResult<MasterDataSyncReport> execute(@Valid @RequestBody MasterDataSyncReqVO reqVO) {
|
||||
MasterDataSyncCommand command = BeanUtils.toBean(reqVO, MasterDataSyncCommand.class);
|
||||
MasterDataSyncReport report = masterDataSyncService.sync(command);
|
||||
return success(report);
|
||||
}
|
||||
|
||||
@PostMapping("/categories")
|
||||
@Operation(summary = "同步物料分类")
|
||||
@PreAuthorize("@ss.hasPermission('base:master-data-sync:categories')")
|
||||
public CommonResult<MasterDataCategorySyncReport> syncCategories() {
|
||||
MasterDataCategorySyncReport report = masterDataCategorySyncService.syncAll();
|
||||
return success(report);
|
||||
}
|
||||
}
|
||||
@@ -40,14 +40,14 @@ public class MaterialDestroyController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建物料回收率")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-destroy:create')")
|
||||
//@PreAuthorize("@ss.hasPermission('base:material-destroy:create')")
|
||||
public CommonResult<MaterialDestroyRespVO> createMaterialDestroy(@Valid @RequestBody MaterialDestroySaveReqVO createReqVO) {
|
||||
return success(materialDestroyService.createMaterialDestroy(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新物料回收率")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-destroy:update')")
|
||||
//@PreAuthorize("@ss.hasPermission('base:material-destroy:update')")
|
||||
public CommonResult<Boolean> updateMaterialDestroy(@Valid @RequestBody MaterialDestroySaveReqVO updateReqVO) {
|
||||
materialDestroyService.updateMaterialDestroy(updateReqVO);
|
||||
return success(true);
|
||||
@@ -56,7 +56,7 @@ public class MaterialDestroyController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除物料回收率")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:material-destroy:delete')")
|
||||
//@PreAuthorize("@ss.hasPermission('base:material-destroy:delete')")
|
||||
public CommonResult<Boolean> deleteMaterialDestroy(@RequestParam("id") Long id) {
|
||||
materialDestroyService.deleteMaterialDestroy(id);
|
||||
return success(true);
|
||||
@@ -65,7 +65,7 @@ public class MaterialDestroyController {
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除物料回收率")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-destroy:delete')")
|
||||
// @PreAuthorize("@ss.hasPermission('base:material-destroy:delete')")
|
||||
public CommonResult<Boolean> deleteMaterialDestroyList(@RequestBody BatchDeleteReqVO req) {
|
||||
materialDestroyService.deleteMaterialDestroyListByIds(req.getIds());
|
||||
return success(true);
|
||||
@@ -103,7 +103,7 @@ public class MaterialDestroyController {
|
||||
|
||||
@PutMapping("/enable-list")
|
||||
@Operation(summary = "批量更新")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-destroy:update')")
|
||||
// @PreAuthorize("@ss.hasPermission('base:material-destroy:update')")
|
||||
public CommonResult<Boolean> enableMaterialDestroyList(@RequestBody List<MaterialDestroyRespVO> saveReqVOS) {
|
||||
materialDestroyService.enableMaterialDestroyList(saveReqVOS);
|
||||
return success(true);
|
||||
|
||||
@@ -38,11 +38,19 @@ public class MaterialInfomationController {
|
||||
@Resource
|
||||
private MaterialInfomationService materialInfomationService;
|
||||
|
||||
@PostMapping("/create")
|
||||
/* @PostMapping("/create")
|
||||
@Operation(summary = "创建物料信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:create')")
|
||||
public CommonResult<MaterialInfomationRespVO> createMaterialInfomation(@Valid @RequestBody MaterialInfomationSaveReqVO createReqVO) {
|
||||
return success(materialInfomationService.createMaterialInfomation(createReqVO));
|
||||
}*/
|
||||
|
||||
@Operation(summary = "快捷添加实物物料")
|
||||
@PostMapping("/creat-quickly")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:create')")
|
||||
public CommonResult<String> createMaterialInfomationQuickly(@Valid @RequestBody MaterialInfomationSaveReqVO createReqVO) {
|
||||
String result = materialInfomationService.createMaterialInfomationQuickly(createReqVO);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@@ -80,6 +88,14 @@ public class MaterialInfomationController {
|
||||
return success(materialInfomation);
|
||||
}
|
||||
|
||||
@GetMapping("/list-by-ids")
|
||||
@Operation(summary = "按 ID 批量获得物料信息")
|
||||
@Parameter(name = "ids", description = "编号集合", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:query')")
|
||||
public CommonResult<List<MaterialInfomationRespVO>> getMaterialInfomationListByIds(@RequestParam("ids") List<Long> ids) {
|
||||
return success(materialInfomationService.getMaterialInfomationListByIds(ids));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得物料信息分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:query')")
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.TaxPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.TaxRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.TaxSaveReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.TaxStsVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.TaxDO;
|
||||
import com.zt.plat.module.base.service.base.TaxService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -33,7 +34,7 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
@RestController
|
||||
@RequestMapping("/base/tax")
|
||||
@Validated
|
||||
public class TaxController implements BusinessControllerMarker {
|
||||
public class TaxController {
|
||||
|
||||
|
||||
@Resource
|
||||
@@ -41,14 +42,14 @@ public class TaxController implements BusinessControllerMarker {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建税码信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:tax:create')")
|
||||
@PreAuthorize("@ss.hasPermission('basic:tax-config:create')")
|
||||
public CommonResult<TaxRespVO> createTax(@Valid @RequestBody TaxSaveReqVO createReqVO) {
|
||||
return success(taxService.createTax(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新税码信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:tax:update')")
|
||||
@PreAuthorize("@ss.hasPermission('basic:tax-config:update')")
|
||||
public CommonResult<Boolean> updateTax(@Valid @RequestBody TaxSaveReqVO updateReqVO) {
|
||||
taxService.updateTax(updateReqVO);
|
||||
return success(true);
|
||||
@@ -57,7 +58,7 @@ public class TaxController implements BusinessControllerMarker {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除税码信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:tax:delete')")
|
||||
@PreAuthorize("@ss.hasPermission('basic:tax-config:delete')")
|
||||
public CommonResult<Boolean> deleteTax(@RequestParam("id") Long id) {
|
||||
taxService.deleteTax(id);
|
||||
return success(true);
|
||||
@@ -66,7 +67,7 @@ public class TaxController implements BusinessControllerMarker {
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除税码信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:tax:delete')")
|
||||
@PreAuthorize("@ss.hasPermission('basic:tax-config:delete')")
|
||||
public CommonResult<Boolean> deleteTaxList(@RequestBody BatchDeleteReqVO req) {
|
||||
taxService.deleteTaxListByIds(req.getIds());
|
||||
return success(true);
|
||||
@@ -101,5 +102,13 @@ public class TaxController implements BusinessControllerMarker {
|
||||
ExcelUtils.write(response, "税码信息.xls", "数据", TaxRespVO.class,
|
||||
BeanUtils.toBean(list, TaxRespVO.class));
|
||||
}
|
||||
//启用和禁用
|
||||
@PostMapping("/enable-list")
|
||||
@Operation(summary = "启用禁用税码信息")
|
||||
//@PreAuthorize("@ss.hasPermission('base:tax:update')")
|
||||
public CommonResult<Boolean> enableTaxList(@Validated @RequestBody List<TaxStsVO> req) {
|
||||
taxService.enableTaxList(req);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,7 +13,7 @@ public class AccountSaveReqVO {
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "类型不能为空")
|
||||
// @NotEmpty(message = "类型不能为空")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
|
||||
@@ -12,7 +12,7 @@ public class ContactSaveReqVO {
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "类型甲方/乙方", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "类型甲方/乙方不能为空")
|
||||
// @NotEmpty(message = "类型甲方/乙方不能为空")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Schema(description = "主数据同步请求参数")
|
||||
public class MasterDataSyncReqVO {
|
||||
|
||||
@Schema(description = "增量同步的起始记录时间,留空执行全量")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime since;
|
||||
|
||||
@Schema(description = "拉取批大小,不填写则使用配置默认值")
|
||||
@Positive(message = "batchSize 必须为正数")
|
||||
private Integer batchSize;
|
||||
|
||||
@Schema(description = "指定要刷新同步的物料编码列表")
|
||||
private List<String> materialCodes;
|
||||
|
||||
@Schema(description = "可选的本次同步记录数上限,未填写表示不限制")
|
||||
@Positive(message = "recordLimit 必须为正数")
|
||||
private Long recordLimit;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 展平后的物料属性(按属性编码为键)
|
||||
*/
|
||||
@Data
|
||||
public class MaterialInfomationFlatAttributeRespVO {
|
||||
|
||||
@Schema(description = "属性ID")
|
||||
private Long propertiesId;
|
||||
|
||||
@Schema(description = "属性编码")
|
||||
private String propertiesCode;
|
||||
|
||||
@Schema(description = "属性名称")
|
||||
private String propertiesName;
|
||||
|
||||
@Schema(description = "属性数据类型")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "属性值(编码/原值)")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "属性值展示(字典标签,若无字典则原值)")
|
||||
private String valueLabel;
|
||||
|
||||
@Schema(description = "字典类型ID")
|
||||
private Long dictTypeId;
|
||||
|
||||
@Schema(description = "计量单位ID")
|
||||
private Long unitId;
|
||||
|
||||
@Schema(description = "计量单位名称")
|
||||
private String unitName;
|
||||
|
||||
@Schema(description = "计量单位符号")
|
||||
private String unitSymbol;
|
||||
|
||||
@Schema(description = "是否关键属性")
|
||||
private Integer isKey;
|
||||
|
||||
@Schema(description = "是否计量定价")
|
||||
private Integer isMetering;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Long sort;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 物料属性(持有属性)行展示 VO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialInfomationPropertyRespVO {
|
||||
|
||||
@Schema(description = "属性ID")
|
||||
private Long propertiesId;
|
||||
|
||||
@Schema(description = "属性编码")
|
||||
private String propertiesCode;
|
||||
|
||||
@Schema(description = "属性名称")
|
||||
private String propertiesName;
|
||||
|
||||
@Schema(description = "属性数据类型")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "属性值(编码/原值)")
|
||||
private String dictionaryDataValue;
|
||||
|
||||
@Schema(description = "属性值展示(字典标签,若无字典则原值)")
|
||||
private String valueLabel;
|
||||
|
||||
@Schema(description = "字典类型ID")
|
||||
private Long dictionaryTypeId;
|
||||
|
||||
@Schema(description = "计量单位ID")
|
||||
private Long unitId;
|
||||
|
||||
@Schema(description = "计量单位名称")
|
||||
private String unitName;
|
||||
|
||||
@Schema(description = "计量单位符号")
|
||||
private String unitSymbol;
|
||||
|
||||
@Schema(description = "是否关键属性")
|
||||
private Integer isKey;
|
||||
|
||||
@Schema(description = "是否计量定价")
|
||||
private Integer isMetering;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Long sort;
|
||||
}
|
||||
@@ -2,38 +2,56 @@ package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
|
||||
@Schema(description = "管理后台 - 物料信息 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MaterialInfomationRespVO {
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3326")
|
||||
@ExcelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("物料编码")
|
||||
private String code;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("物料名称")
|
||||
private String name;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "分类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@ExcelProperty("分类ID")
|
||||
private Long classesId;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "物料基础字段 + 属性编码->原值的动态键值,基础字段优先,序列化时直接展开为顶层字段")
|
||||
private Map<String, Object> flatAttributes;
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getFlatAttributes() {
|
||||
return flatAttributes;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,26 +1,44 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 精简的物料信息 Response VO
|
||||
*/
|
||||
@Data
|
||||
public class MaterialInfomationSimpleRespVO {
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "物料信息ID", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "物料编码")
|
||||
private String code;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "物料名称")
|
||||
private String name;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "分类ID")
|
||||
private Long classesId;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@JsonIgnore
|
||||
@Schema(description = "物料基础字段 + 属性编码->原值的动态键值,基础字段优先,序列化时直接展开为顶层字段")
|
||||
private Map<String, Object> flatAttributes;
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getFlatAttributes() {
|
||||
return flatAttributes;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 字典值与标签映射的展示 VO
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MaterialInfomationValueLabelVO {
|
||||
|
||||
@Schema(description = "字典标签或原值")
|
||||
private String label;
|
||||
|
||||
@Schema(description = "字典类型ID")
|
||||
private Long dictTypeId;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "税码状态更新")
|
||||
public class TaxStsVO {
|
||||
private String id;
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessalgorithm;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.businessalgorithm.vo.*;
|
||||
import com.zt.plat.module.base.dal.dataobject.businessalgorithm.BusinessAlgorithmDO;
|
||||
import com.zt.plat.module.base.service.businessalgorithm.BusinessAlgorithmService;
|
||||
|
||||
@Tag(name = "管理后台 - 业务算法")
|
||||
@RestController
|
||||
@RequestMapping("/base/business-algorithm")
|
||||
@Validated
|
||||
public class BusinessAlgorithmController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private BusinessAlgorithmService businessAlgorithmService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建业务算法")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-algorithm:create')")
|
||||
public CommonResult<BusinessAlgorithmRespVO> createBusinessAlgorithm(@Valid @RequestBody BusinessAlgorithmSaveReqVO createReqVO) {
|
||||
return success(businessAlgorithmService.createBusinessAlgorithm(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新业务算法")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-algorithm:update')")
|
||||
public CommonResult<Boolean> updateBusinessAlgorithm(@Valid @RequestBody BusinessAlgorithmSaveReqVO updateReqVO) {
|
||||
businessAlgorithmService.updateBusinessAlgorithm(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除业务算法")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:business-algorithm:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessAlgorithm(@RequestParam("id") Long id) {
|
||||
businessAlgorithmService.deleteBusinessAlgorithm(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除业务算法")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-algorithm:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessAlgorithmList(@RequestBody BatchDeleteReqVO req) {
|
||||
businessAlgorithmService.deleteBusinessAlgorithmListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得业务算法")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-algorithm:query')")
|
||||
public CommonResult<BusinessAlgorithmRespVO> getBusinessAlgorithm(@RequestParam("id") Long id) {
|
||||
BusinessAlgorithmDO businessAlgorithm = businessAlgorithmService.getBusinessAlgorithm(id);
|
||||
return success(BeanUtils.toBean(businessAlgorithm, BusinessAlgorithmRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得业务算法分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-algorithm:query')")
|
||||
public CommonResult<PageResult<BusinessAlgorithmRespVO>> getBusinessAlgorithmPage(@Valid BusinessAlgorithmPageReqVO pageReqVO) {
|
||||
PageResult<BusinessAlgorithmDO> pageResult = businessAlgorithmService.getBusinessAlgorithmPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, BusinessAlgorithmRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出业务算法 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-algorithm:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportBusinessAlgorithmExcel(@Valid BusinessAlgorithmPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BusinessAlgorithmDO> list = businessAlgorithmService.getBusinessAlgorithmPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "业务算法.xls", "数据", BusinessAlgorithmRespVO.class,
|
||||
BeanUtils.toBean(list, BusinessAlgorithmRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessalgorithm.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
|
||||
@Schema(description = "管理后台 - 业务算法分页 Request VO")
|
||||
@Data
|
||||
public class BusinessAlgorithmPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "类型")
|
||||
private String typeValue;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private String statusValue;
|
||||
|
||||
@Schema(description = "算法编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "算法名称", example = "王五")
|
||||
private String name;
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessalgorithm.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 业务算法 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class BusinessAlgorithmRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24454")
|
||||
@ExcelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("类型")
|
||||
private String typeValue;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("状态")
|
||||
private String statusValue;
|
||||
|
||||
@Schema(description = "算法编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("算法编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "算法名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@ExcelProperty("算法名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "算法描述", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("算法描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "算法代码")
|
||||
@ExcelProperty("算法代码")
|
||||
private String coding;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessalgorithm.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 业务算法新增/修改 Request VO")
|
||||
@Data
|
||||
public class BusinessAlgorithmSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24454")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "类型不能为空")
|
||||
private String typeValue;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "状态不能为空")
|
||||
private String statusValue;
|
||||
|
||||
@Schema(description = "算法编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "算法编码不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "算法名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@NotEmpty(message = "算法名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "算法描述", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "算法描述不能为空")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "算法代码")
|
||||
private String coding;
|
||||
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessdepartmentindicator;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.businessdepartmentindicator.vo.*;
|
||||
import com.zt.plat.module.base.dal.dataobject.businessdepartmentindicator.BusinessDepartmentIndicatorDO;
|
||||
import com.zt.plat.module.base.service.businessdepartmentindicator.BusinessDepartmentIndicatorService;
|
||||
|
||||
@Tag(name = "管理后台 - 部门持有指标")
|
||||
@RestController
|
||||
@RequestMapping("/base/business-department-indicator")
|
||||
@Validated
|
||||
public class BusinessDepartmentIndicatorController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private BusinessDepartmentIndicatorService businessDepartmentIndicatorService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建部门持有指标")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-department-indicator:create')")
|
||||
public CommonResult<BusinessDepartmentIndicatorRespVO> createBusinessDepartmentIndicator(@Valid @RequestBody BusinessDepartmentIndicatorSaveReqVO createReqVO) {
|
||||
return success(businessDepartmentIndicatorService.createBusinessDepartmentIndicator(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新部门持有指标")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-department-indicator:update')")
|
||||
public CommonResult<Boolean> updateBusinessDepartmentIndicator(@Valid @RequestBody BusinessDepartmentIndicatorSaveReqVO updateReqVO) {
|
||||
businessDepartmentIndicatorService.updateBusinessDepartmentIndicator(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除部门持有指标")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:business-department-indicator:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessDepartmentIndicator(@RequestParam("id") Long id) {
|
||||
businessDepartmentIndicatorService.deleteBusinessDepartmentIndicator(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除部门持有指标")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-department-indicator:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessDepartmentIndicatorList(@RequestBody BatchDeleteReqVO req) {
|
||||
businessDepartmentIndicatorService.deleteBusinessDepartmentIndicatorListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得部门持有指标")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-department-indicator:query')")
|
||||
public CommonResult<BusinessDepartmentIndicatorRespVO> getBusinessDepartmentIndicator(@RequestParam("id") Long id) {
|
||||
BusinessDepartmentIndicatorDO businessDepartmentIndicator = businessDepartmentIndicatorService.getBusinessDepartmentIndicator(id);
|
||||
return success(BeanUtils.toBean(businessDepartmentIndicator, BusinessDepartmentIndicatorRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得部门持有指标分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-department-indicator:query')")
|
||||
public CommonResult<PageResult<BusinessDepartmentIndicatorRespVO>> getBusinessDepartmentIndicatorPage(@Valid BusinessDepartmentIndicatorPageReqVO pageReqVO) {
|
||||
PageResult<BusinessDepartmentIndicatorDO> pageResult = businessDepartmentIndicatorService.getBusinessDepartmentIndicatorPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, BusinessDepartmentIndicatorRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出部门持有指标 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-department-indicator:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportBusinessDepartmentIndicatorExcel(@Valid BusinessDepartmentIndicatorPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BusinessDepartmentIndicatorDO> list = businessDepartmentIndicatorService.getBusinessDepartmentIndicatorPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "部门持有指标.xls", "数据", BusinessDepartmentIndicatorRespVO.class,
|
||||
BeanUtils.toBean(list, BusinessDepartmentIndicatorRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessdepartmentindicator.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
|
||||
@Schema(description = "管理后台 - 部门持有指标分页 Request VO")
|
||||
@Data
|
||||
public class BusinessDepartmentIndicatorPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "指标ID", example = "11268")
|
||||
private Long indicatorId;
|
||||
|
||||
@Schema(description = "是否关键指标")
|
||||
private Integer isKey;
|
||||
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessdepartmentindicator.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 部门持有指标 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class BusinessDepartmentIndicatorRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32066")
|
||||
@ExcelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "指标ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11268")
|
||||
@ExcelProperty("指标ID")
|
||||
private Long indicatorId;
|
||||
|
||||
@Schema(description = "计量单位ID", example = "16200")
|
||||
@ExcelProperty("计量单位ID")
|
||||
private Long unitId;
|
||||
|
||||
@Schema(description = "规则ID", example = "11174")
|
||||
@ExcelProperty("规则ID")
|
||||
private Long ruleId;
|
||||
|
||||
@Schema(description = "算法ID", example = "20986")
|
||||
@ExcelProperty("算法ID")
|
||||
private Long algorithmId;
|
||||
|
||||
@Schema(description = "实体ID", example = "2678")
|
||||
@ExcelProperty("实体ID")
|
||||
private Long entityId;
|
||||
|
||||
@Schema(description = "值")
|
||||
@ExcelProperty("值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "是否关键指标")
|
||||
@ExcelProperty("是否关键指标")
|
||||
private Integer isKey;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
@ExcelProperty("排序号")
|
||||
private Long sort;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessdepartmentindicator.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 部门持有指标新增/修改 Request VO")
|
||||
@Data
|
||||
public class BusinessDepartmentIndicatorSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32066")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "指标ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11268")
|
||||
@NotNull(message = "指标ID不能为空")
|
||||
private Long indicatorId;
|
||||
|
||||
@Schema(description = "计量单位ID", example = "16200")
|
||||
private Long unitId;
|
||||
|
||||
@Schema(description = "规则ID", example = "11174")
|
||||
private Long ruleId;
|
||||
|
||||
@Schema(description = "算法ID", example = "20986")
|
||||
private Long algorithmId;
|
||||
|
||||
@Schema(description = "实体ID", example = "2678")
|
||||
private Long entityId;
|
||||
|
||||
@Schema(description = "值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "是否关键指标")
|
||||
private Integer isKey;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Long sort;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessdimension;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.businessdimension.vo.*;
|
||||
import com.zt.plat.module.base.dal.dataobject.businessdimension.BusinessDimensionDO;
|
||||
import com.zt.plat.module.base.service.businessdimension.BusinessDimensionService;
|
||||
|
||||
@Tag(name = "管理后台 - 经营指标维度")
|
||||
@RestController
|
||||
@RequestMapping("/base/business-dimension")
|
||||
@Validated
|
||||
public class BusinessDimensionController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private BusinessDimensionService businessDimensionService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建经营指标维度")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-dimension:create')")
|
||||
public CommonResult<BusinessDimensionRespVO> createBusinessDimension(@Valid @RequestBody BusinessDimensionSaveReqVO createReqVO) {
|
||||
return success(businessDimensionService.createBusinessDimension(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新经营指标维度")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-dimension:update')")
|
||||
public CommonResult<Boolean> updateBusinessDimension(@Valid @RequestBody BusinessDimensionSaveReqVO updateReqVO) {
|
||||
businessDimensionService.updateBusinessDimension(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除经营指标维度")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:business-dimension:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessDimension(@RequestParam("id") Long id) {
|
||||
businessDimensionService.deleteBusinessDimension(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除经营指标维度")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-dimension:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessDimensionList(@RequestBody BatchDeleteReqVO req) {
|
||||
businessDimensionService.deleteBusinessDimensionListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得经营指标维度")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-dimension:query')")
|
||||
public CommonResult<BusinessDimensionRespVO> getBusinessDimension(@RequestParam("id") Long id) {
|
||||
BusinessDimensionDO businessDimension = businessDimensionService.getBusinessDimension(id);
|
||||
return success(BeanUtils.toBean(businessDimension, BusinessDimensionRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得经营指标维度分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-dimension:query')")
|
||||
public CommonResult<PageResult<BusinessDimensionRespVO>> getBusinessDimensionPage(@Valid BusinessDimensionPageReqVO pageReqVO) {
|
||||
PageResult<BusinessDimensionDO> pageResult = businessDimensionService.getBusinessDimensionPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, BusinessDimensionRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/list-by-parent-id")
|
||||
@Operation(summary = "获得经营指标维度列表通过父级ID")
|
||||
@Parameter(name = "parentId", description = "父级ID", example = "0")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-dimension:query')")
|
||||
public CommonResult<List<BusinessDimensionRespVO>> getBusinessDimensionListByParentId(@RequestParam(value = "parentId", required = false) Long parentId,
|
||||
@RequestParam(value = "level", required = false) Integer level) {
|
||||
List<BusinessDimensionDO> list = businessDimensionService.getBusinessDimensionListByParentId(parentId, level);
|
||||
return success(BeanUtils.toBean(list, BusinessDimensionRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出经营指标维度 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-dimension:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportBusinessDimensionExcel(@Valid BusinessDimensionPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BusinessDimensionDO> list = businessDimensionService.getBusinessDimensionPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "经营指标维度.xls", "数据", BusinessDimensionRespVO.class,
|
||||
BeanUtils.toBean(list, BusinessDimensionRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessdimension.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import com.zt.plat.framework.excel.core.annotations.DictFormat;
|
||||
import com.zt.plat.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 经营指标维度 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class BusinessDimensionRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5174")
|
||||
@ExcelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父级ID", example = "29218")
|
||||
@ExcelProperty("父级ID")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "维度类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty(value = "维度类型", converter = DictConvert.class)
|
||||
@DictFormat("demo_contract") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String typeValue;
|
||||
|
||||
@Schema(description = "维度编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("维度编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "维度名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@ExcelProperty("维度名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessdimension.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 经营指标维度新增/修改 Request VO")
|
||||
@Data
|
||||
public class BusinessDimensionSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5174")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父级ID", example = "29218")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "维度类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "维度类型不能为空")
|
||||
private String typeValue;
|
||||
|
||||
@Schema(description = "维度编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "维度编码不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "维度名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@NotEmpty(message = "维度名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessindicator;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.businessindicator.vo.*;
|
||||
import com.zt.plat.module.base.dal.dataobject.businessindicator.BusinessIndicatorDO;
|
||||
import com.zt.plat.module.base.service.businessindicator.BusinessIndicatorService;
|
||||
|
||||
@Tag(name = "管理后台 - 经营指标")
|
||||
@RestController
|
||||
@RequestMapping("/base/business-indicator")
|
||||
@Validated
|
||||
@FileUploadController(source = "base.businessindicator")
|
||||
public class BusinessIndicatorController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
static {
|
||||
FileUploadController annotation = BusinessIndicatorController.class.getAnnotation(FileUploadController.class);
|
||||
if (annotation != null) {
|
||||
setFileUploadInfo(annotation);
|
||||
}
|
||||
}
|
||||
|
||||
@Resource
|
||||
private BusinessIndicatorService businessIndicatorService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建经营指标")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-indicator:create')")
|
||||
public CommonResult<BusinessIndicatorRespVO> createBusinessIndicator(@Valid @RequestBody BusinessIndicatorSaveReqVO createReqVO) {
|
||||
return success(businessIndicatorService.createBusinessIndicator(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新经营指标")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-indicator:update')")
|
||||
public CommonResult<Boolean> updateBusinessIndicator(@Valid @RequestBody BusinessIndicatorSaveReqVO updateReqVO) {
|
||||
businessIndicatorService.updateBusinessIndicator(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除经营指标")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:business-indicator:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessIndicator(@RequestParam("id") Long id) {
|
||||
businessIndicatorService.deleteBusinessIndicator(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除经营指标")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-indicator:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessIndicatorList(@RequestBody BatchDeleteReqVO req) {
|
||||
businessIndicatorService.deleteBusinessIndicatorListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得经营指标")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-indicator:query')")
|
||||
public CommonResult<BusinessIndicatorRespVO> getBusinessIndicator(@RequestParam("id") Long id) {
|
||||
// BusinessIndicatorDO businessIndicator = businessIndicatorService.getBusinessIndicator(id);
|
||||
// 使用getBusinessIndicatorPageWithRelations方法
|
||||
BusinessIndicatorPageReqVO pageReqVO = new BusinessIndicatorPageReqVO();
|
||||
pageReqVO.setId(id);
|
||||
BusinessIndicatorRespVO businessIndicator = businessIndicatorService.getBusinessIndicatorPageWithRelations(pageReqVO).getList().get(0);
|
||||
return success(BeanUtils.toBean(businessIndicator, BusinessIndicatorRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得经营指标分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-indicator:query')")
|
||||
public CommonResult<PageResult<BusinessIndicatorRespVO>> getBusinessIndicatorPage(@Valid BusinessIndicatorPageReqVO pageReqVO) {
|
||||
PageResult<BusinessIndicatorRespVO> pageResult = businessIndicatorService.getBusinessIndicatorPageWithRelations(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出经营指标 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-indicator:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportBusinessIndicatorExcel(@Valid BusinessIndicatorPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BusinessIndicatorDO> list = businessIndicatorService.getBusinessIndicatorPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "经营指标.xls", "数据", BusinessIndicatorRespVO.class,
|
||||
BeanUtils.toBean(list, BusinessIndicatorRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/list-by-parent-id")
|
||||
@Operation(summary = "获得经营指标列表通过父级ID")
|
||||
@Parameter(name = "parentId", description = "父级ID", example = "0")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-indicator:query')")
|
||||
public CommonResult<List<BusinessIndicatorRespVO>> getBusinessIndicatorListByParentId(@RequestParam(value = "parentId", required = false) Long parentId) {
|
||||
List<BusinessIndicatorDO> list = businessIndicatorService.getBusinessIndicatorListByParentId(parentId);
|
||||
return success(BeanUtils.toBean(list, BusinessIndicatorRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessindicator.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
|
||||
@Schema(description = "管理后台 - 经营指标分页 Request VO")
|
||||
@Data
|
||||
public class BusinessIndicatorPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "指标编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "指标名称", example = "芋艿")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "指标ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "维度ID")
|
||||
private Long dimensionId;
|
||||
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessindicator.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 经营指标 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class BusinessIndicatorRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3512")
|
||||
@ExcelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父级ID", example = "12917")
|
||||
@ExcelProperty("父级ID")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "指标编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("指标编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "指标名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("指标名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "数据类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("数据类型")
|
||||
private String dataValue;
|
||||
|
||||
@Schema(description = "计量单位量ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17208")
|
||||
@ExcelProperty("计量单位量ID")
|
||||
private Long quantityId;
|
||||
|
||||
@Schema(description = "计量单位ID", example = "31355")
|
||||
@ExcelProperty("计量单位ID")
|
||||
private Long unitId;
|
||||
|
||||
@Schema(description = "算法ID", example = "2240")
|
||||
@ExcelProperty("算法ID")
|
||||
private Long algorithmId;
|
||||
|
||||
@Schema(description = "规则ID", example = "32155")
|
||||
@ExcelProperty("规则ID")
|
||||
private Long ruleId;
|
||||
|
||||
@Schema(description = "维度ID", example = "7598")
|
||||
@ExcelProperty("维度ID")
|
||||
private Long dimensionId;
|
||||
|
||||
@Schema(description = "周期类型值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("周期类型值")
|
||||
private String cycleValue;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("状态")
|
||||
private String statusValue;
|
||||
|
||||
@Schema(description = "是否可修改")
|
||||
@ExcelProperty("是否可修改")
|
||||
private Integer isModify;
|
||||
|
||||
@Schema(description = "用户ID", example = "13550")
|
||||
@ExcelProperty("用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
// 新增关联名称字段
|
||||
@Schema(description = "算法模型名称")
|
||||
private String algorithmName;
|
||||
|
||||
@Schema(description = "算法类型值")
|
||||
private String algorithmTypeValue;
|
||||
|
||||
@Schema(description = "规则模型名称")
|
||||
private String ruleName;
|
||||
|
||||
@Schema(description = "规则类型值")
|
||||
private String ruleTypeValue;
|
||||
|
||||
@Schema(description = "负责人名称")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "指标描述")
|
||||
private String description;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessindicator.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 经营指标新增/修改 Request VO")
|
||||
@Data
|
||||
public class BusinessIndicatorSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3512")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父级ID", example = "12917")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "指标编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "指标编码不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "指标名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@NotEmpty(message = "指标名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "指标描述", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "指标描述不能为空")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "数据类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "数据类型不能为空")
|
||||
private String dataValue;
|
||||
|
||||
@Schema(description = "计量单位量ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17208")
|
||||
private Long quantityId;
|
||||
|
||||
@Schema(description = "计量单位ID", example = "31355")
|
||||
private Long unitId;
|
||||
|
||||
@Schema(description = "算法ID", example = "2240")
|
||||
private Long algorithmId;
|
||||
|
||||
@Schema(description = "规则ID", example = "32155")
|
||||
private Long ruleId;
|
||||
|
||||
@Schema(description = "维度ID", example = "7598")
|
||||
private Long dimensionId;
|
||||
|
||||
@Schema(description = "周期类型值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String cycleValue;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "状态不能为空")
|
||||
private String statusValue;
|
||||
|
||||
@Schema(description = "是否可修改")
|
||||
private boolean isModify;
|
||||
|
||||
@Schema(description = "负责人ID", example = "13550")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "负责部门")
|
||||
private String departmentId;
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
package com.zt.plat.module.base.controller.admin.businessrule;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.businessrule.vo.*;
|
||||
import com.zt.plat.module.base.dal.dataobject.businessrule.BusinessRuleDO;
|
||||
import com.zt.plat.module.base.service.businessrule.BusinessRuleService;
|
||||
|
||||
@Tag(name = "管理后台 - 业务规则")
|
||||
@RestController
|
||||
@RequestMapping("/base/business-rule")
|
||||
@Validated
|
||||
public class BusinessRuleController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private BusinessRuleService businessRuleService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建业务规则")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-rule:create')")
|
||||
public CommonResult<BusinessRuleRespVO> createBusinessRule(@Valid @RequestBody BusinessRuleSaveReqVO createReqVO) {
|
||||
return success(businessRuleService.createBusinessRule(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新业务规则")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-rule:update')")
|
||||
public CommonResult<Boolean> updateBusinessRule(@Valid @RequestBody BusinessRuleSaveReqVO updateReqVO) {
|
||||
businessRuleService.updateBusinessRule(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除业务规则")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:business-rule:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessRule(@RequestParam("id") Long id) {
|
||||
businessRuleService.deleteBusinessRule(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除业务规则")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-rule:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessRuleList(@RequestBody BatchDeleteReqVO req) {
|
||||
businessRuleService.deleteBusinessRuleListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得业务规则")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-rule:query')")
|
||||
public CommonResult<BusinessRuleRespVO> getBusinessRule(@RequestParam("id") Long id) {
|
||||
BusinessRuleDO businessRule = businessRuleService.getBusinessRule(id);
|
||||
return success(BeanUtils.toBean(businessRule, BusinessRuleRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得业务规则分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-rule:query')")
|
||||
public CommonResult<PageResult<BusinessRuleRespVO>> getBusinessRulePage(@Valid BusinessRulePageReqVO pageReqVO) {
|
||||
PageResult<BusinessRuleDO> pageResult = businessRuleService.getBusinessRulePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, BusinessRuleRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出业务规则 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-rule:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportBusinessRuleExcel(@Valid BusinessRulePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BusinessRuleDO> list = businessRuleService.getBusinessRulePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "业务规则.xls", "数据", BusinessRuleRespVO.class,
|
||||
BeanUtils.toBean(list, BusinessRuleRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user