From 1c407a93546036bc0438fbe019aeaf03f6ef1805 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 05 七月 2023 19:15:38 +0800
Subject: [PATCH] 提交代码
---
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionVO.java | 18
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/result.json | 94 ++
Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/constant/BtmTypeConstant.java | 10
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java | 2
Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue | 64 +
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultClassifyVO.java | 13
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java | 8
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java | 2
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java | 163 ++++
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/LifeCycleNodeMapper.java | 12
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LifeCycleRuleWrapper.java | 5
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/LifeCycleController.java | 7
.idea/workspace.xml | 19
Source/UBCS-WEB/src/mixins/codeApply.js | 7
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/AttributeWrapper.java | 4
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LifeCycleServiceImpl.java | 286 ++++++++
Source/UBCS-WEB/src/components/work/BusinessWork.vue | 101 ++
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/AttributeServiceImpl.java | 2
Source/BladeX-Tool/blade-core-tool/src/main/java/org/springblade/core/tool/jackson/BladeBeanSerializerModifier.java | 2
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java | 2
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java | 98 ++-
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/BaseQueryObject.java | 7
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionValueVO.java | 70 ++
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java | 16
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java | 14
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/ILifeCycleService.java | 5
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultCodeRuleVO.java | 90 ++
Source/UBCS-WEB/src/components/template/Stage.vue | 6
Source/UBCS-WEB/src/views/modeling/original.vue | 40 +
/dev/null | 39 -
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/controller/DdlController.java | 6
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue | 32
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/LifeCycleEdgeMapper.java | 12
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java | 51 +
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/classify/LibraryVO.java | 2
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/processor/dll/DllDmMapperProcessor.java | 58 +
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue | 28
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/LifeCycleLineEventMapper.java | 13
Source/UBCS-WEB/src/components/BatchImport/index.vue | 40
Source/UBCS-WEB/src/views/modeling/originalAdd.vue | 78 +
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultClassifyRuleVO.java | 27
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/IBtmTypeService.java | 14
Source/UBCS-WEB/src/components/Tree/attrCrud.vue | 303 ++++++--
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java | 33 +
44 files changed, 1,514 insertions(+), 389 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 8c95b58..43aec9b 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,10 +2,12 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="16f0b01c-a58c-44dd-9719-cb51eacd47bf" name="Default Changelist" comment="澧炲姞鏍戝弬鐓х粍浠�">
- <change afterPath="$PROJECT_DIR$/Source/UBCS-WEB/src/api/refer/tree.js" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/Source/UBCS-WEB/src/components/refer/vciWebRefer.vue" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/Source/UBCS-WEB/src/components/FormTemplate/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/Source/UBCS-WEB/src/components/FormTemplate/index.vue" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeRuleVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeRuleVO.java" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionVO.java" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionValueVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionValueVO.java" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultClassifyVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultClassifyVO.java" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -25,9 +27,14 @@
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
+ <property name="last_opened_file_path" value="$PROJECT_DIR$/Source/UBCS" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
+ <property name="project.structure.last.edited" value="Project" />
+ <property name="project.structure.proportion" value="0.0" />
+ <property name="project.structure.side.proportion" value="0.0" />
</component>
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="16f0b01c-a58c-44dd-9719-cb51eacd47bf" name="Default Changelist" comment="" />
@@ -36,9 +43,13 @@
<option name="presentableId" value="Default" />
<updated>1679912923408</updated>
<workItem from="1679912925465" duration="56000" />
+ <workItem from="1688456866976" duration="772000" />
</task>
<servers />
</component>
+ <component name="TypeScriptGeneratedFilesManager">
+ <option name="version" value="3" />
+ </component>
<component name="VcsManagerConfiguration">
<MESSAGE value="澧炲姞鏍戝弬鐓х粍浠�" />
<option name="LAST_COMMIT_MESSAGE" value="澧炲姞鏍戝弬鐓х粍浠�" />
diff --git a/Source/BladeX-Tool/blade-core-tool/src/main/java/org/springblade/core/tool/jackson/BladeBeanSerializerModifier.java b/Source/BladeX-Tool/blade-core-tool/src/main/java/org/springblade/core/tool/jackson/BladeBeanSerializerModifier.java
index 86c16d5..cbc2f63 100644
--- a/Source/BladeX-Tool/blade-core-tool/src/main/java/org/springblade/core/tool/jackson/BladeBeanSerializerModifier.java
+++ b/Source/BladeX-Tool/blade-core-tool/src/main/java/org/springblade/core/tool/jackson/BladeBeanSerializerModifier.java
@@ -43,7 +43,7 @@
JavaType type = writer.getType();
Class<?> clazz = type.getRawClass();
if (type.isTypeOrSubTypeOf(Number.class)) {
- writer.assignNullSerializer(NullJsonSerializers.NUMBER_JSON_SERIALIZER);
+// writer.assignNullSerializer(NullJsonSerializers.NUMBER_JSON_SERIALIZER);
} else if (type.isTypeOrSubTypeOf(Boolean.class)) {
writer.assignNullSerializer(NullJsonSerializers.BOOLEAN_JSON_SERIALIZER);
} else if (type.isTypeOrSubTypeOf(Character.class)) {
diff --git a/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue b/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
index 684801e..c25342c 100644
--- a/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
+++ b/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
@@ -6,7 +6,7 @@
append-to-body
top="5vh"
>
- <div>
+ <!-- <div>
<FormTemplate
v-if="type === 'batchApplyCode'"
type="add"
@@ -16,9 +16,9 @@
@getFormData="getCodeApplyFormData"
@referConfigDataUpdate="referConfigDataUpdate"
></FormTemplate>
- </div>
+ </div> -->
<div class="flex_box">
- <div class="left" :style="{ width: leftWidth + 'px' }">
+ <div class="left" :style="{ width: leftWidth + 'px' }" v-show="false">
<div class="isExpand_box">
<el-link type="primary" @click="hideTree">
<i
@@ -91,23 +91,7 @@
</el-table-column>
</el-table>
<div v-else style="height: 400px"></div>
- </el-tab-pane>
- <el-tab-pane :label="tab2Name" name="tab2">
- <el-table border :data="tab2Table" height="400px">
- <el-table-column
- v-for="item in cloNamesList"
- :key="item.field"
- :prop="item.field"
- :label="item.title"
- :width="item.width"
- align="center"
- >
- </el-table-column>
- </el-table>
- </el-tab-pane>
- </el-tabs>
- </div>
- <div>
+ <div>
<el-table
border
:data="currentSelectedResemble"
@@ -141,6 +125,23 @@
></el-table-column>
</el-table>
</div>
+ </el-tab-pane>
+ <el-tab-pane :label="tab2Name" name="tab2">
+ <el-table border :data="tab2Table" height="600px">
+ <el-table-column
+ v-for="item in cloNamesList"
+ :key="item.field"
+ :prop="item.field"
+ :label="item.title"
+ :width="item.width"
+ align="center"
+ >
+ </el-table-column>
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+
</div>
</div>
<template #footer>
@@ -176,7 +177,7 @@
export default {
name: "ShowImportData",
components: { ResembleQuery, FormTemplate },
- mixins: [codeApply],
+ // mixins: [codeApply],
props: {
title: {
type: String,
@@ -199,6 +200,11 @@
type: String,
default: "",
},
+ type: String,
+ secDTOList: {
+ type: Array,
+ default: () => ({})
+ }
},
computed: {
dialogVisible: {
@@ -294,8 +300,8 @@
},
submit() {
const params = {
- classifyAttr: this.classifyAttr,
- improt: true,
+ classifyAttr: this.type === 'historyImport' ? this.classifyAttr : undefined,
+ improt: this.type === 'historyImport' ? true : false,
codeImprotSaveDatVOList: [
{
Clos: this.cloNamesList.map((item) => item.title),
@@ -303,7 +309,7 @@
orderDTO: {
codeClassifyOid: this.codeClassifyOid,
templateOid: this.templateOid,
- secDTOList: [],
+ secDTOList: this.secDTOList,
},
},
],
@@ -322,6 +328,16 @@
filterText(val) {
this.$refs.tree.filter(val);
},
+ leftTree: {
+ immediate: true,
+ deep: true,
+ handler(arr) {
+ if (arr.length > 0 && this.type === 'batchImportApply') {
+ this.treeNodeClick(arr[0])
+ this.leftWidth = 0
+ }
+ }
+ }
},
};
</script>
diff --git a/Source/UBCS-WEB/src/components/BatchImport/index.vue b/Source/UBCS-WEB/src/components/BatchImport/index.vue
index 2bbbf18..a1ebae2 100644
--- a/Source/UBCS-WEB/src/components/BatchImport/index.vue
+++ b/Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -49,6 +49,7 @@
:on-exceed="handleExceed"
:headers="uploadHeaders"
:on-success="onSuccess"
+ :on-error="onError"
:show-file-list="false"
:on-change="uploadChange"
:data="upParams"
@@ -75,6 +76,8 @@
:codeClassifyOid="codeClassifyOid"
:redisOid="redisOid"
:type="type"
+ :title="title"
+ :secDTOList="secDTOList"
></ShowImportData>
</el-dialog>
</template>
@@ -134,7 +137,7 @@
return this.currentTypeObj[this.type]["tipList"];
},
downloadTemplateApi() {
- console.log(this.currentTypeObj[this.type], 'this.type');
+ console.log(this.currentTypeObj[this.type], "this.type");
return this.currentTypeObj[this.type]["downloadTemplateFun"];
},
action() {
@@ -147,9 +150,16 @@
classifyAttr: this.classifyAttr,
};
} else if (this.type === "batchImportApply") {
+ // eslint-disable-next-line vue/no-side-effects-in-computed-properties
+ this.secDTOList = this.localSecVOList.map((item) => {
+ return {
+ secOid: item.oid,
+ secValue: this.codeApplyForm[item.id],
+ };
+ });
return {
codeClassifyOid: this.codeClassifyOid,
- secDTOList: this.secDTOList,
+ secDTOList: JSON.stringify(this.secDTOList),
...this.codeApplyForm,
};
} else if (this.type === "batchApplyCode") {
@@ -168,6 +178,7 @@
leftTree: [],
redisOid: "",
pageLoading: null,
+ showCodeApply: false,
currentTypeObj: {
historyImport: {
title: "鍘嗗彶鏁版嵁瀵煎叆",
@@ -204,22 +215,22 @@
upParams: "classifyAttr",
},
},
+ secDTOList: [],
};
},
methods: {
async beforeUpload(file) {
- console.log(file, 'file');
const fileType = file.name.split(".").pop();
if (fileType !== "xlsx" && fileType !== "xls") {
// 涓婁紶鏍煎紡涓嶇鍚堣姹傦紝鎻愮ず閿欒淇℃伅骞跺彇娑堜笂浼�
this.$message.error("鍙厑璁镐笂浼爔lsx銆亁ls鏍煎紡鐨勬枃浠�");
return Promise.reject(false);
}
- if (this.type === "batchImportApply") {
- const flag = await this.$refs.CodeApply.validate();
- if (!flag) {
- return Promise.reject(false);
- }
+ if (this.type === "batchImportApply" && this.showCodeApply) {
+ // const flag = await this.$refs.CodeApply.validate();
+ // if (!flag) {
+ // return Promise.reject(false);
+ // }
}
this.pageLoading = this.$loading({
lock: true,
@@ -245,12 +256,12 @@
},
onSuccess(res) {
if (Object.keys(res.data).length === 0) {
- this.$message.success(this.title + '瀵煎叆鎴愬姛锛�')
- this.dialogVisible = false
- return
+ this.$message.success(this.title + "瀵煎叆鎴愬姛锛�");
+ this.dialogVisible = false;
+ return;
}
- let fileName = res.data.filePath.split("/").pop();
if (res.data.fileOid) {
+ const fileName = res.data.filePath.split("/").pop();
this.$message.error("璇蜂笅杞介敊璇俊鎭枃浠惰繘琛屾煡鐪嬶紒");
downloadErrorFile({ uuid: res.data.fileOid }).then((res2) => {
this.$utilFunc.downloadFileByBlob(res2.data, fileName);
@@ -269,8 +280,11 @@
});
}
},
+ onError(err) {
+ console.log(err, "err");
+ this.pageLoading.close();
+ },
uploadChange(file) {
- console.log(file, 'file', file.status === "success");
if (file.status === "success" || file.status === "error") {
this.pageLoading.close();
}
diff --git a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
index 949c618..c40df95 100644
--- a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -59,7 +59,7 @@
:label="item.label"
:prop="item.prop"
:sortable="item.sortable"
- :formatter="formatBoolean"
+ :formatter="item.formatter"
:width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'"
:show-overflow-tooltip="true"
align="center"
@@ -143,6 +143,7 @@
import SetPersonnel from "@/components/template/SetPersonnel";
import ResembleQueryDialog from "@/components/FormTemplate/ResembleQueryDialog.vue";
import BatchImport from '@/components/BatchImport'
+import { validatenull } from "@/util/validate";
export default {
components: {
integrationTransfer,
@@ -269,6 +270,19 @@
},
tableHeadFindData: {
handler(newval, oldval) {
+ newval.forEach((record,_index) =>{
+ if(record.field == 'id' && validatenull(record.templet)){
+ //浼佷笟缂栫爜鐨勯粯璁ゆ坊鍔犺秴閾炬帴,鏆傛湭瀹炵幇
+ record.formatter = '';
+ }else {
+ if (record.templet && typeof (record.templet) == 'string' && !validatenull(record.templet) && record.templet.indexOf("function(row,column)")>-1) {
+ record.formatter = eval("(" + record.templet + ")");
+ //function(row,column){return row[column.property]=='true' || row[column.property]=='1'?'鏄�':'鍚�'}
+ }else if(record.fieldType=="truefalse"){
+ record.formatter = function(row,column){return row[column.property]=='true' || row[column.property]=='1'?'鏄�':'鍚�'}
+ }
+ }
+ })
this.tableHeadFindDatas = newval;
},
},
@@ -285,17 +299,6 @@
},
},
methods: {
- // 杞崲鏁版嵁true鍜宖alse
- formatBoolean(row, column) {
- if (column.property === "xiaoshouwl"
- ||column.property === "shifoupihaoguanli"
- ||column.property === "caigouwl"
- ||column.property === "kucunwl"
- ||column.property === "passing") {
- return row[column.property] =='true'? "鏄�" : "鍚�";
- }
- return row[column.property];
- },
// 鍙戝竷
setHandler() {
if (this.selectRow.length <= 0) {
@@ -453,6 +456,7 @@
this.$message.warning("缂栫爜鐘舵�佷笉鏄�滅紪杈戜腑鈥�,涓嶅彲缂栬緫");
} else {
this.editvisible = true;
+ this.rowOid = this.selectRow[0]['oid']
}
},
//楂樼骇鏌ヨ鎸夐挳
diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index 99a82dc..ea33289 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -1,34 +1,34 @@
<template>
<div>
<div style="display: flex;flex-wrap: wrap;" v-if="this.crudArrayFlag">
+ <el-button-group>
<!--鏂板-->
- <el-button v-if="attrEditVisible == false && attrFlagChiledren==false" size="small" type="primary"
- @click="busineHandle">锛� 娣诲姞 {{ msg }}
- </el-button>
+ <el-button v-if="attrEditVisible == false && attrFlagChiledren==false" size="small" type="primary" icon="el-icon-plus" @click="busineHandle">娣诲姞 {{ msg }}</el-button>
<!-- 鍏ㄥ睆缂栬緫-->
- <el-button v-if=" attrEditVisible == false && attrFlagChiledren==false" size="small" @click="fullscreenHandle">
- 鍏ㄥ睆缂栬緫
- </el-button>
- <!-- 缁勫悎瑙勫垯-->
- <el-button size="small" @click="isShowHandler">缁勫悎瑙勫垯</el-button>
+ <el-button v-if=" attrEditVisible == false && attrFlagChiledren==false" size="small" @click="fullscreenHandle" icon="el-icon-full-screen">鍏ㄥ睆缂栬緫</el-button>
<!-- 楠岃瘉瑙勫垯-->
<el-button icon="el-icon-info" size="small" @click="rulesVisible=true">楠岃瘉瑙勫垯</el-button>
<!-- 灞炴�у垎缁�-->
<el-button icon="el-icon-menu" size="small" @click="attrVisibleHandle">灞炴�у垎缁�</el-button>
- <!-- 鍒嗙被娉ㄥ叆-->
- <el-button icon="el-icon-magic-stick" size="small" @click="injectBtn">鍒嗙被娉ㄥ叆</el-button>
- <!-- 鏋氫妇娉ㄥ叆-->
- <el-button size="small" @click="enmuVisHandle">鏋氫妇娉ㄥ叆</el-button>
- <!-- 绾ц仈灞炴��-->
- <el-button size="small" @click="CascadeHandle">绾ц仈灞炴��</el-button>
- <!-- 棰勮鎺掑簭-->
- <el-button size="small">棰勮鎺掑簭</el-button>
+ </el-button-group>
+ <el-button-group>
+ <!-- 鍒嗙被娉ㄥ叆-->
+ <el-button icon="el-icon-magic-stick" size="small" @click="injectBtn">鍒嗙被娉ㄥ叆</el-button>
+ <!-- 缁勫悎瑙勫垯-->
+ <el-button size="small" @click="isShowHandler">缁勫悎瑙勫垯</el-button>
+ <!-- 鏋氫妇娉ㄥ叆-->
+ <el-button size="small" @click="enmuVisHandle">鏋氫妇娉ㄥ叆</el-button>
+ <!-- 绾ц仈灞炴��-->
+ <el-button size="small" @click="CascadeHandle">绾ц仈灞炴��</el-button>
+ <!-- 棰勮鎺掑簭-->
+ <el-button size="small" icon="el-icon-arrow-down">棰勮鎺掑簭</el-button>
+ </el-button-group>
<!-- 淇濆瓨-->
- <el-button size="small" @click="addsHandler">淇濆瓨</el-button>
+ <el-button size="small" @click="addsHandler" icon="el-icon-check">淇濆瓨</el-button>
<!-- 鍒犻櫎-->
- <el-button size="small" @click="CrudRemove">鍒犻櫎</el-button>
+ <el-button size="small" @click="CrudRemove" icon="el-icon-delete">鍒犻櫎</el-button>
<!-- 閲嶇疆-->
- <el-button size="small" @click="reset">閲嶇疆</el-button>
+ <el-button size="small" @click="reset" icon="el-icon-refresh-right">閲嶇疆</el-button>
<!-- 鍚屾鍒板叾浠栨ā鏉�-->
<el-button size="small" @click="syncHandle">鍚屾鍒板叾浠栨ā鏉�</el-button>
<!-- 缂栫爜鐢宠棰勮-->
@@ -92,7 +92,7 @@
</el-table-column>
<el-table-column fixed="right" label="鎿嶄綔" width="120">
<template slot-scope="scope">
- <el-button size="small" type="text" @click.native.prevent="enumDeleteRow(scope.$index, tableData)">
+ <el-button size="small" type="text" plain @click="enumDeleteRow">
绉婚櫎
</el-button>
</template>
@@ -209,7 +209,7 @@
></formula-editor>
<!-- 鏂板 -->
<el-dialog :visible.sync="addVisible" append-to-body title="浠庝笟鍔$被鍨嬩腑閫夋嫨灞炴��">
- <avue-crud :data="businessData" :option="businessOption" @select="businessSelect">
+ <avue-crud :data="businessData" :option="businessOption" @selection-change="businessSelect">
<template slot="menuLeft">
<div style="display: flex;">
<el-select>
@@ -224,7 +224,7 @@
</avue-crud>
<div style="display: flex;justify-content: flex-end;margin-top: 15px">
<el-button size="small" type="primary" @click="busineAddHandle">淇濆瓨</el-button>
- <el-button size="small" type="primary">鍙栨秷</el-button>
+ <el-button size="small" type="primary" @click="addVisible=false">鍙栨秷</el-button>
</div>
</el-dialog>
</div>
@@ -232,28 +232,30 @@
style="width: 100%"
@cell-click="handleCellClicks"
@select="selectHandle"
+ @selection-change="selectionChange"
v-if="this.crudArrayFlag"
>
<el-table-column
type="selection"
width="55">
</el-table-column>
- <el-table-column fixed label="搴忓彿" type="index" width="55"></el-table-column>
+ <!--<el-table-column fixed label="搴忓彿" type="index" width="55"></el-table-column>-->
<el-table-column v-for="item in this.option.column" :key="item.id"
:label="item.label"
:prop="item.prop"
:formatter="formAttr"
- :width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'"
+ :width="item.width||(item.label.length >=4 ?'150':item.label.length==3 ?'120':'90')"
:show-overflow-tooltip="true"
align="center"
>
<template slot-scope="{ row }">
- <el-input v-if="editingRows === row && editShows== item.prop" v-model="row[item.prop]"
+ <el-input v-if="editingRows === row && editShows== item.prop && (item.edit == 'text' || item.edit == 'select' ||item.edit == 'refer')" v-model="row[item.prop]"
@blur="saveRows"></el-input>
+ <el-input-number controls-position="right" v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]"
+ @blur="saveRows"></el-input-number>
<el-switch
- v-if="item.label === 'true' || item.label === 'false'"
- active-color="#13ce66"
- inactive-color="#ff4949">
+ v-if="item.edit === 'switch'" v-model="row[item.prop]" active-value="true"
+ inactive-value="false">
</el-switch>
<span v-else>{{ row[item.prop] }}</span>
</template>
@@ -335,14 +337,14 @@
},
// 缂栫爜鐢宠棰勮data
applicationData: [],
- //涓氬姟绫诲瀷鍗曢�夋暟缁�
+ //涓氬姟绫诲瀷閫夋嫨鏁扮粍
busineSelectList: [],
//涓氬姟绫诲瀷娣诲姞鏁版嵁
busineAddList: {},
//琛ㄦ牸鍗曢�夋暟缁�
- CrudSelect: [],
+ attrSelectList: [],
//琛ㄦ牸oid
- CrudOid: "",
+ attrOid: "",
//鍦烘櫙鍙橀噺
thisSceneTableData: [
{
@@ -900,11 +902,27 @@
},
{
label: "鏁版嵁绫诲瀷",
- prop: "attrDataType"
+ prop: "attrDataType",
+ formatter:function(row,column){
+ let vciFieldTypeMap = {
+ VTBoolean: "甯冨皵鍨�",
+ VTClob: "闀挎枃鏈�",
+ VTDate: "鏃ユ湡",
+ VTDateTime: "鏃ユ湡鏃堕棿",
+ VTTime: "鏃堕棿",
+ VTLong: "闀挎暣鍨�",
+ VTDouble: "閲戦/鍙岀簿搴�",
+ VTInteger: "鏁村舰",
+ VTFilePath: "鏂囦欢",
+ VTString: "瀛楃涓�"
+ }
+ return vciFieldTypeMap[row.attrDataType];
+ }
},
{
label: "鍙┖",
- prop: "nullableFlag"
+ prop: "nullableFlag",
+ formatter:function(row,column){return row.nullableFlag=='true' || row.nullableFlag=='1'?'鏄�':'鍚�'}
},
{
label: "榛樿鍊�",
@@ -924,11 +942,25 @@
},
{
label: "鍙傜収",
- prop: "referFlag"
+ prop: "referFlag",
+ formatter: function (d) {
+ if (!d.referFlag) {
+ return '';
+ } else {
+ return d.referBtmTypeId
+ }
+ }
},
{
label: "鏋氫妇",
- prop: "enumFlag"
+ prop: "enumFlag",
+ formatter: function (d) {
+ if (!d.enumFlag) {
+ return '';
+ } else {
+ return d.enumId
+ }
+ }
},
]
},
@@ -940,7 +972,7 @@
rowCellList: [],
List: [],
option: {
- index: true,
+ index: false,
border: true,
editBtn: false,
selection: true,
@@ -953,8 +985,14 @@
prop: 'name',
order: 'descending'
},
- column: [
- {
+ column: [{
+ prop: 'orderNum',
+ label: '鎺掑簭鍙�',
+ sortable: true,
+ edit: 'number',
+ width: 70,
+ fixed: true
+ }, {
label: "灞炴�ц嫳鏂囩紪鍙�",
prop: "id",
fixed: true,
@@ -969,6 +1007,7 @@
fixed: true,
cell: false,
width: 125,
+ edit: 'text',
sortable: true
},
{
@@ -976,6 +1015,7 @@
prop: "attributeGroup",
cell: false,
sortable: true,
+ edit: 'text',
width: 125,
},
{
@@ -990,78 +1030,90 @@
cell: false,
sortable: true,
width: 105,
+ edit: 'number'
},
{
label: "鍏抽敭灞炴��",
prop: "keyAttrFlag",
cell: false,
- type: "switch",
+ edit: "switch"
},
{
label: "鏌ヨ灞炴��",
prop: "queryAttrFlag",
cell: false,
+ edit: "switch"
},
{
label: "楂樼骇鏌ヨ灞炴��",
prop: "seniorQueryAttrFlag",
- width: 95,
+ width: 110,
cell: false,
+ edit: "switch"
},
{
- label: "鐩镐技鏌ヨ灞炴��",
+ label: "鐩镐技鏌ラ噸灞炴��",
prop: "sameRepeatAttrFlag",
- width: 95,
+ width: 110,
cell: false,
+ edit: "switch"
},
{
label: "蹇呰緭",
prop: "requireFlag",
cell: false,
+ edit: "switch"
},
{
label: "琛ㄥ崟鏄剧ず",
prop: "formDisplayFlag",
cell: false,
+ edit: "switch"
},
{
label: "鍒楄〃鏄剧ず",
prop: "tableDisplayFlag",
cell: false,
+ edit: "switch"
},
{
label: "鍙",
prop: "readonlyFlag",
cell: false,
+ edit: "switch"
},
{
label: "鍒楄〃鎺掑簭",
prop: "sortAttrFlag",
cell: false,
+ edit: "switch"
},
-
{
label: "澶氳鏂囨湰",
prop: "textareaFlag",
cell: false,
+ edit: "switch"
},
{
label: "榛樿鍊�",
prop: "defaultValue",
sortable: true,
cell: false,
+ edit: 'text',
width: 95,
},
{
label: "鍓嶇紑",
prop: "prefixValue",
sortable: true,
+ edit: 'select',
cell: false,
},
{
label: "鍚庣紑",
prop: "suffixValue",
sortable: true,
+ edit: 'select',
cell: false,
},
{
@@ -1069,6 +1121,7 @@
prop: "componentRule",
sortable: true,
cell: false,
+ edit: 'refer',
width: 105,
},
{
@@ -1076,6 +1129,7 @@
prop: "verifyRule",
sortable: true,
cell: false,
+ edit: 'refer',
width: 105,
},
{
@@ -1083,84 +1137,97 @@
prop: "codeDateFormat",
sortable: true,
width: 105,
+ edit: 'select',
cell: false,
},
{
label: "鍒嗙被娉ㄥ叆",
prop: "classifyInvokeLevel",
cell: false,
+ edit: 'refer'
},
{
label: "鏋氫妇娉ㄥ叆",
prop: "enumString",
cell: false,
+ edit: 'refer'
},
{
label: "绾ц仈灞炴��",
prop: "parentCode",
cell: false,
+ edit: 'refer'
},
{
label: "鍙傜収閰嶇疆",
prop: "referConfig",
cell: false,
+ edit: 'refer'
},
{
label: "绾ц仈鏌ヨ灞炴��",
prop: "parentQueryAttr",
width: 105,
cell: false,
+ edit: 'text'
},
{
label: "閫夋嫨搴撴爣璇�",
prop: "libraryIdentification",
width: 105,
cell: false,
+ edit: 'text'
},
{
label: "濉啓鎻愮ず",
prop: "explain",
cell: false,
+ edit: 'text'
},
{
label: "琛ㄥ崟鏄剧ず鏍峰紡",
prop: "formDisplayStyle",
width: 105,
cell: false,
+ edit: 'text'
},
{
label: "琛ㄦ牸鏄剧ず鏍峰紡",
prop: "tableDisplayStyle",
width: 105,
cell: false,
+ edit: 'text'
},
{
label: "琛ㄥ崟瓒呴摼鎺�",
prop: "formHref",
width: 95,
cell: false,
+ edit: 'text'
},
{
label: "琛ㄦ牸瓒呴摼鎺�",
prop: "tableHref",
width: 95,
cell: false,
+ edit: 'text'
},
{
label: "琛ㄦ牸鏄剧ずjs",
prop: "tableDisplayJs",
width: 95,
cell: false,
+ edit: 'text'
},
{
label: "闀垮害",
prop: "controlLength",
- cell: false,
+ cell: false
},
{
label: "灏忔暟绮惧害",
prop: "precisionLength",
- cell: false,
+ cell: false
},
{
label: "鍙栧�艰寖鍥�",
@@ -1168,10 +1235,39 @@
sortable: true,
cell: false,
width: 105,
+ edit: 'text'
},
],
List: []
+ },
+ vciFieldTypeMap : {
+ VTBoolean: "甯冨皵鍨�",
+ VTClob: "闀挎枃鏈�",
+ VTDate: "鏃ユ湡",
+ VTDateTime: "鏃ユ湡鏃堕棿",
+ VTTime: "鏃堕棿",
+ VTLong: "闀挎暣鍨�",
+ VTDouble: "閲戦/鍙岀簿搴�",
+ VTInteger: "鏁村舰",
+ VTFilePath: "鏂囦欢",
+ VTString: "瀛楃涓�"
}
+ }
+ },
+ computed:{
+ attrOids() {
+ let oids = [];
+ this.attrSelectList.forEach(ele => {
+ oids.push(ele.oid);
+ });
+ return oids.join(",");
+ },
+ busineOids() {
+ let oids = [];
+ this.busineSelectList.forEach(ele => {
+ oids.push(ele.oid);
+ });
+ return oids.join(",");
}
},
mounted() {
@@ -1185,11 +1281,12 @@
},
//灞炴�у垎缁勬寜閽�
attrVisibleHandle() {
- if (this.CrudSelect.length > 1) {
+
+ if (this.attrSelectList.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃ā鏉垮睘鎬�')
- } else if (this.CrudSelect < 1) {
+ } else if (this.attrSelectList < 1) {
this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉垮睘鎬�')
- } else if (this.CrudSelect.length === 1) {
+ } else if (this.attrSelectList.length === 1) {
this.attrVisible = true;
}
},
@@ -1215,34 +1312,71 @@
},
//涓氬姟绫诲瀷淇濆瓨
busineAddHandle() {
- this.$set(this.busineAddList, 'classifytemplateoid', this.crudOid)
- this.$set(this.busineAddList, 'oid', '')
- this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList)))
+ if (this.busineSelectList.length == 0) {
+ this.$message.warning('璇烽�夋嫨灞炴�ч泦');
+ return false;
+ }
+ let ordernum = this.ProData.length;
+ this.busineSelectList.forEach((citem) => {
+ let isCopy = false;
+ this.ProData.forEach((item) => {
+ if (citem.id == item.id) {
+ isCopy = true;
+ return false;
+ }
+ })
+ if (!isCopy) {
+ citem.oid = ''
+ this.busineAddList=Object.assign(citem, {
+ orderNum: ++ordernum,
+ attributedatatype: citem.attrDataType,
+ attributeDataTypeText: this.vciFieldTypeMap[citem.attrDataType],
+ controlLength: citem.attributeLength,
+ valueArea: citem.range,
+ referbtmid: citem.referBtmTypeId,
+ referbtmname: citem.referBtmTypeName,
+ referConfig: '',
+ enumid: citem.enumId,
+ precisionLength: (citem.precisionLength ? citem.precisionLength : '') + (citem.scaleLength ? '(' + citem.scaleLength + ')' : ''),
+ classifyTemplateOid: this.crudOid,
+ classifytemplateoid: this.crudOid,
+ formDisplayFlag: true,
+ tableDisplayFlag: true,
+ sortAttrFlag: false,
+ queryAttrFlag: true,
+ seniorQueryAttrFlag: true,
+ attrTableWidth: 120
+ })
+ this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList)))
+ }
+ })
this.addVisible = false;
+
},
- //涓氬姟绫诲瀷鍗曢��
+ //涓氬姟绫诲瀷閫夋嫨
businessSelect(selection, row) {
this.busineSelectList = selection
- this.busineAddList = row
},
- // 浠庝笟鍔$被鍨嬩腑閫夋嫨鏁版嵁
+ // 浠庝笟鍔$被鍨嬩腑閫夋嫨鏁版嵁寮圭獥
busineHandle() {
- this.addVisible = true;
- AttrByBtm({'conditionMap[oid]': this.crudOid}).then(res => {
- this.businessData = res.data.data;
- })
+ this.addVisible = true;
+ this.busineSelectList = []
+ this.busineAddList = [];
+ AttrByBtm({'conditionMap[oid]': this.crudOid}).then(res => {
+ this.businessData = res.data.data;
+ })
},
// 绾ц仈灞炴�ф寜閽�
CascadeHandle() {
- if (this.CrudSelect.length > 1) {
+ if (this.attrSelectList.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃ā鏉垮睘鎬�')
- } else if (this.CrudSelect.length < 1) {
+ } else if (this.attrSelectList.length < 1) {
this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉垮睘鎬�')
- } else if (this.CrudSelect.length === 1) {
+ } else if (this.attrSelectList.length === 1) {
this.CascadeVisible = true;
gridCodeClassifyTemplateAttr({
'conditionMap[classifyTemplateOid]': this.Formlist[0].oid,
- 'conditionMap[oid_notequal]': this.CrudOid
+ 'conditionMap[oid_notequal]': this.attrOid
}).then(res => {
this.CascadeData = res.data.data;
})
@@ -1250,10 +1384,12 @@
},
//琛ㄦ牸鍗曢��
selectHandle(selection, row) {
- this.CrudOid = row.oid;
- this.CrudSelect = selection;
+ this.attrOid = row.oid;
this.attrRow = row;
- console.log('123',row,selection)
+ },
+ //琛ㄦ牸閫夋嫨
+ selectionChange(list) {
+ this.attrSelectList = list;
},
//淇濆瓨
addsHandler() {
@@ -1278,9 +1414,9 @@
},
//琛ㄦ牸琛岀紪杈�
handleCellClicks(row, column) {
- this.editingRows = row;
- this.editShows = column.property;
- this.rowOid = row.oid;
+ this.editingRows = row;
+ this.editShows = column.property;
+ this.rowOid = row.oid;
},
saveRows() {
this.editingRows = null;
@@ -1299,15 +1435,15 @@
},
//鏋氫妇娉ㄥ叆鍒犻櫎
enumDeleteRow(row) {
- this.tableData.splice(row, 1)
+ this.tableData.splice(row.$index, 1)
},
//鏋氫妇娉ㄥ叆鎸夐挳
enmuVisHandle() {
- if (this.CrudSelect.length > 1) {
+ if (this.attrSelectList.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃ā鏉垮睘鎬�')
- } else if (this.CrudSelect < 1) {
+ } else if (this.attrSelectList < 1) {
this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉垮睘鎬�')
- } else if (this.CrudSelect.length === 1) {
+ } else if (this.attrSelectList.length === 1) {
this.enumVisible = true;
}
},
@@ -1349,11 +1485,11 @@
},
//鐐瑰嚮鍒嗙被娉ㄥ叆鎸夐挳
injectBtn() {
- if (this.CrudSelect.length > 1) {
+ if (this.attrSelectList.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃ā鏉挎暟鎹�')
- } else if (this.CrudSelect.length < 1) {
+ } else if (this.attrSelectList.length < 1) {
this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉挎暟鎹�')
- } else if (this.CrudSelect.length === 1) {
+ } else if (this.attrSelectList.length === 1) {
this.injectVisible = true
}
},
@@ -1406,7 +1542,10 @@
},
//琛ㄦ牸鍒犻櫎
CrudRemove() {
- this.ProData.splice(this.attrRow.$index, 1)
+ this.attrSelectList.forEach((item)=>{
+ this.ProData.splice(item.$index, 1)
+ })
+
},
//琛ㄦ牸閲嶇疆
reset() {
@@ -1414,11 +1553,11 @@
},
//鍚屾鍒板叾浠栨ā鏉�
syncHandle() {
- if (this.CrudSelect.length > 1) {
+ if (this.attrSelectList.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃ā鏉垮睘鎬ф暟鎹�')
- } else if (this.CrudSelect.length < 1) {
+ } else if (this.attrSelectList.length < 1) {
this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉垮睘鎬ф暟鎹�')
- } else if (this.CrudSelect.length === 1) {
+ } else if (this.attrSelectList.length === 1) {
copyto({oid: this.attrRow.oid}).then(res => {
this.$message.success('鍚屾鎴愬姛')
})
@@ -1430,11 +1569,11 @@
},
//缁勫悎瑙勫垯
isShowHandler() {
- if (this.CrudSelect.length > 1) {
+ if (this.attrSelectList.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃ā鏉垮睘鎬ф暟鎹�')
- } else if (this.CrudSelect.length < 1) {
+ } else if (this.attrSelectList.length < 1) {
this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉垮睘鎬ф暟鎹�')
- } else if (this.CrudSelect.length === 1) {
+ } else if (this.attrSelectList.length === 1) {
this.isShowformulaEdit = true;
}
},
diff --git a/Source/UBCS-WEB/src/components/template/Stage.vue b/Source/UBCS-WEB/src/components/template/Stage.vue
index 3959152..8fe6216 100644
--- a/Source/UBCS-WEB/src/components/template/Stage.vue
+++ b/Source/UBCS-WEB/src/components/template/Stage.vue
@@ -162,9 +162,10 @@
item = { oid, id, name, attributeGroup, ...{ checked: false } }
if (dataRight.length !== 0) {
dataRight.forEach(element => { if (item.id === element.attrId) item.checked = true });
- return item
}
+ return item
})
+ console.log(datas)
let dataValue = datas.map(item => item.checked ? item.oid : undefined)
this.attributeValue = dataValue.filter(item => item)
this.attributeData = datas
@@ -187,8 +188,11 @@
handleMaintenance(row) {
console.log(row)
this.dialogNode = true
+ this.modelKey = row.modelKey
this.saveParam.modelKey = row.modelKey
+ this.getStagelist()
},
+ // 缁存姢
handleMaintenanceTransfer(row) {
this.saveParam.taskId = row.taskId
this.saveParam.taskName = row.taskName
diff --git a/Source/UBCS-WEB/src/components/work/BusinessWork.vue b/Source/UBCS-WEB/src/components/work/BusinessWork.vue
index b4d93d0..4f0b688 100644
--- a/Source/UBCS-WEB/src/components/work/BusinessWork.vue
+++ b/Source/UBCS-WEB/src/components/work/BusinessWork.vue
@@ -1,17 +1,38 @@
<template>
<div>
- <el-button @click="HandlerRend"></el-button>
- <el-table :data="data">
- <el-table-column
- fixed
- type="selection"
- width="55">
+ <el-button @click="HandlerRend" size="small" type="primary">淇濆瓨</el-button>
+ <el-table
+ v-loading="isLoading"
+ :data="tableData"
+ max-height="700"
+ style=""
+ @cell-click="handleCellClick"
+ >
+ <el-table-column fixed type="selection" width="55"> </el-table-column>
+ <el-table-column fixed label="搴忓彿" type="index" width="55">
</el-table-column>
<el-table-column
- fixed
- label="搴忓彿"
- type="index"
- width="55">
+ v-for="item in this.tableHeadData"
+ :key="item.id"
+ :label="item.label"
+ :prop="item.prop"
+ :sortable="item.sortable"
+ :formatter="item.formatter"
+ :width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'"
+ :show-overflow-tooltip="true"
+ align="center"
+ >
+ <!-- 缂栬緫鍜屽睍绀洪�昏緫 -->
+ <!-- <template slot-scope="{ row }">-->
+ <!-- <el-input v-if="editingRow === row && editShow== item.prop" v-model="row[item.prop]" @blur="saveRow"></el-input>-->
+ <!-- <span v-else>{{row[item.prop]}}</span>-->
+ <!-- <el-switch-->
+ <!-- v-if="editShow === 'true'"-->
+ <!-- v-model="row[item.prop]"-->
+ <!-- active-color="#13ce66"-->
+ <!-- inactive-color="#ff4949">-->
+ <!-- </el-switch>-->
+ <!-- </template>-->
</el-table-column>
</el-table>
</div>
@@ -19,17 +40,20 @@
<script>
import {businese} from '@/api/work/businese'
+import {MasterTable} from "@/api/GetItem";
+import {validatenull} from "@/util/validate";
export default {
name: "BusinessWork",
props:['ids','templateId'],
data() {
return {
BuinessOids:[],
- data:[
- {
- label:'app'
- }
- ]
+ isLoading:false,
+ tableHeadData:[],
+ tableData:[],
+ editingRow: null,
+ editShow: "",
+ editAttr: ""
}
},
watch:{
@@ -37,6 +61,8 @@
handler(newval,oldval){
this.BuinessOids=newval;
this.BuinseseRend()
+ console.log(newval)
+ console.log(this.BuinessOids)
},
deep:true
}
@@ -46,14 +72,55 @@
mounted() {
},
methods:{
+ HandlerRend(){
+ this.editingRow = null;
+ },
+ //琛ㄦ牸澶存覆鏌�
+ CrudHeaderRend() {
+ if (this.codeClassifyOid != "") {
+ MasterTable({
+ codeClassifyOid: this.codeClassifyOid,
+ functionId: 5,
+ }).then((res) => {
+ this.options = res.data.tableDefineVO.seniorQueryColumns;
+ this.List = res.data.tableDefineVO.cols[0];
+ this.tableHeadData=[];
+ this.List.forEach((item) => {
+ let columnItem = {
+ label: item.title,
+ prop: item.field,
+ type: this.columnType[item.type],
+ sortable: item.sort,
+ width: item.minWidth
+ };
+ if(item.field == 'id' && validatenull(item.templet)){
+ //浼佷笟缂栫爜鐨勯粯璁ゆ坊鍔犺秴閾炬帴,鏆傛湭瀹炵幇
+ columnItem.formatter = '';
+ }else {
+ if (item.templet && typeof (item.templet) == 'string' && !validatenull(item.templet) && item.templet.indexOf("function(row,column)")>-1) {
+ columnItem.formatter = eval("(" + item.templet + ")");
+ //function(row,column){return row[column.property]=='true'?'鏄�':'鍚�'}
+ }
+ }
+ this.tableHeadData.push(columnItem)
+ });
+ });
+ }
+ },
+ //琛ㄦ牸鏁版嵁
BuinseseRend(){
businese({
btmType:'wupin',
'conditionMap[oid]':this.BuinessOids.toString()
}).then(res=>{
- console.log(res)
+ this.tableData = res.data.data;
})
- }
+ },
+ // 鐩戝惉鍗曞厓鏍肩偣鍑讳簨浠跺苟瀛樺偍姝e湪缂栬緫鐨勮
+ handleCellClick(row, column) {
+ this.editingRow = row;
+ this.editShow = column.property;
+ },
}
}
</script>
diff --git a/Source/UBCS-WEB/src/mixins/codeApply.js b/Source/UBCS-WEB/src/mixins/codeApply.js
index 3f0c1be..4b84617 100644
--- a/Source/UBCS-WEB/src/mixins/codeApply.js
+++ b/Source/UBCS-WEB/src/mixins/codeApply.js
@@ -3,6 +3,7 @@
data() {
return {
secVOList: [],
+ localSecVOList: [],
showCodeApply: false,
selfColumnType: {
codefixedsec: "combox",
@@ -57,13 +58,13 @@
"coderefersec",
];
this.secVOList = res.data.data.secVOList || []
- let localSecVOList = (res.data.data.secVOList || []).filter((item) =>
+ this.localSecVOList = (res.data.data.secVOList || []).filter((item) =>
typeList.includes(item.secType)
);
- if (localSecVOList.length > 0) {
+ if (this.localSecVOList.length > 0) {
this.showCodeApply = true
this.$nextTick(() => {
- this.$refs.CodeApply.templateRender(localSecVOList);
+ this.$refs.CodeApply.templateRender(this.localSecVOList);
});
}
diff --git a/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue b/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
index 1515c8f..7e4f639 100644
--- a/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
+++ b/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
@@ -1,5 +1,5 @@
<template>
- <el-dialog
+ <el-dialog
title="涓氬姟绫诲瀷"
:visible.sync="showSubmitDialog"
append-to-body
@@ -43,16 +43,16 @@
</el-form-item>
</div>
<el-form-item label="鎻忚堪" label-width="100px" class="description">
- <el-input v-model="btmType.description"
- :prefix-icon="icons.desc"
+ <el-input v-model="btmType.description"
+ :prefix-icon="icons.desc"
class="descClass"
id="descId"
></el-input>
</el-form-item>
</el-form>
- <avue-crud :option="option"
- :data="btmType.attributes"
- :page.sync="page"
+ <avue-crud :option="option"
+ :data="btmType.attributes"
+ :page.sync="page"
ref="attrTable"
@cell-mouse-enter="cellEditClick"
@cell-mouse-leave="cellEditSave">
@@ -62,7 +62,7 @@
size="small"
@click="rowAdd()">灞炴�ч�夋嫨</el-button>
</template>
-
+
</avue-crud>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBtmType">纭畾</el-button>
@@ -76,9 +76,9 @@
@close="closeAttrDialog"
width="80%"
>
- <avue-crud class="attrRef"
- :option="attrRef.option"
- :data="attrRef.data"
+ <avue-crud class="attrRef"
+ :option="attrRef.option"
+ :data="attrRef.data"
:page.sync="attrRef.page"
ref="attrRef"
@on-load="attrRefOnLoad"
@@ -98,7 +98,7 @@
:visible.sync="revisionRef.visible"
append-to-body
width="80%">
-
+
<avue-crud class="revisionRef"
:option="revisionRef.option"
:data="revisionRef.data"
@@ -320,7 +320,7 @@
id: [
{ required: true, message: '璇疯緭鍏ヤ笟鍔$被鍨嬬紪鍙�', trigger: 'blur' },
{ pattern: /^[A-Za-z]+$/, message: '涓氬姟绫诲瀷缂栧彿鍙兘涓鸿嫳鏂�', trigger: 'blur' },
- { min: 2, max: 15, message: '闀垮害鍦�2鍒�15涓瓧绗�', trigger: 'blur' }
+ { min: 2, max: 20, message: '闀垮害鍦�2鍒�20涓瓧绗�', trigger: 'blur' }
],
domain: [
{ required: true, message: '璇烽�夋嫨鎵�灞為鍩�', trigger: 'blur' }
@@ -387,7 +387,11 @@
attrDataType : item.typeKey,
defaultValue: item.defaultValue,
description: item.description,
- attributeLength: item.maxLength
+ attributeLength: item.maxLength,
+ referBtmTypeId: item.referTypeCode,
+ referBtmTypeName: item.referToName,
+ enumId: item.dictCode,
+ // enumName: item,
});
this.attrRef.queryNotIn += (item.id + ",")
});
@@ -420,7 +424,7 @@
this.$refs.attrTable.refreshTable();
})
},
- //
+ //
viewChange(){
},
diff --git a/Source/UBCS-WEB/src/views/modeling/original.vue b/Source/UBCS-WEB/src/views/modeling/original.vue
index 805e99f..6588c67 100644
--- a/Source/UBCS-WEB/src/views/modeling/original.vue
+++ b/Source/UBCS-WEB/src/views/modeling/original.vue
@@ -122,14 +122,14 @@
<template slot="label">
鏋氫妇绫诲瀷
</template>
- {{ itemForm.itemData.dictCode }}
+ {{ itemForm.itemData.dictValue }}
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
</el-tabs>
</basic-container>
</el-aside>
- <originalAdd ref="originalAdd" @refreshTable="refreshChange"></originalAdd>
+ <originalAdd ref="originalAdd" @refreshTable="refreshChange" :attribute="editAttribute"></originalAdd>
</el-container>
</template>
@@ -141,6 +141,7 @@
update, getPage, getApplyRange
} from "@/api/omd/OmdAttribute";
import Versionpackage from "./Versionpackage.vue";
+import {getDictionary} from "@/api/omd/enum";
export default {
name: "original",
@@ -157,7 +158,7 @@
attribute: {
nullable: true
},
- editAttibute: {},
+ editAttribute: {},
applyRangeData: [],
option: {
height: "550px",
@@ -250,6 +251,8 @@
itemForm: {
itemData: {},
activeName: "referTab",
+ enumInitFlag:false,
+ referInitFlag: false,
form: {}
},
searchId: '',
@@ -268,10 +271,14 @@
updateSave(row,index) {
this.selectRow = index;
var json = JSON.stringify(row);
- this.editAttibute = JSON.parse(json);
- this.editAttibute.nullable = row.nullable == 'true' ? true : false;
- this.$refs.originalAdd.attribute = this.editAttibute;
+ this.editAttribute = JSON.parse(json);
+ this.editAttribute.nullable = row.nullable == 'true' ? true : false;
+ this.$refs.originalAdd.attribute = this.editAttribute;
this.$refs.originalAdd.showSubmitDialog = true;
+ this.checkUsingReferDict(row);
+ this.$refs.originalAdd.activeName = this.itemForm.activeName;
+ this.$refs.originalAdd.enumInitFlag = this.itemForm.enumInitFlag;
+ this.$refs.originalAdd.referInitFlag = this.itemForm.referInitFlag;
this.refreshChange()
},
deleteSave(row,index) {
@@ -296,6 +303,27 @@
this.itemForm.itemData = row;
this.selectRow = row.$index;
this.attribute = row;
+ this.checkUsingReferDict(row);
+ },
+ checkUsingReferDict(row){
+ if (row.referToId !== null && row.referToId !== ""){
+ this.itemForm.activeName = 'referTab';
+ this.itemForm.referInitFlag = true;
+ this.itemForm.enumInitFlag = false;
+ }else if (row.usingDict === 'true'){
+ this.itemForm.activeName = 'enumTab';
+ this.itemForm.referInitFlag = false;
+ this.itemForm.enumInitFlag = true;
+ getDictionary({code: row.dictCode}).then(res => {
+ this.editAttribute.dictValue = res.data.data[0].label;
+ this.itemForm.itemData.dictValue = this.editAttribute.dictValue;
+ this.$refs.originalAdd.dictEnums = res.data.data;
+ })
+ }else {
+ this.itemForm.activeName = 'referTab';
+ this.itemForm.referInitFlag = true;
+ this.itemForm.enumInitFlag = false;
+ }
},
selectBtmType() {
this.referType.display = true;
diff --git a/Source/UBCS-WEB/src/views/modeling/originalAdd.vue b/Source/UBCS-WEB/src/views/modeling/originalAdd.vue
index c6e0c48..35dccbd 100644
--- a/Source/UBCS-WEB/src/views/modeling/originalAdd.vue
+++ b/Source/UBCS-WEB/src/views/modeling/originalAdd.vue
@@ -37,7 +37,6 @@
<el-form-item label="鎻忚堪" label-width="100px">
<el-input v-model="attribute.description" type="text"></el-input>
</el-form-item>
-
<el-tabs v-model="activeName" @tab-click="handleClick" stretch="true">
<el-tab-pane label="鍙傜収" name="referTab">
<el-form-item label="鍙傜収绫诲瀷" label-width="100px">
@@ -61,14 +60,16 @@
</el-input>
</el-form-item>
<el-form-item label="鏋氫妇椤�" label-width="100px">
-
+ <el-tag v-for="eItem in dictEnums" :key="eItem.itemName" type="info">
+ {{eItem.itemName}}
+ </el-tag>
</el-form-item>
</el-tab-pane>
</el-tabs>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitAttribute">纭畾</el-button>
- <el-button @click="cancleSubmit">鍙栨秷</el-button>
+ <el-button @click="cancelSubmit">鍙栨秷</el-button>
</div>
<!-- 閫夋嫨鍙傜収鏃剁殑寮圭獥 -->
<el-dialog title="鍙傜収鍒楄〃" :visible.sync="btmRefer.show" append-to-body @close="closeReferDialog" width="80%"
@@ -104,7 +105,7 @@
</el-container>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmBtm" size="small">纭畾</el-button>
- <el-button @click="cancleBtm" size="small">鍙栨秷</el-button>
+ <el-button @click="cancelBtm" size="small">鍙栨秷</el-button>
</div>
</el-dialog>
<!-- 閫夋嫨鏋氫妇鏃剁殑寮圭獥 -->
@@ -119,7 +120,7 @@
</avue-crud>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmEnum" size="small">纭畾</el-button>
- <el-button @click="cancleEnum" size="small">鍙栨秷</el-button>
+ <el-button @click="cancelEnum" size="small">鍙栨秷</el-button>
</div>
</el-dialog>
</el-dialog>
@@ -223,7 +224,7 @@
addBtn: false,
refreshBtn: false,
columnBtn: false,
- selection: true,
+ // selection: true,
menu: false,
border: true,
reserveSelection: true,
@@ -267,7 +268,12 @@
value: 'oid',
}
}
- }
+ },
+ dictEnums: [],
+ enumEditFlag: false,
+ enumInitFlag: false,
+ referInitFlag: false,
+ referEditFlag: false,
}
},
created() {
@@ -286,9 +292,23 @@
};
this.referToFlag = true;
this.$refs.form.resetFields();
+ this.dictEnums = [];
},
submitAttribute() {
const that = this;
+ if (that.referInitFlag && that.referEditFlag){
+ this.$set(this.attribute,'dictCode','');
+ this.$set(this.attribute,'dictKey','');
+ this.$set(this.attribute,'dictValue','');
+ this.$set(this.attribute,'usingDict','');
+ }
+ if (that.enumInitFlag && that.enumEditFlag){
+ this.$set(this.attribute,'referTypeCode','');
+ this.$set(this.attribute,'referTypeKey','');
+ this.$set(this.attribute,'referTypeValue','');
+ this.$set(this.attribute,'referToId','');
+ this.$set(this.attribute,'referToName','');
+ }
this.$refs.form.validate(function (pass, field) {
if (pass) {
add(that.attribute).then(res => {
@@ -302,21 +322,23 @@
}
})
},
- cancleSubmit() {
+ cancelSubmit() {
this.closeSubmitDialog();
},
closeEnumDialog() {
- this.cancleEnum();
+ this.cancelEnum();
},
closeReferDialog() {
- this.cancleBtm();
+ this.cancelBtm();
},
confirmBtm() {
this.attribute.referToId = this.btmRefer.selectItem.oid;
this.attribute.referToName = this.btmRefer.selectItem.name;
this.btmRefer.show = false;
+ this.referEditFlag = true;
+ this.enumEditFlag = false;
},
- cancleBtm() {
+ cancelBtm() {
this.btmRefer.selectItem = {};
this.btmRefer.show = false;
this.btmRefer.selectRow = '';
@@ -326,8 +348,13 @@
this.attribute.dictCode = this.enumRefer.selectItem.name;
this.attribute.dictValue = this.enumRefer.selectItem.label;
this.enumRefer.show = false;
+ getDictionary({code :this.enumRefer.selectItem.name}).then(res => {
+ this.dictEnums = res.data.data;
+ });
+ this.referEditFlag = false;
+ this.enumEditFlag = true;
},
- cancleEnum() {
+ cancelEnum() {
this.enumRefer.selectItem = {};
this.enumRefer.show = false;
this.enumRefer.selectRow = '';
@@ -345,13 +372,12 @@
this.domain.data = res.data.data;
})
this.btmRefer.show = true;
-
},
// 鍙傜収绫诲瀷鏍戠殑鐐瑰嚮浜嬩欢
nodeClick(data) {
// 鍖哄垎涓氬姟绫诲瀷鐨勬煡璇㈠拰閾炬帴绫诲瀷鐨勬煡璇�
if (this.attribute.referTypeKey == 'btmType') {
- btmPage(this.btmRefer.btmPage.currentPage, this.btmRefer.btmPage.pageSize, { domain: data.id }).then(res => {
+ btmPage(this.btmRefer.btmPage.currentPage, this.btmRefer.btmPage.pageSize, { bizDomain: data.id }).then(res => {
this.btmRefer.data = res.data.data.records;
this.btmRefer.btmPage.total = res.data.data.total;
})
@@ -431,18 +457,16 @@
this.btmRefer.selectItem = {};
this.btmRefer.selectRow = '';
},
- // handleClick(tab){
- // // 鍥犱负鍙兘鍙傜収鍜屾灇涓句簩閫変竴銆傛墍浠ュ湪鍒囨崲鐨勬椂鍊欐妸灞炴�х粰娓呯┖銆�
- // this.$delete(this.attribute,'referTypeCode');
- // this.$delete(this.attribute,'referTypeKey');
- // this.$delete(this.attribute,'referTypeValue');
- // this.$delete(this.attribute,'referToId');
- // this.$delete(this.attribute,'referToName');
- // this.$delete(this.attribute,'dictCode');
- // this.$delete(this.attribute,'dictKey');
- // this.$delete(this.attribute,'dictValue');
- // this.$delete(this.attribute,'usingDict');
- // }
+ handleClick(tab){
+ // 鍥犱负鍙兘鍙傜収鍜屾灇涓句簩閫変竴銆傛墍浠ュ湪鍒囨崲鐨勬椂鍊欐妸灞炴�х粰娓呯┖銆�
+ if (tab.name === 'enumTab'){
+ this.enumInitFlag = true;
+ this.referInitFlag = false;
+ }else {
+ this.enumInitFlag = false;
+ this.referInitFlag = true;
+ }
+ }
}
}
</script>
@@ -462,4 +486,4 @@
.attributeForm>.el-form-item>.el-form-item__content>.el-select>.el-input>.el-input__inner {
width: 200px;
-}</style>
\ No newline at end of file
+}</style>
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java
index e9ec1fd..b01bb9d 100644
--- a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java
@@ -62,6 +62,8 @@
private final ProcessStageAttrService processStageAttrService;
private static String MODELKEY = "modelKey";//鍓嶇浼犺繃鏉ョ殑妯″瀷key
+ private static String TASKID = "taskId";//鍓嶇浼犺繃鏉ョ殑妯″瀷key
+ private static String PROCESSINSTANCEID = "processInstanceId";//鍓嶇浼犺繃鏉ョ殑妯″瀷key
@Override
public R<BladeFlow> startProcess(FlowTaskDTO flowTaskUserC){
Map<String, Object> kvv = flowTaskUserC.getVariables();
@@ -228,16 +230,10 @@
flowTaskDTO.setVariables(variables);
}
- String templateId = variables.get("templateId").toString();
- //娴佺▼闃舵
- Map<String, Object> m = new HashMap<>();
- m.put("template_id", templateId);
- m.put("task_id", crruentActivityId);
- m.put("model_key", modelKey);
- QueryWrapper q = Condition.getQueryWrapper(m, ProcessStageAttr.class)
- .select("attr_id attrId,attr_name attrName,attr_group attrGroup");
- List<ProcessStageAttr> stageAttrs = processStageAttrService.list(q);
- flowTaskDTO.setStageAttrs(stageAttrs);
+
+ //鏀惧叆娴佺▼闃舵銆佹祦绋媘odelkey
+ variables.put(TASKID,crruentActivityId);
+ variables.put(PROCESSINSTANCEID,processInstanceId);
return flowTaskDTO;
}
}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/classify/LibraryVO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/classify/LibraryVO.java
index f96c27c..ab1dacc 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/classify/LibraryVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/classify/LibraryVO.java
@@ -6,7 +6,7 @@
import java.util.List;
-@XStreamAlias("library ")
+@XStreamAlias("library")
public class LibraryVO {
@XStreamAsAttribute
private String id;
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeRuleVO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeRuleVO.java
deleted file mode 100644
index 489dbe0..0000000
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeRuleVO.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.vci.ubcs.code.vo.webserviceModel.coderule;
-
-import com.thoughtworks.xstream.annotations.XStreamAlias;
-import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
-import com.thoughtworks.xstream.annotations.XStreamImplicit;
-
-import java.util.List;
-
-@XStreamAlias("codeRule")
-public class CodeRuleVO {
-
- /**
- * 缂栫爜瑙勫垯鐨勭紪鍙�
- */
- @XStreamAsAttribute
- private String id;
-
- /**
- * 瑙勫垯缂栧彿
- */
- @XStreamAsAttribute
- private String num;
- /**
- * 缂栫爜瑙勫垯鐨勫悕绉�
- */
- @XStreamAsAttribute
- private String name;
-
- /**
- * 瑙勫垯鐨勬弿杩�
- */
- @XStreamAsAttribute
- private String description;
- /**
- * 缂栫爜鐨勭爜娈典俊鎭�
- */
- @XStreamImplicit
- private List<CodeSectionVO> secVOList;
-}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionVO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionVO.java
index 034594e..7065cc1 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionVO.java
@@ -67,7 +67,7 @@
/***
* 鐮佹鐮佸��
*/
- private List<CodeSectionValueVO> sectionValues;
+ private List<CodeSectionValueVO> sectionValue;
/**
* 鏃ユ湡鏍煎紡
*/
@@ -146,6 +146,22 @@
this.codeDateFormatStr = codeDateFormatStr;
}
+ public String getParentClassifySecOid() {
+ return parentClassifySecOid;
+ }
+
+ public void setParentClassifySecOid(String parentClassifySecOid) {
+ this.parentClassifySecOid = parentClassifySecOid;
+ }
+
+ public List<CodeSectionValueVO> getSectionValue() {
+ return sectionValue;
+ }
+
+ public void setSectionValue(List<CodeSectionValueVO> sectionValue) {
+ this.sectionValue = sectionValue;
+ }
+
@Override
public String toString() {
return "CodeSectionVO{" +
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionValueVO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionValueVO.java
index 85f1388..99a9b17 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionValueVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/CodeSectionValueVO.java
@@ -1,19 +1,38 @@
package com.vci.ubcs.code.vo.webserviceModel.coderule;
+import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
+@XStreamAlias("sectionValue")
public class CodeSectionValueVO {
+ public CodeSectionValueVO() {
+ }
+
+ public CodeSectionValueVO(String id, String num, String value,String name ,String description) {
+ this.id = id;
+ this.num = num;
+ this.value = value;
+ this.description = description;
+ }
+
/***
* 鐮佸�间富閿�
*/
+ @XStreamAsAttribute
private String id;
/***
* 鐮佸�肩紪鍙�
*/
+ @XStreamAsAttribute
private String num;
+
+ @XStreamAsAttribute
+ private String name;
+
/***
* 鐮佹鍊�
*/
+ @XStreamAsAttribute
private String value;
/**
@@ -21,4 +40,55 @@
*/
@XStreamAsAttribute
private String description;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getNum() {
+ return num;
+ }
+
+ public void setNum(String num) {
+ this.num = num;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String toString() {
+ return "CodeSectionValueVO{" +
+ "id='" + id + '\'' +
+ ", num='" + num + '\'' +
+ ", name='" + name + '\'' +
+ ", value='" + value + '\'' +
+ ", description='" + description + '\'' +
+ '}';
+ }
}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultClassifyRuleVO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultClassifyRuleVO.java
index 62581d7..97387f1 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultClassifyRuleVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultClassifyRuleVO.java
@@ -2,20 +2,21 @@
public class ResultClassifyRuleVO {
- private ResultClassifyRuleData resultData;
+ private ResultClassifyRuleData data;
- public ResultClassifyRuleData getResultData() {
- return resultData;
- }
- public void setResultData(ResultClassifyRuleData resultData) {
- this.resultData = resultData;
- }
+ public ResultClassifyRuleData getData() {
+ return data;
+ }
- @Override
- public String toString() {
- return "ResultClassifyVO{" +
- "resultData=" + resultData +
- '}';
- }
+ public void setData(ResultClassifyRuleData data) {
+ this.data = data;
+ }
+
+ @Override
+ public String toString() {
+ return "ResultClassifyRuleVO{" +
+ "data=" + data +
+ '}';
+ }
}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultClassifyVO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultClassifyVO.java
index b7d37f5..eb844e1 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultClassifyVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultClassifyVO.java
@@ -50,7 +50,7 @@
* 瑙勫垯id
*/
@XStreamAsAttribute
- private CodeRuleVO codeRuleVO;
+ private ResultCodeRuleVO codeRule;
/***
* 鏄惁涓哄彾瀛愯妭鐐�
*/
@@ -129,9 +129,17 @@
isLeaf = leaf;
}
+ public ResultCodeRuleVO getCodeRule() {
+ return codeRule;
+ }
+
+ public void setCodeRule(ResultCodeRuleVO codeRule) {
+ this.codeRule = codeRule;
+ }
+
@Override
public String toString() {
- return "ClassifyVO{" +
+ return "ResultClassifyVO{" +
"id='" + id + '\'' +
", name='" + name + '\'' +
", pid='" + pid + '\'' +
@@ -140,6 +148,7 @@
", fullPathName='" + fullPathName + '\'' +
", lcStatus='" + lcStatus + '\'' +
", codeRuleId='" + codeRuleId + '\'' +
+ ", codeRule=" + codeRule +
", isLeaf=" + isLeaf +
'}';
}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultCodeRuleVO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultCodeRuleVO.java
new file mode 100644
index 0000000..38f9eea
--- /dev/null
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/ResultCodeRuleVO.java
@@ -0,0 +1,90 @@
+package com.vci.ubcs.code.vo.webserviceModel.coderule;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
+import com.thoughtworks.xstream.annotations.XStreamImplicit;
+
+import java.util.List;
+
+@XStreamAlias("codeRule")
+public class ResultCodeRuleVO {
+
+ /**
+ * 缂栫爜瑙勫垯鐨勭紪鍙�
+ */
+ @XStreamAsAttribute
+ private String id;
+
+ /**
+ * 瑙勫垯缂栧彿
+ */
+ @XStreamAsAttribute
+ private String num;
+ /**
+ * 缂栫爜瑙勫垯鐨勫悕绉�
+ */
+ @XStreamAsAttribute
+ private String name;
+
+ /**
+ * 瑙勫垯鐨勬弿杩�
+ */
+ @XStreamAsAttribute
+ private String description;
+ /**
+ * 缂栫爜鐨勭爜娈典俊鎭�
+ */
+ @XStreamImplicit
+ private List<CodeSectionVO> codeSection;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getNum() {
+ return num;
+ }
+
+ public void setNum(String num) {
+ this.num = num;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public List<CodeSectionVO> getCodeSection() {
+ return codeSection;
+ }
+
+ public void setCodeSection(List<CodeSectionVO> codeSection) {
+ this.codeSection = codeSection;
+ }
+
+ @Override
+ public String toString() {
+ return "CodeRuleVO{" +
+ "id='" + id + '\'' +
+ ", num='" + num + '\'' +
+ ", name='" + name + '\'' +
+ ", description='" + description + '\'' +
+ ", codeSection=" + codeSection +
+ '}';
+ }
+}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/result.json b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/result.json
new file mode 100644
index 0000000..5dfef0e
--- /dev/null
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/result.json
@@ -0,0 +1,94 @@
+{
+ "resultData": {
+ "msg": "鎴愬姛!",
+ "library": {
+ "classify": [
+ {
+ "classCode": "020202",
+ "lcStatus": "Enabled",
+ "name": "鍙g洊",
+ "description": "鍙g洊",
+ "pid": "0C600A6A-6398-FC30-D13E-121201FDA908",
+ "codeRule": {
+ "num": "001-copy",
+ "description": "鐗╁搧缂栫爜瑙勫垯",
+ "codeSection": [
+ {
+ "sectionValue": [
+ {
+ "num": "0",
+ "id": "B6C55202-A224-9098-6A82-E3FC5DEEF790",
+ "value": "020202"
+ }
+ ],
+ "num": "01",
+ "codeSecLengthType": "code_sec_length_variable",
+ "name": "灞傜骇鐮佹",
+ "secType": "codelevelsec",
+ "id": "1674682431208296448",
+ "pkCodeRule": "9FE2AF3E-2940-BD80-D46F-E3853314673D"
+ },
+ {
+ "sectionValue": [],
+ "num": "02",
+ "name": "娴佹按鐮佹",
+ "description": "娴佹按鐮佹",
+ "secType": "codeserialsec",
+ "id": "801B6412-E617-214A-08A5-9EDF5821AA66",
+ "pkCodeRule": "9FE2AF3E-2940-BD80-D46F-E3853314673D",
+ "codeSecLength": "4"
+ }
+ ],
+ "id": "9FE2AF3E-2940-BD80-D46F-E3853314673D"
+ },
+ "id": "B6C55202-A224-9098-6A82-E3FC5DEEF790",
+ "leaf": false
+ },
+ {
+ "classCode": "020201",
+ "lcStatus": "Enabled",
+ "name": "閿�",
+ "description": "閿�",
+ "pid": "0C600A6A-6398-FC30-D13E-121201FDA908",
+ "codeRule": {
+ "num": "001-copy",
+ "description": "鐗╁搧缂栫爜瑙勫垯",
+ "codeSection": [
+ {
+ "sectionValue": [
+ {
+ "num": "0",
+ "id": "46B5DB5E-F783-DFE9-B48A-C4A367D02AC0",
+ "value": "020201"
+ }
+ ],
+ "num": "01",
+ "codeSecLengthType": "code_sec_length_variable",
+ "name": "灞傜骇鐮佹",
+ "secType": "codelevelsec",
+ "id": "1674682431208296448",
+ "pkCodeRule": "9FE2AF3E-2940-BD80-D46F-E3853314673D"
+ },
+ {
+ "sectionValue": [],
+ "num": "02",
+ "name": "娴佹按鐮佹",
+ "description": "娴佹按鐮佹",
+ "secType": "codeserialsec",
+ "id": "801B6412-E617-214A-08A5-9EDF5821AA66",
+ "pkCodeRule": "9FE2AF3E-2940-BD80-D46F-E3853314673D",
+ "codeSecLength": "4"
+ }
+ ],
+ "id": "9FE2AF3E-2940-BD80-D46F-E3853314673D"
+ },
+ "id": "46B5DB5E-F783-DFE9-B48A-C4A367D02AC0",
+ "leaf": false
+ }
+ ],
+ "name": "",
+ "id": "wupin"
+ },
+ "errorid": "0"
+ }
+}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/constant/BtmTypeConstant.java b/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/constant/BtmTypeConstant.java
index 59145dd..659a53a 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/constant/BtmTypeConstant.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/constant/BtmTypeConstant.java
@@ -54,6 +54,16 @@
public static final String LIFE_CYCLE_EVENT = "lifeCycleEvent";
/**
+ * 鐢熷懡鍛ㄦ湡鐨勮妭鐐�
+ */
+ public static final String LIFE_CYCLE_NODE = "lifeCycleNode";
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鐨勮繛鎺ョ嚎淇℃伅
+ */
+ public static final String LIFE_CYCLE_EDGE = "lifeCycleEdge";
+
+ /**
* 鐢熷懡鍛ㄦ湡杩炴帴绾跨殑涓氬姟绫诲瀷鍚嶇О
*/
public static final String LIFE_CYCLE_LINE = "lifeCycleLine";
diff --git a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/BaseQueryObject.java b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/BaseQueryObject.java
index 780a0c2..b833bf9 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/BaseQueryObject.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/BaseQueryObject.java
@@ -8,6 +8,7 @@
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import org.springblade.core.mp.support.Query;
import java.io.Serializable;
import java.util.HashMap;
@@ -103,10 +104,15 @@
this.limit = limit;
}
+ /**
+ * 浠庝互鍓嶇殑椤圭洰鎷疯礉杩囨潵鐨勫垎椤�
+ * @return
+ */
@JSONField(
serialize = false,
deserialize = false
)
+ @Deprecated
public PageHelper getPageHelper() {
PageHelper pageHelper = new PageHelper(this.limit);
pageHelper.setPage(this.getPage());
@@ -115,6 +121,7 @@
return pageHelper;
}
+
public BaseQueryObject addSort(String sort, String order) {
this.setSort(StringUtils.isBlank(this.getSort()) ? sort : this.getSort() + "," + sort);
this.setOrder(StringUtils.isBlank(this.getOrder()) ? order : this.getOrder() + "," + order);
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 d28dbae..5002d55 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
@@ -57,7 +57,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.core.cache.utils.CacheUtil;
-import org.springblade.core.log.exception.ServiceException;
+import com.vci.ubcs.core.log.exception.ServiceException;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.DateUtil;
@@ -365,7 +365,10 @@
// 鍥炴敹闇�瑕佷笟鍔℃暟鎹垹闄�
if (CodeDefaultLC.TASK_BACK.getValue().equals(baseModelDTO.getLcStatus())) {
R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(baseModelDTO.getBtmname()));
- commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(), VciBaseUtil.toInSql(baseModelDTO.getOid()));
+ if (!listR.isSuccess() || listR.getData().size() == 0) {
+ throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
+ }
+ commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(), VciBaseUtil.toInSql(baseModelDTO.getOid()));
} else {
for (BaseModel baseModel : baseModels) {
baseModel.setLcStatus(baseModelDTO.getLcStatus());
@@ -646,6 +649,9 @@
// 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());
+ if (!listR.isSuccess() || listR.getData().size() == 0) {
+ throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
+ }
final String[] sql = {"select count(*) from " + listR.getData().get(0).getTableName() + " t where 1 = 1 "};
conditionMap.forEach((key, value) -> {
sql[0] += " and " + key + " = " + value;
@@ -1221,7 +1227,8 @@
fieldVO.setTemplet(attrVO.getTableDisplayJs());
}
if (StringUtils.isBlank(fieldVO.getTemplet()) && VciFieldTypeEnum.VTBoolean.name().equalsIgnoreCase(attrVO.getAttributeDataType())) {
- fieldVO.setTemplet("function(d){return $webUtil.formateBoolean(d." + fieldVO.getField() + ");}");
+ fieldVO.setTemplet("function(row,column){return row[column.property]=='true' || row[column.property]=='1'?'鏄�':'鍚�'}");
+// fieldVO.setTemplet("function(d){return $webUtil.formateBoolean(d." + fieldVO.getField() + ");}");
}
fieldVO.setOptionJsMap(eventJsMap);
fieldVO.setStyle(attrVO.getTableDisplayStyle());
@@ -1595,6 +1602,9 @@
//浣跨敤浼犲叆鐨勪笟鍔$被鍨嬫煡璇㈣〃
R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referVO.getReferType()));
// String referTable = VciBaseUtil.getTableName(referVO.getReferType());
+ if (!listR.isSuccess() || listR.getData().size() == 0) {
+ throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
+ }
String referTable = listR.getData().get(0).getTableName();
// String referTable = "pl_code_classify";
String referTableNick = attrVO.getId() + "0";
@@ -1691,6 +1701,9 @@
}
// String tableName = VciBaseUtil.getTableName(btmType);
R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType));
+ if (!listR.isSuccess() || listR.getData().size() == 0) {
+ throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
+ }
// String referTable = VciBaseUtil.getTableName(referVO.getReferType());
String tableName = listR.getData().get(0).getTableName();
String sql = "select " + selectFieldList.stream().map(s -> (s.contains(".") ? s : ("t." + s))).collect(Collectors.joining(","))
@@ -2229,9 +2242,9 @@
// baseMapper.deleteBatchIds(cboList);
//浣跨敤浼犲叆鐨勪笟鍔$被鍨嬫煡璇㈣〃
R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(classifyFullInfo.getCurrentClassifyVO().getBtmtypeid()));
- if (listR.getData().size() == 0) {
- throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
- }
+ if (!listR.isSuccess() || listR.getData().size() == 0) {
+ throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
+ }
commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(),
"'" + (StringUtils.join(cboList.stream().map(BaseModel::getOid).collect(Collectors.toSet()), "','")) + "'");
// );
@@ -3166,9 +3179,9 @@
public Integer insertBatchByType(String btmType, List<BaseModel> baseModels) {
//浣跨敤浼犲叆鐨勪笟鍔$被鍨嬫煡璇㈣〃
R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType));
- if (listR.getData().size() == 0) {
- throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
- }
+ if (!listR.isSuccess() || listR.getData().size() == 0) {
+ throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
+ }
//灏哹ean杞负map,mybatis缁熶竴澶勭悊
List<Map<String, String>> maps = new ArrayList<>();
baseModels.stream().forEach(model -> {
@@ -3193,9 +3206,9 @@
//浣跨敤浼犲叆鐨勪笟鍔$被鍨嬫煡璇㈣〃
R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType));
- if (listR.getData().size() == 0) {
- throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
- }
+ if (!listR.isSuccess() || listR.getData().size() == 0) {
+ throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
+ }
//鏌ヨ鏁版嵁
List<Map> maps = commonsMapper.selectBySql("select * from " + listR.getData().get(0).getTableName() + " where oid in ("
+ VciBaseUtil.toInSql(oids.toString()) + ")");
@@ -3251,6 +3264,9 @@
*/
public BaseModel createBaseModel(String boName) {
R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(boName));
+ if (!listR.isSuccess() || listR.getData().size() == 0) {
+ throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
+ }
String userName = String.valueOf(AuthUtil.getUser().getUserId());
BaseModel bo = new BaseModel();
// bo.setOid(VciBaseUtil.getPk());
@@ -3318,9 +3334,9 @@
public R updateBatchByBaseModel(String btmType, List<BaseModel> baseModels) {
//浣跨敤浼犲叆鐨勪笟鍔$被鍨嬫煡璇㈣〃
R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType));
- if (listR.getData().size() == 0) {
- throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
- }
+ if (!listR.isSuccess() || listR.getData().size() == 0) {
+ throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
+ }
//灏哹ean杞负map,mybatis缁熶竴澶勭悊
List<Map<String, String>> maps = new ArrayList<>();
@@ -3585,7 +3601,10 @@
toBo.setVersionRule(fromBo.getVersionRule());
// RevisionValueObject rvObj = this.getNextRevision(fromBo.getBtmName(), fromBo.getNameoid(), item.revRuleName, item.revInput, revisionVal);
R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(fromBo.getBtmname()));
- Map<String, Object> nextRevision = commonsMapper.getNextRevision(listR.getData().get(0).getTableName(), fromBo.getNameOid());
+ if (!listR.isSuccess() || listR.getData().size() == 0) {
+ throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
+ }
+ Map<String, Object> nextRevision = commonsMapper.getNextRevision(listR.getData().get(0).getTableName(), fromBo.getNameOid());
toBo.setRevisionSeq(Integer.parseInt(nextRevision.get("REVISIONSEQ").toString()));
toBo.setRevisionValue(nextRevision.get("REVISIONVAL").toString());
// VersionValueObject versionObj = this.getVersionValue(item.verRuleName);
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 931fe88..eae24b4 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
@@ -38,10 +38,7 @@
import com.vci.ubcs.starter.web.enumpck.BooleanEnum;
import com.vci.ubcs.starter.web.enumpck.UserSecretEnum;
import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum;
-import com.vci.ubcs.starter.web.pagemodel.DataGrid;
-import com.vci.ubcs.starter.web.pagemodel.KeyValue;
-import com.vci.ubcs.starter.web.pagemodel.PageHelper;
-import com.vci.ubcs.starter.web.pagemodel.UIFormReferVO;
+import com.vci.ubcs.starter.web.pagemodel.*;
import com.vci.ubcs.starter.web.toolmodel.DateConverter;
import com.vci.ubcs.starter.web.util.*;
import lombok.AllArgsConstructor;
@@ -1451,7 +1448,8 @@
@Override
public R batchImportData(List<CodeImprotSaveDatVO> codeImprotSaveDatVOList, String classifyAttr, boolean isImprot) {
- List<BaseModel> dataCBOList=new ArrayList<>();
+
+ boolean success=true;
codeImprotSaveDatVOList.stream().forEach(codeImprotSaveDatVO -> {
List<SheetRowData> rowDataList = new ArrayList<>();
List<ClientBusinessObject>cboList=new ArrayList<>();
@@ -1490,19 +1488,31 @@
String fullPath = getFullPath(classifyFullInfo);
excelToCbo(classifyFullInfo,fieldIndexMap,rowDataList, codeClassifyTemplateVO,cboList,fullPath,!isImprot);
Map<String,String> errorMap=new HashMap<>();
+ Map<String/**璺緞**/, CodeClassifyVO> pathMap=new HashMap<>() ;
+ //鏍¢獙缂栫爜瑙勫垯鍜岀爜娈垫槸鍚︽纭�
+ Map<String, List<String>> ruleRowIndexMap = new ConcurrentHashMap<>();
+ Map<String, CodeRuleVO> ruleVOMap =new ConcurrentHashMap<>();
if(isImprot) {
Map<String/**涓婚敭**/, String/**璺緞**/> childOidPathMap = getChildClassifyPathMap(classifyFullInfo, fullPath);
//閮借浆鎹㈠畬浜嗐�傞渶瑕佹壒閲忔鏌�
//鎵炬墍鏈夌殑鍒嗙被璺緞,闇�瑕佹牎楠岃矾寰勬槸鍚︽纭紝鏄惁閮藉湪褰撳墠鐨勫垎绫荤殑涓嬬骇
List<CodeClassifyVO> childClassifyVOs = classifyService.listChildrenClassify(orderDTO.getCodeClassifyOid(), true, classifyAttr, true);
- Map<String/**璺緞**/, CodeClassifyVO> pathMap = Optional.ofNullable(childClassifyVOs).orElseGet(() -> new ArrayList<>()).stream().collect(Collectors.toMap(s -> s.getPath().startsWith("#") ? s.getPath().substring(1) : s.getPath(), t -> t));
+ pathMap = Optional.ofNullable(childClassifyVOs).orElseGet(() -> new ArrayList<>()).stream().collect(Collectors.toMap(s -> s.getPath().startsWith("#") ? s.getPath().substring(1) : s.getPath(), t -> t));
Map<String/**涓婚敭**/, CodeClassifyVO> classifyVOMap = Optional.ofNullable(childClassifyVOs).orElseGet(() -> new ArrayList<>()).stream().collect(Collectors.toMap(s -> s.getOid(), t -> t));
classifyVOMap.put(classifyFullInfo.getCurrentClassifyVO().getOid(), classifyFullInfo.getCurrentClassifyVO());
pathMap.put("#current#", classifyFullInfo.getCurrentClassifyVO());
//鎴戜滑闇�瑕佸垽鏂繖浜涘垎绫荤殑妯℃澘鏄笉鏄竴鏍风殑锛屽彧闇�瑕佹牎楠岋紝涓嶇敤鑾峰彇
//妫�鏌ュ垎绫荤殑璺緞
checkClassifyPathInHistory(cboList, errorMap, pathMap, childOidPathMap);
+ //妫�鏌ヨ鍒�
+ Map<String/**鍒嗙被涓婚敭**/, String/**瑙勫垯涓婚敭**/> ruleOidMap = new ConcurrentHashMap<String, String>();
+ List<String> unExistRuleClassifyOidList = new CopyOnWriteArrayList<>();
+ checkRuleOidInHistory(classifyVOMap, ruleOidMap, unExistRuleClassifyOidList);
+ ruleVOMap = ruleService.listCodeRuleByIds(ruleOidMap.values(), true).stream().collect(Collectors.toMap(s -> s.getOid(), t -> t));
+
+ checkSecLengthInHistory(cboList, classifyVOMap, ruleVOMap, ruleOidMap, errorMap, ruleRowIndexMap);
}
+
//鍒嗙被娉ㄥ叆
batchSwitchClassifyAttrOnOrder(attrVOS,cboList,classifyFullInfo,isImprot);
//boolean
@@ -1532,36 +1542,58 @@
//4.鏍¢獙瑙勫垯
batchCheckVerifyOnOrder(attrVOS, cboList,errorMap);
-
- //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo();
- List<ClientBusinessObject>needSaveCboList = cboList.stream().filter(cbo -> {
- String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
- return !errorMap.containsKey(rowIndex);
- }).collect(Collectors.toList());
-
- log.info("鍒嗙被锛�"+classifyFullInfo.getCurrentClassifyVO().getName()+"鏁版嵁:"+needSaveCboList.size());
- if (!CollectionUtils.isEmpty(needSaveCboList)) {
-// List<BaseModel> dataCBOList=new ArrayList<>();
- needSaveCboList.stream().forEach(clientBusinessObject -> {
- BaseModel baseModel=new BaseModel();
- BeanUtil.convert(clientBusinessObject,baseModel);
- //baseModel.setData(VciBaseUtil.objectToMapString(clientBusinessObject));
- dataCBOList.add(baseModel);
-// allNeedSaveCboList.add(baseModel);
- });
- try {
- //9.鎴戜滑澶勭悊涓氬姟鏁版嵁
- if (isImprot) {
- productCodeService.productCodeAndSaveData(classifyFullInfo, codeClassifyTemplateVO, ruleVO, null, dataCBOList);
- }else {
- productCodeService.productCodeAndSaveData(classifyFullInfo, codeClassifyTemplateVO, ruleVO, orderDTO.getSecDTOList(), dataCBOList);
+ if(isImprot){
+ List<ClientBusinessObject> needSaveCboList = cboList.stream().filter(cbo -> {
+ String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
+ return !errorMap.containsKey(rowIndex);
+ }).collect(Collectors.toList());
+ List<ClientBusinessObject> finalNeedSaveCboList = needSaveCboList;
+ Map<String, CodeRuleVO> finalRuleVOMap = ruleVOMap;
+ ruleRowIndexMap.keySet().parallelStream().forEach(ruleOid -> {
+ List <BaseModel>dataCBOList=new CopyOnWriteArrayList<>();
+ List<String> rowIndexList = ruleRowIndexMap.get(ruleOid);
+ List<ClientBusinessObject> thisCbos = needSaveCboList.stream().filter(cbo -> rowIndexList.contains(cbo.getAttributeValue(IMPORT_ROW_INDEX)) && !errorMap.containsKey(cbo.getAttributeValue(IMPORT_ROW_INDEX))).collect(Collectors.toList());
+ if (!CollectionUtils.isEmpty(thisCbos)) {
+ thisCbos.stream().forEach(clientBusinessObject -> {
+ BaseModel baseModel = new BaseModel();
+ BeanUtil.convert(clientBusinessObject, baseModel);
+ dataCBOList.add(baseModel);
+ });
+ try {
+ productCodeService.productCodeAndSaveData(classifyFullInfo, codeClassifyTemplateVO, finalRuleVOMap.get(ruleOid), null, dataCBOList);
+ } catch (Throwable e) {
+ //success=false;
+ log.error("鎵归噺浜х敓缂栫爜鐨勬椂鍊欏嚭閿欎簡", e);
+ thisCbos.stream().forEach(cbo -> {
+ String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
+ errorMap.put(rowIndex, errorMap.getOrDefault(rowIndex, "") + ";绯荤粺閿欒锛屽瓨鍌ㄦ暟鎹殑鏃跺�欏嚭閿欎簡");
+ });
+ }
}
- } catch (Exception e) {
- e.printStackTrace();
+ engineService.batchSaveSelectChar(codeClassifyTemplateVO, dataCBOList);
+ });
+ }else {
+ List<BaseModel> dataCBOList=new ArrayList<>();
+ List<ClientBusinessObject> needSaveCboList = cboList.stream().filter(cbo -> {
+ String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
+ return !errorMap.containsKey(rowIndex);
+ }).collect(Collectors.toList());
+ log.info("鍒嗙被锛�" + classifyFullInfo.getCurrentClassifyVO().getName() + "鏁版嵁:" + needSaveCboList.size());
+ if (!CollectionUtils.isEmpty(needSaveCboList)) {
+ needSaveCboList.stream().forEach(clientBusinessObject -> {
+ BaseModel baseModel = new BaseModel();
+ BeanUtil.convert(clientBusinessObject, baseModel);
+ dataCBOList.add(baseModel);
+ });
+ try {
+ productCodeService.productCodeAndSaveData(classifyFullInfo, codeClassifyTemplateVO, ruleVO, orderDTO.getSecDTOList(), dataCBOList);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ //濡傛灉鏄紪鐮佺敓鎴愬け璐ワ紝鍒欑洿鎺ュ氨澶辫触浜嗭紝鍏朵粬鐨勫垽鏂嚭鏉ユ湁閿欒鐨勬垜浠兘缁熶竴杩斿洖鍒癳xcel閲岄潰
+ engineService.batchSaveSelectChar(codeClassifyTemplateVO, dataCBOList);
}
}
- //濡傛灉鏄紪鐮佺敓鎴愬け璐ワ紝鍒欑洿鎺ュ氨澶辫触浜嗭紝鍏朵粬鐨勫垽鏂嚭鏉ユ湁閿欒鐨勬垜浠兘缁熶竴杩斿洖鍒癳xcel閲岄潰
- engineService.batchSaveSelectChar(codeClassifyTemplateVO, dataCBOList);
});
return R.success(isImprot?"鎵归噺鍘嗗彶瀵煎叆鎴愬姛":"鎵归噺鐢宠鎴愬姛");
}
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
index ef799e4..620cc28 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
@@ -20,6 +20,11 @@
import com.vci.ubcs.code.vo.webserviceModel.attrmap.*;
import com.vci.ubcs.code.vo.webserviceModel.attrmap.DataObjectVO;
import com.vci.ubcs.code.vo.webserviceModel.classify.*;
+import com.vci.ubcs.code.vo.webserviceModel.classify.QueryClassifyVO;
+import com.vci.ubcs.code.vo.webserviceModel.classify.QueryData;
+import com.vci.ubcs.code.vo.webserviceModel.classify.QueryLibraryVO;
+import com.vci.ubcs.code.vo.webserviceModel.classify.ResultClassifyVO;
+import com.vci.ubcs.code.vo.webserviceModel.coderule.*;
import com.vci.ubcs.code.vo.webserviceModel.data.*;
import com.vci.ubcs.code.vo.webserviceModel.result.json.*;
import com.vci.ubcs.code.vo.webserviceModel.result.xml.XMLResultClassfyVO;
@@ -48,6 +53,7 @@
import java.util.stream.Collectors;
import static com.vci.ubcs.code.constant.MdmEngineConstant.DEFAULT_SYNC_ATTR_LIST;
+import static com.vci.ubcs.code.constant.MdmEngineConstant.IMPORT_ROW_INDEX;
import static com.vci.ubcs.code.enumpack.CodeSecTypeEnum.CODE_CLASSIFY_SEC;
/***
@@ -480,17 +486,48 @@
errorid = "101";
throw new Throwable("鎺ュ彛鍙傛暟锛氳处鍙蜂俊鎭幏鍙栧け璐�");
}
- if(!CollectionUtils.isEmpty(classifyIdList)){
- //鍏堢畝绉版槸鍚︽湁鍏宠仈妯℃澘锛屾湁妯℃澘瑕佸厛鍒犻櫎
- List<CodeClassify> libIdDos = classifyService.selectByWrapper(Wrappers.<CodeClassify>query().lambda().in(CodeClassify::getId, classifyIdList));
- codeClassifyVOS=classifyService.codeClassifyDO2VOs(libIdDos);
- }else {
- List<CodeClassify> libIdDos = classifyService.selectByWrapper(Wrappers.<CodeClassify>query().lambda().eq(CodeClassify::getId, libId));
- String oid= libIdDos.get(0).getOid();
- TreeQueryObject treeQueryObject=new TreeQueryObject();
- treeQueryObject.setParentOid(oid);
- treeQueryObject.setQueryAllLevel(true);
- codeClassifyVOS=classifyService.selectCodeClassifyDOByTree(treeQueryObject);
+ List<CodeClassify> libIdDos =classifyService.selectByWrapper(Wrappers.<CodeClassify>query().lambda().in(CodeClassify::getId, libId));
+ if(CollectionUtils.isEmpty(libIdDos)) {
+ CodeClassify libCodeClassify =libIdDos.get(0);
+ String oid=libCodeClassify.getOid();
+ if (!CollectionUtils.isEmpty(classifyIdList)) {
+ //鍏堢畝绉版槸鍚︽湁鍏宠仈妯℃澘锛屾湁妯℃澘瑕佸厛鍒犻櫎
+ List<CodeClassify> childCodeClassifyList = classifyService.selectByWrapper(Wrappers.<CodeClassify>query().lambda().in(CodeClassify::getId, classifyIdList));
+ List<CodeClassify>newchildCodeClassifyList=new ArrayList<>();
+ if(!CollectionUtils.isEmpty(childCodeClassifyList)) {
+ Map<String,String> errorMap=new HashMap<>();
+ childCodeClassifyList.stream().forEach(codeClassify -> {
+ CodeClassifyVO toClassifyVO= classifyService.getTopClassifyVO(codeClassify.getOid());
+ if(toClassifyVO.getOid().equals(libCodeClassify.getOid())){
+ newchildCodeClassifyList.add(codeClassify);
+ }
+ });
+ Map<String/**鍒嗙被缂栧彿**/, CodeClassify/**鍒嗙被瀵硅薄**/> classifyfCodeMap = newchildCodeClassifyList.stream().collect(Collectors.toMap(s -> s.getId(), t -> t));
+ classifyIdList.stream().forEach(classifyfCode -> {
+ if(!classifyfCodeMap.containsKey(classifyfCode)) {
+ errorMap.put("error", errorMap.getOrDefault("error", "") + ";鏍规嵁classCode锛氥��" + classifyfCode + "銆戝湪library:銆�" + libCodeClassify.getId() + "銆戜笅鏈煡璇㈠埌");
+ }
+ });
+ if(errorMap.size()>0){
+ errorid = "101";
+ msg = errorMap.getOrDefault("error","");
+ throw new Throwable(msg);
+ }
+ codeClassifyVOS = classifyService.codeClassifyDO2VOs(newchildCodeClassifyList);
+ }else{
+ errorid = "101";
+ msg = "鎺ュ彛鍙傛暟锛歝lassCode 鏈煡璇㈠埌瀵瑰簲鐨勫垎绫讳俊鎭�";
+ throw new Throwable(msg);
+ }
+ } else {
+ TreeQueryObject treeQueryObject = new TreeQueryObject();
+ treeQueryObject.setParentOid(oid);
+ treeQueryObject.setQueryAllLevel(true);
+ codeClassifyVOS = classifyService.selectCodeClassifyDOByTree(treeQueryObject);
+ }
+ }else{
+ errorid = "101";
+ throw new Throwable("鎺ュ彛鍙傛暟锛氳处鍙蜂俊鎭幏鍙栧け璐�");
}
LibraryVO libraryVo=new LibraryVO();
libraryVo.setId(libId);
@@ -750,9 +787,9 @@
String systemId="";
log.info("鏌ヨ鍒嗙被鐨勬暟鎹弬鏁�:->"+data);
log.info("鏌ヨ鍒嗙被鐨勬暟鎹被鍨�:->"+dataType);
- ResultClassifyVO resultClassifyVO =new ResultClassifyVO();
- List<ClassifyVO> classifyVOList=new ArrayList<>();
- ResultData resultData=new ResultData();
+ ResultClassifyRuleVO resultClassifyRuleVO =new ResultClassifyRuleVO();
+ List<com.vci.ubcs.code.vo.webserviceModel.coderule.ResultClassifyVO> classifyVOList=new ArrayList<>();
+ ResultClassifyRuleData resultClassifyRuleData=new ResultClassifyRuleData();
try {
if (StringUtils.isBlank(data)) {
errorid = "101";
@@ -807,14 +844,89 @@
treeQueryObject.setQueryAllLevel(true);
codeClassifyVOS=classifyService.selectCodeClassifyDOByTree(treeQueryObject);
}
- LibraryVO libraryVo=new LibraryVO();
- libraryVo.setId(libId);
- libraryVo.setName("");
+ ResultLibraryVO resultLibraryVO=new ResultLibraryVO();
+ resultLibraryVO.setId(libId);
+ resultLibraryVO.setName("");
if(!CollectionUtils.isEmpty(codeClassifyVOS)){
errorid = "0";
msg="鎴愬姛!";
codeClassifyVOS.stream().forEach(codeClassifyDO -> {
- ClassifyVO classifyVO=new ClassifyVO();
+ //鍚庡幓鍖呭惈鐮佹鐨勭紪鐮佽鍒�
+ CodeRuleVO codeRuleVO= this.engineService.getCodeRuleByClassifyOid(codeClassifyDO.getOid());
+ ResultCodeRuleVO resultCodeRuleVO=new ResultCodeRuleVO();
+ if(codeRuleVO!=null){
+ CodeRuleVO resultClassifyRuleVO1=new CodeRuleVO();
+ List<CodeBasicSecVO> codeBasicSecVOS= codeRuleVO.getSecVOList();
+ List<CodeSectionVO> codeSectionVOList=new CopyOnWriteArrayList<>();
+ if(!CollectionUtils.isEmpty(codeBasicSecVOS)){
+ codeBasicSecVOS.stream().forEach(codeBasicSecVO -> {
+ List<CodeSectionValueVO> codeSectionValueVOList=new ArrayList<>();
+ String secType= codeBasicSecVO.getSecType();
+ if(secType.equals("codevariablesec")){//鍙彉鐮佹
+ CodeSectionValueVO sectionValueVO=new CodeSectionValueVO("","","","","");
+ codeSectionValueVOList.add(sectionValueVO);
+ }else if(secType.equals("codefixedsec")){//鍥哄畾鐮佹
+ List<CodeFixedValueVO> fixedValueVOList=codeBasicSecVO.getFixedValueVOList();
+ fixedValueVOList.stream().forEach(codeFixedValueVO -> {
+ CodeSectionValueVO sectionValueVO=new CodeSectionValueVO(codeFixedValueVO.getOid(),codeFixedValueVO.getOrderNum()+"",codeFixedValueVO.getId(),codeFixedValueVO.getName(),codeFixedValueVO.getDescription());
+ codeSectionValueVOList.add(sectionValueVO);
+ });
+ }else if(secType.equals("codeclassifysec")){//鍒嗙被鐮佹
+ String secOid=codeBasicSecVO.getOid();
+ String parentClassifySecOid= codeBasicSecVO.getParentClassifySecOid();
+ List<CodeClassifyValueVO> codeClassifyValueVOS= this.codeClassifyValueService.listCodeClassifyValueBySecOid(secOid,parentClassifySecOid);
+ if(CollectionUtils.isEmpty(codeClassifyValueVOS)){
+ codeClassifyValueVOS.stream().forEach(codeClassifyValueVO -> {
+ CodeSectionValueVO sectionValueVO=new CodeSectionValueVO(codeClassifyValueVO.getOid(),codeClassifyValueVO.getOrderNum()+"",codeClassifyValueVO.getId(),codeClassifyValueVO.getName(),codeClassifyValueVO.getDescription());
+ });
+ }
+ }else if(secType.equals("codedatesec")){//鏃ユ湡鐮佹
+
+ }else if(secType.equals("coderefersec")){//寮曠敤鐮佹
+
+ }else if(secType.equals("codelevelsec")) {//灞傜骇鐮佹
+ int level = codeBasicSecVO.getCodeLevelValue();
+ CodeClassifyVO levelCodeClassifyVO = new CodeClassifyVO();
+ CodeClassifyFullInfoBO classifyFullInfoBO = this.classifyService.getClassifyFullInfo(codeClassifyDO.getOid());
+ if(codeBasicSecVO.getCodeLevelType().equals("code_level_special")){//鎸囧畾灞傜骇
+ List<CodeClassifyVO> classifyVOS = classifyFullInfoBO.getParentClassifyVOs().stream().sorted(((o1, o2) -> o2.getDataLevel().compareTo(o1.getDataLevel()))).collect(Collectors.toList());
+ if (classifyVOS.size() >= level && level > 0) {
+ levelCodeClassifyVO = classifyVOS.get(level - 1);
+ }
+ }else{//鏈�灏忓眰
+ levelCodeClassifyVO=codeClassifyDO;
+ }
+ CodeSectionValueVO sectionValueVO=new CodeSectionValueVO(levelCodeClassifyVO.getOid(),"0",levelCodeClassifyVO.getId(),codeBasicSecVO.getName(),codeBasicSecVO.getDescription());
+ codeSectionValueVOList.add(sectionValueVO);
+ }else if(secType.equals("codeattrsec")){//灞炴�х爜娈�
+
+ }else if(secType.equals("codeserialsec")){//娴佹按鐮佹
+
+ }
+ //鏋勫缓瑙勫垯鐮佹
+ CodeSectionVO codeSectionVO=new CodeSectionVO();
+ codeSectionVO.setId(codeBasicSecVO.getOid());//涓婚敭
+ codeSectionVO.setName(codeBasicSecVO.getName());//鐮佹鍚嶇О
+ codeSectionVO.setCodeSecLength(codeBasicSecVO.getCodeSecLength());//鐮佹闀垮害
+ codeSectionVO.setNum(codeBasicSecVO.getId());//鐮佹缂栧彿
+ codeSectionVO.setCodeDateFormatStr(codeBasicSecVO.getCodeDateFormatStr());//鏃ユ湡绫诲瀷
+ codeSectionVO.setCodeSecLengthType(codeBasicSecVO.getCodeSecLengthType());//鐮佹闀垮害绫诲瀷
+ codeSectionVO.setPkCodeRule(codeRuleVO.getOid());
+ codeSectionVO.setSecType(codeBasicSecVO.getSecType());//鐮佹绫诲瀷
+ codeSectionVO.setDescription(codeBasicSecVO.getDescription());
+ codeSectionVO.setParentClassifySecOid(codeBasicSecVO.getParentClassifySecOid());
+ codeSectionVO.setSectionValue(codeSectionValueVOList);
+ codeSectionVOList.add(codeSectionVO);
+ });
+ }
+ //鏋勫缓瑙勫垯淇℃伅
+ resultCodeRuleVO.setId(codeRuleVO.getOid());
+ resultCodeRuleVO.setNum(codeRuleVO.getId());
+ resultCodeRuleVO.setDescription(codeRuleVO.getDescription());
+ resultCodeRuleVO.setCodeSection(codeSectionVOList);
+ }
+ //鏋勫缓鍒嗙被淇℃伅
+ com.vci.ubcs.code.vo.webserviceModel.coderule.ResultClassifyVO classifyVO=new com.vci.ubcs.code.vo.webserviceModel.coderule.ResultClassifyVO();
classifyVO.setId(codeClassifyDO.getOid());
classifyVO.setLcStatus(codeClassifyDO.getLcStatus());
classifyVO.setClassCode(codeClassifyDO.getId());
@@ -822,32 +934,33 @@
classifyVO.setName(codeClassifyDO.getName());
classifyVO.setPid(codeClassifyDO.getParentcodeclassifyoid());
classifyVO.setFullPathName(codeClassifyDO.getPath());
+ classifyVO.setCodeRule(resultCodeRuleVO);
classifyVOList.add(classifyVO);
});
- libraryVo.setClassify(classifyVOList);
+ resultLibraryVO.setClassify(classifyVOList);
}else{
errorid = "100";
msg="鏈煡璇㈠埌鐩稿叧鐨勫垎绫讳俊鎭�";
}
issucess=true;
- resultData.setLibrary(libraryVo);
+ resultClassifyRuleData.setLibrary(resultLibraryVO);
}catch (Throwable e){
e.printStackTrace();;
msg="鏌ヨ鍒嗙被澶辫触:"+e.getMessage();
}finally {
- resultData.setErrorid(errorid);
- resultData.setMsg(msg);
- resultClassifyVO.setResultData(resultData);
+ resultClassifyRuleData.setErrorid(errorid);
+ resultClassifyRuleData.setMsg(msg);
+ resultClassifyRuleVO.setData(resultClassifyRuleData);
}
if(dataType.equals("xml")){
//缁勭粐杩斿洖鎺ュ彛淇℃伅
XStream xStream = new XStream(new DomDriver());
xStream.processAnnotations(XMLResultSystemVO.class);
xStream.autodetectAnnotations(true);
- resultStr = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + xStream.toXML(resultData);
+ resultStr = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + xStream.toXML(resultClassifyRuleData);
}else{
- Object object = JSONObject.toJSON(resultClassifyVO);
+ Object object = JSONObject.toJSON(resultClassifyRuleVO);
resultStr = object.toString();
}
try {
diff --git a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/controller/DdlController.java b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/controller/DdlController.java
index 819c5e5..6423ad9 100644
--- a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/controller/DdlController.java
+++ b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/controller/DdlController.java
@@ -44,7 +44,11 @@
@ApiOperationSupport(order = 1)
@ApiOperation(value = "鏂板鎴栦慨鏀�", notes = "涓氬姟绫诲瀷閾炬帴绫诲瀷浼犺緭瀵硅薄")
public R submitBtmType(@RequestBody BtmAndLinkTypeDdlDTO ddlDTO) {
- return ddlService.submit(ddlDTO);
+ try {
+ return ddlService.submit(ddlDTO);
+ } catch (Throwable e) {
+ return R.fail(e.getMessage());
+ }
}
/**
diff --git a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/processor/dll/DllDmMapperProcessor.java b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/processor/dll/DllDmMapperProcessor.java
index e93f205..bd55aab 100644
--- a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/processor/dll/DllDmMapperProcessor.java
+++ b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/processor/dll/DllDmMapperProcessor.java
@@ -3,12 +3,16 @@
import com.vci.ubcs.ddl.bo.DdlFieldMappingAttrBO;
import com.vci.ubcs.ddl.mapper.DllDmMapper;
import com.vci.ubcs.ddl.mapper.DllMapper;
+import com.vci.ubcs.omd.vo.BtmTypeAttributeVO;
import com.vci.ubcs.starter.util.VciSpringUtil;
import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum;
import org.apache.commons.collections4.BidiMap;
+import org.springblade.core.tool.utils.StringPool;
+import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Component;
import java.util.List;
+import java.util.Locale;
/**
* Description: 搴旂敤浜庤揪姊︽暟鎹紝鐢熸垚鍒涘缓琛ㄦ搷浣渟ql鐨勫鐞嗗櫒
@@ -17,7 +21,7 @@
* @date 2023/4/24
*/
@Component
-public class DllDmMapperProcessor extends DllMapperProcessor{
+public class DllDmMapperProcessor extends DllMapperProcessor {
private static final DllMapper MAPPER = VciSpringUtil.getBean(DllDmMapper.class);
@@ -25,24 +29,24 @@
static {
// 闇�瑕侀噸鏂版槧灏勭殑瀛楁绫诲瀷鍦ㄨ繖閲屽啓
- FIELD_MAP.put(VciFieldTypeEnum.VTDouble,new DdlFieldMappingAttrBO("DOUBLE",26,8,true,null));
- FIELD_MAP.put(VciFieldTypeEnum.VTInteger,new DdlFieldMappingAttrBO("NUMBER",22,null,true,null));
- FIELD_MAP.put(VciFieldTypeEnum.VTLong,new DdlFieldMappingAttrBO("BIGINT",22,null,true,null));
- FIELD_MAP.put(VciFieldTypeEnum.VTBoolean,new DdlFieldMappingAttrBO("VARCHAR",5,null,true,null));
- FIELD_MAP.put(VciFieldTypeEnum.VTDate,new DdlFieldMappingAttrBO("DATE",null,null,true,null));
- FIELD_MAP.put(VciFieldTypeEnum.VTDateTime,new DdlFieldMappingAttrBO("TIMESTAMP",null,null,true,null));
- FIELD_MAP.put(VciFieldTypeEnum.VTTime,new DdlFieldMappingAttrBO("TIME",null,null,true,null));
- FIELD_MAP.put(VciFieldTypeEnum.VTFilePath,new DdlFieldMappingAttrBO("TEXT",null,null,true,null));
- FIELD_MAP.put(VciFieldTypeEnum.VTClob,new DdlFieldMappingAttrBO("CLOB",100,null,true,null));
- FIELD_MAP.put(VciFieldTypeEnum.VTString,new DdlFieldMappingAttrBO("VARCHAR",255,null,true,null));
+ FIELD_MAP.put(VciFieldTypeEnum.VTDouble, new DdlFieldMappingAttrBO("DOUBLE", 26, 8, true, null));
+ FIELD_MAP.put(VciFieldTypeEnum.VTInteger, new DdlFieldMappingAttrBO("INTEGER", 10, null, true, null));
+ FIELD_MAP.put(VciFieldTypeEnum.VTLong, new DdlFieldMappingAttrBO("NUMBER", 38, null, true, null));
+ FIELD_MAP.put(VciFieldTypeEnum.VTBoolean, new DdlFieldMappingAttrBO("VARCHAR", 5, null, true, null));
+ FIELD_MAP.put(VciFieldTypeEnum.VTDate, new DdlFieldMappingAttrBO("DATE", null, null, true, null));
+ FIELD_MAP.put(VciFieldTypeEnum.VTDateTime, new DdlFieldMappingAttrBO("TIMESTAMP", null, null, true, null));
+ FIELD_MAP.put(VciFieldTypeEnum.VTTime, new DdlFieldMappingAttrBO("TIME", null, null, true, null));
+ FIELD_MAP.put(VciFieldTypeEnum.VTFilePath, new DdlFieldMappingAttrBO("TEXT", null, null, true, null));
+ FIELD_MAP.put(VciFieldTypeEnum.VTClob, new DdlFieldMappingAttrBO("CLOB", 100, null, true, null));
+ FIELD_MAP.put(VciFieldTypeEnum.VTString, new DdlFieldMappingAttrBO("VARCHAR", 255, null, true, null));
}
public DllDmMapperProcessor() {
super(MAPPER);
System.out.println("-----------------");
- if (MAPPER != null){
+ if (MAPPER != null) {
System.out.println("[success]::鍔犺浇杈炬ⅵ鏁版嵁搴揇LL鎿嶄綔鏈嶅姟鎴愬姛");
- }else {
+ } else {
System.out.println("[fail]::鍔犺浇杈炬ⅵ鏁版嵁搴揇LL鎿嶄綔鏈嶅姟澶辫触");
}
}
@@ -54,7 +58,29 @@
@Override
protected DdlFieldMappingAttrBO getMappingBO(VciFieldTypeEnum fieldTypeEnum) {
- return getMappingBOInMap(fieldTypeEnum,FIELD_MAP);
+ return getMappingBOInMap(fieldTypeEnum, FIELD_MAP);
+ }
+
+ @Override
+ public String getColumnTypeSql(VciFieldTypeEnum fieldType, BtmTypeAttributeVO attributeVO) {
+ DdlFieldMappingAttrBO mappingBO = getMappingBO(fieldType);
+ if (fieldType.equals(VciFieldTypeEnum.VTDouble)) {
+ mappingBO.setDataPrecision(attributeVO.getPrecisionLength());
+ }
+ //鍏堝彧閽堝鏁板瓧绫诲瀷鐨勮繘琛屽鐞�
+ if (fieldType.equals(VciFieldTypeEnum.VTInteger) ){
+ mappingBO.setDataLength(null);
+ } else if (fieldType.equals(VciFieldTypeEnum.VTDouble) || fieldType.equals(VciFieldTypeEnum.VTLong)) {
+ if (attributeVO.getAttributeLength() <= mappingBO.getDataLength()) {
+ mappingBO.setDataLength(attributeVO.getAttributeLength());
+ }
+ }else {
+ mappingBO.setDataLength(attributeVO.getAttributeLength());
+ }
+ mappingBO.setNullable(attributeVO.isNullableFlag());
+ mappingBO.setDefaultValue(attributeVO.getDefaultValue());
+ return mappingBO.toString() + (StringUtil.equals(attributeVO.getId().toLowerCase(Locale.ROOT), "OID".toLowerCase(Locale.ROOT)) ? StringPool.SPACE + "primary key" + StringPool.SPACE : "");
+
}
/**
@@ -65,11 +91,11 @@
*/
@Override
public List<VciFieldTypeEnum> listFieldByColumnStr(String columnStr) {
- return listFieldInMapByColumnStr(columnStr,FIELD_MAP);
+ return listFieldInMapByColumnStr(columnStr, FIELD_MAP);
}
@Override
public VciFieldTypeEnum getFieldTypeByColumnStr(String columnStr, Integer length) {
- return getFieldTypeBeColumnStrInMap(columnStr,length,FIELD_MAP);
+ return getFieldTypeBeColumnStrInMap(columnStr, length, FIELD_MAP);
}
}
diff --git a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java
index 2b2d1ea..c7610fa 100644
--- a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java
+++ b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java
@@ -195,7 +195,7 @@
* @param ddlDTO 涓氬姟绫诲瀷浼犺緭瀵硅薄
* @return 鎵ц缁撴灉
*/
- R submit(BtmAndLinkTypeDdlDTO ddlDTO);
+ R submit(BtmAndLinkTypeDdlDTO ddlDTO) throws Throwable;
/**
* 鎸夎〃鍚嶈幏鍙栬〃淇℃伅
diff --git a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java
index bc9b2ad..eb74293 100644
--- a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java
@@ -83,25 +83,25 @@
private final Map<String, LinkTypeVO> idLinkMap = new ConcurrentHashMap<>();
- private void putBtm(@NotNull BtmTypeVO... voList) throws ServiceException {
+ private void putBtm(@NotNull BtmTypeVO... voList) throws Throwable {
String collect = Arrays.stream(voList).map(BtmTypeVO::getId).filter(idBtmMap::containsKey).collect(Collectors.joining(","));
if (StringUtils.isBlank(collect)) {
Arrays.stream(voList).forEach(vo -> {
idBtmMap.put(vo.getId(), vo);
});
} else {
- throw new ServiceException("涓氬姟绫诲瀷:[" + collect + "]姝e湪琚叾浠栫敤鎴锋搷浣�");
+ throw new Throwable("涓氬姟绫诲瀷:[" + collect + "]姝e湪琚叾浠栫敤鎴锋搷浣�");
}
}
- private void putLink(@NotNull LinkTypeVO... voList) throws ServiceException {
+ private void putLink(@NotNull LinkTypeVO... voList) throws Throwable {
String collect = Arrays.stream(voList).map(LinkTypeVO::getId).filter(idLinkMap::containsKey).collect(Collectors.joining(","));
if (StringUtils.isBlank(collect)) {
Arrays.stream(voList).forEach(vo -> {
idLinkMap.put(vo.getId(), vo);
});
} else {
- throw new ServiceException("閾炬帴绫诲瀷:[" + collect + "]姝e湪琚叾浠栫敤鎴锋搷浣�");
+ throw new Throwable("閾炬帴绫诲瀷:[" + collect + "]姝e湪琚叾浠栫敤鎴锋搷浣�");
}
}
@@ -978,7 +978,7 @@
* @return 鎵ц缁撴灉
*/
@Override
- public R<List<ModifyAttributeInfo>> submit(BtmAndLinkTypeDdlDTO ddlDTO) {
+ public R<List<ModifyAttributeInfo>> submit(BtmAndLinkTypeDdlDTO ddlDTO) throws Throwable {
try {
List<ModifyAttributeInfo> changedList = new ArrayList<>();
if (!CollectionUtils.isEmpty(ddlDTO.getBtmTypeList())) {
@@ -996,7 +996,7 @@
R<List<ModifyAttributeInfo>> result = R.success("鏁版嵁搴撴搷浣滄垚鍔�");
result.setData(changedList);
return result;
- } catch (VciBaseException e) {
+ } catch (Exception e) {
try {
// 寤鸿〃澶辫触鏈夊紓甯革紝鎹曡幏鍚庤繑鍥烇紝骞堕噴鏀剧嚎绋嬩腑鐨勫唴瀹�
if (!CollectionUtils.isEmpty(ddlDTO.getBtmTypeList())) {
@@ -1009,8 +1009,6 @@
}catch (ServiceException e2){
throw new RuntimeException(e2.getMessage());
}
- } catch (ServiceException e) {
- throw new RuntimeException(e.getMessage());
}
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/LifeCycleController.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/LifeCycleController.java
index c3a9567..2360c4b 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/LifeCycleController.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/LifeCycleController.java
@@ -9,6 +9,7 @@
import com.vci.ubcs.omd.vo.LifeCycleVO;
import com.vci.ubcs.omd.wrapper.LifeCycleRuleWrapper;
import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject;
+import com.vci.ubcs.starter.web.pagemodel.BladeQueryObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
@@ -43,12 +44,12 @@
@GetMapping("page")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "鍒嗛〉鏌ヨ鐢熷懡鍛ㄦ湡",notes = "鍒嗛〉鏌ヨ鐢熷懡鍛ㄦ湡")
- public R<IPage<LifeCycleVO>> page(BaseQueryObject baseQueryObject){
- Map<String, String> conditionMap = baseQueryObject.getConditionMap();
+ public R<IPage<LifeCycleVO>> page(BladeQueryObject baseQueryObject){
+ Map<String, Object> conditionMap = baseQueryObject.getConditionMap();
if (conditionMap == null){
conditionMap = new HashMap<>();
}
- return R.data(lifeCycleService.listLife(conditionMap,baseQueryObject.getPageHelper()));
+ return R.data(lifeCycleService.listLife(conditionMap,baseQueryObject.getQuery()));
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java
index 64e1283..f75ae74 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java
@@ -118,7 +118,7 @@
BeanMap.create(queryObj).putAll(conditionMap);
List<BtmType> list = btmTypeService.list(Condition.getQueryWrapper(queryObj).lambda().eq(BtmType::getBizDomain, domainValue).orderByAsc(BtmType::getId));
if (CollectionUtils.isEmpty(list)){
- return R.data(null);
+ return R.data(new ArrayList<>());
}
return R.data(BtmTypeWrapper.build().listEntityVO(list));
}
@@ -161,9 +161,6 @@
)
).orElseGet(ArrayList::new)
);
- if (CollectionUtils.isEmpty(voList)){
- return R.data(null);
- }
return R.data(voList);
}
@@ -174,6 +171,7 @@
* @return 榛樿瀛楁灞炴��
*/
@Override
+ @GetMapping(GET_DEFAULT_ATTR_BY_BTM_ID)
public R<BtmTypeVO> getDefaultAttrByBtmId(String btmTypeId) {
return R.data(Optional.ofNullable(btmTypeService.getDefaultAttrByBtmId(btmTypeId)).orElseGet(BtmTypeVO::new));
}
@@ -185,6 +183,7 @@
* @return 鎵�鏈夊瓧娈�
*/
@Override
+ @GetMapping(GET_ALL_ATTR_BY_BTM_ID)
public R<BtmTypeVO> getAllAttributeByBtmId(String btmTypeId) {
return R.data(Optional.ofNullable(btmTypeService.getAllAttributeByBtmId(btmTypeId)).orElseGet(BtmTypeVO::new));
}
@@ -196,6 +195,7 @@
* @return 鎵�鏈夊瓧娈�
*/
@Override
+ @GetMapping(GET_ALL_ATTR_BY_BTM_OID)
public R<BtmTypeVO> getAllAttributeByBtmOid(String btmTypeOid) {
return R.data(Optional.ofNullable(btmTypeService.getAllAttributeByBtmOid(btmTypeOid)).orElseGet(BtmTypeVO::new));
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/LifeCycleEdgeMapper.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/LifeCycleEdgeMapper.java
new file mode 100644
index 0000000..139bed1
--- /dev/null
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/LifeCycleEdgeMapper.java
@@ -0,0 +1,12 @@
+package com.vci.ubcs.omd.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.vci.ubcs.omd.entity.LifeCycleEdge;
+
+/**
+ * 鐢熷懡鍛ㄦ湡鐨勮繛鎺ョ嚎
+ * @author weidy
+ * @date 2023/7/4
+ */
+public interface LifeCycleEdgeMapper extends BaseMapper<LifeCycleEdge> {
+}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/LifeCycleLineEventMapper.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/LifeCycleLineEventMapper.java
new file mode 100644
index 0000000..1128048
--- /dev/null
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/LifeCycleLineEventMapper.java
@@ -0,0 +1,13 @@
+package com.vci.ubcs.omd.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.vci.ubcs.omd.dto.LifeCycleLineEventDTO;
+import com.vci.ubcs.omd.entity.LifeCycleLineEvent;
+
+/**
+ * 鐢熷懡鍛ㄦ湡杩炴帴绾跨殑浜嬩欢
+ * @author weidy
+ * @date 2023/7/4
+ */
+public interface LifeCycleLineEventMapper extends BaseMapper<LifeCycleLineEvent> {
+}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/LifeCycleNodeMapper.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/LifeCycleNodeMapper.java
new file mode 100644
index 0000000..882bf55
--- /dev/null
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/mapper/LifeCycleNodeMapper.java
@@ -0,0 +1,12 @@
+package com.vci.ubcs.omd.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.vci.ubcs.omd.entity.LifeCycleNode;
+
+/**
+ * 鐢熷懡鍛ㄦ湡鐨勮妭鐐瑰瓨鍌�
+ * @author weidy
+ * @date 2023/7/4
+ */
+public interface LifeCycleNodeMapper extends BaseMapper<LifeCycleNode> {
+}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/IBtmTypeService.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/IBtmTypeService.java
index 0049267..b8a6aff 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/IBtmTypeService.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/IBtmTypeService.java
@@ -250,4 +250,18 @@
* @return 涓氬姟绫诲瀷
*/
BtmTypeVO getAllAttributeByBtmOid(String btmTypeOid);
+
+ /**
+ * 鑾峰彇寮曠敤鏌愪釜鐢熷懡鍛ㄦ湡鐨勪笟鍔$被鍨�
+ * @param lifeOid 鐢熷懡鍛ㄦ湡鐨勪富閿�
+ * @return 涓氬姟绫诲瀷鏄剧ず瀵硅薄
+ */
+ List<BtmTypeVO> selectByLifeId(String lifeId);
+
+ /**
+ * 缁熻寮曠敤鏌愪釜鐢熷懡鍛ㄦ湡鐨勪笟鍔$被鍨�
+ * @param lifeOid 鐢熷懡鍛ㄦ湡鐨勪富閿�
+ * @return 涓暟
+ */
+ Integer countByLifeId(String lifeId);
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/ILifeCycleService.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/ILifeCycleService.java
index fd21582..525cfcd 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/ILifeCycleService.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/ILifeCycleService.java
@@ -7,6 +7,7 @@
import com.vci.ubcs.omd.vo.BtmTypeVO;
import com.vci.ubcs.omd.vo.LifeCycleVO;
import com.vci.ubcs.starter.web.pagemodel.PageHelper;
+import org.springblade.core.mp.support.Query;
import java.util.List;
import java.util.Map;
@@ -21,10 +22,10 @@
/**
* 鑾峰彇鐢熷懡鍛ㄦ湡鍒楄〃
* @param conditionMap 鏌ヨ鏉′欢
- * @param pageHelper 鍒嗛〉
+ * @param query 鍒嗛〉
* @return 鐢熷懡鍛ㄦ湡鐨勬樉绀哄璞�
*/
- IPage<LifeCycleVO> listLife(Map<String, String> conditionMap, PageHelper pageHelper);
+ IPage<LifeCycleVO> listLife(Map<String, Object> conditionMap, Query query);
/**
* 娣诲姞淇濆瓨
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/AttributeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/AttributeServiceImpl.java
index 818798d..f2b24c1 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/AttributeServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/AttributeServiceImpl.java
@@ -134,7 +134,7 @@
if (CollectionUtils.isEmpty(existAttributeVOList)) {
throw new VciBaseException("浣跨敤鐨勫睘鎬ч兘鍦ㄧ郴缁熶腑涓嶅瓨鍦紝璇峰厛鏌ヨ瘉");
} else {
- Set<String> existAttributeOidSet = (existAttributeVOList.stream().collect(Collectors.toMap(s -> s.getId().toLowerCase().trim(), t -> t))).keySet();
+ Set<String> existAttributeOidSet = (existAttributeVOList.stream().collect(Collectors.toMap(s -> s.getId().trim(), t -> t))).keySet();
keyCollections.stream().forEach(s -> {
if (!existAttributeOidSet.contains(s)) {
throw new VciBaseException("浣跨敤鐨勫睘鎬0}鍦ㄧ郴缁熶腑涓嶅瓨鍦紝璇峰厛鏌ヨ瘉", new Object[]{s});
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java
index bdeebe9..22b90ed 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java
@@ -60,7 +60,7 @@
attributesDTOList.stream().forEachOrdered(s -> {
attributeService.checkAttribute(s);
btmTypeAttributeDOList.add(BtmTypeAttributeWrapper.build().copyBtmTypeAttributeDTO2Entity(s,btmTypeOid, creator, now));
- attributeIdList.add(s.getId().toLowerCase().trim());
+ attributeIdList.add(s.getId().trim());
});
//妫�鏌ュ睘鎬ф槸鍚﹂兘瀛樺湪
boolean exists = attributeService.checkAttributeExists(attributeIdList);
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
index f947641..af7f220 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
@@ -4,6 +4,7 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.nacos.api.exception.NacosException;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vci.ubcs.omd.constant.BtmTypeConstant;
@@ -868,4 +869,36 @@
btmType.setAttributes(btmTypeAttributeService.getAllAttribute(btmType));
return btmType;
}
+
+ /**
+ * 鑾峰彇寮曠敤鏌愪釜鐢熷懡鍛ㄦ湡鐨勪笟鍔$被鍨�
+ *
+ * @param lifeId 鐢熷懡鍛ㄦ湡鐨勭紪鍙�
+ * @return 涓氬姟绫诲瀷鏄剧ず瀵硅薄
+ */
+ @Override
+ public List<BtmTypeVO> selectByLifeId(String lifeId) {
+ if(StringUtils.isBlank(lifeId)){
+ return new ArrayList<>();
+ }
+ LambdaQueryWrapper<BtmType> query = new LambdaQueryWrapper<BtmType>();
+ query.eq(BtmType::getLifeCycleId,lifeId);
+ return BtmTypeWrapper.build().listEntityVO(getBaseMapper().selectList(query));
+ }
+
+ /**
+ * 缁熻寮曠敤鏌愪釜鐢熷懡鍛ㄦ湡鐨勪笟鍔$被鍨�
+ *
+ * @param lifeId 鐢熷懡鍛ㄦ湡鐨勭紪鍙�
+ * @return 涓暟
+ */
+ @Override
+ public Integer countByLifeId(String lifeId) {
+ if(StringUtils.isBlank(lifeId)){
+ return 0;
+ }
+ LambdaQueryWrapper<BtmType> query = new LambdaQueryWrapper<BtmType>();
+ query.eq(BtmType::getLifeCycleId,lifeId);
+ return baseMapper.selectCount(query).intValue();
+ }
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LifeCycleServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LifeCycleServiceImpl.java
index 29ad035..62db19e 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LifeCycleServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LifeCycleServiceImpl.java
@@ -1,18 +1,49 @@
package com.vci.ubcs.omd.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.vci.ubcs.omd.constant.BtmTypeConstant;
import com.vci.ubcs.omd.dto.LifeCycleDTO;
+import com.vci.ubcs.omd.dto.LifeCycleEdgeDTO;
+import com.vci.ubcs.omd.dto.LifeCycleLineEventDTO;
+import com.vci.ubcs.omd.dto.LifeCycleNodeDTO;
+import com.vci.ubcs.omd.entity.LifeCycleEdge;
+import com.vci.ubcs.omd.entity.LifeCycleLineEvent;
+import com.vci.ubcs.omd.entity.LifeCycleNode;
import com.vci.ubcs.omd.entity.LifeCycleRule;
+import com.vci.ubcs.omd.mapper.LifeCycleEdgeMapper;
+import com.vci.ubcs.omd.mapper.LifeCycleLineEventMapper;
import com.vci.ubcs.omd.mapper.LifeCycleMapper;
+import com.vci.ubcs.omd.mapper.LifeCycleNodeMapper;
+import com.vci.ubcs.omd.repeater.DomainRepeater;
+import com.vci.ubcs.omd.service.IBtmTypeService;
import com.vci.ubcs.omd.service.ILifeCycleService;
+import com.vci.ubcs.omd.service.IStatusService;
import com.vci.ubcs.omd.vo.BtmTypeVO;
import com.vci.ubcs.omd.vo.LifeCycleVO;
-import com.vci.ubcs.starter.web.pagemodel.PageHelper;
+import com.vci.ubcs.omd.vo.StatusVO;
+import com.vci.ubcs.omd.wrapper.LifeCycleRuleWrapper;
+import com.vci.ubcs.starter.enumpack.NewAppConstantEnum;
+import com.vci.ubcs.starter.exception.VciBaseException;
+import com.vci.ubcs.starter.web.constant.RegExpConstant;
+import com.vci.ubcs.starter.web.util.BeanUtil;
+import com.vci.ubcs.starter.web.util.VciBaseUtil;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
-import java.util.List;
-import java.util.Map;
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.stream.Collectors;
+
/**
* 鐢熷懡鍛ㄦ湡鐨勬湇鍔�
@@ -22,17 +53,49 @@
@Service
public class LifeCycleServiceImpl extends ServiceImpl<LifeCycleMapper, LifeCycleRule> implements ILifeCycleService{
+ /**
+ * 鑺傜偣鐨勬暟鎹眰
+ */
+ @Resource
+ private LifeCycleNodeMapper nodeMapper;
+
+ /**
+ * 杩炴帴绾挎暟鎹眰
+ */
+ @Resource
+ private LifeCycleEdgeMapper edgeMapper;
+
+ /**
+ * 鐘舵��
+ */
+ @Autowired(required = false)
+ @Lazy
+ private IStatusService statusService;
+
+ /**
+ * 杩炴帴绾跨殑浜嬩欢
+ */
+ @Resource
+ private LifeCycleLineEventMapper lineEventMapper;
+
+ /**
+ * 涓氬姟绫诲瀷鐨勬湇鍔�
+ */
+ @Autowired(required = false)
+ @Lazy
+ private IBtmTypeService btmTypeService;
+
/**
* 鑾峰彇鐢熷懡鍛ㄦ湡鍒楄〃
*
* @param conditionMap 鏌ヨ鏉′欢
- * @param pageHelper 鍒嗛〉
+ * @param query 鍒嗛〉
* @return 鐢熷懡鍛ㄦ湡鐨勬樉绀哄璞�
*/
@Override
- public IPage<LifeCycleVO> listLife(Map<String, String> conditionMap, PageHelper pageHelper) {
- return null;
+ public IPage<LifeCycleVO> listLife(Map<String, Object> conditionMap, Query query) {
+ return LifeCycleRuleWrapper.build().pageVO(baseMapper.selectPage(Condition.getPage(query),Condition.getQueryWrapper(conditionMap,LifeCycleRule.class).lambda().orderByAsc(LifeCycleRule::getId)));
}
/**
@@ -42,9 +105,160 @@
* @return 娣诲姞鍚庣殑鏄剧ず瀵硅薄
*/
@Override
+ @Transactional
public LifeCycleVO addSave(LifeCycleDTO lifeCycleDTO) {
- return null;
+ VciBaseUtil.alertNotNull(lifeCycleDTO,"鐢熷懡鍛ㄦ湡淇℃伅",lifeCycleDTO.getId(),"鐢熷懡鍛ㄦ湡鐨勭紪鍙�",lifeCycleDTO.getName(),"鐢熷懡鍛ㄦ湡鍚嶇О",lifeCycleDTO.getNodes(),"鐢熷懡鍛ㄦ湡鐨勮妭鐐�",lifeCycleDTO.getStartStatus(),"璧峰鐘舵��");
+ //鍏堟煡璇㈡槸鍚﹀瓨鍦�
+ QueryWrapper wrapper = new QueryWrapper(LifeCycleRule.class);
+ wrapper.eq("lower(id)",lifeCycleDTO.getId().toLowerCase(Locale.ROOT));
+ if(baseMapper.selectCount(wrapper)>0){
+ throw new VciBaseException("鐢熷懡鍛ㄦ湡鐨勭紪鍙蜂笉鑳介噸澶�");
+ }
+ String lifeOid = addLifeCycle(lifeCycleDTO);
+ return LifeCycleRuleWrapper.build().entityVO(baseMapper.selectById(lifeOid));
}
+
+ /**
+ * 娣诲姞鐢熷懡鍛ㄦ湡
+ * @param lifeCycleDTO
+ * @return 涓婚敭
+ */
+ private String addLifeCycle(LifeCycleDTO lifeCycleDTO){
+ //缂栧彿涓嶈兘鏈夌壒娈婄殑鍐呭
+ if(!lifeCycleDTO.getId().matches(RegExpConstant.LETTER)){
+ throw new VciBaseException("鐢熷懡鍛ㄦ湡鐨勭紪鍙峰彧鑳芥槸瀛楁瘝");
+ }
+ LifeCycleRule life = LifeCycleRuleWrapper.build().copyDTO2DO(lifeCycleDTO);
+ life.setOid(VciBaseUtil.getPk());
+ String creator = AuthUtil.getUserAccount();
+ Date now = new Date();
+ life.setBtmname(BtmTypeConstant.LIFE_CYCLE);
+ life.setOwner(creator);
+ life.setCreator(creator);
+ life.setCreateTime(now);
+ life.setLastModifier(creator);
+ life.setLastModifyTime(now);
+ life.setTs(now);
+
+ List<String> statusList = new ArrayList<>();
+ //澶勭悊鑺傜偣
+ if(!CollectionUtils.isEmpty(lifeCycleDTO.getNodes())){
+ lifeCycleDTO.getNodes().stream().forEach(nodeDTO->{
+ addLifeCycleNode(nodeDTO,life.getOid(),creator,now);
+ statusList.add(nodeDTO.getId());
+ });
+ }
+ if(!statusList.contains(life.getStartStatus())){
+ throw new VciBaseException("璧峰鐘舵�佷笉鍦ㄧ敓鍛藉懆鏈熺殑鐢诲竷涓�");
+ }
+ //鍒ゆ柇鎵�鏈夌殑鑺傜偣鍦ㄧ郴缁熼噷閮藉瓨鍦�
+ List<String> existStatusIdList = statusService.listStatusByIdCollection(statusList).stream().map(StatusVO::getId).collect(Collectors.toList());
+ String unExistStatus = statusList.stream().filter(s -> !existStatusIdList.contains(s)).collect(Collectors.joining(","));
+ if(StringUtils.hasLength(unExistStatus)){
+ throw new VciBaseException(unExistStatus + "杩欎簺鐘舵�佸湪鐘舵�佹睜閲屼笉瀛樺湪锛屼笉鑳芥坊鍔犲埌鐢熷懡鍛ㄦ湡涓�");
+ }
+ //澶勭悊杈圭晫鍜岃繛鎺ョ嚎
+ if(!CollectionUtils.isEmpty(lifeCycleDTO.getEdges())){
+ lifeCycleDTO.getEdges().stream().forEach(edgeDTO->{
+ String edgeOid = addLifeCycleEdge(edgeDTO,statusList,life.getOid(),creator,now);
+ if(!CollectionUtils.isEmpty(edgeDTO.getEvents())){
+ //鏈変簨浠�
+ edgeDTO.getEvents().stream().forEach(eventDTO->{
+ addLifeCycleLineEvent(eventDTO,edgeOid,creator,now);
+ });
+ }
+ });
+ }
+ baseMapper.insert(life);
+ return life.getOid();
+ }
+
+ /**
+ * 娣诲姞鐢熷懡鍛ㄦ湡鐨勮繛鎺ョ嚎涓婄殑浜嬩欢
+ * @param eventDTO
+ * @param edgeOid
+ * @param creator
+ * @param now
+ */
+ private void addLifeCycleLineEvent(LifeCycleLineEventDTO eventDTO,String edgeOid,String creator,Date now){
+ VciBaseUtil.alertNotNull(eventDTO.getBizDomain(),"鎵�灞為鍩�",eventDTO.getEventFullName(),"浜嬩欢鐨勫叏璺緞");
+ NewAppConstantEnum[] values = NewAppConstantEnum.values();
+ Boolean fined = false;
+ for (int i = 0; i < values.length; i++) {
+ NewAppConstantEnum value = values[i];
+ if(value.getName().equalsIgnoreCase(eventDTO.getBizDomain())){
+ fined = true;
+ break;
+ }
+ }
+ if(!fined){
+ throw new VciBaseException(eventDTO.getBizDomain() + "杩欎釜棰嗗煙杩樻病鏈夊紑鏀�,璇疯寮�鍙戜汉鍛樺湪NewAppConstantEnum绫讳腑娣诲姞");
+ }
+ LifeCycleLineEvent event = org.springblade.core.tool.utils.BeanUtil.copy(eventDTO, LifeCycleLineEvent.class);
+ event.setOid(VciBaseUtil.getPk());
+ event.setPkLifeCycleEdge(edgeOid);
+ event.setBtmname(BtmTypeConstant.LIFE_CYCLE_LINE_EVENT);
+ event.setOwner(creator);
+ event.setCreator(creator);
+ event.setCreateTime(now);
+ event.setLastModifier(creator);
+ event.setLastModifyTime(now);
+ event.setTs(now);
+ lineEventMapper.insert(event);
+ }
+
+ /**
+ * 娣诲姞鐢熷懡鍛ㄦ湡鐨勮妭鐐�
+ * @param nodeDTO
+ * @param lifeOid
+ * @param creator
+ * @param now
+ */
+ private void addLifeCycleNode(LifeCycleNodeDTO nodeDTO,String lifeOid,String creator,Date now){
+ VciBaseUtil.alertNotNull(nodeDTO.getId(),"鐘舵�佹爣璇�",nodeDTO.getName(),"鐘舵�佸悕绉�");
+ LifeCycleNode node = org.springblade.core.tool.utils.BeanUtil.copy(nodeDTO, LifeCycleNode.class);
+ node.setOid(VciBaseUtil.getPk());
+ node.setLifeCycleOid(lifeOid);
+ node.setBtmname(BtmTypeConstant.LIFE_CYCLE_NODE);
+ node.setOwner(creator);
+ node.setCreator(creator);
+ node.setCreateTime(now);
+ node.setLastModifier(creator);
+ node.setLastModifyTime(now);
+ node.setTs(now);
+ nodeMapper.insert(node);
+ }
+
+ /**
+ * 娣诲姞鐢熷懡鍛ㄦ湡鐨勮繛鎺ョ嚎
+ * @param edgeDTO
+ * @param statusList
+ * @param lifeOid
+ * @param creator
+ * @param now
+ * @return 杩炴帴绾跨殑涓婚敭
+ */
+ private String addLifeCycleEdge(LifeCycleEdgeDTO edgeDTO,List<String> statusList,String lifeOid,String creator,Date now){
+ VciBaseUtil.alertNotNull(edgeDTO.getSource(),"鏉ユ簮鐘舵��",edgeDTO.getTarget(),"鐩爣鐘舵��",edgeDTO.getName(),"杩炴帴绾垮悕绉�");
+ if(!statusList.contains(edgeDTO.getSource())
+ ||!statusList.contains(edgeDTO.getTarget())){
+ throw new VciBaseException("鏁版嵁閿欒锛孾" + edgeDTO.getName() + "]杩炴帴绾夸笂涓娇鐢ㄧ殑鐘舵�佹病鏈夋壘鍒�");
+ }
+ LifeCycleEdge edge = org.springblade.core.tool.utils.BeanUtil.copy(edgeDTO, LifeCycleEdge.class);
+ edge.setOid(VciBaseUtil.getPk());
+ edge.setLifeCycleOid(lifeOid);
+ edge.setBtmname(BtmTypeConstant.LIFE_CYCLE_EDGE);
+ edge.setOwner(creator);
+ edge.setCreator(creator);
+ edge.setCreateTime(now);
+ edge.setLastModifier(creator);
+ edge.setLastModifyTime(now);
+ edge.setTs(now);
+ edgeMapper.insert(edge);
+ return edge.getOid();
+ }
+
+
/**
* 鎵归噺娣诲姞鍐呭
@@ -53,8 +267,40 @@
* @return 娣诲姞鍚庣殑鏄剧ず瀵硅薄
*/
@Override
+ @Transactional
public List<LifeCycleVO> batchAddSave(List<LifeCycleDTO> lifeCycleDTOs) {
- return null;
+ VciBaseUtil.alertNotNull(lifeCycleDTOs,"鐢熷懡鍛ㄦ湡鐨勪俊鎭�");
+ //鍏堥泦浣撴牎楠屼竴涓�
+ if(lifeCycleDTOs.stream().anyMatch(s->!StringUtils.hasLength(s.getId()) || !StringUtils.hasLength(s.getName())
+ || CollectionUtils.isEmpty(s.getNodes()) || !StringUtils.hasLength(s.getStartStatus()))){
+ throw new VciBaseException("鐢熷懡鍛ㄦ湡鐨勭紪鍙凤紝鍚嶇О锛岃捣濮嬬姸鎬侊紝鍖呭惈鐨勮妭鐐逛笉鑳戒负绌�");
+ }
+ //缁熶竴鏍¢獙閲嶅
+ Map<String, List<LifeCycleDTO>> dtoMap = lifeCycleDTOs.stream().collect(Collectors.groupingBy(LifeCycleDTO::getId));
+ dtoMap.forEach((id,dtos)->{
+ if(dtos.size()>1){
+ throw new VciBaseException("缂栧彿涓恒��" + id + "銆戠殑鐢熷懡鍛ㄦ湡閲嶅");
+ }
+ });
+ VciBaseUtil.switchCollectionForOracleIn(dtoMap.keySet()).stream().forEach(
+ ids->{
+ QueryWrapper wrapper = new QueryWrapper(LifeCycleRule.class);
+ ids.stream().forEach(id->{
+ wrapper.eq("lower(id)",id.toLowerCase(Locale.ROOT));
+ wrapper.or();
+ });
+ wrapper.eq("1","2");
+ if(baseMapper.selectCount(wrapper)>0){
+ throw new VciBaseException("鐢熷懡鍛ㄦ湡鐨勭紪鍙蜂笉鑳介噸澶�");
+ }
+ }
+ );
+ //鍏堝惊鐜鐞嗕笅锛屽洜涓虹幇鍦ㄥ綋鍓嶇敤鎴锋病鏈夊鐞嗕负绾跨▼鍏变韩鐨勶紝鍚庨潰淇敼鍚庯紝鍙互鐢ㄥ苟鍙戞祦鍘诲鐞�
+ List<String> oidList = new ArrayList<>();
+ lifeCycleDTOs.stream().forEach(dto->{
+ oidList.add(addLifeCycle(dto));
+ });
+ return LifeCycleRuleWrapper.build().listEntityVO(listByIds(oidList));
}
/**
@@ -63,10 +309,34 @@
* @param lifeCycleDTO 鏁版嵁浼犺緭瀵硅薄
*/
@Override
+ @Transactional
public void delete(LifeCycleDTO lifeCycleDTO) {
+ VciBaseUtil.alertNotNull(lifeCycleDTO,"鏁版嵁浼犺緭瀵硅薄",lifeCycleDTO.getOid(),"涓婚敭");
+ LifeCycleRule rule = null;
+ try {
+ rule = getById(lifeCycleDTO.getOid());
+ }catch (Throwable e){
+ throw new VciBaseException("浣跨敤涓婚敭鑾峰彇瀵硅薄鍑洪敊锛岃繖涓暟鎹彲鑳戒笉瀛樺湪锛屾垨鑰呮暟鎹噸澶嶄簡");
+ }
+ //妫�鏌ヨ寮曠敤涓嶈兘鍒犻櫎
+ Integer count = btmTypeService.countByLifeId(lifeCycleDTO.getOid());
+ if(count !=null && count>0){
+ throw new VciBaseException("鐢熷懡鍛ㄦ湡琚娇鐢紝涓嶈兘琚垹闄�");
+ }
+ //鎴戜滑鏌ヨ鍏ㄩ儴node鍜宔dge锛岀劧鍚庝竴璧峰垹闄�
}
+
+ private List<LifeCycleNode> selectNodeByLifeOid(String lifeOid){
+ if(!StringUtils.hasLength(lifeOid)){
+ return new ArrayList<>();
+ }
+ LambdaQueryWrapper<LifeCycleNode> query = new LambdaQueryWrapper<LifeCycleNode>();
+ query.eq(LifeCycleNode::getLifeCycleOid,lifeOid);
+ return nodeMapper.selectList(query);
+ }
+
/**
* 鎵归噺鍒犻櫎鐢熷懡鍛ㄦ湡
*
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/AttributeWrapper.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/AttributeWrapper.java
index c5ad867..19d6cb0 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/AttributeWrapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/AttributeWrapper.java
@@ -5,6 +5,7 @@
import com.vci.ubcs.omd.dto.AttributeDTO;
import com.vci.ubcs.omd.entity.Attribute;
import com.vci.ubcs.omd.vo.*;
+import com.vci.ubcs.starter.web.enumpck.BooleanEnum;
import com.vci.ubcs.starter.web.util.VciBaseUtil;
import com.vci.ubcs.system.cache.DictBizCache;
import org.springblade.core.mp.support.BaseEntityWrapper;
@@ -77,6 +78,9 @@
attribute.setLastModifier(currentUser);
attribute.setLastModifyTime(now);
attribute.setTs(now);
+ if (StringUtil.equals(dto.getUsingDict(),BooleanEnum.TRUE.getValue())){
+ attribute.setUsingDict(BooleanEnum.TRUE.getValue());
+ }
return attribute;
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java
index 086aeb0..cb9f96d 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java
@@ -35,6 +35,8 @@
public BtmTypeAttributeVO entityVO(BtmTypeAttribute entity) {
BtmTypeAttributeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, BtmTypeAttributeVO.class));
// 鍦ㄨ繖閲岃缃灇涓炬樉绀哄��
+ vo.setPrecisionLength(vo.getPrecisionLength() == -1 ? null : vo.getPrecisionLength());
+ vo.setScaleLength(vo.getScaleLength() == -1 ? null : vo.getPrecisionLength());
vo.setAttrDataTypeText(EnumCache.getValue("attributeType",vo.getAttrDataType()));
return vo;
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LifeCycleRuleWrapper.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LifeCycleRuleWrapper.java
index 739efa7..4bf2bf2 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LifeCycleRuleWrapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LifeCycleRuleWrapper.java
@@ -1,5 +1,6 @@
package com.vci.ubcs.omd.wrapper;
+import com.vci.ubcs.omd.dto.LifeCycleDTO;
import com.vci.ubcs.omd.entity.LifeCycleRule;
import com.vci.ubcs.omd.vo.LifeCycleVO;
import org.springblade.core.mp.support.BaseEntityWrapper;
@@ -43,4 +44,8 @@
}
+ public LifeCycleRule copyDTO2DO(LifeCycleDTO lifeCycleDTO) {
+ LifeCycleRule LifeCycleRule = BeanUtil.copy(lifeCycleDTO, LifeCycleRule.class);
+ return LifeCycleRule;
+ }
}
--
Gitblit v1.9.3