From 8ef9e366be48dc5e8e52617ea8ed48b37a0e1f74 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期四, 29 二月 2024 14:33:58 +0800
Subject: [PATCH] 在线部署功能上传,标准申请接口bug修改
---
Source/ExampleIntegratedPushCalled/.idea/jarRepositories.xml | 35 +
Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/PushIntegrationController.java | 89 ++
Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/config/SecurityConfiguration.java | 17
Source/ExampleIntegratedPushCalled/.idea/.gitignore | 8
Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/ExampleIntgraPushCallApplication.java | 18
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/util/HttpUtils.java | 16
Source/UBCS/LICENSE | 35 -
Source/UBCS/pom.xml | 4
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/webService/config/VciCxfPublishConfig.java | 2
Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/TestCalledIntegrationController.java | 9
Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/security/InternalAuthorizationManager.java | 12
Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/util/HttpUtils.java | 205 ++++++
Source/UBCS-WEB/src/components/service-deploy/uploadServiceJarDialog.vue | 2
Source/UBCS/ubcs-gateway/pom.xml | 11
Source/ExampleIntegratedPushCalled/target/classes/application.yml | 12
Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/security/CustomAuthenticationManager.java | 31
Source/ExampleIntegratedPushCalled/.idea/easyCodeTableSetting.xml | 694 +++++++++++++++++++++
Source/ExampleIntegratedPushCalled/.idea/compiler.xml | 13
Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/config/CustomUserDetailsService.java | 32 +
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java | 110 --
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeDuckingSyncServiceImpl.java | 209 ++++++
Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/entity/RequestData.java | 29
Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/impl/CalledIntegrationServiceImpl.java | 30
Source/UBCS/ubcs-ops/ubcs-admin/pom.xml | 32
Source/ExampleIntegratedPushCalled/src/main/resources/application.yml | 12
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/MdmEngineService.java | 20
Source/UBCS/ubcs-service/ubcs-deploy/src/main/java/com/vci/ubcs/deploy/service/impl/DeployAppsServiceImpl.java | 32
Source/UBCS-WEB/src/views/system/deploy.vue | 11
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/DockingSystemConfig.java | 6
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java | 73 +
Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/MyServiceTest.java | 64 ++
Source/ExampleIntegratedPushCalled/编码资源管理系统集成统一接口json参数示例 | 0
Source/ExampleIntegratedPushCalled/.idea/misc.xml | 17
Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/ICalledIntegrationService.java | 23
Source/UBCS/ubcs-service-api/ubcs-deploy-api/pom.xml | 2
35 files changed, 1,720 insertions(+), 195 deletions(-)
diff --git a/Source/ExampleIntegratedPushCalled/.idea/.gitignore b/Source/ExampleIntegratedPushCalled/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/Source/ExampleIntegratedPushCalled/.idea/compiler.xml b/Source/ExampleIntegratedPushCalled/.idea/compiler.xml
new file mode 100644
index 0000000..9f7368d
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/.idea/compiler.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CompilerConfiguration">
+ <annotationProcessing>
+ <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="ExampleIntegratedPushCalled" />
+ </profile>
+ </annotationProcessing>
+ </component>
+</project>
\ No newline at end of file
diff --git a/Source/ExampleIntegratedPushCalled/.idea/easyCodeTableSetting.xml b/Source/ExampleIntegratedPushCalled/.idea/easyCodeTableSetting.xml
new file mode 100644
index 0000000..993a4b5
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/.idea/easyCodeTableSetting.xml
@@ -0,0 +1,694 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="EasyCodeTableSetting">
+ <option name="tableInfoMap">
+ <map>
+ <entry key="UBCS_MDM.PL_CODE_BASICSEC">
+ <value>
+ <TableInfoDTO>
+ <option name="fullColumn">
+ <list>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="oid" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="revisionoid" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="nameoid" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="btmname" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="lastr" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="firstr" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="lastv" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="firstv" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="creator" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="createtime" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="lastmodifier" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="lastmodifytime" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="revisionrule" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="versionrule" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="revisionseq" />
+ <option name="type" value="java.lang.Long" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="revisionvalue" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="versionseq" />
+ <option name="type" value="java.lang.Long" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="versionvalue" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="lctid" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="lcstatus" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="ts" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="id" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="name" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="description" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="owner" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="copyfromversion" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="sectype" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="pkcoderule" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="ordernum" />
+ <option name="type" value="java.lang.Long" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="getvalueclass" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="codedateformatstr" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="codeseclengthtype" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="codeseclength" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="codeleveltype" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="codelevelvalue" />
+ <option name="type" value="java.lang.Long" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="valuecutlength" />
+ <option name="type" value="java.lang.Long" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="valuecuttype" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="codegetvaluetype" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="refercodeclassifyoid" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="referconfig" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="refervalueinfo" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="filtersql" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="serialstart" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="serialstep" />
+ <option name="type" value="java.lang.Long" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="codefilltype" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="codefilltypetext" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="codefillseparator" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="codefilllength" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="codefilllimit" />
+ <option name="type" value="java.lang.Long" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="codefillflag" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="customcodeserialclass" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="matchclassifyvalueflag" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="parentclassifysecoid" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="nullableflag" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="componentcodeflag" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="serialdependflag" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="displayflag" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="serialdependorder" />
+ <option name="type" value="java.lang.Long" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="referattributename" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="referattributeid" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="referbtmname" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="referbtmid" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ </list>
+ </option>
+ <option name="name" value="PlCodeBasicsec" />
+ <option name="preName" value="" />
+ <option name="saveModelName" value="ubcs-omd-api" />
+ <option name="savePackageName" value="" />
+ <option name="savePath" value="$USER_HOME$/Desktop" />
+ <option name="templateGroupName" value="Default" />
+ </TableInfoDTO>
+ </value>
+ </entry>
+ <entry key="UBCS_MDM.PL_CODE_REFERCONFIG">
+ <value>
+ <TableInfoDTO>
+ <option name="comment" value="鍙傜収閰嶇疆琛�" />
+ <option name="fullColumn">
+ <list>
+ <ColumnInfoDTO>
+ <option name="comment" value="涓婚敭" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="oid" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="revisionoid" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="nameoid" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="btmname" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="lastr" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="firstr" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="lastv" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="firstv" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="creator" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="createtime" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="revisionseq" />
+ <option name="type" value="java.lang.Long" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="revisionvalue" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="versionseq" />
+ <option name="type" value="java.lang.Long" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="versionvalue" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="lctid" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="lcstatus" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="ts" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="name" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="description" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="owner" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="copyfromversion" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="ordernum" />
+ <option name="type" value="java.lang.Long" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鍙傜収鐨勪笟鍔$被鍨�" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="refertype" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鏄剧ず鐨勫睘鎬�" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="textfield" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="瀛樺偍鍊肩殑灞炴��" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="valuefield" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鍙傜収绐楀彛绫诲瀷" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="type" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鑷畾涔夌殑鍚庡彴璺緞" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="url" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鏈嶅姟鐨勫湴鍧�" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="backpath" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="璇锋眰鍚庡彴鐨勫崗璁柟寮�" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="method" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="绐楀彛鏄剧ず鐨勯珮搴�" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="height" />
+ <option name="type" value="java.lang.Long" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="杩囨护灞炴�ц姹傚弬鏁�" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="paramforformkey" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鏄惁澶氶��" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="ismuti" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鏄犲皠鍏朵粬灞炴��" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="mapfields" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鍙傝�冪殑UI涓婁笅鏂�" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="refercontent" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="骞冲彴鐨勮〃鏍肩紪鍙�" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="displaytable" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="姣忛〉鏄剧ず鏉℃暟" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="limit" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鎺掑簭瀛楁" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="sortfield" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鎺掑簭绫诲瀷" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="sorttype" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鏍戝舰鐨勪笂绾у睘鎬�" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="parentfieldname" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="涓婄骇灞炴�у�煎搴斿睘鎬�" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="parentusedfield" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鏍硅妭鐐圭殑鍊�" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="parentvalue" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鏍戝姞杞芥柟寮�" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="loadtype" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ <ColumnInfoDTO>
+ <option name="comment" value="鏄惁鍙兘閫夋嫨鍙跺瓙鑺傜偣" />
+ <option name="custom" value="false" />
+ <option name="ext" value="{}" />
+ <option name="name" value="onlyleaf" />
+ <option name="type" value="java.lang.String" />
+ </ColumnInfoDTO>
+ </list>
+ </option>
+ <option name="name" value="PlCodeReferconfig" />
+ <option name="preName" value="" />
+ <option name="saveModelName" value="" />
+ <option name="savePackageName" value="" />
+ <option name="savePath" value="" />
+ <option name="templateGroupName" value="" />
+ </TableInfoDTO>
+ </value>
+ </entry>
+ </map>
+ </option>
+ </component>
+</project>
\ No newline at end of file
diff --git a/Source/ExampleIntegratedPushCalled/.idea/jarRepositories.xml b/Source/ExampleIntegratedPushCalled/.idea/jarRepositories.xml
new file mode 100644
index 0000000..276381a
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/.idea/jarRepositories.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="RemoteRepositoriesConfiguration">
+ <remote-repository>
+ <option name="id" value="central" />
+ <option name="name" value="Central Repository" />
+ <option name="url" value="https://repo.maven.apache.org/maven2" />
+ </remote-repository>
+ <remote-repository>
+ <option name="id" value="rdc-releases" />
+ <option name="name" value="rdc-releases" />
+ <option name="url" value="http://dev.yunkeruida.top:9000/repository/maven-releases/" />
+ </remote-repository>
+ <remote-repository>
+ <option name="id" value="central" />
+ <option name="name" value="central" />
+ <option name="url" value="http://dev.yunkeruida.top:9000/repository/maven-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="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="rdc-snapshots" />
+ <option name="name" value="rdc-snapshots" />
+ <option name="url" value="http://dev.yunkeruida.top:9000/repository/maven-snapshots/" />
+ </remote-repository>
+ </component>
+</project>
\ No newline at end of file
diff --git a/Source/ExampleIntegratedPushCalled/.idea/misc.xml b/Source/ExampleIntegratedPushCalled/.idea/misc.xml
new file mode 100644
index 0000000..010c400
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/.idea/misc.xml
@@ -0,0 +1,17 @@
+<?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">
+ <output url="file://$PROJECT_DIR$/out" />
+ </component>
+ <component name="ProjectType">
+ <option name="id" value="jpab" />
+ </component>
+</project>
\ No newline at end of file
diff --git a/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/ExampleIntgraPushCallApplication.java b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/ExampleIntgraPushCallApplication.java
new file mode 100644
index 0000000..86a018f
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/ExampleIntgraPushCallApplication.java
@@ -0,0 +1,18 @@
+package com.vci.ubcs.example;
+
+import javafx.application.Application;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/** 闆嗘垚鎺ㄩ�侊紝琚皟浠g爜绀轰緥
+ * @author ludc
+ * @date 2024/2/27 19:40
+ */
+@SpringBootApplication
+public class ExampleIntgraPushCallApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(ExampleIntgraPushCallApplication.class, args);
+ }
+
+}
diff --git a/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/MyServiceTest.java b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/MyServiceTest.java
new file mode 100644
index 0000000..274f185
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/MyServiceTest.java
@@ -0,0 +1,64 @@
+package com.vci.ubcs.example.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.vci.ubcs.example.util.HttpUtils;
+import lombok.AllArgsConstructor;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+
+/**
+ * @author ludc
+ * @date 2024/2/20 22:04
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/erpTest")
+public class MyServiceTest {
+
+ @GetMapping("/test1")
+ public void testMyService() {
+
+ /*MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
+ params.add("dataType","json");
+// params.add("dataString","data:{object:[{\"classCodde\":\"RENYUAN\",\"itemid\":\"19986015\",\"code\":\"698021151\",\"library\":\"RENYUAN\",\"pro\":[{\"filedName\":\"sfz\",\"outName\":\"韬唤璇乗",\"filedValue\":\"\"}]}]}");
+ NodeJosnDTO nodeJosnDTO = new NodeJosnDTO();
+ NodedataDTO nodeDataDTO = new NodedataDTO();
+ NodeObjectDTO nodeObjectDTO = new NodeObjectDTO();
+ nodeObjectDTO.setCode("698021151");//璁剧疆缂栫爜
+ nodeObjectDTO.setClassCode("RENYUAN");
+ nodeObjectDTO.setStatus("Released");
+ nodeObjectDTO.setItemid("19986015");
+ nodeObjectDTO.setLibrary("RENYUAN");
+
+ List<NodeObjectDTO> nodeObjectDTOS = new ArrayList<>();
+ nodeObjectDTOS.add(nodeObjectDTO);
+ nodeDataDTO.setObject(nodeObjectDTOS);
+
+ nodeJosnDTO.setData(nodeDataDTO);
+
+ List<NodeProDTO> nodeProDTOS = new ArrayList<>();
+ NodeProDTO nodeProDTO = new NodeProDTO();
+ nodeProDTO.setFiledName("sfz");
+ nodeProDTO.setOutname("韬唤璇�");
+ nodeProDTO.setFiledValue("");
+ nodeProDTOS.add(nodeProDTO);
+ nodeObjectDTO.setPro(nodeProDTOS);
+
+ Object object = JSONObject.toJSON(nodeJosnDTO);
+ String sendString = object.toString();
+ XStream xStream = new XStream(new DomDriver());
+ xStream.processAnnotations(NodedataDTO.class);
+ xStream.autodetectAnnotations(true);
+// sendString = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + xStream.toXML(nodeDataDTO);
+ params.add("dataString",sendString);
+
+ MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
+ String backString = HttpUtils.post("http://localhost:8118/test/test", params, headers);*/
+ }
+
+}
diff --git a/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/PushIntegrationController.java b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/PushIntegrationController.java
new file mode 100644
index 0000000..fb2630c
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/PushIntegrationController.java
@@ -0,0 +1,89 @@
+package com.vci.ubcs.example.controller;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.vci.ubcs.example.entity.RequestData;
+import org.springblade.core.tool.api.R;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.ServletInputStream;
+import javax.servlet.ServletRequest;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.List;
+
+/**
+ * 缂栫爜璧勬簮绠$悊绯荤粺缁熶竴鎺ㄩ��
+ * UBCS缂栫爜璧勬簮绠$悊绯荤粺瀵癸紝
+ * 鍏朵粬闆嗘垚鐨勭郴缁熻繘琛屾帹閫佺殑锛�
+ * 鎺ㄩ�佹斁api瀹氫箟绀轰緥
+ * @author ludc
+ * @date 2024/2/27 20:31
+ */
+@RestController("/pushIntegration")
+public class PushIntegrationController {
+
+ /**
+ * 鎺ㄩ�佹帴鍙h姹傜被鍨嬶細post
+ * Content-Type绫诲瀷涓簒-www-form-urlencoded锛屾垨param鏃舵帴鍙e畾涔夋柟寮� 1
+ * @param dataType
+ * @param dataString
+ * @return
+ * @throws IOException
+ */
+ @PostMapping("/testByForm1")
+ public R test(@RequestParam String dataType, @RequestParam String dataString) throws IOException {
+ // 鐩稿叧閫昏緫澶勭悊
+ System.out.println(dataType);
+ System.out.println(dataString);
+ return R.status(true);
+ }
+
+ /**
+ * 鎺ㄩ�佹帴鍙h姹傜被鍨嬶細post
+ * Content-Type绫诲瀷涓簒-www-form-urlencoded锛屾垨param鏃舵帴鍙e畾涔夋柟寮� 2
+ * @param request
+ * @return
+ * @throws IOException
+ */
+ @PostMapping("/testByForm2")
+ public R test1(ServletRequest request) throws IOException {
+ HttpServletRequest request1 = (HttpServletRequest) request;
+ String dataString = request1.getParameter("dataString");
+ ServletInputStream inputStream = request1.getInputStream();
+ // 璇诲彇鏁版嵁
+ byte[] buffer = new byte[4096];
+ int len = inputStream.read(buffer);
+ while (len != -1) {
+ // do something with buffer
+ len = inputStream.read(buffer);
+ }
+ String body = new String(buffer, StandardCharsets.UTF_8);
+ JSONObject jsonObject = JSONObject.parseObject(body);
+ JSONArray jsonArray = jsonObject.getJSONArray("dataString");
+
+ return R.data(jsonArray);
+ }
+
+ /**
+ * 鎺ㄩ�佹帴鍙h姹傜被鍨嬶細post
+ * Content-Type绫诲瀷涓篴pplication/json鏃舵帴鍙e畾涔夋柟寮�
+ * @param requestData
+ * @return
+ * @throws IOException
+ */
+ @PostMapping("/testByAppjson")
+ public R test1(@RequestBody RequestData requestData) throws IOException {
+ // 鎷垮埌杩欎釜鍙傛暟涔嬪悗鍙栬闆嗗悎涓殑绗竴涓厓绱狅紝灏辨槸瑕乯son杞垚瀵硅薄鐨勫弬鏁�
+ // 濡傛湁鍏蜂綋杞崲瑕佹眰锛屽垯鏍规嵁缂栫爜鍣ㄤ腑鐨勬帴鍙f彁渚涚殑閰嶇疆鑰屽畾锛岄�氬父涓篸ataType瀛楁锛屽xml锛宩son涓ょ鎯呭喌
+ List<Object> dataString = requestData.getDataString();
+ // JSONObject.parseObject(dataString,/*鏍规嵁缂栫爜绯荤粺鎻愪緵鐨勫璞″睘鎬ц�屽畾涔夌殑瀵硅薄*/);
+ List<String> dataType = requestData.getDataType();
+ return R.data(dataString);
+ }
+
+}
diff --git a/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/TestCalledIntegrationController.java b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/TestCalledIntegrationController.java
new file mode 100644
index 0000000..fdec40a
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/TestCalledIntegrationController.java
@@ -0,0 +1,9 @@
+package com.vci.ubcs.example.controller;
+
+/**
+ * 娴嬭瘯璋冪敤缂栫爜绯荤粺浠g爜绀轰緥鐨刟pi瀹氫箟
+ * @author ludc
+ * @date 2024/2/27 20:34
+ */
+public class TestCalledIntegrationController {
+}
diff --git a/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/entity/RequestData.java b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/entity/RequestData.java
new file mode 100644
index 0000000..d938bdf
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/entity/RequestData.java
@@ -0,0 +1,29 @@
+package com.vci.ubcs.example.entity;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 缂栫爜绯荤粺鎺ㄩ�侊紝鎺ュ彛鎺ユ敹鍙傛暟瀹氫箟瀹炰綋绫�
+ * @author ludc
+ * @date 2024/2/20 22:22
+ */
+@Data
+public class RequestData {
+
+ /**
+ * 閫氬父浼氬甫杩欎釜鍙傛暟
+ */
+ private List<String> dataType;
+
+ /**
+ * 蹇呬紶鍙傛暟
+ */
+ private List<Object> dataString;
+
+ /**
+ 鍏朵粬鍙傛暟閫氳繃涓庢牴鎹紪鐮佽祫婧愮鐞嗙郴缁熸矡閫氬悗鑾峰彇锛屽苟涓斾篃鏄疞ist绫诲瀷
+ */
+
+}
diff --git a/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/ICalledIntegrationService.java b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/ICalledIntegrationService.java
new file mode 100644
index 0000000..891d4fe
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/ICalledIntegrationService.java
@@ -0,0 +1,23 @@
+package com.vci.ubcs.example.service;
+
+/**
+ * 缁熶竴鐢宠鎺ュ彛锛歎BCS缂栫爜璧勬簮绠$悊绯荤粺锛岃鍏朵粬闆嗘垚鐨勭郴缁熺殑閫氱敤鎺ュ彛璋冪敤绀轰緥
+ * @author ludc
+ * @date 2024/2/27 20:34
+ */
+public interface ICalledIntegrationService {
+
+ /**
+ * 缂栫爜绯荤粺锛岀粺涓�鐢宠鎺ュ彛,鐢╤ttp锛宺est鏂瑰紡璋冪敤
+ */
+ void sendApplyCodeByRest();
+
+ /**
+ * 缂栫爜绯荤粺锛岀粺涓�鐢宠鎺ュ彛,鐢╓ebService鏂瑰紡璋冪敤
+ */
+ void sendApplyCodeByWebService();
+
+
+
+
+}
diff --git a/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/impl/CalledIntegrationServiceImpl.java b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/impl/CalledIntegrationServiceImpl.java
new file mode 100644
index 0000000..2f5feda
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/impl/CalledIntegrationServiceImpl.java
@@ -0,0 +1,30 @@
+package com.vci.ubcs.example.service.impl;
+
+import com.vci.ubcs.example.service.ICalledIntegrationService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 缁熶竴鐢宠鎺ュ彛锛歎BCS缂栫爜璧勬簮绠$悊绯荤粺锛岃鍏朵粬闆嗘垚鐨勭郴缁熺殑閫氱敤鎺ュ彛璋冪敤绀轰緥
+ * @author ludc
+ * @date 2024/2/27 20:34
+ */
+@Service
+public class CalledIntegrationServiceImpl implements ICalledIntegrationService {
+
+ /**
+ * 缂栫爜绯荤粺锛岀粺涓�鐢宠鎺ュ彛璋冪敤
+ */
+ @Override
+ public void sendApplyCodeByRest() {
+
+
+ }
+
+ /**
+ * 缂栫爜绯荤粺锛岀粺涓�鐢宠鎺ュ彛,鐢╓ebService鏂瑰紡璋冪敤
+ */
+ @Override
+ public void sendApplyCodeByWebService() {
+
+ }
+}
diff --git a/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/util/HttpUtils.java b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/util/HttpUtils.java
new file mode 100644
index 0000000..cb9fe96
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/util/HttpUtils.java
@@ -0,0 +1,205 @@
+package com.vci.ubcs.example.util;
+
+import org.springframework.http.*;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.client.RestTemplate;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @author ludc
+ * @date 2024/2/27 20:18
+ */
+public class HttpUtils {
+
+ //Content-Type鐨刱ey
+ public static String CONTENT_TYPE = "Content-Type";
+ //json鏁版嵁
+ public static String CONTENT_TYPE_JSON = MediaType.APPLICATION_JSON_VALUE;
+ public static String CONTENT_TYPE_JSON_UTF8 = MediaType.APPLICATION_JSON_UTF8_VALUE;
+
+ //琛ㄥ崟鏍煎紡,榛樿
+ public static String CONTENT_TYPE_TEXT = MediaType.APPLICATION_FORM_URLENCODED_VALUE;
+
+ /**
+ * get璇锋眰
+ *
+ * @param url
+ * @return
+ */
+ public static String get(String url) {
+ return get(url, null);
+ }
+
+ /**
+ * get璇锋眰
+ *
+ * @param url
+ * @param headers 璇锋眰澶�
+ * @return
+ */
+ public static String get(String url, MultiValueMap<String, String> headers) {
+ return request(url, null, headers, HttpMethod.GET);
+ }
+
+ /**
+ * post璇锋眰
+ *
+ * @param url
+ * @param params 璇锋眰鍙傛暟
+ * @return
+ */
+ public static String post(String url, MultiValueMap<String, String> params) {
+ return post(url, params, null);
+ }
+
+ /**
+ * post璇锋眰
+ *
+ * @param url
+ * @param params 璇锋眰鍙傛暟
+ * @param headers 璇锋眰澶�
+ * @return
+ */
+ public static String post(String url, MultiValueMap<String, String> params, MultiValueMap<String, String> headers) {
+ return request(url, params, headers, HttpMethod.POST);
+ }
+
+ /**
+ * post璇锋眰 TODO: 2024-02-25鏀癸紝涓轰簡婊¤冻鏍规嵁Content-type鐨勭被鍨嬫潵鍙戣姹傦紝骞朵笖param涓殑json鏄渶鍚庣殑鏃跺�欏彂閫佽姹傚啀杞�
+ *
+ * @param url
+ * @param params 璇锋眰鍙傛暟
+ * @param headers 璇锋眰澶�
+ * @return
+ */
+ public static String postByMediaType(String url, MultiValueMap<String, Object> params, MultiValueMap<String, String> headers,MediaType mediaType) {
+ return request(url, params, headers, HttpMethod.POST,mediaType);
+ }
+
+ /**
+ * put璇锋眰
+ *
+ * @param url
+ * @param params 璇锋眰鍙傛暟
+ * @return
+ */
+ public static String put(String url, MultiValueMap<String, String> params) {
+ return put(url, params, null);
+ }
+
+ /**
+ * put璇锋眰
+ *
+ * @param url
+ * @param params 璇锋眰鍙傛暟
+ * @param headers 璇锋眰澶�
+ * @return
+ */
+ public static String put(String url, MultiValueMap<String, String> params, MultiValueMap<String, String> headers) {
+ return request(url, params, headers, HttpMethod.PUT);
+ }
+
+ /**
+ * delete璇锋眰
+ *
+ * @param url
+ * @param params 璇锋眰鍙傛暟
+ * @return
+ */
+ public static String delete(String url, MultiValueMap<String, String> params) {
+ return delete(url, params, null);
+ }
+
+ /**
+ * delete璇锋眰
+ *
+ * @param url
+ * @param params 璇锋眰鍙傛暟
+ * @param headers 璇锋眰澶�
+ * @return
+ */
+ public static String delete(String url, MultiValueMap<String, String> params, MultiValueMap<String, String> headers) {
+ return request(url, params, headers, HttpMethod.DELETE);
+ }
+
+ /**
+ * 琛ㄥ崟璇锋眰
+ *
+ * @param url
+ * @param params 璇锋眰鍙傛暟
+ * @param headers 璇锋眰澶�
+ * @param method 璇锋眰鏂瑰紡
+ * @return
+ */
+ public static String request(String url, MultiValueMap<String, String> params, MultiValueMap<String, String> headers, HttpMethod method) {
+ if (params == null) {
+ params = new LinkedMultiValueMap<>();
+ }
+ return request(url, params, headers, method, MediaType.APPLICATION_FORM_URLENCODED);
+ }
+
+ /**
+ * http璇锋眰
+ *
+ * @param url
+ * @param params 璇锋眰鍙傛暟
+ * @param headers 璇锋眰澶�
+ * @param method 璇锋眰鏂瑰紡
+ * @param mediaType 鍙傛暟绫诲瀷
+ * @return
+ */
+ public static String request(String url, Object params, MultiValueMap<String, String> headers, HttpMethod method, MediaType mediaType) {
+ if (url == null || url.trim().isEmpty()) {
+ return null;
+ }
+ RestTemplate client = new RestTemplate();
+ // header
+ HttpHeaders httpHeaders = new HttpHeaders();
+ if (headers != null) {
+ httpHeaders.addAll(headers);
+ }
+ // 鎻愪氦鏂瑰紡锛氳〃鍗曘�乯son
+ httpHeaders.setContentType(mediaType);
+ HttpEntity<Object> httpEntity = new HttpEntity(params, httpHeaders);
+ ResponseEntity<String> response = client.exchange(url, method, httpEntity, String.class);
+ return response.getBody();
+ }
+
+ public static MultiValueMap<String, String> set_params_headers(String key,String value,MultiValueMap<String, String> map){
+ if(map==null){
+ map = new LinkedMultiValueMap<>();
+ }
+ map.add(key,value);
+ return map;
+ }
+ /**
+ * 鑾峰彇ip
+ * @param request
+ * @return
+ */
+ public static String getIpAddressFromRequest(HttpServletRequest request){
+ String ip = request.getHeader("X-Forwarded-For");
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getHeader("Proxy-Client-IP");
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getHeader("WL-Proxy-Client-IP");
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getHeader("HTTP_CLIENT_IP");
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getHeader("HTTP_X_FORWARDED_FOR");
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getRemoteAddr();
+ }
+ if (ip == null || ip.length() == 0 || ip.indexOf("0:0:0:0:0:0:0:1") >-1) {
+ //0:0:0:0:0:0:0:1鏄湰鏈哄湪璁块棶
+ ip = "127.0.0.1";
+ }
+ return ip;
+ }
+}
\ No newline at end of file
diff --git a/Source/ExampleIntegratedPushCalled/src/main/resources/application.yml b/Source/ExampleIntegratedPushCalled/src/main/resources/application.yml
new file mode 100644
index 0000000..11106fd
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/src/main/resources/application.yml
@@ -0,0 +1,12 @@
+server:
+ port: 9999
+ undertow:
+ threads:
+ # 璁剧疆IO绾跨▼鏁�, 瀹冧富瑕佹墽琛岄潪闃诲鐨勪换鍔�,瀹冧滑浼氳礋璐e涓繛鎺�, 榛樿璁剧疆姣忎釜CPU鏍稿績涓�涓嚎绋�
+ io: 16
+ # 闃诲浠诲姟绾跨▼姹�, 褰撴墽琛岀被浼約ervlet璇锋眰闃诲鎿嶄綔, undertow浼氫粠杩欎釜绾跨▼姹犱腑鍙栧緱绾跨▼,瀹冪殑鍊艰缃彇鍐充簬绯荤粺鐨勮礋杞�
+ worker: 400
+ # 浠ヤ笅鐨勯厤缃細褰卞搷buffer,杩欎簺buffer浼氱敤浜庢湇鍔″櫒杩炴帴鐨処O鎿嶄綔,鏈夌偣绫讳技netty鐨勬睜鍖栧唴瀛樼鐞�
+ buffer-size: 1024
+ # 鏄惁鍒嗛厤鐨勭洿鎺ュ唴瀛�
+ direct-buffers: true
\ No newline at end of file
diff --git a/Source/ExampleIntegratedPushCalled/target/classes/application.yml b/Source/ExampleIntegratedPushCalled/target/classes/application.yml
new file mode 100644
index 0000000..11106fd
--- /dev/null
+++ b/Source/ExampleIntegratedPushCalled/target/classes/application.yml
@@ -0,0 +1,12 @@
+server:
+ port: 9999
+ undertow:
+ threads:
+ # 璁剧疆IO绾跨▼鏁�, 瀹冧富瑕佹墽琛岄潪闃诲鐨勪换鍔�,瀹冧滑浼氳礋璐e涓繛鎺�, 榛樿璁剧疆姣忎釜CPU鏍稿績涓�涓嚎绋�
+ io: 16
+ # 闃诲浠诲姟绾跨▼姹�, 褰撴墽琛岀被浼約ervlet璇锋眰闃诲鎿嶄綔, undertow浼氫粠杩欎釜绾跨▼姹犱腑鍙栧緱绾跨▼,瀹冪殑鍊艰缃彇鍐充簬绯荤粺鐨勮礋杞�
+ worker: 400
+ # 浠ヤ笅鐨勯厤缃細褰卞搷buffer,杩欎簺buffer浼氱敤浜庢湇鍔″櫒杩炴帴鐨処O鎿嶄綔,鏈夌偣绫讳技netty鐨勬睜鍖栧唴瀛樼鐞�
+ buffer-size: 1024
+ # 鏄惁鍒嗛厤鐨勭洿鎺ュ唴瀛�
+ direct-buffers: true
\ No newline at end of file
diff --git "a/Source/ExampleIntegratedPushCalled/\347\274\226\347\240\201\350\265\204\346\272\220\347\256\241\347\220\206\347\263\273\347\273\237\351\233\206\346\210\220\347\273\237\344\270\200\346\216\245\345\217\243json\345\217\202\346\225\260\347\244\272\344\276\213" "b/Source/ExampleIntegratedPushCalled/\347\274\226\347\240\201\350\265\204\346\272\220\347\256\241\347\220\206\347\263\273\347\273\237\351\233\206\346\210\220\347\273\237\344\270\200\346\216\245\345\217\243json\345\217\202\346\225\260\347\244\272\344\276\213"
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ "b/Source/ExampleIntegratedPushCalled/\347\274\226\347\240\201\350\265\204\346\272\220\347\256\241\347\220\206\347\263\273\347\273\237\351\233\206\346\210\220\347\273\237\344\270\200\346\216\245\345\217\243json\345\217\202\346\225\260\347\244\272\344\276\213"
diff --git a/Source/UBCS-WEB/src/components/service-deploy/uploadServiceJarDialog.vue b/Source/UBCS-WEB/src/components/service-deploy/uploadServiceJarDialog.vue
index e9718ef..4242556 100644
--- a/Source/UBCS-WEB/src/components/service-deploy/uploadServiceJarDialog.vue
+++ b/Source/UBCS-WEB/src/components/service-deploy/uploadServiceJarDialog.vue
@@ -101,7 +101,7 @@
// 鏂囦欢涓婁紶鎴愬姛
onSuccess(resbonse){
if (Object.keys(resbonse.data).length === 0) {
- this.$message.success( "涓婚搴撳垎绫诲鍏ユ垚鍔燂紒");
+ this.$message.success( "鏇存柊鍖呭鍏ユ垚鍔燂紒");
this.dialogVisible = false;
return;
}
diff --git a/Source/UBCS-WEB/src/views/system/deploy.vue b/Source/UBCS-WEB/src/views/system/deploy.vue
index cac5509..a3d857c 100644
--- a/Source/UBCS-WEB/src/views/system/deploy.vue
+++ b/Source/UBCS-WEB/src/views/system/deploy.vue
@@ -15,6 +15,7 @@
@on-load="onLoad">
<template slot="menu" slot-scope="{ row, index }">
<el-button type="text"
+ :disabled="row.name === 'ubcs-deploy'"
icon="el-icon-upload"
size="small"
v-if="permissionList.upload"
@@ -29,6 +30,7 @@
{{ row.status === 'UP' ? '閲� 鍚�': '鍚� 鍔�' }}
</el-button>
<el-button type="text"
+ :disabled="row.name === 'ubcs-deploy'"
v-if="permissionList.editBtn"
icon="el-icon-edit"
size="small"
@@ -67,12 +69,13 @@
},
computed: {
+ ...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
- upload: true,
- restart: true,
- editBtn: true,// this.vaildData(this.permission, true),
- addBtn: true,
+ upload: this.vaildData(this.permission.deploy.deploy_upload, false),
+ restart: this.vaildData(this.permission.deploy.deploy_restart, false),
+ editBtn: this.vaildData(this.permission.deploy.deploy_edit, false),
+ addBtn: this.vaildData(this.permission.deploy.deploy_add, false),
};
},
option(){
diff --git a/Source/UBCS/LICENSE b/Source/UBCS/LICENSE
index 3ad5f69..25b4060 100644
--- a/Source/UBCS/LICENSE
+++ b/Source/UBCS/LICENSE
@@ -1,34 +1 @@
-BladeX鍟嗕笟鎺堟潈璁稿彲鍗忚
-
-涓�銆� 鐭ヨ瘑浜ф潈锛�
-BladeX绯诲垪浜у搧鐭ヨ瘑浜ф潈褰掍笂娴峰竷闆峰痉绉戞妧鏈夐檺鍏徃鐙珛鎵�鏈�
-
-浜屻�� 璁稿彲锛�
-1. 鍦ㄦ偍瀹屽叏鎺ュ彈骞堕伒瀹堟湰鍗忚鐨勫熀纭�涓婏紝鏈崗璁巿浜堟偍浣跨敤BladeX鐨勬煇浜涙潈鍒╁拰闈炵嫭鍗犳�ц鍙��
-2. 鏈崗璁腑锛屽皢鏈骇鍝佷娇鐢ㄧ敤閫斿垎涓衡�滀笓涓氱増鐢ㄩ�斺�濆拰鈥滀紒涓氱増鐢ㄩ�斺�濄��
-3. 鈥滀笓涓氱増鐢ㄩ�斺�濆畾涔夛細鎸囦釜浜哄湪闈炲洟浣撴満鏋勪腑鍑轰簬浠讳綍鐩殑浣跨敤鏈骇鍝侊紙浠讳綍鐩殑鍖呮嫭鍟嗕笟鐩殑鎴栭潪鐩堝埄鐩殑锛夈��
-4. 鈥滀紒涓氱増鐢ㄩ�斺�濆畾涔夛細鎸囧洟浣撴満鏋勶紙渚嬪鍏徃浼佷笟銆佹斂搴溿�佸鏍°�佸啗闃熴�佸尰闄€�佺ぞ浼氬洟浣撶瓑鍚勭被缁勭粐锛夛紙涓嶅寘鍚泦鍥紝鑻ラ泦鍥娇鐢ㄥ垯闇�涓哄悇涓瓙鍏徃鍒嗗埆璐拱浼佷笟鎺堟潈锛夊嚭浜庝换浣曠洰鐨勪娇鐢ㄦ湰浜у搧锛堜换浣曠洰鐨勫寘鎷晢涓氱洰鐨勬垨闈炵泩鍒╃洰鐨勶級銆�
-
-涓夈�� 绾︽潫鍜岄檺鍒讹細
-1. 鏈骇鍝佸彧鑳界敱鎮ㄤ负鏈崗璁鍙殑鐩殑鑰屼娇鐢紝鎮ㄤ笉寰楅�忛湶缁欎换浣曠涓夋柟锛�
-2. 浠庢湰浜у搧鍙栧緱鐨勪换浣曚俊鎭�佽蒋浠躲�佷骇鍝佹垨鏈嶅姟锛屾偍涓嶅緱瀵瑰叾杩涜淇敼銆佹敼缂栨垨鍩轰簬浠ヤ笂鍐呭鍒涘缓鍚岀绫诲埆鐨勮鐢熶骇鍝佸苟鍞崠銆�
-3. 鎮ㄤ笉寰楀鏈骇鍝佷互鍙婁笌涔嬪叧鑱旂殑鍟嗕笟鎺堟潈杩涜鍙戝竷銆佸嚭绉熴�侀攢鍞�佸垎閿�銆佹姷鎶笺�佽浆璁┿�佽鍙垨鍙戞斁瀛愯鍙瘉銆�
-4. 鏈骇鍝佸晢涓氭巿鏉冪増鍙兘鍖呭惈涓�浜涚嫭绔嬪姛鑳芥垨鐗规�э紝杩欎簺鍔熻兘鍙湁鍦ㄦ偍璐拱鍟嗕笟鎺堟潈鍚庢墠鍙互浣跨敤銆傚湪鏈彇寰楀晢涓氭巿鏉冪殑鎯呭喌涓嬶紝鎮ㄤ笉寰椾娇鐢ㄣ�佸皾璇曚娇鐢ㄦ垨澶嶅埗杩欎簺鎺堟潈鐗堢嫭绔嬪姛鑳姐��
-5. 鑻ユ偍鐨勫鎴疯姹備互婧愮爜鏂瑰紡浜や粯杞欢锛岄渶缂寸撼浼佷笟鐗堟巿鏉冭垂鐢紝鍚﹀垯鏈骇鍝侀儴鍒嗕笉寰楁彁渚涙簮鐮併��
-
-鍥涖�� 涓嶅緱鐢ㄤ簬闈炴硶鎴栫姝㈢殑鐢ㄩ�旓細
-鎮ㄥ湪浣跨敤鏈骇鍝佹垨鏈嶅姟鏃讹紝涓嶅緱灏嗘湰浜у搧浜у搧鎴栨湇鍔$敤浜庝换浣曢潪娉曠敤閫旀垨鏈崗璁潯娆俱�佹潯浠跺拰澹版槑绂佹鐨勭敤閫斻��
-
-浜斻�� 鍏嶈矗璇存槑锛�
-1. 鏈骇鍝佹寜鈥滅幇鐘垛�濇巿浜堣鍙紝鎮ㄩ』鑷鎵挎媴浣跨敤鏈骇鍝佺殑椋庨櫓銆侭ladeX鍥㈤槦涓嶅姝ゆ彁渚涗换浣曟槑绀恒�佹殫绀烘垨浠讳綍鍏跺畠褰㈠紡鐨勬媴淇濆拰琛ㄧず銆傚湪浠讳綍鎯呭喌涓嬶紝瀵逛簬鍥犱娇鐢ㄦ垨鏃犳硶浣跨敤鏈蒋浠惰�屽鑷寸殑浠讳綍鎹熷け锛堝寘鎷絾涓嶄粎闄愪簬鍟嗕笟鍒╂鼎鎹熷け銆佷笟鍔′腑鏂垨涓氬姟淇℃伅涓㈠け锛夛紝BladeX鍥㈤槦鏃犻渶鍚戞偍鎴栦换浣曠涓夋柟璐熻矗锛屽嵆浣緽ladeX鍥㈤槦宸茶鍛婄煡鍙兘浼氶�犳垚姝ょ被鎹熷け銆傚湪浠讳綍鎯呭喌涓嬶紝 BladeX鍥㈤槦鍧囦笉灏变换浣曠洿鎺ョ殑銆侀棿鎺ョ殑銆侀檮甯︾殑銆佸悗鏋滄�х殑銆佺壒鍒殑銆佹儵鎴掓�х殑鍜屽缃氭�х殑鎹熷璧斿伩鎵挎媴浠讳綍璐d换锛屾棤璁鸿涓诲紶鏄熀浜庝繚璇併�佸悎鍚屻�佷镜鏉冿紙鍖呮嫭鐤忓拷锛夋垨鏄熀浜庡叾浠栧師鍥犱綔鍑恒��
-2. 鏈骇鍝佸彲鑳藉唴缃湁绗笁鏂规湇鍔★紝鎮ㄥ簲鑷璇勪及浣跨敤杩欎簺绗笁鏂规湇鍔$殑椋庨櫓锛岀敱浣跨敤姝ょ被绗笁鏂规湇鍔¤�屼骇鐢熺殑绾犵悍锛屽叏閮ㄨ矗浠荤敱鎮ㄨ嚜琛屾壙鎷呫��
-3. BladeX鍥㈤槦涓嶅浣跨敤鏈骇鍝佹瀯寤虹殑缃戠珯涓换浣曚俊鎭唴瀹逛互鍙婂鑷寸殑浠讳綍鐗堟潈绾犵悍銆佹硶寰嬩簤璁拰鍚庢灉鎵挎媴浠讳綍璐d换锛屽叏閮ㄨ矗浠荤敱鎮ㄨ嚜琛屾壙鎷呫��
-4. BladeX鍥㈤槦鍙兘浼氱粡甯告彁渚涗骇鍝佹洿鏂版垨鍗囩骇锛屼絾BladeX鍥㈤槦娌℃湁涓烘牴鎹湰鍗忚璁稿彲鐨勪骇鍝佹彁渚涚淮鎶ゆ垨鏇存柊鐨勮矗浠汇��
-5. BladeX鍥㈤槦鍙兘浼氭寜鐓у畼鏂瑰埗瀹氱殑绛旂枒瑙勫垯涓烘偍杩涜绛旂枒锛屼絾BladeX鍥㈤槦娌℃湁涓烘牴鎹湰鍗忚璁稿彲鐨勪骇鍝佹彁渚涙妧鏈敮鎸佺殑涔夊姟鎴栬矗浠汇��
-
-鍏�� 鏉冨埄鍜屾墍鏈夋潈鐨勪繚鐣欙細
-BladeX鍥㈤槦淇濈暀鎵�鏈夋湭鍦ㄦ湰鍗忚涓槑纭巿浜堟偍鐨勬墍鏈夋潈鍒┿�侭ladeX鍥㈤槦淇濈暀闅忔椂鏇存柊鏈崗璁殑鏉冨埄锛屽苟鍙渶鍏ず浜庡搴斾骇鍝侀」鐩殑LICENSE鏂囦欢锛屾棤闇�寰佸緱鎮ㄧ殑浜嬪厛鍚屾剰涓旀棤闇�鍙﹁閫氱煡锛屾洿鏂板悗鐨勫唴瀹瑰簲浜庡叕绀哄嵆鏃剁敓鏁堛�傛偍鍙互闅忔椂璁块棶浜у搧鍦板潃骞舵煡闃呮渶鏂扮増璁稿彲鏉℃锛屽湪鏇存柊鐢熸晥鍚庢偍缁х画浣跨敤鏈骇鍝佸垯琚浣滄偍宸叉帴鍙椾簡鏂扮殑鏉℃銆�
-
-涓冦�� 鍗忚缁堟
-1. 鎮ㄤ竴鏃﹀紑濮嬪鍒躲�佷笅杞姐�佸畨瑁呮垨鑰呬娇鐢ㄦ湰浜у搧锛屽嵆琚涓哄畬鍏ㄧ悊瑙e苟鎺ュ彈鏈崗璁殑鍚勯」鏉℃锛屽湪浜湁涓婅堪鏉℃鎺堜簣鐨勮鍙潈鍔涘悓鏃讹紝涔熷彈鍒扮浉鍏崇殑绾︽潫鍜岄檺鍒讹紝鏈崗璁鍙寖鍥翠互澶栫殑琛屼负锛屽皢鐩存帴杩濆弽鏈崗璁苟鏋勬垚渚垫潈銆�
-2. 涓�鏃︽偍杩濆弽鏈崗璁殑鏉℃锛孊ladeX鍥㈤槦闅忔椂鍙兘缁堟鏈崗璁�佹敹鍥炶鍙拰鎺堟潈锛屽苟瑕佹眰鎮ㄦ壙鎷呯浉搴旀硶寰嬪拰缁忔祹璐d换銆�
+UBCS -缂栫爜璧勬簮绠$悊绯荤粺
diff --git a/Source/UBCS/pom.xml b/Source/UBCS/pom.xml
index e14fb72..6cbe0a9 100644
--- a/Source/UBCS/pom.xml
+++ b/Source/UBCS/pom.xml
@@ -108,11 +108,11 @@
<resource>
<directory>src/main/resources</directory>
<excludes>
- <!-- <exclude>bootstrap.yml</exclude>
+ <exclude>bootstrap.yml</exclude>
<exclude>application.yml</exclude>
<exclude>application-dev.yml</exclude>
<exclude>application-test.yml</exclude>
- <exclude>application-prop.yml</exclude>-->
+ <exclude>application-prop.yml</exclude>
</excludes>
</resource>
<resource>
diff --git a/Source/UBCS/ubcs-gateway/pom.xml b/Source/UBCS/ubcs-gateway/pom.xml
index 16d3f2d..5601eee 100644
--- a/Source/UBCS/ubcs-gateway/pom.xml
+++ b/Source/UBCS/ubcs-gateway/pom.xml
@@ -74,6 +74,17 @@
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
</dependency>
+ <!--<dependency>
+ <groupId>org.springblade</groupId>
+ <artifactId>blade-starter-log</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springblade</groupId>
+ <artifactId>blade-core-cloud</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>-->
+
</dependencies>
<build>
diff --git a/Source/UBCS/ubcs-ops/ubcs-admin/pom.xml b/Source/UBCS/ubcs-ops/ubcs-admin/pom.xml
index 02f9465..348c273 100644
--- a/Source/UBCS/ubcs-ops/ubcs-admin/pom.xml
+++ b/Source/UBCS/ubcs-ops/ubcs-admin/pom.xml
@@ -80,10 +80,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
- <!--<dependency>
- <groupId>org.springframework.security.oauth.boot</groupId>
- <artifactId>spring-security-oauth2-autoconfigure</artifactId>
- </dependency>-->
+<!-- <dependency>-->
+<!-- <groupId>org.springframework.security.oauth.boot</groupId>-->
+<!-- <artifactId>spring-security-oauth2-autoconfigure</artifactId>-->
+<!-- </dependency>-->
<!--Taobao-Sdk-->
<dependency>
<groupId>com.taobao</groupId>
@@ -108,4 +108,28 @@
</plugins>
</build>
+ <!--<build>
+ <plugins>
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <configuration>
+ <username>${docker.username}</username>
+ <password>${docker.password}</password>
+ <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
+ <tag>${project.version}</tag>
+ <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+ <buildArgs>
+ <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+ </buildArgs>
+ <skip>false</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>-->
+
</project>
diff --git a/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/config/CustomUserDetailsService.java b/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/config/CustomUserDetailsService.java
new file mode 100644
index 0000000..7afb574
--- /dev/null
+++ b/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/config/CustomUserDetailsService.java
@@ -0,0 +1,32 @@
+package com.vci.ubcs.admin.config;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.security.core.userdetails.User;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.stereotype.Service;
+
+@Service
+public class CustomUserDetailsService implements UserDetailsService {
+
+ @Value("${spring.security.user.name:admin}")
+ private String USERNAME;
+
+ @Value("${spring.security.user.password:admin}")
+ private String PWD;
+
+ @Override
+ public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
+ // 杩欓噷涓轰簡绀轰緥锛屽垱寤轰竴涓畝鍗曠殑鐢ㄦ埛
+ if (USERNAME.equals(username)) {
+ return User.builder()
+ .username(username)
+ .password(PWD) // 浣跨敤{noop}琛ㄧず鏄庢枃瀵嗙爜锛屽疄闄呯敓浜х幆澧冧腑搴旇浣跨敤鍔犲瘑瀵嗙爜
+ .roles("ADMIN")
+ .build();
+ } else {
+ throw new UsernameNotFoundException("User not found");
+ }
+ }
+}
diff --git a/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/config/SecurityConfiguration.java b/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/config/SecurityConfiguration.java
index 13248d1..bb44a40 100644
--- a/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/config/SecurityConfiguration.java
+++ b/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/config/SecurityConfiguration.java
@@ -16,15 +16,22 @@
*/
package com.vci.ubcs.admin.config;
+import com.vci.ubcs.admin.security.CustomAuthenticationManager;
import de.codecentric.boot.admin.server.config.AdminServerProperties;
import com.vci.ubcs.admin.security.InternalAuthorizationManager;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.authentication.ReactiveAuthenticationManager;
+import org.springframework.security.authorization.ReactiveAuthorizationManager;
import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity;
import org.springframework.security.config.web.server.ServerHttpSecurity;
+import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.web.server.SecurityWebFilterChain;
import org.springframework.security.web.server.authentication.RedirectServerAuthenticationSuccessHandler;
+import org.springframework.security.web.server.authorization.AuthorizationContext;
import java.net.URI;
@@ -44,7 +51,12 @@
}
@Bean
- public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
+ public CustomAuthenticationManager customAuthenticationManager(UserDetailsService userDetailsService) {
+ return new CustomAuthenticationManager(userDetailsService);
+ }
+
+ @Bean
+ public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http, CustomAuthenticationManager customAuthenticationManager) {
// @formatter:off
RedirectServerAuthenticationSuccessHandler successHandler = new RedirectServerAuthenticationSuccessHandler();
successHandler.setLocation(URI.create(contextPath + "/"));
@@ -63,7 +75,8 @@
.pathMatchers(contextPath + "/actuator", contextPath + "/actuator/**").access(new InternalAuthorizationManager())
.anyExchange().authenticated().and()
.formLogin().loginPage(contextPath + "/login")
- .authenticationSuccessHandler(successHandler).and()
+ .authenticationSuccessHandler(successHandler)
+ .authenticationManager(customAuthenticationManager).and()
.logout().logoutUrl(contextPath + "/logout").and()
.httpBasic().disable()
.csrf().disable()
diff --git a/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/security/CustomAuthenticationManager.java b/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/security/CustomAuthenticationManager.java
new file mode 100644
index 0000000..a109c4d
--- /dev/null
+++ b/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/security/CustomAuthenticationManager.java
@@ -0,0 +1,31 @@
+package com.vci.ubcs.admin.security;
+
+import org.springframework.security.authentication.ReactiveAuthenticationManager;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import reactor.core.publisher.Mono;
+
+public class CustomAuthenticationManager implements ReactiveAuthenticationManager {
+
+ private final UserDetailsService userDetailsService;
+
+ public CustomAuthenticationManager(UserDetailsService userDetailsService) {
+ this.userDetailsService = userDetailsService;
+ }
+
+ @Override
+ public Mono<Authentication> authenticate(Authentication authentication) {
+ String username = authentication.getName();
+ String password = authentication.getCredentials().toString();
+
+ UserDetails userDetails = userDetailsService.loadUserByUsername(username);
+
+ if (userDetails.getPassword().equals(password)) {
+ return Mono.just(new UsernamePasswordAuthenticationToken(userDetails, password, userDetails.getAuthorities()));
+ } else {
+ return Mono.empty();
+ }
+ }
+}
diff --git a/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/security/InternalAuthorizationManager.java b/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/security/InternalAuthorizationManager.java
index f61fce9..5c77881 100644
--- a/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/security/InternalAuthorizationManager.java
+++ b/Source/UBCS/ubcs-ops/ubcs-admin/src/main/java/com/vci/ubcs/admin/security/InternalAuthorizationManager.java
@@ -16,6 +16,7 @@
*/
package com.vci.ubcs.admin.security;
+import lombok.extern.slf4j.Slf4j;
import org.springblade.core.launch.utils.INetUtil;
import org.springframework.http.HttpHeaders;
import org.springframework.http.server.reactive.ServerHttpRequest;
@@ -34,6 +35,7 @@
*
* @author L.cm
*/
+@Slf4j
public class InternalAuthorizationManager implements ReactiveAuthorizationManager<AuthorizationContext> {
private static final String HEADER_X_FORWARDED_FOR = "X-Forwarded-For";
@@ -65,6 +67,16 @@
if (!headers.containsKey(HEADER_X_FORWARDED_FOR)) {
return true;
}
+
+ log.error("===========1========="+context.toString());
+ log.error("===========2========="+request.getHeaders());
+ log.error("===========3========="+Optional.of(request)
+ .map(ServerHttpRequest::getRemoteAddress)
+ .map(InetSocketAddress::getAddress)
+ .map(INetUtil::isInternalIp)
+ .orElse(false));
+ log.error("===========4========="+request.getRemoteAddress());
+
return Optional.of(request)
.map(ServerHttpRequest::getRemoteAddress)
.map(InetSocketAddress::getAddress)
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/DockingSystemConfig.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/DockingSystemConfig.java
index be995f2..bade0bf 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/DockingSystemConfig.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/DockingSystemConfig.java
@@ -175,6 +175,12 @@
@ApiModelProperty(value = "杩斿洖鍊肩被鍨�")
private String returnType;
+ /**
+ * 鍐呭绫诲瀷
+ */
+ @ApiModelProperty(value = "鍐呭绫诲瀷")
+ private String contentType;
+
/**
* 杩斿洖鍊肩被鍨嬫樉绀烘枃鏈�
diff --git a/Source/UBCS/ubcs-service-api/ubcs-deploy-api/pom.xml b/Source/UBCS/ubcs-service-api/ubcs-deploy-api/pom.xml
index 5be7d5e..27131f6 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-deploy-api/pom.xml
+++ b/Source/UBCS/ubcs-service-api/ubcs-deploy-api/pom.xml
@@ -10,6 +10,8 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>ubcs-deploy-api</artifactId>
+ <name>${project.artifactId}</name>
+ <version>${bladex.project.version}</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
diff --git a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/util/HttpUtils.java b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/util/HttpUtils.java
index 98b3042..8de6984 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/util/HttpUtils.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/util/HttpUtils.java
@@ -1,7 +1,5 @@
package com.vci.ubcs.starter.util;
-import com.alibaba.fastjson.JSON;
-import org.springblade.core.tool.utils.WebUtil;
import org.springframework.http.*;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
@@ -69,7 +67,19 @@
return request(url, params, headers, HttpMethod.POST);
}
- /**
+ /**
+ * post璇锋眰 TODO: 2024-02-25鏀癸紝涓轰簡婊¤冻鏍规嵁Content-type鐨勭被鍨嬫潵鍙戣姹傦紝骞朵笖param涓殑json鏄渶鍚庣殑鏃跺�欏彂閫佽姹傚啀杞�
+ *
+ * @param url
+ * @param params 璇锋眰鍙傛暟
+ * @param headers 璇锋眰澶�
+ * @return
+ */
+ public static String postByMediaType(String url, MultiValueMap<String, Object> params, MultiValueMap<String, String> headers,MediaType mediaType) {
+ return request(url, params, headers, HttpMethod.POST,mediaType);
+ }
+
+ /**
* put璇锋眰
*
* @param url
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/MdmEngineService.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/MdmEngineService.java
index f4ad154..60c8ec7 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/MdmEngineService.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/MdmEngineService.java
@@ -9,6 +9,7 @@
import com.vci.ubcs.code.dto.CodeDeleteBatchDTO;
import com.vci.ubcs.code.dto.CodeOrderDTO;
import com.vci.ubcs.code.dto.datapush.BaseModelDTO;
+import com.vci.ubcs.code.entity.CodeSynonym;
import com.vci.ubcs.code.vo.CodeKeyAttrRepeatVO;
import com.vci.ubcs.code.vo.pagemodel.UITableFieldVO;
import com.vci.ubcs.code.vo.pagemodel.*;
@@ -84,6 +85,7 @@
*
* @param value 褰撳墠鐨勫��
* @param keyRuleVO 鍏抽敭灞炴�х殑鎺у埗瑙勫垯锛屽彲浠ヤ负绌�
+ * @param codeSynonymMaps 杩戜箟璇嶆煡璇㈣鍒�
* @param attrId 灞炴�х殑缂栧彿
* @param trim 鏄惁鍘婚櫎绌烘牸
* @param ignoreCase 鏄惁涓嶅尯鍒嗗ぇ灏忓啓
@@ -91,19 +93,17 @@
* @param trimAll 鏄惁蹇界暐鍏ㄩ儴绌烘牸
* @param conditionMap 鏌ヨ鏉′欢
*/
- void wrapperKeyAttrConditionMap(String value, CodeKeyAttrRepeatVO keyRuleVO, String attrId,
- boolean trim, boolean ignoreCase, boolean ignoreWidth,
- boolean trimAll, Map<String, String> conditionMap);
+ void wrapperKeyAttrConditionMap(String value, CodeKeyAttrRepeatVO keyRuleVO, List<CodeSynonym> codeSynonymMaps, String attrId,
+ boolean trim, boolean ignoreCase, boolean ignoreWidth,
+ boolean trimAll, Map<String, String> conditionMap);
/**
- * 灏佽杩戜箟璇嶆煡璇㈣鍒欏睘鎬х殑鏌ヨ璇彞
- * @param value 褰撳墠鐨勫��
- * @param keyRuleVO 灞炴�х殑缂栧彿
- * @param attrId
- * @param conditionMap 鏌ヨ鏉′欢
+ * 杩戜箟璇嶆煡璇㈣鍒欒浆鎹�
+ * @param codeSynonymMaps
+ * @param value
+ * @return
*/
- void wrapperSynonymAttrConditionMap(String value, CodeKeyAttrRepeatVO keyRuleVO, String attrId,
- Map<String, String> conditionMap);
+ String getValueToSynony(/*杩戜箟璇嶆煡璇㈣鍒�*/List<CodeSynonym> codeSynonymMaps,String value);
/**
* 鍒濆鍖栦笟鍔$被鍨�
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeDuckingSyncServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeDuckingSyncServiceImpl.java
index fcb7bbe..9864832 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeDuckingSyncServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeDuckingSyncServiceImpl.java
@@ -59,6 +59,7 @@
import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.MediaType;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -95,6 +96,7 @@
@Service
@Slf4j
public class CodeDuckingSyncServiceImpl implements ICodeDuckingSyncService {
+
@Value("${dataSyncPush.dataParamName:xmlData}")
public String DATA_PARAM_NAME;
@Value("${dataSyncPush.dataId:itemid}")
@@ -146,21 +148,28 @@
@Autowired
private ICodeClassifyValueService codeClassifyValueService;
+
@Autowired(required = false)
private AttributeMapConfig attributeMapConfig;
+
/***
* resdis缂撳瓨鏈嶅姟
*/
@Resource
private BladeRedis bladeRedis;
+
@Resource
private IDockingSysIntParamService dockingSysIntParamService;
+
@Resource
private IDockingSysIntHeaderService dockingSysIntHeaderService;
+
@Autowired(required = false)
private MdmSearchItemCodeProvider mdmSearchItemCodeProvider;
+
@Autowired
HttpServletRequest request;
+
@Override
public void DockingDataSyncScheduing() {
@@ -222,6 +231,7 @@
});
return R.success("鎵嬪姩鎺ㄩ�佸畬鎴�,璇锋牳瀵规槸鍚︽帹閫佹垚鍔�");
}
+
private SearchItemDataVO initData(String status,String itemCode,String mmCode){
SearchItemDataVO searchItemDataVO=new SearchItemDataVO();
searchItemDataVO.setLastchangedon(new Date());
@@ -258,6 +268,7 @@
return request;
}
+
/***
* 鍚屾鍨嬪彿浠e彿
*/
@@ -574,6 +585,7 @@
}
return codeOrderSecDTOList;
}
+
/***
* 璇诲彇灞炴�ф槧灏勯厤缃俊鎭�
* @param systemId
@@ -698,7 +710,8 @@
throw new Throwable("缁勭粐鏁版嵁鏄犲皠鍊煎け璐�");
}
}
- private void changeObjectToMap(SearchItemUpperCaseDataVO searchItemDataVO, String code, BladeUser user,String operation,List<ApplyDataVO> object){
+
+ private void changeObjectToMap(SearchItemUpperCaseDataVO searchItemDataVO, String code, BladeUser user,String operation,List<ApplyDataVO> object){
ApplyDataVO applyDataVO=new ApplyDataVO();
List<ProppertyVO> propList=new ArrayList<>();
//String status= searchItemDataVO.getStatus();//鏁版嵁鐘舵�� 瀛楃鍨嬶紝鏋氫妇鍊硷紱鍒跺崟锛�0锛涘鎵逛腑锛�1锛涢�氳繃锛�2锛涢┏鍥烇細3锛�
@@ -731,13 +744,15 @@
applyDataVO.setProp(propList);
object.add(applyDataVO);
}
- private void initProperty(String key,String text,String value,List<ProppertyVO> propList){
+
+ private void initProperty(String key,String text,String value,List<ProppertyVO> propList){
ProppertyVO vo=new ProppertyVO();
vo.setKey(key);
vo.setText(StringUtils.isBlank(text)?"":text);
vo.setValue(StringUtils.isBlank(value)?"":value);
propList.add(vo);
}
+
/***
* 鏌ヨredis涓暟鎹紝瀵规瘮鍚庢彃鍏ockingtask
* @param type
@@ -863,7 +878,7 @@
for (DockingTask dockingTask:dockingTaskList){
//姣忎釜task涓�涓簨鍔★紝寮�鍚�
String paramString="";
- String sendString="";
+ Object sendString="";
String backString="";
//鏌ヨ绯荤粺鎺ュ彛淇℃伅,ip method,dataType
String systeminfooid = dockingTask.getSysInfoOid();//sysininfo 鐨刼id
@@ -897,8 +912,9 @@
DockingSystemConfig dockingSystemConfig = dockingSystemConfigService.getById(systeminfooid);
String paramType = dockingSystemConfig.getParamType();//xml/json
if(paramType.equals(DATATYPE_JSON)){
- Object object = JSONObject.toJSON(jsonRootDataDTO);
- sendString = object.toString();
+ // Object object = JSONObject.toJSON(jsonRootDataDTO);
+ // sendString = object.toString();
+ sendString = jsonRootDataDTO;
}else{
//缁勭粐杩斿洖鎺ュ彛淇℃伅
XStream xStream = new XStream(new DomDriver());
@@ -915,6 +931,7 @@
}
}
}
+
/***
* 鍙戦�佺紪鐮佷富鏁版嵁
*/
@@ -923,7 +940,7 @@
for (DockingTask dockingTask:dockingTaskS){
//姣忎釜task涓�涓簨鍔★紝寮�鍚�
String paramString="";
- String sendString="";
+ String sendObject="";
String backString="";
try {
//鏌ヨ绯荤粺鎺ュ彛淇℃伅,ip method,dataType
@@ -997,34 +1014,35 @@
String paramType = dockingSystemConfig.getParamType();//xml/json
if (paramType.equals(DATATYPE_JSON)) {
Object object = JSONObject.toJSON(nodeJosnDTO);
- sendString = object.toString();
+ sendObject = object.toString();
} else {
//缁勭粐杩斿洖鎺ュ彛淇℃伅
XStream xStream = new XStream(new DomDriver());
xStream.processAnnotations(NodedataDTO.class);
xStream.autodetectAnnotations(true);
- sendString = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + xStream.toXML(nodeDataDTO);
+ sendObject = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + xStream.toXML(nodeDataDTO);
}
//璋冪敤鎺ュ彛
- callInterface(sendString,dockingSystemConfig, dockingTask,"pushData");
+ callInterface(sendObject,dockingSystemConfig, dockingTask,"pushData");
}catch (Throwable e){
e.printStackTrace();
}finally {
}
}
}
+
/***
- * 璋冪敤鎺ュ彛
- * @param sendString
+ * 璋冪敤鎺ュ彛锛屼紶鍙備负JSON鏃朵紶object绫诲瀷,Content-Type鏀逛负鐣岄潰閰嶇疆鐨�
+ * @param sendObject
* @param dockingSystemConfig
* @param dockingTask
* @throws Throwable
*/
- private void callInterface(String sendString , DockingSystemConfig dockingSystemConfig,DockingTask dockingTask,String operation) throws Throwable{
+ private void callInterface(Object sendObject, DockingSystemConfig dockingSystemConfig,DockingTask dockingTask,String operation) throws Throwable{
String paramString = "";
-
String backString = "";
- String msg="";
+ String sendString = dockingSystemConfig.getContentType().equals(DATATYPE_JSON) ? JSONObject.toJSON(sendObject).toString():sendObject.toString();
+ String msg= "" ;
String url = dockingSystemConfig.getRequestUrl();//url
List<ResultNodeObjectDTO> resultNodeObjectDTOS =new ArrayList<>();
try {
@@ -1055,17 +1073,17 @@
paramString = sendurl;
backString = HttpUtils.get(sendurl);
} else if (requestmethod.equals(URLTYPE_POST)) {//POST璇锋眰
- MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
+ MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
for (DockingSysIntParam dockingSysIntParam : dockingSysIntParamList) {
params.add(dockingSysIntParam.getParamKey(), dockingSysIntParam.getParamValue());
}
- params.add(DATA_PARAM_NAME,sendString);
+ params.add(DATA_PARAM_NAME,sendObject);
paramString = params.toString();
MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
for (DockingSysIntHeader dockingSysIntHeader : dockingSysIntHeaderList) {
headers.add(dockingSysIntHeader.getHeaderKey(), dockingSysIntHeader.getHeaderValue());
}
- backString = HttpUtils.post(url, params, headers);
+ backString = HttpUtils.postByMediaType(url, params, headers,new MediaType(dockingSystemConfig.getContentType()));
}
if(backString.startsWith("\"")){
backString=backString.substring(backString.indexOf("\"")+1);
@@ -1163,6 +1181,160 @@
}
}
}
+
+ /**
+ * 璋冪敤鎺ュ彛锛屼紶鍙備负JSON鏃朵紶object绫诲瀷
+ * @param sendObject
+ * @param dockingSystemConfig
+ * @param dockingTask
+ * @param operation
+ * @throws Throwable
+ */
+ private void callInterfaceByContentType(Object sendObject, DockingSystemConfig dockingSystemConfig,DockingTask dockingTask,String operation,String sendType) throws Throwable{
+ String paramString = "";
+ String sendString = sendType.equals(DATATYPE_JSON) ? JSONObject.toJSON(sendObject).toString():sendObject.toString();
+ String backString = "";
+ String msg="";
+ String url = dockingSystemConfig.getRequestUrl();//url
+ List<ResultNodeObjectDTO> resultNodeObjectDTOS =new ArrayList<>();
+ try {
+ boolean usedFlag= dockingSystemConfig.getUsedFlag().equals("true")?true:false;
+ if(!usedFlag){
+ throw new Throwable("鎺ュ彛宸茬粡鍋滅敤锛�");
+ }
+ String type = dockingSystemConfig.getInterfaceType().toLowerCase(Locale.ROOT);//get/post/webserver/corba
+ String paramType = dockingSystemConfig.getParamType();//xml/json
+ String returnType = dockingSystemConfig.getReturnType();//xml/json
+ String requestmethod= dockingSystemConfig.getRequestMethod();
+ String interfaceFunction = dockingSystemConfig.getInterfaceFunction();//涓昏鏄痺ebservice鐨勬柟娉曞悕
+ String namespace = dockingSystemConfig.getNamespace();//namespace
+ String soapaction = dockingSystemConfig.getSoapAction();//soapaction
+ String targName = dockingSystemConfig.getTargetName();//targName
+ String cxfaxis = dockingSystemConfig.getCxfAxis();//webservice鏄痗xf/axis
+ //鏌ヨparam
+ List<DockingSysIntParam> dockingSysIntParamList = dockingSysIntParamService.list(Wrappers.<DockingSysIntParam>query().lambda().eq(DockingSysIntParam::getInfoOid,dockingSystemConfig.getOid()));
+ //鏌ヨheader
+ List<DockingSysIntHeader> dockingSysIntHeaderList = dockingSysIntHeaderService.list(Wrappers.<DockingSysIntHeader>query().lambda().eq(DockingSysIntHeader::getInfoOid,dockingSystemConfig.getOid()));
+ if(type.equals(URLTYPE_HTTP)) {
+ if (requestmethod.equals(URLTYPE_GET)) {//GET璇锋眰
+ String sendurl = url + "?" + DATA_PARAM_NAME + "=" + sendString;
+ //鎷兼帴param
+ for (DockingSysIntParam dockingSysIntParam : dockingSysIntParamList) {
+ sendurl = sendurl + "&" + dockingSysIntParam.getParamKey() + "=" + dockingSysIntParam.getParamValue();
+ }
+ paramString = sendurl;
+ backString = HttpUtils.get(sendurl);
+ } else if (requestmethod.equals(URLTYPE_POST)) {//POST璇锋眰
+ MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
+ for (DockingSysIntParam dockingSysIntParam : dockingSysIntParamList) {
+ params.add(dockingSysIntParam.getParamKey(), dockingSysIntParam.getParamValue());
+ }
+ params.add(DATA_PARAM_NAME,sendObject);
+ paramString = params.toString();
+ MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
+ for (DockingSysIntHeader dockingSysIntHeader : dockingSysIntHeaderList) {
+ headers.add(dockingSysIntHeader.getHeaderKey(), dockingSysIntHeader.getHeaderValue());
+ }
+ // TODO: 2024-02-25鏀癸紝涓轰簡婊¤冻HR浠ュ強鍏朵粬鎯呭喌涓嬫牴鎹瓹ontent-type鐨勭被鍨嬫潵鍙戣姹傦紝骞朵笖param涓殑json鏄渶鍚庣殑鏃跺�欏彂閫佽姹傚啀杞�
+ backString = HttpUtils.postByMediaType(url, params, headers, MediaType.APPLICATION_FORM_URLENCODED);
+ }
+ if(backString.startsWith("\"")){
+ backString=backString.substring(backString.indexOf("\"")+1);
+ }
+ if(backString.endsWith("\"")){
+ backString=backString.substring(0,backString.lastIndexOf("\""));
+ }
+ if(backString.contains("\n")){
+ String res="\n";
+ backString= backString.replaceAll(res,"");
+ }
+ if(backString.contains("\\")){
+ String res="\\\\\"";
+ backString= backString.replaceAll(res,"\"").trim();
+ }
+ }else if (type.equals(URLTYPE_WEBSERVICE)) {//webserver璇锋眰
+ MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
+ for (DockingSysIntParam dockingSysIntParam : dockingSysIntParamList) {
+ params.add(dockingSysIntParam.getParamKey(), dockingSysIntParam.getParamValue());
+ }
+
+ paramString = sendString;
+ MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
+ for (DockingSysIntHeader dockingSysIntHeader : dockingSysIntHeaderList) {
+ headers.add(dockingSysIntHeader.getHeaderKey(), dockingSysIntHeader.getHeaderValue());
+ }
+ backString = WsErpClientUtil.sendMsg(url, namespace, soapaction, interfaceFunction, targName, sendString, 10000);
+
+ } else {//corba鎺ュ彛
+ //paramString=sendString;
+ // backString = jacorbClient.getBOFactoryService().sendCode(sendString);
+ }
+
+ ResultJsonDTO resultJsonDTO = new ResultJsonDTO();
+ if(returnType.equals(DATATYPE_JSON)){
+ resultJsonDTO =JSONObject.toJavaObject(JSONObject.parseObject(backString), ResultJsonDTO.class);
+ }else {
+ //缁勭粐杩斿洖鎺ュ彛淇℃伅
+ XStream xStream = new XStream(new DomDriver());
+ xStream.processAnnotations(ResultNodeDataDTO.class);
+ xStream.autodetectAnnotations(true);
+ ResultNodeDataDTO resultNodeDataDTO = (ResultNodeDataDTO) xStream.fromXML(backString);
+ resultJsonDTO.setData(resultNodeDataDTO);
+ }
+ ResultNodeDataDTO resultNodeDataDTO=resultJsonDTO.getData();
+ resultNodeObjectDTOS=resultNodeDataDTO.getObject();
+ }catch (Throwable e){
+ msg="璋冪敤鎺ュ彛澶辫触:"+e.getMessage();
+ e.printStackTrace();
+ log.error("璋冪敤鎺ュ彛澶辫触:"+e);
+ // throw new Throwable("璋冪敤鎺ュ彛澶辫触:"+e);
+ ResultNodeObjectDTO resultNodeObjectDTO=new ResultNodeObjectDTO();
+ resultNodeObjectDTO.setErroid("1");
+ resultNodeObjectDTO.setMsg(msg);
+ resultNodeObjectDTO.setCode(dockingSystemConfig.getPushType().equalsIgnoreCase("2")?dockingTask.getClassifyId():dockingTask.getId());
+ resultNodeObjectDTO.setItemid(dockingTask.getBtmOid());
+ resultNodeObjectDTOS.add(resultNodeObjectDTO);
+ }finally {
+ boolean isSend = false;
+ for (ResultNodeObjectDTO resultNodeObjectDTO:resultNodeObjectDTOS){
+ String erroid = resultNodeObjectDTO.getErroid();
+ msg = resultNodeObjectDTO.getMsg();
+ if("0".equals(erroid)){
+ isSend = true;
+ }else if("1".equals(erroid)){
+ isSend=false;
+ }else{
+ isSend=false;
+ }
+ DockingLog dockingLogeDO = new DockingLog();
+ String oid=VciBaseUtil.getPk();
+ dockingLogeDO.setOid(oid);
+ dockingLogeDO.setSystemCode(dockingTask.getSystemCode());
+ dockingLogeDO.setSystemName(dockingTask.getSystemName());
+ dockingLogeDO.setSystemOid(dockingTask.getSystemOid());
+ dockingLogeDO.setClassifyOid(dockingTask.getClassifyOid());
+ dockingLogeDO.setClassifyId(dockingTask.getClassifyId());
+ dockingLogeDO.setClassifyName(dockingTask.getClassifyName());
+ dockingLogeDO.setCreateTime(new Date());
+ dockingLogeDO.setId(dockingTask.getId());
+ dockingLogeDO.setUniqueCode(dockingTask.getUniqueCode());
+ dockingLogeDO.setParamString(paramString);
+ dockingLogeDO.setReturnString(backString);
+ dockingLogeDO.setInterfaceStatus(isSend?"true":"false");
+ dockingLogeDO.setType(operation);
+ dockingLogeDO.setMsg(msg);
+ log.error("闆嗘垚鎺ㄩ�佹暟鎹�,systemcode:"+dockingTask.getSystemCode()+",systemname:"+dockingTask.getSystemName()+",url:"+url+",param:"+paramString+",e:"+msg);
+ dockingLogeService.save(dockingLogeDO);
+ }
+ //鍏ㄩ兘鎺ユ敹鎴愬姛鐨勬儏鍐典笅,淇敼dockingtask sendflag涓哄凡鍙戦��
+ if(isSend) {
+ dockingTask.setSendFlag(MdmDuckingConstant.SEND_FLAG_TRUE);
+ dockingTask.setLastModifyTime(new Date());
+ dockingTaskService.updateById(dockingTask);
+ }
+ }
+ }
+
/***
* 鏌ヨ闇�瑕侀泦鎴愮殑涓氬姟鏁版嵁浠诲姟
*/
@@ -1199,6 +1371,7 @@
List<DockingTask> dockingTaskDOS = dockingTaskService.list(queryWrapper);
sendpushClsfForService(dockingTaskDOS);
}
+
public void initSysadmin(){
SessionInfo sessionInfo = new SessionInfo();
sessionInfo.setUserId("sysAdmin");
@@ -1208,6 +1381,7 @@
sessionInfo.setUserSecret(UserSecretEnum.PRIVACY.getValue()+"");
WebUtil.setSessionInfo(sessionInfo);
}
+
/**
* dockingdata鏍规嵁oid淇敼sendflag
* @param oid
@@ -1223,5 +1397,6 @@
}
return u;
}
+
}
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
index 2965981..e808073 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -177,6 +177,11 @@
private MdmProductCodeService productCodeService;
/**
+ * 杩戜箟璇嶈鍒欐煡璇㈡湇鍔�
+ */
+ @Autowired ICodeSynonymService codeSynonymService;
+
+ /**
* 鍙緭鍙�夌殑鏈嶅姟
*/
@Resource
@@ -358,7 +363,6 @@
*/
@Autowired
private SaveLogUtil saveLogUtil;
-
/**
* 浣跨敤鍒嗙被鐨勪富閿幏鍙栧彲浠ヤ娇鐢ㄧ殑妯℃澘瀵硅薄
@@ -755,27 +759,36 @@
//娉ㄦ剰鐨勬槸keyRuleVO鍙兘涓虹┖锛岃〃绀轰笉浣跨敤瑙勫垯鎺у埗
//鑾峰彇鎵�鏈夌殑鍏抽敭灞炴��
Map<String, CodeClassifyTemplateAttrVO> ketAttrMap = templateVO.getAttributes().stream().filter(s -> VciBaseUtil.getBoolean(s.getKeyAttrFlag())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
+ // TODO:2024-02-01 鍏堣幏鍙栭厤缃簡杩戜箟璇嶆煡璇㈣鍒欑殑灞炴�э紝涓嶅悓浜庡叧閿睘鎬э紝璁剧疆浜嗚繎涔夎瘝鏌ヨ瑙勫垯鐨勫睘鎬у彲鑳芥槸澶氭潯涓嶅悓鐨勮繎涔夎瘝鏌ヨ瑙勫垯
+ Map<String, CodeClassifyTemplateAttrVO> sysonymAttrMaps = templateVO.getAttributes().stream().filter(item -> Func.isNotBlank(item.getSysonymRuleOids())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
+ // 鑾峰彇鏄惁鏈夐厤缃繎涔夎瘝鏌ヨ瑙勫垯灞炴��
+ Map<String, List<CodeSynonym>> codeSynonymMaps = new HashMap<>();
+ if(!sysonymAttrMaps.isEmpty()){
+ // 鏌ヨ杩戜箟璇嶈鍒欙紝瀛樺偍鏂瑰紡key锛氬睘鎬d锛寁alue杩戜箟璇嶆煡璇㈣鍒欏垪琛�
+ codeSynonymMaps = codeSynonymService.getCodeSynonymByOids(sysonymAttrMaps);
+ }
Map<String, String> conditionMap = new HashMap<>();
boolean trimAll = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnoreallspaceflag());
//鍏ㄩ儴鍘荤┖鐨勪紭鍏堢骇澶т簬鍘荤┖
boolean trim = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnorespaceflag());
boolean ignoreCase = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnorecaseflag());
boolean ignoreWidth = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnorewidthflag());
+ Map<String, List<CodeSynonym>> finalCodeSynonymMaps = codeSynonymMaps;
ketAttrMap.forEach((attrId, attrVO) -> {
String value = getValueFromOrderDTO(orderDTO, attrId);
if (value == null) {
value = "";
}
- wrapperKeyAttrConditionMap(value, keyRuleVO, attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap);
+ wrapperKeyAttrConditionMap(value, keyRuleVO, finalCodeSynonymMaps.get(attrId), attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap);
});
//娌℃湁闄愬埗鍒嗙被锛屼絾鏄竴涓ā鏉垮彧鍙兘鍦ㄤ竴涓笟鍔$被鍨嬮噷闈紝鎵�浠ョ洿鎺ユ煡璇㈣繖涓笟鍔$被鍨嬪嵆鍙�
if (!CollectionUtils.isEmpty(conditionMap)) {
// TODO: 鍚屼竴涓簱鍒ら噸涓嶉渶瑕佸尯鍒嗗垎绫籵id
// conditionMap.put("CODETEMPLATEOID","'" + orderDTO.getTemplateOid() + "'");
-// final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmtypeid()) + " t where 1 = 1 "};
+ // final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmtypeid()) + " t where 1 = 1 "};
R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(classifyFullInfo.getTopClassifyVO().getBtmTypeId()));
-// String referTable = VciBaseUtil.getTableName(referVO.getReferType());
+ // String referTable = VciBaseUtil.getTableName(referVO.getReferType());
if (!listR.isSuccess() || listR.getData().size() == 0) {
throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
}
@@ -800,7 +813,7 @@
if (Func.isNotEmpty(isParticipateCheckOids)) {
sql[0] += " and codeclsfid not in(" + isParticipateCheckOids + ")";
}
-// if (boService.queryCountBySql(sql[0], new HashMap<>()) > 0) {
+ // if (boService.queryCountBySql(sql[0], new HashMap<>()) > 0) {
List<String> repeatData = commonsMapper.selectList(sql[0]);
if (!repeatData.isEmpty()) {
String ruleInfoMsg = keyRuleVO == null ? "" : "鏌ヨ瑙勫垯锛氬幓闄ょ┖鏍�--{0},蹇界暐澶у皬鍐�--{1},蹇界暐鍏ㄥ崐瑙�--{2},蹇界暐鍏ㄩ儴绌烘牸--{3}";
@@ -825,18 +838,27 @@
//娉ㄦ剰鐨勬槸keyRuleVO鍙兘涓虹┖锛岃〃绀轰笉浣跨敤瑙勫垯鎺у埗
//鑾峰彇鎵�鏈夌殑鍏抽敭灞炴��
Map<String, CodeClassifyTemplateAttrVO> ketAttrMap = templateVO.getAttributes().stream().filter(s -> VciBaseUtil.getBoolean(s.getKeyAttrFlag())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
+ // TODO:2024-02-01 鍏堣幏鍙栭厤缃簡杩戜箟璇嶆煡璇㈣鍒欑殑灞炴�э紝涓嶅悓浜庡叧閿睘鎬э紝璁剧疆浜嗚繎涔夎瘝鏌ヨ瑙勫垯鐨勫睘鎬у彲鑳芥槸澶氭潯涓嶅悓鐨勮繎涔夎瘝鏌ヨ瑙勫垯
+ Map<String, CodeClassifyTemplateAttrVO> sysonymAttrMaps = templateVO.getAttributes().stream().filter(item -> Func.isNotBlank(item.getSysonymRuleOids())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
+ // 鑾峰彇鏄惁鏈夐厤缃繎涔夎瘝鏌ヨ瑙勫垯灞炴��
+ Map<String, List<CodeSynonym>> codeSynonymMaps = new HashMap<>();
+ if(!sysonymAttrMaps.isEmpty()){
+ // 鏌ヨ杩戜箟璇嶈鍒欙紝瀛樺偍鏂瑰紡key锛氬睘鎬d锛寁alue杩戜箟璇嶆煡璇㈣鍒欏垪琛�
+ codeSynonymMaps = codeSynonymService.getCodeSynonymByOids(sysonymAttrMaps);
+ }
Map<String, String> conditionMap = new HashMap<>();
boolean trimAll = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnoreallspaceflag());
//鍏ㄩ儴鍘荤┖鐨勪紭鍏堢骇澶т簬鍘荤┖
boolean trim = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnorespaceflag());
boolean ignoreCase = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnorecaseflag());
boolean ignoreWidth = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnorewidthflag());
+ Map<String, List<CodeSynonym>> finalCodeSynonymMaps = codeSynonymMaps;
ketAttrMap.forEach((attrId, attrVO) -> {
String value = getValueFromOrderDTO(orderDTO, attrId);
if (value == null) {
value = "";
}
- wrapperKeyAttrConditionMap(value, keyRuleVO, attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap);
+ wrapperKeyAttrConditionMap(value, keyRuleVO, finalCodeSynonymMaps.get(attrId), attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap);
});
//娌℃湁闄愬埗鍒嗙被锛屼絾鏄竴涓ā鏉垮彧鍙兘鍦ㄤ竴涓笟鍔$被鍨嬮噷闈紝鎵�浠ョ洿鎺ユ煡璇㈣繖涓笟鍔$被鍨嬪嵆鍙�
@@ -927,7 +949,7 @@
}
//鏄惁绯诲垪
if (!codeBZApplyDTO.isSeries()) {
- boolean isSeriesValue = codeBZApplyDTO.getData().get(isSeries).equals("true") ? true : false;
+ boolean isSeriesValue = Func.toBoolean(codeBZApplyDTO.getData().get(isSeries));
codeBZApplyDTO.setSeries(isSeriesValue);
}
//鍘熸爣鍑嗗彿
@@ -947,7 +969,7 @@
}
//鏄惁鍙樻洿绯诲垪
if (!codeBZApplyDTO.isEditSeries()) {
- boolean isEditSeriesValue = codeBZApplyDTO.getData().get(isEditSeries).equals("true") ? true : false;
+ boolean isEditSeriesValue = Func.toBoolean(codeBZApplyDTO.getData().get(isEditSeries));
codeBZApplyDTO.setEditSeries(isEditSeriesValue);
}
VciBaseUtil.alertNotNull(codeBZApplyDTO.getOperationType(), "鎿嶄綔绫诲瀷",
@@ -965,7 +987,7 @@
} else if (codeBZApplyDTO.getOperationType().equals(CodeBZOperationTypeEnum.CODE_BZ_DISABLE.getValue())) {//浣滃簾
code = amendmentDataBZ(codeBZApplyDTO, authUser);
createChangeOder(code, codeBZApplyDTO, authUser);
- } else if (codeBZApplyDTO.getOperationType().equals(CodeBZOperationTypeEnum.CODE_BZ_AMENDMENT.getValue())) {//澶囨煡
+ } else if (codeBZApplyDTO.getOperationType().equals(CodeBZOperationTypeEnum.CODE_BZ_FOR_REFERENCE.getValue())) {//澶囨煡
code = amendmentDataBZ(codeBZApplyDTO, authUser);
createChangeOder(code, codeBZApplyDTO, authUser);
}
@@ -1235,14 +1257,18 @@
* @param conditionMap 鏌ヨ鏉′欢
*/
@Override
- public void wrapperKeyAttrConditionMap(String value, CodeKeyAttrRepeatVO keyRuleVO, String attrId,
+ public void wrapperKeyAttrConditionMap(String value, CodeKeyAttrRepeatVO keyRuleVO,
+ List<CodeSynonym> codeSynonymMaps, String attrId,
boolean trim, boolean ignoreCase, boolean ignoreWidth,
boolean trimAll, Map<String, String> conditionMap) {
boolean ignoreSpace = trim || trimAll;
if (StringUtils.isBlank(value)) {
- //涓虹┖鐨勬椂鍊欙紝涓嶈兘鐢≦ueryOperation.ISNULL锛屽钩鍙颁笉鐭ラ亾鍟ユ椂鍊欎笉澶勭悊杩欑浜�
+ //鍊间负绌虹殑鏃跺�欙紝涓嶈兘鐢≦ueryOperation.ISNULL锛屽钩鍙颁笉鐭ラ亾鍟ユ椂鍊欎笉澶勭悊杩欑浜�
conditionMap.put("t." + attrId, QueryOptionConstant.ISNULL);
} else {
+ //杩戜箟璇嶆煡璇㈣鍒檝alu鍊艰浆鎹�
+ value = this.getValueToSynony(codeSynonymMaps, value);
+
if (keyRuleVO != null) {
String queryKey = "";
String queryValue = "";
@@ -1278,7 +1304,7 @@
conditionMap.put(queryKey, queryValue);
} else {
if (StringUtils.isNotBlank(value)) {
- //涓虹┖鐨勬椂鍊欎笉浠h〃涓嶆牎楠岋紝鍙槸涓嶅幓闄ょ浉鍏崇殑淇℃伅
+ //鍏抽敭灞炴�ф煡閲嶈鍒欎负绌虹殑鏃跺�欎笉浠h〃涓嶆牎楠岋紝鍙槸涓嶅幓闄ょ浉鍏崇殑淇℃伅
conditionMap.put("nvl(" + "t." + attrId + ",'/')", "'" + SpecialCharacterConverter.escapeSpecialCharacters(value) + "'");
} else {
conditionMap.put("t." + attrId, QueryOptionConstant.ISNULL);
@@ -1288,17 +1314,20 @@
}
/**
- * 灏佽杩戜箟璇嶆煡璇㈣鍒欏睘鎬х殑鏌ヨ璇彞
- * @param value 褰撳墠鐨勫��
- * @param keyRuleVO 灞炴�х殑缂栧彿
- * @param attrId
- * @param conditionMap 鏌ヨ鏉′欢
+ * 杩戜箟璇嶆煡璇㈣鍒欒浆鎹�
+ * @param codeSynonymMaps
+ * @param value
+ * @return
*/
- @Override
- public void wrapperSynonymAttrConditionMap(String value, CodeKeyAttrRepeatVO keyRuleVO, String attrId, Map<String, String> conditionMap) {
- // map鏋勯�犳�濊矾锛�1銆佸厛瀹屾垚姝e悜鏇挎崲sql鍊�
- // 2銆佸啀瀹屾垚鍙嶅悜鏇挎崲sql鍊�
-
+ public String getValueToSynony(/*杩戜箟璇嶆煡璇㈣鍒�*/List<CodeSynonym> codeSynonymMaps,String value){
+ // 鑾峰彇骞跺垽鏂槸鍚﹂厤缃簡杩戜箟璇嶆煡璇㈣鍒�
+ // TODO锛氳繎涔夎瘝鏇挎崲鎴愭簮鍊硷紙婧愬�兼槸姝g‘鐨勫�硷紝杩戜箟璇嶆槸鐩稿綋浜庤緭閿欑瑪璇殑瀛楃锛�
+ if(!codeSynonymMaps.isEmpty()){
+ for (int i = 0; i < codeSynonymMaps.size(); i++) {
+ value = value.replace(codeSynonymMaps.get(i).getSynonymValue(),codeSynonymMaps.get(i).getSourceValue());
+ }
+ }
+ return value;
}
/**
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
index b967ab5..6f42765 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
@@ -165,6 +165,9 @@
@Autowired
private ICodeKeyAttrRepeatService keyRuleService;
+ /**
+ * 杩戜箟璇嶈鍒欐煡璇㈡湇鍔�
+ */
@Autowired ICodeSynonymService codeSynonymService;
/**
@@ -3095,18 +3098,27 @@
//娉ㄦ剰鐨勬槸keyRuleVO鍙兘涓虹┖锛岃〃绀轰笉浣跨敤瑙勫垯鎺у埗
//鑾峰彇鎵�鏈夌殑鍏抽敭灞炴��
Map<String, CodeClassifyTemplateAttrVO> ketAttrMap = templateVO.getAttributes().stream().filter(s -> VciBaseUtil.getBoolean(s.getKeyAttrFlag())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
+ // TODO:2024-02-01 鍏堣幏鍙栭厤缃簡杩戜箟璇嶆煡璇㈣鍒欑殑灞炴�э紝涓嶅悓浜庡叧閿睘鎬э紝璁剧疆浜嗚繎涔夎瘝鏌ヨ瑙勫垯鐨勫睘鎬у彲鑳芥槸澶氭潯涓嶅悓鐨勮繎涔夎瘝鏌ヨ瑙勫垯
+ Map<String, CodeClassifyTemplateAttrVO> sysonymAttrMaps = templateVO.getAttributes().stream().filter(item -> Func.isNotBlank(item.getSysonymRuleOids())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
+ // 鑾峰彇鏄惁鏈夐厤缃繎涔夎瘝鏌ヨ瑙勫垯灞炴��
+ Map<String, List<CodeSynonym>> codeSynonymMaps = new HashMap<>();
+ if(!sysonymAttrMaps.isEmpty()){
+ // 鏌ヨ杩戜箟璇嶈鍒欙紝瀛樺偍鏂瑰紡key锛氬睘鎬d锛寁alue杩戜箟璇嶆煡璇㈣鍒欏垪琛�
+ codeSynonymMaps = codeSynonymService.getCodeSynonymByOids(sysonymAttrMaps);
+ }
Map<String, String> conditionMap = new HashMap<>();
boolean trimAll = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnoreallspaceflag());
//鍏ㄩ儴鍘荤┖鐨勪紭鍏堢骇澶т簬鍘荤┖
boolean trim = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnorespaceflag());
boolean ignoreCase = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnorecaseflag());
boolean ignoreWidth = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnorewidthflag());
+ Map<String, List<CodeSynonym>> finalCodeSynonymMaps = codeSynonymMaps;
ketAttrMap.forEach((attrId, attrVO) -> {
String value = getValueFromOrderDTO(orderDTO, attrId);
if (value == null) {
value = "";
}
- engineService.wrapperKeyAttrConditionMap(value, keyRuleVO, attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap);
+ engineService.wrapperKeyAttrConditionMap(value, keyRuleVO, finalCodeSynonymMaps.get(attrId), attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap);
});
//娌℃湁闄愬埗鍒嗙被锛屼絾鏄竴涓ā鏉垮彧鍙兘鍦ㄤ竴涓笟鍔$被鍨嬮噷闈紝鎵�浠ョ洿鎺ユ煡璇㈣繖涓笟鍔$被鍨嬪嵆鍙�
@@ -4398,7 +4410,7 @@
// TODO:2024-02-01 鍏堣幏鍙栭厤缃簡杩戜箟璇嶆煡璇㈣鍒欑殑灞炴�э紝涓嶅悓浜庡叧閿睘鎬э紝璁剧疆浜嗚繎涔夎瘝鏌ヨ瑙勫垯鐨勫睘鎬у彲鑳芥槸澶氭潯涓嶅悓鐨勮繎涔夎瘝鏌ヨ瑙勫垯
Map<String, CodeClassifyTemplateAttrVO> sysonymAttrMaps = templateVO.getAttributes().stream().filter(item -> Func.isNotBlank(item.getSysonymRuleOids())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
- // 鏈夐厤缃繎涔夎瘝鏌ヨ瑙勫垯灞炴��
+ // 鑾峰彇鏄惁鏈夐厤缃繎涔夎瘝鏌ヨ瑙勫垯灞炴��
Map<String, List<CodeSynonym>> codeSynonymMaps = new HashMap<>();
if(!sysonymAttrMaps.isEmpty()){
// 鏌ヨ杩戜箟璇嶈鍒欙紝瀛樺偍鏂瑰紡key锛氬睘鎬d锛寁alue杩戜箟璇嶆煡璇㈣鍒欏垪琛�
@@ -4417,8 +4429,8 @@
new String[]{trim?"鏄�":"鍚�",ignoreCase?"鏄�":"鍚�",ignoreWidth?"鏄�":"鍚�",trimAll?"鏄�":"鍚�"}));
//resultVO.setSelfRepeatRowIndexList(getSelfRepeatRowIndex(keyAttrMap,cboList,keyRuleVO));
- // 鍏堝湪琛ㄦ牸涓煡璇㈠叧閿睘鎬ч噸澶嶇殑鍒�
- getSelfRepeatRowIndex(keyAttrMap,cboList,keyRuleVO,resultVO);
+ // 鍏堝湪琛ㄦ牸涓煡璇㈠叧閿睘鎬у拰杩戜箟璇嶈浆鎹㈠悗閲嶅鐨勫垪
+ getSelfRepeatRowIndex(keyAttrMap,cboList,keyRuleVO,codeSynonymMaps,resultVO);
// 鍐嶅湪琛ㄦ牸涓煡璇㈣繎涔夎瘝鏌ヨ瑙勫垯鐨勫垪
//getSelfRepeatSysnomRowIndex(sysonymAttrMaps,cboList,codeSynonymMaps,resultVO);
@@ -4435,6 +4447,7 @@
// ,鎵�浠ユ殏鏃跺皢parallelStream鏀规垚浜唖tream锛屾敼鎴愪簡stream涔嬪悗鍙戠幇宸ㄦ參
// customForkJoinPool鎺у埗骞跺彂搴�
List<ClientBusinessObject> finalCboList = cboList;
+ Map<String, List<CodeSynonym>> finalCodeSynonymMaps = codeSynonymMaps;
List<ClientBusinessObject> repeatDataMap = (List<ClientBusinessObject>) customForkJoinPool.submit(()->{
finalCboList.parallelStream().filter(cbo -> {
//姣忚閮藉緱鏌ヨ.濡傛灉鍏朵腑鍑虹幇浜嗛敊璇紝鎴戜滑灏辩洿鎺ユ姏鍑哄紓甯革紝鍏朵綑鐨勬樉绀�
@@ -4447,9 +4460,7 @@
}
value= value.replace(REQUIRED_CHAR,SPECIAL_CHAR);
// 鍏抽敭灞炴�ф煡璇㈡潯浠秏ap鑾峰彇
- engineService.wrapperKeyAttrConditionMap(value, keyRuleVO, attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap);
- // 杩戜箟璇嶆煡璇㈣鍒欐潯浠秏ap鑾峰彇
- //engineService.wrapperSynonymAttrConditionMap(value);
+ engineService.wrapperKeyAttrConditionMap(value, keyRuleVO, finalCodeSynonymMaps.get(attrId), attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap);
});
if (!CollectionUtils.isEmpty(keyAttrMap)) {
@@ -4603,14 +4614,14 @@
}
/**
- * 鑾峰彇瀵煎叆鐨勫唴瀹逛腑鍏抽敭灞炴�ч噸澶嶇殑琛屽彿
+ * 鑾峰彇瀵煎叆鐨勫唴瀹逛腑鍏抽敭灞炴�ц繎涔夎瘝杞崲鍚庨噸澶嶇殑琛屽彿
* @param ketAttrMap 鍏抽敭灞炴�х殑鏄犲皠
* @param dataList 瀵煎叆鐨勬暟鎹�
* @param keyRuleVO 鍏抽敭灞炴�ф帶鍒惰鍒�
* @return 閲嶅鐨勮鍙�
*/
private void getSelfRepeatRowIndex(Map<String/**灞炴�х殑缂栧彿**/, CodeClassifyTemplateAttrVO> ketAttrMap,
- List<ClientBusinessObject> dataList,CodeKeyAttrRepeatVO keyRuleVO,CodeImportResultVO resultVO){
+ List<ClientBusinessObject> dataList,CodeKeyAttrRepeatVO keyRuleVO,/*杩戜箟璇嶆煡璇㈣鍒�*/Map<String,List<CodeSynonym>> codeSynonymMaps, CodeImportResultVO resultVO){
Set<String> selfRepeatRowIndexList = new CopyOnWriteArraySet<>();
Map<String,List<String>> keyAttrOkOidTORepeatOidMap=new HashMap<>();
boolean trimAll =keyRuleVO ==null?false: VciBaseUtil.getBoolean(keyRuleVO.getIgnoreallspaceflag());
@@ -4626,10 +4637,10 @@
String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
String oid=cbo.getOid();
StringBuilder sb = new StringBuilder();
- // 鍏抽敭灞炴�ч噸澶嶆牎楠屽�煎鐞�
- for (int i = 0; i < attrVOList.size(); i++) {
- CodeClassifyTemplateAttrVO attrVO = attrVOList.get(i);
- String attrId = attrVO.getId().toLowerCase(Locale.ROOT);
+
+ // TODO锛� 2024-02-25鏀归�犲疄鐜拌繎涔夎瘝鏌ヨ瑙勫垯鍔熻兘锛涘叧閿睘鎬ч噸澶嶆牎楠屽�煎鐞�
+ attrVOList.stream().forEach(item->{
+ String attrId = item.getId().toLowerCase(Locale.ROOT);
String value = cbo.getAttributeValue( attrId);
if (value == null) {
value = "";
@@ -4646,61 +4657,9 @@
if(ignoreWidth){
value = VciBaseUtil.toDBC(value);
}
+ value = mdmEngineService.getValueToSynony(codeSynonymMaps.get(attrId),value);
sb.append(value).append("${ks}");
- }
- String keyString = sb.toString();
- if(rowIndexKeyStringMap.containsValue(keyString) && StringUtils.isNotBlank(keyString)){
- selfRepeatRowIndexList.add(rowIndex);
- String okOid=okOidKeyStringMap.getOrDefault(keyString,"");
- if(StringUtils.isNotBlank(okOid)){
- List<String>newOidList=new ArrayList<>();
- newOidList.add(oid);
- if(keyAttrOkOidTORepeatOidMap.containsKey(okOid)){
- List<String> oldOidList = keyAttrOkOidTORepeatOidMap.get(okOid);
- newOidList.addAll(oldOidList);
-
- }
- keyAttrOkOidTORepeatOidMap.put(okOid,newOidList);
- }
- }else {
- okOidKeyStringMap.put(sb.toString(),oid);
- rowIndexKeyStringMap.put(rowIndex, sb.toString());
- }
- });
- //鍥犱负鍙槸鍏抽敭灞炴�ч噸澶嶏紝鎵�浠ユ垜浠笉鑳介噸澶嶇殑澶氭潯閫変竴鏉℃潵鎶ラ敊
- resultVO.setKeyAttrRepeatRowIndexList(selfRepeatRowIndexList);
- resultVO.setKeyAttrOkOidTORepeatOidMap(keyAttrOkOidTORepeatOidMap);
- }
-
- /**
- * 鑾峰彇杩戜箟璇嶆煡璇㈠瓨鍦ㄧ浉鍚岀殑琛屽彿
- * @param sysonymAttr
- * @param dataList
- * @param CodeSynonymMaps
- * @param resultVO
- */
- private void getSelfRepeatSysnomRowIndex(Map<String/**灞炴�х殑缂栧彿**/, CodeClassifyTemplateAttrVO> sysonymAttr,
- List<ClientBusinessObject> dataList, Map<String, List<CodeSynonym>> CodeSynonymMaps,CodeImportResultVO resultVO) {
- Set<String> selfRepeatRowIndexList = new CopyOnWriteArraySet<>();
- Map<String,List<String>> keyAttrOkOidTORepeatOidMap=new HashMap<>();
- //蹇呴』灏嗗睘鎬ф寜鐓ч『搴忔帓搴忓ソ
- List<CodeClassifyTemplateAttrVO> attrVOList = sysonymAttr.values().stream().sorted(((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum()))).collect(Collectors.toList());
- Map<String/**琛屽彿**/,String/**鍏抽敭灞炴�х殑缁勫悎鍐呭**/> rowIndexKeyStringMap = new HashMap<>();
- Map<String/**鍏抽敭灞炴�х殑缁勫悎鍐呭**/,String/**绗竴涓叧閿睘鎬х殑鏁版嵁oid**/> okOidKeyStringMap = new HashMap<>();
- dataList.parallelStream().forEach(cbo-> {
- String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
- String oid = cbo.getOid();
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < attrVOList.size(); i++) {
- CodeClassifyTemplateAttrVO attrVO = attrVOList.get(i);
- String attrId = attrVO.getId().toLowerCase(Locale.ROOT);
- String value = cbo.getAttributeValue(attrId);
- List<CodeSynonym> codeSynonyms = CodeSynonymMaps.get(attrId);
- // 瀵硅繎涔夎瘝鏌ヨ鍊艰繘琛岃浆鎹�
- value = synonymConversion(codeSynonyms,value);
- // 濡傛灉codeSynonyms鏄涓氨闇�瑕佽�冭檻缁勫悎闂
- sb.append(value).append("${sys}");
- }
+ });
String keyString = sb.toString();
if(rowIndexKeyStringMap.containsValue(keyString) && StringUtils.isNotBlank(keyString)){
selfRepeatRowIndexList.add(rowIndex);
@@ -4722,23 +4681,6 @@
//鍥犱负鍙槸鍏抽敭灞炴�ч噸澶嶏紝鎵�浠ユ垜浠笉鑳介噸澶嶇殑澶氭潯閫変竴鏉℃潵鎶ラ敊
resultVO.setKeyAttrRepeatRowIndexList(selfRepeatRowIndexList);
resultVO.setKeyAttrOkOidTORepeatOidMap(keyAttrOkOidTORepeatOidMap);
- }
-
- /**
- * 杩戜箟璇嶄笌婧愬�肩浉浜掕浆鎹�
- * @param codeSynonyms
- * @param value
- * @return
- */
- private String synonymConversion(List<CodeSynonym> codeSynonyms,String value){
- // 鍙湁涓�鏉¤繎涔夎瘝鏌ヨ瑙勫垯鏃�
- if(codeSynonyms.isEmpty() || codeSynonyms.size() == 1){
- return value.replace(codeSynonyms.get(0).getSourceValue(),codeSynonyms.get(0).getSynonymValue());
- }
- // 杩戜箟璇嶈鍒欏彲鑳藉嚭鐜扮殑鎯呭喌鏄竴涓簮鍊煎搴斿涓繎涔夎瘝锛岃�屽弽鏌ユ椂鍚屾牱浼氬嚭鐜颁竴涓繎涔夎瘝瀵瑰簲澶氫釜婧愬��
-// codeSynonyms.stream().map()
-
- return value;
}
/**
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/webService/config/VciCxfPublishConfig.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/webService/config/VciCxfPublishConfig.java
index 30ab765..9e42cc8 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/webService/config/VciCxfPublishConfig.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/webService/config/VciCxfPublishConfig.java
@@ -42,7 +42,7 @@
public void autoPushCxf(){
log.info("寮�濮嬭繘琛岃嚜鍔ㄥ彂甯僿ebService鎺ュ彛");
- Map<String, Object> beansWithAnnotation = ApplicationContextProvider.getApplicationContext().getBeansWithAnnotation(VciWebservice.class);
+ Map<String, Object> beansWithAnnotation = ApplicationContextProvider.getApplicationContext().getBeansWithAnnotation(VciWebservice.class);
if(!CollectionUtils.isEmpty(beansWithAnnotation)){
//鎵捐繖浜沚ean鐨�
beansWithAnnotation.forEach((beanName,bean)->{
diff --git a/Source/UBCS/ubcs-service/ubcs-deploy/src/main/java/com/vci/ubcs/deploy/service/impl/DeployAppsServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-deploy/src/main/java/com/vci/ubcs/deploy/service/impl/DeployAppsServiceImpl.java
index a641db4..af4bb01 100644
--- a/Source/UBCS/ubcs-service/ubcs-deploy/src/main/java/com/vci/ubcs/deploy/service/impl/DeployAppsServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-deploy/src/main/java/com/vci/ubcs/deploy/service/impl/DeployAppsServiceImpl.java
@@ -17,8 +17,10 @@
import com.vci.ubcs.starter.util.HttpUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
+import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.WebUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.ServiceInstance;
@@ -30,6 +32,8 @@
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletRequest;
@@ -40,6 +44,8 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -167,18 +173,18 @@
if(deployAppsVO.getName().isEmpty()){
throw new ServiceException("缂哄皯蹇呬紶鍙傛暟name");
}
- DeployApps deployApps = deployAppsMapper.selectOne(Wrappers.<DeployApps>query().lambda().eq(DeployApps::getServerName, deployAppsVO.getName()));
+ List<DeployApps> deployApps = deployAppsMapper.selectList(Wrappers.<DeployApps>query().lambda().eq(DeployApps::getServerName, deployAppsVO.getName()));
if(Func.isNotEmpty(deployApps)){
- return deployApps;
+ return deployApps.get(0);
}
// 鏈粠搴撲腑鏌ヨ鍒帮紝闇�瑕佺敓鎴愭湇鍔′俊鎭繚瀛橀粯璁や俊鎭埌搴撲腑
DeployApps defaultDeployApps = new DeployApps();
- defaultDeployApps.setLogPath(PARENTPATH + "\\" + deployAppsVO.getName().replace("-","_") + LOGPATH);
+ defaultDeployApps.setLogPath(PARENTPATH + deployAppsVO.getName().replace("-","_") + LOGPATH);
defaultDeployApps.setServerName(deployAppsVO.getName());
defaultDeployApps.setStartCmd(CmdConfigEnum.START_CMD.getValue() + deployAppsVO.getName());
defaultDeployApps.setStopCmd(CmdConfigEnum.STOP_CMD.getValue() + deployAppsVO.getName());
defaultDeployApps.setRestartCmd(CmdConfigEnum.RESTART_CMD.getValue() + deployAppsVO.getName());
- defaultDeployApps.setServerPath(PARENTPATH + "\\" + deployAppsVO.getName().replace("-","_"));
+ defaultDeployApps.setServerPath(PARENTPATH + deployAppsVO.getName().replace("-","_"));
int eft = deployAppsMapper.insert(defaultDeployApps);
if (!SqlHelper.retBool(eft)) {
throw new ServiceException("鐢熸垚榛樿鏈嶅姟淇℃伅鍒板簱涓椂澶辫触锛�");
@@ -194,8 +200,7 @@
*/
@Override
public boolean saveOrUpdateServiceInfo(DeployAppsVO deployAppsVO) throws ServiceException {
- boolean b = this.saveOrUpdate(deployAppsVO);
- return b;
+ return this.saveOrUpdate(deployAppsVO);
}
/**
@@ -208,6 +213,10 @@
public boolean addSave(DeployApps deployApps) throws ServiceException {
if (Func.isBlank(deployApps.getServerName()) || Func.isBlank(deployApps.getServerPath())) {
throw new ServiceException("蹇呬紶鍙傛暟[鏈嶅姟鍚嶇О锛屾湇鍔″瓨鏀捐矾寰刔涓嶈兘涓虹┖");
+ }
+ List<DeployApps> deployAppsList = deployAppsMapper.selectList(Wrappers.<DeployApps>query().lambda().eq(DeployApps::getServerName, deployApps.getServerName()));
+ if (!deployAppsList.isEmpty()) {
+ throw new ServiceException("鏂板鏈嶅姟鐨勬湇鍔″悕閲嶅锛�");
}
return SqlHelper.retBool(deployAppsMapper.insert(deployApps));
}
@@ -238,12 +247,12 @@
String backName = "";
String fileType = "file";
// 鏄帇缂╂枃浠�,鍥犱负鍙細瀛樺湪涓ょ鎯呭喌锛屾枃浠跺悕鏄帇缂╂枃浠讹紝鎴栬�呮枃浠讹紙.jar绫诲瀷鐨勬枃浠讹級
+ // 褰撳墠鏃堕棿
+ String currentDateTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
if (file.getContentType().equals("application/zip") || file.getContentType().equals("application/x-zip-compressed")) {
- backName = file.getOriginalFilename().replace(".zip","_"+Func.formatDate(new Date()));
- fileType = "zip";
+ backName = file.getOriginalFilename().replace(".zip","_" + currentDateTime);
}else{
- backName = file.getOriginalFilename().replace(".","_"+Func.formatDate(new Date())+".");
- fileType = "file";
+ backName = file.getOriginalFilename().replace(".","_" + currentDateTime + ".");
}
File source = new File(deployAppsDB.get(0).getServerPath() + this.SEPARATOR + file.getOriginalFilename().replace(".zip", ""));
File destination = new File(deployAppsDB.get(0).getFileBack() + this.SEPARATOR + backName);
@@ -338,6 +347,7 @@
return "The executed command is empty";
}
// 鎵цLinux鍛戒护
+ log.info("寮�濮嬫墽琛屽懡浠わ細"+cmd);
Process process = Runtime.getRuntime().exec(cmd);
// 璇诲彇鍛戒护鎵ц缁撴灉
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
@@ -347,7 +357,7 @@
}
// 绛夊緟鍛戒护鎵ц瀹屾垚
int exitCode = process.waitFor();
- log.info("鍛戒护鎵ц缁撴灉锛�" + output.toString());
+ log.info("鍛戒护鎵ц缁撴灉锛�" + output.toString()+":"+exitCode);
return output.toString();
}catch (IOException | InterruptedException e){
e.printStackTrace();
--
Gitblit v1.9.3