修改UAT问题 修改代替标准逻辑
This commit is contained in:
+14
@@ -83,6 +83,20 @@ public class BussDocumentLibraryEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "对应标准")
|
@ApiModelProperty(value = "对应标准")
|
||||||
private java.lang.String correspondingStandard;
|
private java.lang.String correspondingStandard;
|
||||||
|
|
||||||
|
|
||||||
|
/**代替标准*/
|
||||||
|
@ApiModelProperty(value = "代替标准")
|
||||||
|
@Dict(dicCode ="replace_standard")
|
||||||
|
private java.lang.String replaceStandard;
|
||||||
|
|
||||||
|
|
||||||
|
/**被代替标准*/
|
||||||
|
@ApiModelProperty(value = "被代替标准")
|
||||||
|
@Dict(dicCode ="replaced_standard")
|
||||||
|
private java.lang.String replacedStandard;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private java.lang.String cut;
|
private java.lang.String cut;
|
||||||
|
|
||||||
|
|||||||
+45
@@ -1726,6 +1726,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
|
|
||||||
String key = entry.getKey();
|
String key = entry.getKey();
|
||||||
Object value = entry.getValue();
|
Object value = entry.getValue();
|
||||||
|
if(key.equals("replace_standard_id")){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
//es全文新增数据(数据转换)
|
//es全文新增数据(数据转换)
|
||||||
esFullText(cut, fieldList, categoryList, dictItemList, mapList, sbCn,sbEn, entry);
|
esFullText(cut, fieldList, categoryList, dictItemList, mapList, sbCn,sbEn, entry);
|
||||||
|
|
||||||
@@ -1929,6 +1932,26 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
String insertField = mustFields + fieldsBuilder.toString();
|
String insertField = mustFields + fieldsBuilder.toString();
|
||||||
String insertValue = mustValues + valuesBuilder.toString();
|
String insertValue = mustValues + valuesBuilder.toString();
|
||||||
bussDocumentLibraryEOMapper.insertInfo(insertField, insertValue);
|
bussDocumentLibraryEOMapper.insertInfo(insertField, insertValue);
|
||||||
|
//处理代替标准和被代替标准逻辑
|
||||||
|
Object repObj = map.get("replace_standard_id");
|
||||||
|
if(null != repObj) {
|
||||||
|
String[] replace_standard_list = repObj.toString().split(",");
|
||||||
|
for (String rs : replace_standard_list) {
|
||||||
|
BussDocumentLibraryEO bl = bussDocumentLibraryEOMapper.selectById(rs);
|
||||||
|
if (null != bl) {
|
||||||
|
String repStr = bl.getReplacedStandard();
|
||||||
|
if (StringUtils.isNotBlank(repStr)) {
|
||||||
|
if (!repStr.contains(idTemp)) {
|
||||||
|
repStr = repStr + "," + idTemp;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
repStr = idTemp;
|
||||||
|
}
|
||||||
|
bl.setReplacedStandard(repStr);
|
||||||
|
bussDocumentLibraryEOMapper.updateById(bl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String replaceStandard = StringUtils.valueOf(map.get("replace_standard"));
|
String replaceStandard = StringUtils.valueOf(map.get("replace_standard"));
|
||||||
if (StringUtils.isNotBlank(replaceStandard)) {
|
if (StringUtils.isNotBlank(replaceStandard)) {
|
||||||
@@ -2622,6 +2645,28 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
//删除文档库数据
|
//删除文档库数据
|
||||||
bussDocumentLibraryEOMapper.deleteById((String) map.get("id"));
|
bussDocumentLibraryEOMapper.deleteById((String) map.get("id"));
|
||||||
bussDocumentLibraryEOMapper.insertInfo(insertField, insertValue);
|
bussDocumentLibraryEOMapper.insertInfo(insertField, insertValue);
|
||||||
|
//处理代替标准和被代替标准逻辑
|
||||||
|
String docId = (String) map.get("id");
|
||||||
|
Object repObj = map.get("replace_standard_id");
|
||||||
|
if(null != repObj){
|
||||||
|
String[] replace_standard_list = repObj.toString().split(",");
|
||||||
|
for (String rs : replace_standard_list) {
|
||||||
|
BussDocumentLibraryEO bl = bussDocumentLibraryEOMapper.selectById(rs);
|
||||||
|
if (null != bl) {
|
||||||
|
String repStr = bl.getReplacedStandard();
|
||||||
|
if (StringUtils.isNotBlank(repStr)) {
|
||||||
|
if (!repStr.contains(docId)) {
|
||||||
|
repStr = repStr + "," + docId;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
repStr = docId;
|
||||||
|
}
|
||||||
|
bl.setReplacedStandard(repStr);
|
||||||
|
bussDocumentLibraryEOMapper.updateById(bl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//开始更新ES
|
||||||
map.put("module_type", "文档库");
|
map.put("module_type", "文档库");
|
||||||
map.put("module_type_flag", ModuleTypeFlagEnum.DOCUMENT_LIBRARY.getValue());
|
map.put("module_type_flag", ModuleTypeFlagEnum.DOCUMENT_LIBRARY.getValue());
|
||||||
map.put("create_time", new Date());
|
map.put("create_time", new Date());
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
|
selectedRowList: [],
|
||||||
content: [],
|
content: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
@@ -149,16 +150,17 @@
|
|||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
let content = []
|
let serial_number = []
|
||||||
// let replace_standard_id = []
|
let replace_standard_id = []
|
||||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
let content = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
// let content = JSON.parse(JSON.stringify(this.selectedRowList))
|
||||||
// this.content.forEach(res => {
|
this.selectedRowList.forEach(res => {
|
||||||
// content.push(res.serial_number)
|
serial_number.push(res.serial_number)
|
||||||
// replace_standard_id.push(res.id)
|
replace_standard_id.push(res.id)
|
||||||
// })
|
})
|
||||||
this.$emit('input', content.join(','))
|
this.$emit('input', serial_number.join(','))
|
||||||
// this.$emit('change', this.query.db_field_name, replace_standard_id.join(','))
|
console.log(replace_standard_id)
|
||||||
|
this.$emit('change', this.query.db_field_name, replace_standard_id.join(','))
|
||||||
// this.$emit('changecontent', this.content)
|
// this.$emit('changecontent', this.content)
|
||||||
this.visible = false
|
this.visible = false
|
||||||
} else {
|
} else {
|
||||||
@@ -168,9 +170,11 @@
|
|||||||
indexclick(event) {
|
indexclick(event) {
|
||||||
this.$emit('input', event.target.value)
|
this.$emit('input', event.target.value)
|
||||||
},
|
},
|
||||||
onSelectChange(value) {
|
onSelectChange(value,row) {
|
||||||
console.log(value)
|
console.log(value)
|
||||||
|
console.log(row)
|
||||||
this.selectedRowKeys = value
|
this.selectedRowKeys = value
|
||||||
|
this.selectedRowList = row
|
||||||
// this.content = []
|
// this.content = []
|
||||||
// value.forEach(val => {
|
// value.forEach(val => {
|
||||||
// this.dataList.forEach((res) => {
|
// this.dataList.forEach((res) => {
|
||||||
|
|||||||
@@ -169,6 +169,7 @@
|
|||||||
<Standardselection :query="item"
|
<Standardselection :query="item"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:standard="formInline"
|
:standard="formInline"
|
||||||
|
@change="StandardselectionChange"
|
||||||
v-model="formInline[item.db_field_name]"/>
|
v-model="formInline[item.db_field_name]"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -494,10 +495,11 @@
|
|||||||
this.type = 'add'
|
this.type = 'add'
|
||||||
this.getForm()
|
this.getForm()
|
||||||
},
|
},
|
||||||
// StandardselectionChange(value, id) {
|
StandardselectionChange(value, id) {
|
||||||
// this.formInline[value + '_id'] = id
|
console.log(id)
|
||||||
// this.formInline = { ...this.formInline }
|
this.formInline[value + '_id'] = id
|
||||||
// },
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
PersonnelSelectionChange(value, id) {
|
PersonnelSelectionChange(value, id) {
|
||||||
this.formInline[value + '_id'] = id
|
this.formInline[value + '_id'] = id
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = { ...this.formInline }
|
||||||
|
|||||||
Reference in New Issue
Block a user