From 92e7dde00a56aff46e01efe72e1f7ab9b76dcf69 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期三, 05 七月 2023 19:02:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 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-WEB/src/views/modeling/original.vue                                                                     |    6 
 Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue                                                                  |   48 ++++++++---
 Source/UBCS-WEB/src/views/modeling/LinkTypeAdd.vue                                                                  |    2 
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java           |   51 ++++++++----
 Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue                                                       |   56 +++++++------
 Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue                                                               |    1 
 Source/UBCS-WEB/src/views/modeling/Version.vue                                                                      |    3 
 Source/UBCS-WEB/src/components/BatchImport/index.vue                                                                |   28 ++++---
 10 files changed, 129 insertions(+), 74 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/BatchImport/ShowImportData.vue b/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
index f4d3ed5..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,7 +200,11 @@
       type: String,
       default: "",
     },
-    type: String
+    type: String,
+    secDTOList: {
+      type: Array,
+      default: () => ({})
+    }
   },
   computed: {
     dialogVisible: {
@@ -295,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),
@@ -304,7 +309,7 @@
             orderDTO: {
               codeClassifyOid: this.codeClassifyOid,
               templateOid: this.templateOid,
-              secDTOList: [],
+              secDTOList: this.secDTOList,
             },
           },
         ],
@@ -329,6 +334,7 @@
       handler(arr) {
         if (arr.length > 0 && this.type === 'batchImportApply') {
           this.treeNodeClick(arr[0])
+          this.leftWidth = 0
         }
       }
     }
diff --git a/Source/UBCS-WEB/src/components/BatchImport/index.vue b/Source/UBCS-WEB/src/components/BatchImport/index.vue
index b54d048..a1ebae2 100644
--- a/Source/UBCS-WEB/src/components/BatchImport/index.vue
+++ b/Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -76,6 +76,8 @@
       :codeClassifyOid="codeClassifyOid"
       :redisOid="redisOid"
       :type="type"
+      :title="title"
+      :secDTOList="secDTOList"
     ></ShowImportData>
   </el-dialog>
 </template>
@@ -135,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() {
@@ -148,15 +150,16 @@
           classifyAttr: this.classifyAttr,
         };
       } else if (this.type === "batchImportApply") {
-        const secDTOList = this.localSecVOList.map(item => {
-            return {
-              secOid: item.oid,
-              secValue: this.codeApplyForm[item.id]
-            }
-          })
+        // 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: JSON.stringify(secDTOList),
+          secDTOList: JSON.stringify(this.secDTOList),
           ...this.codeApplyForm,
         };
       } else if (this.type === "batchApplyCode") {
@@ -212,6 +215,7 @@
           upParams: "classifyAttr",
         },
       },
+      secDTOList: [],
     };
   },
   methods: {
@@ -252,9 +256,9 @@
     },
     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;
       }
       if (res.data.fileOid) {
         const fileName = res.data.filePath.split("/").pop();
@@ -277,7 +281,7 @@
       }
     },
     onError(err) {
-      console.log(err, 'err');
+      console.log(err, "err");
       this.pageLoading.close();
     },
     uploadChange(file) {
diff --git a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
index 9e622e0..c40df95 100644
--- a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -456,6 +456,7 @@
         this.$message.warning("缂栫爜鐘舵�佷笉鏄�滅紪杈戜腑鈥�,涓嶅彲缂栬緫");
       } else {
         this.editvisible = true;
+        this.rowOid = this.selectRow[0]['oid']
       }
     },
     //楂樼骇鏌ヨ鎸夐挳
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/BusinessAdd.vue b/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
index 7e4f639..38699eb 100644
--- a/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
+++ b/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
@@ -53,16 +53,18 @@
         <avue-crud :option="option"
         :data="btmType.attributes"
         :page.sync="page"
-        ref="attrTable"
-        @cell-mouse-enter="cellEditClick"
-        @cell-mouse-leave="cellEditSave">
+        ref="attrTable">
             <template slot-scope="scope" slot="menuLeft">
                 <el-button type="danger"
                 icon="el-icon-plus"
                 size="small"
                 @click="rowAdd()">灞炴�ч�夋嫨</el-button>
             </template>
-
+          <template slot="menu" slot-scope="{row,index}">
+            <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="cellEditClick(row)">缂栬緫</el-button>
+            <el-button icon="el-icon-delete" size="small" type="text" v-if="!row.$cellEdit" @click="removeFormAttrTable(row,index)">绉婚櫎</el-button>
+            <el-button icon="el-icon-check" size="small" type="text" v-if="row.$cellEdit" @click="cellEditSave(row,index)">淇濆瓨</el-button>
+          </template>
         </avue-crud>
         <div slot="footer" class="dialog-footer">
             <el-button type="primary" @click="submitBtmType">纭畾</el-button>
@@ -83,7 +85,8 @@
             ref="attrRef"
             @on-load="attrRefOnLoad"
             @search-change="attrRefSearch"
-            @selection-change="selectionChange">
+            @selection-change="selectionChange"
+            v-loading="attrRef.loading">
                 <template slot="typeValue" slot-scope="scope" >
                     <el-tag>{{scope.row.typeValue}}</el-tag>
                 </template>
@@ -145,13 +148,16 @@
             showSubmitDialog : false,
             option: {
                 height: "330px",
-                selection: true,
+                selection: false,
                 headerAlign: 'center',
                 border: true,
                 index: true,
                 rowKey: 'id',
                 tabs: true,
-                menu: false,
+                menu: true,
+                editBtn: false,
+                delBtn: false,
+                menuWidth: 150,
                 addBtn:false,
                 highlightCurrentRow: true,
                 column: [
@@ -191,6 +197,7 @@
                     currentPage:1,
                     pageSize:10,
                 },
+                loading: false,
                 key: null,
                 option:{
                     height: 360,
@@ -251,7 +258,7 @@
                     ]
                 },
                 data: [],
