Procházet zdrojové kódy

master-data-log-基础架构

sucheng před 6 měsíci
revize
cfd1560f30
39 změnil soubory, kde provedl 84816 přidání a 0 odebrání
  1. 69 0
      .idea/compiler.xml
  2. 19 0
      .idea/dataSources.local.xml
  3. 17 0
      .idea/dataSources.xml
  4. 80605 0
      .idea/dataSources/5c81b7da-7ff5-4e04-9e48-dfd072cf8334.xml
  5. 43 0
      .idea/encodings.xml
  6. 55 0
      .idea/jarRepositories.xml
  7. 12 0
      .idea/misc.xml
  8. 37 0
      .idea/mybatisx/templates.xml
  9. 124 0
      .idea/uiDesigner.xml
  10. 7 0
      .idea/vcs.xml
  11. 360 0
      .idea/workspace.xml
  12. 86 0
      bs-common/pom.xml
  13. 177 0
      bs-common/src/main/java/com/rongwei/safecommon/config/BsMetaObjectHandler.java
  14. 78 0
      bs-common/src/main/java/com/rongwei/safecommon/config/CustomCellWriteWidthConfig.java
  15. 27 0
      bs-common/src/main/java/com/rongwei/safecommon/config/CxCommonRunnerImpl.java
  16. 159 0
      bs-common/src/main/java/com/rongwei/safecommon/config/MybatisConfig.java
  17. 34 0
      bs-common/src/main/java/com/rongwei/safecommon/config/ThreadPoolConfig.java
  18. 36 0
      bs-common/src/main/java/com/rongwei/safecommon/fegin/CXAdminFeginClient.java
  19. 54 0
      bs-common/src/main/java/com/rongwei/safecommon/fegin/CXAdminFeginClientError.java
  20. 40 0
      bs-common/src/main/java/com/rongwei/safecommon/fegin/CXCommonFeginClient.java
  21. 65 0
      bs-common/src/main/java/com/rongwei/safecommon/fegin/CXHysitx.java
  22. 393 0
      bs-common/src/main/java/com/rongwei/safecommon/utils/CXCommonUtils.java
  23. 212 0
      bs-common/src/main/java/com/rongwei/safecommon/utils/CommonEasyExcelUtils.java
  24. 59 0
      bs-common/src/main/java/com/rongwei/safecommon/utils/ExportExcelByEasyExcel.java
  25. 986 0
      bs-common/src/main/java/com/rongwei/safecommon/utils/SaveConstans.java
  26. 45 0
      bs-common/src/main/java/com/rongwei/safecommon/vo/CommonGenerateExcelVo.java
  27. 29 0
      bs-common/src/main/java/com/rongwei/safecommon/vo/ExportExcelCommonVo.java
  28. 81 0
      master-data/master-data-common/pom.xml
  29. 60 0
      master-data/master-data-common/src/main/java/com/rongwei/bscommon/sys/utils/QRCodeGenerator.java
  30. 360 0
      master-data/master-data-common/src/main/java/com/rongwei/bscommon/sys/utils/StringUtil.java
  31. 44 0
      master-data/master-data-entity/pom.xml
  32. 87 0
      master-data/master-data-server/pom.xml
  33. 23 0
      master-data/master-data-server/src/main/java/com/rongwei/MasterDataServerApplication.java
  34. 13 0
      master-data/master-data-server/src/main/resources/bootstrap-dev.yml
  35. 10 0
      master-data/master-data-server/src/main/resources/bootstrap-pro.yml
  36. 58 0
      master-data/master-data-server/src/main/resources/bootstrap.yml
  37. 52 0
      master-data/master-data-server/src/main/resources/logback-spring.xml
  38. 46 0
      master-data/pom.xml
  39. 154 0
      pom.xml

+ 69 - 0
.idea/compiler.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <annotationProcessing>
+      <profile default="true" name="Default" enabled="true" />
+      <profile name="Maven default annotation processors profile" enabled="true">
+        <sourceOutputDir name="target/generated-sources/annotations" />
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+        <outputRelativeToContentRoot value="true" />
+        <module name="cx-equipment-entity" />
+        <module name="master-data-server" />
+        <module name="cx-file-server" />
+        <module name="cx-equipment-server" />
+        <module name="cx-knowledge-base-common" />
+        <module name="training-server" />
+        <module name="cx-file-entity" />
+        <module name="master-data-entity" />
+        <module name="cx-knowledge-base-server" />
+        <module name="training-common" />
+        <module name="cx-save-check-common" />
+        <module name="cx-file-common" />
+        <module name="cx-question-common" />
+        <module name="master-data-common" />
+        <module name="bs-common" />
+        <module name="cx-save-check-entity" />
+        <module name="cx-question-entity" />
+        <module name="cx-knowledge-base-entity" />
+        <module name="training-entity" />
+        <module name="cx-save-check-server" />
+        <module name="cx-equipment-common" />
+        <module name="cx-question-server" />
+      </profile>
+    </annotationProcessing>
+  </component>
+  <component name="JavacSettings">
+    <option name="ADDITIONAL_OPTIONS_OVERRIDE">
+      <module name="bs-common" options="-parameters" />
+      <module name="cx-equipment" options="-parameters" />
+      <module name="cx-equipment-common" options="-parameters" />
+      <module name="cx-equipment-entity" options="-parameters" />
+      <module name="cx-equipment-server" options="-parameters" />
+      <module name="cx-file" options="-parameters" />
+      <module name="cx-file-common" options="-parameters" />
+      <module name="cx-file-entity" options="-parameters" />
+      <module name="cx-file-server" options="-parameters" />
+      <module name="cx-knowledge-base" options="-parameters" />
+      <module name="cx-knowledge-base-common" options="-parameters" />
+      <module name="cx-knowledge-base-entity" options="-parameters" />
+      <module name="cx-knowledge-base-server" options="-parameters" />
+      <module name="cx-question" options="-parameters" />
+      <module name="cx-question-common" options="-parameters" />
+      <module name="cx-question-entity" options="-parameters" />
+      <module name="cx-question-server" options="-parameters" />
+      <module name="cx-safe-check" options="-parameters" />
+      <module name="cx-save-check-common" options="-parameters" />
+      <module name="cx-save-check-entity" options="-parameters" />
+      <module name="cx-save-check-server" options="-parameters" />
+      <module name="master-data" options="-parameters" />
+      <module name="master-data-common" options="-parameters" />
+      <module name="master-data-core" options="-parameters" />
+      <module name="master-data-entity" options="-parameters" />
+      <module name="master-data-server" options="-parameters" />
+      <module name="rw-training" options="-parameters" />
+      <module name="training-common" options="-parameters" />
+      <module name="training-entity" options="-parameters" />
+      <module name="training-server" options="-parameters" />
+    </option>
+  </component>
+</project>

