首页--文档动态(编辑时,状态和适用车型--英文)
This commit is contained in:
+52
-14
@@ -2079,8 +2079,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<BussDocumentLibraryEO> list = this.list();
|
||||
List<String> serialNumberList = list.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
|
||||
String serialNumber = (String)map.get("serial_number");
|
||||
String category = (String)map.get("lei4_bie2");
|
||||
String id = (String) map.get("id");
|
||||
String title = (String) map.get("title");
|
||||
String titleEn = (String) map.get("title_en");
|
||||
//通过id查询数据
|
||||
List<Map<String, Object>> dataList = bussDocumentLibraryEOMapper.selectMapsAll(id);
|
||||
if(dataList.size() != 0){
|
||||
@@ -2094,7 +2096,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//普通数据字典
|
||||
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
|
||||
//编辑时处理首页文档动态 1. 标准XXXX的状态改为 2. 标准XXXX的适用车型改为 3. 标准XXXX删除了XXXX文件 4. 标准XXXX上传了XXXX文件
|
||||
homeDocumentDynamic(cut,map, serialNumber, id, title, dataList, fieldList,dictItemList);
|
||||
homeDocumentDynamic(cut,map, serialNumber, id, title, dataList, fieldList,dictItemList,category,titleEn);
|
||||
|
||||
|
||||
try {
|
||||
@@ -2401,7 +2403,20 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String id, String title,
|
||||
List<Map<String, Object>> dataList,
|
||||
List<OnlCgformField> fieldList,
|
||||
List<SysDictItem> dictItemList) {
|
||||
List<SysDictItem> dictItemList,
|
||||
String category,
|
||||
String titleEn) {
|
||||
if(StringUtils.isNotBlank(category)){
|
||||
String finalCategory = category;
|
||||
List<SysDictItem> stateDictItemList = dictItemList.stream()
|
||||
.filter(e -> "type".equals(e.getDictCode()) && finalCategory.equals(e.getItemValue()))
|
||||
.collect(Collectors.toList());
|
||||
if(stateDictItemList.size() != 0){
|
||||
category = stateDictItemList.get(0).getEnName();
|
||||
}
|
||||
}else{
|
||||
category = "";
|
||||
}
|
||||
//文件类型字段
|
||||
List<OnlCgformField> onlCgformFieldList = fieldList.stream()
|
||||
.filter(e -> FieldTypeEnum.FILE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||
@@ -2411,10 +2426,17 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//编辑时处理首页文档动态 1. 标准XXXX的状态改为 2. 标准XXXX的适用车型改为 3. 标准XXXX删除了XXXX文件 4. 标准XXXX上传了XXXX文件
|
||||
String href = "<a href='/docManage/library/detail?id=" + id +
|
||||
"&title=" + title +
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>,";
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>" + " " + titleEn;
|
||||
|
||||
StringBuilder msgContentSb = new StringBuilder();
|
||||
StringBuilder msgContentInfoSb = new StringBuilder();
|
||||
//适用车型
|
||||
StringBuilder msgContentSbCarType = new StringBuilder("Applicable Models of the " + category + " " + serialNumber + " " + titleEn);
|
||||
StringBuilder msgContentInfoSbCarType = new StringBuilder("Applicable Models of the " + category + " " + href);
|
||||
//状态
|
||||
StringBuilder msgContentSbStatus = new StringBuilder("The Status of the " + category + " " + serialNumber + " " + titleEn);
|
||||
StringBuilder msgContentInfoSbStatus = new StringBuilder("The Status of the " + category + " " + href);
|
||||
|
||||
StringBuilder msgContentSb = new StringBuilder("标准" + serialNumber);
|
||||
StringBuilder msgContentInfoSb = new StringBuilder("标准" + href);
|
||||
|
||||
List<String> fileIdLIstTemp = new ArrayList<>();
|
||||
for (Map.Entry<String, Object> entry : dataList.get(0).entrySet()) {
|
||||
@@ -2477,14 +2499,21 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
.filter(e -> "state".equals(e.getDictCode()) && finalValue.equals(e.getItemValue()))
|
||||
.collect(Collectors.toList());
|
||||
if(stateDictItemList.size() != 0){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
value = stateDictItemList.get(0).getItemText();
|
||||
}else{
|
||||
value = stateDictItemList.get(0).getEnName();
|
||||
}
|
||||
value = stateDictItemList.get(0).getEnName();
|
||||
}
|
||||
msgContentSb.append("状态改为" + value + ",");
|
||||
msgContentInfoSb.append("状态改为" + value + ",");
|
||||
//
|
||||
if(StringUtils.isBlank(value)){
|
||||
msgContentSbStatus.append(" has been modified to be empty ,");
|
||||
msgContentInfoSbStatus.append(" has been modified to be empty ,");
|
||||
msgContentSb.append(msgContentSbStatus);
|
||||
msgContentInfoSb.append(msgContentInfoSbStatus);
|
||||
}else{
|
||||
msgContentSbStatus.append(" has been modified to " + value + ",");
|
||||
msgContentInfoSbStatus.append(" has been modified to " + value + ",");
|
||||
msgContentSb.append(msgContentSbStatus);
|
||||
msgContentInfoSb.append(msgContentInfoSbStatus);
|
||||
}
|
||||
|
||||
}
|
||||
//适用车型 car_type
|
||||
if("shi4_yong4_che1_xing2".equals(key) && !value.equals((String)dataList.get(0).get("shi4_yong4_che1_xing2"))){
|
||||
@@ -2509,9 +2538,18 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
value = substring;
|
||||
}
|
||||
if(StringUtils.isBlank(value)){
|
||||
msgContentSbCarType.append(" has been modified to be empty ,");
|
||||
msgContentInfoSbCarType.append(" has been modified to be empty ,");
|
||||
msgContentSb.append(msgContentSbCarType);
|
||||
msgContentInfoSb.append(msgContentInfoSbCarType);
|
||||
}else{
|
||||
msgContentSbCarType.append(" has been modified to " + value + ",");
|
||||
msgContentInfoSbCarType.append(" has been modified to " + value + ",");
|
||||
msgContentSb.append(msgContentSbCarType);
|
||||
msgContentInfoSb.append(msgContentInfoSbCarType);
|
||||
}
|
||||
|
||||
msgContentSb.append("适用车型改为" + value + ",");
|
||||
msgContentInfoSb.append("适用车型改为" + value + ",");
|
||||
}
|
||||
}
|
||||
if(upFileList.size() != 0){
|
||||
|
||||
Reference in New Issue
Block a user