diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml index 3f434e01da..69713f1908 100644 --- a/epmet-auth/pom.xml +++ b/epmet-auth/pom.xml @@ -187,6 +187,12 @@ 651f02d71ed3f123dfb584b8bf0f4d8b + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -225,6 +231,12 @@ 651f02d71ed3f123dfb584b8bf0f4d8b + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -258,6 +270,12 @@ wx3d1372029eb816a3 651f02d71ed3f123dfb584b8bf0f4d8b + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -295,6 +313,12 @@ wx3d1372029eb816a3 651f02d71ed3f123dfb584b8bf0f4d8b + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-auth/src/main/java/com/epmet/redis/CustomerAppWxServiceUtil.java b/epmet-auth/src/main/java/com/epmet/redis/CustomerAppWxServiceUtil.java index ddd5d69769..c7ef8cf380 100644 --- a/epmet-auth/src/main/java/com/epmet/redis/CustomerAppWxServiceUtil.java +++ b/epmet-auth/src/main/java/com/epmet/redis/CustomerAppWxServiceUtil.java @@ -26,7 +26,6 @@ import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.SetOperations; -import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; import java.util.List; @@ -39,7 +38,8 @@ import java.util.Set; * @author Mark sunlightcs@gmail.com * @since 1.0.0 */ -@Component +//@Component 2020-11-17目前小程序升级都是从 公众号升级 所有这种方式 暂时用不到了 +@Deprecated public class CustomerAppWxServiceUtil implements ApplicationRunner { private static Logger logger = LogManager.getLogger(CustomerAppWxServiceUtil.class); diff --git a/epmet-auth/src/main/resources/bootstrap.yml b/epmet-auth/src/main/resources/bootstrap.yml index 2306d2da5b..d8526d89e6 100644 --- a/epmet-auth/src/main/resources/bootstrap.yml +++ b/epmet-auth/src/main/resources/bootstrap.yml @@ -113,7 +113,7 @@ wx: # secret: @oper.wx.ma.secret@ # token: #微信小程序消息服务器配置的token # aesKey: #微信小程序消息服务器配置的EncodingAESKey -# msgDataFormat: JSON + # msgDataFormat: JSON appId: # 党群e事通-居民端小程序配置appId resi: @resi.wx.ma.appId@ @@ -121,3 +121,8 @@ wx: gov: @gov.wx.ma.appId@ # 党群e事通-运营端小程序配置的appId #oper: @oper.wx.ma.appId@ + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ diff --git a/epmet-auth/src/main/resources/logback-spring.xml b/epmet-auth/src/main/resources/logback-spring.xml index af12b174e0..734c4114a1 100644 --- a/epmet-auth/src/main/resources/logback-spring.xml +++ b/epmet-auth/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java index 156794af7b..15da7173b4 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java @@ -84,6 +84,10 @@ public enum RequirePermissionEnum { WORK_GRASSROOTS_ISSUE_SHIFT_PROJECT("work_grassroots_issue_shift_project", "基层治理:议题管理:转项目","转项目(选择处理部门api也需要添加此校验)"), WORK_GRASSROOTS_ISSUE_CLOSE("work_grassroots_issue_close","基层治理:议题管理:关闭议题","关闭议题"), + WORK_GRASSROOTS_ISSUE_AUDITING_LIST("work_grassroots_issue_auditing_list","基层治理:议题管理:待审核","待审核议题申请列表查询"), + WORK_GRASSROOTS_ISSUE_REJECTED_LIST("work_grassroots_issue_rejected_list","基层治理:议题管理:已驳回","已驳回议题申请列表"), + WORK_GRASSROOTS_ISSUE_AUDIT("work_grassroots_issue_audit","基层治理:议题管理:议题审核","审核(通过或驳回)议题"), + /** * 徽章 */ diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 00615c2f35..7b1d8d53cb 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -87,7 +87,7 @@ public enum EpmetErrorCode { TEXT_SCAN_FAILED(8503,"内容审核失败,请重新编辑"), IMG_SCAN_FAILED(8504,"图片审核失败,请重新上传"), PROJECT_IS_CLOSED(8601,"项目已结案"), - + VOTE_ISSUE_PLEASE(8602,"请先选择支持或反对,再发表您的想法"), // 爱心互助 居民端 NOT_IN_THE_SIGN_IN_RANGE(8510, "您还未进入指定的签到范围~"), // 活动报名失败,弹窗:志愿者认证 @@ -117,6 +117,7 @@ public enum EpmetErrorCode { OPER_EXT_APP_SECRET_RESET_FAIL(8714, "秘钥更新失败"), OPER_UPLOAD_IMG_TYPE_ERROR(8715, "请上传PNG格式的图片"), OPER_UPLOAD_IMG_SIZE_ERROR(8716, "请上传200*200的图片"), + USER_LIST_ROLES_BY_KEY_FAIL(8715, "根据角色key查询角色列表失败"), // 党建声音 前端提示 88段 DRAFT_CONTENT_IS_NULL(8801, "至少需要添加一个段落"), diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java index d69f319d7b..8b5a691891 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java @@ -43,7 +43,6 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateException; @@ -60,8 +59,14 @@ import java.util.Set; */ @Slf4j public class HttpClientManager { - private static int connectionTimeout = 3000;// 连接超时时间,毫秒 - private static int soTimeout = 10000;// 读取数据超时时间,毫秒 + // 连接超时时间,毫秒 + private static int connectionTimeout = 5000; + // 读取数据超时时间,毫秒 + private static int soTimeout = 20000; + private static String HEADER_CONTENT_TYPE = "Content-Type"; + private static String HEADER_APPLICATION_JSON = "application/json;charset=utf-8"; + private static String UTF8 = "utf-8"; + private static String HEADER_APPLICATION_FORM_URL_ENCODED = "application/x-www-form-urlencoded;charset=utf-8"; /** * HttpClient对象 */ @@ -116,13 +121,14 @@ public class HttpClientManager { try { HttpPost httppost = new HttpPost(url); httppost.setConfig(requestConfig); - httppost.addHeader("Content-Type", "application/x-www-form-urlencoded charset=utf-8"); + + httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_FORM_URL_ENCODED); List list = new ArrayList(); for (String key : paramsMap.keySet()) { list.add(new BasicNameValuePair(key, String.valueOf(paramsMap.get(key)))); } - UrlEncodedFormEntity urlEncodedFormEntity = new UrlEncodedFormEntity(list, "utf-8"); + UrlEncodedFormEntity urlEncodedFormEntity = new UrlEncodedFormEntity(list, UTF8); httppost.setEntity(urlEncodedFormEntity); return execute(httppost, false); @@ -146,9 +152,9 @@ public class HttpClientManager { try { HttpPost httppost = new HttpPost(url); httppost.setConfig(requestConfig); - httppost.addHeader("Content-Type", "application/json; charset=utf-8"); + httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_JSON); if (StringUtils.isNotEmpty(jsonStrParam)) { - StringEntity se = new StringEntity(jsonStrParam, "utf-8"); + StringEntity se = new StringEntity(jsonStrParam, UTF8); httppost.setEntity(se); } return execute(httppost, false); @@ -164,14 +170,14 @@ public class HttpClientManager { try { HttpPost httppost = new HttpPost(url); httppost.setConfig(requestConfig); - httppost.addHeader("Content-Type", "application/json; charset=utf-8"); + httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_JSON); if (null != headerMap){ headerMap.forEach((k,v) -> { httppost.addHeader(k,v); }); } if (StringUtils.isNotEmpty(jsonStrParam)) { - StringEntity se = new StringEntity(jsonStrParam, "utf-8"); + StringEntity se = new StringEntity(jsonStrParam, UTF8); httppost.setEntity(se); } return execute(httppost, false); @@ -221,9 +227,9 @@ public class HttpClientManager { try { HttpPost httppost = new HttpPost(url); httppost.setConfig(requestConfig); - httppost.addHeader("Content-Type", "application/json"); + httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_JSON); if (StringUtils.isNotEmpty(jsonStrParam)) { - StringEntity se = new StringEntity(jsonStrParam, "utf-8"); + StringEntity se = new StringEntity(jsonStrParam, UTF8); httppost.setEntity(se); } return execute(httppost, true); @@ -249,9 +255,9 @@ public class HttpClientManager { try { String stringToSign = timestamp + "\n" + secret; Mac mac = Mac.getInstance("HmacSHA256"); - mac.init(new SecretKeySpec(secret.getBytes("UTF-8"), "HmacSHA256")); - byte[] signData = mac.doFinal(stringToSign.getBytes("UTF-8")); - String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)), "UTF-8"); + mac.init(new SecretKeySpec(secret.getBytes(UTF8), "HmacSHA256")); + byte[] signData = mac.doFinal(stringToSign.getBytes(UTF8)); + String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)), UTF8); DingTalkTextMsg msg = new DingTalkTextMsg(); msg.setContent(content); url = url.concat("×tamp=" + timestamp + "&sign=" + sign); @@ -275,9 +281,9 @@ public class HttpClientManager { try { String stringToSign = timestamp + "\n" + secret; Mac mac = Mac.getInstance("HmacSHA256"); - mac.init(new SecretKeySpec(secret.getBytes("UTF-8"), "HmacSHA256")); - byte[] signData = mac.doFinal(stringToSign.getBytes("UTF-8")); - String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)), "UTF-8"); + mac.init(new SecretKeySpec(secret.getBytes(UTF8), "HmacSHA256")); + byte[] signData = mac.doFinal(stringToSign.getBytes(UTF8)); + String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)), UTF8); log.info("sign为:"+sign); url = url.concat("×tamp=" + timestamp + "&sign=" + sign); log.info("发送url:"+url); @@ -383,9 +389,9 @@ public class HttpClientManager { try { HttpPost httppost = new HttpPost(url); httppost.setConfig(requestConfig); - httppost.addHeader("Content-Type", "application/json"); + httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_JSON); if (StringUtils.isNotEmpty(json)) { - StringEntity se = new StringEntity(json, "utf-8"); + StringEntity se = new StringEntity(json, UTF8); httppost.setEntity(se); } return executeToByte(httppost); diff --git a/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java b/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java index 98583c8f3c..2ee22426f6 100644 --- a/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java +++ b/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java @@ -131,6 +131,12 @@ public class InternalAuthProcessor extends AuthProcessor { * @return */ private boolean needAuth(String requestUri) { + for (String url : cpProperty.getInternalAuthUrlsWhiteList()) { + if (antPathMatcher.match(url, requestUri)) { + return false; + } + } + for (String url : cpProperty.getInternalAuthUrls()) { if (antPathMatcher.match(url, requestUri)) { return true; diff --git a/epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java b/epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java index 4b801182fa..3442dea612 100644 --- a/epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java +++ b/epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java @@ -22,6 +22,11 @@ public class CpProperty { */ private List internalAuthUrls; + /** + * 内部认证url白名单 + */ + private List internalAuthUrlsWhiteList; + /** * 对外部应用开放的url列表 */ diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index ad698b4d8a..53ec286911 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -439,6 +439,10 @@ epmet: - /resi/home/** - /data/report/** + # 内部认证url白名单(在白名单中的,就不会再校验登录了) + internalAuthUrlsWhiteList: + - /epmetuser/customerstaff/customerlist + # 外部应用认证,使用AccessToken等头进行认证 externalOpenUrls: - /data/report/** diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/result/ProjectLatestOperationResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/result/ProjectLatestOperationResultDTO.java index 12750903d1..f1ee458fa0 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/result/ProjectLatestOperationResultDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/result/ProjectLatestOperationResultDTO.java @@ -17,4 +17,8 @@ public class ProjectLatestOperationResultDTO implements Serializable { private String projectId; private String operationName; + + private Integer costTime; + + private String title; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java index 5bd0c89103..12e6151f3f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java @@ -61,6 +61,15 @@ public interface FactOriginGroupMainDailyDao extends BaseDao + * @author wangc + * @date 2020.11.17 09:56 + */ + List selectAllGroupByCustomerId(@Param("customerId") String customerId); + /** * @param customerId * @return diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java index 062c651aaf..ebbbe5e84b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java @@ -180,12 +180,12 @@ public interface FactOriginProjectMainDailyDao extends BaseDao * @author wangc * @date 2020.09.28 10:19 */ - List selectDifficultyBaseInfo(@Param("customerId")String customerId,@Param("list")List list); + List selectDifficultyBaseInfo(@Param("customerId")String customerId,@Param("thresholdValue") Integer thresholdValue); /** * @Description 查询评价周期内新立的项目,是为了增量新增难点赌点的图片库 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java index 2b66e785bb..3d90291cba 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java @@ -91,4 +91,13 @@ public interface ScreenDifficultyDataDao extends BaseDao list); int insertBatchImg(@Param("list") List list); + + /** + * @Description 根据客户Id查出全部的难点赌点的项目Id和网格Id,因为需要比对全部的信息然后删除因为删除网格而导致的垃圾数据 + * @param customerId + * @return java.util.List + * @author wangc + * @date 2020.11.17 09:33 + */ + List selectAllDifficultyByCustomerId(@Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java index 2e15e2aea1..3d4526a0fe 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java @@ -103,14 +103,5 @@ public interface ProjectDao extends BaseDao { */ String selectParameterValueByKey(@Param("customerId") String customerId); - /** - * @Description 得到超过阈值滞留的项目Id集合 - * 规定只要项目的任何一个负责人(被流转到的,自始至终不管有没有处理)超过了自定义或默认的滞留时间就算难点赌点 - * @param customerId - * @param exclude - * @return java.util.List - * @author wangc - * @date 2020.11.06 14:14 - */ - List selectOvertimeProjectIds(@Param("customerId") String customerId,@Param("exclude") List exclude,@Param("value") Integer value); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java index 79e2f51b48..37e130e678 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java @@ -153,15 +153,4 @@ public interface ProjectProcessDao extends BaseDao { * @date 2020.09.28 14:45 */ List selectLatestOperation(@Param("list") List list,@Param("customerId") String customerId); - - /** - * @Description 查找项目标题 - * @param list - * @return java.util.List - * @author wangc - * @date 2020.09.28 14:45 - */ - List selectProjectTitle(@Param("list") List list,@Param("customerId") String customerId); - - } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java index 8f1c0631f7..8b7e1ae06c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java @@ -248,12 +248,12 @@ public interface FactOriginProjectMainDailyService extends BaseService * @author wangc * @date 2020.09.28 10:23 */ - List getDifficultyBaseInfo(String customerId , List list); + List getDifficultyBaseInfo(String customerId ,Integer thresholdValue); /** * @Description 得到评价周期内新立项的id diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java index 21caf5f319..bdc82b519d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java @@ -237,15 +237,15 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl * @author wangc * @date 2020.09.28 10:23 */ @Override - public List getDifficultyBaseInfo(String customerId, List list) { - if(CollectionUtils.isEmpty(list)) return null; - return baseDao.selectDifficultyBaseInfo(customerId,list); + public List getDifficultyBaseInfo(String customerId, Integer thresholdValue) { + + return baseDao.selectDifficultyBaseInfo(customerId,thresholdValue); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java index cd04bc123e..dedb5bc3a3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java @@ -66,7 +66,7 @@ public class GroupExtractServiceImpl implements GroupExtractService { /** * @param param * @return - * @Description 业务抽取 - 小组祥光 + * @Description 业务抽取 - 小组 * @author wangc * @date 2020.09.18 21:07 **/ @@ -88,22 +88,31 @@ public class GroupExtractServiceImpl implements GroupExtractService { List memberList = new LinkedList<>(); if (!CollectionUtils.isEmpty(originGroupData)) { List gridList = dimGridService.getGridAttributes(param.getCustomerId(),originGroupData.stream().map(FactOriginGroupMainDailyDTO::getGridId).distinct().collect(Collectors.toList())); - List missingGroups = new LinkedList<>(); + if (!CollectionUtils.isEmpty(gridList)) { Map gridMap = gridList.stream().collect(Collectors.toMap(GridAttributesResultDTO::getGridId, Function.identity(), (key1, key2) -> key2)); - + //剔除本次要更新数据中的垃圾数据 for(Iterator iter = originGroupData.iterator(); + iter.hasNext();){ + FactOriginGroupMainDailyDTO pointer = iter.next(); + if(null == gridMap.get(pointer.getGridId()))iter.remove(); + + } + //记录全量中的垃圾数 + List missingGroups = new LinkedList<>(); + List population = factOriginGroupMainDailyDao.selectAllGroupByCustomerId(param.getCustomerId()); + if(!CollectionUtils.isEmpty(population)){ + for(Iterator iter = population.iterator(); iter.hasNext();){ FactOriginGroupMainDailyDTO pointer = iter.next(); if(null == gridMap.get(pointer.getGridId())){ missingGroups.add(pointer.getId()); - iter.remove(); } } - - originGroupData.forEach(group -> { + } + originGroupData.forEach(group -> { GridAttributesResultDTO attr = gridMap.get(group.getGridId()); if (null != attr) { group.setAgencyId(attr.getAgencyId()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index 5077794d49..452edc9665 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -16,7 +16,6 @@ import com.epmet.dto.issue.IssueDTO; import com.epmet.dto.party.PartyMemberDTO; import com.epmet.dto.project.FinishOrgDTO; import com.epmet.dto.project.ProcessInfoDTO; -import com.epmet.dto.project.ProjectOrgRelationDTO; import com.epmet.dto.project.result.ProjectOrgPeriodResultDTO; import com.epmet.dto.result.WorkDayResultDTO; import com.epmet.dto.topic.ResiTopicDTO; @@ -42,8 +41,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.text.SimpleDateFormat; -import java.util.*; -import java.util.stream.Collector; +import java.util.ArrayList; +import java.util.Date; +import java.util.LinkedList; +import java.util.List; import java.util.stream.Collectors; /** @@ -123,6 +124,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { } //获取项目信息 List projectList = projectService.getProjectInfo(customerId, dateString); + factOriginProjectMainDailyService.deleteByDate(customerId, dateString); if (!CollectionUtils.isEmpty(projectList)) { //提取议题ID List issueIds = projectList.stream().map(ProjectDTO::getOriginId).collect(Collectors.toList()); @@ -193,7 +195,6 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { })); //插入数据 if (!list.isEmpty()) { - factOriginProjectMainDailyService.deleteByDate(customerId, dateString); factOriginProjectMainDailyService.insertBatch(list); } } @@ -368,8 +369,8 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { path =path.substring(NumConstant.ZERO,path.length() - NumConstant.ONE); } entity.setPids(path); - }else{ - log.warn("【data-statistical】业务数据抽取模块,ProjectExtractServiceImpl.saveOriginProjectDaily:查询出的项目节点发起人所属的orgIdPath不正确,agencyId->{},orgIdPath->{}",process.getAgencyId(),process.getPids()); + } else { + log.warn("【data-statistical】业务数据抽取模块,ProjectExtractServiceImpl.saveOriginProjectDaily:查询出的项目节点发起人所属的orgIdPath不正确,agencyId->{},orgIdPath->{}", process.getAgencyId(), process.getPids()); entity.setPid(NumConstant.ZERO_STR); entity.setPids(""); } @@ -378,8 +379,8 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { return entity; }).collect(Collectors.toList())); + factOriginProjectLogDailyService.deleteByDate(customerId, dateString); if (!logList.isEmpty()) { - factOriginProjectLogDailyService.deleteByDate(customerId, dateString); factOriginProjectLogDailyService.insertBatch(logList); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java index 53aebc29cb..2f6f0b6a44 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.dto.org.GridInfoDTO; +import com.epmet.dto.project.result.ProjectLatestOperationResultDTO; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; @@ -77,8 +78,7 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr //2.查询出客户下网格的相关信息 List gridList = customerGridService.queryGridInfoList(param.getCustomerId()); - Map gridMap = new HashMap<>(); - gridList.forEach(grid -> {gridMap.put(grid.getGridId(),grid);}); + Map gridMap = gridList.stream().collect(Collectors.toMap(GridInfoDTO :: getGridId,a -> a,(o, n) -> o)); //3.查询出客户下用户的累计积分(累计值,没有时间概念,否则需要查询积分明细计算出评价周期末的得分) Map pointMap = userPointService.getUserPointMap(param.getCustomerId()); @@ -99,6 +99,9 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr Map scoreMap = cpcIndexCalculateService.getCpcScore(param.getCustomerId(),dateId); + //剔除垃圾数据 + registeredUsers.removeIf(user -> null == gridMap.get(user.getGridId())); + //5.整合数据 if(!CollectionUtils.isEmpty(registeredUsers)){ registeredUsers.forEach(user -> { @@ -118,24 +121,8 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr user.setDataEndTime(finalDateId); }); - } - - //6.存入数据库 - //不按照时间删除,每次插入之前将该客户下的所有历史数据清空 - //过滤 统计维度中没有的数据 - Set gridIdSet = new HashSet<>(); - List newInsertList = registeredUsers.stream() - .filter(o -> { - if (StringUtils.isBlank(o.getGridName())) { - gridIdSet.add(o.getGridId()); - return false; - } else { - return true; - } - }).collect(Collectors.toList()); - log.warn("userScoreDataHub grids:{} not in DimGrid", JSON.toJSONString(gridIdSet)); - screenPartyUserRankDataService.dataClean(newInsertList, param.getCustomerId()); + screenPartyUserRankDataService.dataClean(registeredUsers, param.getCustomerId()); } /** @@ -147,42 +134,51 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr **/ @Override public void difficultyDataHub(ScreenCentralZoneDataFormDTO param) { - - //查询难点赌点中有无已结案的项目,若有则保留 - List existed = screenDifficultyDataService.selectExistedInfo(param.getCustomerId()); - //查询数据 - List difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),projectService.getOvertimeProjectByParameter(param.getCustomerId(),existed)); + List difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),projectService.getOvertimeProjectByParameter(param.getCustomerId())); if(CollectionUtils.isEmpty(difficulties)) return; + + //2.查询出客户下网格的相关信息 + List gridList = customerGridService.queryGridInfoList(param.getCustomerId()); + Map gridMap = gridList.stream().collect(Collectors.toMap(GridInfoDTO :: getGridId,a -> a,(o, n) -> o)); + + //剔除垃圾数据(本次需要更新的数据集) + //for(Iterator iter = difficulties.iterator(); iter.hasNext();){ + // ScreenDifficultyDataEntity pointer = iter.next(); + // if(null == gridMap.get(pointer.getOrgId())){ + // iter.remove(); + // } + //} + difficulties.removeIf( diff -> null == gridMap.get(diff.getOrgId())); + List projectIds = difficulties.stream().map(ScreenDifficultyDataEntity :: getEventId).distinct().collect(Collectors.toList()); //最近一次操作 - Map latestOperationMap = projectProcessService.getLatestOperation(projectIds,param.getCustomerId()); - //标题 - Map titleMap = projectProcessService.getProjectTitle(projectIds,param.getCustomerId()); - boolean isOperationNull = CollectionUtils.isEmpty(latestOperationMap) ? true : false; - boolean isTitleNull = CollectionUtils.isEmpty(titleMap) ? true : false; + Map latestOperationMap = projectProcessService.getLatestOperation(projectIds,param.getCustomerId()); //图片 List projectSourceMap = factOriginProjectMainDailyService.getNewProject(param.getCustomerId(),projectIds); Map> imgMap = topicService.getTopicImgs(projectSourceMap); - boolean isImgNull = CollectionUtils.isEmpty(imgMap) ? true : false; + Map contentMap = topicService.getTopicContent(projectSourceMap); - boolean isContentNull = CollectionUtils.isEmpty(contentMap) ? true : false; + difficulties.forEach( diff -> { - if(!isImgNull) { + if(!CollectionUtils.isEmpty(imgMap)) { List figureList = imgMap.get(diff.getEventId()); diff.setEventImgUrl(CollectionUtils.isEmpty(figureList) ? "" : figureList.get(NumConstant.ZERO).getEventImgUrl()); } - if(!isContentNull) { + if(!CollectionUtils.isEmpty(contentMap)) { diff.setEventContent(contentMap.get(diff.getEventId())); } - if(!isOperationNull){ - diff.setLatestOperateDesc(latestOperationMap.get(diff.getEventId())); - } - if(!isTitleNull){ - diff.setEventTitle(titleMap.get(diff.getEventId())); + if(! CollectionUtils.isEmpty(latestOperationMap)){ + ProjectLatestOperationResultDTO oper = latestOperationMap.get(diff.getEventId()); + if(null != oper){ + diff.setLatestOperateDesc(oper.getOperationName()); + diff.setEventTitle(oper.getTitle()); + diff.setEventCostTime(oper.getCostTime()); + } } + diff.setDataEndTime(DateUtils.getBeforeNDay(NumConstant.ONE)); }); List imgList = new LinkedList<>(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenDifficultyDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenDifficultyDataService.java index 3c6dec0673..235dfe856a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenDifficultyDataService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenDifficultyDataService.java @@ -51,4 +51,12 @@ public interface ScreenDifficultyDataService extends BaseService difficulties, List imgs); + /** + * @Description 根据客户Id查出全部的难点赌点的项目Id和网格Id,因为需要比对全部的信息然后删除因为删除网格而导致的垃圾数据 + * @param customerId + * @return java.util.List + * @author wangc + * @date 2020.11.17 09:31 + */ + List getAllDifficultyByCustomerId(String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenPartyUserRankDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenPartyUserRankDataService.java index 99ce30dc0c..ea844971a9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenPartyUserRankDataService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenPartyUserRankDataService.java @@ -40,5 +40,4 @@ public interface ScreenPartyUserRankDataService extends BaseService dataList,String customerId); - } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java index c539114666..66873e1b6d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java @@ -54,15 +54,30 @@ public class ScreenDifficultyDataServiceImpl extends BaseServiceImpl difficulties, List imgs) { + List orient = baseDao.selectAllDifficultyByCustomerId(customerId); + if(!CollectionUtils.isEmpty(orient)){ + baseDao.deleteBatchDifficultyImg(orient.stream().map(ScreenDifficultyDataEntity::getEventId).distinct().collect(Collectors.toList())); + } + baseDao.deleteBatchDifficulty(customerId,null); + if (!CollectionUtils.isEmpty(difficulties)) { - baseDao.deleteBatchDifficulty(customerId, difficulties.stream().map(ScreenDifficultyDataEntity::getEventId).distinct().collect(Collectors.toList())); baseDao.insertBatch(difficulties); } if (!CollectionUtils.isEmpty(imgs)) { - baseDao.deleteBatchDifficultyImg(imgs.stream().map(ScreenDifficultyImgDataEntity::getEventId).distinct().collect(Collectors.toList())); baseDao.insertBatchImg(imgs); } - baseDao.updateTime(customerId, DateUtils.getBeforeNDay(NumConstant.ONE)); } + + /** + * @Description 根据客户Id查出全部的难点赌点的项目Id和网格Id,因为需要比对全部的信息然后删除因为删除网格而导致的垃圾数据 + * @param customerId + * @return java.util.List + * @author wangc + * @date 2020.11.17 09:31 + */ + @Override + public List getAllDifficultyByCustomerId(String customerId) { + return baseDao.selectAllDifficultyByCustomerId(customerId); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java index 49bd23a77b..36409f2927 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java @@ -120,20 +120,9 @@ public interface ProjectProcessService extends BaseService * @Description 获得项目最新操作 * @param list * @param customerId - * @return java.util.Map + * @return * @author wangc * @date 2020.09.28 14:44 */ - Map getLatestOperation(List list, String customerId); - - /** - * @Description 获取项目标题 - * @param list - * @param customerId - * @return java.util.Map - * @author wangc - * @date 2020.10.27 14:34 - */ - Map getProjectTitle(Listlist ,String customerId); - + Map getLatestOperation(List list, String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java index e707c0a64c..2dc0e88aa6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java @@ -104,10 +104,9 @@ public interface ProjectService extends BaseService { * @Description 得到超过阈值滞留的项目Id集合 * 规定只要项目的任何一个负责人(被流转到的,自始至终不管有没有处理)超过了自定义或默认的滞留时间就算难点赌点 * @param customerId - * @param exclude * @return java.util.List * @author wangc * @date 2020.11.06 14:14 */ - List getOvertimeProjectByParameter(String customerId,List exclude); + Integer getOvertimeProjectByParameter(String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java index 13552085b8..09d3d2f652 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java @@ -117,36 +117,17 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl + * @return * @author wangc * @date 2020.09.28 14:44 */ @Override - public Map getLatestOperation(List list, String customerId) { + public Map getLatestOperation(List list, String customerId) { List operations = baseDao.selectLatestOperation(list,customerId); if(CollectionUtils.isEmpty(operations)){ return Collections.EMPTY_MAP; }else{ - return operations.stream().collect(Collectors.toMap(ProjectLatestOperationResultDTO :: getProjectId,ProjectLatestOperationResultDTO :: getOperationName)); + return operations.stream().collect(Collectors.toMap(ProjectLatestOperationResultDTO :: getProjectId,o->o,(a,n)-> a)); } } - - /** - * @Description 获取项目标题 - * @param list - * @param customerId - * @return java.util.Map - * @author wangc - * @date 2020.10.27 14:34 - */ - @Override - public Map getProjectTitle(List list, String customerId) { - List titles = baseDao.selectProjectTitle(list,customerId); - if(CollectionUtils.isEmpty(titles)){ - return Collections.EMPTY_MAP; - }else{ - return titles.stream().collect(Collectors.toMap(ProjectLatestOperationResultDTO :: getProjectId,ProjectLatestOperationResultDTO :: getOperationName)); - } - } - } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java index 23461db970..5ba8ea04d6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java @@ -86,16 +86,15 @@ public class ProjectServiceImpl extends BaseServiceImpl * @author wangc * @date 2020.11.06 14:14 */ @Override - public List getOvertimeProjectByParameter(String customerId, List exclude) { + public Integer getOvertimeProjectByParameter(String customerId) { String parameter = baseDao.selectParameterValueByKey(customerId); if(StringUtils.isBlank(parameter)) parameter = baseDao.selectParameterValueByKey("default"); - return baseDao.selectOvertimeProjectIds(customerId, exclude, StringUtils.isBlank(parameter) ? NumConstant.FIVE : Integer.parseInt(parameter)); + return StringUtils.isBlank(parameter) ? NumConstant.FIVE : Integer.parseInt(parameter); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml index c2c75be60f..2717a8cb5e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml @@ -38,6 +38,18 @@ CUSTOMER_ID = #{customerId} + + + DELETE FROM fact_origin_group_main_daily diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml index baa6a83d25..1ea4b350fd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml @@ -331,7 +331,7 @@ ( project.PROJECT_STATUS = 'pending', '处理中', '已结案' ) AS eventStatusDesc, IFNULL(relation.reOrg,0) AS eventReOrg, IFNULL(handleCount.HandledCount,0) AS eventHandledCount, - IFNULL(costTime.costTime,0) AS eventCostTime , + gridInfo.allParentIds FROM fact_origin_project_main_daily project @@ -382,34 +382,36 @@ GROUP BY PROJECT_ID ) handleCount ON project.ID = handleCount.PROJECT_ID - LEFT JOIN ( - SELECT - main.ID AS PROJECT_ID, - TIMESTAMPDIFF( - MINUTE, - str_to_date( main.DATE_ID, '%Y%m%d' ), - IF - ( main.IS_RESOLVED = 'resolved', time.HANDLED_DATE, NOW( ) ) - ) AS costTime - FROM - fact_origin_project_main_daily main - LEFT JOIN fact_origin_project_org_period_daily time ON main.ID = time.PROJECT_ID - AND time.DEL_FLAG = '0' - AND time.OPERATION = 'close' - WHERE - main.DEL_FLAG = '0' - AND main.CUSTOMER_ID = #{customerId} - GROUP BY - main.ID - ) costTime ON project.ID = costTime.PROJECT_ID WHERE project.DEL_FLAG = '0' AND project.CUSTOMER_ID = #{customerId} - - - project.ID = #{projectId} - - + AND project.ID IN ( + + + SELECT DISTINCT + period.project_id + FROM + fact_origin_project_org_period_daily period + LEFT JOIN + ( + + SELECT + + project.ID AS projectId, + IF(project.project_status = 'closed',period.handled_date,NOW()) AS finishDate + + FROM fact_origin_project_main_daily project LEFT JOIN fact_origin_project_org_period_daily period + ON project.ID = period.project_id AND period.del_flag = '0' AND period.customer_id = #{customerId} + AND period.operation = 'close' + WHERE project.customer_id = #{customerId} AND project.del_flag = '0' + ) projectFinishDate ON projectFinishDate.projectId = period.project_id + + WHERE + period.del_flag = '0' + AND period.customer_id = #{customerId} + AND TIMESTAMPDIFF( DAY, period.informed_date, projectFinishDate.finishDate) > #{thresholdValue} + ) + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml index c56a4e85ab..100a2c29dd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml @@ -219,4 +219,14 @@ + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml index de792f46db..08c8d78d5b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml @@ -106,45 +106,4 @@ and PARAMETER_KEY ='detention_days' - - \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml index efa7b82bb4..3236a09bea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml @@ -268,9 +268,11 @@ - - \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/pom.xml b/epmet-module/epmet-common-service/common-service-server/pom.xml index c5f2f8bdab..46e103344a 100644 --- a/epmet-module/epmet-common-service/common-service-server/pom.xml +++ b/epmet-module/epmet-common-service/common-service-server/pom.xml @@ -130,6 +130,13 @@ producerService/producer/sendMsg 202007161443499985fa2d397436d10356542134c8f008c48 52d9d9b0e7d0eb5b8b81c205b579e07c + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -169,6 +176,13 @@ producerService/producer/sendMsg 202007161443499985fa2d397436d10356542134c8f008c48 52d9d9b0e7d0eb5b8b81c205b579e07c + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -206,6 +220,13 @@ producerService/producer/sendMsg 20200804181646184507453a2e9aab76edc550405f80920af 96d788191a10ff57a125157183413004 + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -240,6 +261,13 @@ producerService/producer/sendMsg 202008141820598348026098a1b5dd0bc63a1e2418e275d1b 7ce17f65826539ff3e8616dccd4b70fc + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml index e521fd36ff..83b7ee086a 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml @@ -125,4 +125,9 @@ elink: appId: @elink.mq.appId@ #项目接入亿联云的应用Id token: @elink.mq.token@ #项目接入亿联云的应用token 相当于secret host: @elink.mq.host@ #亿联云消息网关服务地址 - sendMsgPath: @elink.mq.sendMsgPath@ #发送消息路径 \ No newline at end of file + sendMsgPath: @elink.mq.sendMsgPath@ #发送消息路径 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/logback-spring.xml b/epmet-module/epmet-common-service/common-service-server/src/main/resources/logback-spring.xml index e7ed94b8fc..fa8dd97a46 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/resources/logback-spring.xml +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/epmet-ext/epmet-ext-server/pom.xml b/epmet-module/epmet-ext/epmet-ext-server/pom.xml index 6f2c432d23..f8ff8b712c 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/pom.xml +++ b/epmet-module/epmet-ext/epmet-ext-server/pom.xml @@ -197,6 +197,13 @@ false + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -229,6 +236,13 @@ false + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -261,6 +275,13 @@ true + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -294,6 +315,13 @@ true + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml index a1948620e3..55f2ba49f8 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml @@ -97,4 +97,9 @@ ribbon: pagehelper: helper-dialect: mysql - reasonable: false \ No newline at end of file + reasonable: false + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/logback-spring.xml b/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/logback-spring.xml index ec4a9fc8e0..6f14b27477 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/logback-spring.xml +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml index 72cbbdaaf8..4488897fcf 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml @@ -98,10 +98,14 @@ feign: client: config: default: - loggerLevel: BASIC + loggerLevel: FULL httpclient: enabled: true +logging: + level: + com.epmet: debug + hystrix: command: default: diff --git a/epmet-module/epmet-message/epmet-message-server/pom.xml b/epmet-module/epmet-message/epmet-message-server/pom.xml index 594f25e502..89291741a5 100644 --- a/epmet-module/epmet-message/epmet-message-server/pom.xml +++ b/epmet-module/epmet-message/epmet-message-server/pom.xml @@ -171,6 +171,13 @@ 8 10 30 + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -209,6 +216,12 @@ 8 10 30 + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -247,6 +260,12 @@ 8 10 30 + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -282,6 +301,12 @@ 8 10 30 + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml index 0ccb3c1213..dcdcaab913 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml @@ -126,4 +126,9 @@ thread: corePoolSize: @thread.pool.core-pool-size@ maxPoolSize: @thread.pool.max-pool-size@ queueCapacity: @thread.pool.queue-capacity@ - keepAlive: @thread.pool.keep-alive@ \ No newline at end of file + keepAlive: @thread.pool.keep-alive@ + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/logback-spring.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/logback-spring.xml index 7ead25dd02..ee1f62a8ef 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/resources/logback-spring.xml +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/epmet-oss/epmet-oss-server/pom.xml b/epmet-module/epmet-oss/epmet-oss-server/pom.xml index ffb777fe7c..3934ecd31a 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/pom.xml +++ b/epmet-module/epmet-oss/epmet-oss-server/pom.xml @@ -149,6 +149,13 @@ false + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -181,6 +188,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -213,6 +226,12 @@ true + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -242,6 +261,12 @@ true + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml index 115f991f57..a6d32431be 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml @@ -128,4 +128,9 @@ ribbon: #pageHelper分页插件 pagehelper: helper-dialect: mysql - reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 \ No newline at end of file + reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/logback-spring.xml b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/logback-spring.xml index a5edb3b691..22c774cac7 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/logback-spring.xml +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index c6918855a7..f9cd95ca91 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -208,6 +208,13 @@ false + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -240,6 +247,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -272,6 +285,12 @@ true + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -305,6 +324,13 @@ true + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml index fb128323d5..400d4810ed 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml @@ -133,4 +133,9 @@ third: - https://epmet-ext7.elinkservice.cn - https://epmet-ext8.elinkservice.cn - https://epmet-ext9.elinkservice.cn - - https://epmet-ext10.elinkservice.cn \ No newline at end of file + - https://epmet-ext10.elinkservice.cn + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/logback-spring.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/logback-spring.xml index fc91993807..610146dec5 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/logback-spring.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AccessConfigAdd4RoletFormDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AccessConfigAdd4RoletFormDTO.java new file mode 100644 index 0000000000..85b9e9d68d --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AccessConfigAdd4RoletFormDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.util.List; + +@Data +public class AccessConfigAdd4RoletFormDTO { + @NotBlank(message = "角色Key不能为空") + private String roleKey; + + @NotBlank(message = "操作Key不能为空") + private String operationKey; + + private List scopeKeys; +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/AccessConfigController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/AccessConfigController.java index ec11eaa26f..76a7886947 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/AccessConfigController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/AccessConfigController.java @@ -12,6 +12,7 @@ import oracle.jdbc.proxy.annotation.Post; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.validation.constraints.NotBlank; import java.util.List; import java.util.Set; @@ -116,4 +117,22 @@ public class AccessConfigController { return new Result(); } + /** + * @Description 给角色添加操作权限和操作范围 + * @return + * @author wxz + * @date 2020.11.17 17:41 + */ + @PostMapping("add-ope-and-scopes-4role") + public Result addOpeAndScopes4Role(@RequestBody AccessConfigAdd4RoletFormDTO form) { + ValidatorUtils.validateEntity(form); + String roleKey = form.getRoleKey(); + String operationKey = form.getOperationKey(); + List scopeKeys = form.getScopeKeys(); + + accessConfigService.addOpeAndScopes4Role(roleKey, operationKey, scopeKeys); + return new Result(); + } + + } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/AccessConfigService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/AccessConfigService.java index 3fc28b675f..508f3ad45f 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/AccessConfigService.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/AccessConfigService.java @@ -25,4 +25,6 @@ public interface AccessConfigService { List listOpeDefaultScopes4Role(String roleKey, String operationKey); void saveOpeDefaultScopes(String roleKey, String operationKey, List scopeKeys); + + void addOpeAndScopes4Role(String roleKey, String operationKey, List scopeKeys); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessConfigServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessConfigServiceImpl.java index 7b635cedf0..79d35436a8 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessConfigServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessConfigServiceImpl.java @@ -2,12 +2,14 @@ package com.epmet.service.impl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.*; import com.epmet.dto.result.*; import com.epmet.entity.OperationScopeDefaultEntity; import com.epmet.entity.RoleOperationDefaultEntity; import com.epmet.entity.RoleOperationEntity; import com.epmet.entity.RoleScopeEntity; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.redis.RoleOpeScopeRedis; import com.epmet.service.AccessConfigService; import org.slf4j.Logger; @@ -41,6 +43,9 @@ public class AccessConfigServiceImpl implements AccessConfigService { @Autowired private OperationScopeDefaultDao operationScopeDefaultDao; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + @Override public List listOpesByRole(String roleId) { return roleOperationDao.listOpesForAccessConfig(roleId); @@ -196,4 +201,56 @@ public class AccessConfigServiceImpl implements AccessConfigService { operationScopeDefaultDao.insert(entity); } } + + /** + * @Description 给角色添加操作权限和操作范围 + * @return + * @author wxz + * @date 2020.11.17 17:41 + */ + @Override + public void addOpeAndScopes4Role(String roleKey, String operationKey, List scopeKeys) { + Result> rolesResult = epmetUserOpenFeignClient.listRolesByRoleKey(roleKey); + if (!rolesResult.success()) { + String msg = "调用user服务,根据key查询角色列表失败"; + throw new RenException(EpmetErrorCode.USER_LIST_ROLES_BY_KEY_FAIL.getCode(), msg, msg, + RenException.MessageMode.CODE_INTERNAL_EXTERNAL.CODE_INTERNAL_EXTERNAL); + } + + List roles = rolesResult.getData(); + List roleIds2Add = roles.stream().map(GovStaffRoleResultDTO::getRoleId).collect(Collectors.toList()); + addOpeAndScopes4Role(roleIds2Add, operationKey, scopeKeys); + } + + /** + * @Description 将默认的角色操作和范围同步给具体的角色 + * @return + * @author wxz + * @date 2020.11.17 17:38 + */ + @Transactional(rollbackFor = Exception.class) + public void addOpeAndScopes4Role(List roleIds, String operationKey, List scopeKeys) { + for (String roleId : roleIds) { + // 只给没有添加该权限的用户赋予该权限,已经添加了和添加了又取消的不操作 + RoleOperationEntity roleOpe = roleOperationDao.getRoleOpe(roleId, operationKey); + if (roleOpe == null) { + // 没有该操作,则添加 + RoleOperationEntity roleOperation = new RoleOperationEntity(); + roleOperation.setOperationKey(operationKey); + roleOperation.setRoleId(roleId); + roleOperationDao.insert(roleOperation); + } + for (String scopeKey : scopeKeys) { + // 没有的话则添加 + RoleScopeEntity roleScopeInDb = roleScopeDao.getByRoleIdAndOpeKey(roleId, operationKey, scopeKey); + if (roleScopeInDb == null) { + RoleScopeEntity roleScopeEntity = new RoleScopeEntity(); + roleScopeEntity.setOperationKey(operationKey); + roleScopeEntity.setRoleId(roleId); + roleScopeEntity.setScopeKey(scopeKey); + roleScopeDao.insert(roleScopeEntity); + } + } + } + } } diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml b/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml index e8a2685e37..6fcc5979f5 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml @@ -119,3 +119,7 @@ pagehelper: helper-dialect: mysql reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 +#feign 日志需要该配置 +logging: + level: + com.epmet: debug \ No newline at end of file diff --git a/epmet-module/gov-grid/gov-grid-server/pom.xml b/epmet-module/gov-grid/gov-grid-server/pom.xml index 4972ba1e92..40572386e5 100644 --- a/epmet-module/gov-grid/gov-grid-server/pom.xml +++ b/epmet-module/gov-grid/gov-grid-server/pom.xml @@ -118,6 +118,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -144,6 +150,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -170,6 +182,12 @@ true + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -196,6 +214,13 @@ true + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml b/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml index 6b8729cd4e..003760840c 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml @@ -74,4 +74,9 @@ ribbon: #pageHelper分页插件 pagehelper: helper-dialect: mysql - reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 \ No newline at end of file + reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/resources/logback-spring.xml b/epmet-module/gov-grid/gov-grid-server/src/main/resources/logback-spring.xml index 780a8cd3a6..dbf5cf299c 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/resources/logback-spring.xml +++ b/epmet-module/gov-grid/gov-grid-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueSuggestionDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueSuggestionDTO.java new file mode 100644 index 0000000000..e5a3300212 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueSuggestionDTO.java @@ -0,0 +1,97 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 居民端用户对议题建议或意见表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-11-18 + */ +@Data +public class IssueSuggestionDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户Id customer.id + */ + private String customerId; + + /** + * 议题id + */ + private String issueId; + + /** + * 议题所属网格id + */ + private String gridId; + + /** + * 对议题的想法 + */ + private String suggestion; + + /** + * 1公开; 0匿名 + */ + private Integer publicFlag; + + /** + * 删除标识:0 未删除 1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 提建议的人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 修改人ID + */ + private String updatedBy; + + /** + * 修改时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/EvaluationListFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/EvaluationListFormDTO.java index 1c0af96723..22f47eb6f9 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/EvaluationListFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/EvaluationListFormDTO.java @@ -2,6 +2,7 @@ package com.epmet.dto.form; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -21,11 +22,13 @@ public class EvaluationListFormDTO implements Serializable { /** * 页码 */ + @NotBlank(message = "pageNo不能为空") private Integer pageNo; /** * 每页数量 */ + @NotBlank(message = "pageSize不能为空") private Integer pageSize; diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/UserIssueSuggestionFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/UserIssueSuggestionFormDTO.java new file mode 100644 index 0000000000..a9f37302a9 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/UserIssueSuggestionFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 查询用户对于某个议题的想法 返回一条记录 + * + * @author yinzuomei@elink-cn.com + * @date 2020/11/18 10:09 + */ +@Data +public class UserIssueSuggestionFormDTO implements Serializable { + private static final long serialVersionUID = -8506264833919404944L; + /** + * 用户id + */ + @NotBlank(message = "userId不能为空") + private String userId; + + /** + * 议题id + */ + @NotBlank(message = "issueId不能为空") + private String issueId; + + public UserIssueSuggestionFormDTO( String userId, String issueId) { + this.userId = userId; + this.issueId = issueId; + } +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueSuggestionResDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueSuggestionResDTO.java new file mode 100644 index 0000000000..d71c26a999 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueSuggestionResDTO.java @@ -0,0 +1,55 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * 议题建议列表 + * + * @author yinzuomei@elink-cn.com + * @date 2020/11/18 14:00 + */ +@Data +public class IssueSuggestionResDTO implements Serializable { + private static final long serialVersionUID = -6217415454610258644L; + /** + * 建议id + */ + private String suggestionId; + + /** + * 建议内容 + */ + private String suggestion; + + /** + * 建议时间戳 + */ + private Long publishTime; + + /** + * true 公开 false 匿名 + */ + private Boolean publicFlag; + + /** + * 用户头像url + */ + private String headPhoto; + + /** + * 用户显示名称 + */ + private String userShowName; + + /** + * 态度 - opposition(反对)support(赞成) + */ + private String aititude; + + @JsonIgnore + private String userId; + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/SaveIssueSuggestionResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/SaveIssueSuggestionResultDTO.java new file mode 100644 index 0000000000..a3c4ba85b3 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/SaveIssueSuggestionResultDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 保存居民端用户对议题的建议或意见 返回议题id, 建议id + * + * @author yinzuomei@elink-cn.com + * @date 2020/11/18 13:14 + */ +@Data +public class SaveIssueSuggestionResultDTO implements Serializable { + private static final long serialVersionUID = 8199657776260756910L; + private String issueId; + /** + * issue_suggestion表主键 + */ + private String suggestionId; + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index f30a67b891..f0bc89842e 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -7,6 +7,10 @@ import com.epmet.dto.form.MyPartIssuesFormDTO; import com.epmet.dto.form.MyPubIssuesAuditingFormDTO; import com.epmet.dto.result.MyPartIssuesResultDTO; import com.epmet.dto.result.MyPubIssuesAuditingResultDTO; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.IssueSuggestionDTO; +import com.epmet.dto.form.UserIssueSuggestionFormDTO; +import com.epmet.dto.result.SaveIssueSuggestionResultDTO; import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBack; import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO; import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO; @@ -15,6 +19,16 @@ import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +import java.util.List; +import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; +import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO; +import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO; +import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + import java.util.List; /** @@ -64,4 +78,51 @@ public interface GovIssueOpenFeignClient { */ @PostMapping("/gov/issue/issue/shiftissuetopic") Result> myShiftIssueTopics(@RequestBody MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO); + /** + * 小组表决中议题 + * @author zhaoqifeng + * @date 2020/11/17 14:58 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + */ + @PostMapping("/gov/issue/issue/groupvotinglist") + Result> getVotingListByGroup(@RequestBody AllIssueFormDTO formDTO); + + /** + * 小组已转项目议题 + * @author zhaoqifeng + * @date 2020/11/17 14:58 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + */ + @PostMapping("/gov/issue/issue/groupshiftprojectlist") + Result> getShiftProjectListByGroup(@RequestBody AllIssueFormDTO formDTO); + + /** + * 小组已关闭议题 + * @author zhaoqifeng + * @date 2020/11/17 14:58 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + */ + @PostMapping("/gov/issue/issue/groupclosedlist") + Result> getClosedListByGroup(@RequestBody AllIssueFormDTO formDTO); + + /** + * @param formDTO + * @author yinzuomei + * @description 查询用户对于某个议题的想法 返回一条记录 + * @Date 2020/11/18 10:17 + **/ + @PostMapping(value = "/gov/issue/issuesuggestion/queryuserissuesuggestion", consumes = MediaType.APPLICATION_JSON_VALUE) + Result queryIssueSuggestion(@RequestBody UserIssueSuggestionFormDTO formDTO); + + /** + * @param issueSuggestionDTO + * @author yinzuomei + * @description 保存居民端用户对议题的建议或意见 + * @Date 2020/11/18 13:24 + **/ + @PostMapping(value = "/gov/issue/issuesuggestion/save", consumes = MediaType.APPLICATION_JSON_VALUE) + Result saveIssueSuggestion(@RequestBody IssueSuggestionDTO issueSuggestionDTO); } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index 8fa91ff4f7..4992cb285f 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java @@ -8,9 +8,19 @@ import com.epmet.dto.form.MyPartIssuesFormDTO; import com.epmet.dto.form.MyPubIssuesAuditingFormDTO; import com.epmet.dto.result.MyPartIssuesResultDTO; import com.epmet.dto.result.MyPubIssuesAuditingResultDTO; +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.ModuleUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.IssueSuggestionDTO; +import com.epmet.dto.form.UserIssueSuggestionFormDTO; +import com.epmet.dto.result.SaveIssueSuggestionResultDTO; import com.epmet.feign.GovIssueOpenFeignClient; import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO; import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO; +import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; +import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO; +import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO; +import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO; import org.springframework.stereotype.Component; import java.util.List; @@ -42,4 +52,64 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient public Result> myShiftIssueTopics(MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"myShiftIssueTopics",myShiftIssueTopicsFormDTO); } + /** + * 小组表决中议题 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @author zhaoqifeng + * @date 2020/11/17 14:58 + */ + @Override + public Result> getVotingListByGroup(AllIssueFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getVotingListByGroup", formDTO); + } + + /** + * 小组已转项目议题 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @author zhaoqifeng + * @date 2020/11/17 14:58 + */ + @Override + public Result> getShiftProjectListByGroup(AllIssueFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getShiftProjectListByGroup", formDTO); + } + + /** + * 小组已关闭议题 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @author zhaoqifeng + * @date 2020/11/17 14:58 + */ + @Override + public Result> getClosedListByGroup(AllIssueFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getShiftProjectListByGroup", formDTO); + } + + /** + * @param formDTO + * @author yinzuomei + * @description + * @Date 2020/11/18 10:17 + **/ + @Override + public Result queryIssueSuggestion(UserIssueSuggestionFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "queryIssueSuggestion", formDTO); + } + + /** + * @param issueSuggestionDTO + * @author yinzuomei + * @description 保存居民端用户对议题的建议或意见 + * @Date 2020/11/18 13:24 + **/ + @Override + public Result saveIssueSuggestion(IssueSuggestionDTO issueSuggestionDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "saveIssueSuggestion", issueSuggestionDTO); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/pom.xml b/epmet-module/gov-issue/gov-issue-server/pom.xml index 93d9f0334c..0b00f44d12 100644 --- a/epmet-module/gov-issue/gov-issue-server/pom.xml +++ b/epmet-module/gov-issue/gov-issue-server/pom.xml @@ -146,7 +146,7 @@ false https://epmet-dev.elinkservice.cn/api/epmetscan/api - + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 @@ -183,7 +183,7 @@ false https://epmet-dev.elinkservice.cn/api/epmetscan/api - + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 @@ -253,6 +253,13 @@ true https://epmet-open.elinkservice.cn/api/epmetscan/api + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java index f15de6e623..7c159b6e3d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java @@ -5,6 +5,11 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.IssueDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.excel.IssueExcel; +import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; +import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO; +import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO; +import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO; import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; import com.epmet.service.IssueService; import org.springframework.beans.factory.annotation.Autowired; @@ -62,6 +67,7 @@ public class IssueController { public Result> getShiftProjectList(@RequestBody ShiftProjectListFromDTO fromDTO) { return new Result>().ok(issueService.getShiftProjectList(fromDTO)); } + /** * @Description 话题转议题 供群组话题服务调用 * @param issueShiftedFromTopicFormDTO @@ -179,5 +185,41 @@ public class IssueController { ValidatorUtils.validateEntity(myShiftIssueTopicsFormDTO, MyShiftIssueTopicsFormDTO.MyShiftIssueTopics.class); return new Result>().ok(issueService.myShiftIssueTopics(myShiftIssueTopicsFormDTO)); } + /** + * 小组表决中议题 + * @author zhaoqifeng + * @date 2020/11/17 14:58 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + */ + @PostMapping("groupvotinglist") + public Result> getVotingListByGroup(@RequestBody AllIssueFormDTO formDTO) { + return new Result>().ok(issueService.getVotingListByGroup(formDTO)); + } + + /** + * 小组已转项目议题 + * @author zhaoqifeng + * @date 2020/11/17 14:58 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + */ + @PostMapping("groupshiftprojectlist") + public Result> getShiftProjectListByGroup(@RequestBody AllIssueFormDTO formDTO) { + return new Result>().ok(issueService.getShiftProjectListByGroup(formDTO)); + } + + /** + * 小组已关闭议题 + * @author zhaoqifeng + * @date 2020/11/17 14:58 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + */ + @PostMapping("groupclosedlist") + public Result> getClosedListByGroup(@RequestBody AllIssueFormDTO formDTO) { + return new Result>().ok(issueService.getClosedListByGroup(formDTO)); + } + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCustomerParameterController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCustomerParameterController.java index 7371c32666..f6ef0513a6 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCustomerParameterController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCustomerParameterController.java @@ -43,7 +43,7 @@ import java.util.Map; * @since v1.0.0 2020-05-11 */ @RestController -@RequestMapping("issuecustomerparameter") +@RequestMapping("parameter") public class IssueCustomerParameterController { @Autowired diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueSuggestionController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueSuggestionController.java new file mode 100644 index 0000000000..4ce01a56d5 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueSuggestionController.java @@ -0,0 +1,87 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.IssueSuggestionDTO; +import com.epmet.dto.form.EvaluationListFormDTO; +import com.epmet.dto.form.UserIssueSuggestionFormDTO; +import com.epmet.dto.result.IssueSuggestionResDTO; +import com.epmet.dto.result.SaveIssueSuggestionResultDTO; +import com.epmet.service.IssueSuggestionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + + +/** + * 居民端用户对议题建议或意见表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-11-18 + */ +@RestController +@RequestMapping("issuesuggestion") +public class IssueSuggestionController { + + @Autowired + private IssueSuggestionService issueSuggestionService; + + /** + * @param formDTO + * @author yinzuomei + * @description 查询用户对于某个议题的想法 返回一条记录 + * @Date 2020/11/18 10:12 + **/ + @PostMapping("queryuserissuesuggestion") + public Result queryUserIssueSuggestion(@RequestBody UserIssueSuggestionFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); + IssueSuggestionDTO issueSuggestionDTO=issueSuggestionService.queryUserIssueSuggestion(formDTO); + return new Result().ok(issueSuggestionDTO); + } + + /** + * @param dto + * @author yinzuomei + * @description 保存居民端用户对议题的建议或意见 + * @Date 2020/11/18 13:15 + **/ + @PostMapping("save") + public Result saveIssueSuggestion(@RequestBody IssueSuggestionDTO dto) { + SaveIssueSuggestionResultDTO resultDTO = issueSuggestionService.saveIssueSuggestion(dto); + return new Result().ok(resultDTO); + } + + /** + * @param formDTO + * @author yinzuomei + * @description 议题建议列表 + * @Date 2020/11/18 14:15 + **/ + @PostMapping("list") + public Result> listIssueSug(@RequestBody EvaluationListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + List list = issueSuggestionService.listIssueSug(formDTO); + return new Result>().ok(list); + } +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java index a39266ee76..4071e7fb30 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java @@ -22,6 +22,9 @@ import com.epmet.dto.IssueDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.IssueEntity; +import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; +import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO; +import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO; import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -176,4 +179,32 @@ public interface IssueDao extends BaseDao { * @date 2020/11/13 3:42 下午 */ List myShiftIssueTopics(@Param("topicIds") List topicIds,@Param("customerId") String customerId); + + + /** + * 根据话题ID查找表决中议题列表 + * @author zhaoqifeng + * @date 2020/5/13 16:27 + * @param formDTO 参数 + * @return java.util.List + */ + List selectVotingListByTopic(AllIssueFormDTO formDTO); + + /** + * 根据话题ID查找已转项目议题列表 + * @author zhaoqifeng + * @date 2020/5/13 16:27 + * @param formDTO 参数 + * @return java.util.List + */ + List selectShiftIssueByTopic(AllIssueFormDTO formDTO); + + /** + * 根据话题ID查找已转项目议题列表 + * @author zhaoqifeng + * @date 2020/5/13 16:27 + * @param formDTO 参数 + * @return java.util.List + */ + List selectClosedListByTopic(AllIssueFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueSuggestionDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueSuggestionDao.java new file mode 100644 index 0000000000..a39aeef521 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueSuggestionDao.java @@ -0,0 +1,54 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IssueSuggestionDTO; +import com.epmet.dto.form.UserIssueSuggestionFormDTO; +import com.epmet.dto.result.IssueSuggestionResDTO; +import com.epmet.entity.IssueSuggestionEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 居民端用户对议题建议或意见表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-11-18 + */ +@Mapper +public interface IssueSuggestionDao extends BaseDao { + + /** + * @return com.epmet.dto.IssueSuggestionDTO + * @param formDTO + * @author yinzuomei + * @description 查询用户对于某个议题的想法 返回一条记录 + * @Date 2020/11/18 10:12 + **/ + IssueSuggestionDTO selectUserIssueSuggestion(UserIssueSuggestionFormDTO formDTO); + + /** + * @param issueId + * @author yinzuomei + * @description 查询议题建议 + * @Date 2020/11/18 14:27 + **/ + List selectListIssueSugByIssueId(String issueId); +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java index e1d7cfbddf..015eda6a35 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IssueVoteDetailDTO; import com.epmet.dto.form.VoteFormDTO; import com.epmet.dto.result.IssueAttitudeCountResultDTO; import com.epmet.dto.result.MyPartIssuesResultDTO; @@ -82,4 +83,14 @@ public interface IssueVoteDetailDao extends BaseDao { * @date 2020/11/10 10:01 上午 */ List myPartIssues(@Param("userId")String userId); + + /** + * @return com.epmet.dto.IssueVoteDetailDTO + * @param userId + * @param issueId + * @author yinzuomei + * @description 查询用户对某个议题的表决信息 + * @Date 2020/11/18 14:35 + **/ + IssueVoteDetailDTO selectUserIssueDet(@Param("userId") String userId, @Param("issueId") String issueId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueSuggestionEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueSuggestionEntity.java new file mode 100644 index 0000000000..2d160030ab --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueSuggestionEntity.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 居民端用户对议题建议或意见表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("issue_suggestion") +public class IssueSuggestionEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id customer.id + */ + private String customerId; + + /** + * 议题id + */ + private String issueId; + + /** + * 议题所属网格id + */ + private String gridId; + + /** + * 对议题的想法 + */ + private String suggestion; + + /** + * 1公开; 0匿名 + */ + private Integer publicFlag; + +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java index ea8a572ef5..0ef84a2f41 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java @@ -8,6 +8,10 @@ import com.epmet.dto.result.*; import com.epmet.dto.form.CommonIssueListFormDTO; import com.epmet.dto.form.IssueShiftedFromTopicFormDTO; import com.epmet.entity.IssueEntity; +import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; +import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO; +import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO; +import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO; import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; import java.util.List; @@ -245,4 +249,31 @@ public interface IssueService extends BaseService { */ List myShiftIssueTopics(MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO); + + /** + * 小组表决中议题 + * @author zhaoqifeng + * @date 2020/11/17 14:59 + * @param formDTO + * @return java.util.List + */ + List getVotingListByGroup(AllIssueFormDTO formDTO); + + /** + * 小组已转项目议题 + * @author zhaoqifeng + * @date 2020/11/17 14:59 + * @param formDTO + * @return java.util.List + */ + List getShiftProjectListByGroup(AllIssueFormDTO formDTO); + + /** + * 小组已关闭议题 + * @author zhaoqifeng + * @date 2020/11/17 14:59 + * @param formDTO + * @return java.util.List + */ + List getClosedListByGroup(AllIssueFormDTO formDTO); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueSuggestionService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueSuggestionService.java new file mode 100644 index 0000000000..a44b08085c --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueSuggestionService.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.IssueSuggestionDTO; +import com.epmet.dto.form.EvaluationListFormDTO; +import com.epmet.dto.form.UserIssueSuggestionFormDTO; +import com.epmet.dto.result.IssueSuggestionResDTO; +import com.epmet.dto.result.SaveIssueSuggestionResultDTO; +import com.epmet.entity.IssueSuggestionEntity; + +import java.util.List; + +/** + * 居民端用户对议题建议或意见表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-11-18 + */ +public interface IssueSuggestionService extends BaseService { + + /** + * @param formDTO + * @author yinzuomei + * @description 查询用户对于某个议题的想法 返回一条记录 + * @Date 2020/11/18 10:12 + **/ + IssueSuggestionDTO queryUserIssueSuggestion(UserIssueSuggestionFormDTO formDTO); + + /** + * @param dto + * @author yinzuomei + * @description 保存居民端用户对议题的建议或意见 + * @Date 2020/11/18 13:16 + **/ + SaveIssueSuggestionResultDTO saveIssueSuggestion(IssueSuggestionDTO dto); + + /** + * @param formDTO + * @author yinzuomei + * @description 议题建议列表 + * @Date 2020/11/18 14:16 + **/ + List listIssueSug(EvaluationListFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 94e8afc4cc..610219ff2c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -37,6 +37,10 @@ import com.epmet.redis.GovIssueRedis; import com.epmet.redis.IssueVoteDetailRedis; import com.epmet.resi.group.dto.group.form.GroupInfoFormDTO; import com.epmet.resi.group.dto.group.result.GroupInfoResultDTO; +import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; +import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO; +import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO; +import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO; import com.epmet.resi.group.dto.topic.ResiTopicDTO; import com.epmet.resi.group.dto.topic.form.GovTopicIssueInfoFormDTO; import com.epmet.resi.group.dto.topic.form.TopicIdListFormDTO; @@ -50,6 +54,7 @@ import com.epmet.service.IssueVoteStatisticalService; import com.epmet.utils.ModuleConstants; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -927,4 +932,72 @@ public class IssueServiceImpl extends BaseServiceImpl imp return result; } + /** + * 小组表决中议题 + * + * @param formDTO + * @return java.util.List + * @author zhaoqifeng + * @date 2020/11/17 14:59 + */ + @Override + public List getVotingListByGroup(AllIssueFormDTO formDTO) { + //查询条件 + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + return baseDao.selectVotingListByTopic(formDTO); + } + + /** + * 小组已转项目议题 + * + * @param formDTO + * @return java.util.List + * @author zhaoqifeng + * @date 2020/11/17 14:59 + */ + @Override + public List getShiftProjectListByGroup(AllIssueFormDTO formDTO) { + List resultList = new ArrayList<>(); + //查询条件 + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + List issueList = baseDao.selectShiftIssueByTopic(formDTO); + if (CollectionUtils.isEmpty(issueList)) { + return resultList; + } + //遍历获取所有的议题Id + List issueIds = issueList.stream().map(IssueEntity::getId).collect(Collectors.toList()); + ShiftProjectsFromDTO shiftProjectsFromDTO = new ShiftProjectsFromDTO(); + shiftProjectsFromDTO.setIssueIds(issueIds); + List projectList = govProjectFeignClient.getProjectByIssue(shiftProjectsFromDTO).getData(); + resultList = issueList.stream().flatMap(issue -> projectList.stream().filter(p -> issue.getId().equals(p.getOriginId())).map(project ->{ + GroupShiftProjectListResultDTO shiftProject = new GroupShiftProjectListResultDTO(); + shiftProject.setIssueId(issue.getId()); + shiftProject.setIssueTitle(issue.getIssueTitle()); + shiftProject.setCurrentHandleDepartMent(project.getDepartmentNameList()); + shiftProject.setPublicReply(project.getPublicReply()); + shiftProject.setIssueShiftedTime(project.getCreatedTime().getTime()/NumConstant.ONE_THOUSAND); + shiftProject.setProjectStatus(project.getStatus()); + return shiftProject; + })).collect(Collectors.toList()); + return resultList; + } + + /** + * 小组已关闭议题 + * + * @param formDTO + * @return java.util.List + * @author zhaoqifeng + * @date 2020/11/17 14:59 + */ + @Override + public List getClosedListByGroup(AllIssueFormDTO formDTO) { + //查询条件 + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + return baseDao.selectClosedListByTopic(formDTO); + } + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSuggestionServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSuggestionServiceImpl.java new file mode 100644 index 0000000000..bbf037ea80 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSuggestionServiceImpl.java @@ -0,0 +1,173 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.scan.param.TextScanParamDTO; +import com.epmet.commons.tools.scan.param.TextTaskDTO; +import com.epmet.commons.tools.scan.result.SyncScanResult; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.ScanContentUtils; +import com.epmet.dao.IssueSuggestionDao; +import com.epmet.dao.IssueVoteDetailDao; +import com.epmet.dto.IssueDTO; +import com.epmet.dto.IssueSuggestionDTO; +import com.epmet.dto.IssueVoteDetailDTO; +import com.epmet.dto.form.EvaluationListFormDTO; +import com.epmet.dto.form.UserIssueSuggestionFormDTO; +import com.epmet.dto.form.UserResiInfoListFormDTO; +import com.epmet.dto.result.IssueSuggestionResDTO; +import com.epmet.dto.result.SaveIssueSuggestionResultDTO; +import com.epmet.dto.result.UserResiInfoResultDTO; +import com.epmet.entity.IssueSuggestionEntity; +import com.epmet.feign.EpmetUserFeignClient; +import com.epmet.service.IssueService; +import com.epmet.service.IssueSuggestionService; +import com.github.pagehelper.PageHelper; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * 居民端用户对议题建议或意见表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-11-18 + */ +@Slf4j +@Service +public class IssueSuggestionServiceImpl extends BaseServiceImpl implements IssueSuggestionService { + @Autowired + private IssueService issueService; + @Value("${openapi.scan.server.url}") + private String scanApiUrl; + @Value("${openapi.scan.method.textSyncScan}") + private String textSyncScanMethod; + @Autowired + private EpmetUserFeignClient epmetUserFeignClient; + @Autowired + private IssueVoteDetailDao issueVoteDetailDao; + + /** + * @param formDTO + * @author yinzuomei + * @description 查询用户对于某个议题的想法 返回一条记录 + * @Date 2020/11/18 10:12 + **/ + @Override + public IssueSuggestionDTO queryUserIssueSuggestion(UserIssueSuggestionFormDTO formDTO) { + return baseDao.selectUserIssueSuggestion(formDTO); + } + + /** + * @param dto + * @author yinzuomei + * @description 保存居民端用户对议题的建议或意见 + * @Date 2020/11/18 13:16 + **/ + @Override + public SaveIssueSuggestionResultDTO saveIssueSuggestion(IssueSuggestionDTO dto) { + //是否表决过 + IssueVoteDetailDTO issueVoteDetailDTO = issueVoteDetailDao.selectUserIssueDet(dto.getCreatedBy(), dto.getIssueId()); + if(null==issueVoteDetailDTO){ + throw new RenException(EpmetErrorCode.VOTE_ISSUE_PLEASE.getCode()); + } + //校验建议内容 + TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); + TextTaskDTO taskDTO = new TextTaskDTO(); + taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); + taskDTO.setContent(dto.getSuggestion()); + textScanParamDTO.getTasks().add(taskDTO); + Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); + if (!textSyncScanResult.success()) { + log.warn("居民端用户对议题发表建议,内容审核服务返回失败"); + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!textSyncScanResult.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); + } + } + //赋值网格id + IssueDTO issueDTO = issueService.get(dto.getIssueId()); + if (null == issueDTO) { + throw new RenException(String.format("根据议题id%s,没有找到议题信息", dto.getIssueId())); + } + dto.setGridId(issueDTO.getGridId()); + dto.setCustomerId(issueDTO.getCustomerId()); + //插入 + IssueSuggestionEntity entity = ConvertUtils.sourceToTarget(dto, IssueSuggestionEntity.class); + insert(entity); + SaveIssueSuggestionResultDTO resultDTO = new SaveIssueSuggestionResultDTO(); + resultDTO.setIssueId(dto.getIssueId()); + resultDTO.setSuggestionId(entity.getId()); + return resultDTO; + } + + /** + * @param formDTO + * @author yinzuomei + * @description 议题建议列表 + * @Date 2020/11/18 14:16 + **/ + @Override + public List listIssueSug(EvaluationListFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = baseDao.selectListIssueSugByIssueId(formDTO.getIssueId()); + //用户信息公开的userId集合 + Set userIds = new HashSet<>(); + list.forEach(issueSuggestion -> { + if (issueSuggestion.getPublicFlag()) { + userIds.add(issueSuggestion.getUserId()); + } + IssueVoteDetailDTO issueVoteDetailDTO = issueVoteDetailDao.selectUserIssueDet(issueSuggestion.getUserId(), formDTO.getIssueId()); + issueSuggestion.setAititude(null != issueVoteDetailDTO ? issueVoteDetailDTO.getAttitude() : StrConstant.EPMETY_STR); + }); + //查询这部分人的基本信息 + if (!CollectionUtils.isEmpty(userIds)) { + Result> userInfoRes = epmetUserFeignClient.getUserResiInfoList(new UserResiInfoListFormDTO(new ArrayList<>(userIds))); + if (userInfoRes.success() && !CollectionUtils.isEmpty(userInfoRes.getData())) { + Map userBaseInfoMap = userInfoRes.getData().stream().collect(Collectors.toMap(UserResiInfoResultDTO::getUserId, Function.identity())); + //赋值 + list.forEach(issueSuggestionInfo -> { + if (issueSuggestionInfo.getPublicFlag()) { + UserResiInfoResultDTO userInfo = userBaseInfoMap.get(issueSuggestionInfo.getUserId()); + if (null != userInfo && StringUtils.isNotBlank(userInfo.getHeadPhoto())) { + issueSuggestionInfo.setHeadPhoto(userInfo.getHeadPhoto()); + } + if (null != userInfo && StringUtils.isNotBlank(userInfo.getShowName())) { + issueSuggestionInfo.setUserShowName(userInfo.getShowName()); + } + } + }); + } + } + return list; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml index e523016b91..39f6c8b80c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml @@ -114,4 +114,10 @@ openapi: #pageHelper分页插件 pagehelper: helper-dialect: mysql - reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 \ No newline at end of file + reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ + diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.2__issue_audit_tables.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.2__issue_audit_tables.sql new file mode 100644 index 0000000000..93f8c2338e --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.2__issue_audit_tables.sql @@ -0,0 +1,37 @@ +drop table if exists issue_application; +CREATE TABLE `issue_application` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID', + `ISSUE_TITLE` varchar(128) NOT NULL COMMENT '议题名称 ', + `SUGGESTION` varchar(1024) NOT NULL COMMENT '建议', + `APPLY_STATUS` varchar(32) NOT NULL COMMENT '审核状态:under_auditing:待审核;approved:通过;rejected:驳回', + `TOPIC_ID` varchar(32) NOT NULL COMMENT '话题id', + `GROUP_ID` varchar(64) NOT NULL COMMENT '小组id', + `GRID_ID` varchar(32) NOT NULL COMMENT '网格ID 居民端议题对应一个网格Id', + `ISSUE_ID` varchar(64) DEFAULT NULL COMMENT '审核通过后对应的 议题id', + `PASSED_REASON` varchar(1024) DEFAULT NULL COMMENT '审核通过时填写的理由', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间:第一次提交审核的时间,注意和历史表的第一条记录时间一致', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='话题转议题申请表'; + +drop table if exists issue_application_history; +CREATE TABLE `issue_application_history` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID', + `ISSUE_APPLICATION_ID` varchar(64) NOT NULL COMMENT '话题转议题申请表 issue_application.id', + `ACTION_TYPE` varchar(32) NOT NULL COMMENT 'under_auditing:提交审核;\r\napproved:审核通过,\r\nrejected:驳回', + `REASON` varchar(1024) DEFAULT NULL COMMENT '审核时的说明', + `STAFF_NAME` varchar(255) DEFAULT NULL COMMENT '工作端人员姓名', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识:0 未删除 1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人 提交人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '修改人ID', + `UPDATED_TIME` datetime NOT NULL COMMENT '修改时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='话题转议题审核历史表'; \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.3__issue_sugg_tables.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.3__issue_sugg_tables.sql new file mode 100644 index 0000000000..0ee88d49d5 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.3__issue_sugg_tables.sql @@ -0,0 +1,16 @@ +drop table if exists issue_suggestion; +CREATE TABLE `issue_suggestion` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id customer.id', + `ISSUE_ID` varchar(64) NOT NULL COMMENT '议题id', + `GRID_ID` varchar(64) NOT NULL COMMENT '议题所属网格id', + `SUGGESTION` varchar(512) NOT NULL COMMENT '对议题的想法', + `PUBLIC_FLAG` tinyint(1) NOT NULL COMMENT '1公开; 0匿名', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识:0 未删除 1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '提建议的人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '修改人ID', + `UPDATED_TIME` datetime NOT NULL COMMENT '修改时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='居民端用户对议题建议或意见表'; \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml index ef4cf50330..ade9c2dcc3 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index 21a7eddace..7eeb9a28f7 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -377,6 +377,69 @@ del_flag = 0 AND source_id = #{topicId} + + + + + SELECT + * + FROM + issue_suggestion i + WHERE + i.DEL_FLAG = '0' + AND i.ISSUE_ID = #{issueId} + AND i.CREATED_BY=#{userId} + + + + + \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml index 523dd1cb63..08249e8651 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml @@ -87,4 +87,16 @@ AND vd.CREATED_BY = #{userId} ORDER BY i.CREATED_TIME DESC + + + \ No newline at end of file diff --git a/epmet-module/gov-mine/gov-mine-server/pom.xml b/epmet-module/gov-mine/gov-mine-server/pom.xml index 54f3b8e225..00baee29cf 100644 --- a/epmet-module/gov-mine/gov-mine-server/pom.xml +++ b/epmet-module/gov-mine/gov-mine-server/pom.xml @@ -136,6 +136,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -160,6 +166,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -184,6 +196,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -205,6 +223,13 @@ false + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml b/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml index f19d228c96..c49ee432c1 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml @@ -94,3 +94,8 @@ hystrix: ribbon: ReadTimeout: 300000 ConnectTimeout: 300000 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/resources/logback-spring.xml b/epmet-module/gov-mine/gov-mine-server/src/main/resources/logback-spring.xml index a03a6843bd..80e1ea56e2 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/resources/logback-spring.xml +++ b/epmet-module/gov-mine/gov-mine-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index 5c6f53c739..ecfdb329f1 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -150,6 +150,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -182,6 +188,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -215,6 +227,12 @@ true + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -244,6 +262,13 @@ true + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml b/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml index 4657c30354..8651e49ce2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml @@ -130,4 +130,9 @@ ribbon: #pageHelper分页插件 pagehelper: helper-dialect: mysql - reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 \ No newline at end of file + reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/logback-spring.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/logback-spring.xml index e05ed7a188..24d44d88f9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/logback-spring.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ParameterFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ParameterFormDTO.java new file mode 100644 index 0000000000..d05c1c520c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ParameterFormDTO.java @@ -0,0 +1,56 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/11/18 15:00 + */ +@NoArgsConstructor +@Data +public class ParameterFormDTO implements Serializable { + + private static final long serialVersionUID = 6943367994919967821L; + /** + * 客户ID + */ + @NotBlank(message = "客户ID不能为空", groups = DefaultGroup.class) + private String customerId; + /** + * 可滞留天数 + */ + @NotBlank(message = "可滞留天数不能为空", groups = AddGroup.class) + private String detentionDays; + /** + * 计算方式 工作日work 日历天calendar + */ + @NotBlank(message = "计算方式 不能为空", groups = AddGroup.class) + private String calculation; + /** + * 即将超期提醒时间 + */ + @NotBlank(message = "即将超期提醒时间不能为空", groups = AddGroup.class) + private String remindTime; + /** + * 推送时间 默认 上午8点 + */ + @NotBlank(message = "推送时间不能为空", groups = AddGroup.class) + private String pushTime; + /** + * 设定核算单位天开始时间 + */ + @NotBlank(message = "设定核算单位天开始时间不能为空", groups = AddGroup.class) + private String startTime; + /** + * 设定核算单位天结束时间 + */ + @NotBlank(message = "设定核算单位天结束时间不能为空", groups = AddGroup.class) + private String endTime; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ParameterResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ParameterResultDTO.java new file mode 100644 index 0000000000..00d2cee217 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ParameterResultDTO.java @@ -0,0 +1,39 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/11/18 15:19 + */ +@Data +public class ParameterResultDTO implements Serializable { + private static final long serialVersionUID = -2066374948905858262L; + /** + * 可滞留天数 + */ + private String detentionDays; + /** + * 计算方式 工作日work 日历天calendar + */ + private String calculation; + /** + * 即将超期提醒时间 + */ + private String remindTime; + /** + * 推送时间 默认 上午8点 + */ + private String pushTime; + /** + * 设定核算单位天开始时间 + */ + private String startTime; + /** + * 设定核算单位天结束时间 + */ + private String endTime; +} diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index 06ec668460..0dc357dada 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -157,6 +157,13 @@ false https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -190,6 +197,12 @@ false https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -223,6 +236,12 @@ true https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -253,6 +272,13 @@ true https://epmet-open.elinkservice.cn/api/epmetscan/api + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java index 93139cfa21..e9b60a9a4c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java @@ -26,6 +26,8 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.CustomerProjectParameterDTO; +import com.epmet.dto.form.ParameterFormDTO; +import com.epmet.dto.result.ParameterResultDTO; import com.epmet.excel.CustomerProjectParameterExcel; import com.epmet.service.CustomerProjectParameterService; import org.springframework.beans.factory.annotation.Autowired; @@ -43,7 +45,7 @@ import java.util.Map; * @since v1.0.0 2020-05-11 */ @RestController -@RequestMapping("customerprojectparameter") +@RequestMapping("parameter") public class CustomerProjectParameterController { @Autowired @@ -91,4 +93,46 @@ public class CustomerProjectParameterController { ExcelUtils.exportExcelToTarget(response, null, list, CustomerProjectParameterExcel.class); } + /** + * 滞留提醒-初始化 + * @author zhaoqifeng + * @date 2020/11/18 15:26 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("remindinit") + public Result remindInit(@RequestBody ParameterFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, DefaultGroup.class); + ParameterResultDTO result = customerProjectParameterService.remindInit(formDTO); + return new Result().ok(result); + } + + /** + * 滞留提醒-保存 + * @author zhaoqifeng + * @date 2020/11/18 15:26 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("remindsave") + public Result remindSave(@RequestBody ParameterFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, UpdateGroup.class, DefaultGroup.class); + customerProjectParameterService.remindSave(formDTO); + return new Result(); + } + + /** + * 滞留提醒-恢复默认 + * @author zhaoqifeng + * @date 2020/11/18 15:26 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("reminddefault") + public Result remindDefault(@RequestBody ParameterFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, DefaultGroup.class); + customerProjectParameterService.remindDefault(formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/CustomerProjectParameterService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/CustomerProjectParameterService.java index c9b487e7d0..8dc8a120ca 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/CustomerProjectParameterService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/CustomerProjectParameterService.java @@ -20,6 +20,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.CustomerProjectParameterDTO; +import com.epmet.dto.form.ParameterFormDTO; +import com.epmet.dto.result.ParameterResultDTO; import com.epmet.entity.CustomerProjectParameterEntity; import java.util.List; @@ -137,4 +139,31 @@ public interface CustomerProjectParameterService extends BaseService + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/gov-voice/gov-voice-server/pom.xml b/epmet-module/gov-voice/gov-voice-server/pom.xml index 1c80814b41..f6b5b7d0a3 100644 --- a/epmet-module/gov-voice/gov-voice-server/pom.xml +++ b/epmet-module/gov-voice/gov-voice-server/pom.xml @@ -132,6 +132,12 @@ false https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -165,6 +171,12 @@ false https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -198,6 +210,12 @@ true https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -228,6 +246,13 @@ true https://epmet-open.elinkservice.cn/api/epmetscan/api + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml index 8e85f694ed..6bf735a325 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml @@ -114,4 +114,9 @@ openapi: #pageHelper分页插件 pagehelper: helper-dialect: mysql - reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 \ No newline at end of file + reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/logback-spring.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/logback-spring.xml index e9ef5d3b60..da83651e0c 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/logback-spring.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/oper-access/oper-access-server/pom.xml b/epmet-module/oper-access/oper-access-server/pom.xml index f78794d104..4a9152e2d0 100644 --- a/epmet-module/oper-access/oper-access-server/pom.xml +++ b/epmet-module/oper-access/oper-access-server/pom.xml @@ -119,6 +119,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -151,6 +157,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -183,6 +195,12 @@ true + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -212,6 +230,13 @@ true + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml b/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml index b7cbcbe1af..34a3d56ae9 100644 --- a/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml +++ b/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml @@ -117,4 +117,9 @@ ribbon: #pageHelper分页插件 pagehelper: helper-dialect: mysql - reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 \ No newline at end of file + reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/oper-access/oper-access-server/src/main/resources/logback-spring.xml b/epmet-module/oper-access/oper-access-server/src/main/resources/logback-spring.xml index f12b007132..d0829fae23 100644 --- a/epmet-module/oper-access/oper-access-server/src/main/resources/logback-spring.xml +++ b/epmet-module/oper-access/oper-access-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/oper-crm/oper-crm-server/pom.xml b/epmet-module/oper-crm/oper-crm-server/pom.xml index 8535f16485..a721c86f4f 100644 --- a/epmet-module/oper-crm/oper-crm-server/pom.xml +++ b/epmet-module/oper-crm/oper-crm-server/pom.xml @@ -140,6 +140,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -172,6 +178,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -204,6 +216,12 @@ true + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -236,6 +254,13 @@ true + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml b/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml index 422a4459a9..7b14f2cad1 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml +++ b/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml @@ -123,4 +123,9 @@ ribbon: #pageHelper分页插件 pagehelper: helper-dialect: mysql - reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 \ No newline at end of file + reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/resources/logback-spring.xml b/epmet-module/oper-crm/oper-crm-server/src/main/resources/logback-spring.xml index 68c16e906e..0c531843f6 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/resources/logback-spring.xml +++ b/epmet-module/oper-crm/oper-crm-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/resources/CustomerAppDao.xml b/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerAppDao.xml similarity index 100% rename from epmet-module/oper-crm/oper-crm-server/src/main/resources/CustomerAppDao.xml rename to epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerAppDao.xml diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index 20f7861056..a36f6d46d1 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -123,6 +123,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -155,6 +161,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -187,6 +199,12 @@ true + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -216,6 +234,13 @@ true + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml index 14755776eb..b6cb0ffbb8 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml @@ -117,4 +117,9 @@ ribbon: #pageHelper分页插件 pagehelper: helper-dialect: mysql - reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 \ No newline at end of file + reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml index de2aa4d947..d02b4bffb3 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/AllIssueFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/AllIssueFormDTO.java new file mode 100644 index 0000000000..10720f194d --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/AllIssueFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.resi.group.dto.group.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/11/17 10:25 + */ +@NoArgsConstructor +@Data +public class AllIssueFormDTO implements Serializable { + + private static final long serialVersionUID = 9033824126731443502L; + /** + * 小组ID + */ + @NotBlank(message = "小组id不能为空") + private String groupId; + private Integer pageNo = 1; + private Integer pageSize = 20; + private List topicIds; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupClosedListResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupClosedListResultDTO.java new file mode 100644 index 0000000000..619fba8322 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupClosedListResultDTO.java @@ -0,0 +1,34 @@ +package com.epmet.resi.group.dto.group.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/11/17 11:02 + */ +@NoArgsConstructor +@Data +public class GroupClosedListResultDTO implements Serializable { + + private static final long serialVersionUID = 3152596066530973548L; + /** + * 议题ID + */ + private String issueId; + /** + * 议题标题 + */ + private String issueTitle; + /** + * 议题关闭时间 时间戳 + */ + private Long issueClosedTime; + /** + * 解决方案 + */ + private String solution; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupShiftProjectListResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupShiftProjectListResultDTO.java new file mode 100644 index 0000000000..cbfba00fe3 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupShiftProjectListResultDTO.java @@ -0,0 +1,43 @@ +package com.epmet.resi.group.dto.group.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/11/17 10:58 + */ +@NoArgsConstructor +@Data +public class GroupShiftProjectListResultDTO implements Serializable { + + private static final long serialVersionUID = 4338078715001777226L; + /** + * 议题ID + */ + private String issueId; + /** + * 议题标题 + */ + private String issueTitle; + /** + * 议题转成项目时间 + */ + private Long issueShiftedTime; + /** + * 项目状态: 待处理 pending,结案closed + */ + private String projectStatus; + /** + * 结案说明 + */ + private String publicReply; + /** + * 当前处理部门名称数组 + */ + private List currentHandleDepartMent; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupVotingListResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupVotingListResultDTO.java new file mode 100644 index 0000000000..974cbce685 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupVotingListResultDTO.java @@ -0,0 +1,34 @@ +package com.epmet.resi.group.dto.group.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/11/17 10:51 + */ +@NoArgsConstructor +@Data +public class GroupVotingListResultDTO implements Serializable { + + private static final long serialVersionUID = -3401194563187510106L; + /** + * 议题ID + */ + private String issueId; + /** + * 议题标题 + */ + private String issueTitle; + /** + * 议题发表时间 + */ + private Long issuePublishTime; + /** + * 建议处理方式(群主转议题时填写的) + */ + private String suggestion; +} diff --git a/epmet-module/resi-group/resi-group-server/pom.xml b/epmet-module/resi-group/resi-group-server/pom.xml index 43552aa943..86ccf538e0 100644 --- a/epmet-module/resi-group/resi-group-server/pom.xml +++ b/epmet-module/resi-group/resi-group-server/pom.xml @@ -148,6 +148,13 @@ false https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -181,6 +188,13 @@ false https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -213,6 +227,13 @@ true https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -242,6 +263,13 @@ true https://epmet-open.elinkservice.cn/api/epmetscan/api + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/GroupIssueController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/GroupIssueController.java index a648acc982..ff01971f70 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/GroupIssueController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/GroupIssueController.java @@ -3,12 +3,11 @@ package com.epmet.modules.group.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.modules.group.service.GroupIssueService; +import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO; -import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO; -import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO; -import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO; +import com.epmet.resi.group.dto.group.result.*; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -65,4 +64,47 @@ public class GroupIssueController { ValidatorUtils.validateEntity(applicationListFormDTO, ApplicationListFormDTO.ApplicationList.class); return new Result>().ok(groupIssueService.applicationList(applicationListFormDTO)); } + + /** + * 表决中列表 + * @author zhaoqifeng + * @date 2020/11/17 13:52 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + */ + @PostMapping("votinglist") + public Result> votingList(@RequestBody AllIssueFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + List list = groupIssueService.votingList(formDTO); + return new Result>().ok(list); + } + + /** + * 已转项目列表 + * @author zhaoqifeng + * @date 2020/11/17 13:53 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + */ + @PostMapping("shiftproject") + public Result> shiftProjectList(@RequestBody AllIssueFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + List list = groupIssueService.shiftProjectList(formDTO); + return new Result>().ok(list); + } + + /** + * 已关闭列表 + * @author zhaoqifeng + * @date 2020/11/17 13:54 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + */ + @PostMapping("closedlist") + public Result> closedList(@RequestBody AllIssueFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + List list = groupIssueService.closedList(formDTO); + return new Result>().ok(list); + } + } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupIssueService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupIssueService.java index 7b22f3abd3..4cd99360fa 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupIssueService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupIssueService.java @@ -1,11 +1,10 @@ package com.epmet.modules.group.service; +import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO; -import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO; -import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO; -import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO; +import com.epmet.resi.group.dto.group.result.*; import java.util.List; @@ -40,4 +39,31 @@ public interface GroupIssueService { */ List applicationList(ApplicationListFormDTO applicationListFormDTO); + /** + * 表决中列表 + * @author zhaoqifeng + * @date 2020/11/17 13:56 + * @param formDTO + * @return java.util.List + */ + List votingList(AllIssueFormDTO formDTO); + + /** + * 已转项目列表 + * @author zhaoqifeng + * @date 2020/11/17 13:56 + * @param formDTO + * @return java.util.List + */ + List shiftProjectList(AllIssueFormDTO formDTO); + + /** + * 已关闭列表 + * @author zhaoqifeng + * @date 2020/11/17 13:56 + * @param formDTO + * @return java.util.List + */ + List closedList(AllIssueFormDTO formDTO); + } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java index e0792d1a0c..2a56f9d48d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java @@ -1,13 +1,17 @@ package com.epmet.modules.group.service.impl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.Result; +import com.epmet.feign.GovIssueOpenFeignClient; import com.epmet.modules.group.service.GroupIssueService; +import com.epmet.modules.topic.service.ResiTopicService; +import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO; -import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO; -import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO; -import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO; +import com.epmet.resi.group.dto.group.result.*; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @@ -21,6 +25,11 @@ import java.util.List; @Service public class GroupIssueServiceImpl implements GroupIssueService { + @Autowired + private ResiTopicService resiTopicService; + @Autowired + private GovIssueOpenFeignClient govIssueOpenFeignClient; + /** * @Description 待审核||已驳回 申请详情 * @Param applicationDetailFormDTO @@ -53,4 +62,64 @@ public class GroupIssueServiceImpl implements GroupIssueService { public List applicationList(ApplicationListFormDTO applicationListFormDTO) { return null; } + + /** + * 表决中列表 + * + * @param formDTO + * @return java.util.List + * @author zhaoqifeng + * @date 2020/11/17 13:56 + */ + @Override + public List votingList(AllIssueFormDTO formDTO) { + //查找小组内所有话题ID + List topicIds = resiTopicService.getTopicIdsByGroup(formDTO.getGroupId()); + formDTO.setTopicIds(topicIds); + Result> result = govIssueOpenFeignClient.getVotingListByGroup(formDTO); + if(!result.success()) { + throw new RenException(result.getCode(), result.getMsg()); + } + return result.getData(); + } + + /** + * 已转项目列表 + * + * @param formDTO + * @return java.util.List + * @author zhaoqifeng + * @date 2020/11/17 13:56 + */ + @Override + public List shiftProjectList(AllIssueFormDTO formDTO) { + //查找小组内所有话题ID + List topicIds = resiTopicService.getTopicIdsByGroup(formDTO.getGroupId()); + formDTO.setTopicIds(topicIds); + Result> result = govIssueOpenFeignClient.getShiftProjectListByGroup(formDTO); + if(!result.success()) { + throw new RenException(result.getCode(), result.getMsg()); + } + return result.getData(); + } + + /** + * 已关闭列表 + * + * @param formDTO + * @return java.util.List + * @author zhaoqifeng + * @date 2020/11/17 13:56 + */ + @Override + public List closedList(AllIssueFormDTO formDTO) { + //查找小组内所有话题ID + List topicIds = resiTopicService.getTopicIdsByGroup(formDTO.getGroupId()); + formDTO.setTopicIds(topicIds); + Result> result = govIssueOpenFeignClient.getClosedListByGroup(formDTO); + if(!result.success()) { + throw new RenException(result.getCode(), result.getMsg()); + } + return result.getData(); + } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java index 701661cac4..3c06ced85b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java @@ -179,4 +179,13 @@ public interface ResiTopicDao extends BaseDao { * @date 2020/11/13 4:32 下午 */ List selectMyCreateTopic(TopicIdListFormDTO topicIdListFormDTO); + /** + * 获取小组内话题ID + * @author zhaoqifeng + * @date 2020/11/17 14:19 + * @param groupId + * @return java.util.List + */ + List selectTopicIdsByGroup(@Param("groupId") String groupId); + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java index dbd533439e..c907cd80c4 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java @@ -287,4 +287,13 @@ public interface ResiTopicService extends BaseService { * @date 2020/11/13 4:32 下午 */ List selectMyCreateTopic(TopicIdListFormDTO topicIdListFormDTO); + /** + * 获取小组内话题ID + * @author zhaoqifeng + * @date 2020/11/17 14:18 + * @param groupId + * @return java.util.List + */ + List getTopicIdsByGroup(String groupId); + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index dbdfc2f200..b2edfcbd19 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -18,7 +18,6 @@ package com.epmet.modules.topic.service.impl; - import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -76,9 +75,9 @@ import com.epmet.resi.group.dto.member.form.RemoveMemberFormDTO; import com.epmet.resi.group.dto.member.result.ResiGroupMemberInfoRedisResultDTO; import com.epmet.resi.group.dto.topic.ResiTopicDTO; import com.epmet.resi.group.dto.topic.TopicInfoDTO; -import com.epmet.resi.group.dto.topic.form.*; import com.epmet.resi.group.dto.topic.form.CheckTopicPublisherFormDTO; import com.epmet.resi.group.dto.topic.form.GovTopicIssueInfoFormDTO; +import com.epmet.resi.group.dto.topic.form.*; import com.epmet.resi.group.dto.topic.result.*; import com.epmet.resi.group.dto.topic.result.CheckTopicPublisherResultDTO; import com.epmet.resi.group.dto.topic.result.GovTopicIssueInfoResultDTO; @@ -1309,48 +1308,49 @@ public class ResiTopicServiceImpl extends BaseServiceImpl issueResult = govIssueFeignClient.issueShiftedToTopic(issueInfo); + if (issueResult == null || !issueResult.success() || StringUtils.isBlank(issueResult.getData())) { + throw new RenException(ModuleConstant.CREATE_ISSUE_ERROR); + } //5.修改话题shiftIssue字段 - if(issueResult.success() && StringUtils.isNotBlank(issueResult.getData())){ - ResiTopicEntity topic2Upd = new ResiTopicEntity(); - topic2Upd.setId(topicTurnIssueFromDTO.getTopicId()); - topic2Upd.setUpdatedBy(topicTurnIssueFromDTO.getUserId()); - topic2Upd.setShiftIssue(Boolean.TRUE); - topic2Upd.setIssueId(issueResult.getData()); - topic2Upd.setUpdatedTime(now); - int topicResult = baseDao.updateOne(topic2Upd); - //6.新增话题操作记录 - if(topicResult == NumConstant.ONE) { - ResiTopicOperationEntity operation = new ResiTopicOperationEntity(); - operation.setCreatedTime(now); - operation.setCreatedBy(topicTurnIssueFromDTO.getUserId()); - operation.setTopicId(topicTurnIssueFromDTO.getTopicId()); - operation.setOperationType(ModuleConstant.TOPIC_OPERATION_TYPE_SHIFT_ISSUE); - int operationResult = resiTopicOperationDao.insertOneByParams(operation); - if(operationResult != NumConstant.ONE){ - logger.warn(ModuleConstant.FAILURE_TO_ADD_TOPIC_OPERATION); - } - } - //7.更新组统计信息 议题数量+1 - resiGroupStatisticalDao.incryTotalIssues(group.getGroupId()); - if(null != groupCache && null != groupCache.getGroupStatisticalInfo()){ - groupCache.getGroupStatisticalInfo().setTotalIssues( - null == groupCache.getGroupStatisticalInfo().getTotalIssues() ? NumConstant.ONE - : groupCache.getGroupStatisticalInfo().getTotalIssues() + NumConstant.ONE - ); - resiGroupRedis.set(groupCache); - } - logger.warn(ModuleConstant.FAILURE_TO_UPDATE_TOPIC); + ResiTopicEntity topic2Upd = new ResiTopicEntity(); + topic2Upd.setId(topicTurnIssueFromDTO.getTopicId()); + topic2Upd.setUpdatedBy(topicTurnIssueFromDTO.getUserId()); + topic2Upd.setShiftIssue(Boolean.TRUE); + topic2Upd.setIssueId(issueResult.getData()); + topic2Upd.setUpdatedTime(now); + int topicResult = baseDao.updateOne(topic2Upd); + //6.新增话题操作记录 + if (topicResult == NumConstant.ONE) { + ResiTopicOperationEntity operation = new ResiTopicOperationEntity(); + operation.setCreatedTime(now); + operation.setCreatedBy(topicTurnIssueFromDTO.getUserId()); + operation.setTopicId(topicTurnIssueFromDTO.getTopicId()); + operation.setOperationType(ModuleConstant.TOPIC_OPERATION_TYPE_SHIFT_ISSUE); + int operationResult = resiTopicOperationDao.insertOneByParams(operation); + if (operationResult != NumConstant.ONE) { + logger.warn(ModuleConstant.FAILURE_TO_ADD_TOPIC_OPERATION); + } + } + //7.更新组统计信息 议题数量+1 + resiGroupStatisticalDao.incryTotalIssues(group.getGroupId()); + if (null != groupCache && null != groupCache.getGroupStatisticalInfo()) { + groupCache.getGroupStatisticalInfo().setTotalIssues( + null == groupCache.getGroupStatisticalInfo().getTotalIssues() ? NumConstant.ONE + : groupCache.getGroupStatisticalInfo().getTotalIssues() + NumConstant.ONE + ); + resiGroupRedis.set(groupCache); } + logger.warn(ModuleConstant.FAILURE_TO_UPDATE_TOPIC); } } @@ -1487,6 +1487,19 @@ public class ResiTopicServiceImpl extends BaseServiceImpl selectMyCreateTopic(TopicIdListFormDTO topicIdListFormDTO) { return baseDao.selectMyCreateTopic(topicIdListFormDTO); } + /** + * 获取小组内话题ID + * + * @param groupId + * @return java.util.List + * @author zhaoqifeng + * @date 2020/11/17 14:18 + */ + @Override + public List getTopicIdsByGroup(String groupId) { + return baseDao.selectTopicIdsByGroup(groupId); + } + } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java index 094c58bda7..9fa1359bdf 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java @@ -327,5 +327,7 @@ public interface ModuleConstant extends Constant { String FIELD_OPERATION_TYPE = "OPERATION_TYPE"; - String CLOSED_TOPIC_REASON_PREFIX="话题已关闭:"; + String CLOSED_TOPIC_REASON_PREFIX = "话题已关闭:"; + + String CREATE_ISSUE_ERROR = "创建议题失败"; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml b/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml index 6f73407d1a..d836a237c2 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml @@ -125,4 +125,9 @@ openapi: url: @openapi.scan.server.url@ method: imgSyncScan: /imgSyncScan - textSyncScan: /textSyncScan \ No newline at end of file + textSyncScan: /textSyncScan + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml index a2cc2aa3c3..d6f09d87ae 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml index 5f68af2e92..2e7f1280ee 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml @@ -508,5 +508,12 @@ AND STATUS = 'discussing' AND created_by = #{userId} + diff --git a/epmet-module/resi-guide/resi-guide-server/pom.xml b/epmet-module/resi-guide/resi-guide-server/pom.xml index 098b7a0ba5..1282b2f3e8 100644 --- a/epmet-module/resi-guide/resi-guide-server/pom.xml +++ b/epmet-module/resi-guide/resi-guide-server/pom.xml @@ -140,6 +140,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -172,6 +178,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -204,6 +216,12 @@ true + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -233,6 +251,13 @@ true + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml b/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml index ed94f661c3..836ea9f4ca 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml @@ -118,4 +118,9 @@ ribbon: #pageHelper分页插件 pagehelper: helper-dialect: mysql - reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 \ No newline at end of file + reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/resources/logback-spring.xml b/epmet-module/resi-guide/resi-guide-server/src/main/resources/logback-spring.xml index 936ac0df8c..174beb8e91 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/resources/logback-spring.xml +++ b/epmet-module/resi-guide/resi-guide-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/PublishSuggestionFormDTO.java b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/PublishSuggestionFormDTO.java new file mode 100644 index 0000000000..5cd1304705 --- /dev/null +++ b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/PublishSuggestionFormDTO.java @@ -0,0 +1,34 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 居民端-议题发表建议 入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/11/18 12:35 + */ +@Data +public class PublishSuggestionFormDTO implements Serializable { + private static final long serialVersionUID = 2545427013095892610L; + + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "议题id不能为空", groups = {AddUserInternalGroup.class}) + private String issueId; + + @NotBlank(message = "是否匿名不能为空", groups = {AddUserInternalGroup.class}) + private Boolean publicFlag; + + @Length(max = 500, message = "内容不能超过500字", groups = {AddUserShowGroup.class}) + private String suggestion; +} diff --git a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/IssueDetailResultDTO.java b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/IssueDetailResultDTO.java index 0d95ff6c84..f1c2ee1f83 100644 --- a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/IssueDetailResultDTO.java +++ b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/IssueDetailResultDTO.java @@ -60,5 +60,13 @@ public class IssueDetailResultDTO implements Serializable { */ private String projectId = ""; + /** + * 对议题的想法 + */ + private String issueIdea; + /** + * true已发表过想法,false未发表想法 + */ + private Boolean publishIdeaFlag; } diff --git a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/PublishSuggestionResultDTO.java b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/PublishSuggestionResultDTO.java new file mode 100644 index 0000000000..83e1359265 --- /dev/null +++ b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/PublishSuggestionResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 居民端-议题发表建议 返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/11/18 13:08 + */ +@Data +public class PublishSuggestionResultDTO implements Serializable { + private static final long serialVersionUID = -2752255960631605369L; + private String issueId; + /** + * issue_suggestion表主键 + */ + private String suggestionId; + + public PublishSuggestionResultDTO(String issueId, String suggestionId) { + this.issueId = issueId; + this.suggestionId = suggestionId; + } +} diff --git a/epmet-module/resi-hall/resi-hall-server/pom.xml b/epmet-module/resi-hall/resi-hall-server/pom.xml index a44a834c35..61c2a76ffe 100644 --- a/epmet-module/resi-hall/resi-hall-server/pom.xml +++ b/epmet-module/resi-hall/resi-hall-server/pom.xml @@ -98,6 +98,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -124,6 +130,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -150,6 +162,12 @@ true + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -173,6 +191,13 @@ true + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java index a20d0e61bc..243236c3c5 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java @@ -1,8 +1,6 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.annotation.RequirePermission; -import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -222,5 +220,17 @@ public class IssueController { return new Result>().ok(issueService.processList(issueId)); } + /** + * @param formDTO + * @author yinzuomei + * @description 居民端-议题发表建议 + * @Date 2020/11/18 13:09 + **/ + @PostMapping("publishsuggestion") + public Result publisSuggestion(@RequestBody PublishSuggestionFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,PublishSuggestionFormDTO.AddUserShowGroup.class,PublishSuggestionFormDTO.AddUserInternalGroup.class); + PublishSuggestionResultDTO resultDTO=issueService.publisSuggestion(formDTO); + return new Result().ok(resultDTO); + } } diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/IssueService.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/IssueService.java index d71c3e4b03..32f20b43f6 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/IssueService.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/IssueService.java @@ -1,11 +1,9 @@ package com.epmet.service; -import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.*; import com.epmet.dto.result.*; -import org.springframework.web.bind.annotation.RequestBody; import java.util.List; @@ -112,4 +110,11 @@ public interface IssueService { */ List getShiftProjectList(ShiftProjectListFromDTO formDTO); + /** + * @param formDTO + * @author yinzuomei + * @description 居民端-议题发表建议 + * @Date 2020/11/18 13:11 + **/ + PublishSuggestionResultDTO publisSuggestion(PublishSuggestionFormDTO formDTO); } diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 0551eb8423..09275542f6 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -1,11 +1,14 @@ package com.epmet.service.impl; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constat.HallConstat; +import com.epmet.dto.IssueSuggestionDTO; import com.epmet.dto.form.CheckVoteFormDTO; import com.epmet.dto.TopicInfoDTO; import com.epmet.dto.form.*; @@ -38,6 +41,10 @@ public class IssueServiceImpl implements IssueService { private GovIssueFeignClient govIssueFeignClient; @Autowired private GovProjectFeignClient govProjectFeignClient; + @Autowired + private GovIssueOpenFeignClient govIssueOpenFeignClient; + @Autowired + private LoginUserUtil loginUserUtil; /** * @param issueDetail @@ -96,6 +103,14 @@ public class IssueServiceImpl implements IssueService { //已关闭议题,无需判断 issueDetailResult.setProjectStatus(true); } + Result issueSuggestionDTOResult=govIssueOpenFeignClient.queryIssueSuggestion(new UserIssueSuggestionFormDTO(loginUserUtil.getLoginUserId(),issueDetail.getIssueId())); + if(!issueSuggestionDTOResult.success()||null==issueSuggestionDTOResult.getData()){ + issueDetailResult.setPublishIdeaFlag(false); + issueDetailResult.setIssueIdea(StrConstant.EPMETY_STR); + }else{ + issueDetailResult.setPublishIdeaFlag(true); + issueDetailResult.setIssueIdea(issueSuggestionDTOResult.getData().getSuggestion()); + } return issueDetailResult; } @@ -285,6 +300,26 @@ public class IssueServiceImpl implements IssueService { return resultList; } + /** + * @param formDTO + * @author yinzuomei + * @description 居民端-议题发表建议 + * @Date 2020/11/18 13:11 + **/ + @Override + public PublishSuggestionResultDTO publisSuggestion(PublishSuggestionFormDTO formDTO) { + IssueSuggestionDTO issueSuggestionDTO = new IssueSuggestionDTO(); + issueSuggestionDTO.setSuggestion(formDTO.getSuggestion()); + issueSuggestionDTO.setIssueId(formDTO.getIssueId()); + issueSuggestionDTO.setPublicFlag(formDTO.getPublicFlag() == true ? NumConstant.ONE : NumConstant.ZERO); + issueSuggestionDTO.setCreatedBy(loginUserUtil.getLoginUserId()); + Result result = govIssueOpenFeignClient.saveIssueSuggestion(issueSuggestionDTO); + if (result.success() && null != result.getData()) { + return new PublishSuggestionResultDTO(result.getData().getIssueId(), result.getData().getSuggestionId()); + } + throw new RenException(result.getCode()); + } + /** * @Description 议题处理进展 * @param issueId diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/resources/bootstrap.yml b/epmet-module/resi-hall/resi-hall-server/src/main/resources/bootstrap.yml index 58e251be5b..479945892d 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-hall/resi-hall-server/src/main/resources/bootstrap.yml @@ -70,3 +70,8 @@ hystrix: ribbon: ReadTimeout: 300000 ConnectTimeout: 300000 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/resources/logback-spring.xml b/epmet-module/resi-hall/resi-hall-server/src/main/resources/logback-spring.xml index 39a130d7e1..be2d2c27e7 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/resources/logback-spring.xml +++ b/epmet-module/resi-hall/resi-hall-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/resi-home/resi-home-server/pom.xml b/epmet-module/resi-home/resi-home-server/pom.xml index d43f84aaa6..dac75fd41b 100644 --- a/epmet-module/resi-home/resi-home-server/pom.xml +++ b/epmet-module/resi-home/resi-home-server/pom.xml @@ -116,6 +116,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -140,6 +146,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -164,6 +176,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -185,6 +203,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/resi-home/resi-home-server/src/main/resources/bootstrap.yml b/epmet-module/resi-home/resi-home-server/src/main/resources/bootstrap.yml index afb7ab3e38..3c5dee1515 100644 --- a/epmet-module/resi-home/resi-home-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-home/resi-home-server/src/main/resources/bootstrap.yml @@ -69,3 +69,8 @@ hystrix: ribbon: ReadTimeout: 300000 ConnectTimeout: 300000 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ diff --git a/epmet-module/resi-home/resi-home-server/src/main/resources/logback-spring.xml b/epmet-module/resi-home/resi-home-server/src/main/resources/logback-spring.xml index a53039bc12..81dec45754 100644 --- a/epmet-module/resi-home/resi-home-server/src/main/resources/logback-spring.xml +++ b/epmet-module/resi-home/resi-home-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/resi-mine/resi-mine-server/pom.xml b/epmet-module/resi-mine/resi-mine-server/pom.xml index 503a34030f..9c58ab4a92 100644 --- a/epmet-module/resi-mine/resi-mine-server/pom.xml +++ b/epmet-module/resi-mine/resi-mine-server/pom.xml @@ -145,6 +145,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -168,6 +174,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -191,6 +203,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -211,6 +229,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml b/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml index 6e5eb54cc2..eff0b2bbb3 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml @@ -97,3 +97,8 @@ hystrix: ribbon: ReadTimeout: 300000 ConnectTimeout: 300000 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/resources/logback-spring.xml b/epmet-module/resi-mine/resi-mine-server/src/main/resources/logback-spring.xml index ffa4fdd447..2893426200 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/resources/logback-spring.xml +++ b/epmet-module/resi-mine/resi-mine-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/resi-partymember/resi-partymember-server/pom.xml b/epmet-module/resi-partymember/resi-partymember-server/pom.xml index 74088b3ac0..63d0d5e4bf 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/pom.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/pom.xml @@ -146,6 +146,13 @@ false + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -178,6 +185,13 @@ false + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -210,6 +224,13 @@ true + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -239,6 +260,14 @@ true + + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml index a2118ff3a3..62322c11c8 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml @@ -117,4 +117,9 @@ ribbon: #pageHelper分页插件 pagehelper: helper-dialect: mysql - reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 \ No newline at end of file + reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/logback-spring.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/logback-spring.xml index 02b45f2efc..ce07d2963b 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/logback-spring.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-module/resi-voice/resi-voice-server/pom.xml b/epmet-module/resi-voice/resi-voice-server/pom.xml index 9985f3c6a5..4a1a3a18dc 100644 --- a/epmet-module/resi-voice/resi-voice-server/pom.xml +++ b/epmet-module/resi-voice/resi-voice-server/pom.xml @@ -102,6 +102,13 @@ false + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -126,6 +133,13 @@ false + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -150,6 +164,13 @@ false + + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -174,6 +195,14 @@ false + + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml b/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml index 03891ed01a..589e4fb19e 100644 --- a/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml @@ -65,3 +65,8 @@ hystrix: ribbon: ReadTimeout: 300000 ConnectTimeout: 300000 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ diff --git a/epmet-module/resi-voice/resi-voice-server/src/main/resources/logback-spring.xml b/epmet-module/resi-voice/resi-voice-server/src/main/resources/logback-spring.xml index 98bc0a986b..c6e86ca128 100644 --- a/epmet-module/resi-voice/resi-voice-server/src/main/resources/logback-spring.xml +++ b/epmet-module/resi-voice/resi-voice-server/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-openapi/epmet-openapi-scan/pom.xml b/epmet-openapi/epmet-openapi-scan/pom.xml index c77bafe339..b80b8a843e 100644 --- a/epmet-openapi/epmet-openapi-scan/pom.xml +++ b/epmet-openapi/epmet-openapi-scan/pom.xml @@ -104,6 +104,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -129,6 +135,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -150,6 +162,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -175,6 +193,14 @@ false + + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml b/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml index 84000daee9..2c2a29d61a 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml +++ b/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml @@ -77,3 +77,8 @@ aliyun: regionId: cn-shanghai bizType: epmet_img_text +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ + diff --git a/epmet-openapi/epmet-openapi-scan/src/main/resources/logback-spring.xml b/epmet-openapi/epmet-openapi-scan/src/main/resources/logback-spring.xml index d244b6fa2a..9d2ad51e14 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/resources/logback-spring.xml +++ b/epmet-openapi/epmet-openapi-scan/src/main/resources/logback-spring.xml @@ -5,6 +5,8 @@ + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index f58c03e801..4577b8f301 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -402,6 +402,15 @@ public interface EpmetUserOpenFeignClient { @PostMapping("/epmetuser/customerstaff/getstaffbasicinfo") Result getStaffBasicInfo(@RequestBody StaffBasicInfoFromDTO fromDTO); + /** + * @Description 根据角色key查询具有该key的所有角色列表 + * @return + * @author wxz + * @date 2020.11.17 16:20 + */ + @PostMapping("/epmetuser/govstaffrole/list-roles-by-rolekey/{role-key}") + Result> listRolesByRoleKey(@PathVariable("role-key") String roleKey); + /** * @Description 个人中心-我的建议列表 * @param dto diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 1a1da3db60..7f5e340b4b 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -278,6 +278,11 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffBasicInfo", fromDTO); } + @Override + public Result> listRolesByRoleKey(String roleKey) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "listRolesByRoleKey", roleKey); + } + @Override public Result> myAdviceList(MyAdviceListFormDTO dto) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "myAdviceList", dto); diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index ee7aa35693..7bd6cc6b0e 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -156,6 +156,12 @@ false https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -188,6 +194,12 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + https://epmet-dev.elinkservice.cn/api/epmetscan/api @@ -222,6 +234,12 @@ true https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + @@ -252,6 +270,13 @@ true https://epmet-open.elinkservice.cn/api/epmetscan/api + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GovStaffRoleController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GovStaffRoleController.java index 81a79972c0..40cab6cb5a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GovStaffRoleController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GovStaffRoleController.java @@ -100,4 +100,16 @@ public class GovStaffRoleController { return new Result(); } + /** + * @Description 根据角色key查询具有该key的所有角色列表 + * @return + * @author wxz + * @date 2020.11.17 16:20 + */ + @PostMapping("list-roles-by-rolekey/{role-key}") + public Result> listRolesByRoleKey(@PathVariable("role-key") String roleKey) { + List roles = govStaffRoleService.listRolesByRoleKey(roleKey); + return new Result>().ok(roles); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GovStaffRoleDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GovStaffRoleDao.java index aab3c4ae30..f7875d63d5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GovStaffRoleDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GovStaffRoleDao.java @@ -75,4 +75,6 @@ public interface GovStaffRoleDao extends BaseDao { int updateColumnsById(@Param("roleId") String roleId, @Param("roleName") String roleName); int updateSortById(@Param("roleId") String roleId, @Param("sort") int sort); + + List listRolesByRoleKey(@Param("roleKey") String roleKey); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java index ef513d0ac7..d0f6b2def7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java @@ -75,4 +75,6 @@ public interface UserWechatDao extends BaseDao{ **/ List selectResiAndStrangerInfo(@Param("userIds") List userIds, @Param("realName")String realName); + //临时用下in + List selectNotInUserBaseInfoTemp(); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GovStaffRoleService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GovStaffRoleService.java index eef3e6f0b0..346fad61b2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GovStaffRoleService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GovStaffRoleService.java @@ -138,4 +138,6 @@ public interface GovStaffRoleService extends BaseService { int updateRole(String roleId, String roleName); void saveSortOrder(List roleIdList); + + List listRolesByRoleKey(String roleKey); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java index 6a22460731..726be2370d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java @@ -222,4 +222,15 @@ public class GovStaffRoleServiceImpl extends BaseServiceImpl listRolesByRoleKey(String roleKey) { + return govStaffRoleDao.listRolesByRoleKey(roleKey); + } } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index 7143b7d171..326e74912d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -166,7 +166,7 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl userWechatDTOList=userWechatDao.selectAll(); + List userWechatDTOList=userWechatDao.selectNotInUserBaseInfoTemp(); List userIdList=new ArrayList<>(); for(UserWechatDTO userWechatDTO:userWechatDTOList){ userIdList.add(userWechatDTO.getUserId()); @@ -202,12 +202,12 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl + + ${appname} @@ -125,11 +127,14 @@ 15 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml index 1a8c27b7d0..40539c565f 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml @@ -103,4 +103,12 @@ ) + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml index 0dddb3b46c..1203a01e12 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml @@ -52,34 +52,28 @@ diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml index 98a5c58075..5797e95eef 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml @@ -115,4 +115,24 @@ ORDER BY base.REAL_NAME , wechat.NICKNAME + + +