From 309a30c45f8a614bfdb4f6ef9816e5df49ae6afa Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 10 十月 2023 17:13:34 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/views/modeling/cycle.vue | 5
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeSyncUniversalController.java | 3
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/SystemClassifyRoleMapper.xml | 1
Source/UBCS-WEB/src/views/integration/systemInfo.vue | 129 ++++++-------
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeDuckingSyncServiceImpl.java | 13 +
Source/UBCS-WEB/src/views/docking/infoForm.vue | 1
Source/UBCS-WEB/src/views/code/codeApply.vue | 310 ++++++++++++++++++++++++++++++++++
Source/UBCS-WEB/src/api/code/codeApply.js | 27 +++
Source/UBCS-WEB/src/components/Master/MasterTree.vue | 1
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/datapush/data/NodeObjectDTO.java | 31 ++-
10 files changed, 434 insertions(+), 87 deletions(-)
diff --git a/Source/UBCS-WEB/src/api/code/codeApply.js b/Source/UBCS-WEB/src/api/code/codeApply.js
new file mode 100644
index 0000000..f51069c
--- /dev/null
+++ b/Source/UBCS-WEB/src/api/code/codeApply.js
@@ -0,0 +1,27 @@
+import request from '@/router/axios';
+
+//缂栫爜鐢宠鏍�
+export const getAuthTree = (params) => {
+ return request({
+ url: '/api/ubcs-code/codeApplyWebManagementController/getAuthTree',
+ method: 'get',
+ params:{
+ ...params
+ }
+ })
+}
+//缂栫爜鐢宠鎺т欢
+export const getUsedTemplateByClassifyOid = (params) => {
+ return request({
+ url: '/api/ubcs-code/codeApplySwingController/getUsedTemplateByClassifyOid',
+ method: 'get',
+ params
+ })
+}
+export function getCodeRule(params) {
+ return request({
+ url: 'api/ubcs-code/mdmEngineController/getCodeRuleByClassifyOid',
+ method: 'get',
+ params
+ })
+}
diff --git a/Source/UBCS-WEB/src/components/Master/MasterTree.vue b/Source/UBCS-WEB/src/components/Master/MasterTree.vue
index 30e20db..735ac38 100644
--- a/Source/UBCS-WEB/src/components/Master/MasterTree.vue
+++ b/Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -170,6 +170,7 @@
try {
// console.log(data)
this.TreeValue=data.label.split(" ")[0].trim();
+ console.log('TreeValue',this.TreeValue)
this.$emit('TreeValue',this.TreeValue)
this.nodeClickList = data;
this.tableHeadDataFateher = []
diff --git a/Source/UBCS-WEB/src/views/code/codeApply.vue b/Source/UBCS-WEB/src/views/code/codeApply.vue
index a18b614..0475372 100644
--- a/Source/UBCS-WEB/src/views/code/codeApply.vue
+++ b/Source/UBCS-WEB/src/views/code/codeApply.vue
@@ -1,10 +1,316 @@
<template>
- <p>缂栫爜鐢宠</p>
+ <el-row>
+ <el-col :span="4">
+ <basic-container>
+ <avue-tree ref="tree"
+ v-model="form"
+ :data="TreeData"
+ :option="TreeOption"
+ style="height: calc(100vh - 150px)"
+ @node-click="nodeClick">
+ </avue-tree>
+ </basic-container>
+ </el-col>
+ <el-col :span="20">
+ <basic-container>
+ <div style="height: calc(100vh - 150px)">
+ <FormTemplate
+ key="masterForm" data-key="masterForm"
+ v-bind="$attrs"
+ :type="type"
+ :TreeValue="TreeValue"
+ :eventList="eventList"
+ ref="FormTemplate"
+ @getFormData="getFormData"
+ ></FormTemplate>
+ <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
+ <el-tab-pane label="鐮佸�肩敵璇�" name="codeApply" v-if="showCodeApply">
+ <FormTemplate
+ key="codeApplyForm" data-key="codeApplyForm"
+ secDTOListv-bind="$attrs"
+ :type="type"
+ :selfColumnType="selfColumnType"
+ :selfColumnConfig="selfColumnConfig"
+ ref="CodeApply"
+ @getFormData="getCodeApplyFormData"
+ @referConfigDataUpdate="referConfigDataUpdate"
+ ></FormTemplate>
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+ </basic-container>
+ </el-col>
+ </el-row>
</template>
<script>
+import {getAuthTree,getUsedTemplateByClassifyOid,getCodeRule} from '@/api/code/codeApply.js'
+
export default {
-name: "codeApply"
+ name: "codeApply",
+ components: { FormTemplate: () => import('@/components/FormTemplate/FormTemplate') },
+ data() {
+ return {
+ codeClassifyOid:'',
+ type:'add',
+ TreeValue:'',
+ dialogVisible:true,
+ setForm:{},
+ secVOList: [],
+ codeRuleOid: "",
+ activeName: "codeApply",
+ showCodeApply: false,
+ eventList:[],
+ form: {},
+ TreeData:[],
+ TreeOption: {
+ defaultExpandAll: false,
+ addBtn: false,
+ },
+ //鏂板绫诲瀷
+ selfColumnType: {
+ codefixedsec: "combox",//鍥哄畾鐮佹
+ codeclassifysec: "refer",//鍒嗙被鐮佹
+ codevariablesec: "text",//鍙彉鐮佹
+ coderefersec: "refer",//寮曠敤鐮佹
+ codeattrsec: "text",
+ codelevelsec: "text",
+ codedatesec: "date"
+ },
+ selfColumnConfig: {
+ function: {
+ required: this.isRequired,
+ dicData: this.getOptionList,
+ type: this.getType,
+ referConfig: this.getReferConfig,
+ readOnly: this.getDisabled,
+ },
+ exchange: {
+ text: "name",
+ field: "oid",
+ prop: "oid",
+ showField: "name",
+ parentClassifySecOid: "parentClassifySecOid",
+ label: "name",
+ maxlength: "codeSecLength",
+ data: "fixedValueVOList",
+ dateFormate: "codeDateFormatStr"
+ },
+ directVoluation: {
+ search: true,
+ props: {
+ label: "id",
+ value: "id",
+ },
+ },
+ },
+ }
+ },
+ created() {
+ this.getTreeData()
+ },
+ methods:{
+ getFormData(form) {
+ this.form = form;
+ },
+ //瀹氫箟涓�涓慨鏀规暟鎹睘鎬у悕鐨勬柟娉�
+ ModifyProperties(obj, oldName, newName) {
+ for (let key in obj) {
+ if (key === oldName) {
+ obj[newName] = obj[key];
+ delete obj[key];
+ }
+ if (typeof obj[key] === 'object') {
+ this.ModifyProperties(obj[key], oldName, newName);
+ }
+ }
+ },
+ getTreeData(){
+ getAuthTree({
+ 'library': 'XH',
+ 'systemOid': '061261BF-2736-4589-12F7-0DFA79121222',
+ 'systemId': '02'
+ }).then(res => {
+ // console.log(res);
+ this.TreeData=res.data;
+ this.ModifyProperties(this.TreeData, 'name', 'label');
+ // console.log( this.codeClassifyOid)
+
+ });
+ },
+ nodeClick(row){
+ // console.log(row)
+ this.TreeValue=row.text.split(" ")[0].trim();
+ this.codeClassifyOid = row.oid;
+ getUsedTemplateByClassifyOid({ 'codeClassifyOid': this.codeClassifyOid,templateOid:' 97e979919a1f1dca67290e85fee22688' }).then((res) => {
+ console.log('===res',res)
+ if (res.data.code === 200) {
+ this.$nextTick(() => {
+ this.eventList=res.data.data.attributes
+ // this.$refs.FormTemplate.$emit('eventList', res.data.templateVO.attributes);
+ if (Object.keys(this.setForm).length > 0) {
+ this.$refs.FormTemplate.form = this.setForm;
+ }
+ });
+ }
+ })
+ .catch(() => {
+ this.loading = false;
+ });
+ this.getCodeRule()
+ },
+ getCodeRule() {
+ let that = this;
+ getCodeRule({codeClassifyOid: that.codeClassifyOid}).then((res) => {
+ if (res.data && res.data.code === 200) {
+ that.codeRuleOid = res.data.data.oid;
+ const typeList = [
+ //灞炴�х爜娈� 鍙
+ "codeattrsec",
+ //鍙彉鐮佹
+ "codevariablesec",
+ //鍥哄畾鐮佹
+ "codefixedsec",
+ //鍒嗙被鐮佹
+ "codeclassifysec",
+ //鏃ユ湡鐮佹 鍙
+ "codedatesec",
+ //寮曠敤鐮佹
+ "coderefersec",
+ //灞傜骇鐮佹 鍙
+ "codelevelsec",
+ //娴佹按鐮佹 闅愯棌
+ ];
+ that.secVOList = (res.data.data.secVOList || []).filter((item) =>
+ typeList.includes(item.secType)
+ );
+ if (that.secVOList.length > 0 && that.type === "add") {
+ that.showCodeApply = true;
+ that.activeName = "codeApply";
+ this.$nextTick(() => {
+ that.$refs.CodeApply.templateRender(that.secVOList, this.TreeValue);
+ });
+ } else {
+ that.showCodeApply = false;
+ }
+ }
+ });
+ },
+ getType(item) {
+ return this.selfColumnType[item.sectype];
+ },
+ isRequired(item) {
+ return item.nullableFlag != "true";
+ },
+ getOptionList(item) {
+ if (
+ Array.isArray(item.fixedValueVOList) &&
+ item.fixedValueVOList.length > 0
+ ) {
+ const configAttr = {
+ key: "id",
+ value: "id",
+ };
+ const optionList = item.fixedValueVOList.map((item) => {
+ for (const key in configAttr) {
+ if (Object.hasOwnProperty.call(configAttr, key)) {
+ const element = configAttr[key];
+ item[key] = item[element];
+ }
+ }
+ return item;
+ });
+ return optionList;
+ } else {
+ return [];
+ }
+ },
+ getReferConfig(item) {
+ let params = {};
+ if (item.secType == "codeclassifysec") {
+ //鍒嗙被鐮佹
+ params = {
+ isMuti: false,
+ type: "grid",
+ tableConfig: {
+ limit: -1,
+ cols: [
+ {
+ field: "id",
+ title: "鑻辨枃鍚嶇О",
+ sort: true,
+ width: 150,
+ },
+ {
+ field: "name",
+ title: "涓枃鍚嶇О",
+ sort: true,
+ width: 150,
+ },
+ {
+ field: "description",
+ title: "鎻忚堪",
+ width: 250,
+ },
+ ],
+ queryColumns: [
+ {
+ field: "id",
+ title: "鑻辨枃鍚嶇О",
+ },
+ {
+ field: "name",
+ title: "涓枃鍚嶇О",
+ },
+ ],
+ },
+ url: "api/ubcs-code/ubcs-code/mdmEngineController/listCodeClassifyValueBySecOid",
+ extraParams: {
+ classifySecOid: item.oid,
+ parentClassifyValueOid: item.parentClassifySecOid
+ ? this.codeApplyForm[item.parentClassifySecOid]
+ : "",
+ },
+ };
+ } else if (item.secType == "coderefersec") {
+ //寮曠敤鐮佹
+ params = JSON.parse(item.referValueInfo);
+ }
+ return params;
+ },
+ getDisabled(item) {
+ if (item.secType === "codeclassifysec") {
+ if (item.parentClassifySecOid) {
+ if (!this.codeApplyForm[item.parentClassifySecOid]) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+ },
+ // 鍙傜収缁勪欢鏁版嵁鍙樻洿
+ referConfigDataUpdate(data) {
+ const { field } = data;
+ let childItems=[];
+ this.secVOList = this.secVOList.map((item) => {
+ if (item.parentClassifySecOid === field) {
+ this.$refs.CodeApply.form[item.oid] = undefined;
+ this.$refs.CodeApply.form[item.name] = undefined;
+ item.readOnly=false;
+ item.referConfig.extraParams.parentClassifyValueOid=data.value;
+ item.referConfig.reloadData = true;
+ childItems.push(item)
+ }
+ return item;
+ });
+ //this.$refs.CodeApply.templateRender(this.secVOList,this.TreeValue);
+ this.$refs.CodeApply.changeChildItem(childItems);
+ },
+ getCodeApplyFormData(codeApplyForm) {
+ this.codeApplyForm = codeApplyForm;
+ },
+ }
}
</script>
diff --git a/Source/UBCS-WEB/src/views/docking/infoForm.vue b/Source/UBCS-WEB/src/views/docking/infoForm.vue
index a72bdfe..d8f88c9 100644
--- a/Source/UBCS-WEB/src/views/docking/infoForm.vue
+++ b/Source/UBCS-WEB/src/views/docking/infoForm.vue
@@ -233,6 +233,7 @@
components: { vciWebRefer },
data() {
return {
+ referUrl:'/api/ubcs-code/dockingManagement/gridDockingSystem',
showSubmitDialog: false,
//鎺ュ彛绫诲瀷涓嬫媺
interfaceTypeList: [{
diff --git a/Source/UBCS-WEB/src/views/integration/systemInfo.vue b/Source/UBCS-WEB/src/views/integration/systemInfo.vue
index aea7794..ab7958a 100644
--- a/Source/UBCS-WEB/src/views/integration/systemInfo.vue
+++ b/Source/UBCS-WEB/src/views/integration/systemInfo.vue
@@ -40,7 +40,7 @@
<div slot="footer" class="dialog-footer" style="height: 50px;line-height: 50px">
<el-button icon="el-icon-plus" size="small" type="primary" @click="empower">鎺� 鏉�</el-button>
- <el-button icon="el-icon-close" size="small" type="danger">閲� 缃�</el-button>
+ <el-button icon="el-icon-close" size="small" type="danger" @click="resetting">閲� 缃�</el-button>
</div>
</el-dialog>
</basic-container>
@@ -140,6 +140,11 @@
created() {
},
methods: {
+ //閲嶇疆
+ resetting(){
+ this.$refs.tree.setCheckedKeys([])
+ // console.log(this.ParentList)
+ },
empower() {
batchAddSave(this.checkAll.oid, this.checkAll.id, this.ParentList).then(res => {
// console.log(res.data)
@@ -151,76 +156,66 @@
},
//鍒嗙被鎺堟潈澶氶�夊洖璋�
checkChange(row, checked) {
- // this.ParentList=[]
- // console.log('row',row)
if (checked) {
- if (!row.parentId) {
- const parentRecord = {
- oid: row.oid,
- classifyId: row.attributes.classifyId,
- classifyOid: row.attributes.classifyOid,
- classParentOid: row.parentId,
- };
- this.ParentList.push(parentRecord);
- // 濡傛灉row鐨刢hildren涓嶄负绌� 缁х画寰幆children涓殑姣忎釜瀵硅薄
- if (row.children && row.children.length > 0) {
- for (let child of row.children) {
- const childRecord = {
- oid: child.oid,
- classifyId: child.attributes.classifyId,
- classifyOid: child.attributes.classifyOid,
- classParentOid: child.parentId,
- };
- this.ParentList.push(childRecord);
- // 濡傛灉瀛愬璞$殑children涓嶄负绌� 缁х画寰幆鑾峰彇鏁版嵁
- if (child.children && child.children.length > 0) {
- for (let subChild of child.children) {
- const subRecord = {
- oid: subChild.oid,
- classifyId: subChild.attributes.classifyId,
- classifyOid: subChild.attributes.classifyOid,
- classParentOid: subChild.parentId,
- };
- this.ParentList.push(subRecord);
- }
- }
- }
- }
- }
+ this.addAllChildren(row.children);
+ this.addToParentList(row);
+ // 鍕鹃�夎鏃跺皢鎵�鏈夎妭鐐规坊鍔犲埌ParentList涓�
} else {
- // 鍙栨秷鍕鹃�夌殑鑺傜偣鏄埗鑺傜偣
- if (!row.parentId) {
- // 鎵惧埌鐖惰妭鐐瑰湪ParentList涓殑绱㈠紩
- const parentIndex = this.ParentList.findIndex(item => item.oid === row.oid);
- if (parentIndex !== -1) {
- const parentOid = this.ParentList[parentIndex].classifyOid;
-
- // 鏌ユ壘鎵�鏈夐渶瑕佸垹闄ょ殑瀛愯妭鐐圭殑绱㈠紩
- const childIndexes = this.ParentList.reduce((indexes, item, index) => {
- if (item.classParentOid === parentOid && item.classifyOid !== parentOid) {
- indexes.push(index);
- }
- return indexes;
- }, []);
-
- // 浠庡悗寰�鍓嶅垹闄ゅ瓙鑺傜偣鐨勬暟鎹紝淇濊瘉绱㈠紩鐨勬纭��
- for (let i = childIndexes.length - 1; i >= 0; i--) {
- this.ParentList.splice(childIndexes[i], 1);
- }
-
- // 鍒犻櫎鐖惰妭鐐圭殑鏁版嵁
- this.ParentList.splice(parentIndex, 1);
- }
- } else {
- // 鍙栨秷鍕鹃�夌殑鑺傜偣鏄瓙鑺傜偣
- const childIndex = this.ParentList.findIndex(item => item.oid === row.oid);
- if (childIndex !== -1) {
- // 鍒犻櫎瀛愯妭鐐圭殑鏁版嵁
- this.ParentList.splice(childIndex, 1);
- }
+ this.removeAllChildren(row.children);
+ this.removeFromParentList(row);
+ // 鍙栨秷鍕鹃�夊皢鎵�鏈夎妭鐐规坊鍔犱粠ParentList涓Щ闄�
+ }
+ // console.table(this.ParentList);
+ },
+ //瀛愯妭鐐规坊鍔�
+ addAllChildren(children) {
+ for (let child of children) {
+ this.addToParentList(child);
+ // 灏嗗瓙鑺傜偣娣诲姞鍒� ParentList 涓�
+ if (child.children && child.children.length > 0) {
+ this.addAllChildren(child.children);
}
}
- console.log('this.ParentList',this.ParentList);
+ },
+ //瀛愯妭鐐圭Щ闄�
+ removeAllChildren(children) {
+ for (let child of children) {
+ this.removeFromParentList(child);
+ // 灏嗗瓙鑺傜偣浠� ParentList 涓Щ闄�
+ if (child.children && child.children.length > 0) {
+ this.removeAllChildren(child.children);
+ }
+ }
+ },
+ //褰撳墠鐖惰妭鐐规坊鍔�
+ addToParentList(item) {
+ const classifyOid = item.attributes.classifyOid;
+ if (!this.isClassifyOidExists(classifyOid)) {
+ const record = {
+ oid: item.oid,
+ classifyId: item.attributes.classifyId,
+ classifyOid: classifyOid,
+ };
+ this.ParentList.push(record);
+ }
+ },
+ //褰撳墠鐖惰妭鐐圭Щ闄�
+ removeFromParentList(item) {
+ const classifyOid = item.attributes.classifyOid;
+ if (this.isClassifyOidExists(classifyOid)) {
+ const index = this.findIndexByClassifyOid(classifyOid);
+ if (index !== -1) {
+ this.ParentList.splice(index, 1);
+ }
+ }
+ },
+ //鍒ら噸-ParentList
+ isClassifyOidExists(classifyOid) {
+ return this.ParentList.some(item => item.classifyOid === classifyOid);
+ },
+ //鏌ユ壘index浣嶇疆
+ findIndexByClassifyOid(classifyOid) {
+ return this.ParentList.findIndex(item => item.classifyOid === classifyOid);
},
//鍒嗙被鎺堟潈
classifyHandler(row) {
diff --git a/Source/UBCS-WEB/src/views/modeling/cycle.vue b/Source/UBCS-WEB/src/views/modeling/cycle.vue
index db3bda8..a955a73 100644
--- a/Source/UBCS-WEB/src/views/modeling/cycle.vue
+++ b/Source/UBCS-WEB/src/views/modeling/cycle.vue
@@ -436,12 +436,13 @@
...newRowData,
...flowData,
};
- debugger;
+
+ console.log('params',params)
this.submitLoading = true;
let APIFun = API.add;
if (this.type === "edit") {
APIFun = API.edit;
- this.$delete(params, "id");
+ // this.$delete(params, "id");
}
APIFun(params)
.then((res) => {
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/datapush/data/NodeObjectDTO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/datapush/data/NodeObjectDTO.java
index 8ea3daf..d74b400 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/datapush/data/NodeObjectDTO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/datapush/data/NodeObjectDTO.java
@@ -8,6 +8,8 @@
@XStreamAlias("object")
public class NodeObjectDTO {
+ @XStreamAsAttribute
+ private String itemid="" ;
@XStreamAsAttribute
private String code="" ;
@XStreamAsAttribute
@@ -58,14 +60,23 @@
this.pro = pro;
}
- @Override
- public String toString() {
- return "NodeObjectDTO{" +
- "code='" + code + '\'' +
- ", status='" + status + '\'' +
- ", library='" + library + '\'' +
- ", classCode='" + classCode + '\'' +
- ", pro=" + pro +
- '}';
- }
+ public String getItemid() {
+ return itemid;
+ }
+
+ public void setItemid(String itemid) {
+ this.itemid = itemid;
+ }
+
+ @Override
+ public String toString() {
+ return "NodeObjectDTO{" +
+ "itemid='" + itemid + '\'' +
+ ", code='" + code + '\'' +
+ ", status='" + status + '\'' +
+ ", library='" + library + '\'' +
+ ", classCode='" + classCode + '\'' +
+ ", pro=" + pro +
+ '}';
+ }
}
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeSyncUniversalController.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeSyncUniversalController.java
index af68ccd..44ea636 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeSyncUniversalController.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeSyncUniversalController.java
@@ -175,8 +175,7 @@
*/
@PostMapping("/test")
public String test(@RequestParam("dataString")String dataString, @RequestParam("dataType")String dataType,HttpServletRequest request){
- String result="tttt";
+ String result="{\"data\": {\"object\": {\"code\": \"0201040133\",\"oid\": \"0000001\",\"erroid\": \"0\",\"msg\": \"娴嬭瘯鎴愬姛\"}}}";
return result;
}
-
}
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 a1a876f..56b35b8 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
@@ -43,6 +43,7 @@
import javax.annotation.Resource;
import java.util.*;
+import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
import static com.vci.ubcs.code.constant.MdmDuckingConstant.*;
@@ -59,8 +60,8 @@
public class CodeDuckingSyncServiceImpl implements ICodeDuckingSyncService {
@Value("${dataSyncPush.dataParamName:xmlData}")
public String DATA_PARAM_NAME;
-
-
+ @Value("${dataSyncPush.dataId:itemid}")
+ private String itemId;
@Resource
private MdmEngineService mdmEngineServiceI;
@@ -336,6 +337,7 @@
//琛ㄧず鏄富鏁版嵁
CodeClassifyTemplateVO codeClassifyTemplateVO = mdmEngineServiceI.getUsedTemplateByClassifyOid(classifyoid);
R<List<Map<String, String>>> r = mdmEngineServiceI.getDataByOid(btmoid, codeClassifyTemplateVO.getOid());
+
List<CodeClassifyTemplateAttrVO> attrVOS = codeClassifyTemplateVO.getAttributes();
Map<String/**鑻辨枃鍚嶇О**/, String/**涓枃鍚嶇О**/> attrIdNameMap = attrVOS.stream().collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t.getName(), (o1, o2) -> o2));
Map<String, String> data = new HashMap<>();
@@ -347,7 +349,12 @@
}
List<NodeProDTO> nodeProDTOS = new ArrayList<>();
Map<String, String> finalData = data;
+ AtomicReference<String> newItemId= new AtomicReference<>("");
attrIdNameMap.keySet().forEach(field -> {
+ if(field.toLowerCase(Locale.ROOT).equals(itemId.toLowerCase(Locale.ROOT))){
+ String Value = finalData.get(field);
+ newItemId.set(Value);
+ }
String outName = attrIdNameMap.get(field);
if (finalData.containsKey(field)) {
String Value = finalData.get(field);
@@ -381,6 +388,7 @@
nodeObjectDTO.setCode(code);//璁剧疆缂栫爜
nodeObjectDTO.setClassCode(classCodeLeves[0]);
nodeObjectDTO.setStatus(data.get("lcstatus"));
+ nodeObjectDTO.setItemid(newItemId.get());
nodeObjectDTO.setLibrary(classCodeLeves[classCodeLeves.length - 1]);
nodeObjectDTO.setPro(nodeProDTOS);
List<NodeObjectDTO> nodeObjectDTOS = new ArrayList<>();
@@ -506,7 +514,6 @@
}
ResultNodeDataDTO resultNodeDataDTO=resultJsonDTO.getData();
resultNodeObjectDTOS=resultNodeDataDTO.getObject();
-
}catch (Throwable e){
msg="璋冪敤鎺ュ彛澶辫触:"+e.getMessage();
e.printStackTrace();
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/SystemClassifyRoleMapper.xml b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/SystemClassifyRoleMapper.xml
index b71ab12..51bbd28 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/SystemClassifyRoleMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/SystemClassifyRoleMapper.xml
@@ -86,7 +86,6 @@
from PL_CODE_SYSTEM_CLASSIFY_ROLE
start with classifyid = #{library}
and SYSTEMID=#{systemId}
- and SYSTEMOID = #{systemOid}
connect by prior classifyoid = classparentoid)
</select>
--
Gitblit v1.9.3