Browse Source

add system functions

main
wangshaoping 1 year ago
parent
commit
174984a337
  1. 2
      build-version.gradle
  2. 1
      build.gradle
  3. 223
      config/application.properties
  4. 48
      config/banner.txt
  5. 216
      config/license.txt
  6. 66
      config/logback-spring.xml
  7. 7
      gradle.properties
  8. 2
      io.sc.platform.core.frontend/package.json
  9. 12
      io.sc.platform.core.frontend/src/components/index.ts
  10. 3
      io.sc.platform.core.frontend/src/i18n/messages.json
  11. 3
      io.sc.platform.core.frontend/src/i18n/messages_tw_CN.json
  12. 3
      io.sc.platform.core.frontend/src/i18n/messages_zh_CN.json
  13. 9
      io.sc.platform.core.frontend/src/menus/menus.json
  14. 15
      io.sc.platform.core.frontend/src/platform/components/grid/PlatformGrid.vue
  15. 3
      io.sc.platform.core.frontend/src/platform/components/index.ts
  16. 167
      io.sc.platform.core.frontend/src/platform/components/tree/WTreeGrid.vue
  17. 1
      io.sc.platform.core.frontend/src/platform/index.ts
  18. 7
      io.sc.platform.core.frontend/src/platform/plugin/manager/RouterManager.ts
  19. 10
      io.sc.platform.core.frontend/src/platform/utils/TreeBuilder.ts
  20. 12
      io.sc.platform.core.frontend/src/routes/routes.json
  21. 58
      io.sc.platform.core.frontend/src/views/TreeGrid.vue
  22. 4
      io.sc.platform.core.frontend/template-project/package.json
  23. 12
      io.sc.platform.core.frontend/template-project/src/components/index.ts
  24. 3
      io.sc.platform.core.frontend/template-project/src/i18n/messages.json
  25. 3
      io.sc.platform.core.frontend/template-project/src/i18n/messages_tw_CN.json
  26. 3
      io.sc.platform.core.frontend/template-project/src/i18n/messages_zh_CN.json
  27. 9
      io.sc.platform.core.frontend/template-project/src/menus/menus.json
  28. 12
      io.sc.platform.core.frontend/template-project/src/routes/routes.json
  29. 58
      io.sc.platform.core.frontend/template-project/src/views/TreeGrid.vue
  30. 26
      io.sc.platform.core/src/main/resources/io/sc/platform/core/i18n/words.properties
  31. 26
      io.sc.platform.core/src/main/resources/io/sc/platform/core/i18n/words_tw_CN.properties
  32. 26
      io.sc.platform.core/src/main/resources/io/sc/platform/core/i18n/words_zh_CN.properties
  33. 2
      io.sc.platform.developer.doc/asciidoc/index.adoc
  34. 0
      io.sc.platform.developer.doc/asciidoc/yu/rwa/rwa.adoc
  35. 0
      io.sc.platform.developer.doc/asciidoc/yu/rws/rws.adoc
  36. 0
      io.sc.platform.developer.doc/asciidoc/yu/yu.adoc
  37. 202
      io.sc.platform.developer.frontend/package.json
  38. 20
      io.sc.platform.flowable/src/main/java/io/sc/platform/flowable/jpa/entity/Agent.java
  39. 20
      io.sc.platform.flowable/src/main/java/io/sc/platform/flowable/jpa/entity/ProcessEntity.java
  40. 2
      io.sc.platform.flowable/src/main/java/io/sc/platform/flowable/service/impl/ProcessQueryServiceImpl.java
  41. 62
      io.sc.platform.flowable/src/main/resources/liquibase/PF_1.0.0_20221228__Process Manager Database Schema DDL.xml
  42. 11
      io.sc.platform.gradle/templates/pgp/app/src/main/resources/META-INF/platform/plugins/frontend-module.json
  43. 2
      io.sc.platform.gradle/templates/pgp/setup/build-version.gradle
  44. 60
      io.sc.platform.gradle/templates/pgp/setup/build.gradle.txt
  45. 9
      io.sc.platform.gradle/templates/pgp/setup/gradle.properties
  46. 7
      io.sc.platform.jdbc.driver.oracle-12.2.0.1/build.gradle
  47. 10
      io.sc.platform.jdbc.driver.oracle-12.2.0.1/src/main/resources/META-INF/platform/plugins/jdbc-connection-template.json
  48. 7
      io.sc.platform.jdbc.driver.oracle/build.gradle
  49. 12
      io.sc.platform.jdbc.schemacrawler-14.21.02/build.gradle
  50. 1
      io.sc.platform.jdbc.schemacrawler-14.21.02/gradle.properties
  51. 218
      io.sc.platform.jdbc.schemacrawler-14.21.02/src/main/java/io/sc/platform/jdbc/schemacrawler/MetaDataLoaderImpl.java
  52. 22
      io.sc.platform.jdbc.schemacrawler-14.21.02/src/main/java/io/sc/platform/jdbc/schemacrawler/ParentAndChildrenTableComparator.java
  53. 1
      io.sc.platform.jdbc.schemacrawler-14.21.02/src/main/resources/META-INF/services/io.sc.platform.jdbc.meta.MetaDataLoader
  54. 202
      io.sc.platform.lcdp.frontend/package.json
  55. 10
      io.sc.platform.lcdp/src/main/java/io/sc/platform/lcdp/configure/jpa/entity/ConfigureEntity.java
  56. 12
      io.sc.platform.lcdp/src/main/java/io/sc/platform/lcdp/configure/service/impl/ConfigureServiceImpl.java
  57. 2
      io.sc.platform.lcdp/src/main/java/io/sc/platform/lcdp/configure/vo/Setting.java
  58. 22
      io.sc.platform.lcdp/src/main/resources/liquibase/LCDP_1.0.0_20220606__LowCode_DDL.xml
  59. 202
      io.sc.platform.mvc.frontend/package.json
  60. 36
      io.sc.platform.mvc/src/main/java/io/sc/platform/mvc/support/CascadeMany2Many.java
  61. 22
      io.sc.platform.mvc/src/main/java/io/sc/platform/mvc/support/OrderItem.java
  62. 8
      io.sc.platform.mvc/src/main/resources/META-INF/platform/plugins/parameters.json
  63. 10
      io.sc.platform.orm/src/main/java/io/sc/platform/orm/entity/AuditorEntity.java
  64. 2
      io.sc.platform.orm/src/main/java/io/sc/platform/orm/entity/CorporationAuditorEntity.java
  65. 20
      io.sc.platform.orm/src/main/java/io/sc/platform/orm/service/impl/DaoServiceImpl.java
  66. 59
      io.sc.platform.orm/src/main/java/io/sc/platform/orm/service/support/QueryParameter.java
  67. 9
      io.sc.platform.orm/src/main/java/io/sc/platform/orm/service/support/QueryResult.java
  68. 4
      io.sc.platform.security.frontend/package.json
  69. 52
      io.sc.platform.security/src/main/java/io/sc/platform/security/initializer/AdministratorRoleAndUserInitializer.java
  70. 18
      io.sc.platform.security/src/main/java/io/sc/platform/security/initializer/CorporationInitializer.java
  71. 28
      io.sc.platform.security/src/main/java/io/sc/platform/security/installer/AdministratorInstallerItem.java
  72. 20
      io.sc.platform.security/src/main/java/io/sc/platform/security/service/impl/UserDetailsServiceImpl.java
  73. 6
      io.sc.platform.security/src/main/java/io/sc/platform/security/service/support/Application.java
  74. 4
      io.sc.platform.security/src/main/java/io/sc/platform/security/service/support/Corporation.java
  75. 8
      io.sc.platform.security/src/main/java/io/sc/platform/security/service/support/Org.java
  76. 6
      io.sc.platform.security/src/main/java/io/sc/platform/security/service/support/Role.java
  77. 30
      io.sc.platform.security/src/main/java/io/sc/platform/security/service/support/User.java
  78. 207
      io.sc.platform.security/src/main/resources/liquibase/PF_11.0.0_20220606__Security_DDL.xml
  79. 44
      io.sc.platform.system.api/src/main/java/io/sc/platform/system/api/announcement/AnnouncementVo.java
  80. 8
      io.sc.platform.system.api/src/main/java/io/sc/platform/system/api/menu/MenuVo.java
  81. 10
      io.sc.platform.system.api/src/main/java/io/sc/platform/system/api/org/OrgVo.java
  82. 4
      io.sc.platform.system.api/src/main/java/io/sc/platform/system/api/parameter/Parameter.java
  83. 40
      io.sc.platform.system.api/src/main/java/io/sc/platform/system/api/parameter/ParameterVo.java
  84. 4
      io.sc.platform.system.frontend/package.json
  85. 8
      io.sc.platform.system.frontend/public/index.html
  86. 20
      io.sc.platform.system.frontend/src/components/index.ts
  87. 31
      io.sc.platform.system.frontend/src/i18n/messages.json
  88. 29
      io.sc.platform.system.frontend/src/i18n/messages_tw_CN.json
  89. 30
      io.sc.platform.system.frontend/src/i18n/messages_zh_CN.json
  90. 2
      io.sc.platform.system.frontend/src/menus/menus.json
  91. 26
      io.sc.platform.system.frontend/src/routes/routes.json
  92. 4
      io.sc.platform.system.frontend/src/views/Corporation.vue
  93. 4
      io.sc.platform.system.frontend/src/views/Dictionary.vue
  94. 4
      io.sc.platform.system.frontend/src/views/Parameter.vue
  95. 70
      io.sc.platform.system.frontend/src/views/announcement/Announcement.vue
  96. 51
      io.sc.platform.system.frontend/src/views/corporation/Corporation.vue
  97. 70
      io.sc.platform.system.frontend/src/views/dictionary/Dictionary.vue
  98. 70
      io.sc.platform.system.frontend/src/views/i18n/I18n.vue
  99. 248
      io.sc.platform.system.frontend/src/views/menu/Menu.vue
  100. 155
      io.sc.platform.system.frontend/src/views/menu/SelectRoleDialog.vue

2
build-version.gradle

@ -146,7 +146,7 @@ subprojects {
// ext['oauth2-oidc-sdk.version'] =
// ext['ojdbc.version'] =
// ext['okhttp3.version'] =
// ext['oracle-database.version'] =
// ext['oracle-database.version'] ='12.2.0.1'
// ext['pooled-jms.version'] =
// ext['postgresql.version'] =
// ext['prometheus-pushgateway.version'] =

1
build.gradle

@ -52,6 +52,7 @@ subprojects {
exclude group: "org.apache.logging.log4j", module: "log4j-to-slf4j"
exclude group: "org.slf4j", module: "slf4j-jdk14"
exclude group: "org.slf4j", module: "slf4j-nop"
//exclude group: "com.oracle.database.jdbc", module: "ojdbc8"
}
dependencyManagement {

223
config/application.properties

@ -0,0 +1,223 @@
##########################################################################
#(100) excluded auto configuration - io.sc.platform.core
##########################################################################
spring.autoconfigure.exclude =
##########################################################################
#(150) application configuration - io.sc.platform.core
##########################################################################
# - io.sc.platform.core
application.audit-log-mode = none
#application.audit-log-mode = none
#application.audit-log-mode = log
#application.audit-log-mode = database
# - io.sc.platform.installer
application.installer.enabled = true
# - io.sc.platform.jdbc.liquibase
application.updater.enabled = true
# - io.sc.platform.security
application.default-password = password
##########################################################################
#(200) spring.main configuration - io.sc.platform.core
##########################################################################
spring.main.allow-bean-definition-overriding = false
spring.main.banner-mode = console
spring.main.lazy-initialization = false
spring.main.log-startup-info = true
spring.main.register-shutdown-hook = true
##########################################################################
#(210) jasypt encryptor configuration - io.sc.platform.core
##########################################################################
jasypt.encryptor.bean = platformJasyptStringEncryptor
##########################################################################
#(300) web server configuration - io.sc.platform.mvc
##########################################################################
#server.address = 127.0.0.1
server.port = 8080
server.servlet.context-path = /
server.servlet.session.timeout = 30m
server.error.path = /error
server.error.whitelabel.enabled = true
server.error.include-exception = true
server.error.include-binding-errors = always
server.error.include-message = always
server.error.include-stacktrace = always
##########################################################################
#(1000) dataSource configuration - io.sc.platform.jdbc
##########################################################################
spring.datasource.items[primary].driver-class-name = org.h2.Driver
spring.datasource.items[primary].url = jdbc:h2:mem:DB_PLATFORM;DB_CLOSE_DELAY=-1
spring.datasource.items[primary].username = platform
spring.datasource.items[primary].password = platform
##########################################################################
#(1100) jpa configuration - io.sc.platform.orm.jpa
##########################################################################
spring.jpa.open-in-view = false
spring.jpa.show-sql = false
spring.jpa.generate-ddl = false
spring.jpa.hibernate.ddl-auto = none
spring.jpa.hibernate.jdbc.batch_size = 25
spring.jpa.properties.hibernate.enable_lazy_load_no_trans =true
spring.jpa.properties.hibernate.dialect =org.hibernate.dialect.H2Dialect
##########################################################################
#(1500) hikari configuration - io.sc.platform.jdbc
##########################################################################
#spring.datasource.items[primary].hikari.autoCommit = true
#spring.datasource.items[primary].hikari.connectionTimeout = 10000
#spring.datasource.items[primary].hikari.idleTimeout = 600000
#spring.datasource.items[primary].hikari.maxLifetime = 1800000
#spring.datasource.items[primary].hikari.minimumIdle = 10
#spring.datasource.items[primary].hikari.maximumPoolSize = 10
#spring.datasource.items[primary].hikari.metricRegistry =
#spring.datasource.items[primary].hikari.healthCheckRegistry =
#spring.datasource.items[primary].hikari.poolName =
#spring.datasource.items[primary].hikari.initializationFailTimeout = 1
#spring.datasource.items[primary].hikari.isolateInternalQueries = false
#spring.datasource.items[primary].hikari.allowPoolSuspension = false
#spring.datasource.items[primary].hikari.readOnly = false
#spring.datasource.items[primary].hikari.registerMbeans = false
#spring.datasource.items[primary].hikari.catalog =
#spring.datasource.items[primary].hikari.connectionInitSql =
#spring.datasource.items[primary].hikari.driverClassName =
#spring.datasource.items[primary].hikari.transactionIsolation =
#spring.datasource.items[primary].hikari.validationTimeout = 5000
#spring.datasource.items[primary].hikari.leakDetectionThreshold = 0
#spring.datasource.items[primary].hikari.dataSource =
#spring.datasource.items[primary].hikari.schema =
#spring.datasource.items[primary].hikari.threadFactory =
#spring.datasource.items[primary].hikari.scheduledExecutor =
##########################################################################
#(2100) spring.session configuration - io.sc.platform.mvc
##########################################################################
spring.session.store-type = none
#spring.session.store-type = jdbc
#spring.session.store-type = redis
spring.session.jdbc.initializer.enabled = false
spring.session.jdbc.cleanup-cron = 0 */5 * * * *
spring.session.redis.namespace = spring:session
spring.session.redis.cleanupCron = 0 */5 * * * *
##########################################################################
#(2200) spring web configuration (WebProperties) - io.sc.platform.mvc
##########################################################################
spring.web.resources.add-mappings = true
spring.web.resources.cache.cachecontrol.cache-public = true
spring.web.resources.cache.cachecontrol.must-revalidate = true
spring.web.resources.chain.cache = true
spring.web.resources.chain.compressed = true
##########################################################################
#(2300) management http server configuration - io.sc.platform.mvc
##########################################################################
management.endpoints.enabled-by-default = true
management.endpoints.web.exposure.include = *
management.context-path = /actuator
management.security.enabled = false
##########################################################################
#(2400) thymeleaf configuration - io.sc.platform.mvc
##########################################################################
spring.thymeleaf.enabled = true
spring.thymeleaf.cache = false
spring.thymeleaf.encoding = UTF-8
spring.thymeleaf.mode = HTML
spring.thymeleaf.prefix = classpath:/templates/
spring.thymeleaf.check-template = false
spring.thymeleaf.check-template-location = false
spring.thymeleaf.servlet.content-type = text/html
##########################################################################
#(2500) jackson configuration - io.sc.platform.mvc
##########################################################################
spring.jackson.time-zone = Asia/Shanghai
spring.jackson.date-format = yyyy-MM-dd HH:mm:ss
spring.jackson.serialization.indent_output = true
spring.jackson.serialization.fail_on_empty_beans = false
spring.jackson.deserialization.fail_on_ignored_properties = false
spring.jackson.parser.allow_comments = true
spring.jackson.parser.allow_single_quotes = true
spring.jackson.parser.allow_trailing_comma = true
spring.jackson.parser.allow_unquoted_field_names = true
spring.jackson.parser.ignore_undefined = true
spring.jackson.parser.allow_unquoted_control_chars = true
##########################################################################
#(2600) i18n message source configuration - io.sc.platform.mvc
##########################################################################
spring.messages.alwaysUseMessageFormat = false
spring.messages.cacheDuration = -1
spring.messages.encoding = UTF-8
spring.messages.fallbackToSystemLocale = false
spring.messages.useCodeAsDefaultMessage = true
##########################################################################
#(3000) platform security configuration - io.sc.platform.security.loginform
##########################################################################
spring.security.formLogin.loginPage = /login
spring.security.formLogin.loginProcessingUrl = /login
spring.security.formLogin.failureUrl = /login-error
spring.security.logout.logoutUrl = /logout
spring.security.logout.logoutSuccessUrl = /
##########################################################################
#(4000) email configuration - io.sc.platform.communication
##########################################################################
spring.mail.host=zzz.xxx.yyy
spring.mail.port=25
spring.mail.protocol=smtp
spring.mail.test-connection=false
spring.mail.default-encoding=UTF-8
spring.mail.properties.mail.smtp.auth=true
spring.mail.username=xxx
spring.mail.password=yyy
##########################################################################
#(5000) flowable bpm configuration - io.sc.platform.flowable
##########################################################################
# core
flowable.asyncExecutorActivate =false
flowable.asyncHistoryExecutorActivate = false
flowable.check-process-definitions=false
flowable.custom-mybatis-mappers=
flowable.custom-mybatis-x-m-l-mappers=
flowable.database-schema=
flowable.database-schema-update=true
flowable.db-history-used=true
flowable.deployment-name=SpringBootAutoDeployment
flowable.history-level=
flowable.process-definition-location-prefix=classpath*:/processes/
flowable.process-definition-location-suffixes=**.bpmn20.xml,**.bpmn
# process
flowable.process.definition-cache-limit=-1
flowable.process.enable-safe-xml=true
flowable.process.servlet.load-on-startup=-1
flowable.process.servlet.name=Flowable BPMN Rest API
flowable.process.servlet.path=/process-api
# cmmn
flowable.cmmn.enabled=false
# content
flowable.content.enabled=false
# dmn
flowable.dmn.enabled=false
# form
flowable.form.enabled=false
# idm
flowable.idm.enabled=false
##########################################################################
#(8000) cxf configuration - io.sc.platform.ws.cxf
##########################################################################
cxf.path = /webservices
##########################################################################
#(9000) p6spy configuration - io.sc.platform.jdbc
##########################################################################
p6spy.enabled = true
p6spy.ignorePattern = false

48
config/banner.txt

@ -0,0 +1,48 @@
**************************************************************************************
Name: app.platform
Version: ${application.version}
Base on Spring Boot ${spring-boot.version}
**************************************************************************************
System.environment:
--------------------------------------------------------------------------------------
java.specification.version = 1.8
java.specification.vendor = Oracle Corporation
java.specification.name = Java Platform API Specification
java.vm.specification.version = 1.8
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.name = Java Virtual Machine Specification
java.home = /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre
java.version = 1.8.0_332
java.vendor = Azul Systems, Inc.
java.vendor.url = http://www.azul.com/
java.vm.version = 25.332-b09
java.vm.vendor = Azul Systems, Inc.
java.vm.name = OpenJDK 64-Bit Server VM
java.class.version = 52.0
java.class.path = ${java.class.path2}
java.library.path = /Users/wangshaoping/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
java.io.tmpdir = /var/folders/82/6m96_g610hj1v1tcpvhtjysr0000gn/T/
java.ext.dirs = /Users/wangshaoping/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
os.name = Mac OS X
os.arch = aarch64
os.version = 13.5.1
user.name = wangshaoping
user.home = /Users/wangshaoping
user.dir = /Users/wangshaoping/wspsc/workspace/wangshaoping/v8/platform
Application.environment
--------------------------------------------------------------------------------------
application.name = app.platform
application.is-running-in-development = false
application.is-running-in-web-container = false
application.home.dir = /Users/wangshaoping/wspsc/workspace/wangshaoping/v8/platform
application.installer.enabled = ${application.installer.enabled}
application.updater.enabled = ${application.updater.enabled}
application.audit-log-mode = ${application.audit-log-mode}
spring.config.location = file:/Users/wangshaoping/wspsc/workspace/wangshaoping/v8/platform/config/application.properties
spring.banner.location = file:/Users/wangshaoping/wspsc/workspace/wangshaoping/v8/platform/config/banner.txt
logging.config = file:/Users/wangshaoping/wspsc/workspace/wangshaoping/v8/platform/config/logback-spring.xml
p6spy.enabled = ${p6spy.enabled}
p6spy.ignorePattern = ${p6spy.ignorePattern}
**************************************************************************************

216
config/license.txt

@ -0,0 +1,216 @@
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=======================================================================
To the extent any open source subcomponents are licensed under the EPL and/or other
similar licenses that require the source code and/or modifications to
source code to be made available (as would be noted above), you may obtain a
copy of the source code corresponding to the binaries for such open source
components and modifications thereto, if any, (the "Source Files"), by
downloading the Source Files from https://www.springsource.org/download,
or by sending a request, with your name and address to: VMware, Inc., 3401 Hillview
Avenue, Palo Alto, CA 94304, United States of America or email info@vmware.com. All
such requests should clearly specify: OPEN SOURCE FILES REQUEST, Attention General
Counsel. VMware shall mail a copy of the Source Files to you on a CD or equivalent
physical medium. This offer to obtain a copy of the Source Files is valid for three
years from the date you acquired this Software product.

66
config/logback-spring.xml

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- 自动扫描本文件,如果发生变化,则重新初始化日志系统,并设置每隔5秒钟扫描一次 -->
<configuration debug="false" scan="true" scanPeriod="5 seconds">
<!--
以下为 logback 的 spring 扩展支持的功能,即支持从 application.properties 文件中获取属性,并在此文件中采用 ${} 方式使用。
要使用此功能,必须使用 logback-ext-spring 扩展 jar 包,以 gradle 构建系统,则需要加入以下依赖
dependencies {
compile(
"org.logback-extensions:logback-ext-spring:0.1.2"
)
}
-->
<property name="homedir" value="/Users/wangshaoping/wspsc/workspace/wangshaoping/v8/platform"/>
<property name="pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger{36} - %msg%n"/>
<!-- 在控制台中输出日志 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder><pattern>${pattern}</pattern></encoder>
</appender>
<!-- 在磁盘文件中输出日志 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder><pattern>${pattern}</pattern></encoder>
<file>${homedir}/logs/log.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${homedir}/logs/log.%d.log</fileNamePattern>
<maxHistory>30</maxHistory>
</rollingPolicy>
</appender>
<root level="info">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
<logger name="org.wsp.engine.model.core.code" level="info" additivity="false"/>
<logger name="org.wsp.engine.rule.core.code" level="debug" additivity="false">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</logger>
<logger name="org.springframework.security" level="info" additivity="false">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</logger>
<!-- 可对不同的日志写入不同的文件示例 -->
<!--
<appender name="RULE_ENGINE_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder><pattern>${pattern}</pattern></encoder>
<file>${homedir}/logs/rule-engine.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${homedir}/logs/rule-engine.%d.log</fileNamePattern>
<maxHistory>30</maxHistory>
</rollingPolicy>
</appender>
<logger name="org.wsp.engine.rule.core.code" level="debug" additivity="false">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
<appender-ref ref="RULE_ENGINE_FILE" />
</logger>
-->
</configuration>

7
gradle.properties

@ -36,9 +36,9 @@ application_version=1.0.0
# platform
###########################################################
platform_group=io.sc
platform_version=8.1.11
platform_version=8.1.13
platform_plugin_version=8.1.11
platform_core_frontend_version=8.1.27
platform_core_frontend_version=8.1.42
###########################################################
# dependencies version
@ -66,7 +66,8 @@ oshi_version=6.4.2
p6spy_version=3.9.1
poi_ooxml_version=3.17
schemacrawler_version=16.19.11
spring_boot_version=2.7.17
#schemacrawler_version=14.21.02
spring_boot_version=2.7.18
spring_cloud_alibaba_version=2021.0.4.0
spring_cloud_context_version=3.1.4
spring_cloud_version=2021.0.8

2
io.sc.platform.core.frontend/package.json

@ -1,6 +1,6 @@
{
"name": "platform-core",
"version": "8.1.28",
"version": "8.1.42",
"description": "前端核心包,用于快速构建前端的脚手架",
"//main": "库的主文件",
"main": "dist/platform-core.js",

12
io.sc.platform.core.frontend/src/components/index.ts

@ -5,11 +5,13 @@
import dialog from '@/views/Dialog.vue';
import codemirror from '@/views/Codemirror.vue';
import select from '@/views/Select.vue';
import treeGrid from '@/views/TreeGrid.vue';
const localComponents = {
'component.testcase.dialog': dialog,
'component.testcase.codemirror': codemirror,
'component.testcase.select': select,
}
const localComponents = {
'component.testcase.dialog': dialog,
'component.testcase.codemirror': codemirror,
'component.testcase.select': select,
'component.testcase.treeGrid': treeGrid,
};
export default localComponents;

3
io.sc.platform.core.frontend/src/i18n/messages.json

@ -2,5 +2,6 @@
"menu.testcase": "Test Case",
"menu.testcase.codemirror": "CodeMirror",
"menu.testcase.dialog": "Dialog",
"menu.testcase.select": "Select"
"menu.testcase.select": "Select",
"menu.testcase.treeGrid": "Tree Grid"
}

3
io.sc.platform.core.frontend/src/i18n/messages_tw_CN.json

@ -2,5 +2,6 @@
"menu.testcase": "測試用例",
"menu.testcase.codemirror": "CodeMirror",
"menu.testcase.dialog": "Dialog",
"menu.testcase.select": "Select"
"menu.testcase.select": "Select",
"menu.testcase.treeGrid": "Tree Grid"
}

3
io.sc.platform.core.frontend/src/i18n/messages_zh_CN.json

@ -2,5 +2,6 @@
"menu.testcase": "测试用例",
"menu.testcase.codemirror": "CodeMirror",
"menu.testcase.dialog": "Dialog",
"menu.testcase.select": "Select"
"menu.testcase.select": "Select",
"menu.testcase.treeGrid": "Tree Grid"
}

