From 82315f19da6eeee9f0994834e337ac7f1b6a1d0e Mon Sep 17 00:00:00 2001
From: lihang <lihang@vci-tech.com>
Date: 星期三, 05 七月 2023 18:39:49 +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/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/components/BatchImport/index.vue | 28 ++++---
Source/UBCS-WEB/src/components/Tree/attrCrud.vue | 89 +++++++++++++++-------
7 files changed, 150 insertions(+), 83 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/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/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