diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/DingDingRobotConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/DingDingRobotConstant.java index e4c3bd0467..08c5708cf6 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/DingDingRobotConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/DingDingRobotConstant.java @@ -1,10 +1,14 @@ package com.epmet.commons.tools.constant; public interface DingDingRobotConstant { + /** + * 尹作梅测试用 + */ String YZM_TEST_URL="https://oapi.dingtalk.com/robot/send?access_token=249c5f49006cf14b37f9c3bc502ede34c16926a5ac5a0deeb9c9b4be735c0daf"; String YZM_TEST_SECRET="SECa03f447d67c62d924b5ae52dd9a7ddd9147d32c1d43f8cb43449f505444bdc6b"; + /** - * EPMET V3 产品研发 + * EPMET V3 产品研发群 */ String V3_ROBOT_URL="https://oapi.dingtalk.com/robot/send?access_token=75e9ab857536f3018baa09009646876edbd263d07521a1a22eedfc3852623614"; String V3_ROBOT_SECRET="SECdc8d3fb6780faa919f38fd43783f76d111255036c3b5bdcbc086dff023ee84d5"; diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/DingTextBriefNessFormDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/DingTextBriefNessFormDTO.java new file mode 100644 index 0000000000..f6e324497e --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/DingTextBriefNessFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.commons.tools.dto.form; + +import com.dingtalk.api.request.OapiRobotSendRequest; +import lombok.Data; + +/** + * 钉钉机器人发送文本通知,@手机号,简参 + */ +@Data +public class DingTextBriefNessFormDTO { + + /* { + "msgtype":"text", + "text":{ + "content":"我就是我, @15764229697 是不同的烟火" + }, + "at":{ + "atMobiles": [ + "15764229697" + ], + "isAtAll":false + } + }*/ + private String msgtype; + private OapiRobotSendRequest.Text text; + private OapiRobotSendRequest.At at; +} diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java index bb8756f80c..c460665cf5 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java @@ -11,6 +11,7 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.DingDingRobotConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.dto.form.DingTextBriefNessFormDTO; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.ExceptionUtils; @@ -765,33 +766,23 @@ public class GovOrgServiceImpl implements GovOrgService { String secret = DingDingRobotConstant.YZM_TEST_SECRET; String url = DingDingRobotConstant.YZM_TEST_URL; - OapiRobotSendRequest request = new OapiRobotSendRequest(); - //MarkDown方式发送 - request.setMsgtype("markdown"); - OapiRobotSendRequest.Markdown markdown = new OapiRobotSendRequest.Markdown(); - markdown.setTitle("网格活跃度统计"); - markdown.setText("网格活跃度统计: \n" + - "> 起止时间: " + formDTO.getStartTime().concat(StrConstant.UNDER_LINE).concat(formDTO.getEndTime()) + "\n\n" + - "> 文件下载地址: " + uploadResult.getData().getUrl() + "\n\n"); - request.setMarkdown(markdown); + DingTextBriefNessFormDTO dingTalkTextMsg=new DingTextBriefNessFormDTO(); + dingTalkTextMsg.setMsgtype("text"); //小雷哥手机号:18660295251 OapiRobotSendRequest.At at = new OapiRobotSendRequest.At(); - at.setAtMobiles(Arrays.asList("15764229697")); - at.setIsAtAll(true); - request.setAt(at); + at.setAtMobiles(Arrays.asList("18660295251","15764229697")); + at.setIsAtAll(false); + dingTalkTextMsg.setAt(at); - /*//文本方式发送 - request.setMsgtype("text"); + //文本方式发送 OapiRobotSendRequest.Text text = new OapiRobotSendRequest.Text(); text.setContent("网格活跃度统计: \n" + "起止时间: " + formDTO.getStartTime().concat(StrConstant.UNDER_LINE).concat(formDTO.getEndTime()) + "\n" + - "文件下载地址: " + uploadResult.getData().getUrl() + "\n\n"); - request.setText(text);*/ - - - log.info("发送钉钉消息入参:"+JSON.toJSONString(request,true)); - HttpClientManager.getInstance().sendDingMsg(JSON.toJSONString(request), url, secret); + "文件下载地址: " + uploadResult.getData().getUrl() + "\n"+ + "请查收@18660295251@15764229697"); + dingTalkTextMsg.setText(text); + HttpClientManager.getInstance().sendDingMsg(JSON.toJSONString(dingTalkTextMsg), url, secret); } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java index e6b04d8938..a6c6102431 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java @@ -38,7 +38,7 @@ public class ImportCommunitySelfOrganization extends ExcelVerifyInfo { private String principalPhone; @Excel(name = "创建时间", needMerge = true) - private Date organizationCreatedTime; + private String organizationCreatedTime; @ExcelCollection(name = "组织成员") private List persons; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 86f713e74d..9eb2f52a90 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -67,6 +67,8 @@ import org.springframework.web.multipart.commons.CommonsMultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; @@ -433,7 +435,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl { @@ -540,7 +542,12 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl { @@ -579,6 +586,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl list = icBuildingDao.selectHouseTotalIsNull(formDTO.getCustomerId()); if (!CollectionUtils.isEmpty(list)){ List houseNum = icBuildingDao.selectHouseNum(list); - icBuildingDao.allUpdateHouseNum(houseNum); + if (!CollectionUtils.isEmpty(houseNum)){ + icBuildingDao.allUpdateHouseNum(houseNum); + } } // 删除缓存 icHouseRedis.delTemporaryCacheGrids(formDTO.getCustomerId(), formDTO.getUserId()); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportNeighborHoodInfoListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportNeighborHoodInfoListener.java index 72c4f30bb6..4e85a407c1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportNeighborHoodInfoListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportNeighborHoodInfoListener.java @@ -83,6 +83,32 @@ public class ImportNeighborHoodInfoListener extends AnalysisEventListener