Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+1
-1
@@ -2586,7 +2586,7 @@ public class FileSpiltService {
|
||||
String path = splitUrl+"/jero-boot/sys/split/file/getImage?fileUrl="+filepathandname;
|
||||
CosBootUtil.uploadByte(bytev, filepathandname);
|
||||
String imgCon = path;
|
||||
String imgConVal = "<img class=\"wordImg\" src=\"" + path + "\">";
|
||||
String imgConVal = "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\"" + path + "\">";
|
||||
message.getItemsCondi().add(imgConVal);
|
||||
message.setItermsConditions(message.getItermsConditions() + imgConVal);
|
||||
itemsValList.add(getSplitItemsValObject(message.getId(), SplitFilePragraTypeEnum.IMG.getValue(), imgCon, message.getItemsCondi().size(), null));
|
||||
|
||||
+33
-5
@@ -158,7 +158,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
} else if ("IMG".equals(valEO.getType())) {
|
||||
String imgUrl = valEO.getItemContent();
|
||||
valEO.setItemContent(imgUrl);
|
||||
valContent = "<img class=\"wordImg\" src=\""+ valEO.getItemContent() +"\">";
|
||||
valContent = "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\""+ valEO.getItemContent() +"\">";
|
||||
// valContent = valEO.getItemContent();
|
||||
} else if ("TABLE".equals(valEO.getType())) {
|
||||
valContent = valEO.getItemContent();
|
||||
@@ -233,7 +233,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
} else if ("IMG".equals(valEO.getType())) {
|
||||
String imgUrl = valEO.getItemContent();
|
||||
valEO.setItemContent(imgUrl);
|
||||
valContent = "<img class=\"wordImg\" src=\"" + valEO.getItemContent() + "\">";
|
||||
valContent = "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\"" + valEO.getItemContent() + "\">";
|
||||
// valContent = valEO.getItemContent();
|
||||
} else if ("TABLE".equals(valEO.getType())) {
|
||||
valContent = valEO.getItemContent();
|
||||
@@ -1693,7 +1693,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
return mFile;
|
||||
}
|
||||
|
||||
private List<Map<String, Object>> read(File file, List<String> dbfieldList, String[] titles, String cut) throws IOException, InvalidFormatException {
|
||||
private List<Map<String, Object>> read(File file, List<String> dbfieldList, String[] titles, String cut) throws Exception {
|
||||
|
||||
//最终返回数据
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
@@ -1744,10 +1744,38 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
}
|
||||
}
|
||||
}
|
||||
Row rowDescription= sheet.getRow(1);
|
||||
if (rowDescription != null) {
|
||||
Cell cell = rowDescription.getCell(0);
|
||||
if(ObjectUtil.isNotNull(cell)){
|
||||
//设置单元格类型
|
||||
cell.setCellType(CellType.STRING);
|
||||
String cellValue = cell.getStringCellValue();
|
||||
if(!cellValue.contains("填写说明")){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
} else {
|
||||
throw new JeroBootException("Please import the correct template");
|
||||
}
|
||||
}
|
||||
} else{
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
} else {
|
||||
throw new JeroBootException("Please import the correct template");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
} else {
|
||||
throw new JeroBootException("Please import the correct template");
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, Object> map = null;
|
||||
//获得所有数据
|
||||
//从第x行开始获取
|
||||
//从第3行开始获取,第一行是表头,第二行是填写说明
|
||||
for (int x = 2; x <= totalRowNum; x++) {
|
||||
map = new HashMap<String, Object>();
|
||||
//获得第i行对象
|
||||
@@ -2461,7 +2489,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
if ("TEXT".equals(valEO.getType())) {
|
||||
valContent += "<p>" + valEO.getItemContent() + "</p>";
|
||||
} else if ("IMG".equals(valEO.getType())) {
|
||||
valContent += "<img class=\"wordImg\" src=\""+ valEO.getItemContent() +"\">";
|
||||
valContent += "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\""+ valEO.getItemContent() +"\">";
|
||||
// valContent += valEO.getItemContent();
|
||||
} else if ("TABLE".equals(valEO.getType())) {
|
||||
valContent += valEO.getItemContent();
|
||||
|
||||
+2
-2
@@ -64,8 +64,8 @@ public class LawsWarnController {
|
||||
@ApiOperation(value = "推送")
|
||||
@GetMapping(value = "/warnPullMessage")
|
||||
// @RequiresPermissions("document:pullMessage")
|
||||
public Result<?> pullMessage(String departIds,String userIds,String documentIds) {
|
||||
lawsWarnService.warnPullMessage(departIds,userIds,documentIds);
|
||||
public Result<?> pullMessage(String departIds,String userIds,String documentIds,String flag) {
|
||||
lawsWarnService.warnPullMessage(departIds,userIds,documentIds,flag);
|
||||
return Result.OK("推送成功");
|
||||
}
|
||||
}
|
||||
|
||||
+129
-6
@@ -338,7 +338,7 @@ public class LawsWarnService {
|
||||
}
|
||||
|
||||
|
||||
public String warnPullMessage(String departIds, String userIds, String documentIds) {
|
||||
public String warnPullMessage(String departIds, String userIds, String documentIds,String flag) {
|
||||
Set<String> allDepartIds = new HashSet<>();
|
||||
//查询当前部门下所有部门
|
||||
if (StringUtils.isNotEmpty(departIds)) {
|
||||
@@ -379,6 +379,25 @@ public class LawsWarnService {
|
||||
List<String> urlList = new ArrayList<>();
|
||||
List<String> hrefList = new ArrayList<>();
|
||||
for (Map<String, Object> map : mapList) {
|
||||
//1-->新车型实施日期, 2-->在产车实施日期
|
||||
String timeContent = "";
|
||||
if("1".equals(flag)){
|
||||
String value = StringUtils.valueOf(map.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"));
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
if(value.contains(" ")){
|
||||
value = value.split(" ")[0];
|
||||
}
|
||||
timeContent =" to you as the implementation date of the new model is " +value;
|
||||
}
|
||||
}else if("2".equals(flag)){
|
||||
String value = StringUtils.valueOf(map.get("implement_time"));
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
if(value.contains(" ")){
|
||||
value = value.split(" ")[0];
|
||||
}
|
||||
timeContent =" to you as the implementation date of vehicle production is " +value;
|
||||
}
|
||||
}
|
||||
serialNumberList.add(StringUtils.valueOf(map.get("serial_number")));
|
||||
String url = backUrl + "/docManage/library/detail?id=" + map.get("id") +
|
||||
"&title=" + map.get("title") +
|
||||
@@ -388,13 +407,16 @@ public class LawsWarnService {
|
||||
"&title=" + map.get("title") +
|
||||
"&serial_number=" + map.get("serial_number") + "'" + " target='_blank'>" + map.get("serial_number") + "</a>";
|
||||
urlList.add(url);
|
||||
hrefList.add(href);
|
||||
hrefList.add(href+timeContent);
|
||||
}
|
||||
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String content = sysUser.getUsername() + " pushed " + StringUtils.join(serialNumberList, ",") + " to you. Please be reminded to check it out.";
|
||||
String contentInfo = sysUser.getUsername() + " pushed " + StringUtils.join(hrefList, ",") + " to you. Please be reminded to check it out.";
|
||||
String content = StringUtils.join(serialNumberList, ",") + " has been shared with you, please check.";
|
||||
//消息详情模板
|
||||
// XXX has pushed GB 7258 to you as the implementation date of vehicle production is XXXX-XX-XX,
|
||||
// GB 7258 to you as the implementation date of vehicle production is XXXX-XX-XX, Please be reminded to check it out.
|
||||
String contentInfo = sysUser.getUsername() + " has pushed " + StringUtils.join(hrefList, ",") + ", Please be reminded to check it out.";
|
||||
String title = content;
|
||||
|
||||
//封装消息的实体类
|
||||
@@ -409,10 +431,28 @@ public class LawsWarnService {
|
||||
mapList.stream().forEach(e->{
|
||||
if(s.contains((String)e.get("id"))){
|
||||
String serialNumber = StringUtils.valueOf(e.get("serial_number"));
|
||||
list.add(serialNumber);
|
||||
String timeContent = "";
|
||||
if("1".equals(flag)){
|
||||
String value = StringUtils.valueOf(e.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"));
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
if(value.contains(" ")){
|
||||
value = value.split(" ")[0];
|
||||
}
|
||||
timeContent =" to you as the implementation date of the new model is " +value;
|
||||
}
|
||||
}else if("2".equals(flag)){
|
||||
String value = StringUtils.valueOf(e.get("implement_time"));
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
if(value.contains(" ")){
|
||||
value = value.split(" ")[0];
|
||||
}
|
||||
timeContent =" to you as the implementation date of vehicle production is " +value;
|
||||
}
|
||||
}
|
||||
list.add(serialNumber + timeContent);
|
||||
}
|
||||
});
|
||||
String contentTemp = sysUser.getUsername() + " pushed " + StringUtils.join(list, ",") + " to you. Please be reminded to check it out.";
|
||||
String contentTemp = sysUser.getUsername() + " has pushed " + StringUtils.join(list, ",") + ", Please be reminded to check it out.";
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
@@ -421,4 +461,87 @@ public class LawsWarnService {
|
||||
bussDocumentLibraryEOService.sendWebsocket(documentIds, contentInfo);
|
||||
return "推送成功";
|
||||
}
|
||||
// public String warnPullMessage(String departIds, String userIds, String documentIds,String flag) {
|
||||
// Set<String> allDepartIds = new HashSet<>();
|
||||
// //查询当前部门下所有部门
|
||||
// if (StringUtils.isNotEmpty(departIds)) {
|
||||
// String[] departIdArr = departIds.split(",");
|
||||
// for (String departId : departIdArr) {
|
||||
// List<String> subDepIdsByDepId = sysDepartService.getSubDepIdsByDepId(departId);
|
||||
// allDepartIds.addAll(subDepIdsByDepId);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// List<String> userIdList = new ArrayList<>();
|
||||
// List<String> thirdIdList = new ArrayList<>();
|
||||
// if (StringUtils.isNotBlank(departIds)) {
|
||||
// //查询部门下的人员
|
||||
// List<SysUser> userList = new ArrayList<>();
|
||||
// if(allDepartIds.size() != 0){
|
||||
// userList = sysUserService.getUserListByDepIds(new ArrayList<>(allDepartIds));
|
||||
// }
|
||||
//
|
||||
// if (userList.size() != 0) {
|
||||
// userIdList = userList.stream().map(SysUser::getId).distinct().collect(Collectors.toList());
|
||||
// thirdIdList = userList.stream().map(SysUser::getThirdId).distinct().collect(Collectors.toList());
|
||||
// }
|
||||
// }
|
||||
// if(userIdList.size() == 0 && StringUtils.isNotBlank(userIds)){
|
||||
// List<SysUser> sysUsers = sysUserService.listByIds(Arrays.asList(userIds.split(",")));
|
||||
// if(sysUsers.size() != 0){
|
||||
// List<String> userId = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
// List<String> thirdId = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
// userIdList.addAll(userId);
|
||||
// thirdIdList.addAll(thirdId);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //查询文档
|
||||
// List<Map<String, Object>> mapList = bussDocumentLibraryEOMapper.selectMapsAll(documentIds);
|
||||
// List<String> serialNumberList = new ArrayList<>();
|
||||
// List<String> urlList = new ArrayList<>();
|
||||
// List<String> hrefList = new ArrayList<>();
|
||||
// for (Map<String, Object> map : mapList) {
|
||||
// serialNumberList.add(StringUtils.valueOf(map.get("serial_number")));
|
||||
// String url = backUrl + "/docManage/library/detail?id=" + map.get("id") +
|
||||
// "&title=" + map.get("title") +
|
||||
// "&serial_number=" + map.get("serial_number");
|
||||
//
|
||||
// String href = "<a href='/docManage/library/detail?id=" + map.get("id") +
|
||||
// "&title=" + map.get("title") +
|
||||
// "&serial_number=" + map.get("serial_number") + "'" + " target='_blank'>" + map.get("serial_number") + "</a>";
|
||||
// urlList.add(url);
|
||||
// hrefList.add(href);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// String content = sysUser.getUsername() + " pushed " + StringUtils.join(serialNumberList, ",") + " to you. Please be reminded to check it out.";
|
||||
// String contentInfo = sysUser.getUsername() + " pushed " + StringUtils.join(hrefList, ",") + " to you. Please be reminded to check it out.";
|
||||
// String title = content;
|
||||
//
|
||||
// //封装消息的实体类
|
||||
// SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.PUSH.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
// sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
// bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||
// //飞书
|
||||
// try {
|
||||
// for (String s : urlList) {
|
||||
// String encode = UriEncoder.encode(s);
|
||||
// List<String> list = new ArrayList<>();
|
||||
// mapList.stream().forEach(e->{
|
||||
// if(s.contains((String)e.get("id"))){
|
||||
// String serialNumber = StringUtils.valueOf(e.get("serial_number"));
|
||||
// list.add(serialNumber);
|
||||
// }
|
||||
// });
|
||||
// String contentTemp = sysUser.getUsername() + " pushed " + StringUtils.join(list, ",") + " to you. Please be reminded to check it out.";
|
||||
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
|
||||
// }
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// bussDocumentLibraryEOService.sendWebsocket(documentIds, contentInfo);
|
||||
// return "推送成功";
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user