文档库推送消息修改
This commit is contained in:
+44
-42
@@ -13,11 +13,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.WebsocketConst;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.IsMustEnum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.ModuleEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.common.constant.enums.*;
|
||||
import com.jero.common.es.JeroElasticsearchTemplate;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryRuleEnum;
|
||||
@@ -50,11 +46,7 @@ import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
||||
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
|
||||
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysCategoryTreeVO;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.entity.*;
|
||||
import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.ISysAnnouncementService;
|
||||
import com.jero.modules.system.service.ISysDepartService;
|
||||
@@ -68,20 +60,8 @@ import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.CellStyle;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.VerticalAlignment;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.usermodel.WorkbookFactory;
|
||||
import org.apache.poi.hssf.usermodel.*;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
@@ -97,26 +77,11 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.*;
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@@ -2021,6 +1986,41 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<String> userIdList = domainUserRelService.queryDomainUserRelInfo(mapTemp);
|
||||
String title = (String) map.get("title");
|
||||
String serialNumber = (String) map.get("serial_number");
|
||||
|
||||
Set<String> technologyTerritorySet = new HashSet<>();
|
||||
String technologyTerritoryId = map.get("technology_territory").toString();
|
||||
//技术领域
|
||||
if(StringUtils.isNotEmpty(technologyTerritoryId)){
|
||||
List<String> technologyTerritoryIdList = Arrays.asList(technologyTerritoryId.split(","));
|
||||
technologyTerritorySet.addAll(technologyTerritoryIdList);
|
||||
}
|
||||
|
||||
//树形结构数据字典(技术领域)
|
||||
List<SysCategory> categoryList = new ArrayList<>();
|
||||
if (technologyTerritorySet.size() != 0) {
|
||||
LambdaQueryWrapper<SysCategory> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(SysCategory::getId, technologyTerritorySet);
|
||||
categoryList = sysCategoryService.list(wrapper);
|
||||
}
|
||||
//技术领域
|
||||
String technologyTerritoryName = null;
|
||||
if (categoryList.size() != 0 && StringUtils.isNotBlank(technologyTerritoryId)) {
|
||||
List<String> technologyTerritoryList = Arrays.asList(technologyTerritoryId.split(","));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String technologyTerritory : technologyTerritoryList) {
|
||||
List<SysCategory> collect = categoryList.stream().filter(e -> technologyTerritory.equals(e.getId())).collect(Collectors.toList());
|
||||
if (collect.size() != 0) {
|
||||
sb.append(collect.get(0).getName() + ",");
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(sb)) {
|
||||
technologyTerritoryName = sb.substring(0, sb.length() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
String href = "<a href='/docManage/library/detail?id=" + idTemp +
|
||||
"&title=" + title +
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>";
|
||||
@@ -2043,7 +2043,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
String hrefTemp = backUrl + "/docManage/library/detail?id=" + idTemp;
|
||||
String content = sysUser.getUsername() + " add " + serialNumber + ",Please pay attention to check.";
|
||||
String contentInfo = sysUser.getUsername() + " add " + href + ",Please pay attention to check.";
|
||||
//In the XXXX technical field you subscribed to, the standard "GBXXX" has been updated.
|
||||
String contentInfo = "In the "+ technologyTerritoryName + "technical field you subscribed to, the standard "+ serialNumber +" has been updated.";
|
||||
// String contentInfo = sysUser.getUsername() + " add " + serialNumber + ",Please pay attention to check.";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, content, contentInfo);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
|
||||
Reference in New Issue
Block a user