Browse Source

temp

master
yinzuomei 4 years ago
parent
commit
eda94b5b02
  1. 6
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/DingDingRobotConstant.java
  2. 27
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/DingTextBriefNessFormDTO.java
  3. 31
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  4. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java
  5. 14
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java
  6. 30
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java
  7. 64
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java
  8. 26
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportNeighborHoodInfoListener.java
  9. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java

6
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; package com.epmet.commons.tools.constant;
public interface DingDingRobotConstant { public interface DingDingRobotConstant {
/**
* 尹作梅测试用
*/
String YZM_TEST_URL="https://oapi.dingtalk.com/robot/send?access_token=249c5f49006cf14b37f9c3bc502ede34c16926a5ac5a0deeb9c9b4be735c0daf"; String YZM_TEST_URL="https://oapi.dingtalk.com/robot/send?access_token=249c5f49006cf14b37f9c3bc502ede34c16926a5ac5a0deeb9c9b4be735c0daf";
String YZM_TEST_SECRET="SECa03f447d67c62d924b5ae52dd9a7ddd9147d32c1d43f8cb43449f505444bdc6b"; 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_URL="https://oapi.dingtalk.com/robot/send?access_token=75e9ab857536f3018baa09009646876edbd263d07521a1a22eedfc3852623614";
String V3_ROBOT_SECRET="SECdc8d3fb6780faa919f38fd43783f76d111255036c3b5bdcbc086dff023ee84d5"; String V3_ROBOT_SECRET="SECdc8d3fb6780faa919f38fd43783f76d111255036c3b5bdcbc086dff023ee84d5";

27
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;
}

31
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.DingDingRobotConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant; 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.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.ExceptionUtils;
@ -765,33 +766,23 @@ public class GovOrgServiceImpl implements GovOrgService {
String secret = DingDingRobotConstant.YZM_TEST_SECRET; String secret = DingDingRobotConstant.YZM_TEST_SECRET;
String url = DingDingRobotConstant.YZM_TEST_URL; String url = DingDingRobotConstant.YZM_TEST_URL;
OapiRobotSendRequest request = new OapiRobotSendRequest(); DingTextBriefNessFormDTO dingTalkTextMsg=new DingTextBriefNessFormDTO();
//MarkDown方式发送 dingTalkTextMsg.setMsgtype("text");
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);
//小雷哥手机号:18660295251 //小雷哥手机号:18660295251
OapiRobotSendRequest.At at = new OapiRobotSendRequest.At(); OapiRobotSendRequest.At at = new OapiRobotSendRequest.At();
at.setAtMobiles(Arrays.asList("15764229697")); at.setAtMobiles(Arrays.asList("18660295251","15764229697"));
at.setIsAtAll(true); at.setIsAtAll(false);
request.setAt(at); dingTalkTextMsg.setAt(at);
/*//文本方式发送 //文本方式发送
request.setMsgtype("text");
OapiRobotSendRequest.Text text = new OapiRobotSendRequest.Text(); OapiRobotSendRequest.Text text = new OapiRobotSendRequest.Text();
text.setContent("网格活跃度统计: \n" + text.setContent("网格活跃度统计: \n" +
"起止时间: " + formDTO.getStartTime().concat(StrConstant.UNDER_LINE).concat(formDTO.getEndTime()) + "\n" + "起止时间: " + formDTO.getStartTime().concat(StrConstant.UNDER_LINE).concat(formDTO.getEndTime()) + "\n" +
"文件下载地址: " + uploadResult.getData().getUrl() + "\n\n"); "文件下载地址: " + uploadResult.getData().getUrl() + "\n"+
request.setText(text);*/ "请查收@18660295251@15764229697");
dingTalkTextMsg.setText(text);
HttpClientManager.getInstance().sendDingMsg(JSON.toJSONString(dingTalkTextMsg), url, secret);
log.info("发送钉钉消息入参:"+JSON.toJSONString(request,true));
HttpClientManager.getInstance().sendDingMsg(JSON.toJSONString(request), url, secret);
} }
} }

2
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; private String principalPhone;
@Excel(name = "创建时间", needMerge = true) @Excel(name = "创建时间", needMerge = true)
private Date organizationCreatedTime; private String organizationCreatedTime;
@ExcelCollection(name = "组织成员") @ExcelCollection(name = "组织成员")
private List<ImportCommunitySelfOrganizationSon> persons; private List<ImportCommunitySelfOrganizationSon> persons;