+ 19 - 0
.idea/dataSources.local.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="dataSourceStorageLocal" created-in="IU-242.23339.11">
+    <data-source name="192.168.0.205" uuid="5c81b7da-7ff5-4e04-9e48-dfd072cf8334">
+      <database-info product="MySQL" version="8.0.34" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-j-8.2.0 (Revision: 06a1f724497fd81c6a659131fda822c9e5085b6c)" dbms="MYSQL" exact-version="8.0.34" exact-driver-version="8.2">
+        <extra-name-characters>#@</extra-name-characters>
+        <identifier-quote-string>`</identifier-quote-string>
+      </database-info>
+      <case-sensitivity plain-identifiers="lower" quoted-identifiers="lower" />
+      <secret-storage>master_key</secret-storage>
+      <user-name>root</user-name>
+      <schema-mapping>
+        <introspection-scope>
+          <node kind="schema" qname="cx_dev" />
+        </introspection-scope>
+      </schema-mapping>
+    </data-source>
+  </component>
+</project>

+ 17 - 0
.idea/dataSources.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
+    <data-source source="LOCAL" name="192.168.0.205" uuid="5c81b7da-7ff5-4e04-9e48-dfd072cf8334">
+      <driver-ref>mysql.8</driver-ref>
+      <synchronize>true</synchronize>
+      <jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
+      <jdbc-url>jdbc:mysql://192.168.0.201:3306/cx_dev</jdbc-url>
+      <jdbc-additional-properties>
+        <property name="com.intellij.clouds.kubernetes.db.host.port" />
+        <property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
+        <property name="com.intellij.clouds.kubernetes.db.container.port" />
+      </jdbc-additional-properties>
+      <working-dir>$ProjectFileDir$</working-dir>
+    </data-source>
+  </component>
+</project>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 80605 - 0
.idea/dataSources/5c81b7da-7ff5-4e04-9e48-dfd072cf8334.xml


+ 43 - 0
.idea/encodings.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="file://$PROJECT_DIR$/bs-common/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-equipment/cx-equipment-common/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-equipment/cx-equipment-entity/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-equipment/cx-equipment-server/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-equipment/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-equipment/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-file/cx-file-common/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-file/cx-file-entity/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-file/cx-file-server/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-file/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-file/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-knowledge-base/cx-knowledge-base-common/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-knowledge-base/cx-knowledge-base-entity/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-knowledge-base/cx-knowledge-base-server/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-knowledge-base/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-knowledge-base/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-question/cx-question-common/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-question/cx-question-entity/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-question/cx-question-server/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-question/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-question/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-safe-check/cx-save-check-common/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-safe-check/cx-save-check-entity/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-safe-check/cx-save-check-server/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-safe-check/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cx-safe-check/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/master-data/master-data-common/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/master-data/master-data-entity/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/master-data/master-data-server/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/master-data/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/master-data/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/rw-training/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/rw-training/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/rw-training/training-common/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/rw-training/training-entity/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/rw-training/training-server/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
+  </component>
+</project>

+ 55 - 0
.idea/jarRepositories.xml

@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RemoteRepositoriesConfiguration">
+    <remote-repository>
+      <option name="id" value="sonatype-nexus-snapshots" />
+      <option name="name" value="Sonatype Nexus Snapshots" />
+      <option name="url" value="https://maven.aliyun.com/repository/public" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="sonatype-nexus-snapshots" />
+      <option name="name" value="Sonatype Nexus Snapshots" />
+      <option name="url" value="https://oss.sonatype.org/content/repositories/snapshots/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Central Repository" />
+      <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="oss" />
+      <option name="name" value="oss" />
+      <option name="url" value="https://maven.aliyun.com/repository/public" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Maven Central repository" />
+      <option name="url" value="https://repo1.maven.org/maven2" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="spring-milestones" />
+      <option name="name" value="Spring Milestones" />
+      <option name="url" value="https://maven.aliyun.com/repository/public" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="jboss.community" />
+      <option name="name" value="JBoss Community repository" />
+      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Central Repository" />
+      <option name="url" value="https://maven.aliyun.com/repository/public" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="oss" />
+      <option name="name" value="oss" />
+      <option name="url" value="https://oss.sonatype.org/content/groups/public" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="spring-milestones" />
+      <option name="name" value="Spring Milestones" />
+      <option name="url" value="https://repo.spring.io/libs-milestone" />
+    </remote-repository>
+  </component>
+</project>

+ 12 - 0
.idea/misc.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/pom.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
+</project>

+ 37 - 0
.idea/mybatisx/templates.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="TemplatesSettings">
+    <option name="templateConfigs">
+      <TemplateContext>
+        <option name="generateConfig">
+          <GenerateConfig>
+            <option name="annotationType" value="MYBATIS_PLUS3" />
+            <option name="basePackage" value="generator" />
+            <option name="basePath" value="src/main/java" />
+            <option name="domainObjectName" value="ApsReportYearAndMonth" />
+            <option name="encoding" value="UTF-8" />
+            <option name="extraTemplateNames">
+              <list>
+                <option value="mapperInterface" />
+                <option value="mapperXml" />
+                <option value="serviceImpl" />
+                <option value="serviceInterface" />
+              </list>
+            </option>
+            <option name="moduleName" value="cx-aps" />
+            <option name="modulePath" value="$PROJECT_DIR$/cx-aps" />
+            <option name="needsComment" value="true" />
+            <option name="relativePackage" value="domain" />
+            <option name="rootClass" value="" />
+            <option name="tableName" value="aps_report_year_and_month" />
+            <option name="targetProject" value="$PROJECT_DIR$" />
+            <option name="templatesName" value="mybatis-plus3" />
+            <option name="useActualColumnAnnotationInject" value="true" />
+            <option name="useLombokPlugin" value="true" />
+          </GenerateConfig>
+        </option>
+        <option name="projectPath" value="$PROJECT_DIR$" />
+      </TemplateContext>
+    </option>
+  </component>
+</project>

+ 124 - 0
.idea/uiDesigner.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
+</project>

+ 7 - 0
.idea/vcs.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 360 - 0
.idea/workspace.xml

@@ -0,0 +1,360 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="AutoImportSettings">
+    <option name="autoReloadType" value="SELECTIVE" />
+  </component>
+  <component name="ChangeListManager">
+    <list default="true" id="d1da832e-fcc3-4c40-8867-cdd5d0766a5c" name="更改" comment="aps-优化开工效率" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_BRANCH_BY_REPOSITORY">
+      <map>
+        <entry key="$PROJECT_DIR$" value="mode-min-unit-sc" />
+      </map>
+    </option>
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
+  <component name="MavenImportPreferences">
+    <option name="generalSettings">
+      <MavenGeneralSettings>
+        <option name="customMavenHome" value="D:\Maven\apache-maven-3.6.1" />
+        <option name="localRepository" value="D:\Maven\localmaven" />
+        <option name="mavenHomeTypeForPersistence" value="CUSTOM" />
+        <option name="userSettingsFile" value="D:\Maven\apache-maven-3.6.1\conf\settings.xml" />
+      </MavenGeneralSettings>
+    </option>
+  </component>
+  <component name="MavenRunner">
+    <option name="skipTests" value="true" />
+  </component>
+  <component name="ProjectColorInfo">{
+  &quot;associatedIndex&quot;: 7
+}</component>
+  <component name="ProjectId" id="2rBoKZ69WnK3i3xUQRbQbszg19m" />
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
+  <component name="ProjectViewState">
+    <option name="showLibraryContents" value="true" />
+  </component>
+  <component name="PropertiesComponent"><![CDATA[{
+  "keyToString": {
+    "Maven.bs-common [clean].executor": "Run",
+    "Maven.bs-common [install].executor": "Run",
+    "Maven.cx-aps [clean].executor": "Run",
+    "Maven.cx-aps [install].executor": "Run",
+    "Maven.master-data [clean].executor": "Run",
+    "Maven.master-data [install].executor": "Run",
+    "Maven.master-data-core [clean].executor": "Run",
+    "Maven.master-data-core [install].executor": "Run",
+    "Maven.safe-produce [clean].executor": "Run",
+    "Maven.safe-produce [install].executor": "Run",
+    "RequestMappingsPanelOrder0": "0",
+    "RequestMappingsPanelOrder1": "1",
+    "RequestMappingsPanelWidth0": "75",
+    "RequestMappingsPanelWidth1": "75",
+    "RunOnceActivity.ShowReadmeOnStart": "true",
+    "Spring Boot.ApsBusinessServerApplication.executor": "Run",
+    "Spring Boot.MasterDataServerApplication.executor": "Debug",
+    "Spring Boot.RwSaveCheckApplication.executor": "Debug",
+    "git-widget-placeholder": "master",
+    "kotlin-language-version-configured": "true",
+    "last_opened_file_path": "D:/java_project/master_data_core",
+    "node.js.detected.package.eslint": "true",
+    "node.js.detected.package.tslint": "true",
+    "node.js.selected.package.eslint": "(autodetect)",
+    "node.js.selected.package.tslint": "(autodetect)",
+    "nodejs_package_manager_path": "npm",
+    "run.configurations.included.in.services": "true",
+    "settings.editor.selected.configurable": "MavenSettings",
+    "vue.rearranger.settings.migration": "true",
+    "应用程序.QRCodeGenerator.executor": "Run"
+  },
+  "keyToStringList": {
+    "DatabaseDriversLRU": [
+      "mysql"
+    ]
+  }
+}]]></component>
+  <component name="ReactorSettings">
+    <option name="notificationShown" value="true" />
+  </component>
+  <component name="RecentsManager">
+    <key name="CopyClassDialog.RECENTS_KEY">
+      <recent name="com.rongwei.bsentity.vo" />
+    </key>
+  </component>
+  <component name="RunDashboard">
+    <option name="configurationTypes">
+      <set>
+        <option value="KtorApplicationConfigurationType" />
+        <option value="MicronautRunConfigurationType" />
+        <option value="QuarkusRunConfigurationType" />
+        <option value="SpringBootApplicationConfigurationType" />
+      </set>
+    </option>
+  </component>
+  <component name="RunManager" selected="Spring Boot.MasterDataServerApplication">
+    <configuration name="QRCodeGenerator" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
+      <option name="MAIN_CLASS_NAME" value="com.rongwei.bscommon.sys.utils.QRCodeGenerator" />
+      <module name="master-data-common" />
+      <extension name="coverage">
+        <pattern>
+          <option name="PATTERN" value="com.rongwei.bscommon.sys.utils.*" />
+          <option name="ENABLED" value="true" />
+        </pattern>
+      </extension>
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
+    <configuration name="MasterDataServerApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
+      <module name="master-data-server" />
+      <option name="SPRING_BOOT_MAIN_CLASS" value="com.rongwei.MasterDataServerApplication" />
+      <extension name="coverage">
+        <pattern>
+          <option name="PATTERN" value="com.rongwei.*" />
+          <option name="ENABLED" value="true" />
+        </pattern>
+      </extension>
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
+    <recent_temporary>
+      <list>
+        <item itemvalue="Spring Boot.MasterDataServerApplication" />
+        <item itemvalue="应用程序.QRCodeGenerator" />
+      </list>
+    </recent_temporary>
+  </component>
+  <component name="SharedIndexes">
+    <attachedChunks>
+      <set>
+        <option value="bundled-jdk-9823dce3aa75-28b599e66164-intellij.indexing.shared.core-IU-242.23339.11" />
+        <option value="bundled-js-predefined-d6986cc7102b-5c90d61e3bab-JavaScript-IU-242.23339.11" />
+      </set>
+    </attachedChunks>
+  </component>
+  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="默认任务">
+      <changelist id="d1da832e-fcc3-4c40-8867-cdd5d0766a5c" name="更改" comment="" />
+      <created>1736041765924</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1736041765924</updated>
+      <workItem from="1736041767126" duration="1897000" />
+      <workItem from="1736126973654" duration="20044000" />
+      <workItem from="1736213741963" duration="22531000" />
+      <workItem from="1736299571053" duration="1462000" />
+      <workItem from="1736301104851" duration="10935000" />
+      <workItem from="1736321410325" duration="926000" />
+      <workItem from="1736324285459" duration="6753000" />
+      <workItem from="1736387638264" duration="17842000" />
+      <workItem from="1736470637651" duration="10413000" />
+      <workItem from="1736732150157" duration="14359000" />
+      <workItem from="1736817005915" duration="2542000" />
+      <workItem from="1736821654318" duration="4406000" />
+    </task>
+    <task id="LOCAL-00001" summary="aps-大屏">
+      <option name="closed" value="true" />
+      <created>1736158411585</created>
+      <option name="number" value="00001" />
+      <option name="presentableId" value="LOCAL-00001" />
+      <option name="project" value="LOCAL" />
+      <updated>1736158411585</updated>
+    </task>
+    <task id="LOCAL-00002" summary="aps-大屏">
+      <option name="closed" value="true" />
+      <created>1736227423080</created>
+      <option name="number" value="00002" />
+      <option name="presentableId" value="LOCAL-00002" />
+      <option name="project" value="LOCAL" />
+      <updated>1736227423080</updated>
+    </task>
+    <task id="LOCAL-00003" summary="aps-大屏">
+      <option name="closed" value="true" />
+      <created>1736233290921</created>
+      <option name="number" value="00003" />
+      <option name="presentableId" value="LOCAL-00003" />
+      <option name="project" value="LOCAL" />
+      <updated>1736233290921</updated>
+    </task>
+    <task id="LOCAL-00004" summary="aps-大屏">
+      <option name="closed" value="true" />
+      <created>1736237041073</created>
+      <option name="number" value="00004" />
+      <option name="presentableId" value="LOCAL-00004" />
+      <option name="project" value="LOCAL" />
+      <updated>1736237041073</updated>
+    </task>
+    <task id="LOCAL-00005" summary="aps-大屏">
+      <option name="closed" value="true" />
+      <created>1736241160987</created>
+      <option name="number" value="00005" />
+      <option name="presentableId" value="LOCAL-00005" />
+      <option name="project" value="LOCAL" />
+      <updated>1736241160987</updated>
+    </task>
+    <task id="LOCAL-00006" summary="aps-更新坯料计划为待排程时增加日志">
+      <option name="closed" value="true" />
+      <created>1736242541503</created>
+      <option name="number" value="00006" />
+      <option name="presentableId" value="LOCAL-00006" />
+      <option name="project" value="LOCAL" />
+      <updated>1736242541503</updated>
+    </task>
+    <task id="LOCAL-00007" summary="aps-更新工序作业生产状态为待排程时增加日志">
+      <option name="closed" value="true" />
+      <created>1736243636773</created>
+      <option name="number" value="00007" />
+      <option name="presentableId" value="LOCAL-00007" />
+      <option name="project" value="LOCAL" />
+      <updated>1736243636773</updated>
+    </task>
+    <task id="LOCAL-00008" summary="aps-逻辑删除作业明细时增加日志">
+      <option name="closed" value="true" />
+      <created>1736244730546</created>
+      <option name="number" value="00008" />
+      <option name="presentableId" value="LOCAL-00008" />
+      <option name="project" value="LOCAL" />
+      <updated>1736244730546</updated>
+    </task>
+    <task id="LOCAL-00009" summary="aps-订单评审合并表单保存和流程事务">
+      <option name="closed" value="true" />
+      <created>1736322062447</created>
+      <option name="number" value="00009" />
+      <option name="presentableId" value="LOCAL-00009" />
+      <option name="project" value="LOCAL" />
+      <updated>1736322062447</updated>
+    </task>
+    <task id="LOCAL-00010" summary="aps-订单评审合并表单保存和流程事务">
+      <option name="closed" value="true" />
+      <created>1736326616848</created>
+      <option name="number" value="00010" />
+      <option name="presentableId" value="LOCAL-00010" />
+      <option name="project" value="LOCAL" />
+      <updated>1736326616848</updated>
+    </task>
+    <task id="LOCAL-00011" summary="aps-订单评审合并表单保存和流程事务">
+      <option name="closed" value="true" />
+      <created>1736328919117</created>
+      <option name="number" value="00011" />
+      <option name="presentableId" value="LOCAL-00011" />
+      <option name="project" value="LOCAL" />
+      <updated>1736328919117</updated>
+    </task>
+    <task id="LOCAL-00012" summary="aps-坯料计划增加冗余字段,和赋值操作">
+      <option name="closed" value="true" />
+      <created>1736389722199</created>
+      <option name="number" value="00012" />
+      <option name="presentableId" value="LOCAL-00012" />
+      <option name="project" value="LOCAL" />
+      <updated>1736389722199</updated>
+    </task>
+    <task id="LOCAL-00013" summary="aps-订单评审增加冗余字段,和赋值操作">
+      <option name="closed" value="true" />
+      <created>1736391171107</created>
+      <option name="number" value="00013" />
+      <option name="presentableId" value="LOCAL-00013" />
+      <option name="project" value="LOCAL" />
+      <updated>1736391171107</updated>
+    </task>
+    <task id="LOCAL-00014" summary="aps-订单评审增加冗余字段,和赋值操作">
+      <option name="closed" value="true" />
+      <created>1736392153829</created>
+      <option name="number" value="00014" />
+      <option name="presentableId" value="LOCAL-00014" />
+      <option name="project" value="LOCAL" />
+      <updated>1736392153829</updated>
+    </task>
+    <task id="LOCAL-00015" summary="aps-订单评审合并表单保存和流程事务">
+      <option name="closed" value="true" />
+      <created>1736421003575</created>
+      <option name="number" value="00015" />
+      <option name="presentableId" value="LOCAL-00015" />
+      <option name="project" value="LOCAL" />
+      <updated>1736421003575</updated>
+    </task>
+    <task id="LOCAL-00016" summary="aps-订单评审合并表单保存和流程事务">
+      <option name="closed" value="true" />
+      <created>1736471212431</created>
+      <option name="number" value="00016" />
+      <option name="presentableId" value="LOCAL-00016" />
+      <option name="project" value="LOCAL" />
+      <updated>1736471212431</updated>
+    </task>
+    <task id="LOCAL-00017" summary="aps-如果坯料计划已发布,则不再校验,优化开工效率">
+      <option name="closed" value="true" />
+      <created>1736749791023</created>
+      <option name="number" value="00017" />
+      <option name="presentableId" value="LOCAL-00017" />
+      <option name="project" value="LOCAL" />
+      <updated>1736749791023</updated>
+    </task>
+    <task id="LOCAL-00018" summary="aps-坯料计划增加冗余字段,和赋值操作">
+      <option name="closed" value="true" />
+      <created>1736751498445</created>
+      <option name="number" value="00018" />
+      <option name="presentableId" value="LOCAL-00018" />
+      <option name="project" value="LOCAL" />
+      <updated>1736751498445</updated>
+    </task>
+    <task id="LOCAL-00019" summary="aps-如果数据库存在此坯料计划 并且 坯料计划的生产状态和数据库的生产状态不一致,提示:该坯料计划状态已被其他人修改,请刷新页面后重新进入">
+      <option name="closed" value="true" />
+      <created>1736751804387</created>
+      <option name="number" value="00019" />
+      <option name="presentableId" value="LOCAL-00019" />
+      <option name="project" value="LOCAL" />
+      <updated>1736751804387</updated>
+    </task>
+    <task id="LOCAL-00020" summary="aps-坯料计划增加冗余字段,和赋值操作">
+      <option name="closed" value="true" />
+      <created>1736753000380</created>
+      <option name="number" value="00020" />
+      <option name="presentableId" value="LOCAL-00020" />
+      <option name="project" value="LOCAL" />
+      <updated>1736753000380</updated>
+    </task>
+    <task id="LOCAL-00021" summary="aps-优化开工效率">
+      <option name="closed" value="true" />
+      <created>1736754612517</created>
+      <option name="number" value="00021" />
+      <option name="presentableId" value="LOCAL-00021" />
+      <option name="project" value="LOCAL" />
+      <updated>1736754612517</updated>
+    </task>
+    <option name="localTasksCounter" value="22" />
+    <servers />
+  </component>
+  <component name="TypeScriptGeneratedFilesManager">
+    <option name="version" value="3" />
+  </component>
+  <component name="Vcs.Log.Tabs.Properties">
+    <option name="TAB_STATES">
+      <map>
+        <entry key="MAIN">
+          <value>
+            <State />
+          </value>
+        </entry>
+      </map>
+    </option>
+  </component>
+  <component name="VcsManagerConfiguration">
+    <MESSAGE value="aps-大屏" />
+    <MESSAGE value="aps-更新坯料计划为待排程时增加日志" />
+    <MESSAGE value="aps-更新工序作业生产状态为待排程时增加日志" />
+    <MESSAGE value="aps-逻辑删除作业明细时增加日志" />
+    <MESSAGE value="aps-订单评审增加冗余字段,和赋值操作" />
+    <MESSAGE value="aps-订单评审合并表单保存和流程事务" />
+    <MESSAGE value="aps-如果坯料计划已发布,则不再校验,优化开工效率" />
+    <MESSAGE value="aps-如果数据库存在此坯料计划 并且 坯料计划的生产状态和数据库的生产状态不一致,提示:该坯料计划状态已被其他人修改,请刷新页面后重新进入" />
+    <MESSAGE value="aps-坯料计划增加冗余字段,和赋值操作" />
+    <MESSAGE value="aps-优化开工效率" />
+    <option name="LAST_COMMIT_MESSAGE" value="aps-优化开工效率" />
+  </component>
+</project>

+ 86 - 0
bs-common/pom.xml

@@ -0,0 +1,86 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>master-data-core</artifactId>
+        <groupId>com.rongwei</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>bs-common</artifactId>
+    <packaging>jar</packaging>
+
+    <name>bs-common</name>
+    <url>http://maven.apache.org</url>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>3.1.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.rongwei</groupId>
+            <artifactId>rw-admin-common</artifactId>
+            <version>1.1-SNAPSHOT</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-io</groupId>
+                    <artifactId>commons-io</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+            <version>3.3.2</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel-core</artifactId>
+            <version>3.3.2</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel-core</artifactId>
+            <version>3.3.2</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>commons-io</groupId>-->
+<!--            <artifactId>commons-io</artifactId>-->
+<!--            <version>2.11.0</version>-->
+<!--        </dependency>-->
+<!--        <dependency>-->
+<!--            <groupId>org.apache.xmlbeans</groupId>-->
+<!--            <artifactId>xmlbeans</artifactId>-->
+<!--            <version>5.1.0</version>-->
+<!--        </dependency>-->
+<!--        <dependency>-->
+<!--            <groupId>org.apache.poi</groupId>-->
+<!--            <artifactId>poi-ooxml</artifactId>-->
+<!--            <version>5.2.0</version>-->
+<!--            <scope>compile</scope>-->
+<!--        </dependency>-->
+<!--        <dependency>-->
+<!--            <groupId>org.apache.poi</groupId>-->
+<!--            <artifactId>poi-ooxml-schemas</artifactId>-->
+<!--            <version>3.17</version>-->
+<!--        </dependency>-->
+    </dependencies>
+</project>

+ 177 - 0
bs-common/src/main/java/com/rongwei/safecommon/config/BsMetaObjectHandler.java

@@ -0,0 +1,177 @@
+package com.rongwei.safecommon.config;
+
+import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
+import com.rongwei.commonservice.service.RedisService;
+import com.rongwei.rwadmincommon.system.domain.SysOrganizationDo;
+import com.rongwei.rwadmincommon.system.vo.SysOrganizationVo;
+import com.rongwei.rwadmincommon.system.vo.SysUserVo;
+import com.rongwei.rwcommon.utils.StringUtils;
+import com.rongwei.safecommon.utils.SaveConstans;
+import org.apache.ibatis.reflection.MetaObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+@Component
+@Primary
+public class BsMetaObjectHandler implements MetaObjectHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(BsMetaObjectHandler.class);
+
+    @Autowired
+    private RedisService redisService;
+
+    @Override
+    public void insertFill(MetaObject metaObject) {
+        try{
+            System.out.println("insert 拦截...");
+            SysUserVo sysUser = null;
+            ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+            if(attributes == null){
+                sysUser = new SysUserVo();
+                sysUser.setId("0");
+                sysUser.setName("系统操作");
+            }else{
+                HttpServletRequest request = attributes.getRequest();
+                if(request == null){
+                    sysUser = new SysUserVo();
+                    sysUser.setId("0");
+                    sysUser.setName("系统操作");
+                }else{
+                    String token = request.getHeader("token");
+                    logger.info("token.... "+token);
+                    if(token == null || "".equals(token)){
+                        sysUser = new SysUserVo();
+                        sysUser.setId("0");
+                        sysUser.setName("系统操作");
+                    }else{
+                        sysUser = redisService.getLoginUser(token);
+                        if(sysUser == null){
+                            logger.info("当前token未查到对应的用户信息");
+                            sysUser = new SysUserVo();
+                        }
+                    }
+                }
+            }
+
+            logger.info("start insert fill ....");
+            Object tenantid = this.getFieldValByName("tenantid", metaObject);
+            if(null == tenantid && sysUser != null){
+                // 所有组织机构
+                List<SysOrganizationDo> orgdos = (List<SysOrganizationDo>)redisService.getRedisCatchObj("allOrgs");
+                // 获取所属工厂
+                List<SysOrganizationVo> organizationDoList = sysUser.getOrganizationDoList();
+                if(organizationDoList != null && organizationDoList.size()>0){
+                    Set<String> tids = new HashSet<>();
+                    for (SysOrganizationVo org : organizationDoList) {
+                        // 当前部门即工厂级部门
+                        if(SaveConstans.ORGTYPE_FACTORY.equals(org.getOrgtype())){
+                            tids.add(org.getId());
+                        }
+                        // 当前部门所有上级部门查找是否有工厂级部门
+                        else{
+                            String fullpid = org.getFullpid();
+                            if(StringUtils.isNotBlank(fullpid)){
+                                String[] fullpids = fullpid.split(",");
+                                for (String pid : fullpids) {
+                                    for (SysOrganizationDo orgdo : orgdos) {
+                                        if(StringUtils.isNotBlank(pid) && pid.equals(orgdo.getId())){
+                                            if(SaveConstans.ORGTYPE_FACTORY.equals(orgdo.getOrgtype())){
+                                                tids.add(org.getId());
+                                            }
+                                            break;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    this.setFieldValByName("tenantid", String.join(",", tids), metaObject);
+                }
+            }
+
+            Date now = new Date();
+
+            Object createDate = this.getFieldValByName("createdate", metaObject);
+            if(null == createDate){
+                /**
+                 * 设置实体属性setter进去的值,优先级要高于自动填充的值。
+                 * 如果实体没有设置该属性,就给默认值,防止entity的setter值被覆盖。
+                 */
+                this.setFieldValByName("createdate", now, metaObject);
+            }
+            Object modifyDate = this.getFieldValByName("modifydate", metaObject);
+            if(null == modifyDate){
+                this.setFieldValByName("modifydate", now, metaObject);
+            }
+            Object createuserid = this.getFieldValByName("createuserid", metaObject);
+            if(null == createuserid && sysUser != null){
+                this.setFieldValByName("createuserid", sysUser.getId(), metaObject);
+            }
+            Object createusername = this.getFieldValByName("createusername", metaObject);
+            if(null == createusername && sysUser != null){
+                this.setFieldValByName("createusername", sysUser.getName(), metaObject);
+            }
+            Object modifyuserid = this.getFieldValByName("modifyuserid", metaObject);
+            if(null == modifyuserid && sysUser != null){
+                this.setFieldValByName("modifyuserid", sysUser.getId(), metaObject);
+            }
+            Object modifyusername = this.getFieldValByName("modifyusername", metaObject);
+            if(null == modifyusername && sysUser != null){
+                this.setFieldValByName("modifyusername", sysUser.getName(), metaObject);
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+
+    @Override
+    public void updateFill(MetaObject metaObject) {
+        try{
+            logger.info("start update fill ....");
+            ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+            if(attributes == null){
+                return;
+            }
+            HttpServletRequest request = attributes.getRequest();
+            if(request == null){
+                return;
+            }
+            String token = request.getHeader("token");
+            if(token == null || "".equals(token)){
+                return;
+            }
+            SysUserVo sysUser = redisService.getLoginUser(token);
+
+            Date now = new Date();
+
+            Object modifyDate = this.getFieldValByName("modifydate", metaObject);
+            if(null == modifyDate){
+                this.setUpdateFieldValByName("modifydate", now, metaObject);
+            }
+            Object modifyuserid = this.getFieldValByName("modifyuserid", metaObject);
+            if(null == modifyuserid && sysUser != null){
+                this.setUpdateFieldValByName("modifyuserid", sysUser.getId(), metaObject);
+            }
+            Object modifyusername = this.getFieldValByName("modifyusername", metaObject);
+            if(null == modifyusername && sysUser != null){
+                this.setUpdateFieldValByName("modifyusername", sysUser.getName(), metaObject);
+            }
+            //this.setFieldValByName("operator", "Tom", metaObject);
+            //this.setUpdateFieldValByName("operator", "Tom", metaObject);//@since 快照:3.0.7.2-SNAPSHOT, @since 正式版暂未发布3.0.7
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+}

+ 78 - 0
bs-common/src/main/java/com/rongwei/safecommon/config/CustomCellWriteWidthConfig.java

@@ -0,0 +1,78 @@
+package com.rongwei.safecommon.config;
+
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.Head;
+import com.alibaba.excel.metadata.data.CellData;
+import com.alibaba.excel.metadata.data.WriteCellData;
+import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
+import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Sheet;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * CustomCellWriteWidthConfig class
+ *
+ * @author XH
+ * @date 2024/02/02
+ */
+public class CustomCellWriteWidthConfig extends AbstractColumnWidthStyleStrategy {
+    private final Map<Integer, Map<Integer, Integer>> CACHE = new HashMap<>();
+    @Override
+    protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) {
+        boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList);
+        if (needSetWidth) {
+            Map<Integer, Integer> maxColumnWidthMap = CACHE.computeIfAbsent(writeSheetHolder.getSheetNo(), k -> new HashMap<>());
+
+            Integer columnWidth = this.dataLength(cellDataList, cell, isHead);
+            // 单元格文本长度大于60换行
+            if (columnWidth >= 0) {
+                if (columnWidth > 60) {
+                    columnWidth = 60;
+                }
+                Integer maxColumnWidth = maxColumnWidthMap.get(cell.getColumnIndex());
+                if (maxColumnWidth == null || columnWidth > maxColumnWidth) {
+                    maxColumnWidthMap.put(cell.getColumnIndex(), columnWidth);
+                    Sheet sheet = writeSheetHolder.getSheet();
+                    sheet.setColumnWidth(cell.getColumnIndex(), columnWidth * 256);
+                }
+            }
+        }
+    }
+    /**
+     * 计算长度
+     * @param cellDataList
+     * @param cell
+     * @param isHead
+     * @return
+     */
+    private Integer dataLength(List<WriteCellData<?>> cellDataList, Cell cell, Boolean isHead) {
+        if (isHead) {
+            return cell.getStringCellValue().getBytes().length;
+        } else {
+            CellData<?> cellData = cellDataList.get(0);
+            CellDataTypeEnum type = cellData.getType();
+            if (type == null) {
+                return -1;
+            } else {
+                switch (type) {
+                    case STRING:
+                        // 换行符(数据需要提前解析好)
+                        int index = cellData.getStringValue().indexOf("\n");
+                        return index != -1 ?
+                                cellData.getStringValue().substring(0, index).getBytes().length + 1 : cellData.getStringValue().getBytes().length + 1;
+                    case BOOLEAN:
+                        return cellData.getBooleanValue().toString().getBytes().length;
+                    case NUMBER:
+                        return cellData.getNumberValue().toString().getBytes().length;
+                    default:
+                        return -1;
+                }
+            }
+        }
+    }
+}

+ 27 - 0
bs-common/src/main/java/com/rongwei/safecommon/config/CxCommonRunnerImpl.java

@@ -0,0 +1,27 @@
+package com.rongwei.safecommon.config;
+
+import com.rongwei.commonservice.service.RedisService;
+import com.rongwei.rwadmincommon.system.domain.SysOrganizationDo;
+import com.rongwei.rwadmincommon.system.service.SysOrganizationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.stereotype.Component;
+import java.util.List;
+
+@Component
+public class CxCommonRunnerImpl implements ApplicationRunner {
+
+    @Autowired
+    private SysOrganizationService sysOrganizationService;
+    @Autowired
+    private RedisService redisService;
+
+    @Override
+    public void run(ApplicationArguments args) throws Exception {
+        System.out.println("服务启动公共初始化");
+        // 查询所有组织机构数据,并缓存到Redis中
+        List<SysOrganizationDo> orgdos = sysOrganizationService.list();
+        redisService.redisCatchInit("allOrgs",orgdos,0);
+    }
+}

+ 159 - 0
bs-common/src/main/java/com/rongwei/safecommon/config/MybatisConfig.java

@@ -0,0 +1,159 @@
+package com.rongwei.safecommon.config;
+
+import com.baomidou.mybatisplus.core.parser.ISqlParser;
+import com.baomidou.mybatisplus.core.parser.ISqlParserFilter;
+import com.baomidou.mybatisplus.core.parser.SqlParserHelper;
+import com.rongwei.rwcommonconfig.config.interceptor.SaasPaginationInterceptor;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.reflection.MetaObject;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by duyisong on 17/5/28.
+ */
+@EnableTransactionManagement
+@Configuration
+@MapperScan("com.rongwei.*.*.dao")
+public class MybatisConfig {
+
+//    @Autowired
+//    private RedisService redisService;
+
+//    /**
+//     * 自定义查询sql多数据库适配
+//     * @return
+//     */
+//    @Bean
+//    public QuerySqlAdaptationInterceptor querySqlAdaptationInterceptor(){
+//        QuerySqlAdaptationInterceptor sqlAdaptation = new QuerySqlAdaptationInterceptor();
+//        return sqlAdaptation;
+//    }
+
+    /*
+     * 分页插件,自动识别数据库类型
+     * 多租户,请参考官网【插件扩展】
+     */
+    @Bean
+    public SaasPaginationInterceptor paginationInterceptor() {
+        SaasPaginationInterceptor paginationInterceptor = new SaasPaginationInterceptor();
+        /*
+         * 【测试多租户】 SQL 解析处理拦截器<br>
+         * 这里固定写成住户 1 实际情况你可以从cookie读取,因此数据看不到 【 麻花藤 】 这条记录( 注意观察 SQL )<br>
+         */
+        List<ISqlParser> sqlParserList = new ArrayList<>();
+//        TenantSqlParser tenantSqlParser = new TenantSqlParser();
+//        tenantSqlParser.setTenantHandler(new TenantHandler() {
+//            @Override
+//            public Expression getTenantId() {
+//                String tenantId = null;
+//                String token = ThreadLocalResource.token.get();
+//                SysUserVo currUser = null;
+//                if(StringUtils.isNotEmpty(token)){
+//                    currUser = redisService.getLoginUser(token);
+//                }
+//                if(currUser != null && currUser.getTenantDo() != null){
+//                    tenantId = currUser.getTenantDo().getId();
+//                }
+//
+//                return new StringValue(tenantId);
+//            }
+//
+//            @Override
+//            public String getTenantIdColumn() {
+//                return "TENANTID";
+//            }
+//
+//            @Override
+//            public boolean doTableFilter(String tableName) {
+//                // 这里可以判断是否过滤表,true表示过滤、false不过滤
+//                /*
+//                if ("user".equals(tableName)) {
+//                    return true;
+//                }*/
+//                return true;
+//            }
+//        });
+//        sqlParserList.add(tenantSqlParser);
+        paginationInterceptor.setSqlParserList(sqlParserList);
+        paginationInterceptor.setSqlParserFilter(new ISqlParserFilter() {
+            @Override
+            public boolean doFilter(MetaObject metaObject) {
+                MappedStatement ms = SqlParserHelper.getMappedStatement(metaObject);
+                // 过滤自定义查询此时无租户信息约束【 麻花藤 】出现
+                if ("com.rongwei.rwadmincommon.system.dao.getAll".equals(ms.getId())) {
+                    return true;
+                }
+                return false;
+            }
+        });
+        paginationInterceptor.setLimit(2000);
+        return paginationInterceptor;
+    }
+
+//    /**
+//     * 打印 sql
+//     */
+//    @Bean
+//    public PerformanceInterceptor performanceInterceptor() {
+//        PerformanceInterceptor performanceInterceptor = new PerformanceInterceptor();
+//        //格式化sql语句
+//        Properties properties = new Properties();
+//        properties.setProperty("format", "true");
+//        performanceInterceptor.setProperties(properties);
+//        return performanceInterceptor;
+//    }
+
+    /*@Bean
+    public MapperScannerConfigurer mapperScannerConfigurer() {
+        log.info("[config] 注册 tkMtBatis");
+        MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();
+        mapperScannerConfigurer.setBasePackage("com.rongwei.rwadmin.system.dao");
+        Properties properties = new Properties();
+        properties.setProperty("markerInterface", "com.rongwei.rwadmin.common.mapper.BaseDao");
+        mapperScannerConfigurer.setProperties(properties);
+        return mapperScannerConfigurer;
+    }
+
+    @Bean
+    public PageHelper pageHelper(DataSource dataSource) {
+        log.info("[config] 注册 MyBatis分页插件PageHelper");
+        PageHelper pageHelper = new PageHelper();
+        Properties p = new Properties();
+        p.setProperty("offsetAsPageNum", "true");
+        p.setProperty("rowBoundsWithCount", "true");
+        p.setProperty("reasonable", "true");
+        pageHelper.setProperties(p);
+        return pageHelper;
+    }*/
+
+
+    // 配置sqlSessionFactory
+    /*@Bean(name = "sqlSessionFactory")
+    public SqlSessionFactory sqlSessionFactoryBean(DataSource dataSource
+            ,QuerySqlAdaptationInterceptor sqlAdaptation,PaginationInterceptor paginationInterceptor) {
+        SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
+        bean.setDataSource(dataSource);
+        if(StringUtils.isNotBlank(typeAliasesPackage)){
+            bean.setTypeAliasesPackage(typeAliasesPackage);
+        }
+
+        // 自定义的sql日志拦截器
+        Interceptor sqlLogInterceptor = new SqlLogInterceptor();
+        Interceptor[] plugins =  new Interceptor[]{ sqlLogInterceptor};
+        bean.setPlugins(plugins);
+        try {
+            bean.setMapperLocations(resolver.getResources(xmlLocation));
+            return bean.getObject();
+        } catch (Exception e) {
+
+            throw new RuntimeException(e);
+        }
+    }*/
+
+}

+ 34 - 0
bs-common/src/main/java/com/rongwei/safecommon/config/ThreadPoolConfig.java

@@ -0,0 +1,34 @@
+package com.rongwei.safecommon.config;
+
+import cn.hutool.core.thread.ExecutorBuilder;
+import cn.hutool.core.thread.ThreadFactoryBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * ThreadPoolConfig class
+ *
+ * @author XH
+ * @date 2023/12/18
+ */
+
+@Configuration
+public class ThreadPoolConfig {
+    public static final String NAME_PRE="custom-";
+
+    @Bean("customThreadPool")
+    public static ThreadPoolExecutor getExecutor(){
+        return  ExecutorBuilder.create()
+                .setCorePoolSize(8)
+                .setMaxPoolSize(16)
+                .setKeepAliveTime(60, TimeUnit.SECONDS)
+                .setHandler(new ThreadPoolExecutor.CallerRunsPolicy())
+                .setAllowCoreThreadTimeOut(true)
+                .setThreadFactory(ThreadFactoryBuilder.create().setNamePrefix(NAME_PRE).build())
+                .build();
+    }
+
+}

+ 36 - 0
bs-common/src/main/java/com/rongwei/safecommon/fegin/CXAdminFeginClient.java

@@ -0,0 +1,36 @@
+package com.rongwei.safecommon.fegin;
+
+import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.vo.CriteriaQuery;
+import com.rongwei.rwcommon.vo.MailDo;
+import com.rongwei.rwcommon.vo.generalsql.BatchSaveVo;
+import com.rongwei.rwcommon.vo.generalsql.MasterSlaveInsertVo;
+import com.rongwei.rwcommon.vo.generalsql.MasterSlaveUpdateVo;
+import com.rongwei.rwcommonentity.commonservers.vo.SysNotifyAnnounceVo;
+import com.rongwei.rwcommonentity.commonservers.vo.SysSerialVo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.http.MediaType;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+import java.util.Map;
+
+@FeignClient(value = "rw-admin",fallback = CXAdminFeginClientError.class,contextId = "adminFeign")
+public interface CXAdminFeginClient {
+    @PostMapping("sys/generalCRUD/getDataBySql")
+    R getDataBySql(@RequestBody CriteriaQuery query);
+
+    @PostMapping("sys/generalCRUD/batchSaveList")
+    R batchSaveList(@RequestBody BatchSaveVo batchSaveVo);
+
+    @PostMapping("sys/generalCRUD/getSerialNumberCode")
+    R<Map<String, Object>> getSerialNumberCode(@RequestBody SysSerialVo sysSerialVo);
+
+    @PostMapping("sys/generalCRUD/generalMsInsert")
+    R generalMsInsert(@RequestBody MasterSlaveInsertVo masterSlaveInsert);
+
+    @PostMapping("sys/generalCRUD/generalMsUpdate")
+    R generalMsUpdate(@RequestBody MasterSlaveUpdateVo masterSlaveUpdate);
+}

+ 54 - 0
bs-common/src/main/java/com/rongwei/safecommon/fegin/CXAdminFeginClientError.java

@@ -0,0 +1,54 @@
+package com.rongwei.safecommon.fegin;
+
+import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.vo.CriteriaQuery;
+import com.rongwei.rwcommon.vo.generalsql.BatchSaveVo;
+import com.rongwei.rwcommon.vo.generalsql.MasterSlaveInsertVo;
+import com.rongwei.rwcommon.vo.generalsql.MasterSlaveUpdateVo;
+import com.rongwei.rwcommonentity.commonservers.vo.SysSerialVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+/**
+ * Hysitx class
+ *
+ * @author XH
+ * @date 2023/05/30
+ */
+@Component
+public class CXAdminFeginClientError implements CXAdminFeginClient {
+    private final Logger log = LoggerFactory.getLogger(this.getClass().getName());
+
+    @Override
+    public R getDataBySql(CriteriaQuery query) {
+        log.error("执行自定义sql失败:{}", query);
+        return R.error();
+    }
+
+    @Override
+    public R batchSaveList(BatchSaveVo batchSaveVo) {
+        log.error("批量保存失败:{}", batchSaveVo);
+        return R.error();
+    }
+
+    @Override
+    public R getSerialNumberCode(SysSerialVo sysSerialVo) {
+        log.error("生成流水码失败:{}",sysSerialVo);
+        return R.error();
+    }
+
+    @Override
+    public R generalMsInsert(MasterSlaveInsertVo masterSlaveInsert) {
+        log.error("新增失败:{}",masterSlaveInsert);
+        return R.error();
+    }
+
+    @Override
+    public R generalMsUpdate(MasterSlaveUpdateVo masterSlaveUpdate) {
+        log.error("修改失败:{}",masterSlaveUpdate);
+        return R.error();
+    }
+
+
+}

+ 40 - 0
bs-common/src/main/java/com/rongwei/safecommon/fegin/CXCommonFeginClient.java

@@ -0,0 +1,40 @@
+package com.rongwei.safecommon.fegin;
+
+import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.vo.CriteriaQuery;
+import com.rongwei.rwcommon.vo.MailDo;
+import com.rongwei.rwcommonentity.commonservers.vo.SysNotifyAnnounceVo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.http.MediaType;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+import java.util.Map;
+
+@FeignClient(value = "rw-common-server",fallback = CXHysitx.class,contextId = "commonFeign")
+public interface CXCommonFeginClient {
+    @PostMapping("sys/sysnotifyannounce/saveOrUpdate")
+    @Async("customThreadPool")
+    void sendNotify(@RequestBody SysNotifyAnnounceVo sysNotifyAnnounceVo);
+
+    @PostMapping("/mail/sendHtmlMail")
+    R sendHtmlMail(@RequestBody MailDo Mail);
+
+    @PostMapping("/mail/sendTextMail")
+    R sendTextMail(@RequestBody MailDo Mail);
+
+    @PostMapping("ws/socket/push/app")
+    R pushToWeb(@RequestParam String cid, @RequestParam(required = false) String message);
+
+    @RequestMapping("sys/sysnotifyannounce/list")
+    R list(@RequestParam Map<String, Object> params);
+
+    @PostMapping("sys/sysnotifyannounce/delete")
+    R delete(@RequestBody List<String> ids);
+
+    @PostMapping(value = "sys/sysfile/upload?platform=ic-pc&foldercode=file_system&relationid={relationid}"
+            ,consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    R upload(@RequestPart(value = "file",required = true) MultipartFile file,@PathVariable("relationid") String relationid);
+}

+ 65 - 0
bs-common/src/main/java/com/rongwei/safecommon/fegin/CXHysitx.java

@@ -0,0 +1,65 @@
+package com.rongwei.safecommon.fegin;
+
+import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.vo.MailDo;
+import com.rongwei.rwcommonentity.commonservers.vo.SysNotifyAnnounceVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Hysitx class
+ *
+ * @author XH
+ * @date 2023/05/30
+ */
+@Component
+public class CXHysitx implements CXCommonFeginClient {
+    private final Logger log = LoggerFactory.getLogger(this.getClass().getName());
+
+    @Override
+    public void sendNotify(SysNotifyAnnounceVo sysNotifyAnnounceVo) {
+        log.error("发送消息通知失败!通知内容为:{}", sysNotifyAnnounceVo);
+    }
+
+    @Override
+    public R sendHtmlMail(MailDo mailDo) {
+        log.error("邮件发送失败,数据为{}",mailDo);
+        return R.error();
+    }
+
+    @Override
+    public R sendTextMail(MailDo Mail) {
+        log.error("文本格式邮件发送失败,数据为{}",Mail);
+        return R.error();
+    }
+
+    @Override
+    public R pushToWeb(String cid, String message) {
+        log.error("发送websocket通知失败!通知内容为:{}", message);
+        return R.error();
+    }
+
+    @Override
+    public R list(Map<String, Object> params) {
+        log.error("查询提醒失败,数据为{}",params);
+        return R.error();
+    }
+
+    @Override
+    public R delete(List<String> ids) {
+        log.error("删除提醒失败,数据为{}",ids);
+        return R.error();
+    }
+
+    @Override
+    public R upload(MultipartFile file,String relationid) {
+        return null;
+    }
+
+
+}

+ 393 - 0
bs-common/src/main/java/com/rongwei/safecommon/utils/CXCommonUtils.java

@@ -0,0 +1,393 @@
+package com.rongwei.safecommon.utils;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.google.common.collect.Lists;
+import com.rongwei.commonservice.serial.service.SysSerialNumberService;
+import com.rongwei.commonservice.service.RedisService;
+import com.rongwei.rwadmincommon.system.domain.SysOrganizationDo;
+import com.rongwei.rwadmincommon.system.vo.SysOrganizationVo;
+import com.rongwei.rwadmincommon.system.vo.SysUserVo;
+import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.utils.SecurityUtil;
+import com.rongwei.rwcommon.utils.StringUtils;
+import com.rongwei.rwcommon.vo.MailDo;
+import com.rongwei.rwcommon.vo.generalsql.BatchSaveVo;
+import com.rongwei.rwcommon.vo.generalsql.GeneralInsertVo;
+import com.rongwei.rwcommonentity.commonservers.vo.SysNotifyAnnounceVo;
+import com.rongwei.rwcommonentity.commonservers.vo.SysSerialVo;
+import com.rongwei.safecommon.fegin.CXAdminFeginClient;
+import com.rongwei.safecommon.fegin.CXCommonFeginClient;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.util.*;
+import java.util.function.BooleanSupplier;
+import java.util.stream.Collectors;
+
+import static com.rongwei.safecommon.utils.SaveConstans.*;
+
+/**
+ * CXCommonUtils class
+ *
+ * @author XH
+ * @date 2023/12/15
+ */
+@Component
+public class CXCommonUtils {
+    private static final Logger log = LoggerFactory.getLogger(CXCommonUtils.class.getName());
+    @Autowired
+    private RedisService autoRedisService;
+    @Autowired
+    private CXCommonFeginClient autoCommonFeginClient;
+    @Resource
+    private CXAdminFeginClient autoAdminFeginClient;
+    @Autowired
+    private SysSerialNumberService autoSysSerialNumberService;
+
+    private static SysSerialNumberService sysSerialNumberService;
+
+    private static RedisService redisService;
+
+    private static CXCommonFeginClient commonFeginClient;
+    private static CXAdminFeginClient adminFeginClient;
+    public static final String DEFAULT_NOTIFY_STATUS = "3";
+
+
+    @PostConstruct
+    public void info() {
+        redisService = autoRedisService;
+        commonFeginClient = autoCommonFeginClient;
+        adminFeginClient = autoAdminFeginClient;
+        sysSerialNumberService = autoSysSerialNumberService;
+    }
+
+    /**
+     * 发送邮件
+     * @param mailDo
+     */
+    public static void sendTextMail(MailDo mailDo){
+        commonFeginClient.sendTextMail(mailDo);
+    }
+    /**
+     * 发送邮件
+     * @param mailDo
+     */
+    public static void sendHtmlMail(MailDo mailDo){
+        commonFeginClient.sendHtmlMail(mailDo);
+    }
+    /**
+     * 发送消息提醒
+     *
+     * @param title         消息提醒标题
+     * @param content       消息提醒内容
+     * @param remark        消息提醒备注
+     * @param recipientIds  接收人ID
+     * @param roption       目前存的是业务数据ID
+     * @param notifyStatus  消息提醒类型
+     * @param pushWebsocket 是否向webSocket推送消息
+     */
+    public static void sendNotify(String title, String content, String remark,
+                                  List<String> recipientIds, String roption,
+                                  String notifyStatus, boolean pushWebsocket) {
+        sendNotify(SecurityUtil.getUUID(), null, title, content, remark, recipientIds, roption, notifyStatus, pushWebsocket);
+    }
+
+    /**
+     * 发送消息提醒
+     *
+     * @param notifyId      消息提醒ID
+     * @param tenantId      消息提醒公司信息
+     * @param title         消息提醒标题
+     * @param content       消息提醒内容
+     * @param remark        消息提醒备注
+     * @param recipientIds  接收人ID
+     * @param roption       目前存的是业务数据ID
+     * @param notifyStatus  消息提醒类型
+     * @param pushWebsocket 是否向webSocket推送消息
+     */
+    public static void sendNotify(String notifyId, String tenantId, String title, String content, String remark,
+                                  List<String> recipientIds, String roption,
+                                  String notifyStatus, boolean pushWebsocket) {
+        if (recipientIds == null || recipientIds.isEmpty()) {
+            log.debug("接收人ID为空");
+            return;
+        }
+        SysNotifyAnnounceVo sysNotifyAnnounceVo = new SysNotifyAnnounceVo();
+        sysNotifyAnnounceVo.setId(notifyId);
+        sysNotifyAnnounceVo.setSenderid("8672bf72ab274bec83052868ae336b38");
+        sysNotifyAnnounceVo.setNotifytype(notifyStatus);
+        sysNotifyAnnounceVo.setNotifystatus(DEFAULT_NOTIFY_STATUS);
+        sysNotifyAnnounceVo.setNotifytitle(title);
+        sysNotifyAnnounceVo.setNotifycontent(content.replace("null", " "));
+        sysNotifyAnnounceVo.setRemark(remark);
+        if (StringUtils.isNotBlank(tenantId)) {
+            sysNotifyAnnounceVo.setTenantid(tenantId);
+        }
+        // 特殊处理
+        if (StringUtils.isNotBlank(roption)) {
+            sysNotifyAnnounceVo.setRoption(roption);
+        }
+        sysNotifyAnnounceVo.setUserid(recipientIds.stream().distinct().collect(Collectors.joining(",")));
+        log.debug("开始通过fegin发送消息通知: {}", sysNotifyAnnounceVo);
+        commonFeginClient.sendNotify(sysNotifyAnnounceVo);
+        // 通过webSocket推送数据
+        if (pushWebsocket) {
+            //防止推送用户过多,导致调用接口报错,实行分流
+            Lists.partition(recipientIds, 10).forEach(userIds -> {
+                pushApp(title, content, userIds);
+            });
+        }
+    }
+
+
+    /**
+     * 发送消息提醒
+     *
+     * @param title        消息提醒标题
+     * @param content      消息提醒内容
+     * @param remark       消息提醒备注
+     * @param recipientIds 接收人ID
+     * @param roption      目前存的是业务数据ID
+     * @param notifyStatus 消息提醒类型
+     */
+    public static void sendNotify(String title, String content, String remark,
+                                  List<String> recipientIds, String roption,
+                                  String notifyStatus) {
+        sendNotify(title, content, remark, recipientIds, roption, notifyStatus, true);
+    }
+
+
+    public static void pushApp(String title, String content, List<String> recipientIds) {
+        if(recipientIds.size() <= 0){
+            return;
+        }
+        BatchSaveVo batchSaveVo = new BatchSaveVo();
+        LinkedList<GeneralInsertVo> generalInserts = new LinkedList<>();
+        for (String recipientId : recipientIds) {
+            String uuid = SecurityUtil.getUUID();
+
+            Map<String, Object> map = new HashMap<>();
+            map.put("ID",uuid);
+            map.put("DELETED","0");
+            map.put("CREATEDATE",DateUtil.now());
+            map.put("TITLE", title);
+            map.put("CONTENT", content);
+            map.put("USERID", recipientId);
+
+            GeneralInsertVo generalInsertVo = new GeneralInsertVo();
+            generalInsertVo.setTablename("app_push_message");
+            generalInsertVo.setInsertcolumns(map);
+            generalInsertVo.setAutoGenId(false);
+            generalInsertVo.setIdCol("ID");
+            generalInserts.add(generalInsertVo);
+        }
+        batchSaveVo.setGeneralInserts(generalInserts);
+        adminFeginClient.batchSaveList(batchSaveVo);
+
+        //推送websocket消息给app
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("title", title);
+        jsonObject.put("content", content);
+        jsonObject.put("userIds", recipientIds);
+        commonFeginClient.pushToWeb("app", jsonObject.toJSONString());
+    }
+
+
+    /**
+     * 发送消息提醒
+     *
+     * @param id            主键id
+     * @param title         消息提醒标题
+     * @param content       消息提醒内容
+     * @param remark        消息提醒备注
+     * @param recipientIds  接收人ID
+     * @param roption       目前存的是业务数据ID
+     * @param notifyStatus  消息提醒类型
+     * @param pushWebsocket 是否向webSocket推送消息
+     */
+    public static void sendNotify(String id, String title, String content, String remark,
+                                  List<String> recipientIds, String roption,
+                                  String notifyStatus, boolean pushWebsocket) {
+        if (recipientIds == null || recipientIds.isEmpty()) {
+            log.debug("接收人ID为空");
+            return;
+        }
+        SysNotifyAnnounceVo sysNotifyAnnounceVo = new SysNotifyAnnounceVo();
+        sysNotifyAnnounceVo.setId(id);
+        sysNotifyAnnounceVo.setSenderid("8672bf72ab274bec83052868ae336b38");
+        sysNotifyAnnounceVo.setNotifytype(notifyStatus);
+        sysNotifyAnnounceVo.setNotifystatus(DEFAULT_NOTIFY_STATUS);
+        sysNotifyAnnounceVo.setNotifytitle(title);
+        sysNotifyAnnounceVo.setNotifycontent(content.replace("null", " "));
+        sysNotifyAnnounceVo.setRemark(remark);
+        // 特殊处理
+        if (StringUtils.isNotBlank(roption)) {
+            sysNotifyAnnounceVo.setRoption(roption);
+        }
+        sysNotifyAnnounceVo.setUserid(recipientIds.stream().distinct().collect(Collectors.joining(",")));
+        log.debug("开始通过fegin发送消息通知: {}", sysNotifyAnnounceVo);
+        commonFeginClient.sendNotify(sysNotifyAnnounceVo);
+        // 通过webSocket推送数据
+        if (pushWebsocket) {
+            //防止推送用户过多,导致调用接口报错,实行分流
+            Lists.partition(recipientIds, 10).forEach(userIds -> {
+                pushApp(title, content, userIds);
+            });
+        }
+    }
+
+
+    /**
+     * 流水码生成
+     *
+     * @param moduleCode      流水码CODE
+     * @param ruleTemplateStr 流水码编码规则
+     * @param tenantId        租户id
+     * @return
+     */
+    public static String streamCodeGeneration(String moduleCode, String ruleTemplateStr, String tenantId) {
+        String orgCode = ORG_CODE_MAP.getOrDefault(tenantId, "");
+        log.info("开始生成流水码");
+        SysSerialVo sysSerialVo = new SysSerialVo();
+        sysSerialVo.setModulecode(String.format("%s_%s", moduleCode, orgCode));
+        sysSerialVo.setRuleTemplateStr(String.format("%s-%s", orgCode, ruleTemplateStr));
+        String streamCode = sysSerialNumberService.getCodeByTemplate(sysSerialVo);
+        log.info("流水码生成成功:{}", streamCode);
+        return streamCode;
+    }
+
+    /**
+     * 流水码生成
+     *
+     * @param moduleCode      流水码CODE
+     * @param ruleTemplateStr 流水码编码规则
+     * @param tenantId        租户id
+     * @return
+     */
+    public static String streamCodeGeneration(String moduleCode, String ruleTemplateStr, String resetRule, String tenantId) {
+
+        String orgCode = (moduleCode.contains("_aq") ? AQ_ORG_CODE_MAP : ORG_CODE_MAP).getOrDefault(tenantId, "");
+        log.info("开始生成流水码");
+        SysSerialVo sysSerialVo = new SysSerialVo();
+        sysSerialVo.setModulecode(String.format("%s_%s", moduleCode, orgCode));
+        sysSerialVo.setRuleTemplateStr(String.format("%s-%s", orgCode, ruleTemplateStr));
+        sysSerialVo.setResetrule(resetRule);
+        String streamCode = sysSerialNumberService.getCodeByTemplate(sysSerialVo);
+        log.info("流水码生成成功:{}", streamCode);
+        return streamCode;
+    }
+
+
+    public static SysUserVo getCurrentUser() {
+        // 获取当前登录人信息
+        SysUserVo currUser = null;
+        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        if (attributes != null) {
+            HttpServletRequest request = attributes.getRequest();
+            if (request != null) {
+                String token = request.getHeader("token");
+                if (com.rongwei.rwcommon.utils.StringUtils.isNotEmpty(token)) {
+                    currUser = redisService.getLoginUser(token);
+                }
+            }
+        }
+        return currUser;
+    }
+
+
+    public static String getCurrentUserFactoryId(SysUserVo currentUser) {
+        if(currentUser==null){
+            currentUser = getCurrentUser();
+        }
+        List<SysOrganizationVo> organizationDoList = currentUser.getOrganizationDoList();
+        String factoryId = organizationDoList.stream()
+                .filter(org -> MINUS_ONE.equals(org.getPid()))
+                .map(SysOrganizationDo::getId)
+                .distinct()
+                .collect(Collectors.joining(","));
+        if (StringUtils.isBlank(factoryId)) {
+            factoryId = organizationDoList.stream().map(info -> info.getFullpid().split(",")[1]).distinct().collect(Collectors.joining(","));
+        }
+        return factoryId;
+    }
+
+    /**
+     * 计算时间和当前时间相差几天
+     *
+     * @param startDate
+     * @return
+     */
+    public static long aFewDaysApart(Date startDate) {
+        Calendar startInstance = Calendar.getInstance();
+        startInstance.setTime(startDate);
+        LocalDate startLocalDate = LocalDate.of(startInstance.get(Calendar.YEAR), startInstance.get(Calendar.MONTH) + 1, startInstance.get(Calendar.DAY_OF_MONTH));
+        return startLocalDate.toEpochDay() - LocalDate.now().toEpochDay();
+    }
+
+
+    /**
+     * 删除消息提醒
+     *
+     * @param notifyType
+     * @param roption
+     * @return
+     * @date 2024/1/29 17:12
+     * @author shangmi
+     */
+
+    public static void deleteSendNotify(String notifyType, String roption) {
+        JSONArray data = JSONUtil.parseArray(commonFeginClient.list(new HashMap<String, Object>() {{
+            this.put("NOTIFYTYPE", notifyType);
+            if (roption != null) {
+                this.put("ROPTION", roption);
+            }
+        }}).getData());
+
+        if (!data.isEmpty()) {
+            List<String> ids = data.stream().map(info -> JSONUtil.parseObj(info).get("id").toString()).collect(Collectors.toList());
+            commonFeginClient.delete(ids);
+        }
+    }
+
+    public static R upload(MultipartFile file, String relationid) {
+        return commonFeginClient.upload(file, relationid);
+    }
+
+    /**
+     * 参数校验
+     *
+     * @param booleanSupplier
+     * @param returnMsg
+     * @param errorMsg
+     * @param errorMsgParameter
+     */
+    public static void parameterCheck(BooleanSupplier booleanSupplier, String returnMsg, String errorMsg, Object... errorMsgParameter) {
+        if (booleanSupplier.getAsBoolean()) {
+            log.error(errorMsg, errorMsgParameter);
+            if (org.apache.commons.lang.StringUtils.isNotBlank(returnMsg)) {
+                throw new RuntimeException(returnMsg);
+            }
+        }
+    }
+
+    /**
+     * 去除小数点后面多余的0,输入BigDecimal,输出String
+     */
+    public static String removeExtraZerosAndDecimal(BigDecimal bd) {
+        bd = bd.stripTrailingZeros();
+        return bd.toPlainString();
+    }
+}

+ 212 - 0
bs-common/src/main/java/com/rongwei/safecommon/utils/CommonEasyExcelUtils.java

@@ -0,0 +1,212 @@
+package com.rongwei.safecommon.utils;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.rongwei.rwadmincommon.system.dao.SysDictDao;
+import com.rongwei.rwadmincommon.system.domain.SysDictDo;
+import com.rongwei.rwcommon.base.BaseDo;
+import com.rongwei.rwcommonentity.commonservers.domain.SysFileFolderDo;
+import com.rongwei.safecommon.vo.CommonGenerateExcelVo;
+import com.rongwei.safecommon.vo.ExportExcelCommonVo;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.DataFormat;
+import org.apache.poi.ss.usermodel.HorizontalAlignment;
+import org.apache.poi.ss.usermodel.VerticalAlignment;
+import org.apache.poi.xssf.usermodel.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+import static com.rongwei.safecommon.utils.SaveConstans.DatePattern.DATE_PATTERN_YMD;
+
+/**
+ * CommonEasyExcelUtils class
+ *
+ * @author XH
+ * @date 2024/02/01
+ */
+@Component
+public class CommonEasyExcelUtils {
+//    private static final Logger log = LoggerFactory.getLogger(CommonEasyExcelUtils.class.getClass().getName());
+//    private static final int MAX_COLUMN_WIDTH = 255 * 256;
+//    @Autowired
+//    private SysDictDao autoSysDictDao;
+//
+//    private static SysDictDao sysDictDao;
+//    private static SysFileFolderDo sysFileFolderDo;
+//
+//
+//    @PostConstruct
+//    public void init() {
+//        sysDictDao = autoSysDictDao;
+//    }
+//
+//    private static final Map<String, String> CONTENT_TYPE_MAP = new HashMap<String, String>(4) {{
+//        put(SaveConstans.FileSuffix.XLS, SaveConstans.ContentType.XLS);
+//        put(SaveConstans.FileSuffix.XLSX, SaveConstans.ContentType.XLSX);
+//
+//    }};
+//
+//    /**
+//     * 生成excel文件
+//     *
+//     * @param exportExcelCommonDTO
+//     * @param dataList
+//     * @param <T>
+//     */
+//    public static <T> void exportExcelUtil(ExportExcelCommonVo exportExcelCommonDTO, List<T> dataList) {
+//        log.info("开始导出excel");
+//        // excel文件名称
+//        String excelFileName = exportExcelCommonDTO.getExcelFileName();
+//        // excel 文件后缀
+//        String excelFileSuffix = exportExcelCommonDTO.getExcelFileSuffix();
+//        // 数据字典处理
+//        List<CommonGenerateExcelVo> excelFieldDescDTOList = getDictData(exportExcelCommonDTO.getExcelFieldDescDTOList());
+//
+//        String dateStr = new SimpleDateFormat(DATE_PATTERN_YMD).format(new Date());
+//
+//        String fileName = StringUtils.isBlank(excelFileName) ? dateStr : excelFileName + dateStr;
+//        try (FileOutputStream outputStream = new FileOutputStream(new File("指定目录/文件名"))) {
+////            OutputStream outputStream = response.getOutputStream();
+////            response.setHeader("Content-disposition", "attachment;fileName=" + URLEncoder.encode(fileName, "UTF-8"));
+////            response.setContentType(String.format("%s;%s", CONTENT_TYPE_MAP.get(excelFileSuffix), "charset=UTF-8"));
+//            XSSFWorkbook excelWorkBook = new XSSFWorkbook();
+//            /****************************设置单元格居中样式*********************************/
+//            XSSFCellStyle centerStyle = excelWorkBook.createCellStyle();
+//            // 水平居中
+//            centerStyle.setAlignment(HorizontalAlignment.CENTER);
+//            // 垂直居中
+//            centerStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+//
+//            // 创建sheet
+//            XSSFSheet sheet = excelWorkBook.createSheet(StringUtils.isBlank(excelFileName) ? "sheet1" : excelFileName);
+//            /********************************创建标题行***********************************/
+////            if(StringUtils.isNotBlank(excelFileName)){
+////                XSSFRow firstRow = sheet.createRow(0);
+////                XSSFCell firstRowCell = firstRow.createCell(0);
+////                firstRowCell.setCellValue(excelFileName);
+////                firstRowCell.setCellStyle(centerStyle);
+////            }
+//
+//            /********************************创建描述行***********************************/
+//            List<String> fieldDescList = excelFieldDescDTOList.stream().map(CommonGenerateExcelVo::getFiledDesc).collect(Collectors.toList());
+//            XSSFCell cell;
+//            XSSFRow descRow = sheet.createRow(0);
+//            for (int i = 0; i < fieldDescList.size(); i++) {
+//                cell = descRow.createCell(i);
+//                cell.setCellValue(fieldDescList.get(i));
+//                cell.setCellType(CellType.STRING);
+//                cell.setCellStyle(centerStyle);
+//            }
+//            /********************************创建内容行***********************************/
+//            CommonGenerateExcelVo excelFieldDescDTO;
+//            String valueStr = null;
+//            Object fileValue;
+//            Function getFunction;
+//            DataFormat format = excelWorkBook.createDataFormat();
+//            // 样式
+//            XSSFCellStyle commonStyle = centerStyle;
+//            commonStyle.setDataFormat(format.getFormat("@"));
+//            XSSFRow valueRow;
+//            SimpleDateFormat simpleDateFormat;
+//            Map<String, Object> enumMap;
+//            for (int j = 0; j < dataList.size(); j++) {
+//                valueRow = sheet.createRow(j + 1);
+//                Object data = dataList.get(j);
+//                boolean isNumber;
+//                for (int i = 0; i < excelFieldDescDTOList.size(); i++) {
+//                    cell = valueRow.createCell(i);
+//                    isNumber = false;
+//                    excelFieldDescDTO = excelFieldDescDTOList.get(i);
+//                    getFunction = excelFieldDescDTO.getGetOrgNameFunction();
+//                    if (getFunction != null) {
+//                        fileValue = getFunction.apply(data);
+//                    } else {
+//                        fileValue = excelFieldDescDTO.getFileValue();
+//                    }
+//                    String datePattern = excelFieldDescDTO.getDatePattern();
+//                    if (fileValue == null) {
+//                        valueStr = "";
+//                    } else if (fileValue instanceof java.util.Date) {
+//                        simpleDateFormat = new SimpleDateFormat(StringUtils.isBlank(datePattern) ? DATE_PATTERN_YMD : datePattern);
+//                        // 日期格式处理
+//                        valueStr = simpleDateFormat.format(fileValue);
+//                    } else if (excelFieldDescDTO.getCustomDictMap() != null && !excelFieldDescDTO.getCustomDictMap().isEmpty()) {
+//                        // 数据字典处理
+//                        enumMap = excelFieldDescDTO.getCustomDictMap();
+//                        valueStr = enumMap == null ? "" : enumMap.getOrDefault(fileValue.toString(), "").toString();
+//                    } else if (fileValue instanceof java.math.BigDecimal) {
+//                        // 特殊处理 小数位数都是0的情况下 只显示整数部分
+//                        valueStr = ((BigDecimal) fileValue).stripTrailingZeros().toPlainString();
+//                        isNumber = true;
+//                    } else if (fileValue instanceof java.lang.Integer || fileValue instanceof java.lang.Long) {
+//                        valueStr = fileValue.toString();
+//                        isNumber = true;
+//                    } else {
+//                        isNumber = false;
+//                        valueStr = fileValue.toString();
+//                    }
+//                    if (isNumber) {
+//                        cell.setCellValue(Double.parseDouble(valueStr));
+//                        cell.setCellStyle(centerStyle);
+//                    } else {
+//                        cell.setCellStyle(commonStyle);
+//                        cell.setCellValue(valueStr);
+//                    }
+//                    cell.setCellType(isNumber ? CellType.NUMERIC : CellType.STRING);
+//
+//                }
+//            }
+//            for (int i = 0; i < fieldDescList.size(); i++) {
+//                sheet.autoSizeColumn(i, true);
+//                if (sheet.getColumnWidth(i) * 17 / 10 < MAX_COLUMN_WIDTH) {
+//                    sheet.setColumnWidth(i, Math.max(sheet.getColumnWidth(i) * 17 / 10, 3000));
+//                } else {
+//                    sheet.setColumnWidth(i, 6000);
+//                }
+//                sheet.setDefaultColumnStyle(i, centerStyle);
+//            }
+//
+//            excelWorkBook.write(outputStream);
+//        } catch (Exception e) {
+//            log.error("excel导出异常");
+//            e.printStackTrace();
+//            throw new RuntimeException("excel导出失败!请联系系统管理员");
+//        }
+//    }
+//
+//    public static List<CommonGenerateExcelVo> getDictData(List<CommonGenerateExcelVo> excelFieldDescDTOList) {
+//        if (excelFieldDescDTOList.isEmpty()) {
+//            return excelFieldDescDTOList;
+//        }
+//        List<String> dictTypeList = excelFieldDescDTOList.stream()
+//                .map(info -> info.getDictType())
+//                .filter(StringUtils::isNotBlank)
+//                .distinct()
+//                .collect(Collectors.toList());
+//        if (dictTypeList.isEmpty()) {
+//            return excelFieldDescDTOList;
+//        }
+//        List<SysDictDo> sysDictDos = sysDictDao.selectList(new LambdaQueryWrapper<SysDictDo>().eq(BaseDo::getDeleted, "0").in(SysDictDo::getDicttype, dictTypeList));
+//        excelFieldDescDTOList.forEach(data -> {
+//            if (StringUtils.isNotBlank(data.getDictType())) {
+//                data.setCustomDictMap(sysDictDos.stream().filter(dict -> dict.getDicttype().equals(data.getDictType()))
+//                        .collect(Collectors.toMap(SysDictDo::getValue, SysDictDo::getName)));
+//            }
+//        });
+//        return excelFieldDescDTOList;
+//    }
+}

+ 59 - 0
bs-common/src/main/java/com/rongwei/safecommon/utils/ExportExcelByEasyExcel.java

@@ -0,0 +1,59 @@
+package com.rongwei.safecommon.utils;
+
+import cn.hutool.json.JSONObject;
+import cn.hutool.json.JSONUtil;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.write.metadata.WriteSheet;
+import com.rongwei.rwcommon.base.R;
+import com.rongwei.safecommon.config.CustomCellWriteWidthConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.mock.web.MockMultipartFile;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.ByteArrayOutputStream;
+import java.util.List;
+
+import static com.rongwei.safecommon.utils.SaveConstans.NotifyTitle.WEEK_HIDDEN_DANGER_TASK;
+
+/**
+ * ExportExceByEasyExcel class
+ *
+ * @author XH
+ * @date 2024/02/02
+ */
+@Component
+public class ExportExcelByEasyExcel {
+
+    private static final Logger log = LoggerFactory.getLogger(ExportExcelByEasyExcel.class.getName());
+
+    public static <T> String generateExcel(String file, String originalFilename, String notifyId, List<T> data, Class<T> className) {
+        String returnStr = "";
+        try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();) {
+            ExcelWriter excelWriter = EasyExcel.write(byteArrayOutputStream).build();
+            WriteSheet maintainSheet = EasyExcel.writerSheet(0, WEEK_HIDDEN_DANGER_TASK)
+                    .head(className)
+                    .registerWriteHandler(new CustomCellWriteWidthConfig())
+                    .build();
+            excelWriter.write(data, maintainSheet);
+            excelWriter.finish();
+
+            byte[] byteArray = byteArrayOutputStream.toByteArray();
+            MultipartFile multipartFile = new MockMultipartFile(file,
+                    originalFilename,
+                    SaveConstans.ContentType.XLSX, byteArray);
+            R upload = CXCommonUtils.upload(multipartFile, notifyId);
+
+            if ("200".equals(upload.getCode())) {
+                JSONObject jsonObject = JSONUtil.parseObj(upload.getData());
+                returnStr = jsonObject.get("filename").toString() + "-;-" + jsonObject.get("id").toString();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("文件生成异常");
+        }
+        return returnStr;
+    }
+}

+ 986 - 0
bs-common/src/main/java/com/rongwei/safecommon/utils/SaveConstans.java

@@ -0,0 +1,986 @@
+package com.rongwei.safecommon.utils;
+
+import java.util.*;
+
+public class SaveConstans {
+
+    // 部门类型:集团
+    public final static String ORGTYPE_GROUP = "group";
+    // 部门类型:分公司
+    public final static String ORGTYPE_BRANCHOFFICE = "Branch-Office";
+    // 部门类型:工厂
+    public final static String ORGTYPE_FACTORY = "factory";
+    // 部门类型:车间
+    public final static String ORGTYPE_CHEJIAN = "chejian";
+    // 部门类型:工段
+    public final static String ORGTYPE_GONGDUAN = "gongduan";
+    public static final Map<String, String> COMPANY_MAP = new HashMap<String, String>() {{
+        put("0001651000000015EFDD", "山东创新箔材科技有限公司");
+        put("0001651000000017DRZ1", "山东创新精铝金属制造有限公司");
+        put("0001S31000000000J0TR", "山东创新板材有限公司");
+    }};
+
+    /**
+     * 集团领导
+     */
+    public static final String GROUP_LEADER = "GroupLeader";
+
+    public static final String MINUS_ONE = "-1";
+    public static final String AND = "and";
+    public static final String DEFAULT_SEPARATOR = "-;-";
+
+    /**
+     * orgId和 code的对应关系
+     */
+    public static final Map<String, String> ORG_CODE_MAP = new HashMap<String, String>() {{
+        /**
+         * 山东创新箔材科技有限公司
+         */
+        put("0001651000000015EFDD", "CXLB");
+        /**
+         * 山东创新精铝金属制造有限公司
+         */
+        put("0001651000000017DRZ1", "CXJL");
+        /**
+         * 山东创新板材有限公司
+         */
+        put("0001S31000000000J0TR", "CXBC");
+    }};
+    /**
+     * orgId和 code的对应关系
+     */
+    public static final Map<String, String> AQ_ORG_CODE_MAP = new HashMap<String, String>() {{
+        /**
+         * 山东创新箔材科技有限公司
+         */
+        put("0001651000000015EFDD", "LB");
+        /**
+         * 山东创新精铝金属制造有限公司
+         */
+        put("0001651000000017DRZ1", "JL");
+        /**
+         * 山东创新板材有限公司
+         */
+        put("0001S31000000000J0TR", "BC");
+    }};
+    public static final List<String> MERGE_PRODUCE_PROCESS = new ArrayList<>();
+    /**
+     * 初始化数量单位
+     */
+    public static final Map<String, String> QUANTITY_UNIT_MAP = new HashMap<String, String>() {{
+        /**
+         * 公斤
+         */
+        put("kg", "公斤");
+        /**
+         * 吨
+         */
+        put("ton", "吨");
+    }};
+    /**
+     * 初始化月份代号
+     */
+    public static final List<String> MONTH_CODE_LIST = Arrays.asList("1", "2", "3", "4", "5", "6", "7", "8", "9", "X", "Y", "Z");
+    /**
+     * 高
+     */
+    public static final String HIGH = "高";
+    /**
+     * 中
+     */
+    public static final String MIDDLE = "中";
+    /**
+     * 低
+     */
+    public static final String LOW = "低";
+    /**
+     * 小圈加工的工序名称
+     */
+    public static final List<String> SMALL_CIRCLE_PROCESSING_PROCESS_NAME = new ArrayList<String>() {{
+        add("小卷成退");
+        add("小卷包装");
+    }};
+
+    static {
+        MERGE_PRODUCE_PROCESS.add("");
+    }
+
+    /**
+     * 问卷调查状态
+     */
+    public static class DemandState {
+        /**
+         * 已发布
+         */
+        public static final String RELEASE = "1";
+        /**
+         * 作废
+         */
+        public static final String CANCELLATION = "0";
+
+    }
+
+    public static class NotifyType {
+        /**
+         * 我的培训
+         */
+        public static final String TRAINING = "training";
+        /**
+         * 我的课程
+         */
+        public static final String COURSE = "course";
+        /**
+         * 培训需求调查表
+         */
+        public static final String TRAININGFORM = "trainingform";
+        /**
+         * 安全应急
+         */
+        public static final String SAFETYEMERGENCY = "safetyemergency";
+        /**
+         * 安全会议
+         */
+        public static final String SAFETYMEETING = "safetymeeting";
+        /**
+         * 特种设备提醒
+         */
+        public static final String SPECIALEQUIPMENT = "specialequipment";
+        /**
+         * 目标考核
+         */
+        public static final String TARGETASSESSMENT = "targetassessment";
+        /**
+         * 危险作业
+         */
+        public static final String DANGEROUS = "dangerous";
+        /**
+         * 问题跟踪与解决
+         */
+        public static final String ISSUETRACKING = "issuetracking";
+        /**
+         * 检查任务
+         */
+        public static final String INSPECTIONTASKS = "inspectiontasks";
+        /**
+         * 隐患任务
+         */
+        public static final String DANGERTASKS = "dangertasks";
+        /**
+         * 点巡检
+         */
+        public static final String INSPECTION = "inspection";
+
+        /**
+         * 保养检修
+         */
+        public static final String MAINTAIN = "maintain";
+        /**
+         * 保养检修
+         */
+        public static final String ACCEPTMAINTAINTASK = "acceptmaintaintask";
+        /**
+         * 润滑任务
+         */
+        public static final String LUBRICATION_TASK = "lubricationTask";
+
+        /**
+         * 移动端大修任务提醒
+         */
+        public static final String MOBILE_PLANNING_TASK = "mobilePlanningTask";
+
+        /**
+         * 设备部位重复故障问题提醒类型
+         */
+        public static final String DEVICE_REPEATEDLY_FAILS_NOTICETYPE = "device_repeatedly_fails";
+
+        /**
+         * 设备报废申请审批通过通知
+         */
+        public static final String EQU_SCRAP_TASK = "equscraptask";
+        /**
+         * 设备报废申请审批通过通知
+         */
+        public static final String PREVIOUS_UNFINISHED_TASK = "nextmonthmaintenance";
+        /**
+         * 设备报废申请审批通过通知
+         */
+        public static final String END_UNFINISHED_TASK = "endmonthmaintenance";
+
+        /**
+         * 故障停机提醒
+         */
+        public static final String FAUL_STOP_REMIND = "faultstopremind";
+
+
+        /**
+         * 每周点检异常问题提醒类型 生产
+         */
+        public static final String HIDDEN_DANGER_TASK_PRODUCTION = "productionHiddenDanger";
+        /**
+         * 每周点检异常问题提醒类型 维修
+         */
+        public static final String HIDDEN_DANGER_TASK_MAINTAIN = "maintainHiddenDanger";
+        /**
+         * 订单未及时评审提醒
+         */
+        public static final String ORDEROUTTIME_AUDIT = "orderouttimeaudit";
+        /**
+         * 辅料申购提醒
+         */
+        public static final String AUXILIARYMATERIAL_REMIND = "auxiliarymaterial";
+        /**
+         * 作业延期提醒
+         */
+        public static final String PROCESSDELAY_REMIND = "processdelay";
+        /**
+         * 报工不合格提醒
+         */
+        public static final String REPORTUNQUALIFY_REMIND = "reportunqualify";
+        /**
+         * 安全观察指标提醒
+         */
+        public static final String OBSERVATION_AUDIT = "observation";
+        /**
+         * 安全附件
+         */
+        public static final String SAFETY_ATTACHMENT_VERIFICATION = "safeAttachments";
+        /**
+         * 特种设备作业人员证书提醒
+         */
+        public static final String PERSONNEL_CERTIFICATES = "PersonnelCertificates";
+    }
+
+    public static class NotifyTitle {
+        /**
+         * 培训截止提醒
+         */
+        public static final String CUT_OFF_TRAIN_TITLE = "课程截止提醒";
+        /**
+         * 培训截止提醒
+         */
+        public static final String CUT_OFF_PAPER_TITLE = "考试截止提醒";
+        /**
+         * 我的培训
+         */
+        public static final String TRAIN_NOTIFY_TITLE = "考试提醒";
+
+        public static final String COURSE_NOTIFY_TITLE = "培训课程提醒";
+        /**
+         * 培训取消提醒
+         */
+        public static final String CANCEL_TRAIN_TITLE = "培训取消提醒";
+        /**
+         * 培训需求调查提醒
+         */
+        public static final String QUESTIONNAIRE_SURVEY_TITLE = "培训需求调查提醒";
+        /**
+         * 检查任务提醒
+         */
+        public static final String INSPECTION_TASKS_TITLE = "检查任务提醒";
+        /**
+         * 危险作业处罚提醒
+         */
+        public static final String DANGEROUS_TITLE = "危险作业处罚提醒";
+
+        /**
+         * 隐患任务提醒
+         */
+        public static final String DANGER_TASKS_TITLE = "隐患任务提醒";
+        /**
+         * 点巡检任务提醒
+         */
+        public static final String INSPECTION_TITLE = "点巡检任务提醒";
+
+        /**
+         * 隐患跟踪任务整改提现标题
+         */
+        public static final String RECTIFICATION_MAIL_TITLE = "隐患跟踪任务整改提醒";
+        /**
+         * 隐患跟踪任务验证提醒标题
+         */
+        public static final String VERIFICATION_MAIL_TITLE = "隐患跟踪任务验证提醒";
+        /**
+         * 隐患跟踪任务确认提醒标题
+         */
+        public static final String AFFIRM_MAIL_TITLE = "隐患跟踪任务确认提醒";
+        /**
+         * 保养检修工单提醒标题
+         */
+        public static final String MAINTAIN_SYSTEM_TITLE = "保养任务";
+
+        /**
+         * 保养检修工单提醒标题
+         */
+        public static final String ACCEPTANCE_SYSTEM_TITLE = "待验收保养任务";
+
+        /**
+         * 保养检修工单提醒标题
+         */
+        public static final String LUBRICATION_TASK_TITLE = "润滑任务提醒";
+
+        /**
+         * 大修任务超期提醒标题
+         */
+        public static final String PLANNING_TASK_TITLE = "大修任务超期提醒";
+        /**
+         * 设备部位重复故障问题提醒标题
+         */
+        public static final String DEVICE_REPEATEDLY_FAILS_TITLE = "设备部位重复故障问题提醒";
+
+
+        /**
+         * 设备报废申请审批通过通知
+         */
+        public static final String EQU_SCRAP_TITLE = "设备报废申请审批通过通知";
+
+        /**
+         * 故障停机提醒
+         */
+        public static final String FAUL_STOP_TITLE = "故障停机提醒";
+        /**
+         * 保养/润滑跨月未完成提醒
+         */
+        public static final String PREVIOUS_UNFINISHED_TASK_TITLE = "保养/润滑跨月未完成提醒";
+        /**
+         * 保养/润滑月末未完成提醒
+         */
+        public static final String END_UNFINISHED_TASK_TITLE = "保养/润滑月末未完成提醒";
+
+        /**
+         * 每周点检异常问题提醒
+         */
+        public static final String WEEK_HIDDEN_DANGER_TASK = "每周点检异常问题提醒";
+
+        /**
+         * 订单评审提醒
+         */
+        public static final String ORDEROUTTIMEAUDIT_TITLE = "订单评审提醒";
+
+        /**
+         * 辅料申购提醒
+         */
+        public static final String AUXILIARYMATERIAL_TITLE = "辅料申购提醒";
+
+        /**
+         * 作业延期提醒
+         */
+        public static final String PROCESSDELAY_TITLE = "订单作业未按计划完成";
+        /**
+         * 特种设备提醒
+         */
+        public static final String SPECIALEQUIPMENT_TITLE = "特种设备提醒";
+        /**
+         * 特种催办提醒
+         */
+        public static final String SPECIALEQUIPMENT_URGING_TITLE = "特种设备年检--催办提醒";
+        /**
+         * 安全附件催办提醒
+         */
+        public static final String SAFETY_ATTACHMENT_VERIFICATION_URGING_TITLE = "安全附件检验--催办提醒";
+        /**
+         * 报工不合格提醒
+         */
+        public static final String REPORTUNQUALIFY_TITLE = "订单作业报工不合格";
+        /**
+         * 安全观察指标提醒
+         */
+        public static final String OBSERVATION_TITLE = "安全观察指标提醒";
+        /**
+         * 安全附件检验提醒
+         */
+        public static final String SAFETY_ATTACHMENT_VERIFICATION_TITLE = "安全附件检验提醒";
+        /**
+         * 特种设备作业人员证书提醒
+         */
+        public static final String PERSONNEL_CERTIFICATES_TITLE = "特种设备人员证书年检提醒";
+        /**
+         * 特种设备作业人员证书提醒
+         */
+        public static final String PERSONNEL_CERTIFICATES_URGING_TITLE = "特种设备人员证书--催办提醒";
+        /**
+         * 设备年检
+         */
+        public static final String EQUIPMENT_CHECK_TITLE = "设备年检提醒";
+    }
+
+    public static class NotifyContent {
+        /**
+         * 特种设备催办提醒
+         */
+        public static final String SPECIAL_EQUIPMENT_URGING_CONTENT ="【设备年检--催办提醒】,您好,【%s】提醒您,有%d条特种设备年检数据还未处理,请尽快处理!!";
+        /**
+         * 安全附件--催办提醒
+         */
+        public static final String SAFETY_ATTACHMENT_VERIFICATION_URGING_CONTENT="【安全附件--催办提醒】,您好,【%s】提醒您,有%d条安全附件年检数据还未处理,请尽快处理!!";
+        /**
+         * 培训截止提醒内容
+         */
+        public static final String CUT_OFF_TRAIN_CONTENT = "【%s】,将于【%tF】截止,请及时完成培训!";
+        /**
+         * 培训截止提醒内容
+         */
+        public static final String CUT_OFF_PAPER_CONTENT = "【%s】,将于【%tF】截止,请及时完成考试!";
+        /**
+         * 考试试卷提醒内容
+         */
+        public static final String TRAIN_NOTIFY_CONTENT = "【%s】已发布,截止时间:【%tF】,请及时完成考试!";
+        /**
+         * 我的培训课程提醒内容
+         */
+        public static final String COURSE_NOTIFY_CONTENT = "培训课程:【%s】 已发布,培训时间:【%tF】至【%tF】,请及时完成培训!";
+        /**
+         * 培训课程取消提醒内容
+         */
+        public static final String CANCEL_TRAIN_CONTENT = "【%s】 已取消,请知悉!;";
+        /**
+         * 培训需求调查提醒内容
+         */
+        public static final String QUESTIONNAIRE_SURVEY_CONTENT = "【%s】年【%s】培训需求,已发布";
+        /**
+         * 检查任务提醒内容
+         */
+        public static final String INSPECTION_TASKS_CONTENT = "日常检查【%s】将于【%tF 】开始检查区域为%s-;-%s";
+        /**
+         * 危险作业处罚内容
+         */
+        public static final String DANGEROUS_CONTENT = "【%s】,作业时间:【%s】至【%s】,处罚金额:【%s】,处罚时间:【%s】";
+        /**
+         * 隐患任务提醒内容
+         */
+        public static final String DANGER_TASKS_CONTENT = "【%s】发现隐患任务请在【%tF】前整改完成";
+
+        /**
+         * 隐患任务确认提醒内容
+         */
+        public static final String DANGER_TASKS_CONFIRM_CONTENT = "隐患任务【%s】已整改请确认";
+        /**
+         * 隐患任务验证提醒内容
+         */
+        public static final String DANGER_TASKS_VERIFY_CONTENT = "隐患任务【%s】已整改并确认请验证";
+
+        /**
+         * 点巡检任务提醒
+         */
+        public static final String INSPECTION_CONTENT = "【%s】的【%s】【%s】【%s】任务请及时完成";
+        /**
+         * 保养检修工单提醒内容
+         */
+        public static final String MAINTAIN_SYSTEM_CONTENT = "请及时执行【%s】的【%s】的【%s】( 【%s】 )-【%s】的保养任务并登记保养结果,负责人:【%s】,其他保养工程师:【%s】";
+
+        /**
+         * 保养检修工单提醒内容
+         */
+        public static final String ACCEPTANCE_SYSTEM_CONTENT = "请及时对已完成保养登记的【%s-%s】的【%s】(【%s】 )【%s】的保养任务进行验收确认,(完成日期:【%s】,保养负责人:【%s】,其他保养工程师:【%s】";
+
+        /**
+         * 润滑任务提醒内容
+         */
+        public static final String LUBRICATION_TASK_CONTENT = "请及时执行【%d-%d】【%s】【%s】的【%s】(【%s 】 )的润滑任务,并及时登记润滑结果,润滑人:【%s】";
+
+        /**
+         * 大修任务超期提醒内容
+         */
+        public static final String PLANNING_TASK_CONTENT = "【%s】近一年大修任务有【%s】个大修任务现已超期未完成,请各车间相关负责人及时跟进处理并调促督协尽快完成,具体任务详见附件清单。";
+
+        /**
+         * 设备报废申请审批通过提醒内容
+         */
+        public static final String EQU_SCRAP_CONTENT = "【%s】于【%s】申请【%s】【%s】【%s】使用的设备进行报废处置申请已审批通过,系统已将该设备进行标记报废标记处理,此设备的相关保养、润滑相关计划请及时进行停用处理,请大家注意。";
+
+        /**
+         * 设备部位重复故障问题提醒内容
+         */
+        public static final String DEVICE_REPEATEDLY_FAILS_CONTEXT = "近三个月内设备部位重复故障问题提醒说明(含三个厂,各自独立),单个工厂对相同问题重复发生请大家互相学习解决方案并加以改进,具体信息详见提醒内容中附件表格。";
+
+        /**
+         * 故障停机提醒
+         */
+        public static final String FAUL_STOP_CONTEXT = "【%s】【%s】在【%s】发生停机故障(问题说明:【%s】),请及时安排维修工程跟进处理,(申请人/时间:【%s】【%s】)";
+
+
+        /**
+         * 保养/润滑跨月未完成提醒内容
+         */
+        public static final String PREVIOUS_UNFINISHED_TASK_CONTENT = "【%s】保养任务有【%s】个、润滑任务有【%s】个已经跨月未登记完成,请各车间相关保养负责人及时跟进处理,具体任务详见附件清单。";
+
+        /**
+         * 保养/润滑月末未完成提醒内容
+         */
+        public static final String END_UNFINISHED_TASK_CONTENT = "截止【%s】本月末【%s】有保养任务有【%s】个、润滑任务有【%s】个已经跨月未登记完成,请各车间相关保养负责人及时跟进处理,具体任务详见附件清单。";
+
+        public static final String HIDDEN_DANGER_TASK_CONTENT = "各车间在近一周内点巡检发现了【%d】个问题项,均已生成了隐患任务记录,请各部门车间及时安排人员对待整改问题及时跟踪处理,具体隐患信息详见附件清单";
+        /**
+         * 订单评审提醒内容
+         */
+        public static final String ORDEROUTTIME_AUDIT_CONTENT = "订单【%s】待评审,请及时处理";
+        /**
+         * 辅料申购提醒
+         */
+        public static final String AUXILIARYMATERIAL_CONTENT = "订单【%s】有辅料计划申购日期临近或到期,请及时申购";
+        /**
+         * 作业延期提醒
+         */
+        public static final String PROCESSDELAY_CONTENT = "订单【%s】有作业未按计划开工或完工,请及时调整计划";
+        /**
+         * 特种设备提醒内容前缀
+         */
+        public static final String SPECIALEQUIPMENT_CONTENT_PREFIX = "【设备年检提醒】,您好,有如下设备即将年检到期,请及时处理";
+        /**
+         * 特种设备提醒内容
+         */
+        public static final String SPECIALEQUIPMENT_CONTENT = "设备类型:【%s】,设备编号:【%s】,设备名称:【%s】,年检日期:【%s】";
+        /**
+         * 报工不合格提醒
+         */
+        public static final String REPORTUNQUALIFY_CONTENT = "报工检验不合格,请及时调整计划,详情参见邮件提醒";
+
+        /**
+         * 安全观察指标提醒
+         */
+        public static final String OBSERVATION_CONTENT = "新的安全观察目标值【%s】已下达,请及时完成!";
+        /**
+         * 安全附件
+         */
+        public static final String SAFETY_ATTACHMENT_VERIFICATION_CONTENT = " 您好,有如下安全附件即将年检到期,请及时处理!  名称:【%s】,编号:【%s】,检验/更换日期:【%tF】,下次检验/更换日期:【%tF】,负责人:【%s】";
+        /**
+         * 特种设备作业人员证书提醒
+         */
+        public static final String PERSONNEL_CERTIFICATES_CONTENT = "您好,有如下人员证书即将到期,请及时处理 姓名:【%s】,所属部门:【%s】证书类别:【%s】,复审日期:【%tF】";
+        /**
+         * 特种设备作业人员证书提醒
+         */
+        public static final String PERSONNEL_CERTIFICATES_URGING_CONTENT = "【特种设备人员证书--催办提醒】,您好,【%s】提醒您,有%d条特种设备人员证书年检数据还未处理,请尽快处理!!";
+        /**
+         * 设备年检
+         */
+        public static final String EQUIPMENT_CHECK_CONTENT = " 您好,有如下设备即将年检到期,请及时处理! 设备类型:【%s】,设备编号:【%s】,设备名称:【%s】,年检日期:【%tF】";
+    }
+
+    /**
+     * 模板路径
+     */
+    public static class TemplatePath {
+
+        /**
+         * 设备部位重复故障问题excel 模板名称
+         */
+        public static final String DEVICE_REPEATEDLY_FAILS_TEMPLATE_NAME = "template/设备部位重复故障问题.xls";
+
+
+    }
+
+    /**
+     * 模板路径
+     */
+    public static class FileName {
+
+
+        /**
+         * 设备部位重复故障问题 生成excel名称
+         */
+        public static final String DEVICE_REPEATEDLY_FAILS_FILE_NAME = "设备部位重复故障问题";
+
+        /**
+         * 大修任务超期未完成 生成excel名称
+         */
+        public static final String PLANNING_TASK_FILE_NAME = "大修任务超期未完成.xlsx";
+
+    }
+
+    public static class FileSuffix {
+        public static final String XLS = ".xls";
+        public static final String XLSX = ".xlsx";
+        public static final String DOC = ".doc";
+        public static final String DOCX = ".docx";
+    }
+
+    public static class ContentType {
+        public static final String XLS = "application/vnd.ms-excel";
+        public static final String XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
+        public static final String DOC = "application/msword";
+        public static final String ZIP = "application/octet-stream";
+        public static final String DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.template";
+        public static final String XML = "text/xml";
+    }
+
+    /**
+     * 时间格式
+     */
+    public static class DatePattern {
+        public static final String DATE_PATTERN_YM_CN = "yyyy年MM月";
+        public static final String DATE_PATTERN_YM = "yyyy-MM";
+        public static final String DATE_PATTERN_YMD_CN = "yyyy年MM月dd日";
+        public static final String DATE_PATTERN_YMD = "yyyy-MM-dd";
+        public static final String DATE_PATTERN_YMDHMS = "yyyy-MM-dd HH:mm:ss";
+        public static final String DATE_PATTERN_YMD_SLASH = "yyyy/MM/dd";
+        public static final String DATE_PATTERN_YM_UNDERLINE = "yyyy_MM";
+        public static final String DATE_PATTERN_YMD_POINT = "yyyy.MM.dd";
+    }
+
+    /**
+     * 角色编码
+     */
+    public static class RoleCode {
+        /**
+         * 设备部部门长
+         */
+        public static final String HOED = "hoed";
+        /**
+         * 设备部维修主管
+         */
+        public static final String EDMS = "edms";
+        /**
+         * 车间主任
+         */
+        public static final String LCZG = "lczg";
+        /**
+         * 车间维修主管
+         */
+        public static final String WMS = "wms";
+
+    }
+
+    /**
+     * 数据字典
+     */
+    public static class DictType {
+        /**
+         * 隐患任务- 任务来源
+         */
+        public static final String TASK_SOURCE_TYPE = "task_source_type";
+        /**
+         * 隐患类型
+         */
+        public static final String HIDDEN_DANGER_TYPE = "hidden_danger_type";
+        /**
+         * 跟踪状态
+         */
+        public static final String HIDDEN_DANGER_STATUS = "hidden_danger_status";
+    }
+
+    /**
+     * 加工方式
+     */
+    public static class ProcessWay {
+        /**
+         * 合并加工
+         */
+        public static final String PROCESS_WAY_MERGE = "合并加工";
+        /**
+         * 逐批加工
+         */
+        public static final String PROCESS_WAY_BATCH = "逐批加工";
+    }
+
+    /**
+     * 工序类型
+     */
+    public static class ProcessType {
+        /**
+         * 成退
+         */
+        public static final String PROCESS_TYPE_CHENTUI = "成退";
+        /**
+         * 中退
+         */
+        public static final String PROCESS_TYPE_ZHONGTUI = "中退";
+    }
+
+    public static class SchedulstatusTyep {
+        /**
+         * 待排程
+         */
+        public static final String SCHEDULSTATUS_TOSCHEDULE = "10";
+        /**
+         * 待发布
+         */
+        public static final String SCHEDULSTATUS_TORELEASE = "20";
+        /**
+         * 已发布
+         */
+        public static final String SCHEDULSTATUS_HASRELEASE = "30";
+    }
+
+    /**
+     * 是否锁定
+     */
+    public static class LockmarkType {
+        /**
+         * 是
+         */
+        public static final String LOCKMARK_Y = "y";
+        /**
+         * 否
+         */
+        public static final String LOCKMARK_N = "n";
+
+    }
+
+    /**
+     * 坯料计划生产状态
+     */
+    public static class ProductionStatus {
+        /**
+         * 已完工
+         */
+        public static final String COMPLETED = "50";
+        /**
+         * 加工中
+         */
+        public static final String PROCESSING = "40";
+        /**
+         * 待开工
+         */
+        public static final String TO_BE_STARTED = "30";
+        /**
+         * 待发布
+         */
+        public static final String TO_BE_PUBLISHED = "20";
+        /**
+         * 待排程
+         */
+        public static final String TO_BE_SCHEDULED = "10";
+    }
+
+    /**
+     * 生产状态
+     */
+    public static class SchedulingStatus {
+        /**
+         * 已发布
+         */
+        public static final String PUBLISHED = "30";
+        /**
+         * 待发布
+         */
+        public static final String TO_BE_PUBLISHED = "20";
+        /**
+         * 待排程
+         */
+        public static final String TO_BE_SCHEDULED = "10";
+    }
+
+    /**
+     * 作业状态
+     */
+    public static class JobStatus {
+        /**
+         * 待开工
+         */
+        public static final String JOBSTATUS_TO_BE_START = "待开工";
+        /**
+         * 加工中
+         */
+        public static final String JOBSTATUS_TO_BE_STARTING = "加工中";
+        /**
+         * 已完工
+         */
+        public static final String JOBSTATUS_TO_BE_END = "已完工";
+    }
+
+    public static class CloseStatus {
+        /**
+         * 未完工
+         */
+        public static final String UNFINISHED = "未完工";
+        /**
+         * 已完工
+         */
+        public static final String COMPLETED = "已完工";
+    }
+
+    /**
+     * 强制冲突描述
+     */
+    public static class ForcedConflictsDescription {
+        /**
+         * 工序作业所需的设备必须在工序的可选设备之内
+         */
+        public static final String EQ_TYPE_SAME = "工序作业所需的设备必须在工序的可选设备之内";
+        /**
+         * 第一步工序作业要小于开始排程时间
+         */
+        public static final String NO_PRE_GB_AFTER_NOW = "第一步工序作业要小于开始排程时间";
+        /**
+         * 当前工序作业开始时间违反上一步工序作业最大等待时间限制
+         */
+        public static final String HAS_ONE_PRE_GB_AFTER_NOW = "当前工序作业开始时间违反上一步工序作业最大等待时间限制";
+        /**
+         * 加工设备该加工时间段不可用
+         */
+        public static final String EQUIPMENT_RUN_TIME = "加工设备该加工时间段不可用";
+        /**
+         * 上一工序作业流转时间不能大于上一工序作业最大等待时间
+         */
+        public static final String LZ_TIME_LESS_MAX_WAIT = "上一工序作业流转时间不能大于上一工序作业最大等待时间";
+        /**
+         * 与加工设备其他作业加工时间重叠
+         */
+        public static final String EQ_TIME_CROSS = "与加工设备其他作业加工时间重叠";
+        /**
+         * 超出承诺交货期
+         */
+        public static final String EXCEEDING_THE_PROMISED_DELIVERY_DEADLINE = "超出承诺交货期";
+
+    }
+
+    /**
+     * 非强制冲突描述
+     */
+    public static class UNForcedConflictsDescription {
+        /**
+         * 订单交货期不满足
+         */
+        public static final String DELIVERY_DATE = "订单交货期不满足";
+        /**
+         * 订单的连续生产要求不满足
+         */
+        public static final String SERIES_PRODUCE = "订单的连续生产要求不满足";
+    }
+
+    /**
+     * 产品类型的外观 字典ID
+     */
+    public static class ProductionType {
+        /**
+         * 铝板ID
+         */
+        public static final String LVBAN_ID = "4a30f22e8c574b568b0715021f4641e8";
+        /**
+         * 板锭ID
+         */
+        public static final String BANDING_ID = "cc22dafdf4d845d4b9b4de23a57ab473";
+
+    }
+
+    /**
+     * 枚举数量单位
+     */
+    public static class CountUnit {
+        /**
+         * 千克、公斤
+         */
+        public static final String KG = "kg";
+        /**
+         * 吨
+         */
+        public static final String TON = "ton";
+    }
+
+    /**
+     * 在制品状态
+     */
+    public static class WorkInProgressStatus {
+        /**
+         * 待检验
+         */
+        public static final String WAIT_CHECK = "待检验";
+        /**
+         * 加工中
+         */
+        public static final String WORKING = "加工中";
+        /**
+         * 待加工
+         */
+        public static final String WAIT_WORK = "待加工";
+        /**
+         * 备料中
+         */
+        public static final String WAITING = "备料中";
+        /**
+         * 待入库
+         */
+        public static final String TO_BE_PUT_INTO_STORAGE = "待入库";
+    }
+
+    /**
+     * 在制品类型
+     */
+    public static class WorkInProgressType {
+        /**
+         * 合格在制品
+         */
+        public static final String PASS = "合格在制品";
+        /**
+         * 不良在制品
+         */
+        public static final String REJECTS = "不良在制品";
+
+    }
+
+    public static class CheckLevel {
+        /**
+         * B级
+         */
+        public static final String B = "B级";
+        /**
+         * BC级
+         */
+        public static final String B_C = "BC级";
+        /**
+         * 待判
+         */
+        public static final String WAITING_JUDGMENT = "待判";
+        /**
+         * 不合格
+         */
+        public static final String UNQUALIFIED = "不合格";
+    }
+
+    /**
+     * 外观类型
+     */
+    public static class BlankAppearanceType {
+        public static final String ALUMINUM_COIL = "铝卷";
+        public static final String ALUMINUM_PLATE = "铝板";
+        public static final String ALUMINUM_INGOT = "铝锭";
+    }
+
+    /**
+     * 生产问题管理 消息提醒
+     */
+    public static class IssuesListNotice {
+
+        public static final String ISSUES_NOTICE_NOTIFYTYPE= "question-notify";
+        public static final String ISSUES_NOTICE_NOTIFYTITLE= "流程催办通知";
+        public static final String ISSUES_NOTICE_SENDERID= "8672bf72ab274bec83052868ae336b38";
+        public static final String ISSUES_UNREAD_STATUS= "2";  // 未读
+        public static final String ISSUES_READ_STATUS= "1";  // 已读
+        public static final String ISSUES_REMARK_OLD ="old"; //提醒前缀标识
+        public static final String ISSUES_REMARK_NEW ="new";
+
+        public static final String ISSUES_EMAIL_TITLE ="生产问题审批超时提醒";
+    }
+
+    /**
+     * 保养检修任务
+     */
+    public static class EquMaintenanceTask {
+
+        //计划分类- 常规计划
+        public static final String PLANCLASSIFICATION_CONVENTIONALPLAN = "01";
+    }
+    /**
+     * 设备子系统——保养计划的保养部位
+     */
+    public static class EquMaintenancePart {
+        public static final Integer MAINTENANCE_PART_MONTH_Y = 1; //月份选择是,值为1
+
+    }
+
+    /**
+     * 人员信息 -默认值
+     */
+    public static class SysUser{
+        //设备子系统ID,NAME
+        public static final String DEVICESUBSYSTEMID = "b6ab1e33b3464fdd996145f8715c605e";
+        public static final String DEVICESUBSYSTEMNAME = "设备子系统";
+
+        public static final Map<String, String> CHECKIETM_MANAGEMENT_MAP = new HashMap<String, String>() {{
+            put("10", "正常");
+            put("20", "禁用");
+            put("30", "报修关注");
+            put("50", "/");
+        }};
+    }
+}

+ 45 - 0
bs-common/src/main/java/com/rongwei/safecommon/vo/CommonGenerateExcelVo.java

@@ -0,0 +1,45 @@
+package com.rongwei.safecommon.vo;
+
+import lombok.Data;
+
+import java.util.Map;
+import java.util.function.Function;
+
+/**
+ * CommonGenerateExcelVo class
+ *
+ * @author XH
+ * @date 2024/02/01
+ */
+@Data
+public class CommonGenerateExcelVo<T> {
+    /**
+     * 对应的字段描述
+     */
+    private String filedDesc;
+
+    /**
+     * 对应字段的get方法
+     */
+    private Function<T, Object> getOrgNameFunction;
+
+    /**
+     * 固定值
+     */
+    private Object fileValue;
+
+    /**
+     * 时间格式转化
+     */
+    private String datePattern;
+
+    /**
+     * 数据字典值集编号
+     */
+    private String  dictType;
+
+    /**
+     * 数据字典集合
+     */
+    private Map<String, Object> customDictMap;
+}

+ 29 - 0
bs-common/src/main/java/com/rongwei/safecommon/vo/ExportExcelCommonVo.java

@@ -0,0 +1,29 @@
+package com.rongwei.safecommon.vo;
+
+import com.rongwei.safecommon.utils.SaveConstans;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * ExportExcelCommonDTO class
+ *
+ * @author XH
+ * @date 2022/10/20
+ */
+@Data
+public class ExportExcelCommonVo {
+    /**
+     * excel文件名称
+     */
+    private String excelFileName;
+
+    /**
+     * excel文件后缀
+     */
+    private String excelFileSuffix= SaveConstans.FileSuffix.XLS;;
+    // 文件夹编码
+    private String folderCode;
+
+    private List<CommonGenerateExcelVo> excelFieldDescDTOList;
+}

+ 81 - 0
master-data/master-data-common/pom.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>master-data</artifactId>
+        <groupId>com.rongwei</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>master-data-common</artifactId>
+
+    <properties>
+        <mysql.version>8.0.11</mysql.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.rongwei</groupId>
+            <artifactId>master-data-entity</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.rongwei</groupId>
+            <artifactId>bs-common</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-generator</artifactId>
+            <version>3.1.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity-engine-core</artifactId>
+            <version>2.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>${mysql.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.freemarker</groupId>
+            <artifactId>freemarker</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.rongwei</groupId>
+            <artifactId>bs-common</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.rongwei</groupId>
+            <artifactId>wf-common</artifactId>
+            <version>1.1-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>core</artifactId>
+            <version>3.4.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>javase</artifactId>
+            <version>3.4.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.oracle.database.jdbc</groupId>
+            <artifactId>ojdbc8</artifactId>
+            <version>19.7.0.0</version>
+        </dependency>
+
+    </dependencies>
+</project>

+ 60 - 0
master-data/master-data-common/src/main/java/com/rongwei/bscommon/sys/utils/QRCodeGenerator.java

@@ -0,0 +1,60 @@
+package com.rongwei.bscommon.sys.utils;
+
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.EncodeHintType;
+import com.google.zxing.WriterException;
+import com.google.zxing.common.BitMatrix;
+import com.google.zxing.qrcode.QRCodeWriter;
+import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
+import com.google.zxing.client.j2se.MatrixToImageWriter;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
+import java.util.HashMap;
+import java.util.Map;
+import javax.imageio.ImageIO;
+import java.awt.image.BufferedImage;
+import java.util.Base64;
+
+public class QRCodeGenerator {
+
+    public static String stringToQRCodeBase64(String text, int width, int height, String fileType) {
+
+
+        try {
+            BufferedImage qrCodeImage = generateQRCodeImage(text, width, height);
+            String base64String = convertImageToBase64(qrCodeImage, fileType);
+            return base64String;
+        } catch (WriterException | IOException e) {
+            System.err.println("Could not generate QR Code: " + e.getMessage());
+            return null;
+        }
+    }
+
+    private static BufferedImage generateQRCodeImage(String text, int width, int height) throws WriterException {
+        QRCodeWriter qrCodeWriter = new QRCodeWriter();
+        Map<EncodeHintType, Object> hints = new HashMap<>();
+        hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
+        hints.put(EncodeHintType.CHARACTER_SET, "UTF-8");
+        BitMatrix bitMatrix = qrCodeWriter.encode(text, BarcodeFormat.QR_CODE, width, height, hints);
+
+        return MatrixToImageWriter.toBufferedImage(bitMatrix);
+    }
+
+    private static String convertImageToBase64(BufferedImage image, String fileType) throws IOException {
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        ImageIO.write(image, fileType, outputStream);
+        byte[] imageBytes = outputStream.toByteArray();
+        return Base64.getEncoder().encodeToString(imageBytes);
+    }
+
+    public static void main(String[] args) {
+        String text = "https://www.example.com";
+        int width = 120;
+        int height = 120;
+        String fileType = "png";
+        stringToQRCodeBase64(text, width, height, fileType);
+    }
+}

+ 360 - 0
master-data/master-data-common/src/main/java/com/rongwei/bscommon/sys/utils/StringUtil.java

@@ -0,0 +1,360 @@
+package com.rongwei.bscommon.sys.utils;
+
+import org.apache.commons.lang3.BooleanUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Arrays;
+import java.util.UUID;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author bootdo
+ */
+public class StringUtil extends org.apache.commons.lang3.StringUtils {
+
+    public static final char UNDERLINE = '_';
+    // 科学计数法的正则表达式
+    private static String scientificNotationPattern = "^[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$";
+
+    /**
+     * 驼峰格式字符串转换为下划线格式字符串
+     *
+     * @param param
+     * @return
+     */
+    public static String camelToUnderline(String param) {
+        if (param == null || "".equals(param.trim())) {
+            return "";
+        }
+        int len = param.length();
+        StringBuilder sb = new StringBuilder(len);
+        for (int i = 0; i < len; i++) {
+            char c = param.charAt(i);
+            if (Character.isUpperCase(c)) {
+                sb.append(UNDERLINE);
+                sb.append(Character.toLowerCase(c));
+            } else {
+                sb.append(c);
+            }
+        }
+        return sb.toString();
+    }
+
+
+    /**
+     * 下划线格式字符串转换为驼峰格式字符串
+     *
+     * @param param
+     * @return
+     */
+    public static String underlineToCamel(String param) {
+        if (param == null || "".equals(param.trim())) {
+            return "";
+        }
+        int len = param.length();
+        StringBuilder sb = new StringBuilder(len);
+        for (int i = 0; i < len; i++) {
+            char c = param.charAt(i);
+            if (c == UNDERLINE) {
+                if (++i < len) {
+                    sb.append(Character.toUpperCase(param.charAt(i)));
+                }
+            } else {
+                sb.append(c);
+            }
+        }
+        return sb.toString();
+    }
+
+    /**
+     * 下划线格式字符串转换为驼峰格式字符串2
+     *
+     * @param param
+     * @return
+     */
+    public static String underlineToCamel2(String param) {
+        if (param == null || "".equals(param.trim())) {
+            return "";
+        }
+        StringBuilder sb = new StringBuilder(param);
+        Matcher mc = Pattern.compile("_").matcher(param);
+        int i = 0;
+        while (mc.find()) {
+            int position = mc.end() - (i++);
+            sb.replace(position - 1, position + 1, sb.substring(position, position + 1).toUpperCase());
+        }
+        return sb.toString();
+    }
+
+    /**
+     * 得到二位数的序号
+     *
+     * @param num
+     * @return
+     */
+    public static String getNextCode(Integer num) {
+        if (num == null || num == 0) {
+            return "001";
+        } else if (num > 0 && num < 9) {
+            return "00" + (num + 1) + "";
+        } else if (num == 9) {
+            return "010";
+        } else if (num >= 10 && num < 98) {
+            return "0" + (num + 1) + "";
+        } else if (num == 99) {
+            return "100";
+        } else {
+            return (num + 1) + "";
+        }
+    }
+
+
+    /**
+     * 将传入的对象转换为字符串,当传入的对象为null时返回默认值
+     * bw.ren  2019年6月3日09:46:33
+     *
+     * @param o
+     * @param dv
+     * @return
+     */
+    public static String safeToString(Object o, String dv) {
+        String r = dv;
+        if (o != null) {
+            r = String.valueOf(o);
+        }
+        return r;
+    }
+
+    /**
+     * 获得用户远程地址
+     */
+    public static String getRemoteAddr(HttpServletRequest request) {
+        String remoteAddr = request.getHeader("X-Real-IP");
+        if (isNotBlank(remoteAddr)) {
+            remoteAddr = request.getHeader("X-Forwarded-For");
+        } else if (isNotBlank(remoteAddr)) {
+            remoteAddr = request.getHeader("Proxy-Client-IP");
+        } else if (isNotBlank(remoteAddr)) {
+            remoteAddr = request.getHeader("WL-Proxy-Client-IP");
+        }
+        return remoteAddr != null ? remoteAddr : request.getRemoteAddr();
+    }
+
+    /**
+     * 如果对象为空,则使用defaultVal值
+     * see: ObjectUtils.toString(obj, defaultVal)
+     *
+     * @param obj
+     * @param defaultVal
+     * @return
+     */
+    public static String toString(final Object obj, final String defaultVal) {
+        return obj == null ? defaultVal : obj.toString();
+    }
+
+    /**
+     * 转换为Boolean类型
+     * 'true', 'on', 'y', 't', 'yes' or '1' (case insensitive) will return true. Otherwise, false is returned.
+     */
+    public static Boolean toBoolean(final Object val) {
+        if (val == null) {
+            return false;
+        }
+        return BooleanUtils.toBoolean(val.toString()) || "1".equals(val.toString());
+    }
+
+    public static boolean isNumericzidai(String str) {
+        Pattern pattern = Pattern.compile("-?[0-9]+\\.?[0-9]*");
+        Matcher isNum = pattern.matcher(str);
+        if (!isNum.matches()) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * 正则:手机号(简单), 1字头+10位数字即可.
+     *
+     * @param in
+     * @return
+     */
+    public static boolean validateMobilePhone(String in) {
+        Pattern pattern = Pattern.compile("^[1]\\d{10}$");
+        return pattern.matcher(in).matches();
+    }
+
+    /**
+     * 正则:邮箱
+     *
+     * @param in
+     * @return
+     */
+    public static boolean validateEmail(String in) {
+        Pattern pattern = Pattern.compile("[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}");
+        return pattern.matcher(in).matches();
+    }
+
+
+
+    /**
+     * 是否是数字
+     * @param value
+     */
+    public static boolean isNum(String value){
+        Pattern p=null;//正则表达式
+        Matcher m=null;//操作符表达式
+        boolean b=false;
+        p=p.compile("^([+-]?)\\d*\\.?\\d+$");
+        m=p.matcher(value);
+        b=m.matches();
+        return b;
+    }
+
+    /**
+     * 根据正则截取字符串
+     * @return
+     */
+    public static String InterceptString(String projectName) {
+        Pattern pattern = Pattern.compile(".*?(?=\\()");
+        Matcher matcher = pattern.matcher(projectName);
+        while(matcher.find()){
+            return matcher.group();
+        }
+        return null;
+    }
+
+    
+    
+    /**
+     * 判断是否是身份证号
+     * @param cardNo
+     * @return
+     */
+    public static boolean isCard(String cardNo){
+        String regularExpression = "(^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|" +
+                "(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)";
+        boolean matches = cardNo.matches(regularExpression);
+        //判断第18位校验值
+        if (matches) {
+            if (cardNo.length() == 18) {
+                try {
+                    char[] charArray = cardNo.toCharArray();
+                    //前十七位加权因子
+                    int[] idCardWi = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2};
+                    //这是除以11后,可能产生的11位余数对应的验证码
+                    String[] idCardY = {"1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"};
+                    int sum = 0;
+                    for (int i = 0; i < idCardWi.length; i++) {
+                        int current = Integer.parseInt(String.valueOf(charArray[i]));
+                        int count = current * idCardWi[i];
+                        sum += count;
+                    }
+                    char idCardLast = charArray[17];
+                    int idCardMod = sum % 11;
+                    if (idCardY[idCardMod].toUpperCase().equals(String.valueOf(idCardLast).toUpperCase())) {
+                        return true;
+                    } else {
+                        System.out.println("身份证最后一位:" + String.valueOf(idCardLast).toUpperCase() +
+                                "错误,正确的应该是:" + idCardY[idCardMod].toUpperCase());
+                        return false;
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    System.out.println("异常:" + cardNo);
+                    return false;
+                }
+            }
+        }
+        return matches;
+    }
+
+        public static void main(String[] args) {
+            boolean a = isScience("123456");
+            System.out.print(a);
+        }
+
+    /**
+     * 根据正则截取字符串
+     * @return
+     */
+    public static int getArrayElementPosition(String[] actualWeldInfo,String actualWeld) {
+        Arrays.sort(actualWeldInfo);
+        int position = Arrays.binarySearch(actualWeldInfo, actualWeld);
+        return position;
+    }
+
+    /**
+     * 格式化字符串中的小数点
+     */
+    public static String formatDecimal(String str) {
+        str =  str.replaceAll("[.](.*)","");
+        return str;
+    }
+
+    /**
+     * 四舍五入小数
+     */
+    public static String formatDecimalFiveIn(String str) {
+        str =  String.valueOf(Math.round(Float.parseFloat(str)));
+        return str;
+    }
+
+    public static int querySpecificCharacter(String flawInspectCode) {
+        int count = 0;
+        int strLength = flawInspectCode.length();
+        String searchChar = "R";
+        flawInspectCode = flawInspectCode.replace(searchChar, "");
+        int newLength = flawInspectCode.length();
+        count = strLength - newLength;
+        return count;
+    }
+
+    public static String getUUID(){
+        String uuid = UUID.randomUUID().toString().replaceAll("-","");
+        return uuid;
+    }
+
+    /**
+     * 在特定符号前插入字符串
+     * @return
+     */
+    public static String insertSpecificCharacter(String character,String charsToInsert){
+        String formatCharacter = "";
+        if (isNotBlank(character)&&isNotBlank(charsToInsert)){
+            // 在.号之前插入特殊字符
+            int indexOfSpace = character.indexOf(".");
+            if (indexOfSpace != -1) {
+                StringBuilder sb = new StringBuilder();
+                sb.append(character);
+                // 在索引为index处插入字符chars
+                sb.insert(indexOfSpace, charsToInsert);
+                formatCharacter = sb.toString();
+            }
+        }
+        return formatCharacter;
+    }
+
+    /**
+     * 判断是否包含字母
+     * @param ret
+     * @return
+     */
+    public static boolean isScience(String ret) {
+            return ret.matches(scientificNotationPattern);
+        }
+
+    /**
+     * 截取最后特殊符号前的数据
+     * @return
+     */
+    public static String getSubstringBeforeLastStar(String str,String symbol){
+        int lastIndex = str.lastIndexOf(symbol);
+        if (lastIndex!= -1) {
+            return str.substring(0, lastIndex);
+        }
+        return str;
+    }
+
+
+}

+ 44 - 0
master-data/master-data-entity/pom.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>master-data</artifactId>
+        <groupId>com.rongwei</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>master-data-entity</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.rongwei</groupId>
+            <artifactId>rw-common-config</artifactId>
+            <version>1.1-SNAPSHOT</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.rongwei</groupId>
+                    <artifactId>rw-common-license</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+            <version>3.5.0</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.rongwei</groupId>
+            <artifactId>rw-common-utils</artifactId>
+            <version>1.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>com.rongwei</groupId>
+            <artifactId>wf-entity</artifactId>
+            <version>1.1-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+</project>

+ 87 - 0
master-data/master-data-server/pom.xml

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>master-data</artifactId>
+        <groupId>com.rongwei</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>master-data-server</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.rongwei</groupId>
+            <artifactId>master-data-common</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- Spring Cloud Begin -->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.nacos</groupId>
+            <artifactId>nacos-client</artifactId>
+            <version>1.4.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-freemarker</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-jdbc</artifactId>
+        </dependency>
+
+        <!-- druid -->
+        <dependency>
+            <groupId>com.github.drtrang</groupId>
+            <artifactId>druid-spring-boot2-starter</artifactId>
+            <version>1.1.10</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 23 - 0
master-data/master-data-server/src/main/java/com/rongwei/MasterDataServerApplication.java

@@ -0,0 +1,23 @@
+package com.rongwei;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+@EnableAsync
+@SpringBootApplication
+@EnableDiscoveryClient
+@EnableFeignClients
+@MapperScan({"com.rongwei.*.*.dao", "com.rongwei.*.*.*.dao"})
+@EnableScheduling
+public class MasterDataServerApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(MasterDataServerApplication.class, args);
+    }
+
+}

+ 13 - 0
master-data/master-data-server/src/main/resources/bootstrap-dev.yml

@@ -0,0 +1,13 @@
+spring:
+  cloud:
+    nacos:
+      config:
+        file-extension: yaml
+        server-addr: 127.0.0.1:8848
+        namespace: cd047569-9470-4dfb-8663-b113d01cd30f
+        ext-config[0]:
+          data-id: common-config.yaml
+      discovery:
+        server-addr: 127.0.0.1:8848
+        namespace: cd047569-9470-4dfb-8663-b113d01cd30f
+

+ 10 - 0
master-data/master-data-server/src/main/resources/bootstrap-pro.yml

@@ -0,0 +1,10 @@
+spring:
+  cloud:
+    nacos:
+      config:
+        file-extension: yaml
+        server-addr: 127.0.0.1:8848
+        namespace: 75f91d9a-0dd2-4dd9-98f6-61a221d396f1
+      discovery:
+        server-addr: 127.0.0.1:8848
+        namespace: 75f91d9a-0dd2-4dd9-98f6-61a221d396f1

+ 58 - 0
master-data/master-data-server/src/main/resources/bootstrap.yml

@@ -0,0 +1,58 @@
+spring:
+  main:
+    allow-bean-definition-overriding: true
+  profiles:
+    active: dev
+  application:
+    name: master-data-server
+  jta:
+    atomikos:
+      properties:
+        log-base-name: master-data-log
+  servlet:
+    multipart:
+      max-file-size: 100MB
+      max-request-size: 1000MB
+  jackson:
+    time-zone: GMT+8
+    date-format: yyyy-MM-dd HH:mm:ss
+server:
+  port: 9688
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+feign:
+  client:
+    config:
+      default:
+        connectTimeout: 5000
+        readTimeout: 18000000
+  sentinel:
+    enabled: true
+jwt:
+  token-header: Authorization
+  expire: 14400
+  rsa-secret: xx1WET12^%3^(WE45
+client:
+  id: ace-auth
+  secret: 123456
+  token-header: x-client-token
+  expire: 14400
+  rsa-secret: x2318^^(*WRYQWR(QW&T
+mybatis-plus:
+  configuration:
+    #    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
+    map-underscore-to-camel-case: false
+  #basepackage: com.rongwei.rwadmin.system.dao
+  xmlLocation: classpath:mybatis/**/*Dao.xml
+  mapperLocations: "classpath:mybatis/**/*Dao.xml"
+  typeAliasesPackage: com.rongwei.bsentity.domain
+  global-config:
+    db-config:
+      logic-delete-value: 1
+      logic-not-delete-value: 0
+      column-like: true

+ 52 - 0
master-data/master-data-server/src/main/resources/logback-spring.xml

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration  scan="true" scanPeriod="60 seconds" debug="false">
+    <contextName>logback</contextName>
+    <!--输出到控制台-->
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d{HH:mm:ss} [%X{traceId}] [%thread] %-5level %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <!--按天生成日志-->
+    <appender name="logFile"  class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <Prudent>true</Prudent>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <FileNamePattern>
+                master-data-log/%d{yyyy-MM-dd}/%d{yyyy-MM-dd}.%i.log
+            </FileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>5MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+        </rollingPolicy>
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+        <layout class="ch.qos.logback.classic.PatternLayout">
+            <Pattern>
+                %d{yyyy-MM-dd HH:mm:ss} [%X{traceId}] [%thread] %-5level -%msg%n
+            </Pattern>
+        </layout>
+    </appender>
+
+    <springProfile name="prod">
+        <logger name="com.bootdo" additivity="false">
+            <appender-ref ref="logFile" />
+        </logger>
+
+        <root level="error">
+            <appender-ref ref="logFile" />
+        </root>
+    </springProfile>
+
+    <springProfile name="dev">
+        <logger name="com.bootdo" additivity="false">
+            <appender-ref ref="console"/>
+            <appender-ref ref="logFile" />
+        </logger>
+
+        <root level="error">
+            <appender-ref ref="console"/>
+            <appender-ref ref="logFile" />
+        </root>
+    </springProfile>
+</configuration>

+ 46 - 0
master-data/pom.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>master-data-core</artifactId>
+        <groupId>com.rongwei</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.rongwei</groupId>
+    <artifactId>master-data</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <modules>
+        <module>master-data-server</module>
+        <module>master-data-common</module>
+        <module>master-data-entity</module>
+    </modules>
+
+    <properties>
+        <mapper.version>3.4.0</mapper.version>
+        <maven.compile.source>1.8</maven.compile.source>
+        <maven.compile.target>1.8</maven.compile.target>
+        <fastjson.version>1.2.31</fastjson.version>
+    </properties>
+
+    <packaging>pom</packaging>
+
+    <dependencies>
+        <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.16.14</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>${fastjson.version}</version>
+        </dependency>
+    </dependencies>
+</project>

+ 154 - 0
pom.xml

@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.rongwei</groupId>
+    <artifactId>master-data-core</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <modules>
+        <module>bs-common</module>
+        <module>master-data</module>
+    </modules>
+
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.1.2.RELEASE</version>
+    </parent>
+
+    <properties>
+        <!--<docker.image.prefix>ag</docker.image.prefix>-->
+        <!--<docker.plugin.version>0.4.13</docker.plugin.version>-->
+        <mapper.version>3.4.0</mapper.version>
+        <maven.compile.source>1.8</maven.compile.source>
+        <maven.compile.target>1.8</maven.compile.target>
+        <fastjson.version>1.2.31</fastjson.version>
+        <!--<boot.admin.client>2.1.2</boot.admin.client>-->
+    </properties>
+
+    <packaging>pom</packaging>
+
+    <dependencies>
+        <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.16.14</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>${fastjson.version}</version>
+        </dependency>
+    </dependencies>
+
+    <repositories>
+        <repository>
+            <id>oss</id>
+            <name>oss</name>
+            <url>https://oss.sonatype.org/content/groups/public</url>
+        </repository>
+        <repository>
+            <id>spring-milestones</id>
+            <name>Spring Milestones</name>
+            <url>https://repo.spring.io/libs-milestone</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>sonatype-nexus-snapshots</id>
+            <name>Sonatype Nexus Snapshots</name>
+            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
+        </repository>
+    </repositories>
+
+    <!--依赖管理,用于管理spring-cloud的依赖,其中Camden.SR3是版本号-->
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>Greenwich.RELEASE</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>fastjson</artifactId>
+                <version>1.2.33</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-alibaba-dependencies</artifactId>
+                <version>0.2.1.RELEASE</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <distributionManagement>
+        <snapshotRepository>
+            <id>ossrh</id>
+            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+        </snapshotRepository>
+        <repository>
+            <id>ossrh</id>
+            <name>Maven Central Staging Repository</name>
+            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+        </repository>
+    </distributionManagement>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>${maven-compiler-plugin.version}</version>
+                <configuration>
+                    <source>${maven.compile.source}</source>
+                    <target>${maven.compile.target}</target>
+                    <encoding>${project.build.sourceEncoding}</encoding>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <version>2.4</version>
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                            <goal>jar-no-fork</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <version>2.8.2</version>
+            </plugin>
+            <!--<plugin>-->
+            <!--<groupId>org.apache.maven.plugins</groupId>-->
+            <!--<artifactId>maven-javadoc-plugin</artifactId>-->
+            <!--<version>2.10.3</version>-->
+            <!--<executions>-->
+            <!--<execution>-->
+            <!--<id>attach-javadocs</id>-->
+            <!--<goals>-->
+            <!--<goal>jar</goal>-->
+            <!--</goals>-->
+            <!--</execution>-->
+            <!--</executions>-->
+            <!--</plugin>-->
+        </plugins>
+    </build>
+
+</project>