-                queryNotIn: null
+                queryNotIn: ''
             },
             revisionRef: {
                 visible: false,
@@ -345,18 +352,22 @@
         closeAttrDialog(){
             this.attrRef.visible = false;
         },
-        // 娣诲姞
-        rowAdd(){
+        // 灞炴�ч�夋嫨娣诲姞
+        async rowAdd() {
+            await this.attrRefOnLoad();
             this.attrRef.visible = true;
-            this.attrRefOnLoad();
         },
         // 灞炴�ф睜鍔犺浇
         attrRefOnLoad(){
+            this.attrRef.loading = true;
             queryPage(this.attrRef.key,this.attrRef.queryNotIn,this.attrRef.page.currentPage, this.attrRef.page.pageSize).then(res => {
                 const data = res.data.data;
                 this.attrRef.page.total = data.total;
                 this.attrRef.data = data.records;
             });
+            setTimeout(() => {
+              this.attrRef.loading = false;
+            },600)
             this.$nextTick(() => {
                 this.$refs.attrRef.refreshTable();
             });
@@ -368,16 +379,23 @@
             done();
             this.attrRef.key = null;
         },
+        // 浠庡睘鎬ф睜涓Щ闄�
+        removeFormAttrTable(row,index){
+          this.btmType.attributes.splice(index,1);
+          this.attrRef.queryNotIn = "";
+          this.btmType.attributes.forEach(item => {
+            this.attrRef.queryNotIn += (item.id + ",")
+          })
+        },
         // 灞炴�ф睜鍕鹃�変簨浠�
         selectionChange(list){
             this.attrRef.selectData = list;
         },
         // 纭灞炴�ф睜鍕鹃��
         confirmSelectAttr(){
-            if(!this.btmType.attributes){
-                this.btmType.attributes = [];
+            if(!this.btmType.attributes) {
+              this.btmType.attributes = [];
             }
-            this.attrRef.queryNotIn = "";
             this.attrRef.selectData.forEach(item => {
                 this.btmType.attributes.push({
                     id: item.id,
@@ -395,6 +413,7 @@
                 });
                 this.attrRef.queryNotIn += (item.id + ",")
             });
+            this.attrRef.data = [];
             this.closeAttrDialog();
         },
         // 鍙栨秷灞炴�ф睜鍕鹃��
@@ -430,6 +449,7 @@
         },
         // 鍒楄〃缂栬緫
         cellEditClick(cell){
+          console.log(cell);
             cell.$cellEdit = true;
         },
         // 鍒楄〃缂栬緫淇濆瓨
diff --git a/Source/UBCS-WEB/src/views/modeling/LinkTypeAdd.vue b/Source/UBCS-WEB/src/views/modeling/LinkTypeAdd.vue
index 4f1ea88..050c526 100644
--- a/Source/UBCS-WEB/src/views/modeling/LinkTypeAdd.vue
+++ b/Source/UBCS-WEB/src/views/modeling/LinkTypeAdd.vue
@@ -315,7 +315,7 @@
                 this.$refs.attrTable.refreshTable();
             })
         },
-        // 
+        //
         viewChange() {
 
         },
diff --git a/Source/UBCS-WEB/src/views/modeling/Version.vue b/Source/UBCS-WEB/src/views/modeling/Version.vue
index 2aaa39c..f1fc3ae 100644
--- a/Source/UBCS-WEB/src/views/modeling/Version.vue
+++ b/Source/UBCS-WEB/src/views/modeling/Version.vue
@@ -75,6 +75,7 @@
           {
             label:'鑻辨枃鍚嶇О',
             prop: 'id',
+            editDisabled: true,
             rules: [
               {
                 required: true,
@@ -211,7 +212,7 @@
         this.data = data.records;
       });
       if (done) {
-       done(); 
+       done();
       }
     },
     refreshChange() {
diff --git a/Source/UBCS-WEB/src/views/modeling/original.vue b/Source/UBCS-WEB/src/views/modeling/original.vue
index 6588c67..73f81c0 100644
--- a/Source/UBCS-WEB/src/views/modeling/original.vue
+++ b/Source/UBCS-WEB/src/views/modeling/original.vue
@@ -17,7 +17,7 @@
             </el-button>
             <el-button size="small" plain type="primary" icon="el-icon-zoom-in" @click="applyRangeOpen">鏌ョ湅浣跨敤鑼冨洿
             </el-button>
-            <el-input placeholder="鎸夊睘鎬ц嫳鏂囧悕绉版煡璇�" v-model="searchId" clearable prefix-icon="el-icon-search" class="attrSearch"
+            <el-input placeholder="鎸夊睘鎬х紪鍙锋煡璇�" v-model="searchId" clearable prefix-icon="el-icon-search" class="attrSearch"
               size="small" @change="doSearch" type="text"></el-input>
             <el-button size="small" plain type="primary" icon="el-icon-search" @click="doSearch">&nbsp;鎼滅储</el-button>
           </template>
@@ -279,14 +279,14 @@
       this.$refs.originalAdd.activeName = this.itemForm.activeName;
       this.$refs.originalAdd.enumInitFlag = this.itemForm.enumInitFlag;
       this.$refs.originalAdd.referInitFlag = this.itemForm.referInitFlag;
-      this.refreshChange()
+      // this.refreshChange()
     },
     deleteSave(row,index) {
       console.log(row);
       remove(row.oid).then(res => {
         this.$message.success("鍒犻櫎鎴愬姛");
+        this.refreshChange();
       });
-      this.refreshChange();
     },
     onLoad(page, params = {}) {
       this.loading = true;
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);

--
Gitblit v1.9.3