From 87e51a66bbad8eb287755c9ffa91e78345919f8b Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期三, 05 七月 2023 18:15:40 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs

---
 Source/BladeX-Tool/blade-core-tool/src/main/java/org/springblade/core/tool/jackson/BladeBeanSerializerModifier.java |    2 
 Source/UBCS-WEB/src/components/template/Stage.vue                                                                   |    6 +
 Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/constant/BtmTypeConstant.java              |   10 ++
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java           |   51 ++++++++----
 Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/BaseQueryObject.java    |    7 +
 Source/UBCS-WEB/src/views/modeling/originalAdd.vue                                                                  |   18 ++--
 Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LifeCycleServiceImpl.java             |   15 +++
 Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java                           |    3 
 Source/UBCS-WEB/src/components/Tree/attrCrud.vue                                                                    |   89 +++++++++++++++-------
 9 files changed, 145 insertions(+), 56 deletions(-)

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/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index 9848275..cdf2b52 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -1,36 +1,38 @@
 <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-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">棰勮鎺掑簭</el-button>
+      <el-button size="small" icon="el-icon-arrow-down">棰勮鎺掑簭</el-button>
+      </el-button-group>
+      <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>
+      <el-button size="small"@click="syncHandle" icon="el-icon-share">鍚屾鍒板叾浠栨ā鏉�</el-button>
+      </el-button-group>
       <!--    缂栫爜鐢宠棰勮-->
       <el-button size="small" @click="applicationHandle" style="">缂栫爜鐢宠棰勮</el-button>
       <!--        楠岃瘉瑙勫垯-->
@@ -92,7 +94,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>
@@ -224,7 +226,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,6 +234,7 @@
               style="width: 100%"
               @cell-click="handleCellClicks"
               @select="selectHandle"
+              @selection-change="selectionChange"
               v-if="this.crudArrayFlag"
     >
       <el-table-column
@@ -243,7 +246,7 @@
                        :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"
       >
@@ -901,11 +904,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: "榛樿鍊�",
@@ -925,11 +944,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
+              }
+            }
           },
         ]
       },
@@ -959,7 +992,7 @@
           label: '鎺掑簭鍙�',
           sortable: true,
           edit: 'number',
-          width: 60,
+          width: 70,
           fixed: true
         }, {
             label: "灞炴�ц嫳鏂囩紪鍙�",
@@ -1016,14 +1049,14 @@
           {
             label: "楂樼骇鏌ヨ灞炴��",
             prop: "seniorQueryAttrFlag",
-            width: 95,
+            width: 110,
             cell: false,
             edit: "switch"
           },
           {
             label: "鐩镐技鏌ラ噸灞炴��",
             prop: "sameRepeatAttrFlag",
-            width: 95,
+            width: 110,
             cell: false,
             edit: "switch"
           },
@@ -1285,7 +1318,6 @@
         this.$message.warning('璇烽�夋嫨灞炴�ч泦');
         return false;
       }
-debugger;
       let ordernum = this.ProData.length;
       this.busineSelectList.forEach((citem) => {
         let isCopy = false;
@@ -1320,8 +1352,6 @@
           this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList)))
         }
       })
-
-
       this.addVisible = false;
 
     },
@@ -1407,7 +1437,7 @@
     },
     //鏋氫妇娉ㄥ叆鍒犻櫎
     enumDeleteRow(row) {
-      this.tableData.splice(row, 1)
+      this.tableData.splice(row.$index, 1)
     },
     //鏋氫妇娉ㄥ叆鎸夐挳
     enmuVisHandle() {
@@ -1507,7 +1537,10 @@
     },
     //琛ㄦ牸鍒犻櫎
     CrudRemove() {
-      this.ProData.splice(this.attrRow.$index, 1)
+      this.attrSelectList.forEach((item)=>{
+        this.ProData.splice(item.$index, 1)
+      })
+
     },
     //琛ㄦ牸閲嶇疆
     reset() {
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/views/modeling/originalAdd.vue b/Source/UBCS-WEB/src/views/modeling/originalAdd.vue
index f73ccfa..35dccbd 100644
--- a/Source/UBCS-WEB/src/views/modeling/originalAdd.vue
+++ b/Source/UBCS-WEB/src/views/modeling/originalAdd.vue
@@ -297,17 +297,17 @@
         submitAttribute() {
             const that = this;
             if (that.referInitFlag && that.referEditFlag){
-                this.$delete(this.attribute,'dictCode');
-                this.$delete(this.attribute,'dictKey');
-                this.$delete(this.attribute,'dictValue');
-                this.$delete(this.attribute,'usingDict');
+                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.$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.$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) {
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 db221da..3f5a5a3 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<>();
 
@@ -3579,7 +3595,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-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 b94fd52..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
@@ -171,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));
 	}
@@ -182,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));
 	}
@@ -193,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/service/impl/LifeCycleServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LifeCycleServiceImpl.java
index f731a5d..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
@@ -309,6 +309,7 @@
 	 * @param lifeCycleDTO 鏁版嵁浼犺緭瀵硅薄
 	 */
 	@Override
+	@Transactional
 	public void delete(LifeCycleDTO lifeCycleDTO) {
 		VciBaseUtil.alertNotNull(lifeCycleDTO,"鏁版嵁浼犺緭瀵硅薄",lifeCycleDTO.getOid(),"涓婚敭");
 		LifeCycleRule rule = null;
@@ -320,8 +321,20 @@
 		//妫�鏌ヨ寮曠敤涓嶈兘鍒犻櫎
 		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);
 	}
 
 	/**

--
Gitblit v1.9.3