修改UAT问题 修改代替标准逻辑
This commit is contained in:
+14
@@ -83,6 +83,20 @@ public class BussDocumentLibraryEO implements Serializable {
|
||||
@ApiModelProperty(value = "对应标准")
|
||||
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)
|
||||
private java.lang.String cut;
|
||||
|
||||
|
||||
+45
@@ -1726,6 +1726,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
String key = entry.getKey();
|
||||
Object value = entry.getValue();
|
||||
if(key.equals("replace_standard_id")){
|
||||
continue;
|
||||
}
|
||||
//es全文新增数据(数据转换)
|
||||
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 insertValue = mustValues + valuesBuilder.toString();
|
||||
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"));
|
||||
if (StringUtils.isNotBlank(replaceStandard)) {
|
||||
@@ -2622,6 +2645,28 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//删除文档库数据
|
||||
bussDocumentLibraryEOMapper.deleteById((String) map.get("id"));
|
||||
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_flag", ModuleTypeFlagEnum.DOCUMENT_LIBRARY.getValue());
|
||||
map.put("create_time", new Date());
|
||||
|
||||
Reference in New Issue
Block a user