14
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 javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
@ -433,7 +435,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
e.setOrgType(IcCommunitySelfOrganizationConstant.ORG_TYPE_AGENCY); e.setOrgType(IcCommunitySelfOrganizationConstant.ORG_TYPE_AGENCY);
e.setPid(agencyInfo.getPid()); e.setPid(agencyInfo.getPid());
e.setPids(agencyInfo.getPids()); e.setPids(agencyInfo.getPids());
e.setOrganizationCreatedTime(l.getOrganizationCreatedTime()); // e.setOrganizationCreatedTime(l.getOrganizationCreatedTime());
baseDao.insert(e); baseDao.insert(e);
if (CollectionUtils.isNotEmpty(l.getPersons())){ if (CollectionUtils.isNotEmpty(l.getPersons())){
l.getPersons().forEach(p -> { l.getPersons().forEach(p -> {
@ -540,7 +542,12 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
e.setOrgType(IcCommunitySelfOrganizationConstant.ORG_TYPE_AGENCY); e.setOrgType(IcCommunitySelfOrganizationConstant.ORG_TYPE_AGENCY);
e.setPid(agencyInfo.getPid()); e.setPid(agencyInfo.getPid());
e.setPids(agencyInfo.getPids()); e.setPids(agencyInfo.getPids());
e.setOrganizationCreatedTime(l.getOrganizationCreatedTime()); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
try {
e.setOrganizationCreatedTime(sdf.parse(l.getOrganizationCreatedTime()));
} catch (ParseException ex) {
ex.printStackTrace();
}
baseDao.insert(e); baseDao.insert(e);
if (CollectionUtils.isNotEmpty(l.getPersons())){ if (CollectionUtils.isNotEmpty(l.getPersons())){
l.getPersons().forEach(p -> { l.getPersons().forEach(p -> {
@ -579,6 +586,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
String url = erroeImport(fileList); String url = erroeImport(fileList);
upImportTask(url, taskId, tokenDto.getUserId(), true); upImportTask(url, taskId, tokenDto.getUserId(), true);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
log.error("【社会自组织信息导入】程序错误"); log.error("【社会自组织信息导入】程序错误");
upImportTask(null, taskId, tokenDto.getUserId(), false); upImportTask(null, taskId, tokenDto.getUserId(), false);
} }
@ -643,7 +651,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
importTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS); importTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS);
} else { } else {
importTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL); importTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL);
importTaskForm.setResultDesc("社会自组织导入存在错误"); importTaskForm.setResultDesc("社会自组织导入存在程序错误");
} }
Result result = commonServiceOpenFeignClient.finishImportTask(importTaskForm); Result result = commonServiceOpenFeignClient.finishImportTask(importTaskForm);
if (!result.success()) { if (!result.success()) {

30
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java

@ -80,6 +80,36 @@ public class ImportBuildingInfoListener extends AnalysisEventListener<BuildingIn
ImportGeneralDTO dto = ConvertUtils.sourceToTarget(data, ImportGeneralDTO.class); ImportGeneralDTO dto = ConvertUtils.sourceToTarget(data, ImportGeneralDTO.class);
dto.setNum(num); dto.setNum(num);
dto.setCustomerId(formDTO.getCustomerId()); dto.setCustomerId(formDTO.getCustomerId());
if(StringUtils.isBlank(data.getAgencyName())){
nums.add(num);
disposeErrorMsg(info, "所属组织的值未填写");
return;
}
if(StringUtils.isBlank(data.getGridName())){
nums.add(num);
disposeErrorMsg(info, "所属网格的值未填写");
return;
}
if(StringUtils.isBlank(data.getNeighborHoodName())){
nums.add(num);
disposeErrorMsg(info,"小区名称的值未填写");
return;
}
if(StringUtils.isBlank(data.getBuildingName())){
nums.add(num);
disposeErrorMsg(info,"楼栋名称的值未填写");
return;
}
if(StringUtils.isBlank(data.getType())){
nums.add(num);
disposeErrorMsg(info,"楼栋类型的值未填写");
return;
}
if(null == data.getTotalUnitNum()){
nums.add(num);
disposeErrorMsg(info,"单元数的值未填写");
return;
}
// 应产品要求添加 // 应产品要求添加
if (StringUtils.isNotBlank(dto.getType()) && (!dto.getType().equals("商品房") && !dto.getType().equals("自建房")) && !dto.getType().equals("别墅")){ if (StringUtils.isNotBlank(dto.getType()) && (!dto.getType().equals("商品房") && !dto.getType().equals("自建房")) && !dto.getType().equals("别墅")){
nums.add(num); nums.add(num);

64
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java

@ -90,6 +90,66 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode
ImportGeneralDTO dto = ConvertUtils.sourceToTarget(data, ImportGeneralDTO.class); ImportGeneralDTO dto = ConvertUtils.sourceToTarget(data, ImportGeneralDTO.class);
dto.setNum(num); dto.setNum(num);
dto.setCustomerId(formDTO.getCustomerId()); dto.setCustomerId(formDTO.getCustomerId());
if(StringUtils.isBlank(data.getAgencyName())){
nums.add(num);
disposeErrorMsg(info, "所属组织的值未填写");
return;
}
if(StringUtils.isBlank(data.getGridName())){
nums.add(num);
disposeErrorMsg(info, "所属网格的值未填写");
return;
}
if(StringUtils.isBlank(data.getNeighborHoodName())){
nums.add(num);
disposeErrorMsg(info,"所属小区的值未填写");
return;
}
if(StringUtils.isBlank(data.getBuildingName())){
nums.add(num);
disposeErrorMsg(info,"所属楼栋的值未填写");
return;
}
if(StringUtils.isBlank(data.getHouseType())){
nums.add(num);
disposeErrorMsg(info, "房屋类型的值未填写");
return;
}
if(StringUtils.isBlank(data.getPurpose())){
nums.add(num);
disposeErrorMsg(info, "房屋用途的值未填写");
return;
}
if(StringUtils.isBlank(data.getRentFlagString())){
nums.add(num);
disposeErrorMsg(info, "是否出租的值未填写");
return;
}
if(StringUtils.isBlank(data.getOwnerIdCard())){
nums.add(num);
disposeErrorMsg(info, "房主身份证的值未填写");
return;
}
if(StringUtils.isBlank(data.getOwnerName())){
nums.add(num);
disposeErrorMsg(info, "房主姓名的值未填写");
return;
}
if(StringUtils.isBlank(data.getOwnerPhone())){
nums.add(num);
disposeErrorMsg(info, "房主电话的值未填写");
return;
}
if(StringUtils.isBlank(data.getDoorName())){
nums.add(num);
disposeErrorMsg(info, "门牌号的值未填写");
return;
}
if(null == data.getBuildingUnit()){
nums.add(num);
disposeErrorMsg(info, "单元号的值未填写");
return;
}
// 应产品要求 // 应产品要求
if (StringUtils.isNotBlank(dto.getHouseType()) ){ if (StringUtils.isNotBlank(dto.getHouseType()) ){
if( !"楼房".equals(dto.getHouseType()) && !dto.getHouseType().equals("平房") && !dto.getHouseType().equals("别墅") ){ if( !"楼房".equals(dto.getHouseType()) && !dto.getHouseType().equals("平房") && !dto.getHouseType().equals("别墅") ){
@ -455,7 +515,9 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode
List<String> list = icBuildingDao.selectHouseTotalIsNull(formDTO.getCustomerId()); List<String> list = icBuildingDao.selectHouseTotalIsNull(formDTO.getCustomerId());
if (!CollectionUtils.isEmpty(list)){ if (!CollectionUtils.isEmpty(list)){
List<UpdateBuildingHouseNumResultDTO> houseNum = icBuildingDao.selectHouseNum(list); List<UpdateBuildingHouseNumResultDTO> houseNum = icBuildingDao.selectHouseNum(list);
icBuildingDao.allUpdateHouseNum(houseNum); if (!CollectionUtils.isEmpty(houseNum)){
icBuildingDao.allUpdateHouseNum(houseNum);
}
} }
// 删除缓存 // 删除缓存
icHouseRedis.delTemporaryCacheGrids(formDTO.getCustomerId(), formDTO.getUserId()); icHouseRedis.delTemporaryCacheGrids(formDTO.getCustomerId(), formDTO.getUserId());

26
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportNeighborHoodInfoListener.java

@ -83,6 +83,32 @@ public class ImportNeighborHoodInfoListener extends AnalysisEventListener<Neighb
} }
info = data; info = data;
num = num + NumConstant.ONE; num = num + NumConstant.ONE;
if (StringUtils.isBlank(data.getNeighborHoodName()) ||
StringUtils.isBlank(data.getGridName()) || StringUtils.isBlank(data.getAgencyName()) || StringUtils.isBlank(data.getAddress())){
nums.add(num);
disposeErrorMsg(info,ImportErrorMsgConstants.NEIGHBOR_HOOD_ERROR);
return;
}
if(StringUtils.isBlank(data.getAgencyName())){
nums.add(num);
disposeErrorMsg(info, "所属组织的值未填写");
return;
}
if(StringUtils.isBlank(data.getGridName())){
nums.add(num);
disposeErrorMsg(info, "所属网格的值未填写");
return;
}
if(StringUtils.isBlank(data.getNeighborHoodName())){
nums.add(num);
disposeErrorMsg(info,"小区名称的值未填写");
return;
}
if(StringUtils.isBlank(data.getNeighborHoodName())){
nums.add(num);
disposeErrorMsg(info,"详细地址的值未填写");
return;
}
ImportGeneralDTO dto = ConvertUtils.sourceToTarget(data, ImportGeneralDTO.class); ImportGeneralDTO dto = ConvertUtils.sourceToTarget(data, ImportGeneralDTO.class);
dto.setNum(num); dto.setNum(num);
dto.setCustomerId(formDTO.getCustomerId()); dto.setCustomerId(formDTO.getCustomerId());

2
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java

@ -433,7 +433,7 @@ public class IcPartymemberStyleServiceImpl extends BaseServiceImpl<IcPartymember
importTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS); importTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS);
} else { } else {
importTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL); importTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL);
importTaskForm.setResultDesc("党员风采导入存在错误"); importTaskForm.setResultDesc("党员风采导入存在程序错误");
} }
Result result = commonServiceOpenFeignClient.finishImportTask(importTaskForm); Result result = commonServiceOpenFeignClient.finishImportTask(importTaskForm);
if (!result.success()) { if (!result.success()) {

Loading…
Cancel
Save