|
@@ -1,6 +1,7 @@
|
|
|
package com.usky.iot.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.alibaba.nacos.shaded.com.google.gson.JsonObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.usky.common.core.bean.ApiResult;
|
|
@@ -20,6 +21,7 @@ import com.usky.system.RemoteMceService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.time.DayOfWeek;
|
|
@@ -260,20 +262,19 @@ public class PmWorkReportServiceImpl extends AbstractCrudService<PmWorkReportMap
|
|
|
newContent.setTenantId(SecurityUtils.getTenantId());
|
|
|
pmWorkContentMapper.insert(newContent);
|
|
|
//推送消息中心
|
|
|
- String infoContent = SecurityUtils.getLoginUser().getSysUser().getNickName() + "的工作报告";
|
|
|
- String[] strArr = newReport.getCcTo().split(",");
|
|
|
- List<Long> ids = Arrays.stream(strArr)
|
|
|
- .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);
|
|
|
- String jsonStr = jsonObject.toString();
|
|
|
- remoteMceService.addMce(jsonStr);
|
|
|
- System.out.println("Serialized JSON: " + jsonStr);
|
|
|
+ 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);
|
|
|
}
|
|
|
} else {
|
|
|
PmWorkReport rp = new PmWorkReport();
|