From 012235d05d8dc7c2decdc7229d93033b0399ecbb Mon Sep 17 00:00:00 2001
From: xiejun <xiejun@vci-tech.com>
Date: 星期日, 10 十一月 2024 15:49:53 +0800
Subject: [PATCH] 集成获取mdm分发通用数据格式接口集成

---
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/data.json         |    4 ++--
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/MDMParamData.java |    6 +++---
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/data1.json        |    8 ++++++++
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeMdmInfaceImpl.java              |    8 +++++++-
 4 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/MDMParamData.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/MDMParamData.java
index fdbafeb..972d6af 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/MDMParamData.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/MDMParamData.java
@@ -40,7 +40,7 @@
 	/***
 	 * 鍒嗗彂浜哄憳鏁版嵁淇℃伅
 	 */
-	private List<Map<String,String>> masterData=new ArrayList<>();
+	private String masterData;
 
 	public int getCode() {
 		return code;
@@ -90,11 +90,11 @@
 		this.distributeToken = distributeToken;
 	}
 
-	public List<Map<String,String>> getMasterData() {
+	public String getMasterData() {
 		return masterData;
 	}
 
-	public void setMasterData(List<Map<String,String>> masterData) {
+	public void setMasterData(String masterData) {
 		this.masterData = masterData;
 	}
 
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/data.json b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/data.json
index 5014b28..6678097 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/data.json
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/data.json
@@ -8,7 +8,7 @@
     {
       "id": "xj000001",
       "dr": "0",
-      "mdm_code": "xj000001",
+      "mdm_code": "xj000005",
       "industry": "",
       "product_family": "",
       "product_line": "product_line",
@@ -34,7 +34,7 @@
     },{
       "id": "xj000002",
       "dr": "0",
-      "mdm_code": "xj_00002",
+      "mdm_code": "xj_00006",
       "industry": "",
       "product_family": "",
       "product_line": "product_line",
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/data1.json b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/data1.json
new file mode 100644
index 0000000..8660de3
--- /dev/null
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/mdm/data1.json
@@ -0,0 +1,8 @@
+{ "msg":"瀹℃壒鎷掔粷鏃剁殑璇︽儏淇℃伅",
+  "distributeToken": "2",
+  "code":"0",
+  "systemCode":"ERP",
+  "mdType":"product_info",
+  "action":"distribute_subseribe",
+  "masterData": "[{\"id\": \"xj000001\",\"dr\": \"0\",\"mdm_code\": \"xj000005\",\"industry\": \"\",\"product_family\": \"\",\"product_line\": \"product_line\",\"product_manu_symbol\": \"product_manu_symbol\",\"product_manufacture_code\": \"manufacture_code\",\"product_manufacture_name\": \"name\",\"product_model\": \"product_model\",\"product_model_name\": \"product_model_name\",\"product_model_symbol\": \"product_model_symbol\",\"product_type\": \"product_type\",\"project_code\": \"project_code\",\"project_name\": \"project_name\",\"project_symbol\": \"project_symbol\",\"pk_mdm\": \"xj0001\",\"mdm_version\": \"V1\",\"mdm_duplicate\": \"0\",\"creator\": \"zhangsan\",\"createtime\": \"2024-10-23\",\"modifier\": \"zhangsan\",\"modifytime\": \"2024-10-23\",\"mdm_datastatus\": \"3\",\"mdm_cleanstatus\": \"TRANSFER\"},{\"id\": \"xj000002\",\"dr\": \"0\",\"mdm_code\": \"xj_00006\",\"industry\": \"\",\"product_family\": \"\",\"product_line\": \"product_line\",\"product_manu_symbol\": \"product_manu_symbol1\",\"product_manufacture_code\": \"product_manufacture_code1\",\"product_manufacture_name\": \"product_manufacture_name1\",\"product_model\": \"product_model1\",\"product_model_name\": \"product_model_name1\",\"product_model_symbol\": \"product_model_symbol1\",\"product_type\": \"type\",\"project_code\": \"project_code1\",\"project_name\": \"project_name1\",\"project_symbol\": \"symbol\",\"pk_mdm\": \"xj0002\",\"mdm_version\": \"V1\",\"mdm_duplicate\": \"0\",\"creator\": \"zhangsan\",\"createtime\": \"2024-10-23\",\"modifier\": \"zhangsan\",\"modifytime\": \"2024-10-23\",\"mdm_datastatus\": \"3\",\"mdm_cleanstatus\": \"TRANSFER\"}]"
+}
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeMdmInfaceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeMdmInfaceImpl.java
index 5701c22..14c5bc0 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeMdmInfaceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeMdmInfaceImpl.java
@@ -1,6 +1,7 @@
 package com.vci.ubcs.code.service.impl;
 
 import com.alibaba.cloud.commons.lang.StringUtils;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -28,6 +29,7 @@
 import com.vci.ubcs.code.vo.webserviceModel.mdm.MDMParamData;
 import com.vci.ubcs.code.vo.webserviceModel.mdm.MdmResultData;
 import com.vci.ubcs.code.vo.webserviceModel.person.EnumerableData;
+import com.vci.ubcs.code.vo.webserviceModel.person.PersonMasterData;
 import com.vci.ubcs.code.vo.webserviceModel.person.ResultMdMapping;
 import com.vci.ubcs.code.vo.webserviceModel.result.xml.XMLResultDataObjectDetailDO;
 import com.vci.ubcs.code.webService.config.AttributeMapConfig;
@@ -183,6 +185,10 @@
 				throw new Throwable("鐢ㄦ埛閴存潈澶辫触");
 			}
 			List<ClassifyConfig> classifyConfigList=mdmInterFaceConfig.getClassifyconfigs();
+			//masterDataList
+			String masterDataStr = mdmParamData.getMasterData();
+			masterDataList = JSONArray.parseObject(masterDataStr,List.class);
+
 			if(StringUtils.isNotBlank(library)&&StringUtils.isNotBlank(classifyCode)){
 				String finalLibrary = library;
 				classifyConfigList.stream().forEach(classifyConfig -> {
@@ -264,7 +270,7 @@
 			if (com.alibaba.nacos.common.utils.StringUtils.isBlank(tableName)) {
 				throw new Throwable("鏍规嵁涓氬姟绫诲瀷鏈煡璇㈠埌涓氬姟绫诲瀷鐩稿叧鑱旂殑琛�");
 			}
-			masterDataList = mdmParamData.getMasterData();
+
 			List<String> codeList = new ArrayList<>();
 			List<ApplyDataVO> applyDataVOList = new ArrayList<>();
 			List<ApplyDataVO> deleteDataVOList = new ArrayList<>();

--
Gitblit v1.9.3