9
io.sc.platform.core.frontend/src/menus/menus.json

@ -44,5 +44,14 @@
"titleI18nKey": "menu.testcase.select",
"icon": "bi-palette",
"routeName": "route.testcase.select"
},
{
"type": "ROUTE",
"order": 400,
"parentId": "menu.testcase",
"id": "menu.testcase.treeGrid",
"titleI18nKey": "menu.testcase.treeGrid",
"icon": "bi-palette",
"routeName": "route.testcase.treeGrid"
}
]

15
io.sc.platform.core.frontend/src/platform/components/grid/PlatformGrid.vue

@ -22,6 +22,7 @@
@row-click="rowClick"
@row-dblclick="rowDbClick"
@fullscreen="tableFullscreenFun"
@selection="selection"
>
<template #top="scope">
<q-resize-observer @resize="onResize" />
@ -447,6 +448,10 @@ const props = defineProps({
type: Function,
default: null,
}, // 使
onSelection: {
type: Function,
default: null,
},
});
const emit = defineEmits<{
(
@ -461,6 +466,10 @@ const emit = defineEmits<{
row: any, // ,
index: number, // ,
): void;
(
e: 'selection', //
details: any, //
): void;
(
e: 'requestDataBefore', //
requestParams: URLSearchParams | any, //
@ -893,6 +902,11 @@ const rowDbClick = (evt, row, index) => {
onView();
}
};
const selection = (details) => {
if (props.onSelection) {
emit('selection', details);
}
};
const tableSortFun = (dragRowIndex, dropRowIndex) => {
if (dragRowIndex !== dropRowIndex) {
const dragRow = table.rows[dragRowIndex];
@ -1627,6 +1641,7 @@ const onDrop = (e, scope) => {
}
removeDragTopStyle(e);
removeDragBottomStyle(e);
emit('rowDragDropAfter');
};
onMounted(() => {

3
io.sc.platform.core.frontend/src/platform/components/index.ts

@ -8,6 +8,7 @@ import WColorInputPalette from './widget/color/WColorInputPalette.vue';
import WPosition from './widget/position/WPosition.vue';
import WCodemirror from './widget/codemirror/WCodemirror.vue';
import WSelect from './widget/select/WSelect.vue';
import WTreeGrid from './tree/WTreeGrid.vue';
import WDialog from './dialog/WDialog.vue';
import PlatformDialog from './dialog/PlatformDialog.vue';
@ -27,6 +28,7 @@ export default {
app.component('WPosition', WPosition);
app.component('WCodemirror', WCodemirror);
app.component('WSelect', WSelect);
app.component('WTreeGrid', WTreeGrid);
app.component('WDialog', WDialog);
app.component('PlatformDialog', PlatformDialog);
@ -46,6 +48,7 @@ export {
WPosition,
WCodemirror,
WSelect,
WTreeGrid,
WDialog,
PlatformDialog,
PlatformDrawer,

167
io.sc.platform.core.frontend/src/platform/components/tree/WTreeGrid.vue

@ -0,0 +1,167 @@
import { laBell } from '@quasar/extras/line-awesome'; import { mergeProps } from 'vue'; import { pushScopeId } from 'vue'; import { clear } from 'console';
<template>
<div>
<div class="flex justify-between">
<div class="text-h6">{{ title }}</div>
<div class="flex justify-end gap-4">
<template v-for="(btn, index) in actions as any" :key="index">
<q-btn v-if="typeof btn === 'object'" :loading="btn.loading ? btn.loading : false" :label="btn.label" :icon="btn.icon" outline @click="btn.click()">
</q-btn>
</template>
</div>
</div>
<q-tree
ref="tree"
v-bind="attrs"
v-model:selected="selectedRef"
v-model:ticked="tickedRef"
v-model:expanded="expandedRef"
class="w-full"
:nodes="nodesRef"
node-key="id"
label-key="i18nLabel"
/>
</div>
</template>
<script setup lang="ts">
import { ref, useAttrs, toRaw } from 'vue';
import { useI18n } from 'vue-i18n';
import { TreeBuilder } from '@/platform';
const attrs = useAttrs();
const props = defineProps({
title: { type: String, default: '' },
labelI18n: { type: Boolean, default: false },
labelEmpty: { type: String, default: '' },
actions: { type: Array, default: () => [] },
});
const { t } = useI18n();
const tree = ref();
const nodesCache = new Map<string, object>();
const nodesRef = ref(TreeBuilder.build(attrs.nodes));
const selectedRef = ref([]);
const tickedRef = ref([]);
const expandedRef = ref([]);
const getNodeById = (id: string) => {
return nodesCache.get(id);
};
const setNodes = (nodes) => {
nodesCache.clear();
const tickeds = [];
if (nodes && nodes.length > 0) {
const labelKey = attrs['label-key'];
for (const node of nodes) {
const label = node[labelKey];
if (props.labelI18n) {
if (label) {
node.i18nLabel = t(label);
} else {
if (props.labelEmpty) {
node.i18nLabel = t(props.labelEmpty);
} else {
node.i18nLabel = label;
}
}
} else {
node.i18nLabel = label;
}
nodesCache.set(node.id, node);
if (node.selected) {
tickeds.push(node.id);
}
}
}
nodesRef.value = TreeBuilder.build(nodes);
tickedRef.value = tickeds;
};
const getSelectedNode = () => {
return nodesCache.get(selectedRef.value);
};
const getSelected = () => {
return selectedRef.value;
};
const setSelected = (selected) => {
selectedRef.value = selected;
};
const setTicked = (ticked) => {
tickedRef.value = ticked;
};
const getTicked = () => {
const result = new Set<string>();
const tickeds = toRaw(tickedRef.value);
if (tickeds && tickeds.length > 0) {
for (const ticked of tickeds) {
result.add(ticked);
}
for (const ticked of tickeds) {
getAllParentIds(nodesCache.get(ticked).parentId, result);
}
}
return [...result];
};
const getAllParentIds = (parentId, result) => {
if (parentId) {
const parent = nodesCache.get(parentId);
if (parent) {
result.add(parent.id);
getAllParentIds(parent.parentId, result);
}
}
};
const getCascadeParentIds = (id) => {
const result = [];
let node = nodesCache.get(id);
if (node) {
result.push(id);
while (node.parentId) {
result.push(node.parentId);
node = nodesCache.get(node.parentId);
}
}
return result;
};
const getCascadeChildrenIds = (id) => {
const result = [];
let node = nodesCache.get(id);
if (node) {
if (node.children && node.children.length > 0) {
for (const child of node.children) {
result.push(child.id);
const childResult = getCascadeChildrenIds(child.id);
if (childResult && childResult.length > 0) {
result.push(...childResult);
}
}
}
}
return result;
};
defineExpose({
getNodeById,
setNodes,
getTicked,
setTicked,
getSelectedNode,
getSelected,
setSelected,
getCascadeParentIds,
getCascadeChildrenIds,
});
</script>

1
io.sc.platform.core.frontend/src/platform/index.ts

@ -105,6 +105,7 @@ export {
WPosition,
WCodemirror,
WSelect,
WTreeGrid,
PlatformDialog,
PlatformDrawer,
PlatformForm,

7
io.sc.platform.core.frontend/src/platform/plugin/manager/RouterManager.ts

@ -33,6 +33,13 @@ class RouterManager {
* @param routes
*/
public static buildRoutes(routes: FrontEndRouteType[] = []) {
//修改默认 / 路由的 redirect, 以便响应 gc.setting.homePage 发生变化时能正常响应
for (const PLATFORM_ROUTE of PLATFORM_ROUTES) {
if (PLATFORM_ROUTE.name === '/') {
PLATFORM_ROUTE.redirect = Environment.getConfigure().setting?.homePage || '/home';
}
}
//将所有本地路由的模块设置成项目模块名
for (const route of RouterManager.#localRoutes) {
route.module = Environment.getModuleName();

10
io.sc.platform.core.frontend/src/platform/utils/TreeBuilder.ts

@ -6,14 +6,16 @@ class TreeBuilder {
parentIdPropertyName: string = 'parentId',
idPropertyName: string = 'id',
childrenPropertyName: string = 'children',
orderPropertyName: string = 'order',
orderPropertyName: string = '',
) {
const result: any[] = [];
// 排序
list.sort((o1, o2) => {
return o1[orderPropertyName] - o2[orderPropertyName];
});
if (orderPropertyName) {
list.sort((o1, o2) => {
return o1[orderPropertyName] - o2[orderPropertyName];
});
}
//为提高查询效率,将 List 元素存入 Map 中
const cache: Map<string, any> = new Map<string, any>();

12
io.sc.platform.core.frontend/src/routes/routes.json

@ -34,5 +34,17 @@
"meta": {
"permissions": ["/testcase/select/**/*"]
}
},
{
"name": "route.testcase.treeGrid",
"path": "testcase/treeGrid",
"parent": "/",
"priority": 0,
"component": "component.testcase.treeGrid",
"componentPath": "@/views/TreeGrid.vue",
"redirect": null,
"meta": {
"permissions": ["/testcase/treeGrid/**/*"]
}
}
]

58
io.sc.platform.core.frontend/src/views/TreeGrid.vue

@ -0,0 +1,58 @@
<template>
<div>
<w-tree-grid
ref="treeGrid"
title="机构树"
:nodes="nodes"
label-key="titleI18nKey"
label-i18n
label-empty="--------------------"
:actions="actions"
tick-strategy="leaf"
/>
<q-btn label="ok" @click="ok"></q-btn>
</div>
</template>
<script setup lang="ts">
import { ref, toRaw, onMounted } from 'vue';
import { useI18n } from 'vue-i18n';
import { Environment, axios, BackendTools } from '@/platform';
const { t } = useI18n();
const treeGrid = ref();
const nodes = ref([]);
const selected = [];
const ticked = [];
const expanded = [];
const actions = [
{
name: 'refresh',
label: '刷新',
},
{
name: 'expandAll',
label: '全部展开',
},
{
name: 'selectAll',
label: '全部选择',
},
{
name: 'save',
label: '保存',
},
];
onMounted(() => {
axios.get(Environment.apiContextPath('/api/system/menu?pageable=false')).then((response) => {
treeGrid.value.setNodes(response.data.content);
});
});
const ok = () => {
console.log(treeGrid.value.getCascadeParentIds(treeGrid.value.getSelected()));
console.log(treeGrid.value.getCascadeChildrenIds(treeGrid.value.getSelected()));
console.log(treeGrid.value.getSelectedNode(treeGrid.value.getSelected()));
};
</script>

4
io.sc.platform.core.frontend/template-project/package.json

@ -1,6 +1,6 @@
{
"name": "platform-core",
"version": "8.1.28",
"version": "8.1.42",
"description": "前端核心包,用于快速构建前端的脚手架",
"private": false,
"keywords": [],
@ -91,7 +91,7 @@
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.1.7",
"platform-core": "8.1.28",
"platform-core": "8.1.42",
"quasar": "2.13.0",
"tailwindcss": "3.3.5",
"vue": "3.3.7",

12
io.sc.platform.core.frontend/template-project/src/components/index.ts

@ -5,11 +5,13 @@
import dialog from '@/views/Dialog.vue';
import codemirror from '@/views/Codemirror.vue';
import select from '@/views/Select.vue';
import treeGrid from '@/views/TreeGrid.vue';
const localComponents = {
'component.testcase.dialog': dialog,
'component.testcase.codemirror': codemirror,
'component.testcase.select': select,
}
const localComponents = {
'component.testcase.dialog': dialog,
'component.testcase.codemirror': codemirror,
'component.testcase.select': select,
'component.testcase.treeGrid': treeGrid,
};
export default localComponents;

3
io.sc.platform.core.frontend/template-project/src/i18n/messages.json

@ -2,5 +2,6 @@
"menu.testcase": "Test Case",
"menu.testcase.codemirror": "CodeMirror",
"menu.testcase.dialog": "Dialog",
"menu.testcase.select": "Select"
"menu.testcase.select": "Select",
"menu.testcase.treeGrid": "Tree Grid"
}

3
io.sc.platform.core.frontend/template-project/src/i18n/messages_tw_CN.json

@ -2,5 +2,6 @@
"menu.testcase": "測試用例",
"menu.testcase.codemirror": "CodeMirror",
"menu.testcase.dialog": "Dialog",
"menu.testcase.select": "Select"
"menu.testcase.select": "Select",
"menu.testcase.treeGrid": "Tree Grid"
}

3
io.sc.platform.core.frontend/template-project/src/i18n/messages_zh_CN.json

@ -2,5 +2,6 @@
"menu.testcase": "测试用例",
"menu.testcase.codemirror": "CodeMirror",
"menu.testcase.dialog": "Dialog",
"menu.testcase.select": "Select"
"menu.testcase.select": "Select",
"menu.testcase.treeGrid": "Tree Grid"
}

9
io.sc.platform.core.frontend/template-project/src/menus/menus.json

@ -44,5 +44,14 @@
"titleI18nKey": "menu.testcase.select",
"icon": "bi-palette",
"routeName": "route.testcase.select"
},
{
"type": "ROUTE",
"order": 400,
"parentId": "menu.testcase",
"id": "menu.testcase.treeGrid",
"titleI18nKey": "menu.testcase.treeGrid",
"icon": "bi-palette",
"routeName": "route.testcase.treeGrid"
}
]

12
io.sc.platform.core.frontend/template-project/src/routes/routes.json

@ -34,5 +34,17 @@
"meta": {
"permissions": ["/testcase/select/**/*"]
}
},
{
"name": "route.testcase.treeGrid",
"path": "testcase/treeGrid",
"parent": "/",
"priority": 0,
"component": "component.testcase.treeGrid",
"componentPath": "@/views/TreeGrid.vue",
"redirect": null,
"meta": {
"permissions": ["/testcase/treeGrid/**/*"]
}
}
]

58
io.sc.platform.core.frontend/template-project/src/views/TreeGrid.vue

@ -0,0 +1,58 @@
<template>
<div>
<w-tree-grid
ref="treeGrid"
title="机构树"
:nodes="nodes"
label-key="titleI18nKey"
label-i18n
label-empty="--------------------"
:actions="actions"
tick-strategy="leaf"
/>
<q-btn label="ok" @click="ok"></q-btn>
</div>
</template>
<script setup lang="ts">
import { ref, toRaw, onMounted } from 'vue';
import { useI18n } from 'vue-i18n';
import { Environment, axios, BackendTools } from '@/platform';
const { t } = useI18n();
const treeGrid = ref();
const nodes = ref([]);
const selected = [];
const ticked = [];
const expanded = [];
const actions = [
{
name: 'refresh',
label: '刷新',
},
{
name: 'expandAll',
label: '全部展开',
},
{
name: 'selectAll',
label: '全部选择',
},
{
name: 'save',
label: '保存',
},
];
onMounted(() => {
axios.get(Environment.apiContextPath('/api/system/menu?pageable=false')).then((response) => {
treeGrid.value.setNodes(response.data.content);
});
});
const ok = () => {
console.log(treeGrid.value.getCascadeParentIds(treeGrid.value.getSelected()));
console.log(treeGrid.value.getCascadeChildrenIds(treeGrid.value.getSelected()));
console.log(treeGrid.value.getSelectedNode(treeGrid.value.getSelected()));
};
</script>

26
io.sc.platform.core/src/main/resources/io/sc/platform/core/i18n/words.properties

@ -3,33 +3,42 @@ action=Action
add=Add
addNew=Add
alter=Alter
bottom=Bottom
bottom-left=Bottom Left
bottom-right=Bottom Right
bottom=Bottom
cancel=Cancel
center=Center
changeRole=Change Role
className=Class
clone=Clone
close=Close
code=Code
confirm=Confirm
confirmPassword=Confirm Password
content=Content
createDate=Create Date
creator=Creator
dataComeFrom=Data Come From
deepClone=Deep Clone
delete=Delete
description=Description
displayValue=Display Value
download=Download
edit=Edit
email=Email
enable=Enable
error=Error
example=Example
exception=Exception
exceptionMessage=Exception Message
exceptionStackTrace=Exception StackTrace
executeTime=Execute Time
expand=Expand
expandAll=Expand All
expandQueryCondition=Expand Query
export=Export
expression=Expression
failed=Failed
false=False
file=File
first=First
@ -40,8 +49,10 @@ fullScreen=Full Screen
fullScreenExit=Exit Full Screen
help=Help
homePage=Home
httpMethod=Http Method
id=ID
import=Import
ip=IP
isEnable=Enable
key=Key
language=Language
@ -53,6 +64,8 @@ left=Left
login=Login
loginName=Login Name
logout=Logout
menu=Menu
methodName=Mehtod
millisecond=Milli Second
mobile=Mobile
modify=Modify
@ -61,9 +74,12 @@ move=Move
myMessages=My Messages
myTasks=My Tasks
name=Name
newValue=New Value
next=Next
nextPage=Next Page
no=No
oldValue=Old Value
order=Order
org=Org
password=Password
phone=Phone
@ -83,17 +99,23 @@ save=Save
search=Search
select=Select
selectAll=Select All
size=Size
startDate=Start Date
status=Status
submit=Submit
success=Success
systemAnnouncements=Announcements
test=Test
theme=Theme
title=Title
to=To
top=Top
top-left=Top Left
top-right=Top Right
top=Top
true=True
upToTop=Up to Top
url=URL
user=User
userName=User Name
value=Value
version=Version

26
io.sc.platform.core/src/main/resources/io/sc/platform/core/i18n/words_tw_CN.properties

@ -3,33 +3,42 @@ action=\u64CD\u4F5C
add=\u6DFB\u52A0
addNew=\u65B0\u589E
alter=\u901A\u77E5
bottom=\u4E0B\u908A
bottom-left=\u5DE6\u4E0B
bottom-right=\u53F3\u4E0B
bottom=\u4E0B\u908A
cancel=\u53D6\u6D88
center=\u4E2D\u5FC3
changeRole=\u5207\u63DB\u89D2\u8272
className=\u985E\u540D
clone=\u8907\u88FD
close=\u95DC\u9589
code=\u4EE3\u78BC
confirm=\u78BA\u5B9A
confirmPassword=\u78BA\u8A8D\u5BC6\u78BC
content=\u5167\u5BB9
createDate=\u5275\u5EFA\u65E5\u671F
creator=\u5275\u5EFA\u4EBA
dataComeFrom=\u6578\u64DA\u4F86\u6E90
deepClone=\u6DF1\u5EA6\u8907\u88FD
delete=\u522A\u9664
description=\u63CF\u8FF0
displayValue=\u986F\u793A\u503C
download=\u4E0B\u8F09
edit=\u7DE8\u8F2F
email=\u90F5\u7BB1
enable=\u53EF\u7528
error=\u932F\u8AA4
example=\u793A\u4F8B
exception=\u9055\u4F8B
exceptionMessage=\u9055\u4F8B\u4FE1\u606F
exceptionStackTrace=\u9055\u4F8B\u68E7
executeTime=\u57F7\u884C\u6642\u9593
expand=\u5C55\u958B
expandAll=\u5168\u90E8\u5C55\u958B
expandQueryCondition=\u5C55\u958B\u67E5\u8A62\u6761\u4EF6
export=\u5C0E\u51FA
expression=\u8868\u9054\u5F0F
failed=\u5931\u6557
false=\u5047
file=\u6587\u4EF6
first=\u7B2C\u4E00
@ -40,8 +49,10 @@ fullScreen=\u5168\u5C4F
fullScreenExit=\u9000\u51FA\u5168\u5C4F
help=\u5E6B\u52A9
homePage=\u9996\u9801
httpMethod=Http \u65B9\u6CD5
id=\u552F\u4E00\u6A19\u8B58
import=\u5C0E\u5165
ip=IP
isEnable=\u662F\u5426\u53EF\u7528
key=\u9375
language=\u8A9E\u8A00
@ -53,6 +64,8 @@ left=\u5DE6\u908A
login=\u767B\u9304
loginName=\u767B\u9304\u540D
logout=\u9000\u51FA
menu=\u83DC\u55AE
methodName=\u985E\u65B9\u6CD5
millisecond=\u6BEB\u79D2
mobile=\u624B\u6A5F
modify=\u4FEE\u6539
@ -61,9 +74,12 @@ move=\u79FB\u52D5
myMessages=\u6211\u7684\u6D88\u606F
myTasks=\u6211\u7684\u4EFB\u52D9
name=\u540D\u7A31
newValue=\u65B0\u503C
next=\u4E0B\u4E00
nextPage=\u4E0B\u4E00\u9801
no=\u5426
oldValue=\u539F\u503C
order=\u9806\u5E8F
org=\u6A5F\u69CB
password=\u5BC6\u78BC
phone=\u96FB\u8A71
@ -83,17 +99,23 @@ save=\u4FDD\u5B58
search=\u641C\u7D22
select=\u9078\u64C7
selectAll=\u5168\u90E8\u9078\u64C7
size=\u5C3A\u5BF8
startDate=\u958B\u59CB\u65E5\u671F
status=\u72C0\u614B
submit=\u63D0\u4EA4
success=\u6210\u529F
systemAnnouncements=\u7CFB\u7D71\u516C\u544A
test=\u6E2C\u8A66
theme=\u4E3B\u984C
title=\u6A19\u984C
to=\u5230
top=\u4E0A\u908A
top-left=\u5DE6\u4E0A
top-right=\u53F3\u4E0A
top=\u4E0A\u908A
true=\u771F
upToTop=\u56DE\u5230\u9802\u90E8
url=URL
user=\u7528\u6237
userName=\u7528\u6236\u540D
value=\u503C
version=\u7248\u672C

26
io.sc.platform.core/src/main/resources/io/sc/platform/core/i18n/words_zh_CN.properties

@ -3,33 +3,42 @@ action=\u64CD\u4F5C
add=\u6DFB\u52A0
addNew=\u65B0\u589E
alter=\u901A\u77E5
bottom=\u4E0B\u8FB9
bottom-left=\u5DE6\u4E0B
bottom-right=\u53F3\u4E0B
bottom=\u4E0B\u8FB9
cancel=\u53D6\u6D88
center=\u4E2D\u5FC3
changeRole=\u5207\u6362\u89D2\u8272
className=\u7C7B\u540D
clone=\u590D\u5236
close=\u5173\u95ED
code=\u4EE3\u7801
confirm=\u786E\u5B9A
confirmPassword=\u786E\u8BA4\u5BC6\u7801
content=\u5185\u5BB9
createDate=\u521B\u5EFA\u65E5\u671F
creator=\u521B\u5EFA\u4EBA
dataComeFrom=\u6570\u636E\u6765\u6E90
deepClone=\u6DF1\u5EA6\u590D\u5236
delete=\u522A\u9664
description=\u63CF\u8FF0
displayValue=\u663E\u793A\u503C
download=\u4E0B\u8F7D
edit=\u7F16\u8F91
email=\u90AE\u7BB1
enable=\u53EF\u7528
error=\u9519\u8BEF
example=\u793A\u4F8B
exception=\u8FDD\u4F8B
exceptionMessage=\u8FDD\u4F8B\u4FE1\u606F
exceptionStackTrace=\u8FDD\u4F8B\u6808
executeTime=\u6267\u884C\u65F6\u95F4
expand=\u5C55\u5F00
expandAll=\u5168\u90E8\u5C55\u5F00
expandQueryCondition=\u5C55\u5F00\u67E5\u8BE2\u6761\u4EF6
export=\u5BFC\u51FA
expression=\u8868\u8FBE\u5F0F
failed=\u5931\u8D25
false=\u5047
file=\u6587\u4EF6
first=\u7B2C\u4E00
@ -40,8 +49,10 @@ fullScreen=\u5168\u5C4F
fullScreenExit=\u9000\u51FA\u5168\u5C4F
help=\u5E2E\u52A9
homePage=\u9996\u9875
httpMethod=Http \u65B9\u6CD5
id=\u552F\u4E00\u6807\u8BC6
import=\u5BFC\u5165
ip=IP
isEnable=\u662F\u5426\u53EF\u7528
key=\u952E
language=\u8BED\u8A00
@ -53,6 +64,8 @@ left=\u5DE6\u8FB9
login=\u767B\u5F55
loginName=\u767B\u5F55\u540D
logout=\u9000\u51FA
menu=\u83DC\u5355
methodName=\u7C7B\u65B9\u6CD5
millisecond=\u6BEB\u79D2
mobile=\u624B\u673A
modify=\u4FEE\u6539
@ -61,9 +74,12 @@ move=\u79FB\u52A8
myMessages=\u6211\u7684\u6D88\u606F
myTasks=\u6211\u7684\u4EFB\u52A1
name=\u540D\u79F0
newValue=\u65B0\u503C
next=\u4E0B\u4E00
nextPage=\u4E0B\u4E00\u9875
no=\u5426
oldValue=\u539F\u503C
order=\u987A\u5E8F
org=\u673A\u6784
password=\u5BC6\u7801
phone=\u7535\u8BDD
@ -83,17 +99,23 @@ save=\u4FDD\u5B58
search=\u641C\u7D22
select=\u9009\u62E9
selectAll=\u5168\u90E8\u9009\u62E9
size=\u5C3A\u5BF8
startDate=\u5F00\u59CB\u65E5\u671F
status=\u72B6\u6001
submit=\u63D0\u4EA4
success=\u6210\u529F
systemAnnouncements=\u7CFB\u7EDF\u516C\u544A
test=\u6D4B\u8BD5
theme=\u4E3B\u9898
title=\u6807\u9898
to=\u5230
top=\u4E0A\u8FB9
top-left=\u5DE6\u4E0A
top-right=\u53F3\u4E0A
top=\u4E0A\u8FB9
true=\u771F
upToTop=\u56DE\u5230\u9876\u90E8
url=URL
user=\u7528\u6237
userName=\u7528\u6237\u540D
value=\u503C
version=\u7248\u672C

2
io.sc.platform.developer.doc/asciidoc/index.adoc

@ -33,7 +33,7 @@
include::getting-started/getting-started.adoc[leveloffset=+1]
include::yusys/yusys.adoc[leveloffset=+1]
include::yu/yu.adoc[leveloffset=+1]
include::platform-extension/platform-extension.adoc[leveloffset=+1]

0
io.sc.platform.developer.doc/asciidoc/yusys/rwa/rwa.adoc → io.sc.platform.developer.doc/asciidoc/yu/rwa/rwa.adoc

0
io.sc.platform.developer.doc/asciidoc/yusys/rws/rws.adoc → io.sc.platform.developer.doc/asciidoc/yu/rws/rws.adoc

0
io.sc.platform.developer.doc/asciidoc/yusys/yusys.adoc → io.sc.platform.developer.doc/asciidoc/yu/yu.adoc

202
io.sc.platform.developer.frontend/package.json

@ -1,104 +1,102 @@
{
"name": "io.sc.platform.developer.frontend",
"version": "8.1.11",
"description": "",
"private": false,
"keywords": [
],
"author": "",
"license": "ISC",
"scripts": {
"clean": "rm -rf ./node_modules && rm -rf pnpm-lock.yaml",
"dev": "nodemon",
"serve": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack serve --config webpack.env.serve.cjs",
"build": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack --config webpack.env.build.cjs",
"prod": "node ./util-components-generator.cjs && cross-env NODE_ENV=production webpack --config webpack.env.prod.cjs",
"sync": "platform sync"
},
"engines": {
"node": ">=18",
"pnpm": ">=7"
},
"publishConfig": {
"registry": "http://nexus.sc.io:8000/repository/npm-releases/",
"access": "public"
},
"devDependencies": {
"@babel/core": "7.23.2",
"@babel/preset-env": "7.23.2",
"@babel/preset-typescript": "7.23.2",
"@babel/plugin-transform-class-properties": "7.22.5",
"@babel/plugin-transform-object-rest-spread": "7.22.15",
"@quasar/app-webpack": "3.11.2",
"@quasar/cli": "2.3.0",
"@types/mockjs": "1.0.9",
"@types/node": "20.8.9",
"@typescript-eslint/eslint-plugin": "6.9.0",
"@typescript-eslint/parser": "6.9.0",
"@vue/compiler-sfc": "3.3.7",
"@webpack-cli/serve": "2.0.5",
"autoprefixer": "10.4.16",
"babel-loader": "9.1.3",
"clean-webpack-plugin": "4.0.0",
"copy-webpack-plugin": "11.0.0",
"cross-env": "7.0.3",
"css-loader": "6.8.1",
"eslint": "8.52.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-vue": "9.18.0",
"eslint-webpack-plugin": "4.0.1",
"html-webpack-plugin": "5.5.3",
"json5": "2.2.3",
"mini-css-extract-plugin": "2.7.6",
"nodemon": "3.0.1",
"postcss": "8.4.31",
"postcss-import": "15.1.0",
"postcss-loader": "7.3.3",
"postcss-preset-env": "9.2.0",
"prettier": "3.0.3",
"sass": "1.69.5",
"sass-loader": "13.3.2",
"typescript": "5.2.2",
"vue-loader": "17.3.0",
"webpack": "5.89.0",
"webpack-bundle-analyzer": "4.9.1",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.1",
"webpack-merge": "5.10.0"
},
"dependencies": {
"@quasar/extras": "1.16.7",
"@vueuse/core": "10.3.0",
"axios": "1.5.1",
"dayjs": "1.11.10",
"echarts": "5.4.1",
"exceljs": "4.3.0",
"file-saver": "2.0.5",
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.1.7",
"platform-core": "8.1.27",
"quasar": "2.13.0",
"tailwindcss": "3.3.5",
"vue": "3.3.7",
"vue-dompurify-html": "4.1.4",
"vue-i18n": "9.6.0",
"vue-router": "4.2.5",
"@codemirror/autocomplete": "6.11.1",
"@codemirror/commands": "6.3.2",
"@codemirror/lang-html": "6.4.7",
"@codemirror/lang-java": "6.0.1",
"@codemirror/lang-javascript": "6.2.1",
"@codemirror/lang-json": "6.0.1",
"@codemirror/lang-sql": "6.5.4",
"@codemirror/lang-xml": "6.0.2",
"@codemirror/language": "6.9.3",
"@codemirror/search": "6.5.5",
"@codemirror/state": "6.3.3",
"@codemirror/view": "6.22.1",
"codemirror": "6.0.1",
"vue-codemirror6": "1.1.31"
}
"name": "io.sc.platform.developer.frontend",
"version": "8.1.12",
"description": "",
"private": false,
"keywords": [],
"author": "",
"license": "ISC",
"scripts": {
"clean": "rm -rf ./node_modules && rm -rf pnpm-lock.yaml",
"dev": "nodemon",
"serve": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack serve --config webpack.env.serve.cjs",
"build": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack --config webpack.env.build.cjs",
"prod": "node ./util-components-generator.cjs && cross-env NODE_ENV=production webpack --config webpack.env.prod.cjs",
"sync": "platform sync"
},
"engines": {
"node": ">=18",
"pnpm": ">=7"
},
"publishConfig": {
"registry": "http://nexus.sc.io:8000/repository/npm-releases/",
"access": "public"
},
"devDependencies": {
"@babel/core": "7.23.2",
"@babel/preset-env": "7.23.2",
"@babel/preset-typescript": "7.23.2",
"@babel/plugin-transform-class-properties": "7.22.5",
"@babel/plugin-transform-object-rest-spread": "7.22.15",
"@quasar/app-webpack": "3.11.2",
"@quasar/cli": "2.3.0",
"@types/mockjs": "1.0.9",
"@types/node": "20.8.9",
"@typescript-eslint/eslint-plugin": "6.9.0",
"@typescript-eslint/parser": "6.9.0",
"@vue/compiler-sfc": "3.3.7",
"@webpack-cli/serve": "2.0.5",
"autoprefixer": "10.4.16",
"babel-loader": "9.1.3",
"clean-webpack-plugin": "4.0.0",
"copy-webpack-plugin": "11.0.0",
"cross-env": "7.0.3",
"css-loader": "6.8.1",
"eslint": "8.52.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-vue": "9.18.0",
"eslint-webpack-plugin": "4.0.1",
"html-webpack-plugin": "5.5.3",
"json5": "2.2.3",
"mini-css-extract-plugin": "2.7.6",
"nodemon": "3.0.1",
"postcss": "8.4.31",
"postcss-import": "15.1.0",
"postcss-loader": "7.3.3",
"postcss-preset-env": "9.2.0",
"prettier": "3.0.3",
"sass": "1.69.5",
"sass-loader": "13.3.2",
"typescript": "5.2.2",
"vue-loader": "17.3.0",
"webpack": "5.89.0",
"webpack-bundle-analyzer": "4.9.1",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.1",
"webpack-merge": "5.10.0"
},
"dependencies": {
"@quasar/extras": "1.16.7",
"@vueuse/core": "10.3.0",
"axios": "1.5.1",
"dayjs": "1.11.10",
"echarts": "5.4.1",
"exceljs": "4.3.0",
"file-saver": "2.0.5",
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.1.7",
"platform-core": "8.1.37",
"quasar": "2.13.0",
"tailwindcss": "3.3.5",
"vue": "3.3.7",
"vue-dompurify-html": "4.1.4",
"vue-i18n": "9.6.0",
"vue-router": "4.2.5",
"@codemirror/autocomplete": "6.11.1",
"@codemirror/commands": "6.3.2",
"@codemirror/lang-html": "6.4.7",
"@codemirror/lang-java": "6.0.1",
"@codemirror/lang-javascript": "6.2.1",
"@codemirror/lang-json": "6.0.1",
"@codemirror/lang-sql": "6.5.4",
"@codemirror/lang-xml": "6.0.2",
"@codemirror/language": "6.9.3",
"@codemirror/search": "6.5.5",
"@codemirror/state": "6.3.3",
"@codemirror/view": "6.22.1",
"codemirror": "6.0.1",
"vue-codemirror6": "1.1.31"
}
}

20
io.sc.platform.flowable/src/main/java/io/sc/platform/flowable/jpa/entity/Agent.java

@ -27,50 +27,50 @@ public class Agent extends AuditorEntity implements Serializable{
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid2")
@Column(name="_ID")
@Column(name="ID_")
@Size(max=36)
private String id;
//被代理人登录名
@Column(name="_LOGINNAME")
@Column(name="LOGINNAME_")
@Size(max=255)
private String loginName;
//被代理人用户名
@Column(name="_USERNAME")
@Column(name="USERNAME_")
@Size(max=255)
private String userName;
//代理人登录名
@Column(name="_AGENT_LOGINNAME")
@Column(name="AGENT_LOGINNAME_")
@Size(max=255)
private String agentLoginName;
//代理人用户名
@Column(name="_AGENT_USERNAME")
@Column(name="AGENT_USERNAME_")
@Size(max=255)
private String agentUserName;
//开始日期
@Column(name="_START_DATE")
@Column(name="START_DATE_")
private Date startDate;
//结束日期
@Column(name="_END_DATE")
@Column(name="END_DATE_")
private Date endDate;
//代理原因
@Column(name="_REASONS")
@Column(name="REASONS_")
@Size(max=255)
private String reasons;
//是否生效
@Column(name="_EFFECTIVE")
@Column(name="EFFECTIVE_")
@Convert(converter= NumericBooleanConverter.class)
private Boolean effective;
//意见(主要用于记录审批意见)
@Column(name="_COMMENTS")
@Column(name="COMMENTS_")
@Size(max=1024)
private String comments;

20
io.sc.platform.flowable/src/main/java/io/sc/platform/flowable/jpa/entity/ProcessEntity.java

@ -29,50 +29,50 @@ public class ProcessEntity extends AuditorEntity implements Serializable{
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid2")
@Column(name="_ID")
@Column(name="ID_")
@Size(max=36)
private String id;
//流程分类
@Column(name="_CATEGORY")
@Column(name="CATEGORY_")
@Size(max=255)
private String category;
//代码
@Column(name="_KEY")
@Column(name="KEY_")
@Size(max=255)
private String key;
//名称
@Column(name="_NAME")
@Column(name="NAME_")
@Size(max=255)
private String name;
//描述
@Column(name="_DESCRIPTION")
@Column(name="DESCRIPTION_")
@Size(max=255)
private String description;
//流程引擎中的发布ID
@Column(name="_DEPLOYED_ID")
@Column(name="DEPLOYED_ID_")
@Size(max=255)
private String deployedId;
//版本
@Column(name="_VERSION")
@Column(name="VERSION_")
private Integer version;
//Flowable 流程定义 xml
@Column(name="_XML")
@Column(name="XML_")
private String xml;
//流程定义状态
@Column(name="_STATUS", length=10)
@Column(name="STATUS_", length=10)
@Enumerated(EnumType.STRING)
private ProcessStatus status;
//是否可以自行领取任务
@Column(name="_CAN_CLAIM_TASK")
@Column(name="CAN_CLAIM_TASK_")
@Convert(converter= NumericBooleanConverter.class)
private Boolean canClaimTask;

2
io.sc.platform.flowable/src/main/java/io/sc/platform/flowable/service/impl/ProcessQueryServiceImpl.java

@ -122,7 +122,7 @@ public class ProcessQueryServiceImpl implements ProcessQueryService {
deployedIds.add(entity.getDeployedId());
}
Pageable pageable =queryParameter.getPageable();
Pageable pageable =queryParameter.getJpaPageable();
String countSql ="select count(distinct RES.ID_) COUNT_"
+ " from ACT_RU_EXECUTION RES"

62
io.sc.platform.flowable/src/main/resources/liquibase/PF_1.0.0_20221228__Process Manager Database Schema DDL.xml

@ -20,47 +20,47 @@
<changeSet id="PF_1.0.0_20221228__Process Manager Database Schema DDL" author="framework">
<!-- 流程定义表 -->
<createTable tableName="SYS_PROCESS" remarks="流程定义表">
<column name="_ID" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<column name="ID_" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<constraints primaryKey="true"/>
</column>
<column name="_CATEGORY" type="java.sql.Types.NVARCHAR(255)" remarks="流程分类"></column>
<column name="_KEY" type="java.sql.Types.NVARCHAR(255)" remarks="流程代码"></column>
<column name="_NAME" type="java.sql.Types.NVARCHAR(255)" remarks="流程名称"></column>
<column name="_DESCRIPTION" type="java.sql.Types.NVARCHAR(255)" remarks="描述"></column>
<column name="_VERSION" type="java.sql.Types.INTEGER" remarks="版本"></column>
<column name="_DEPLOYED_ID" type="java.sql.Types.NVARCHAR(255)" remarks="工作流引擎中的流程定义ID"></column>
<column name="_XML" type="java.sql.Types.CLOB" remarks="流程定义BPM XML内容"></column>
<column name="_STATUS" type="java.sql.Types.NVARCHAR(10)" remarks="流程定义状态"></column>
<column name="_CAN_CLAIM_TASK" type="java.sql.Types.SMALLINT" remarks="是否可以领取任务"></column>
<column name="_DATA_COME_FROM" type="java.sql.Types.NVARCHAR(10)" remarks="数据来源(INPUT:手工录入,IMPORT:系统自动导入)" defaultValue="INPUT"></column>
<column name="_CREATOR" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="_CREATE_DATE" type="DATETIME" remarks="创建日期"></column>
<column name="_LAST_MODIFIER" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="_LAST_MODIFYDATE" type="DATETIME" remarks="最后修改日期"></column>
<column name="_CORP_CODE" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<column name="CATEGORY_" type="java.sql.Types.NVARCHAR(255)" remarks="流程分类"></column>
<column name="KEY_" type="java.sql.Types.NVARCHAR(255)" remarks="流程代码"></column>
<column name="NAME_" type="java.sql.Types.NVARCHAR(255)" remarks="流程名称"></column>
<column name="DESCRIPTION_" type="java.sql.Types.NVARCHAR(255)" remarks="描述"></column>
<column name="VERSION_" type="java.sql.Types.INTEGER" remarks="版本"></column>
<column name="DEPLOYED_ID_" type="java.sql.Types.NVARCHAR(255)" remarks="工作流引擎中的流程定义ID"></column>
<column name="XML_" type="java.sql.Types.CLOB" remarks="流程定义BPM XML内容"></column>
<column name="STATUS_" type="java.sql.Types.NVARCHAR(10)" remarks="流程定义状态"></column>
<column name="CAN_CLAIM_TASK_" type="java.sql.Types.SMALLINT" remarks="是否可以领取任务"></column>
<column name="DATA_COME_FROM_" type="java.sql.Types.NVARCHAR(10)" remarks="数据来源(INPUT:手工录入,IMPORT:系统自动导入)" defaultValue="INPUT"></column>
<column name="CREATOR_" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="CREATE_DATE_" type="DATETIME" remarks="创建日期"></column>
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false" />
</column>
</createTable>
<!-- 代理人配置表 -->
<createTable tableName="SYS_AGENT" remarks="代理人配置表">
<column name="_ID" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<column name="ID_" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<constraints primaryKey="true"/>
</column>
<column name="_LOGINNAME" type="java.sql.Types.NVARCHAR(255)" remarks="被代理人登录名"></column>
<column name="_USERNAME" type="java.sql.Types.NVARCHAR(255)" remarks="被代理人用户名"></column>
<column name="_AGENT_LOGINNAME" type="java.sql.Types.NVARCHAR(255)" remarks="代理人登录名"></column>
<column name="_AGENT_USERNAME" type="java.sql.Types.NVARCHAR(255)" remarks="代理人用户名"></column>
<column name="_START_DATE" type="DATETIME" remarks="开始日期"></column>
<column name="_END_DATE" type="DATETIME" remarks="结束日期"></column>
<column name="_REASONS" type="java.sql.Types.NVARCHAR(255)" remarks="代理原因"></column>
<column name="_EFFECTIVE" type="java.sql.Types.SMALLINT" remarks="是否生效"></column>
<column name="_COMMENTS" type="java.sql.Types.NVARCHAR(1024)" remarks="审批意见"></column>
<column name="_CREATOR" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="_CREATE_DATE" type="DATETIME" remarks="创建日期"></column>
<column name="_LAST_MODIFIER" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="_LAST_MODIFYDATE" type="DATETIME" remarks="最后修改日期"></column>
<column name="_CORP_CODE" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<column name="LOGINNAME_" type="java.sql.Types.NVARCHAR(255)" remarks="被代理人登录名"></column>
<column name="USERNAME_" type="java.sql.Types.NVARCHAR(255)" remarks="被代理人用户名"></column>
<column name="AGENT_LOGINNAME_" type="java.sql.Types.NVARCHAR(255)" remarks="代理人登录名"></column>
<column name="AGENT_USERNAME_" type="java.sql.Types.NVARCHAR(255)" remarks="代理人用户名"></column>
<column name="START_DATE_" type="DATETIME" remarks="开始日期"></column>
<column name="END_DATE_" type="DATETIME" remarks="结束日期"></column>
<column name="REASONS_" type="java.sql.Types.NVARCHAR(255)" remarks="代理原因"></column>
<column name="EFFECTIVE_" type="java.sql.Types.SMALLINT" remarks="是否生效"></column>
<column name="COMMENTS_" type="java.sql.Types.NVARCHAR(1024)" remarks="审批意见"></column>
<column name="CREATOR_" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="CREATE_DATE_" type="DATETIME" remarks="创建日期"></column>
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false" />
</column>
</createTable>

11
io.sc.platform.gradle/templates/pgp/app/src/main/resources/META-INF/platform/plugins/frontend-module.json

@ -0,0 +1,11 @@
{
"name": "app.platform",
"components": [
],
"resources": [
"/public/configure.js",
"/public/favicon.svg",
"/public/login-bg.jpg",
"/public/logo.svg"
]
}

2
io.sc.platform.gradle/templates/pgp/setup/build-version.gradle

@ -146,7 +146,7 @@ subprojects {
// ext['oauth2-oidc-sdk.version'] =
// ext['ojdbc.version'] =
// ext['okhttp3.version'] =
// ext['oracle-database.version'] =
// ext['oracle-database.version'] ='12.2.0.1'
// ext['pooled-jms.version'] =
// ext['postgresql.version'] =
// ext['prometheus-pushgateway.version'] =

60
io.sc.platform.gradle/templates/pgp/setup/build.gradle.txt

@ -52,6 +52,7 @@ subprojects {
exclude group: "org.apache.logging.log4j", module: "log4j-to-slf4j"
exclude group: "org.slf4j", module: "slf4j-jdk14"
exclude group: "org.slf4j", module: "slf4j-nop"
//exclude group: "com.oracle.database.jdbc", module: "ojdbc8"
}
dependencyManagement {
@ -366,6 +367,31 @@ subprojects {
}
}
/*-----------------------------------------------------------------
* pnpm sync
*----------------------------------------------------------------*/
task frontendNpmSync(type:Exec){
if(isFrontendProject(file('.')) && !project.name.contains("io.sc.platform.security.frontend")){
workingDir '.'
if(org.gradle.internal.os.OperatingSystem.current().isWindows()){
commandLine 'cmd', '/c', 'pnpm', 'sync'
}else{
commandLine 'pnpm', 'sync'
}
}else{
if(org.gradle.internal.os.OperatingSystem.current().isWindows()){
commandLine 'cmd', '/c', 'cd', '.'
}else{
commandLine 'cd', '.'
}
}
}
tasks.frontendNpmSync.doFirst {
if(isFrontendProject(file('.'))) {
println '开始执行 pnpm sync ......';
}
}
/*-----------------------------------------------------------------
* pnpm run build
*----------------------------------------------------------------*/
@ -554,13 +580,34 @@ subprojects {
//resources----------------------------------------
List<String> resources = new ArrayList<String>();
def dirPath = file('dist').absolutePath;
def tree = fileTree('dist') {
include '**/*.*'
}
tree.each { File file ->
resources.add(file.absolutePath.substring(dirPath.length()));
if(project.name.contains('io.sc.platform.mvc.frontend')){
def tree = fileTree('dist') {
include '**/*.*'
exclude "public/${project.name}/configure.js"
exclude "public/${project.name}/favicon.svg"
exclude "public/${project.name}/index.html"
exclude "public/${project.name}/login-bg.jpg"
exclude "public/${project.name}/logo.svg"
}
tree.each { File file ->
resources.add(file.absolutePath.substring(dirPath.length()));
}
}else{
def tree = fileTree('dist') {
include '**/*.*'
exclude '**/webjars/**/*.*'
exclude "public/${project.name}/configure.js"
exclude "public/${project.name}/favicon.svg"
exclude "public/${project.name}/index.html"
exclude "public/${project.name}/login-bg.jpg"
exclude "public/${project.name}/logo.svg"
}
tree.each { File file ->
resources.add(file.absolutePath.substring(dirPath.length()));
}
}
//all-in-one------------------------------------
Map<String,Object> allInOne =new LinkedHashMap<>();
allInOne.put("name",project.name);
@ -587,7 +634,8 @@ subprojects {
// 定义前端构建任务的依赖及执行顺序
frontendNpmInstall.dependsOn(frontendUpdatePackageJson)
frontendNpmBuild.dependsOn(frontendNpmInstall)
frontendNpmSync.dependsOn(frontendNpmInstall)
frontendNpmBuild.dependsOn(frontendNpmSync)
frontendNpmProd.dependsOn(frontendNpmInstall)
// 资源处理前进行前端模块的构建

9
io.sc.platform.gradle/templates/pgp/setup/gradle.properties

@ -36,9 +36,9 @@ application_version=1.0.0
# platform
###########################################################
platform_group=io.sc
platform_version=8.1.11
platform_version=8.1.12
platform_plugin_version=8.1.11
platform_core_frontend_version=8.1.24
platform_core_frontend_version=8.1.28
###########################################################
# dependencies version
@ -66,14 +66,15 @@ oshi_version=6.4.2
p6spy_version=3.9.1
poi_ooxml_version=3.17
schemacrawler_version=16.19.11
spring_boot_version=2.7.17
#schemacrawler_version=14.21.02
spring_boot_version=2.7.18
spring_cloud_alibaba_version=2021.0.4.0
spring_cloud_context_version=3.1.4
spring_cloud_version=2021.0.8
spring_security_oauth2_authorization_server_version=0.4.4
spring_statemachine_version=3.2.1
webjars_locator_weblogic_version=0.10
zip4j_version=2.9.1
zip4j_version=2.11.5
###########################################################
# asciidoc deploy directory,the path must end with '/'

7
io.sc.platform.jdbc.driver.oracle-12.2.0.1/build.gradle

@ -0,0 +1,7 @@
//ext['oracle-database.version'] = '12.2.0.1'
dependencies {
api(
"oracle:oracle:12.2.0.1",
)
}

10
io.sc.platform.jdbc.driver.oracle-12.2.0.1/src/main/resources/META-INF/platform/plugins/jdbc-connection-template.json

@ -0,0 +1,10 @@
{
"installerEnable" : true,
"type" : "Oracle",
"version" : "12.2",
"driver" : "oracle.jdbc.OracleDriver",
"url" : "jdbc:oracle:thin:@${host}:${port}:${sid}",
"urlSample" : "jdbc:oracle:thin:@localhost:1521:EE",
"hibernateDialect" : "org.hibernate.dialect.Oracle10gDialect",
"validationQuery" : "select 1 from dual"
}

7
io.sc.platform.jdbc.driver.oracle/build.gradle

@ -1,6 +1,7 @@
//ext['oracle-database.version'] = '12.2.0.1'
dependencies {
api(
"com.oracle.database.jdbc:ojdbc8",
"com.oracle.database.nls:orai18n"
"oracle:oracle:12.2.0.1",
)
}
}

12
io.sc.platform.jdbc.schemacrawler-14.21.02/build.gradle

@ -0,0 +1,12 @@
dependencies {
api(
project(":io.sc.platform.jdbc"),
"us.fatehi:schemacrawler:${schemacrawler_version}",
"us.fatehi:schemacrawler-mysql:${schemacrawler_version}",
"us.fatehi:schemacrawler-oracle:${schemacrawler_version}",
"us.fatehi:schemacrawler-db2:${schemacrawler_version}",
"us.fatehi:schemacrawler-postgresql:${schemacrawler_version}",
"us.fatehi:schemacrawler-sqlite:${schemacrawler_version}",
)
}

1
io.sc.platform.jdbc.schemacrawler-14.21.02/gradle.properties

@ -0,0 +1 @@

218
io.sc.platform.jdbc.schemacrawler-14.21.02/src/main/java/io/sc/platform/jdbc/schemacrawler/MetaDataLoaderImpl.java

@ -0,0 +1,218 @@
package io.sc.platform.jdbc.schemacrawler;
import io.sc.platform.jdbc.DatabaseType;
import io.sc.platform.jdbc.meta.MetaDataLoader;
import io.sc.platform.jdbc.meta.support.*;
import org.springframework.jdbc.datasource.DataSourceUtils;
import schemacrawler.schema.Catalog;
import schemacrawler.schema.TableRelationshipType;
import schemacrawler.schemacrawler.*;
import schemacrawler.utility.SchemaCrawlerUtility;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.*;
public class MetaDataLoaderImpl implements MetaDataLoader {
private Map<DataSource, Catalog> catalogs =new HashMap<DataSource,Catalog>();
private Object lock =new Object();
public void crawler(DataSource dataSource) throws SQLException {
crawler(dataSource,getDefaultOptions(dataSource));
}
public void crawler(DataSource dataSource, SchemaCrawlerOptions options) throws SQLException {
//catalogs.clear();
Connection connection = null;
try {
connection = DataSourceUtils.getConnection(dataSource);
synchronized (lock) {
catalogs.put(dataSource, SchemaCrawlerUtility.getCatalog(connection,getDefaultOptions(dataSource)));
}
}catch (SchemaCrawlerException e) {
throw new SQLException(e);
}finally {
DataSourceUtils.releaseConnection(connection, dataSource);
}
}
public Catalog getCatalog(DataSource dataSource) throws SQLException{
return getCatalog(dataSource,getDefaultOptions(dataSource));
}
public Catalog getCatalog(DataSource dataSource, SchemaCrawlerOptions options) throws SQLException{
synchronized (lock) {
if(!catalogs.containsKey(dataSource)) {
crawler(dataSource,options);
}
return catalogs.get(dataSource);
}
}
@Override
public List<Schema> getSchemas(DataSource dataSource) throws MetaDataAccessException {
Catalog catalog = null;
try {
catalog = getCatalog(dataSource);
} catch (SQLException e) {
throw new MetaDataAccessException(e);
}
if(catalog!=null) {
Collection<schemacrawler.schema.Schema> schemas =catalog.getSchemas();
if(schemas!=null && schemas.size()>0) {
List<Schema> result =new ArrayList<>();
for(schemacrawler.schema.Schema schema : schemas){
result.add(from(schema));
}
return result;
}
}
return null;
}
@Override
public List<TableSummary> getTableSummary(DataSource dataSource, String schemaName) throws MetaDataAccessException {
List<Table> tables =getTables(dataSource,schemaName);
List<TableSummary> result =new ArrayList<>();
for(Table table : tables){
TableSummary summary =new TableSummary();
summary.setName(table.getName());
summary.setRemarks(table.getRemarks());
result.add(summary);
}
return result;
}
@Override
public List<TableSummary> getTableSummary(DataSource dataSource, String schemaName, boolean isCount) throws MetaDataAccessException {
return getTableSummary(dataSource,schemaName,false);
}
@Override
public List<Table> getTables(DataSource dataSource, String schemaName, String... tableNames) throws MetaDataAccessException {
Catalog catalog = null;
try {
catalog = getCatalog(dataSource);
} catch (SQLException e) {
throw new MetaDataAccessException(e);
}
if(catalog!=null) {
schemacrawler.schema.Schema schema =findSchema(catalog,schemaName);
if(schema!=null) {
Collection<schemacrawler.schema.Table> tables =catalog.getTables(schema);
if(tables!=null && tables.size()>0) {
List<Table> result =new ArrayList<Table>();
for(schemacrawler.schema.Table table : tables){
result.add(from(table));
}
return result;
}
}
}
return null;
}
public boolean isSelfReference(schemacrawler.schema.Table table) {
Collection<schemacrawler.schema.Table> parentTables =table.getRelatedTables(TableRelationshipType.parent);
if(parentTables!=null && !parentTables.isEmpty()) {
for(schemacrawler.schema.Table parentTable : parentTables) {
if(parentTable.equals(table)) {
return true;
}
}
}
return false;
}
private Schema from(schemacrawler.schema.Schema schema){
Schema result =new Schema();
result.setName(schema.getName()==null?schema.getCatalogName():schema.getName());
return result;
}
private Table from(schemacrawler.schema.Table table){
Table result =new Table();
result.setName(table.getName());
result.setRemarks(table.getRemarks());
// 处理列
for(schemacrawler.schema.Column column : table.getColumns()) {
result.getColumns().add(from(column));
}
return result;
}
private Column from(schemacrawler.schema.Column column){
Column result =new Column();
result.setName(column.getName());
result.setRemarks(column.getRemarks());
result.setJavaType(column.getType().getTypeMappedClass());
result.setSqlType(column.getColumnDataType().getJavaSqlType().getName());
result.setVendorTypeNumber(column.getColumnDataType().getJavaSqlType().getVendorTypeNumber());
result.setNullable(column.isNullable());
result.setDefaultValue(column.getDefaultValue());
result.setGenerated(column.isGenerated());
result.setHidden(column.isHidden());
result.setAutoIncremented(column.isAutoIncremented());
result.setPartOfIndex(column.isPartOfIndex());
result.setPartOfUniqueIndex(column.isPartOfUniqueIndex());
result.setPartOfPrimaryKey(column.isPartOfPrimaryKey());
result.setSize(column.getSize());
result.setWidth(column.getWidth());
return result;
}
private SchemaCrawlerOptions getDefaultOptions(DataSource dataSource) {
final SchemaCrawlerOptions options = new SchemaCrawlerOptions();
options.setSchemaInfoLevel(SchemaInfoLevelBuilder.standard());
options.setRoutineInclusionRule(new ExcludeAll());
options.setTableInclusionRule(new IncludeAll());
options.setSchemaInclusionRule(new RegularExpressionInclusionRule("I9"));
//options.setSchemaInclusionRule(new RegularExpressionInclusionRule("FRAMEWORK"));
DatabaseType type =null;
try {
type = DatabaseType.fromMetaData(dataSource);
} catch (org.springframework.jdbc.support.MetaDataAccessException e) {
throw new RuntimeException(e);
}
switch(type) {
case DB2:
options.setSchemaInclusionRule(new RegularExpressionExclusionRule("NULLID|SQLJ|SYSCAT|SYSFUN|SYSIBM|SYSIBMADM|SYSIBMINTERNAL|SYSIBMTS|SYSPROC|SYSPUBLIC|SYSSTAT|SYSTOOLS"));
break;
case ORACLE:
options.setSchemaInclusionRule(new RegularExpressionExclusionRule("ANONYMOUS|APEX_PUBLIC_USER|APPQOSSYS|BI|CTXSYS|DBSNMP|DIP|EXFSYS|FLOWS_30000|FLOWS_FILES|GSMADMIN_INTERNAL|HR|IX|LBACSYS|MDDATA|MDSYS|MGMT_VIEW|OE|OLAPSYS|ORACLE_OCM|ORDDATA|ORDPLUGINS|ORDSYS|OUTLN|OWBSYS|OWBSYS_AUDIT|PM|RDSADMIN|SCOTT|SH|SI_INFORMTN_SCHEMA|SPATIAL_CSW_ADMIN_USR|SPATIAL_WFS_ADMIN_USR|SYS|SYSMAN|\\\"SYSTEM\\\"|TSMSYS|WKPROXY|WKSYS|WK_TEST|WMSYS|XDB|APEX_[0-9]{6}|FLOWS_[0-9]{5,6}|XS\\$NULL|\\\"XS\\$NULL\\\""));
break;
case MYSQL:
options.setSchemaInclusionRule(new RegularExpressionExclusionRule("sys|mysql|performance_schema|information_schema"));
break;
case POSTGRESQL:
options.setSchemaInclusionRule(new RegularExpressionExclusionRule("pg_catalog|information_schema"));
break;
default:
}
return options;
}
private schemacrawler.schema.Schema findSchema(Catalog catalog,String schemaName) {
Collection<schemacrawler.schema.Schema> schemas =catalog.getSchemas();
if(schemas!=null && schemas.size()>0) {
for(schemacrawler.schema.Schema schema : schemas) {
DatabaseType type =DatabaseType.fromProductName(catalog.getDatabaseInfo().getProductName());
if(DatabaseType.MYSQL.equals(type)) {//mysql 没有 schema,只有 catalog
if(schema.getCatalogName().equalsIgnoreCase(schemaName)) {
return schema;
}
}else {
if(schema.getName().equalsIgnoreCase(schemaName)) {
return schema;
}
}
}
}
return null;
}
}

22
io.sc.platform.jdbc.schemacrawler-14.21.02/src/main/java/io/sc/platform/jdbc/schemacrawler/ParentAndChildrenTableComparator.java

@ -0,0 +1,22 @@
package io.sc.platform.jdbc.schemacrawler;
import schemacrawler.schema.Table;
import schemacrawler.schema.TableRelationshipType;
import java.util.Collection;
import java.util.Comparator;
public class ParentAndChildrenTableComparator implements Comparator<Table> {
@Override
public int compare(Table o1, Table o2) {
Collection<Table> parentTables =o1.getRelatedTables(TableRelationshipType.parent);
Collection<schemacrawler.schema.Table> childrenTables =o1.getRelatedTables(TableRelationshipType.child);
if(parentTables!=null && !parentTables.isEmpty() && parentTables.contains(o2)) {
return 1;
}else if(childrenTables!=null && !childrenTables.isEmpty() && childrenTables.contains(o2)) {
return -1;
}else {
return o1.getName().compareTo(o2.getName());
}
}
}

1
io.sc.platform.jdbc.schemacrawler-14.21.02/src/main/resources/META-INF/services/io.sc.platform.jdbc.meta.MetaDataLoader

@ -0,0 +1 @@
io.sc.platform.jdbc.schemacrawler.MetaDataLoaderImpl

202
io.sc.platform.lcdp.frontend/package.json

@ -1,104 +1,102 @@
{
"name": "io.sc.platform.lcdp.frontend",
"version": "8.1.11",
"description": "",
"private": false,
"keywords": [
],
"author": "",
"license": "ISC",
"scripts": {
"clean": "rm -rf ./node_modules && rm -rf pnpm-lock.yaml",
"dev": "nodemon",
"serve": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack serve --config webpack.env.serve.cjs",
"build": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack --config webpack.env.build.cjs",
"prod": "node ./util-components-generator.cjs && cross-env NODE_ENV=production webpack --config webpack.env.prod.cjs",
"sync": "platform sync"
},
"engines": {
"node": ">=18",
"pnpm": ">=7"
},
"publishConfig": {
"registry": "http://nexus.sc.io:8000/repository/npm-releases/",
"access": "public"
},
"devDependencies": {
"@babel/core": "7.23.2",
"@babel/preset-env": "7.23.2",
"@babel/preset-typescript": "7.23.2",
"@babel/plugin-transform-class-properties": "7.22.5",
"@babel/plugin-transform-object-rest-spread": "7.22.15",
"@quasar/app-webpack": "3.11.2",
"@quasar/cli": "2.3.0",
"@types/mockjs": "1.0.9",
"@types/node": "20.8.9",
"@typescript-eslint/eslint-plugin": "6.9.0",
"@typescript-eslint/parser": "6.9.0",
"@vue/compiler-sfc": "3.3.7",
"@webpack-cli/serve": "2.0.5",
"autoprefixer": "10.4.16",
"babel-loader": "9.1.3",
"clean-webpack-plugin": "4.0.0",
"copy-webpack-plugin": "11.0.0",
"cross-env": "7.0.3",
"css-loader": "6.8.1",
"eslint": "8.52.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-vue": "9.18.0",
"eslint-webpack-plugin": "4.0.1",
"html-webpack-plugin": "5.5.3",
"json5": "2.2.3",
"mini-css-extract-plugin": "2.7.6",
"nodemon": "3.0.1",
"postcss": "8.4.31",
"postcss-import": "15.1.0",
"postcss-loader": "7.3.3",
"postcss-preset-env": "9.2.0",
"prettier": "3.0.3",
"sass": "1.69.5",
"sass-loader": "13.3.2",
"typescript": "5.2.2",
"vue-loader": "17.3.0",
"webpack": "5.89.0",
"webpack-bundle-analyzer": "4.9.1",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.1",
"webpack-merge": "5.10.0"
},
"dependencies": {
"@codemirror/autocomplete": "6.11.1",
"@codemirror/commands": "6.3.2",
"@codemirror/lang-html": "6.4.7",
"@codemirror/lang-java": "6.0.1",
"@codemirror/lang-javascript": "6.2.1",
"@codemirror/lang-json": "6.0.1",
"@codemirror/lang-sql": "6.5.4",
"@codemirror/lang-xml": "6.0.2",
"@codemirror/language": "6.9.3",
"@codemirror/search": "6.5.5",
"@codemirror/state": "6.3.3",
"@codemirror/view": "6.22.1",
"@quasar/extras": "1.16.7",
"@vueuse/core": "10.3.0",
"axios": "1.5.1",
"codemirror": "6.0.1",
"dayjs": "1.11.10",
"echarts": "5.4.1",
"exceljs": "4.3.0",
"file-saver": "2.0.5",
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.1.7",
"platform-core": "8.1.27",
"quasar": "2.13.0",
"tailwindcss": "3.3.5",
"vue": "3.3.7",
"vue-dompurify-html": "4.1.4",
"vue-i18n": "9.6.0",
"vue-router": "4.2.5",
"vue-codemirror6": "1.1.31"
}
"name": "io.sc.platform.lcdp.frontend",
"version": "8.1.12",
"description": "",
"private": false,
"keywords": [],
"author": "",
"license": "ISC",
"scripts": {
"clean": "rm -rf ./node_modules && rm -rf pnpm-lock.yaml",
"dev": "nodemon",
"serve": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack serve --config webpack.env.serve.cjs",
"build": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack --config webpack.env.build.cjs",
"prod": "node ./util-components-generator.cjs && cross-env NODE_ENV=production webpack --config webpack.env.prod.cjs",
"sync": "platform sync"
},
"engines": {
"node": ">=18",
"pnpm": ">=7"
},
"publishConfig": {
"registry": "http://nexus.sc.io:8000/repository/npm-releases/",
"access": "public"
},
"devDependencies": {
"@babel/core": "7.23.2",
"@babel/preset-env": "7.23.2",
"@babel/preset-typescript": "7.23.2",
"@babel/plugin-transform-class-properties": "7.22.5",
"@babel/plugin-transform-object-rest-spread": "7.22.15",
"@quasar/app-webpack": "3.11.2",
"@quasar/cli": "2.3.0",
"@types/mockjs": "1.0.9",
"@types/node": "20.8.9",
"@typescript-eslint/eslint-plugin": "6.9.0",
"@typescript-eslint/parser": "6.9.0",
"@vue/compiler-sfc": "3.3.7",
"@webpack-cli/serve": "2.0.5",
"autoprefixer": "10.4.16",
"babel-loader": "9.1.3",
"clean-webpack-plugin": "4.0.0",
"copy-webpack-plugin": "11.0.0",
"cross-env": "7.0.3",
"css-loader": "6.8.1",
"eslint": "8.52.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-vue": "9.18.0",
"eslint-webpack-plugin": "4.0.1",
"html-webpack-plugin": "5.5.3",
"json5": "2.2.3",
"mini-css-extract-plugin": "2.7.6",
"nodemon": "3.0.1",
"postcss": "8.4.31",
"postcss-import": "15.1.0",
"postcss-loader": "7.3.3",
"postcss-preset-env": "9.2.0",
"prettier": "3.0.3",
"sass": "1.69.5",
"sass-loader": "13.3.2",
"typescript": "5.2.2",
"vue-loader": "17.3.0",
"webpack": "5.89.0",
"webpack-bundle-analyzer": "4.9.1",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.1",
"webpack-merge": "5.10.0"
},
"dependencies": {
"@codemirror/autocomplete": "6.11.1",
"@codemirror/commands": "6.3.2",
"@codemirror/lang-html": "6.4.7",
"@codemirror/lang-java": "6.0.1",
"@codemirror/lang-javascript": "6.2.1",
"@codemirror/lang-json": "6.0.1",
"@codemirror/lang-sql": "6.5.4",
"@codemirror/lang-xml": "6.0.2",
"@codemirror/language": "6.9.3",
"@codemirror/search": "6.5.5",
"@codemirror/state": "6.3.3",
"@codemirror/view": "6.22.1",
"@quasar/extras": "1.16.7",
"@vueuse/core": "10.3.0",
"axios": "1.5.1",
"codemirror": "6.0.1",
"dayjs": "1.11.10",
"echarts": "5.4.1",
"exceljs": "4.3.0",
"file-saver": "2.0.5",
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.1.7",
"platform-core": "8.1.37",
"quasar": "2.13.0",
"tailwindcss": "3.3.5",
"vue": "3.3.7",
"vue-dompurify-html": "4.1.4",
"vue-i18n": "9.6.0",
"vue-router": "4.2.5",
"vue-codemirror6": "1.1.31"
}
}

10
io.sc.platform.lcdp/src/main/java/io/sc/platform/lcdp/configure/jpa/entity/ConfigureEntity.java

@ -21,25 +21,25 @@ public class ConfigureEntity extends CorporationAuditorEntity {
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid2")
@Column(name="_ID", length=36)
@Column(name="ID_", length=36)
@Size(max=36)
private String id;
//名称
@Column(name="_NAME", length=255)
@Column(name="NAME_", length=255)
@Size(min=1,max=255)
private String name;
// 是否活动
@Column(name="_IS_ACTIVE")
@Column(name="IS_ACTIVE_")
@Convert(converter= NumericBooleanConverter.class)
private Boolean active;
@Column(name="_SETTING")
@Column(name="SETTING_")
@Convert(converter= SettingStringConverter.class)
private Setting setting;
@Column(name="_THEME")
@Column(name="THEME_")
@Convert(converter= ThemeStringConverter.class)
private Theme theme;

12
io.sc.platform.lcdp/src/main/java/io/sc/platform/lcdp/configure/service/impl/ConfigureServiceImpl.java

@ -1,20 +1,23 @@
package io.sc.platform.lcdp.configure.service.impl;
import io.sc.platform.lcdp.configure.converter.ConfigureEntityVoConverter;
import io.sc.platform.lcdp.configure.vo.Configure;
import io.sc.platform.lcdp.configure.jpa.entity.ConfigureEntity;
import io.sc.platform.lcdp.configure.jpa.repository.ConfigureRepository;
import io.sc.platform.lcdp.configure.service.ConfigureService;
import io.sc.platform.lcdp.configure.vo.Configure;
import io.sc.platform.mvc.service.SystemParameterService;
import io.sc.platform.orm.service.impl.DaoServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.transaction.Transactional;
@Service
public class ConfigureServiceImpl extends DaoServiceImpl<ConfigureEntity, String, ConfigureRepository> implements ConfigureService {
@Autowired private JdbcTemplate jdbcTemplate;
@Autowired private SystemParameterService systemParameterService;
@Override
public Configure getActiveConfigure() {
@ -23,7 +26,12 @@ public class ConfigureServiceImpl extends DaoServiceImpl<ConfigureEntity, String
if(entity!=null) {
return converter.toVo(repository.findActiveConfigure());
}else{
return new Configure();
Configure configure = new Configure();
String homePage =systemParameterService.getParameter("parameter.system.homePage");
if(StringUtils.hasText(homePage)) {
configure.getSetting().setHomePage(homePage);
}
return configure;
}
}

2
io.sc.platform.lcdp/src/main/java/io/sc/platform/lcdp/configure/vo/Setting.java

@ -2,7 +2,7 @@ package io.sc.platform.lcdp.configure.vo;
public class Setting {
private String routerHistoryMode="hash"; // vue-router 历史模式(hash,web)
private String homePage ="/rwaHome"; // 首页路由 path
private String homePage ="/home"; // 首页路由 path
private I18n i18n =new I18n(); // 多语言国际化
public String getRouterHistoryMode() {

22
io.sc.platform.lcdp/src/main/resources/liquibase/LCDP_1.0.0_20220606__LowCode_DDL.xml

@ -13,19 +13,19 @@
<changeSet id="LCDP_1.0.0_20220606__LowCode_DDL" author="platform">
<!-- 主题风格配置表 -->
<createTable tableName="LCDP_CONFIGURE" remarks="系统配置表">
<column name="_ID" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<column name="ID_" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<constraints primaryKey="true"/>
</column>
<column name="_NAME" type="java.sql.Types.NVARCHAR(255)" remarks="主题名称"></column>
<column name="_IS_ACTIVE" type="java.sql.Types.SMALLINT" remarks="是否活动(0:不活动,1:活动)"></column>
<column name="_SETTING" type="java.sql.Types.NVARCHAR(255)" remarks="SETTING"></column>
<column name="_THEME" type="java.sql.Types.NVARCHAR(255)" remarks="THEME"></column>
<column name="_DATA_COME_FROM" type="java.sql.Types.NVARCHAR(10)" remarks="数据来源(INPUT:手工录入,IMPORT:系统自动导入)" defaultValue="INPUT"></column>
<column name="_CREATOR" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="_CREATE_DATE" type="DATETIME" remarks="创建日期"></column>
<column name="_LAST_MODIFIER" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="_LAST_MODIFYDATE" type="DATETIME" remarks="最后修改日期"></column>
<column name="_CORP_CODE" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<column name="NAME_" type="java.sql.Types.NVARCHAR(255)" remarks="主题名称"></column>
<column name="IS_ACTIVE_" type="java.sql.Types.SMALLINT" remarks="是否活动(0:不活动,1:活动)"></column>
<column name="SETTING_" type="java.sql.Types.NVARCHAR(255)" remarks="SETTING"></column>
<column name="THEME_" type="java.sql.Types.NVARCHAR(255)" remarks="THEME"></column>
<column name="DATA_COME_FROM_" type="java.sql.Types.NVARCHAR(10)" remarks="数据来源(INPUT:手工录入,IMPORT:系统自动导入)" defaultValue="INPUT"></column>
<column name="CREATOR_" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="CREATE_DATE_" type="DATETIME" remarks="创建日期"></column>
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false" />
</column>
</createTable>

202
io.sc.platform.mvc.frontend/package.json

@ -1,104 +1,102 @@
{
"name": "io.sc.platform.mvc.frontend",
"version": "8.1.11",
"description": "",
"private": false,
"keywords": [
],
"author": "",
"license": "ISC",
"scripts": {
"dev": "nodemon",
"serve": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack serve --config webpack.env.serve.cjs",
"build": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack --config webpack.env.build.cjs",
"prod": "node ./util-components-generator.cjs && cross-env NODE_ENV=production webpack --config webpack.env.prod.cjs",
"sync": "platform sync",
"clean": "rm -rf ./node_modules && rm -rf pnpm-lock.yaml"
},
"engines": {
"node": ">=18",
"pnpm": ">=7"
},
"publishConfig": {
"registry": "http://nexus.sc.io:8000/repository/npm-releases/",
"access": "public"
},
"devDependencies": {
"@babel/core": "7.23.2",
"@babel/preset-env": "7.23.2",
"@babel/preset-typescript": "7.23.2",
"@babel/plugin-transform-class-properties": "7.22.5",
"@babel/plugin-transform-object-rest-spread": "7.22.15",
"@quasar/app-webpack": "3.11.2",
"@quasar/cli": "2.3.0",
"@types/mockjs": "1.0.9",
"@types/node": "20.8.9",
"@typescript-eslint/eslint-plugin": "6.9.0",
"@typescript-eslint/parser": "6.9.0",
"@vue/compiler-sfc": "3.3.7",
"@webpack-cli/serve": "2.0.5",
"autoprefixer": "10.4.16",
"babel-loader": "9.1.3",
"clean-webpack-plugin": "4.0.0",
"copy-webpack-plugin": "11.0.0",
"cross-env": "7.0.3",
"css-loader": "6.8.1",
"eslint": "8.52.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-vue": "9.18.0",
"eslint-webpack-plugin": "4.0.1",
"html-webpack-plugin": "5.5.3",
"json5": "2.2.3",
"mini-css-extract-plugin": "2.7.6",
"nodemon": "3.0.1",
"postcss": "8.4.31",
"postcss-import": "15.1.0",
"postcss-loader": "7.3.3",
"postcss-preset-env": "9.2.0",
"prettier": "3.0.3",
"sass": "1.69.5",
"sass-loader": "13.3.2",
"typescript": "5.2.2",
"vue-loader": "17.3.0",
"webpack": "5.89.0",
"webpack-bundle-analyzer": "4.9.1",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.1",
"webpack-merge": "5.10.0"
},
"dependencies": {
"@quasar/extras": "1.16.7",
"@vueuse/core": "10.3.0",
"axios": "1.5.1",
"dayjs": "1.11.10",
"echarts": "5.4.1",
"exceljs": "4.3.0",
"file-saver": "2.0.5",
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.1.7",
"platform-core": "8.1.27",
"quasar": "2.13.0",
"tailwindcss": "3.3.5",
"vue": "3.3.7",
"vue-dompurify-html": "4.1.4",
"vue-i18n": "9.6.0",
"vue-router": "4.2.5",
"@codemirror/autocomplete": "6.11.1",
"@codemirror/commands": "6.3.2",
"@codemirror/lang-html": "6.4.7",
"@codemirror/lang-java": "6.0.1",
"@codemirror/lang-javascript": "6.2.1",
"@codemirror/lang-json": "6.0.1",
"@codemirror/lang-sql": "6.5.4",
"@codemirror/lang-xml": "6.0.2",
"@codemirror/language": "6.9.3",
"@codemirror/search": "6.5.5",
"@codemirror/state": "6.3.3",
"@codemirror/view": "6.22.1",
"codemirror": "6.0.1",
"vue-codemirror6": "1.1.31"
}
"name": "io.sc.platform.mvc.frontend",
"version": "8.1.12",
"description": "",
"private": false,
"keywords": [],
"author": "",
"license": "ISC",
"scripts": {
"dev": "nodemon",
"serve": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack serve --config webpack.env.serve.cjs",
"build": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack --config webpack.env.build.cjs",
"prod": "node ./util-components-generator.cjs && cross-env NODE_ENV=production webpack --config webpack.env.prod.cjs",
"sync": "platform sync",
"clean": "rm -rf ./node_modules && rm -rf pnpm-lock.yaml"
},
"engines": {
"node": ">=18",
"pnpm": ">=7"
},
"publishConfig": {
"registry": "http://nexus.sc.io:8000/repository/npm-releases/",
"access": "public"
},
"devDependencies": {
"@babel/core": "7.23.2",
"@babel/preset-env": "7.23.2",
"@babel/preset-typescript": "7.23.2",
"@babel/plugin-transform-class-properties": "7.22.5",
"@babel/plugin-transform-object-rest-spread": "7.22.15",
"@quasar/app-webpack": "3.11.2",
"@quasar/cli": "2.3.0",
"@types/mockjs": "1.0.9",
"@types/node": "20.8.9",
"@typescript-eslint/eslint-plugin": "6.9.0",
"@typescript-eslint/parser": "6.9.0",
"@vue/compiler-sfc": "3.3.7",
"@webpack-cli/serve": "2.0.5",
"autoprefixer": "10.4.16",
"babel-loader": "9.1.3",
"clean-webpack-plugin": "4.0.0",
"copy-webpack-plugin": "11.0.0",
"cross-env": "7.0.3",
"css-loader": "6.8.1",
"eslint": "8.52.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-vue": "9.18.0",
"eslint-webpack-plugin": "4.0.1",
"html-webpack-plugin": "5.5.3",
"json5": "2.2.3",
"mini-css-extract-plugin": "2.7.6",
"nodemon": "3.0.1",
"postcss": "8.4.31",
"postcss-import": "15.1.0",
"postcss-loader": "7.3.3",
"postcss-preset-env": "9.2.0",
"prettier": "3.0.3",
"sass": "1.69.5",
"sass-loader": "13.3.2",
"typescript": "5.2.2",
"vue-loader": "17.3.0",
"webpack": "5.89.0",
"webpack-bundle-analyzer": "4.9.1",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.1",
"webpack-merge": "5.10.0"
},
"dependencies": {
"@quasar/extras": "1.16.7",
"@vueuse/core": "10.3.0",
"axios": "1.5.1",
"dayjs": "1.11.10",
"echarts": "5.4.1",
"exceljs": "4.3.0",
"file-saver": "2.0.5",
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.1.7",
"platform-core": "8.1.37",
"quasar": "2.13.0",
"tailwindcss": "3.3.5",
"vue": "3.3.7",
"vue-dompurify-html": "4.1.4",
"vue-i18n": "9.6.0",
"vue-router": "4.2.5",
"@codemirror/autocomplete": "6.11.1",
"@codemirror/commands": "6.3.2",
"@codemirror/lang-html": "6.4.7",
"@codemirror/lang-java": "6.0.1",
"@codemirror/lang-javascript": "6.2.1",
"@codemirror/lang-json": "6.0.1",
"@codemirror/lang-sql": "6.5.4",
"@codemirror/lang-xml": "6.0.2",
"@codemirror/language": "6.9.3",
"@codemirror/search": "6.5.5",
"@codemirror/state": "6.3.3",
"@codemirror/view": "6.22.1",
"codemirror": "6.0.1",
"vue-codemirror6": "1.1.31"
}
}

36
io.sc.platform.mvc/src/main/java/io/sc/platform/mvc/support/CascadeMany2Many.java

@ -28,25 +28,39 @@ import java.util.Set;
* @param <ID2> 第二个 many 端主键类型
*/
public class CascadeMany2Many<ID1,ID2> {
private Set<ID1> sourceAndChildren; //源及其所有孩子(包括孩子的孩子等等)
private Set<ID1> sourceCascadeParent; //源的所有父(包括父的父等等)
private ID1 source; //源ID
private Set<ID1> sourceParents; //源的所有级联父ID
private Set<ID1> sourceChildren; //源的所有级联子ID
private Set<ID2> targets; //目标
public Set<ID1> getSourceAndChildren() {
return sourceAndChildren;
public ID1 getSource() {
return source;
}
public void setSource(ID1 source) {
this.source = source;
}
public Set<ID1> getSourceParents() {
return sourceParents;
}
public void setSourceAndChildren(Set<ID1> sourceAndChildren) {
this.sourceAndChildren = sourceAndChildren;
public void setSourceParents(Set<ID1> sourceParents) {
this.sourceParents = sourceParents;
}
public Set<ID1> getSourceCascadeParent() {
return sourceCascadeParent;
public Set<ID1> getSourceChildren() {
return sourceChildren;
}
public void setSourceCascadeParent(Set<ID1> sourceCascadeParent) {
this.sourceCascadeParent = sourceCascadeParent;
public void setSourceChildren(Set<ID1> sourceChildren) {
this.sourceChildren = sourceChildren;
}
public Set<ID2> getTargets() {
return targets;
}
public void setTargets(Set<ID2> targets) {
this.targets = targets;
}

22
io.sc.platform.mvc/src/main/java/io/sc/platform/mvc/support/OrderItem.java

@ -0,0 +1,22 @@
package io.sc.platform.mvc.support;
public class OrderItem<ID,ORDER> {
private ID id;
private ORDER order;
public ID getId() {
return id;
}
public void setId(ID id) {
this.id = id;
}
public ORDER getOrder() {
return order;
}
public void setOrder(ORDER order) {
this.order = order;
}
}

8
io.sc.platform.mvc/src/main/resources/META-INF/platform/plugins/parameters.json

@ -1,12 +1,12 @@
[
/**/
{"id":"parameter.system","order":0},
/*/ Thymeleaf */
/*/*/
{
"id" : "parameter.system.indexPageTemplate",
"id" : "parameter.system.homePage",
"parentId" : "parameter.system",
"code" : "parameter.system.indexPageTemplate",
"defaultValue" : "io.sc.platform.mvc.frontend.html",
"code" : "parameter.system.homePage",
"defaultValue" : "/home",
"order" : 100
}
]

10
io.sc.platform.orm/src/main/java/io/sc/platform/orm/entity/AuditorEntity.java

@ -19,33 +19,33 @@ import java.util.Date;
@MappedSuperclass
public abstract class AuditorEntity extends BaseEntity {
// 数据来源
@Column(name="_DATA_COME_FROM",length=10)
@Column(name="DATA_COME_FROM_",length=10)
@Enumerated(EnumType.STRING)
@JsonProperty(index = 1001)
private DataComeFrom dataComeFrom =DataComeFrom.INPUT;
//创建人(登录名)
@CreatedBy
@Column(name="_CREATOR", length=255, nullable=false)
@Column(name="CREATOR_", length=255, nullable=false)
@JsonProperty(index = 1002)
protected String creator;
//创建日期
@CreatedDate
@Column(name="_CREATE_DATE", nullable=false)
@Column(name="CREATE_DATE_", nullable=false)
@Temporal(TemporalType.TIMESTAMP)
@JsonProperty(index = 1003)
protected Date createDate;
//最后修改人(登录名)
@LastModifiedBy
@Column(name="_LAST_MODIFIER", length=255, nullable=false)
@Column(name="LAST_MODIFIER_", length=255, nullable=false)
@JsonProperty(index = 1004)
protected String lastModifier;
//最后修改日期
@LastModifiedDate
@Column(name="_LAST_MODIFYDATE", nullable=false)
@Column(name="LAST_MODIFYDATE_", nullable=false)
@Temporal(TemporalType.TIMESTAMP)
@JsonProperty(index = 1005)
protected Date lastModifyDate;

2
io.sc.platform.orm/src/main/java/io/sc/platform/orm/entity/CorporationAuditorEntity.java

@ -9,7 +9,7 @@ import javax.persistence.MappedSuperclass;
@MappedSuperclass
public abstract class CorporationAuditorEntity extends AuditorEntity{
//法人代码
@Column(name="_CORP_CODE")
@Column(name="CORP_CODE_")
protected String corporationCode;
/**

20
io.sc.platform.orm/src/main/java/io/sc/platform/orm/service/impl/DaoServiceImpl.java

@ -8,7 +8,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.core.convert.ConversionService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
@ -384,13 +383,28 @@ public abstract class DaoServiceImpl<E,ID extends Serializable,R extends DaoRepo
@Override
public Page<E> query(Specification<E> specification, QueryParameter queryParameter) throws Exception {
if(queryParameter!=null) {
Pageable pageable =queryParameter.getPageable();
if(pageable!=null){
if(queryParameter.getPageable()){
Pageable pageable =queryParameter.getJpaPageable();
if(specification!=null) {
return repository.findAll(specification, pageable);
}else{
return repository.findAll(pageable);
}
}else{
Sort sort=queryParameter.getSort();
if(sort!=null){
if(specification!=null) {
return QueryResult.page(repository.findAll(specification, sort));
}else{
return QueryResult.page(repository.findAll(sort));
}
}else{
if(specification!=null) {
return QueryResult.page(repository.findAll(specification));
}else{
return QueryResult.page(repository.findAll());
}
}
}
}
return QueryResult.emptyPage();

59
io.sc.platform.orm/src/main/java/io/sc/platform/orm/service/support/QueryParameter.java

@ -9,8 +9,10 @@ import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.data.domain.Sort.Order;
import org.springframework.util.StringUtils;
public class QueryParameter {
protected Boolean pageable=true; //是否需要分页
protected Integer firstPage =1; //起始页序号
protected Integer page =1; //当前页(从 firstPage 开始计数)
protected Integer size =20; //页大小
@ -19,28 +21,18 @@ public class QueryParameter {
protected String criteria; //criteria字符串列表(json 串列表)
protected List<Criteria> criterias =new ArrayList<Criteria>(); //criteria 对象列表(将 json 串转成对象后的列表)
protected String exportFilename; //导出文件名
public Pageable getPageable(){
if(page==null || size==null){
return null;
}
int _page =1;
int _size =20;
if(firstPage==1) {//如果起始页从1开始,真实起始页需减一
_page =page>0? page-1 : 0;
}else {
_page =page>=0? page : 0;
}
if(size>0){
_size =size;
public Pageable getJpaPageable(){
if(firstPage==1){ //如果起始页从1开始,真实起始页需减一
page =page>0? page-1 : 0;
}else{
page =page>=0? page : 0;
}
Sort sort =getSort();
if(sort!=null){
return PageRequest.of(_page,_size,sort);
return PageRequest.of(page,size,sort);
}else{
return PageRequest.of(_page,_size);
return PageRequest.of(page,size);
}
}
@ -52,30 +44,44 @@ public class QueryParameter {
for(String sort : sortBy){
if(sort.startsWith("-")){
orders.add(new Order(Direction.DESC,sort.substring(1)));
}else if(sort.startsWith("+")){
orders.add(new Order(Direction.ASC,sort.substring(1)));
}else{
orders.add(new Order(Direction.ASC,sort));
}
}
return Sort.by(orders);
}
public void addSortBy(String sortBy){
if(StringUtils.hasText(sortBy)) {
this.sortBy.add(sortBy);
}
}
public Boolean getPageable() {
return pageable;
}
public void setPageable(Boolean pageable) {
this.pageable = pageable==null? true : pageable;
}
public Integer getFirstPage() {
return firstPage;
}
public void setFirstPage(Integer firstPage) {
this.firstPage = firstPage;
this.firstPage = firstPage==null? 1 : (firstPage==1?1:0);
}
public Integer getPage() {
return page;
}
public void setPage(Integer page) {
this.page = page;
this.page = page==null? 1 : page;
}
public Integer getSize() {
return size;
}
public void setSize(Integer size) {
this.size = size;
this.size = size==null? 20 : size;
}
public List<String> getSortBy() {
return sortBy;
@ -83,42 +89,35 @@ public class QueryParameter {
public void setSortBy(List<String> sortBy) {
this.sortBy = sortBy;
}
public OperatorType getOperator() {
return operator;
}
public void setOperator(OperatorType operator) {
this.operator = operator;
}
public String getCriteria() {
return criteria;
}
public void setCriteria(String criteria) {
this.criteria = criteria;
this.criterias =Criteria.parse(criteria);
}
public List<Criteria> getCriterias() {
return criterias;
}
public void setCriterias(List<Criteria> criterias) {
this.criterias = criterias;
}
public String getExportFilename() {
return exportFilename;
}
public void setExportFilename(String exportFilename) {
this.exportFilename = exportFilename;
}
@Override
public String toString() {
return "QueryParameter [firstPage=" + firstPage + ", page=" + page + ", size=" + size + ", sortBy=" + sortBy
return "QueryParameter [pageable=" + pageable + ",firstPage=" + firstPage + ", page=" + page + ", size=" + size + ", sortBy=" + sortBy
+ ", criterias=" + criterias + "]";
}
}

9
io.sc.platform.orm/src/main/java/io/sc/platform/orm/service/support/QueryResult.java

@ -2,6 +2,7 @@ package io.sc.platform.orm.service.support;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import java.util.Collections;
import java.util.List;
@ -9,6 +10,14 @@ import java.util.List;
public class QueryResult {
private QueryResult(){}
public static <T> Page<T> page(List<T> list){
if(list!=null && !list.isEmpty()) {
return new PageImpl<T>(list);
}else{
return new PageImpl<T>(Collections.emptyList());
}
}
public static <T> Page<T> emptyPage(){
return new PageImpl<T>(Collections.emptyList());
}

4
io.sc.platform.security.frontend/package.json

@ -1,6 +1,6 @@
{
"name": "io.sc.platform.security.frontend",
"version": "8.1.11",
"version": "8.1.12",
"description": "",
"private": false,
"keywords": [
@ -79,7 +79,7 @@
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.1.7",
"platform-core": "8.1.27",
"platform-core": "8.1.37",
"quasar": "2.13.0",
"tailwindcss": "3.3.5",
"vue": "3.3.7",

52
io.sc.platform.security/src/main/java/io/sc/platform/security/initializer/AdministratorRoleAndUserInitializer.java

@ -95,52 +95,52 @@ public class AdministratorRoleAndUserInitializer implements ApplicationInitializ
}
private Role findAdminRole(){
return jdbcTemplate.query("select * from SYS_ROLE where _CODE='admin'", Role.getResultSetExtractor());
return jdbcTemplate.query("select * from SYS_ROLE where CODE_='admin'", Role.getResultSetExtractor());
}
private void insertAdminRole(String roleId){
SqlBuilder.getInsertIntoSqlBuilder()
.table("SYS_ROLE")
.field("_ID", roleId)
.field("_CODE","admin")
.field("_NAME","系统管理员")
.field("_DESCRIPTION","系统管理员")
.field("_ENABLE",1)
.field("_DATA_COME_FROM","INPUT")
.field("_CREATOR","system")
.field("_CREATE_DATE", new java.sql.Date(new Date().getTime()))
.field("_LAST_MODIFIER","system")
.field("_LAST_MODIFYDATE",new java.sql.Date(new Date().getTime()))
.field("_CORP_CODE","_PRIMARY_")
.field("ID_", roleId)
.field("CODE_","admin")
.field("NAME_","系统管理员")
.field("DESCRIPTION_","系统管理员")
.field("ENABLE_",1)
.field("DATA_COME_FROM_","INPUT")
.field("CREATOR_","system")
.field("CREATE_DATE_", new java.sql.Date(new Date().getTime()))
.field("LAST_MODIFIER_","system")
.field("LAST_MODIFYDATE_",new java.sql.Date(new Date().getTime()))
.field("CORP_CODE_","_PRIMARY_")
.insert(jdbcTemplate);
}
private User findAdminUser(){
return jdbcTemplate.query("select * from SYS_USER where _LOGINNAME='admin'", User.getResultSetExtractor());
return jdbcTemplate.query("select * from SYS_USER where LOGINNAME_='admin'", User.getResultSetExtractor());
}
private void insertAdminUser(String userId){
SqlBuilder.getInsertIntoSqlBuilder()
.table("SYS_USER")
.field("_ID", userId)
.field("_LOGINNAME","admin")
.field("_USERNAME","系统管理员")
.field("_PASSWORD",passwordEncoder.encode("admin"))
.field("_ENABLE",1)
.field("_DATA_COME_FROM","INPUT")
.field("_CREATOR","system")
.field("_CREATE_DATE",new Date())
.field("_LAST_MODIFIER","system")
.field("_LAST_MODIFYDATE",new Date())
.field("_CORP_CODE","_PRIMARY_")
.field("ID_", userId)
.field("LOGINNAME_","admin")
.field("USERNAME_","系统管理员")
.field("PASSWORD_",passwordEncoder.encode("admin"))
.field("ENABLE_",1)
.field("DATA_COME_FROM_","INPUT")
.field("CREATOR_","system")
.field("CREATE_DATE_",new Date())
.field("LAST_MODIFIER_","system")
.field("LAST_MODIFYDATE_",new Date())
.field("CORP_CODE_","_PRIMARY_")
.insert(jdbcTemplate);
}
private int countUserAndRole(String userId,String roleId){
return jdbcTemplate.queryForObject("select count(*) from SYS_USER_ROLE where _USER_ID=? and _ROLE_ID=?", Integer.class,userId,roleId);
return jdbcTemplate.queryForObject("select count(*) from SYS_USER_ROLE where USER_ID_=? and ROLE_ID_=?", Integer.class,userId,roleId);
}
private void insertUserAndRole(String userId,String roleId){
jdbcTemplate.update("insert into SYS_USER_ROLE(_USER_ID,_ROLE_ID) values (?,?)", userId,roleId);
jdbcTemplate.update("insert into SYS_USER_ROLE(USER_ID_,ROLE_ID_) values (?,?)", userId,roleId);
}
}

18
io.sc.platform.security/src/main/java/io/sc/platform/security/initializer/CorporationInitializer.java

@ -69,20 +69,20 @@ public class CorporationInitializer implements ApplicationInitializer {
}
private Corporation findRootCorporation(){
return jdbcTemplate.query("select * from SYS_CORPORATION where _CODE='_ROOT_'", Corporation.getResultSetExtractor());
return jdbcTemplate.query("select * from SYS_CORPORATION where CODE_='_ROOT_'", Corporation.getResultSetExtractor());
}
private void insertRootCorporation(){
SqlBuilder.getInsertIntoSqlBuilder()
.table("SYS_CORPORATION")
.field("_CODE","_ROOT_")
.field("_NAME","_ROOT_")
.field("_DESCRIPTION","根法人")
.field("_ENABLE",1)
.field("_CREATOR","platform")
.field("_CREATE_DATE", DateUtil.sqlDate())
.field("_LAST_MODIFIER","platform")
.field("_LAST_MODIFYDATE",DateUtil.sqlDate())
.field("CODE_","_ROOT_")
.field("NAME_","_ROOT_")
.field("DESCRIPTION_","根法人")
.field("ENABLE_",1)
.field("CREATOR_","platform")
.field("CREATE_DATE_", DateUtil.sqlDate())
.field("LAST_MODIFIER_","platform")
.field("LAST_MODIFYDATE_",DateUtil.sqlDate())
.insert(jdbcTemplate);
}
}

28
io.sc.platform.security/src/main/java/io/sc/platform/security/installer/AdministratorInstallerItem.java

@ -45,22 +45,22 @@ public class AdministratorInstallerItem implements InstallerItem {
DataSource dataSource =datasourceService.createDatasource(datasourceService.parse(config));
JdbcTemplate jdbcTemplate =new JdbcTemplate(dataSource);
List<Map<String, Object>> list =jdbcTemplate.queryForList("select * from SYS_USER where _LOGINNAME=?",administratorLoginName);
if(list!=null && !list.isEmpty()){
jdbcTemplate.update("update SYS_USER set _PASSWORD=? where _LOGINNAME=?",administratorPassword,administratorLoginName);
List<Map<String, Object>> list =jdbcTemplate.queryForList("select * from SYS_USER where LOGINNAME_=?",administratorLoginName);
if(!list.isEmpty()){
jdbcTemplate.update("update SYS_USER set PASSWORD_=? where LOGINNAME_=?",administratorPassword,administratorLoginName);
}else{
SqlBuilder.getInsertIntoSqlBuilder().table("SYS_USER")
.field("_ID", UUID.randomUUID().toString())
.field("_LOGINNAME",administratorLoginName)
.field("_USERNAME","系统管理员")
.field("_PASSWORD",administratorPassword)
.field("_ENABLE",1)
.field("_DATA_COME_FROM","INPUT")
.field("_CREATOR","system")
.field("_CREATE_DATE",new Date())
.field("_LAST_MODIFIER","system")
.field("_LAST_MODIFYDATE",new Date())
.field("_CORP_CODE","_PRIMARY_")
.field("ID_", UUID.randomUUID().toString())
.field("LOGINNAME_",administratorLoginName)
.field("USERNAME_","系统管理员")
.field("PASSWORD_",administratorPassword)
.field("ENABLE_",1)
.field("DATA_COME_FROM_","INPUT")
.field("CREATOR_","system")
.field("CREATE_DATE_",new Date())
.field("LAST_MODIFIER_","system")
.field("LAST_MODIFYDATE_",new Date())
.field("CORP_CODE_","_PRIMARY_")
.insert(jdbcTemplate);
}
DatasourceUtil.close(dataSource);

20
io.sc.platform.security/src/main/java/io/sc/platform/security/service/impl/UserDetailsServiceImpl.java

@ -23,29 +23,29 @@ import java.util.List;
public class UserDetailsServiceImpl implements UserDetailsService{
private static final Logger log =LoggerFactory.getLogger(UserDetailsServiceImpl.class);
private static final String userQuery ="select * from SYS_USER where _LOGINNAME=?";
private static final String userQuery ="select * from SYS_USER where LOGINNAME_=?";
private static final ResultSetExtractor<User> userExtractor =User.getResultSetExtractor();
private static final String userUpdateRole ="update SYS_USER set _DEFAULT_ROLE_ID=? where _ID=?";
private static final String userUpdateOrg ="update SYS_USER set _DEFAULT_ORG_ID=? where _ID=?";
private static final String userUpdateRole ="update SYS_USER set DEFAULT_ROLE_ID_=? where ID_=?";
private static final String userUpdateOrg ="update SYS_USER set DEFAULT_ORG_ID_=? where ID_=?";
private static final String roleQuery ="select * from SYS_ROLE R"
+ " join SYS_USER_ROLE UR"
+ " on R._ID=UR._ROLE_ID"
+ " where UR._USER_ID=?";
+ " on R.ID_=UR.ROLE_ID_"
+ " where UR.USER_ID_=?";
private static final RowMapper<Role> roleRowMapper =Role.getRowMapper();
private static final String orgQuery ="select * from SYS_ORG O"
+ " join SYS_USER_ORG UO"
+ " on O._ID=UO._ORG_ID"
+ " where UO._USER_ID=?";
private static final String orgQueryById ="select * from SYS_ORG where _ID=?";
+ " on O.ID_=UO.ORG_ID_"
+ " where UO.USER_ID_=?";
private static final String orgQueryById ="select * from SYS_ORG where ID_=?";
private static final RowMapper<Org> orgRowMapper =Org.getRowMapper();
private static final ResultSetExtractor<Org> orgExtractor =Org.getResultSetExtractor();
private static final String applicationQuery ="select * from SYS_APPLICATION where _ID=?";
private static final String applicationQuery ="select * from SYS_APPLICATION where ID_=?";
private static final ResultSetExtractor<Application> applicationExtractor = Application.getResultSetExtractor();
private static final String corporationQuery ="select * from SYS_CORPORATION where _CODE=?";
private static final String corporationQuery ="select * from SYS_CORPORATION where CODE_=?";
private static final ResultSetExtractor<Corporation> corporationExtractor =Corporation.getResultSetExtractor();
private JdbcTemplate jdbcTemplate;

6
io.sc.platform.security/src/main/java/io/sc/platform/security/service/support/Application.java

@ -39,9 +39,9 @@ public class Application {
private static Application assembleUser(ResultSet rs) throws SQLException {
Application application =new Application();
application.setId(rs.getString("_ID"));
application.setCode(rs.getString("_CODE"));
application.setName(rs.getString("_NAME"));
application.setId(rs.getString("ID_"));
application.setCode(rs.getString("CODE_"));
application.setName(rs.getString("NAME_"));
return application;
}

4
io.sc.platform.security/src/main/java/io/sc/platform/security/service/support/Corporation.java

@ -38,8 +38,8 @@ public class Corporation {
private static Corporation assembleUser(ResultSet rs) throws SQLException {
Corporation corporation =new Corporation();
corporation.setCode(rs.getString("_CODE"));
corporation.setName(rs.getString("_NAME"));
corporation.setCode(rs.getString("CODE_"));
corporation.setName(rs.getString("NAME_"));
return corporation;
}

8
io.sc.platform.security/src/main/java/io/sc/platform/security/service/support/Org.java

@ -40,10 +40,10 @@ public class Org {
private static Org assembleUser(ResultSet rs) throws SQLException {
Org org =new Org();
org.setId(rs.getString("_ID"));
org.setCode(rs.getString("_CODE"));
org.setName(rs.getString("_NAME"));
org.setParentId(rs.getString("_PARENT_ID"));
org.setId(rs.getString("ID_"));
org.setCode(rs.getString("CODE_"));
org.setName(rs.getString("NAME_"));
org.setParentId(rs.getString("PARENT_ID_"));
return org;
}

6
io.sc.platform.security/src/main/java/io/sc/platform/security/service/support/Role.java

@ -39,9 +39,9 @@ public class Role {
private static Role assembleUser(ResultSet rs) throws SQLException {
Role role =new Role();
role.setId(rs.getString("_ID"));
role.setCode(rs.getString("_CODE"));
role.setName(rs.getString("_NAME"));
role.setId(rs.getString("ID_"));
role.setCode(rs.getString("CODE_"));
role.setName(rs.getString("NAME_"));
return role;
}

30
io.sc.platform.security/src/main/java/io/sc/platform/security/service/support/User.java

@ -51,21 +51,21 @@ public class User {
private static User assembleUser(ResultSet rs) throws SQLException {
User user = new User();
user.setId(rs.getString("_ID"));
user.setLoginName(rs.getString("_LOGINNAME"));
user.setUserName(rs.getString("_USERNAME"));
user.setPassword(rs.getString("_PASSWORD"));
user.setEnable(1 == rs.getInt("_ENABLE") ? true : false);
user.setAccountExpired(1 == rs.getInt("_IS_ACCOUNT_EXPIRED") ? true : false);
user.setAccountLocked(1 == rs.getInt("_IS_ACCOUNT_LOCKED") ? true : false);
user.setCredentialsExpired(1 == rs.getInt("_IS_CREDENTIALS_EXPIRED") ? true : false);
user.setEmail(rs.getString("_EMAIL"));
user.setPhone(rs.getString("_PHONE"));
user.setMobile(rs.getString("_MOBILE"));
user.setDefaultRoleId(rs.getString("_DEFAULT_ROLE_ID"));
user.setDefaultOrgId(rs.getString("_DEFAULT_ORG_ID"));
user.setDefaultAppId(rs.getString("_DEFAULT_APP_ID"));
user.setCorporationCode(rs.getString("_CORP_CODE"));
user.setId(rs.getString("ID_"));
user.setLoginName(rs.getString("LOGINNAME_"));
user.setUserName(rs.getString("USERNAME_"));
user.setPassword(rs.getString("PASSWORD_"));
user.setEnable(1 == rs.getInt("ENABLE_") ? true : false);
user.setAccountExpired(1 == rs.getInt("IS_ACCOUNT_EXPIRED_") ? true : false);
user.setAccountLocked(1 == rs.getInt("IS_ACCOUNT_LOCKED_") ? true : false);
user.setCredentialsExpired(1 == rs.getInt("IS_CREDENTIALS_EXPIRED_") ? true : false);
user.setEmail(rs.getString("EMAIL_"));
user.setPhone(rs.getString("PHONE_"));
user.setMobile(rs.getString("MOBILE_"));
user.setDefaultRoleId(rs.getString("DEFAULT_ROLE_ID_"));
user.setDefaultOrgId(rs.getString("DEFAULT_ORG_ID_"));
user.setDefaultAppId(rs.getString("DEFAULT_APP_ID_"));
user.setCorporationCode(rs.getString("CORP_CODE_"));
return user;
}

207
io.sc.platform.security/src/main/resources/liquibase/PF_11.0.0_20220606__Security_DDL.xml

@ -13,219 +13,210 @@
<changeSet id="PF_11.0.0_20220606__Security_DDL" author="platform">
<!-- 法人信息表 -->
<createTable tableName="SYS_CORPORATION" remarks="法人信息表">
<column name="_CODE" type="java.sql.Types.NVARCHAR(255)" remarks="法人代码">
<column name="CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="法人代码">
<constraints primaryKey="true"/>
</column>
<column name="_NAME" type="java.sql.Types.NVARCHAR(255)" remarks="法人名称"></column>
<column name="_DESCRIPTION" type="java.sql.Types.NVARCHAR(255)" remarks="描述"></column>
<column name="_ENABLE" type="java.sql.Types.SMALLINT" remarks="是否可用(0:不可用,1:可用)"></column>
<column name="_PARENT_CODE" type="java.sql.Types.NVARCHAR(255)" remarks="父法人代码"></column>
<column name="_DATA_COME_FROM" type="java.sql.Types.NVARCHAR(10)" remarks="数据来源(INPUT:手工录入,IMPORT:系统自动导入)" defaultValue="INPUT"></column>
<column name="_CREATOR" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="_CREATE_DATE" type="DATETIME" remarks="创建日期"></column>
<column name="_LAST_MODIFIER" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="_LAST_MODIFYDATE" type="DATETIME" remarks="最后修改日期"></column>
<column name="NAME_" type="java.sql.Types.NVARCHAR(255)" remarks="法人名称"></column>
<column name="DESCRIPTION_" type="java.sql.Types.NVARCHAR(255)" remarks="描述"></column>
<column name="ENABLE_" type="java.sql.Types.SMALLINT" remarks="是否可用(0:不可用,1:可用)"></column>
<column name="PARENT_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="父法人代码"></column>
<column name="DATA_COME_FROM_" type="java.sql.Types.NVARCHAR(10)" remarks="数据来源(INPUT:手工录入,IMPORT:系统自动导入)" defaultValue="INPUT"></column>
<column name="CREATOR_" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="CREATE_DATE_" type="DATETIME" remarks="创建日期"></column>
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
</createTable>
<!-- 当父法人被删除,其所有子法人也被删除 -->
<addForeignKeyConstraint
constraintName="FK_CORP_PARENT_AND_CHILDREN"
baseTableName="SYS_CORPORATION"
baseColumnNames="_PARENT_CODE"
baseColumnNames="PARENT_CODE_"
referencedTableName="SYS_CORPORATION"
referencedColumnNames="_CODE" onDelete="CASCADE"/>
referencedColumnNames="CODE_" onDelete="CASCADE"/>
<!-- 应用表 -->
<createTable tableName="SYS_APPLICATION" remarks="应用表">
<column name="_ID" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<column name="ID_" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<constraints primaryKey="true"/>
</column>
<column name="_CODE" type="java.sql.Types.NVARCHAR(255)" remarks="应用代码">
<column name="CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="应用代码">
<constraints nullable="false" />
</column>
<column name="_NAME" type="java.sql.Types.NVARCHAR(255)" remarks="应用名称"></column>
<column name="_DESCRIPTION" type="java.sql.Types.NVARCHAR(255)" remarks="描述"></column>
<column name="_ENABLE" type="java.sql.Types.SMALLINT" remarks="是否可用(0:不可用,1:可用)"></column>
<column name="_CREATOR" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="_CREATE_DATE" type="DATETIME" remarks="创建日期"></column>
<column name="_LAST_MODIFIER" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="_LAST_MODIFYDATE" type="DATETIME" remarks="最后修改日期"></column>
<column name="_CORP_CODE" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<column name="NAME_" type="java.sql.Types.NVARCHAR(255)" remarks="应用名称"></column>
<column name="DESCRIPTION_" type="java.sql.Types.NVARCHAR(255)" remarks="描述"></column>
<column name="ENABLE_" type="java.sql.Types.SMALLINT" remarks="是否可用(0:不可用,1:可用)"></column>
<column name="CREATOR_" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="CREATE_DATE_" type="DATETIME" remarks="创建日期"></column>
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false"/>
</column>
</createTable>
<addUniqueConstraint tableName="SYS_APPLICATION" columnNames="_CODE,_CORP_CODE"></addUniqueConstraint>
<addUniqueConstraint tableName="SYS_APPLICATION" columnNames="CODE_,CORP_CODE_"></addUniqueConstraint>
<!-- 用户表 -->
<createTable tableName="SYS_USER" remarks="用户表">
<column name="_ID" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<column name="ID_" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<constraints primaryKey="true"/>
</column>
<column name="_LOGINNAME" type="java.sql.Types.NVARCHAR(255)" remarks="登录名">
<column name="LOGINNAME_" type="java.sql.Types.NVARCHAR(255)" remarks="登录名">
<constraints unique="true" nullable="false" />
</column>
<column name="_USERNAME" type="java.sql.Types.NVARCHAR(255)" remarks="用户名"></column>
<column name="_PASSWORD" type="java.sql.Types.NVARCHAR(255)" remarks="登录密码"></column>
<column name="_DESCRIPTION" type="java.sql.Types.NVARCHAR(255)" remarks="描述"></column>
<column name="_ENABLE" type="java.sql.Types.SMALLINT" remarks="是否可用(0:不可用,1:可用)"></column>
<column name="_IS_ACCOUNT_EXPIRED" type="java.sql.Types.SMALLINT" remarks="账户是否过期(0:没过期,1:过期)"></column>
<column name="_IS_ACCOUNT_LOCKED" type="java.sql.Types.SMALLINT" remarks="账户是否被锁定(0:没被锁定,1:被锁定)"></column>
<column name="_IS_CREDENTIALS_EXPIRED" type="java.sql.Types.SMALLINT" remarks="密码是否过期(0:没过期,1:过期)"></column>
<column name="_DEFAULT_APP_ID" type="java.sql.Types.NVARCHAR(255)" remarks="默认应用ID"></column>
<column name="_DEFAULT_ROLE_ID" type="java.sql.Types.NVARCHAR(36)" remarks="默认角色ID"></column>
<column name="_DEFAULT_ORG_ID" type="java.sql.Types.NVARCHAR(36)" remarks="默认机构ID"></column>
<column name="_EMAIL" type="java.sql.Types.NVARCHAR(255)" remarks="邮箱地址"></column>
<column name="_PHONE" type="java.sql.Types.NVARCHAR(18)" remarks="电话,格式: 区号(3-4位)-座机号(7-8位)-分机号(3-4位)"></column>
<column name="_MOBILE" type="java.sql.Types.NVARCHAR(14)" remarks="手机号码,格式: 国家(3位)-手机号(11位)"></column>
<column name="_WEIXIN" type="java.sql.Types.NVARCHAR(255)" remarks="微信号"></column>
<column name="_QQ" type="java.sql.Types.NVARCHAR(255)" remarks="QQ号"></column>
<column name="_DATA_COME_FROM" type="java.sql.Types.NVARCHAR(10)" remarks="数据来源(INPUT:手工录入,IMPORT:系统自动导入)" defaultValue="INPUT"></column>
<column name="_CREATOR" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="_CREATE_DATE" type="DATETIME" remarks="创建日期"></column>
<column name="_LAST_MODIFIER" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="_LAST_MODIFYDATE" type="DATETIME" remarks="最后修改日期"></column>
<column name="_CORP_CODE" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<column name="USERNAME_" type="java.sql.Types.NVARCHAR(255)" remarks="用户名"></column>
<column name="PASSWORD_" type="java.sql.Types.NVARCHAR(255)" remarks="登录密码"></column>
<column name="DESCRIPTION_" type="java.sql.Types.NVARCHAR(255)" remarks="描述"></column>
<column name="ENABLE_" type="java.sql.Types.SMALLINT" remarks="是否可用(0:不可用,1:可用)"></column>
<column name="IS_ACCOUNT_EXPIRED_" type="java.sql.Types.SMALLINT" remarks="账户是否过期(0:没过期,1:过期)"></column>
<column name="IS_ACCOUNT_LOCKED_" type="java.sql.Types.SMALLINT" remarks="账户是否被锁定(0:没被锁定,1:被锁定)"></column>
<column name="IS_CREDENTIALS_EXPIRED_" type="java.sql.Types.SMALLINT" remarks="密码是否过期(0:没过期,1:过期)"></column>
<column name="DEFAULT_APP_ID_" type="java.sql.Types.NVARCHAR(255)" remarks="默认应用ID"></column>
<column name="DEFAULT_ROLE_ID_" type="java.sql.Types.NVARCHAR(36)" remarks="默认角色ID"></column>
<column name="DEFAULT_ORG_ID_" type="java.sql.Types.NVARCHAR(36)" remarks="默认机构ID"></column>
<column name="EMAIL_" type="java.sql.Types.NVARCHAR(255)" remarks="邮箱地址"></column>
<column name="PHONE_" type="java.sql.Types.NVARCHAR(18)" remarks="电话,格式: 区号(3-4位)-座机号(7-8位)-分机号(3-4位)"></column>
<column name="MOBILE_" type="java.sql.Types.NVARCHAR(14)" remarks="手机号码,格式: 国家(3位)-手机号(11位)"></column>
<column name="WEIXIN_" type="java.sql.Types.NVARCHAR(255)" remarks="微信号"></column>
<column name="QQ_" type="java.sql.Types.NVARCHAR(255)" remarks="QQ号"></column>
<column name="DATA_COME_FROM_" type="java.sql.Types.NVARCHAR(10)" remarks="数据来源(INPUT:手工录入,IMPORT:系统自动导入)" defaultValue="INPUT"></column>
<column name="CREATOR_" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="CREATE_DATE_" type="DATETIME" remarks="创建日期"></column>
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false" />
</column>
</createTable>
<createIndex tableName="SYS_USER" indexName="IDX_SYS_USER_LOGINNAME">
<column name="_LOGINNAME"></column>
</createIndex>
<createIndex tableName="SYS_USER" indexName="IDX_SYS_USER_USERNAME">
<column name="_USERNAME"></column>
<column name="USERNAME_"></column>
</createIndex>
<createIndex tableName="SYS_USER" indexName="IDX_SYS_USER_CORP_CODE">
<column name="_CORP_CODE"></column>
<column name="CORP_CODE_"></column>
</createIndex>
<!-- 角色表 -->
<createTable tableName="SYS_ROLE" remarks="角色表">
<column name="_ID" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<column name="ID_" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<constraints primaryKey="true"/>
</column>
<column name="_CODE" type="java.sql.Types.NVARCHAR(255)" remarks="角色代码">
<column name="CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="角色代码">
<constraints nullable="false" />
</column>
<column name="_NAME" type="java.sql.Types.NVARCHAR(255)" remarks="角色名"></column>
<column name="_ENABLE" type="java.sql.Types.SMALLINT" remarks="是否可用"></column>
<column name="_DESCRIPTION" type="java.sql.Types.NVARCHAR(255)" remarks="描述"></column>
<column name="_INDEX_PAGE_URL" type="java.sql.Types.NVARCHAR(2048)" remarks="首页面URL"></column>
<column name="_HELP_IDS" type="java.sql.Types.CLOB" remarks="帮助文档ID集合字符串(采用json格式存储)"></column>
<column name="_PREFERENCE_IDS" type="java.sql.Types.CLOB" remarks="首选项(系统配置)ID集合字符串(采用json格式存储)"></column>
<column name="_DATA_COME_FROM" type="java.sql.Types.NVARCHAR(10)" remarks="数据来源(INPUT:手工录入,IMPORT:系统自动导入)" defaultValue="INPUT"></column>
<column name="_CREATOR" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="_CREATE_DATE" type="DATETIME" remarks="创建日期"></column>
<column name="_LAST_MODIFIER" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="_LAST_MODIFYDATE" type="DATETIME" remarks="最后修改日期"></column>
<column name="_CORP_CODE" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<column name="NAME_" type="java.sql.Types.NVARCHAR(255)" remarks="角色名"></column>
<column name="ENABLE_" type="java.sql.Types.SMALLINT" remarks="是否可用"></column>
<column name="DESCRIPTION_" type="java.sql.Types.NVARCHAR(255)" remarks="描述"></column>
<column name="INDEX_PAGE_URL_" type="java.sql.Types.NVARCHAR(2000)" remarks="首页面URL"></column>
<column name="HELP_IDS_" type="java.sql.Types.CLOB" remarks="帮助文档ID集合字符串(采用json格式存储)"></column>
<column name="PREFERENCE_IDS_" type="java.sql.Types.CLOB" remarks="首选项(系统配置)ID集合字符串(采用json格式存储)"></column>
<column name="DATA_COME_FROM_" type="java.sql.Types.NVARCHAR(10)" remarks="数据来源(INPUT:手工录入,IMPORT:系统自动导入)" defaultValue="INPUT"></column>
<column name="CREATOR_" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="CREATE_DATE_" type="DATETIME" remarks="创建日期"></column>
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false" />
</column>
</createTable>
<addUniqueConstraint tableName="SYS_ROLE" columnNames="_CODE,_CORP_CODE"></addUniqueConstraint>
<createIndex tableName="SYS_ROLE" indexName="IDX_SYS_ROLE_CODE">
<column name="_CODE"></column>
</createIndex>
<addUniqueConstraint tableName="SYS_ROLE" columnNames="CODE_,CORP_CODE_"></addUniqueConstraint>
<createIndex tableName="SYS_ROLE" indexName="IDX_SYS_ROLE_NAME">
<column name="_NAME"></column>
<column name="NAME_"></column>
</createIndex>
<createIndex tableName="SYS_ROLE" indexName="IDX_SYS_ROLE_CORP_CODE">
<column name="_CORP_CODE"></column>
<column name="CORP_CODE_"></column>
</createIndex>
<!-- 机构表 -->
<createTable tableName="SYS_ORG" remarks="机构表">
<column name="_ID" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<column name="ID_" type="java.sql.Types.NVARCHAR(36)" remarks="ID">
<constraints primaryKey="true"/>
</column>
<column name="_CODE" type="java.sql.Types.NVARCHAR(255)" remarks="机构代码">
<column name="CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="机构代码">
<constraints nullable="false" />
</column>
<column name="_NAME" type="java.sql.Types.NVARCHAR(255)" remarks="机构名称"></column>
<column name="_ENABLE" type="java.sql.Types.SMALLINT" remarks="是否可用"></column>
<column name="_DESCRIPTION" type="java.sql.Types.NVARCHAR(255)" remarks="描述"></column>
<column name="_IS_DEPARTMENT" type="java.sql.Types.SMALLINT" remarks="是否是部门"></column>
<column name="_PARENT_ID" type="java.sql.Types.NVARCHAR(255)" remarks="父机构ID"></column>
<column name="_DATA_COME_FROM" type="java.sql.Types.NVARCHAR(10)" remarks="数据来源(INPUT:手工录入,IMPORT:系统自动导入)" defaultValue="INPUT"></column>
<column name="_CREATOR" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="_CREATE_DATE" type="DATETIME" remarks="创建日期"></column>
<column name="_LAST_MODIFIER" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="_LAST_MODIFYDATE" type="DATETIME" remarks="最后修改日期"></column>
<column name="_CORP_CODE" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<column name="NAME_" type="java.sql.Types.NVARCHAR(255)" remarks="机构名称"></column>
<column name="ENABLE_" type="java.sql.Types.SMALLINT" remarks="是否可用"></column>
<column name="DESCRIPTION_" type="java.sql.Types.NVARCHAR(255)" remarks="描述"></column>
<column name="IS_DEPARTMENT_" type="java.sql.Types.SMALLINT" remarks="是否是部门"></column>
<column name="PARENT_ID_" type="java.sql.Types.NVARCHAR(255)" remarks="父机构ID"></column>
<column name="DATA_COME_FROM_" type="java.sql.Types.NVARCHAR(10)" remarks="数据来源(INPUT:手工录入,IMPORT:系统自动导入)" defaultValue="INPUT"></column>
<column name="CREATOR_" type="java.sql.Types.NVARCHAR(255)" remarks="创建人"></column>
<column name="CREATE_DATE_" type="DATETIME" remarks="创建日期"></column>
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false" />
</column>
</createTable>
<addUniqueConstraint tableName="SYS_ORG" columnNames="_CODE,_CORP_CODE"></addUniqueConstraint>
<createIndex tableName="SYS_ORG" indexName="IDX_SYS_ORG_CODE">
<column name="_CODE"></column>
</createIndex>
<addUniqueConstraint tableName="SYS_ORG" columnNames="CODE_,CORP_CODE_"></addUniqueConstraint>
<createIndex tableName="SYS_ORG" indexName="IDX_SYS_ORG_NAME">
<column name="_NAME"></column>
<column name="NAME_"></column>
</createIndex>
<createIndex tableName="SYS_ORG" indexName="IDX_SYS_ORG_CORP_CODE">
<column name="_CORP_CODE"></column>
<column name="CORP_CODE_"></column>
</createIndex>
<!-- 当父机构被删除,其所有子机构也被删除 -->
<addForeignKeyConstraint
constraintName="FK_ORG_PARENT_AND_CHILDREN"
baseTableName="SYS_ORG"
baseColumnNames="_PARENT_ID"
baseColumnNames="PARENT_ID_"
referencedTableName="SYS_ORG"
referencedColumnNames="_ID" onDelete="CASCADE"/>
referencedColumnNames="ID_" onDelete="CASCADE"/>
<!-- 用户和机构关系表 -->
<createTable tableName="SYS_USER_ORG" remarks="用户和机构关系表">
<column name="_USER_ID" type="java.sql.Types.NVARCHAR(36)" remarks="用户ID"></column>
<column name="_ORG_ID" type="java.sql.Types.NVARCHAR(36)" remarks="机构ID"></column>
<column name="USER_ID_" type="java.sql.Types.NVARCHAR(36)" remarks="用户ID"></column>
<column name="ORG_ID_" type="java.sql.Types.NVARCHAR(36)" remarks="机构ID"></column>
</createTable>
<createIndex tableName="SYS_USER_ORG" indexName="IDX_SYS_USER_ORG_USER_ID">
<column name="_USER_ID"></column>
<column name="USER_ID_"></column>
</createIndex>
<createIndex tableName="SYS_USER_ORG" indexName="IDX_SYS_USER_ORG_ORG_ID">
<column name="_ORG_ID"></column>
<column name="ORG_ID_"></column>
</createIndex>
<!-- 当机构被删除,用户和机构的关系也必须被删除 -->
<addForeignKeyConstraint
constraintName="FKC_USER_ORG_ORG_ID"
baseTableName="SYS_USER_ORG"
baseColumnNames="_ORG_ID"
baseColumnNames="ORG_ID_"
referencedTableName="SYS_ORG"
referencedColumnNames="_ID" onDelete="CASCADE"/>
referencedColumnNames="ID_" onDelete="CASCADE"/>
<!-- 当用户被删除,用户和机构的关系也必须被删除 -->
<addForeignKeyConstraint
constraintName="FKC_USER_ORG_USER_ID"
baseTableName="SYS_USER_ORG"
baseColumnNames="_USER_ID"
baseColumnNames="USER_ID_"
referencedTableName="SYS_USER"
referencedColumnNames="_ID" onDelete="CASCADE"/>
referencedColumnNames="ID_" onDelete="CASCADE"/>
<!-- 用户和角色关系表 -->
<createTable tableName="SYS_USER_ROLE" remarks="用户和角色关系表">
<column name="_USER_ID" type="java.sql.Types.NVARCHAR(36)" remarks="用户ID"></column>
<column name="_ROLE_ID" type="java.sql.Types.NVARCHAR(36)" remarks="角色ID"></column>
<column name="USER_ID_" type="java.sql.Types.NVARCHAR(36)" remarks="用户ID"></column>
<column name="ROLE_ID_" type="java.sql.Types.NVARCHAR(36)" remarks="角色ID"></column>
</createTable>
<createIndex tableName="SYS_USER_ROLE" indexName="IDX_SYS_USER_ROLE_USER_ID">
<column name="_USER_ID"></column>
<column name="USER_ID_"></column>
</createIndex>
<createIndex tableName="SYS_USER_ROLE" indexName="IDX_SYS_USER_ROLE_ROLE_ID">
<column name="_ROLE_ID"></column>
<column name="ROLE_ID_"></column>
</createIndex>
<!-- 当角色被删除,用户和角色关系也被删除 -->
<addForeignKeyConstraint
constraintName="FKC_USER_ROLE_ROLE_ID"
baseTableName="SYS_USER_ROLE"
baseColumnNames="_ROLE_ID"
baseColumnNames="ROLE_ID_"
referencedTableName="SYS_ROLE"
referencedColumnNames="_ID" onDelete="CASCADE"/>
referencedColumnNames="ID_" onDelete="CASCADE"/>
<!-- 当用户被删除,用户和角色关系也被删除 -->
<addForeignKeyConstraint
constraintName="FKC_USER_ROLE_USER_ID"
baseTableName="SYS_USER_ROLE"
baseColumnNames="_USER_ID"
baseColumnNames="USER_ID_"
referencedTableName="SYS_USER"
referencedColumnNames="_ID" onDelete="CASCADE"/>
referencedColumnNames="ID_" onDelete="CASCADE"/>
</changeSet>
</databaseChangeLog>

44
io.sc.platform.system.api/src/main/java/io/sc/platform/system/api/announcement/AnnouncementVo.java

@ -0,0 +1,44 @@
package io.sc.platform.system.api.announcement;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.sc.platform.orm.api.vo.AuditorVo;
@JsonPropertyOrder({
"id",
"title",
"content",
"creator",
"createDate",
"lastModifier",
"lastModifyDate"
})
public class AnnouncementVo extends AuditorVo {
private String id;
private String title;
private String content;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}

8
io.sc.platform.system.api/src/main/java/io/sc/platform/system/api/menu/MenuVo.java

@ -12,6 +12,7 @@ public abstract class MenuVo extends CorporationAuditorVo {
protected Boolean enable;
protected Integer order;
protected String authorizeExpression;
protected boolean selected;
public String getType() {
return type;
@ -85,4 +86,11 @@ public abstract class MenuVo extends CorporationAuditorVo {
this.authorizeExpression = authorizeExpression;
}
public boolean isSelected() {
return selected;
}
public void setSelected(boolean selected) {
this.selected = selected;
}
}

10
io.sc.platform.system.api/src/main/java/io/sc/platform/system/api/org/OrgVo.java

@ -17,6 +17,8 @@ public class OrgVo extends CorporationAuditorVo {
//父组织ID
private String parentId;
private boolean selected;
public String getId() {
return id;
}
@ -72,4 +74,12 @@ public class OrgVo extends CorporationAuditorVo {
public void setParentId(String parentId) {
this.parentId = parentId;
}
public boolean isSelected() {
return selected;
}
public void setSelected(boolean selected) {
this.selected = selected;
}
}

4
io.sc.platform.system.api/src/main/java/io/sc/platform/system/api/parameter/Parameter.java

@ -1,4 +0,0 @@
package io.sc.platform.system.api.parameter;
public class Parameter {
}

40
io.sc.platform.system.api/src/main/java/io/sc/platform/system/api/parameter/ParameterVo.java

@ -0,0 +1,40 @@
package io.sc.platform.system.api.parameter;
public class ParameterVo {
private String id;
private String code;
private String value;
private String parentId;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
}

4
io.sc.platform.system.frontend/package.json

@ -1,6 +1,6 @@
{
"name": "io.sc.platform.system.frontend",
"version": "8.1.11",
"version": "8.1.12",
"description": "",
"private": false,
"keywords": [],
@ -77,7 +77,7 @@
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.1.7",
"platform-core": "8.1.27",
"platform-core": "8.1.42",
"quasar": "2.13.0",
"tailwindcss": "3.3.5",
"vue": "3.3.7",

8
io.sc.platform.system.frontend/public/index.html

@ -6,10 +6,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- luckysheet css -->
<link rel='stylesheet' href='/webjars/luckysheet/2.1.13/plugins/css/pluginsCss.css' th:href="@{/webjars/luckysheet/2.1.13/plugins/css/pluginsCss.css}"/>
<link rel='stylesheet' href='/webjars/luckysheet/2.1.13/plugins/plugins.css' th:href="@{/webjars/luckysheet/2.1.13/plugins/plugins.css}"/>
<link rel='stylesheet' href='/webjars/luckysheet/2.1.13/css/luckysheet.css' th:href="@{/webjars/luckysheet/2.1.13/css/luckysheet.css}"/>
<link rel='stylesheet' href='/webjars/luckysheet/2.1.13/assets/iconfont/iconfont.css' th:href="@{/webjars/luckysheet/2.1.13/assets/iconfont/iconfont.css}"/>
<link rel="stylesheet" href="/webjars/luckysheet/2.1.13/plugins/css/pluginsCss.css" th:href="@{/webjars/luckysheet/2.1.13/plugins/css/pluginsCss.css}"/>
<link rel="stylesheet" href="/webjars/luckysheet/2.1.13/plugins/plugins.css" th:href="@{/webjars/luckysheet/2.1.13/plugins/plugins.css}"/>
<link rel="stylesheet" href="/webjars/luckysheet/2.1.13/css/luckysheet.css" th:href="@{/webjars/luckysheet/2.1.13/css/luckysheet.css}"/>
<link rel="stylesheet" href="/webjars/luckysheet/2.1.13/assets/iconfont/iconfont.css" th:href="@{/webjars/luckysheet/2.1.13/assets/iconfont/iconfont.css}"/>
<!-- luckysheet js -->
<script src="/webjars/luckysheet/2.1.13/plugins/js/plugin.js" th:src="@{/webjars/luckysheet/2.1.13/plugins/js/plugin.js}"></script>

20
io.sc.platform.system.frontend/src/components/index.ts

@ -2,17 +2,17 @@
* ,
*/
import Corporation from '@/views/Corporation.vue';
import User from '@/views/User.vue';
import Role from '@/views/Role.vue';
import Org from '@/views/Org.vue';
import Corporation from '@/views/corporation/Corporation.vue';
import User from '@/views/user/User.vue';
import Role from '@/views/role/Role.vue';
import Org from '@/views/org/Org.vue';
import Department from '@/views/Department.vue';
import Menu from '@/views/Menu.vue';
import AnnouncementManager from '@/views/AnnouncementManager.vue';
import Menu from '@/views/menu/Menu.vue';
import announcement from '@/views/announcement/Announcement.vue';
import NotificationManager from '@/views/NotificationManager.vue';
import Parameter from '@/views/Parameter.vue';
import Dictionary from '@/views/Dictionary.vue';
import I18n from '@/views/I18n.vue';
import Parameter from '@/views/parameter/Parameter.vue';
import Dictionary from '@/views/dictionary/Dictionary.vue';
import I18n from '@/views/i18n/I18n.vue';
import AuditLog from '@/views/monitor/AuditLog.vue';
import Log from '@/views/monitor/Log.vue';
import Resources from '@/views/monitor/Resources.vue';
@ -25,7 +25,7 @@ const localComponents = {
'component.system.Org': Org,
'component.system.Department': Department,
'component.system.Menu': Menu,
'component.system.AnnouncementManager': AnnouncementManager,
'component.system.announcement': announcement,
'component.system.NotificationManager': NotificationManager,
'component.system.Parameter': Parameter,
'component.system.Dictionary': Dictionary,

31
io.sc.platform.system.frontend/src/i18n/messages.json

@ -6,7 +6,7 @@
"menu.system.org" : "Organization",
"menu.system.department" : "Department",
"menu.system.menu" : "Menu",
"menu.system.announcementManager" : "Announcement",
"menu.system.announcement" : "Announcement",
"menu.system.notificationManager" : "Notification",
"menu.system.parameter" : "Parameter",
"menu.system.dictionary" : "Dictionary",
@ -19,13 +19,38 @@
"system.user.gridTitle":"User List",
"system.role.gridTitle":"Role List",
"system.org.gridTitle":"Org Tree",
"system.announcement.gridTitle":"Announcement List",
"system.monitor.auditlog.gridTitle":"Audit Log List",
"system.user.action.addUser":"Add User",
"system.user.action.addAllUser":"Add All User",
"system.user.action.removeUser":"Remove User",
"system.user.action.removeAllUser":"Remove All User",
"system.user.action.setPassword":"Set Password",
"system.role.action.addRole":"Add Role",
"system.role.action.addAllRole":"Add All Role",
"system.role.action.removeRole":"Remove Role",
"system.role.action.removeAllRole":"Remove All Role",
"system.org.gridTitle":"Org Tree",
"system.menu.action.addTop":"Add Top Menu",
"system.menu.action.addChild":"Add Child Menu",
"system.corporation.action.addTop":"Add Top Corporation",
"system.corporation.action.addChild":"Add Child Corporation",
"system.monitor.log.tab.view":"Log View",
"system.monitor.log.tab.download":"Log Download",
"system.monitor.log.tab.level":"Log Level",
"accountExpired": "Expired",
"accountLocked": "Locked",
"credentialsExpired": "Credentials Expired"
"credentialsExpired": "Credentials Expired",
"parameter.system":"System",
"parameter.system.homePage":"Home Page"
}

29
io.sc.platform.system.frontend/src/i18n/messages_tw_CN.json

@ -6,7 +6,7 @@
"menu.system.org" : "機構管理",
"menu.system.department" : "部門管理",
"menu.system.menu" : "菜單管理",
"menu.system.announcementManager" : "公告管理",
"menu.system.announcement" : "公告管理",
"menu.system.notificationManager" : "消息管理",
"menu.system.parameter" : "參數管理",
"menu.system.dictionary" : "數據字典",
@ -19,12 +19,35 @@
"system.user.gridTitle":"用戶列表",
"system.role.gridTitle":"角色列表",
"system.org.gridTitle":"機構樹",
"system.announcement.gridTitle":"公告列表",
"system.monitor.auditlog.gridTitle":"審計日誌列表",
"system.user.action.addUser":"添加用户",
"system.user.action.addAllUser":"添加所有用户",
"system.user.action.removeUser":"移除用户",
"system.user.action.removeAllUser":"移除所有用户",
"system.user.action.setPassword":"修改密碼",
"system.role.action.addRole":"添加角色",
"system.role.action.addAllRole":"添加所有角色",
"system.role.action.removeRole":"移除角色",
"system.role.action.removeAllRole":"移除所有角色",
"system.org.gridTitle":"機構樹",
"system.menu.action.addTop":"新增頂級菜單",
"system.menu.action.addChild":"新增子菜單",
"system.corporation.action.addTop":"新增頂級法人",
"system.corporation.action.addChild":"新增子法人",
"system.monitor.log.tab.view":"日誌查看",
"system.monitor.log.tab.download":"日誌下載",
"system.monitor.log.tab.level":"日誌級別",
"accountExpired": "是否過期",
"accountLocked": "是否鎖定",
"credentialsExpired": "是否密碼過期"
"credentialsExpired": "是否密碼過期",
"parameter.system":"系統",
"parameter.system.homePage":"首頁"
}

30
io.sc.platform.system.frontend/src/i18n/messages_zh_CN.json

@ -6,7 +6,7 @@
"menu.system.org" : "机构管理",
"menu.system.department" : "部门管理",
"menu.system.menu" : "菜单管理",
"menu.system.announcementManager" : "公告管理",
"menu.system.announcement" : "公告管理",
"menu.system.notificationManager" : "消息管理",
"menu.system.parameter" : "参数管理",
"menu.system.dictionary" : "数据字典",
@ -19,12 +19,36 @@
"system.user.gridTitle":"用户列表",
"system.role.gridTitle":"角色列表",
"system.org.gridTitle":"机构树",
"system.announcement.gridTitle":"公告列表",
"system.monitor.auditlog.gridTitle":"审计日志列表",
"system.user.action.addUser":"添加用户",
"system.user.action.addAllUser":"添加所有用户",
"system.user.action.removeUser":"移除用户",
"system.user.action.removeAllUser":"移除所有用户",
"system.user.action.setPassword":"修改密码",
"system.role.action.addRole":"添加角色",
"system.role.action.addAllRole":"添加所有角色",
"system.role.action.removeRole":"移除角色",
"system.role.action.removeAllRole":"移除所有角色",
"system.org.gridTitle":"机构树",
"system.menu.action.addTop":"新增顶级菜单",
"system.menu.action.addChild":"新增子菜单",
"system.corporation.action.addTop":"新增顶级法人",
"system.corporation.action.addChild":"新增子法人",
"system.monitor.log.tab.view":"日志查看",
"system.monitor.log.tab.download":"日志下载",
"system.monitor.log.tab.level":"日志级别",
"accountExpired": "是否过期",
"accountLocked": "是否锁定",
"credentialsExpired": "是否密码过期"
"credentialsExpired": "是否密码过期",
"parameter.system":"系统",
"parameter.system.homePage":"首页"
}

2
io.sc.platform.system.frontend/src/menus/menus.json

@ -35,7 +35,7 @@
/*/*/
{"type":"SEPERATOR", "order":900, "parentId":"menu.system"},
/*/*/
{"type":"ROUTE", "order":1000, "parentId":"menu.system", "id":"menu.system.announcementManager", "titleI18nKey":"menu.system.announcementManager", "icon":"bi-megaphone", "routeName":"route.system.announcementManager"},
{"type":"ROUTE", "order":1000, "parentId":"menu.system", "id":"menu.system.announcementManager", "titleI18nKey":"menu.system.announcement", "icon":"bi-megaphone", "routeName":"route.system.announcement"},
/*/*/
{"type":"ROUTE", "order":1100, "parentId":"menu.system", "id":"menu.system.notificationManager", "titleI18nKey":"menu.system.notificationManager", "icon":"bi-chat-dots", "routeName":"route.system.notificationManager"},
/*/*/

26
io.sc.platform.system.frontend/src/routes/routes.json

@ -6,7 +6,7 @@
"priority": 0,
"module": "io.sc.platform.system.frontend",
"component": "component.system.Corporation",
"componentPath":"@/views/Corporation.vue",
"componentPath":"@/views/corporation/Corporation.vue",
"redirect": null,
"meta": {
"permissions": [
@ -21,7 +21,7 @@
"priority": 0,
"module": "io.sc.platform.system.frontend",
"component": "component.system.User",
"componentPath":"@/views/User.vue",
"componentPath":"@/views/user/User.vue",
"redirect": null,
"meta": {
"permissions": [
@ -36,7 +36,7 @@
"priority": 0,
"module": "io.sc.platform.system.frontend",
"component": "component.system.Role",
"componentPath":"@/views/Role.vue",
"componentPath":"@/views/role/Role.vue",
"redirect": null,
"meta": {
"permissions": [
@ -51,7 +51,7 @@
"priority": 0,
"module": "io.sc.platform.system.frontend",
"component": "component.system.Org",
"componentPath":"@/views/Org.vue",
"componentPath":"@/views/org/Org.vue",
"redirect": null,
"meta": {
"permissions": [
@ -81,7 +81,7 @@
"priority": 0,
"module": "io.sc.platform.system.frontend",
"component": "component.system.Menu",
"componentPath":"@/views/Menu.vue",
"componentPath":"@/views/menu/Menu.vue",
"redirect": null,
"meta": {
"permissions": [
@ -90,17 +90,17 @@
}
},
{
"name": "route.system.announcementManager",
"path": "system/announcementManager",
"name": "route.system.announcement",
"path": "system/announcement",
"parent": "/",
"priority": 0,
"module": "io.sc.platform.system.frontend",
"component": "component.system.AnnouncementManager",
"componentPath":"@/views/AnnouncementManager.vue",
"component": "component.system.announcement",
"componentPath":"@/views/announcement/Announcement.vue",
"redirect": null,
"meta": {
"permissions": [
"/system/announcementManager/**/*"
"/system/announcement/**/*"
]
}
},
@ -126,7 +126,7 @@
"priority": 0,
"module": "io.sc.platform.system.frontend",
"component": "component.system.Parameter",
"componentPath":"@/views/Parameter.vue",
"componentPath":"@/views/parameter/Parameter.vue",
"redirect": null,
"meta": {
"permissions": [
@ -141,7 +141,7 @@
"priority": 0,
"module": "io.sc.platform.system.frontend",
"component": "component.system.Dictionary",
"componentPath":"@/views/Dictionary.vue",
"componentPath":"@/views/dictionary/Dictionary.vue",
"redirect": null,
"meta": {
"permissions": [
@ -156,7 +156,7 @@
"priority": 0,
"module": "io.sc.platform.system.frontend",
"component": "component.system.I18n",
"componentPath":"@/views/I18n.vue",
"componentPath":"@/views/i18n/I18n.vue",
"redirect": null,
"meta": {
"permissions": [

4
io.sc.platform.system.frontend/src/views/Corporation.vue

@ -1,4 +0,0 @@
<template>
<div>Corporation</div>
</template>
<script setup lang="ts"></script>

4
io.sc.platform.system.frontend/src/views/Dictionary.vue

@ -1,4 +0,0 @@
<template>
<div>Dictionary</div>
</template>
<script setup lang="ts"></script>

4
io.sc.platform.system.frontend/src/views/Parameter.vue

@ -1,4 +0,0 @@
<template>
<div>Parameter</div>
</template>
<script setup lang="ts"></script>

70
io.sc.platform.system.frontend/src/views/announcement/Announcement.vue

@ -0,0 +1,70 @@
<template>
<div>
<platform-grid
ref="announcementGridRef"
:table-props="{ borderded: false, flat: true }"
:query-form-cols-number="announcementConfigure.queryFormColsNumber"
:query-form-cols-auto="announcementConfigure.queryFormColsAuto"
:table-title="announcementConfigure.tableTitle"
:table-row-key="announcementConfigure.tableRowKey"
:table-init-load-data="announcementConfigure.tableInitLoadData"
:table-data-url="announcementConfigure.tableDataUrl"
:table-show-sort-no="false"
:table-columns="announcementConfigure.tableColumns"
:table-left-column-sticky-number="announcementConfigure.tableLeftColumnStickyNumber"
:table-buttons="announcementConfigure.tableButtons"
:query-form-fields="announcementConfigure.queryFormFields"
:table-pagination="announcementConfigure.tablePagination"
:add-form-props="announcementConfigure.addFormProps"
:table-dense="false"
@row-click="announcementConfigure.rowClickFun"
>
</platform-grid>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { Environment, axios } from 'platform-core';
const { t } = useI18n();
const announcementConfigure = {
queryFormColsNumber: 4,
queryFormColsAuto: false,
hideBottom: false,
tableInitLoadData: true,
tableLeftColumnStickyNumber: 0,
tableTitle: t('system.announcement.gridTitle'),
tableRowKey: 'id',
tableDataUrl: Environment.apiContextPath('/api/system/announcement'),
tablePagination: {
sortBy: 'lastModifyDate',
descending: true,
reqPageStart: 0,
rowsPerPage: 10,
},
queryFormFields: [
{ width: 100, name: 'title', label: t('title') },
{ width: 110, name: 'lastModifier', label: t('lastModifier') },
{ width: 115, name: 'lastModifyDate', label: t('lastModifyDate') },
],
tableButtons: ['add', 'edit', 'delete', 'separator', 'view', 'inFullscreen'],
tableColumns: [
{ width: 100, name: 'title', label: t('title') },
{ width: 100, name: 'content', label: t('content') },
{ width: 110, name: 'lastModifier', label: t('lastModifier') },
{ width: 115, name: 'lastModifyDate', label: t('lastModifyDate') },
],
addFormProps: {
dialogInitWidth: '50%',
dialogInitHeight: '90%',
formColsNumber: 1,
formColsAuto: false,
formFields: [
{ modelName: 'title', label: t('title'), type: 'text', required: true },
{ modelName: 'content', label: t('content'), type: 'textarea', required: true },
],
},
};
</script>

51
io.sc.platform.system.frontend/src/views/corporation/Corporation.vue

@ -0,0 +1,51 @@
<template>
<div>
<w-tree-grid ref="corporationTreeGridRef" title="法人树" label-key="name" :actions="corporationConfigure.actions" />
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { useI18n } from 'vue-i18n';
import { Environment, axios } from 'platform-core';
const { t } = useI18n();
const corporationTreeGridRef = ref();
const corporationConfigure = {
actions: [
{
name: 'refresh',
label: t('refresh'),
click: () => {},
},
{
name: 'addRoot',
label: t('system.corporation.action.addTop'),
click: () => {},
},
{
name: 'addChild',
label: t('system.corporation.action.addChild'),
click: () => {},
},
{
name: 'edit',
label: t('edit'),
click: () => {},
},
{
name: 'delete',
label: t('delete'),
click: () => {},
},
],
};
onMounted(() => {
axios.get(Environment.apiContextPath('/api/system/corporation?pageable=false&sortBy=name')).then((response) => {
corporationTreeGridRef.value.setNodes(response.data.content);
});
});
</script>

70
io.sc.platform.system.frontend/src/views/dictionary/Dictionary.vue

@ -0,0 +1,70 @@
<template>
<div>
<platform-grid
ref="dictionaryGridRef"
:table-props="{ borderded: false, flat: true }"
:table-title="dictionaryConfigure.tableTitle"
:table-init-load-data="dictionaryConfigure.tableInitLoadData"
:table-row-key="dictionaryConfigure.tableRowKey"
:table-data-url="dictionaryConfigure.tableDataUrl"
:table-columns="dictionaryConfigure.tableColumns"
:table-buttons="dictionaryConfigure.tableButtons"
:add-form-props="dictionaryConfigure.addFormProps"
:table-show-sort-no="false"
:table-dense="true"
:table-row-drag="true"
:table-pagination="dictionaryConfigure.tablePagination"
@row-drag-drop-after="rowDragDropAfter"
>
</platform-grid>
</div>
</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { Environment, axios } from 'platform-core';
const { t } = useI18n();
const dictionaryGridRef = ref();
const dictionaryConfigure = {
tableTitle: '数据字典列表',
tableInitLoadData: true,
tableRowKey: 'id',
tableDataUrl: Environment.apiContextPath('/api/system/dictionary'),
tablePagination: {
sortBy: 'order',
descending: false,
reqPageStart: 0,
rowsPerPage: 0,
},
tableColumns: [
{ name: 'code', label: t('code') },
{ name: 'value', label: t('value') },
{ name: 'value', label: t('displayValue'), format: (value) => t(value) },
{ name: 'order', label: t('order') },
],
tableButtons: ['refresh', 'add', 'edit', 'delete'],
addFormProps: {
dialogInitWidth: '50%',
dialogInitHeight: '90%',
formColsNumber: 1,
formColsAuto: false,
formFields: [
{ modelName: 'code', label: t('code'), type: 'text', required: true },
{ modelName: 'value', label: t('value'), type: 'text', required: true },
{ modelName: 'order', label: t('order'), type: 'text', required: true },
],
},
};
const rowDragDropAfter = () => {
const rows = dictionaryGridRef.value.getRowsFun();
for (let i = 0; i < rows.length; i++) {
rows[i].order = i;
}
axios.post(Environment.apiContextPath('/api/system/dictionary/updateDictionariesOrder'), rows).then(() => {
//dictionaryGridRef.value.refreshTable();
});
};
</script>

70
io.sc.platform.system.frontend/src/views/i18n/I18n.vue

@ -0,0 +1,70 @@
<template>
<div>
<platform-grid
ref="i18nGridRef"
:table-props="{ borderded: false, flat: true }"
:table-title="i18nConfigure.tableTitle"
:table-init-load-data="i18nConfigure.tableInitLoadData"
:table-row-key="i18nConfigure.tableRowKey"
:table-data-url="i18nConfigure.tableDataUrl"
:table-columns="i18nConfigure.tableColumns"
:table-buttons="i18nConfigure.tableButtons"
:add-form-props="i18nConfigure.addFormProps"
:table-show-sort-no="false"
:table-dense="true"
:table-row-drag="true"
:table-pagination="i18nConfigure.tablePagination"
>
</platform-grid>
</div>
</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { Environment, axios } from 'platform-core';
const { t } = useI18n();
const Language = {
en: '英文',
zh_CN: '简体中文',
tw_CN: '繁体中文',
};
const LanguageOptions = [
{ label: '英文', value: 'en' },
{ label: '简体中文', value: 'zh_CN' },
{ label: '繁体中文', value: 'tw_CN' },
];
const i18nGridRef = ref();
const i18nConfigure = {
tableTitle: '多语言消息列表',
tableInitLoadData: true,
tableRowKey: 'id',
tableDataUrl: Environment.apiContextPath('/api/system/i18n'),
tablePagination: {
sortBy: 'code',
descending: false,
reqPageStart: 0,
rowsPerPage: 20,
},
tableColumns: [
{ name: 'code', label: t('code') },
{ name: 'lang', label: t('lang'), format: (value) => Language[value] },
{ name: 'message', label: t('message') },
],
tableButtons: ['refresh', 'add', 'edit', 'delete'],
addFormProps: {
dialogInitWidth: '50%',
dialogInitHeight: '90%',
formColsNumber: 1,
formColsAuto: false,
formFields: [
{ modelName: 'code', label: t('code'), type: 'text', required: true },
{ modelName: 'lang', label: t('lang'), type: 'select', required: true, options: LanguageOptions },
{ modelName: 'message', label: t('message'), type: 'text', required: true },
],
},
};
</script>

248
io.sc.platform.system.frontend/src/views/menu/Menu.vue

@ -0,0 +1,248 @@
<template>
<q-splitter :model-value="70" class="w-full h-full">
<template #before>
<w-tree-grid
ref="menuTreeGridRef"
title="菜单树"
label-key="titleI18nKey"
label-i18n
label-empty="--------------------"
:actions="menuConfigure.actions"
tick-strategy="none"
@update:selected="menuSelected"
/>
</template>
<template #after>
<q-tabs v-model="selectedTabRef" inline-label align="left" :breakpoint="0">
<q-tab name="role" icon="bi-diagram-3" :label="$t('role')" />
<q-tab name="org" icon="bi-people" :label="$t('org')" />
</q-tabs>
<q-tab-panels v-model="selectedTabRef" animated swipeable keep-alive>
<q-tab-panel name="user">
<platform-grid
ref="roleGridRef"
:table-props="{ borderded: false, flat: true }"
:query-form-cols-number="roleConfigure.queryFormColsNumber"
:hide-bottom="roleConfigure.hideBottom"
:query-form-cols-auto="roleConfigure.queryFormColsAuto"
:table-title="roleConfigure.tableTitle"
:table-row-key="roleConfigure.tableRowKey"
:table-init-load-data="roleConfigure.tableInitLoadData"
:table-data-url="roleConfigure.tableDataUrl"
:table-show-sort-no="false"
:table-columns="roleConfigure.tableColumns"
:table-left-column-sticky-number="roleConfigure.tableLeftColumnStickyNumber"
:table-buttons="roleConfigure.tableButtons"
:query-form-fields="roleConfigure.queryFormFields"
:table-pagination="roleConfigure.tablePagination"
table-selection="multiple"
:table-dense="false"
>
</platform-grid>
</q-tab-panel>
<q-tab-panel name="org">
<w-tree-grid
ref="orgTreeGridRef"
title="机构树"
label-key="titleI18nKey"
label-i18n
label-empty="--------------------"
:actions="orgConfigure.actions"
/>
</q-tab-panel>
</q-tab-panels>
</template>
<SelectRoleDialog ref="selectRoleDialog" title="可选角色列表" :maximized="false" width="50%" height="500px"></SelectRoleDialog>
</q-splitter>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { useI18n } from 'vue-i18n';
import { Environment, axios } from 'platform-core';
import SelectRoleDialog from './SelectRoleDialog.vue';
const { t } = useI18n();
const menuTreeGridRef = ref();
const roleGridRef = ref();
const orgTreeGridRef = ref();
const selectRoleDialog = ref();
const selectedTabRef = ref('user');
let selectedMenuId = '';
const roleConfigure = {
queryFormColsNumber: 4,
queryFormColsAuto: false,
queryFormFields: [],
hideBottom: true,
tableInitLoadData: false,
tableLeftColumnStickyNumber: 0,
tableTitle: t('system.role.gridTitle'),
tableRowKey: 'id',
tableDataUrl: '',
tablePagination: {
sortBy: 'lastModifyDate',
descending: true,
reqPageStart: 0,
rowsPerPage: 0,
},
tableButtons: [
'refresh',
'inFullscreen',
{
name: 'addRole',
label: t('system.role.action.addRole'),
icon: '',
enable: () => {},
click: () => {
selectRoleDialog.value.show({ roleGridRef: roleGridRef, menuTreeGridRef: menuTreeGridRef });
},
},
{
name: 'addAllRole',
label: t('system.role.action.addAllRole'),
icon: '',
enable: () => {},
click: () => {
const menuId = menuTreeGridRef.value.getSelected();
axios
.post(Environment.apiContextPath('/api/system/menu/addAllRoles'), {
source: menuId,
sourceParents: menuTreeGridRef.value.getCascadeParentIds(menuId),
sourceChildren: menuTreeGridRef.value.getCascadeChildrenIds(menuId),
targets: [],
})
.then((response) => {
axios.get(Environment.apiContextPath('/api/system/role/queryRolesByMenu?menuId=') + menuId).then((response) => {
roleGridRef.value.replaceRowsFun(response.data.content);
});
});
},
},
{
name: 'removeRole',
label: t('system.role.action.removeRole'),
icon: '',
enable: () => {},
click: () => {
const menuId = menuTreeGridRef.value.getSelected();
const roleIds = [];
for (const role of roleGridRef.value.getSelectedRows()) {
roleIds.push(role.id);
}
axios
.post(Environment.apiContextPath('/api/system/menu/removeRoles'), {
source: menuId,
sourceParents: menuTreeGridRef.value.getCascadeParentIds(menuId),
sourceChildren: menuTreeGridRef.value.getCascadeChildrenIds(menuId),
targets: roleIds,
})
.then((response) => {
axios.get(Environment.apiContextPath('/api/system/role/queryRolesByMenu?menuId=') + menuId).then((response) => {
roleGridRef.value.replaceRowsFun(response.data.content);
});
});
},
},
{
name: 'removeAllRole',
label: t('system.role.action.removeAllRole'),
icon: '',
enable: () => {},
click: () => {
const menuId = menuTreeGridRef.value.getSelected();
axios
.post(Environment.apiContextPath('/api/system/menu/removeAllRoles'), {
source: menuId,
sourceParents: menuTreeGridRef.value.getCascadeParentIds(menuId),
sourceChildren: menuTreeGridRef.value.getCascadeChildrenIds(menuId),
targets: [],
})
.then((response) => {
axios.get(Environment.apiContextPath('/api/system/role/queryRolesByMenu?menuId=') + menuId).then((response) => {
roleGridRef.value.replaceRowsFun(response.data.content);
});
});
},
},
],
tableColumns: [
{ width: 100, name: 'code', label: t('code') },
{ width: 100, name: 'name', label: t('name') },
{ width: 80, name: 'enable', label: t('isEnable'), format: (value) => (value ? t('yes') : t('no')) },
],
};
const menuConfigure = {
actions: [
{
name: 'refresh',
label: t('refresh'),
click: () => {},
},
{
name: 'addRoot',
label: t('system.menu.action.addTop'),
click: () => {},
},
{
name: 'addChild',
label: t('system.menu.action.addChild'),
click: () => {},
},
{
name: 'edit',
label: t('edit'),
click: () => {},
},
{
name: 'delete',
label: t('delete'),
click: () => {},
},
],
};
const orgConfigure = {
actions: [
{
name: 'save',
label: '保存',
click: () => {
const orgId = menuTreeGridRef.value.getSelected()[0];
axios
.post(Environment.apiContextPath('/api/system/menu/updateOrgs'), {
one: orgId,
many: menuTreeGridRef.value.getTicked(),
})
.then((response) => {});
},
},
],
};
const menuSelected = (target) => {
selectedMenuId = target;
if (roleGridRef.value) {
axios.get(Environment.apiContextPath('/api/system/role/queryRolesByMenu?menuId=') + selectedMenuId).then((response) => {
roleGridRef.value.replaceRowsFun(response.data.content);
});
}
// if (orgTreeGridRef.value) {
// axios.get(Environment.apiContextPath('/api/system/org/listAllOrgsWithSelectedStatusByMenu?menuId=') + selectedMenuId).then((response) => {
// orgTreeGridRef.value.setNodes(response.data);
// });
// }
};
onMounted(() => {
axios.get(Environment.apiContextPath('/api/system/menu?pageable=false&sortBy=order')).then((response) => {
menuTreeGridRef.value.setNodes(response.data.content);
});
});
</script>

155
io.sc.platform.system.frontend/src/views/menu/SelectRoleDialog.vue

@ -0,0 +1,155 @@
<template>
<div>
<q-dialog ref="dialogRef" allow-focus-outside v-bind="attrs">
<q-card
:style="{
width: attrs.maximized ? '100vw' : width,
'max-width': '100vw',
height: attrs.maximized ? '100vh' : height,
'max-height': '100vh',
}"
>
<q-card-section :style="headerStyle">
<div class="flex justify-between">
<div class="text-h6">{{ title }}</div>
<div class="flex justify-end q-gutter-md">
<q-btn :label="$t('confirm')" dense color="primary" style="width: 100px" @click="addRoles" />
<q-btn v-close-popup dense flat icon="close" :title="$t('close')"> </q-btn>
</div>
</div>
</q-card-section>
<q-card-section class="q-pt-none" :style="bodyStyle">
<platform-grid
ref="gridRef"
:table-props="{ borderded: false, flat: true }"
:query-form-cols-number="roleConfigure.queryFormColsNumber"
:hide-bottom="roleConfigure.hideBottom"
:query-form-cols-auto="roleConfigure.queryFormColsAuto"
:table-title="roleConfigure.tableTitle"
:table-row-key="roleConfigure.tableRowKey"
:table-init-load-data="roleConfigure.tableInitLoadData"
:table-data-url="roleConfigure.tableDataUrl"
:table-show-sort-no="false"
:table-columns="roleConfigure.tableColumns"
:table-left-column-sticky-number="roleConfigure.tableLeftColumnStickyNumber"
:table-buttons="roleConfigure.tableButtons"
:query-form-fields="roleConfigure.queryFormFields"
:table-pagination="roleConfigure.tablePagination"
table-selection="multiple"
:table-dense="false"
>
</platform-grid>
</q-card-section>
</q-card>
</q-dialog>
</div>
</template>
<script setup lang="ts">
import { useAttrs, ref, onMounted, nextTick } from 'vue';
import { useI18n } from 'vue-i18n';
import { axios, Environment } from 'platform-core';
const attrs = useAttrs();
const props = defineProps({
headerStyle: { type: String, default: 'width:100%;padding: 16px 8px 4px 16px' },
bodyStyle: { type: String, default: 'padding: 0px 8px 0px 8px;height:calc(100%)' },
title: { type: String, default: '' },
width: { type: String, default: '70%' },
height: { type: String, default: '70%' },
});
const { t } = useI18n();
const dialogRef = ref();
const gridRef = ref();
let menuTreeGridRef, roleGridRef;
const roleConfigure = {
queryFormColsNumber: 4,
queryFormColsAuto: false,
hideBottom: true,
tableInitLoadData: false,
tableLeftColumnStickyNumber: 0,
tableTitle: '',
tableRowKey: 'id',
tableDataUrl: '',
tablePagination: {
sortBy: 'lastModifyDate',
descending: true,
reqPageStart: 0,
rowsPerPage: 0,
},
tableButtons: ['query', 'refresh'],
queryFormFields: [
{ label: t('code'), modelName: 'code', type: 'text' },
{ label: t('name'), modelName: 'name', type: 'text' },
{
label: t('enable'),
modelName: 'enable',
type: 'select',
options: [
{ value: true, label: '是' },
{ value: false, label: '否' },
],
},
{
label: t('dataComeFrom'),
modelName: 'dataComeFrom',
type: 'select',
options: [
{ value: 'MANUAL', label: t('io.sc.platform.orm.api.enums.DataComeFrom.MANUAL') },
{ value: 'AUTO', label: t('io.sc.platform.orm.api.enums.DataComeFrom.AUTO') },
],
},
],
tableColumns: [
{ width: 100, name: 'code', label: t('code') },
{ width: 100, name: 'name', label: t('name') },
{ width: 80, name: 'enable', label: t('isEnable'), format: (value) => (value ? t('yes') : t('no')) },
],
};
const addRoles = () => {
const menuId = menuTreeGridRef.value.getSelected();
const roleIds = [];
for (const role of gridRef.value.getSelectedRows()) {
roleIds.push(role.id);
}
axios
.post(Environment.apiContextPath('/api/system/menu/addRoles'), {
source: menuId,
sourceParents: menuTreeGridRef.value.getCascadeParentIds(menuId),
sourceChildren: menuTreeGridRef.value.getCascadeChildrenIds(menuId),
targets: roleIds,
})
.then((response) => {
axios.get(Environment.apiContextPath('/api/system/role/queryRolesByMenu?menuId=') + menuId).then((response) => {
roleGridRef.value.replaceRowsFun(response.data.content);
});
dialogRef.value.hide();
});
};
const show = (param: object) => {
menuTreeGridRef = param.menuTreeGridRef;
roleGridRef = param.roleGridRef;
const currentMenuId = menuTreeGridRef.value.getSelected()[0];
dialogRef.value.show();
nextTick(() => {
axios.get(Environment.apiContextPath('/api/system/role/queryOtherRolesByMenu?menuId=') + currentMenuId).then((response) => {
gridRef.value.replaceRowsFun(response.data.content);
});
});
};
const hide = () => {
dialogRef.value.hide();
};
defineExpose({
show,
hide,
});
</script>

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

Loading…
Cancel
Save