|
@@ -262,19 +262,23 @@ public class PmWorkReportServiceImpl extends AbstractCrudService<PmWorkReportMap
|
|
|
newContent.setTenantId(SecurityUtils.getTenantId());
|
|
|
pmWorkContentMapper.insert(newContent);
|
|
|
//推送消息中心
|
|
|
- String nickName = SecurityUtils.getLoginUser().getSysUser().getNickName();
|
|
|
- String infoContent = nickName + "的工作报告";
|
|
|
-// List<Long> ids = Arrays.stream(newReport.getCcTo().split(","))
|
|
|
-// .map(Long::parseLong)
|
|
|
-// .collect(Collectors.toList());
|
|
|
- JsonObject jsonObject = new JsonObject();
|
|
|
- jsonObject.addProperty("infoTitle", "工作报告");
|
|
|
- jsonObject.addProperty("infoContent", infoContent);
|
|
|
- jsonObject.addProperty("infoType", 5);
|
|
|
- jsonObject.addProperty("id", id);
|
|
|
- jsonObject.addProperty("userIds", newReport.getCcTo());
|
|
|
- remoteMceService.addMce(jsonObject.toString());
|
|
|
- System.out.println(jsonObject);
|
|
|
+ try {
|
|
|
+ String nickName = SecurityUtils.getLoginUser().getSysUser().getNickName();
|
|
|
+ String infoContent = nickName + "的工作报告";
|
|
|
+ List<Long> ids = Arrays.stream(newReport.getCcTo().split(","))
|
|
|
+ .map(Long::parseLong)
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ jsonObject.put("infoTitle", "工作报告");
|
|
|
+ jsonObject.put("infoContent", infoContent);
|
|
|
+ jsonObject.put("infoType", 5);
|
|
|
+ jsonObject.put("id", id);
|
|
|
+ jsonObject.put("userIds", ids);
|
|
|
+ remoteMceService.addMce(jsonObject.toString());
|
|
|
+ System.out.println(jsonObject);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
PmWorkReport rp = new PmWorkReport();
|