From ed0251beaaf3343fcd14a3520299ad959a14a780 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 12 Oct 2020 10:17:04 +0800 Subject: [PATCH 01/53] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=B6=88=E6=81=AF=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/wxapi/enums/WxMaErrorMsgEnum.java | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/enums/WxMaErrorMsgEnum.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/enums/WxMaErrorMsgEnum.java index 29e341df7a..1e9425c7ec 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/enums/WxMaErrorMsgEnum.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/enums/WxMaErrorMsgEnum.java @@ -476,6 +476,17 @@ public enum WxMaErrorMsgEnum { CODE_85012(85012, "无效的审核 id"), + CODE_87006(87006, "小游戏不能提交"), + CODE_86007(86007, "小程序禁止提交"), + CODE_85051(85012, "version_desc或者preview_info超限"), + CODE_85092(85092, "preview_info格式错误"), + CODE_85093(85093, "preview_info 视频或者图片个数超限"), + CODE_85094(85094, "需提供审核机制说明信息"), + CODE_86009(86009, "服务商新增小程序代码提审能力被限制"), + CODE_86010(86010, "服务商迭代小程序代码提审能力被限制"), + CODE_9400001(9400001, "该开发小程序已开通小程序直播权限,不支持发布版本。如需发版,请解绑开发小程序后再操作"), + CODE_9402202(9402202, "请勿频繁提交,待上一次操作完成后再提交"), + CODE_87013(87013, "撤回次数达到上限(每天一次,每个月 10 次)"), CODE_85019(85019, "没有审核版本"), @@ -539,6 +550,38 @@ public enum WxMaErrorMsgEnum { CODE_200020(200020, "关键词列表 kidList 参数错误"), CODE_200021(200021, "场景描述 sceneDesc 参数错误"), + + CODE_20002(20002, "商品id不存在"), + CODE_1003(1003, "POST参数非法"), + CODE_40005(40005, "上传素材文件格式不对"), + CODE_40006(40006, "上传素材文件大小超出限制"), + CODE_40008(40008, "不合法的消息类型"), + CODE_40010(40010, "不合法的语音文件大小"), + CODE_40011(40011, "不合法的视频文件大小"), + CODE_40012(40012, "不合法的缩略图文件大小"), + CODE_40015(40015, "不合法的菜单类型"), + CODE_40016(40016, "不合法的按钮个数"), + CODE_40017(40017, "不合法的按钮类型"), + CODE_40018(40018, "不合法的按钮名字长度"), + CODE_40019(40019, "不合法的按钮 KEY 长度"), + CODE_40020(40020, "不合法的按钮 URL 长度"), + CODE_40021(40021, "不合法的菜单版本号"), + CODE_40022(40022, "不合法的子菜单级数"), + CODE_40023(40023, "不合法的子菜单按钮个数"), + CODE_40024(40024, "不合法的子菜单按钮类型"), + CODE_40025(40025, "不合法的子菜单按钮名字长度"), + CODE_40026(40026, "不合法的子菜单按钮 KEY 长度"), + CODE_40027(40027, "不合法的子菜单按钮 URL 长度"), + CODE_40028(40028, "不合法的自定义菜单使用用户"), + CODE_40030(40030, "不合法的 refresh_token"), + CODE_40031(40031, "不合法的 openid 列表"), + CODE_40032(40032, "不合法的 openid 列表长度"), + CODE_40033(40033, "不合法的请求字符,不能包含 \\uxxxx 格式的字符"), + CODE_40034(40034, "无效的模板大小"), + CODE_40035(40035, "不合法的参数"), + CODE_40036(40036, "不合法的 template_id 长度"), + CODE_40038(40038, "不合法的请求格式"), + ; private int code; From f2428906e944bb9781edfe213c7e772be3b0702e Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 21 Oct 2020 10:20:42 +0800 Subject: [PATCH 02/53] =?UTF-8?q?dimPartyMember=E4=BF=A1=E6=81=AF=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=B7=BB=E5=8A=A0=E6=8C=87=E5=AE=9A=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=8C=BA=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/CustomerIdAndDateIdFormDTO.java | 5 +- .../com/epmet/controller/DimController.java | 1 - .../DimCustomerPartymemberServiceImpl.java | 63 +++++++++++-------- .../impl/DimPartyMemberServiceImpl.java | 16 ++--- 4 files changed, 45 insertions(+), 40 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/CustomerIdAndDateIdFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/CustomerIdAndDateIdFormDTO.java index 820d3a5447..e811c0aea0 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/CustomerIdAndDateIdFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/CustomerIdAndDateIdFormDTO.java @@ -19,6 +19,9 @@ public class CustomerIdAndDateIdFormDTO implements Serializable { private String customerId; - @NotBlank(message = "日期Id不能为空",groups = CustomerIdAndDateId.class) private String dateId; + + private String startDate; + + private String endDate; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java index 8796c77d71..3e2a78b716 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java @@ -263,7 +263,6 @@ public class DimController { */ @PostMapping("statsparty") public Result getPartyInfo(@RequestBody CustomerIdAndDateIdFormDTO customerIdAndDateIdFormDTO) { - ValidatorUtils.validateEntity(customerIdAndDateIdFormDTO, CustomerIdAndDateIdFormDTO.CustomerIdAndDateId.class); return new Result().ok(partyMemberService.statsPartyMember(customerIdAndDateIdFormDTO)); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java index 0b0e1fa1ae..4215c1fe59 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java @@ -41,6 +41,7 @@ import com.epmet.service.partymember.PartyMemberService; import com.epmet.service.stats.DimCustomerPartymemberService; import com.epmet.service.stats.DimCustomerService; import com.epmet.service.stats.DimGridService; +import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; @@ -49,10 +50,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -134,32 +132,45 @@ public class DimCustomerPartymemberServiceImpl extends BaseServiceImpl allCustomerId = dimCustomerService.getAllCustomerId(); - if (CollectionUtils.isEmpty(allCustomerId)){ + String customerIdOne = customerIdAndDateIdFormDTO.getCustomerId(); + List customerIds = new ArrayList<>(); + List dateIds = new ArrayList<>(); + if (StringUtils.isNotBlank(customerIdOne)){ + customerIds.add(customerIdOne); + }else { + customerIds = dimCustomerService.getAllCustomerId(); + } + if (CollectionUtils.isEmpty(customerIds)){ throw new RenException(StatsConstant.CUSTOMER_INFO_NULL); } - allCustomerId.forEach(customerId -> { - String dateId = customerIdAndDateIdFormDTO.getDateId(); - List partyMemberList = partyMemberService.selectPartyMemberInfo(customerId, dateId); - if (CollectionUtils.isEmpty(partyMemberList)){ - log.warn(String.format(StatsConstant.PARTY_INFO_LIST,customerId)); - return; - } - List gridIds = partyMemberList.stream().map(party -> party.getGridId()).distinct().collect(Collectors.toList()); - List agencyInfos = dimGridService.selectGridBelongAgencyInfo(gridIds); - TimeListResultDTO timeList = DateUtils.getTimeList(dateId); - partyMemberList.forEach(party -> { - BeanUtils.copyProperties(timeList,party); - agencyInfos.forEach(agency -> { - if (party.getGridId().equals(agency.getGridId())){ - party.setAgencyId(agency.getAgencyId()); - party.setParentId(agency.getParentId()); - party.setPids(agency.getPids()); - } + if ((StringUtils.isBlank(customerIdAndDateIdFormDTO.getStartDate()) && StringUtils.isBlank(customerIdAndDateIdFormDTO.getEndDate()))){ + dateIds.add(DimIdGenerator.getDateDimId(DateUtils.addDateDays(new Date(), -1))); + }else { + dateIds = DateUtils.getDaysBetween(customerIdAndDateIdFormDTO.getStartDate(), customerIdAndDateIdFormDTO.getEndDate()); + } + List finalDateIds = dateIds; + customerIds.forEach(customerId -> { + finalDateIds.forEach(dateId -> { + List partyMemberList = partyMemberService.selectPartyMemberInfo(customerId, dateId); + if (CollectionUtils.isEmpty(partyMemberList)){ + log.warn(String.format(StatsConstant.PARTY_INFO_LIST,customerId)); + return; + } + List gridIds = partyMemberList.stream().map(party -> party.getGridId()).distinct().collect(Collectors.toList()); + List agencyInfos = dimGridService.selectGridBelongAgencyInfo(gridIds); + TimeListResultDTO timeList = DateUtils.getTimeList(dateId); + partyMemberList.forEach(party -> { + BeanUtils.copyProperties(timeList,party); + agencyInfos.forEach(agency -> { + if (party.getGridId().equals(agency.getGridId())){ + party.setAgencyId(agency.getAgencyId()); + party.setParentId(agency.getParentId()); + party.setPids(agency.getPids()); + } + }); }); + delAndInsertParty(partyMemberList,customerId,dateId); }); - delAndInsertParty(partyMemberList,customerId,dateId); }); return true; } diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DimPartyMemberServiceImpl.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DimPartyMemberServiceImpl.java index 2fc5ea1378..ca4d773f2a 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DimPartyMemberServiceImpl.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DimPartyMemberServiceImpl.java @@ -1,7 +1,6 @@ package com.epmet.service.impl; -import com.alibaba.druid.util.StringUtils; -import com.epmet.commons.tools.constant.NumConstant; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; import com.epmet.feign.DataStatisticalOpenFeignClient; @@ -23,15 +22,8 @@ public class DimPartyMemberServiceImpl implements DimPartyMemberService { @Override - public Result getPartyInfo(String dateId) { - CustomerIdAndDateIdFormDTO c = new CustomerIdAndDateIdFormDTO(); - if (!StringUtils.isEmpty(dateId)) { - c.setDateId(dateId); - }else { - String now = LocalDate.now().minusDays(NumConstant.ONE).toString(); - String concat = now.substring(NumConstant.ZERO, NumConstant.FOUR).concat(now.substring(NumConstant.FIVE, NumConstant.SEVEN)).concat(now.substring(NumConstant.EIGHT, NumConstant.TEN)); - c.setDateId(concat); - } - return statsFeignClient.getPartyInfo(c); + public Result getPartyInfo(String form) { + CustomerIdAndDateIdFormDTO customerIdAndDateIdFormDTO = JSON.parseObject(form, CustomerIdAndDateIdFormDTO.class); + return statsFeignClient.getPartyInfo(customerIdAndDateIdFormDTO); } } From de9ca7019e738589a8171ddd4d9df12d579948fb Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 21 Oct 2020 13:25:42 +0800 Subject: [PATCH 03/53] =?UTF-8?q?dimPartyMember=E4=BF=A1=E6=81=AF=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stats/impl/DimCustomerPartymemberServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java index 4215c1fe59..5aa8fb1d26 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java @@ -144,7 +144,11 @@ public class DimCustomerPartymemberServiceImpl extends BaseServiceImpl Date: Wed, 21 Oct 2020 14:28:03 +0800 Subject: [PATCH 04/53] =?UTF-8?q?treebytype=E6=8E=A5=E5=8F=A3=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/screen/AgencyController.java | 5 +++ .../screen/ScreenCustomerAgencyDao.java | 4 ++ .../evaluationindex/screen/AgencyService.java | 2 + .../screen/impl/AgencyServiceImpl.java | 45 +++++++++++++++++++ .../mapper/screen/ScreenCustomerAgencyDao.xml | 38 ++++++++++++++++ 5 files changed, 94 insertions(+) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java index 035dab63d9..accd1e6e2e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java @@ -33,6 +33,11 @@ public class AgencyController { return new Result().ok(agencyService.tree(customerId)); } + @PostMapping("treebytype") + public Result treeByType(@RequestHeader("CustomerId") String customerId,@RequestParam("bizType")String bizType){ + return new Result().ok(agencyService.treeByType(customerId,bizType)); + } + /** * @Description 2、组织区域查询 * @param compartmentFormDTO diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index 88aaf3ae2f..c49b83e304 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -40,6 +40,8 @@ public interface ScreenCustomerAgencyDao { */ TreeResultDTO selectRootAgencyId(@Param("customerId")String customerId); + TreeResultDTO selectRootAgencyIdByBizType(@Param("customerId")String customerId,@Param("bizType")String bizType); + /** * @Description 查询下级机关的 名称和id * @param subAgencyPids @@ -48,6 +50,8 @@ public interface ScreenCustomerAgencyDao { */ List selectSubAgencyList(@Param("subAgencyPids") String subAgencyPids); + List selectSubAgencyListByBizType(@Param("subAgencyPids") String subAgencyPids); + /** * @Description 查询当前机关的区域信息 * @param agencyId diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java index eee423ca41..bb39b8ebc3 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java @@ -20,6 +20,8 @@ public interface AgencyService { */ TreeResultDTO tree(String customerId); + TreeResultDTO treeByType(String customerId,String bizType); + /** * @Description 2、组织区域查询 * @param compartmentFormDTO diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index 104e941333..3263eb756c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -66,6 +66,29 @@ public class AgencyServiceImpl implements AgencyService { return rootAgency; } + @Override + public TreeResultDTO treeByType(String customerId, String bizType) { + TreeResultDTO rootAgency = null; + try { + rootAgency = screenCustomerAgencyDao.selectRootAgencyIdByBizType(customerId,bizType); + if (null == rootAgency) { + return new TreeResultDTO(); + } + } catch (TooManyResultsException e) { + throw new RenException("根组织结构数据有误"); + } + List centerMark = this.getCenterMark(rootAgency.getCenterMarkA()); + rootAgency.setCenterMark(centerMark.size() == NumConstant.ZERO ? new ArrayList<>() : centerMark); + if (rootAgency.getLevel().equals(ScreenConstant.COMMUNITY)) { + List treeResultDTOS = screenCustomerGridDao.selectGridInfo(rootAgency.getValue()); + rootAgency.setChildren(treeResultDTOS); + } else { + List departmentList = this.getDepartmentListByBiz(("".equals(rootAgency.getPids()) || rootAgency.getPids().equals(NumConstant.ZERO_STR)) ? rootAgency.getValue() : rootAgency.getPids().concat(",").concat(rootAgency.getValue())); + rootAgency.setChildren(departmentList); + } + return rootAgency; + } + /** * @Description 处理centerMark * @param centerMark @@ -113,6 +136,28 @@ public class AgencyServiceImpl implements AgencyService { return subAgencyList; } + public List getDepartmentListByBiz(String subAgencyPids) { + List subAgencyList = screenCustomerAgencyDao.selectSubAgencyListByBizType(subAgencyPids); + if (subAgencyList.size() > NumConstant.ZERO) { + subAgencyList.forEach(sub -> { + List centerMark = this.getCenterMark(sub.getCenterMarkA()); + sub.setCenterMark(centerMark.size() == NumConstant.ZERO ? new ArrayList<>() : centerMark); + if (sub.getLevel().equals(ScreenConstant.COMMUNITY)){ + List treeResultDTOS = screenCustomerGridDao.selectGridInfo(sub.getValue()); + treeResultDTOS.forEach(tree -> { + List centerMarkTree = this.getCenterMark(tree.getCenterMarkA()); + tree.setCenterMark(centerMarkTree.size() == NumConstant.ZERO ? new ArrayList<>() : centerMarkTree); + }); + sub.setChildren(treeResultDTOS); + }else { + List subAgency = getDepartmentList(sub.getPids() + "," + sub.getValue()); + sub.setChildren(subAgency); + } + }); + } + return subAgencyList; + } + /** * @Description 2、组织区域查询 * @param compartmentFormDTO diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index 969bcea847..709d13dc5c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -114,4 +114,42 @@ AND agency_id = #{agencyId} + + + + \ No newline at end of file From 0fe416c92101a292fd3fb00ad0b2ed9d73fa9dcb Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 21 Oct 2020 14:42:54 +0800 Subject: [PATCH 05/53] =?UTF-8?q?treebytype=E6=8E=A5=E5=8F=A3=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/AgencyServiceImpl.java | 14 ++++++++++++-- .../mapper/screen/ScreenCustomerAgencyDao.xml | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index 3263eb756c..9da23db2e6 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -128,7 +128,12 @@ public class AgencyServiceImpl implements AgencyService { }); sub.setChildren(treeResultDTOS); }else { - List subAgency = getDepartmentList(sub.getPids() + "," + sub.getValue()); + List subAgency = new ArrayList<>(); + if (sub.getPids().contains(",")){ + subAgency = getDepartmentList(sub.getPids() + "," + sub.getValue()); + }else { + subAgency = getDepartmentList(sub.getPids() + ":" + sub.getValue()); + } sub.setChildren(subAgency); } }); @@ -150,7 +155,12 @@ public class AgencyServiceImpl implements AgencyService { }); sub.setChildren(treeResultDTOS); }else { - List subAgency = getDepartmentList(sub.getPids() + "," + sub.getValue()); + List subAgency = new ArrayList<>(); + if (sub.getPids().contains(",")){ + subAgency = getDepartmentList(sub.getPids() + "," + sub.getValue()); + }else { + subAgency = getDepartmentList(sub.getPids() + ":" + sub.getValue()); + } sub.setChildren(subAgency); } }); diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index 709d13dc5c..5005b87c02 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -146,6 +146,7 @@ WHERE ca.del_flag = '0' AND cbo.DEL_FLAG = 0 + AND cbo.biz_type = "community" AND ca.IS_DISPLAY = '1' AND ca.pids = #{subAgencyPids} ORDER BY From e11f8476603f9b1c1aac6339b48543b45a51ef1d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 21 Oct 2020 14:46:56 +0800 Subject: [PATCH 06/53] =?UTF-8?q?treebytype=E6=8E=A5=E5=8F=A3=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/constant/ScreenConstant.java | 2 ++ .../screen/impl/AgencyServiceImpl.java | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java index 96005bfcc3..5ea0aa7cbf 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java @@ -16,6 +16,8 @@ public interface ScreenConstant { String COMMA = ","; + String COLON = ":"; + String MONTH_ID = "month"; String YEAR_ID = "year"; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index 9da23db2e6..e53a9eb10e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -129,10 +129,10 @@ public class AgencyServiceImpl implements AgencyService { sub.setChildren(treeResultDTOS); }else { List subAgency = new ArrayList<>(); - if (sub.getPids().contains(",")){ - subAgency = getDepartmentList(sub.getPids() + "," + sub.getValue()); + if (sub.getPids().contains(ScreenConstant.COMMA)){ + subAgency = getDepartmentList(sub.getPids() + ScreenConstant.COMMA + sub.getValue()); }else { - subAgency = getDepartmentList(sub.getPids() + ":" + sub.getValue()); + subAgency = getDepartmentList(sub.getPids() + ScreenConstant.COLON + sub.getValue()); } sub.setChildren(subAgency); } @@ -156,10 +156,10 @@ public class AgencyServiceImpl implements AgencyService { sub.setChildren(treeResultDTOS); }else { List subAgency = new ArrayList<>(); - if (sub.getPids().contains(",")){ - subAgency = getDepartmentList(sub.getPids() + "," + sub.getValue()); + if (sub.getPids().contains(ScreenConstant.COMMA)){ + subAgency = getDepartmentList(sub.getPids() + ScreenConstant.COMMA + sub.getValue()); }else { - subAgency = getDepartmentList(sub.getPids() + ":" + sub.getValue()); + subAgency = getDepartmentList(sub.getPids() + ScreenConstant.COLON + sub.getValue()); } sub.setChildren(subAgency); } From eba00a4d1cfae5b3e95d8ffb8c84a75c0f2bd6ce Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 21 Oct 2020 14:50:20 +0800 Subject: [PATCH 07/53] =?UTF-8?q?=E6=99=BA=E6=85=A7=E7=A4=BE=E5=8C=BA?= =?UTF-8?q?=E7=9A=84tree?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/screen/AgencyController.java | 7 +++++++ .../evaluationindex/screen/AgencyService.java | 7 +++++++ .../screen/impl/AgencyServiceImpl.java | 17 +++++++++++++++-- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java index accd1e6e2e..0b978ce9b0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java @@ -33,6 +33,13 @@ public class AgencyController { return new Result().ok(agencyService.tree(customerId)); } + /** + * @Description 智慧社区的tree + * @Param customerId + * @Param bizType + * @author zxc + * @date 2020/10/21 2:49 下午 + */ @PostMapping("treebytype") public Result treeByType(@RequestHeader("CustomerId") String customerId,@RequestParam("bizType")String bizType){ return new Result().ok(agencyService.treeByType(customerId,bizType)); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java index bb39b8ebc3..7e07abbcf2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java @@ -20,6 +20,13 @@ public interface AgencyService { */ TreeResultDTO tree(String customerId); + /** + * @Description 智慧社区的tree + * @Param customerId + * @Param bizType + * @author zxc + * @date 2020/10/21 2:49 下午 + */ TreeResultDTO treeByType(String customerId,String bizType); /** diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index e53a9eb10e..ac4befa559 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -66,6 +66,13 @@ public class AgencyServiceImpl implements AgencyService { return rootAgency; } + /** + * @Description 智慧社区的tree + * @Param customerId + * @Param bizType + * @author zxc + * @date 2020/10/21 2:49 下午 + */ @Override public TreeResultDTO treeByType(String customerId, String bizType) { TreeResultDTO rootAgency = null; @@ -141,6 +148,12 @@ public class AgencyServiceImpl implements AgencyService { return subAgencyList; } + /** + * @Description 智慧社区的tree + * @Param subAgencyPids + * @author zxc + * @date 2020/10/21 2:49 下午 + */ public List getDepartmentListByBiz(String subAgencyPids) { List subAgencyList = screenCustomerAgencyDao.selectSubAgencyListByBizType(subAgencyPids); if (subAgencyList.size() > NumConstant.ZERO) { @@ -157,9 +170,9 @@ public class AgencyServiceImpl implements AgencyService { }else { List subAgency = new ArrayList<>(); if (sub.getPids().contains(ScreenConstant.COMMA)){ - subAgency = getDepartmentList(sub.getPids() + ScreenConstant.COMMA + sub.getValue()); + subAgency = getDepartmentListByBiz(sub.getPids() + ScreenConstant.COMMA + sub.getValue()); }else { - subAgency = getDepartmentList(sub.getPids() + ScreenConstant.COLON + sub.getValue()); + subAgency = getDepartmentListByBiz(sub.getPids() + ScreenConstant.COLON + sub.getValue()); } sub.setChildren(subAgency); } From 744922381dcc91295d6905342615ff4b0fc706ff Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 21 Oct 2020 15:17:22 +0800 Subject: [PATCH 08/53] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=AE=A2=E6=88=B7=E4=B8=9A=E5=8A=A1=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=85=B3=E7=B3=BB=E6=8E=A5=E5=8F=A3=20=E7=94=A8=E4=BA=8E?= =?UTF-8?q?=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/CustomerBizOrgFormDTO.java | 26 ++++++ .../ShiBeiScreenCollController.java | 9 ++ .../screen/ScreenCustomerAgencyDao.java | 7 +- .../screen/ScreenCustomerBizOrgDao.java | 40 +++++++++ .../screen/ScreenCustomerBizOrgEntity.java | 52 ++++++++++++ .../screen/ScreenCustomerGridService.java | 13 ++- .../screen/ShiBeiScreenCollService.java | 13 ++- .../impl/ScreenCustomerGridServiceImpl.java | 9 +- .../impl/ShiBeiScreenCollServiceImpl.java | 82 +++++++++++++------ .../screen/ScreenCustomerAgencyDao.xml | 1 + .../screen/ScreenCustomerBizOrgDao.xml | 39 +++++++++ 11 files changed, 257 insertions(+), 34 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/CustomerBizOrgFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerBizOrgDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerBizOrgEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerBizOrgDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/CustomerBizOrgFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/CustomerBizOrgFormDTO.java new file mode 100644 index 0000000000..f342ac03bd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/CustomerBizOrgFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import java.io.Serializable; + +/** + * 客户业务组织关系 入参 + */ +@Data +public class CustomerBizOrgFormDTO implements Serializable { + + + /** + * 当为true时后台将删除本月数据 + */ + @NotEmpty(message = "客户Id不能为空") + private String customerId; + + /** + * 业务类型:智慧社区: community + */ + @NotEmpty(message = "业务类型不能为空") + private String bizType; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiScreenCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiScreenCollController.java index a55567eb45..6cdc9ca44a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiScreenCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiScreenCollController.java @@ -1,6 +1,7 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; import com.epmet.dto.screencoll.form.*; import com.epmet.service.evaluationindex.screen.ShiBeiScreenCollService; import org.springframework.beans.factory.annotation.Autowired; @@ -261,4 +262,12 @@ public class ShiBeiScreenCollController { shiBeiScreenCollService.insertPublicPartiTotalData(formDTO, customerId); return new Result(); } + + /** + * 初始化客户业务组织类型 + **/ + @PostMapping("initbizorg") + public Result initBizOrg(@RequestBody CustomerBizOrgFormDTO formDTO) { + return new Result().ok(shiBeiScreenCollService.initBizOrg(formDTO)); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index f7ea7ddb79..3b43d23c4d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -23,6 +23,7 @@ import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO; import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO; import com.epmet.dto.extract.result.CustomerAgencyInfoResultDTO; import com.epmet.dto.extract.result.OrgNameResultDTO; +import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; import com.epmet.dto.screen.result.TreeResultDTO; import com.epmet.dto.screencoll.form.CustomerAgencyFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; @@ -165,13 +166,15 @@ public interface ScreenCustomerAgencyDao extends BaseDao selectAllAgencyIdToPartyLinkMessage(@Param("customerId") String customerId,@Param("monthId") String monthId); - List selectAllAgencyIdToOrganize(@Param("customerId") String customerId,@Param("monthId") String monthId); + List selectAllAgencyIdToOrganize(@Param("customerId") String customerId, @Param("monthId") String monthId); /** - * @Description 查询org名称【机关】 * @param agencyIds + * @Description 查询org名称【机关】 * @author zxc * @date 2020/9/24 1:27 下午 */ List selectOrgNameAgency(@Param("agencyIds") List agencyIds); + + Boolean initBizOrg(CustomerBizOrgFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerBizOrgDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerBizOrgDao.java new file mode 100644 index 0000000000..442e7593a3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerBizOrgDao.java @@ -0,0 +1,40 @@ +/** + * 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.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerBizOrgEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 组织机构信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenCustomerBizOrgDao extends BaseDao { + + int deleteByBizType(CustomerBizOrgFormDTO formDTO); + + int batchInsert(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerBizOrgEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerBizOrgEntity.java new file mode 100644 index 0000000000..5700d83fe0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerBizOrgEntity.java @@ -0,0 +1,52 @@ +/** + * 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.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 组织机构信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("screen_customer_biz_org") +public class ScreenCustomerBizOrgEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织id + */ + private String orgId; + + /** + * 业务类型 community:智慧社区 + */ + private String bizType; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java index 82a00909a5..3d2fc7a15a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java @@ -21,6 +21,7 @@ package com.epmet.service.evaluationindex.screen; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dto.extract.form.*; import com.epmet.dto.extract.result.GridInfoResultDTO; +import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import com.epmet.entity.org.CustomerGridEntity; @@ -75,10 +76,20 @@ public interface ScreenCustomerGridService extends BaseService selectAllGridInfoToParty(String customerId); /** - * @Description 查询全部网格信息 * @param customerId + * @Description 查询全部网格信息 * @author zxc * @date 2020/9/18 10:47 上午 */ List selectAllGridInfo(String customerId); + + /** + * desc: 初始化客户的业务组织关系 + * + * @param formDTO + * @return java.lang.Boolean + * @author LiuJanJun + * @date 2020/10/21 2:33 下午 + */ + Boolean initBizOrg(CustomerBizOrgFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ShiBeiScreenCollService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ShiBeiScreenCollService.java index 12d46a16f9..41f2256c50 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ShiBeiScreenCollService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ShiBeiScreenCollService.java @@ -1,8 +1,7 @@ package com.epmet.service.evaluationindex.screen; +import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; import com.epmet.dto.screencoll.form.*; - -import java.util.List; /** * 大屏数据采集api * @@ -231,4 +230,14 @@ public interface ShiBeiScreenCollService { * @Date 09:44 2020-08-25 **/ void insertPublicPartiTotalData(PublicPartiTotalDataListFormDTO formDTO, String customerId); + + /** + * desc: 初始化客户业务组织关系表 + * + * @param formDTO + * @return java.lang.Integer + * @author LiuJanJun + * @date 2020/10/21 2:38 下午 + */ + Integer initBizOrg(CustomerBizOrgFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java index 45ed305ff5..e20a0a6709 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java @@ -26,10 +26,10 @@ import com.epmet.constant.OrgSourceTypeConstant; import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.extract.form.*; import com.epmet.dto.extract.result.GridInfoResultDTO; +import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import com.epmet.entity.org.CustomerGridEntity; import com.epmet.service.evaluationindex.screen.ScreenCustomerGridService; -import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -150,8 +150,8 @@ public class ScreenCustomerGridServiceImpl extends BaseServiceImpl selectAllGridInfo(String customerId) { return screenCustomerGridDao.selectAllGridInfo(customerId); } + + @Override + public Boolean initBizOrg(CustomerBizOrgFormDTO formDTO) { + return null; + } } \ 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/ShiBeiScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java index 36e8f87ae7..cd26e20bd2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java @@ -17,17 +17,20 @@ package com.epmet.service.evaluationindex.screen.impl; -import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constant.CompareConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.screen.*; +import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; import com.epmet.dto.screencoll.form.*; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerBizOrgEntity; import com.epmet.entity.evaluationindex.screen.ScreenEventImgDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity; import com.epmet.service.evaluationindex.screen.ShiBeiScreenCollService; @@ -40,7 +43,6 @@ import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Calendar; -import java.util.Collection; import java.util.List; import java.util.stream.Collectors; @@ -54,9 +56,9 @@ import java.util.stream.Collectors; @DataSource(DataSourceConstant.EVALUATION_INDEX) public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { - @Autowired - private ScreenPartyUserRankDataDao screenPartyUserRankDataDao; - @Autowired + @Autowired + private ScreenPartyUserRankDataDao screenPartyUserRankDataDao; + @Autowired private ScreenPartyLinkMassesDataDao screenPartyLinkMassesDataDao; @Autowired private ScreenPartyBranchDataDao screenPartyBranchDataDao; @@ -81,6 +83,8 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { @Autowired private ScreenCustomerAgencyDao screenCustomerAgencyDao; @Autowired + private ScreenCustomerBizOrgDao screenCustomerBizOrgDao; + @Autowired private ScreenUserTotalDataDao screenUserTotalDataDao; @Autowired private ScreenUserJoinDao screenUserJoinDao; @@ -94,7 +98,7 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertPartyUserRankData(PartyUserRankDataListFormDTO formDTO,String customerId) { + public void insertPartyUserRankData(PartyUserRankDataListFormDTO formDTO, String customerId) { if (formDTO.getIsFirst()) { int deleteNum; do { @@ -187,7 +191,7 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { if (null != formDTO.getDataList().get(i).getImgDataList() && formDTO.getDataList().get(i).getImgDataList().size() > NumConstant.ZERO) { // 根据原始事件ID,物理删除 - 事件数据图片数据 events[i] = formDTO.getDataList().get(i).getEventId(); - for (int j = NumConstant.ZERO; j < formDTO.getDataList().get(i).getImgDataList().size(); j++){ + for (int j = NumConstant.ZERO; j < formDTO.getDataList().get(i).getImgDataList().size(); j++) { // 新增 中央区-事件数据图片数据 表 ScreenEventImgDataEntity imgDataEntity = new ScreenEventImgDataEntity(); imgDataEntity.setEventId(formDTO.getDataList().get(i).getImgDataList().get(j).getEventId()); @@ -198,7 +202,7 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { } } } - if (isImgUrl){ + if (isImgUrl) { screenEventImgDataDao.delEventImgDataByEvent(events); screenEventImgDataDao.batchInsertEventImgData(eventImgDataList); } @@ -210,11 +214,11 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { @Override @Transactional(rollbackFor = Exception.class) public void insertDifficultyData(DifficultyDataFormDTO formDTO, String customerId) { - if(formDTO.getIsFirst()){ + if (formDTO.getIsFirst()) { //直接删除当前客户下所有的数据 screenDifficultyDataDao.deleteDifficultyData(customerId); } - if (null != formDTO && !CollectionUtils.isEmpty(formDTO.getDataList())){ + if (null != formDTO && !CollectionUtils.isEmpty(formDTO.getDataList())) { screenDifficultyDataDao.batchInsertDifficultyData(formDTO.getDataList(), customerId); } } @@ -309,9 +313,9 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { List pidIsZeroList = formDTO.getDataList().stream().filter(d -> d.getPid().equals(NumConstant.ZERO_STR) || "".equals(d.getPid())).collect(Collectors.toList()); - if (pidIsZeroList.size()>NumConstant.ONE){ + if (pidIsZeroList.size() > NumConstant.ONE) { Object o = JSONObject.toJSON(pidIsZeroList); - throw new RenException("多个pid为【0】的数据:"+o.toString()); + throw new RenException("多个pid为【0】的数据:" + o.toString()); } screenCustomerAgencyDao.batchInsertCustomerAgency(formDTO.getDataList(), customerId); } @@ -343,9 +347,9 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { } while (deleteNum != NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - if (formDTO.getDataList().size() > NumConstant.ZERO){ + if (formDTO.getDataList().size() > NumConstant.ZERO) { String[] orgIds = new String[formDTO.getDataList().size()]; - for (int i = NumConstant.ZERO; i < formDTO.getDataList().size(); i++){ + for (int i = NumConstant.ZERO; i < formDTO.getDataList().size(); i++) { orgIds[i] = formDTO.getDataList().get(i).getOrgId(); } @@ -360,11 +364,11 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { // 定义本月待添加数据的集合 List curMonthJoinEntityList = new ArrayList<>(); // 增加率计算 - if (null != lastMonthJoinList && lastMonthJoinList.size() > NumConstant.ZERO){ + if (null != lastMonthJoinList && lastMonthJoinList.size() > NumConstant.ZERO) { // 存在上个月的数据 (本月-上月)/上月 *100 - for (int i = NumConstant.ZERO; i < formDTO.getDataList().size(); i++){ - for (int j = NumConstant.ZERO; j < lastMonthJoinList.size(); j++){ - if (formDTO.getDataList().get(i).getOrgId().equals(lastMonthJoinList.get(j).getOrgId())){ + for (int i = NumConstant.ZERO; i < formDTO.getDataList().size(); i++) { + for (int j = NumConstant.ZERO; j < lastMonthJoinList.size(); j++) { + if (formDTO.getDataList().get(i).getOrgId().equals(lastMonthJoinList.get(j).getOrgId())) { ScreenUserJoinEntity entity = ConvertUtils.sourceToTarget(formDTO.getDataList().get(i), ScreenUserJoinEntity.class); entity.setJoinTotalUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getJoinTotal(), formDTO.getDataList().get(j).getJoinTotal())); entity.setJoinTotalUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getJoinTotal(), formDTO.getDataList().get(j).getJoinTotal())); @@ -380,8 +384,8 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { // 计算增长率后的 待新增数据 BigDecimal zero = new BigDecimal(NumConstant.ZERO); // 不存在上个月的数据 - for (int i = NumConstant.ZERO; i < formDTO.getDataList().size(); i++){ - ScreenUserJoinEntity entity = ConvertUtils.sourceToTarget(formDTO.getDataList().get(i), ScreenUserJoinEntity.class); + for (int i = NumConstant.ZERO; i < formDTO.getDataList().size(); i++) { + ScreenUserJoinEntity entity = ConvertUtils.sourceToTarget(formDTO.getDataList().get(i), ScreenUserJoinEntity.class); entity.setJoinTotalUpRate(zero); entity.setJoinTotalUpFlag(""); entity.setAvgIssueUpRate(zero); @@ -396,14 +400,37 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { } } + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public Integer initBizOrg(CustomerBizOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + List entityList = screenCustomerAgencyDao.selectListAgencyInfo(formDTO.getCustomerId()); + List list = new ArrayList<>(); + if (CollectionUtils.isEmpty(entityList)) { + return 0; + } + entityList.forEach(o -> { + ScreenCustomerBizOrgEntity entity = new ScreenCustomerBizOrgEntity(); + entity.setCustomerId(o.getCustomerId()); + entity.setOrgId(o.getAgencyId()); + entity.setBizType(formDTO.getBizType()); + list.add(entity); + }); + + screenCustomerBizOrgDao.deleteByBizType(formDTO); + return screenCustomerBizOrgDao.batchInsert(list); + } + /** * 获取当前日期的前一个月的日期 + * * @param * @return java.lang.String[] * @Author zhangyong * @Date 15:33 2020-08-21 **/ - private String[] lastMonthDate(){ + private String[] lastMonthDate() { String[] date = new String[NumConstant.TWO]; //Java获取当前日期的前一个月的日期 Calendar calendar = Calendar.getInstance(); @@ -411,8 +438,9 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { int year = calendar.get(Calendar.YEAR); int month = calendar.get(Calendar.MONTH) + NumConstant.ONE; date[NumConstant.ZERO] = String.valueOf(year); - date[NumConstant.ONE] = String.valueOf(month);; - if (NumConstant.TEN >= month){ + date[NumConstant.ONE] = String.valueOf(month); + ; + if (NumConstant.TEN >= month) { date[NumConstant.ONE] = NumConstant.ZERO_STR + month; } return date; @@ -421,8 +449,8 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { /** * 计算 本月数值 相较于 上月数值,的增长率 * - * @param old 上月数值 - * @param now 本月数值 + * @param old 上月数值 + * @param now 本月数值 * @return java.math.BigDecimal * @Author zhangyong * @Date 15:38 2020-08-21 @@ -459,8 +487,8 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { /** * 计算 本月数值 相较于 上月数值,的增长率, 得出标识 * - * @param old 上月数值 - * @param now 本月数值 + * @param old 上月数值 + * @param now 本月数值 * @return java.util.String * @Author zhangyong * @Date 15:38 2020-08-21 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index 83a948ed38..4e91fadb91 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -80,6 +80,7 @@ @@ -147,7 +146,6 @@ ca.del_flag = '0' AND cbo.DEL_FLAG = 0 AND cbo.biz_type = "community" - AND ca.IS_DISPLAY = '1' AND ca.pids = #{subAgencyPids} ORDER BY ca.created_time DESC From 5f79f101439d76b8fac45ebf45744e2eb8c1a0af Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 21 Oct 2020 15:28:50 +0800 Subject: [PATCH 10/53] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=8C=BA=E5=88=92=20=E5=88=99=E9=BB=98=E8=AE=A4=E6=9A=82?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenCustomerAgencyEntity.java | 15 ++++++++++----- .../impl/ScreenCustomerAgencyServiceImpl.java | 13 +++++++++++++ 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java index da0a164888..46903b52b5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java @@ -89,15 +89,20 @@ public class ScreenCustomerAgencyEntity extends BaseEpmetEntity { private String level; /** - * 行政地区编码 - */ + * 行政地区编码 + */ private String areaCode; private String sourceType; - /** - * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) - */ + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ private String dataEndTime; + /** + * desc: 是否显示 1显示 0不显示 + */ + private String isDisplay; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java index d506856d0e..2cc97d3256 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java @@ -39,6 +39,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; import java.util.*; import java.util.stream.Collectors; @@ -131,6 +132,12 @@ public class ScreenCustomerAgencyServiceImpl implements ScreenCustomerAgencyServ exists.setLevel(e.getLevel()); exists.setDataEndTime(dateEndTime); exists.setAreaCode(e.getAreaCode()); + //如果没有区划 则默认暂时不显示 + if (StringUtils.isEmpty(e.getAreaCode())) { + exists.setIsDisplay(NumConstant.ZERO_STR); + } else { + exists.setIsDisplay(NumConstant.ONE_STR); + } exists.setAllParentNames(e.getAllParentName()); updateAgency(exists); } @@ -221,6 +228,12 @@ public class ScreenCustomerAgencyServiceImpl implements ScreenCustomerAgencyServ cae.setAllParentNames(e.getAllParentName()); cae.setAreaCode(e.getAreaCode()); //cae.setAreaMarks(e); + //如果没有区划 则默认暂时不显示 + if (StringUtils.isEmpty(e.getAreaCode())) { + cae.setIsDisplay(NumConstant.ZERO_STR); + } else { + cae.setIsDisplay(NumConstant.ONE_STR); + } cae.setCustomerId(e.getCustomerId()); cae.setDataEndTime(dateEndTime); cae.setLevel(e.getLevel()); From 7bbeae4bdbb7edf2dd65d32b8024be58d3df9543 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 21 Oct 2020 16:13:07 +0800 Subject: [PATCH 11/53] =?UTF-8?q?=E7=9C=9F=E5=81=87=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/evaluationindex/screen/impl/AgencyServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index ac4befa559..df622e9924 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -73,6 +73,7 @@ public class AgencyServiceImpl implements AgencyService { * @author zxc * @date 2020/10/21 2:49 下午 */ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override public TreeResultDTO treeByType(String customerId, String bizType) { TreeResultDTO rootAgency = null; From 97e59930063af5fe66048a757bdec7cfbf1313f8 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 21 Oct 2020 16:24:16 +0800 Subject: [PATCH 12/53] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9=20=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=B8=8B=E4=B8=80=E7=BA=A7=E7=BB=84=E7=BB=87=E6=95=B0?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/AgencyServiceImpl.java | 18 ++++++++++++++---- .../resources/mapper/CustomerAgencyDao.xml | 1 - 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java index 826e186d7f..7595aafa33 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java @@ -237,11 +237,21 @@ public class AgencyServiceImpl implements AgencyService { @Override public Result subAgencyList(SubAgencyFormDTO formDTO) { SubAgencyResultDTO subAgencyResultDTO = new SubAgencyResultDTO(); - //1:根据当前机关Id查询直属下一级机关列表 + //1:根据当前机关Id查询直属下一级机关列表,只返回前十条 List agencyList = customerAgencyDao.selectSubAgencyById(formDTO.getAgencyId()); - subAgencyResultDTO.setAgencyList(null == agencyList ? new ArrayList() : agencyList); - //2:统计下一级机关数 - subAgencyResultDTO.setSubAgencyCount(agencyList.size()); + if (null == agencyList || agencyList.size() < NumConstant.ONE) { + subAgencyResultDTO.setAgencyList(new ArrayList()); + subAgencyResultDTO.setSubAgencyCount(NumConstant.ZERO); + } else { + subAgencyResultDTO.setSubAgencyCount(agencyList.size()); + if (agencyList.size() > NumConstant.TEN) { + List newList = agencyList.subList(NumConstant.ZERO, NumConstant.TEN); + subAgencyResultDTO.setAgencyList(newList); + } else { + subAgencyResultDTO.setAgencyList(agencyList); + } + } + return new Result().ok(subAgencyResultDTO); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index 0721780e09..4e295b44cf 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -67,7 +67,6 @@ WHERE del_flag = '0' AND pid = #{pId} ORDER BY created_time DESC - LIMIT 10 + + + \ No newline at end of file From ed091e990681d1dfec947a0885e91d74ace96b3a Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 22 Oct 2020 11:14:38 +0800 Subject: [PATCH 15/53] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=A0=B9?= =?UTF-8?q?=E6=8D=AEappId=E7=94=9F=E6=88=90jwt=20AccessToken=E7=9A=84Feign?= =?UTF-8?q?CLient?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fallback/EpmetCommonServiceOpenFeignClientFallback.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java index 4640f13b45..7f672c1828 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java @@ -4,6 +4,7 @@ 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.form.ExternalAppAuthFormDTO; +import com.epmet.dto.form.GetJwtAccessTokenFormDTO; import com.epmet.dto.form.WorkDayFormDTO; import com.epmet.dto.result.ExternalAppAuthResultDTO; import com.epmet.dto.result.WorkDayResultDTO; @@ -39,4 +40,9 @@ public class EpmetCommonServiceOpenFeignClientFallback implements EpmetCommonSer public Result getSecret(String appId) { return ModuleUtils.feignConError(ServiceConstant.EPMET_COMMON_SERVICE, "getSecret", appId); } + + @Override + public Result getAccessToken(GetJwtAccessTokenFormDTO form) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_COMMON_SERVICE, "getAccessToken", form); + } } From da79a716d320e46f5abaeea99bc544f79e9a5a1a Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 22 Oct 2020 13:50:03 +0800 Subject: [PATCH 16/53] =?UTF-8?q?=E4=B8=8B=E7=BA=A7=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E5=8D=95=E9=A1=B9=E6=8C=87=E6=95=B0=E5=BE=97=E5=88=86=E6=8E=92?= =?UTF-8?q?=E8=A1=8C=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/enums/CommonOperateTypeEnum.java | 2 + .../dto/form/SubSingleIndexRankFormDTO.java | 37 +++++++++++++++ .../dto/result/PeerComparisonResultDTO.java | 3 +- .../controller/screen/IndexController.java | 18 ++++++- .../screen/ScreenIndexDataMonthlyDao.java | 9 +++- .../evaluationindex/screen/IndexService.java | 12 ++++- .../screen/impl/IndexServiceImpl.java | 20 ++++++-- .../screen/ScreenIndexDataMonthlyDao.xml | 47 +++++++++++++++++++ 8 files changed, 140 insertions(+), 8 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubSingleIndexRankFormDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/CommonOperateTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/CommonOperateTypeEnum.java index 1dc0b571c5..e38a14a21f 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/CommonOperateTypeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/CommonOperateTypeEnum.java @@ -11,6 +11,8 @@ public enum CommonOperateTypeEnum { ADD("add", "添加"), EDIT("edit", "编辑"), DEL("del", "删除"), + DESC("DESC", "降序"), + ASC("ASC", "升序"), ; private String code; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubSingleIndexRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubSingleIndexRankFormDTO.java new file mode 100644 index 0000000000..268a66ac55 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubSingleIndexRankFormDTO.java @@ -0,0 +1,37 @@ +package com.epmet.evaluationindex.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * desc:下级组织单项排行分数 form + * + * @DateTime 2020/8/20 9:54 上午 + */ +@Data +public class SubSingleIndexRankFormDTO implements Serializable { + + private static final long serialVersionUID = -2920561669035794486L; + @NotBlank(message = "客户ID不能为空") + private String customerId; + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空") + private String agencyId; + @NotBlank(message = "指标code不能为空") + private String indexCode; + + /** + * 默认查询前几名 + */ + private Integer topNum; + + private String monthId; + private String orgType; + private String sort; + + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PeerComparisonResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PeerComparisonResultDTO.java index 9a89c5daa8..825571dbd6 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PeerComparisonResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PeerComparisonResultDTO.java @@ -5,7 +5,8 @@ import lombok.Data; import java.io.Serializable; /** - * 同级对比各项数据查询--接口返参 + * 同级对比(下级单项指数排行)各项数据查询--接口返参 + * * @Author sun */ @Data diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java index 100c35b293..00fc8046a5 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java @@ -1,7 +1,5 @@ package com.epmet.datareport.controller.screen; -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.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.eum.OrgTypeEnum; @@ -88,6 +86,22 @@ public class IndexController { return new Result>().ok(indexService.getSubAgencyIndexRank(formDTO)); } + /** + * desc: 下级组织单项指数得分排行 + * + * @param customerId + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @author LiuJanJun + * @date 2020/10/22 1:49 下午 + */ + @PostMapping("subsingleindexrank") + public Result> getSubSingleIndexRank(@RequestHeader("CustomerId") String customerId, @RequestBody SubSingleIndexRankFormDTO formDTO) { + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(indexService.getSubSingleIndexRank(formDTO)); + } + /** * @param formDTO * @Description 4、获取该客户下所有网格指标排行 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index 2c030eac41..93221bd6f0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -91,8 +91,15 @@ public interface ScreenIndexDataMonthlyDao{ /** * @param formDTO - * @Description 先进排行-先进支部排行 + * @Description 先进排行-先进支部排行 * @author sun */ List selectRankList(AdvancedBranchRankFormDTO formDTO); + + /** + * @param formDTO + * @Description 下级单项指标得分排行 + * @author sun + */ + List getSingleIndexRank(SubSingleIndexRankFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java index 3485770cc2..0dc99d37bc 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java @@ -72,8 +72,18 @@ public interface IndexService { /** * @param formDTO - * @Description 先进排行-先进支部排行 + * @Description 先进排行-先进支部排行 * @author sun */ List advancedBranchRank(AdvancedBranchRankFormDTO formDTO); + + /** + * desc:下级单项指数排行 + * + * @param formDTO + * @return java.util.List + * @author LiuJanJun + * @date 2020/10/22 10:58 上午 + */ + List getSubSingleIndexRank(SubSingleIndexRankFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index a133a5dab4..4ff84d3ab6 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -2,6 +2,7 @@ package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.enums.CommonOperateTypeEnum; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screen.ScreenIndexDataMonthlyDao; @@ -11,18 +12,15 @@ import com.epmet.evaluationindex.screen.constant.ScreenConstant; import com.epmet.evaluationindex.screen.dto.form.*; import com.epmet.evaluationindex.screen.dto.result.*; import org.apache.commons.lang3.StringUtils; -import org.jsoup.helper.DataUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import org.springframework.util.unit.DataUnit; import java.math.BigDecimal; import java.text.NumberFormat; import java.time.LocalDate; import java.util.ArrayList; import java.util.Comparator; -import java.util.Date; import java.util.List; import java.util.stream.Collectors; @@ -328,4 +326,20 @@ public class IndexServiceImpl implements IndexService { return list; } + @Override + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + public List getSubSingleIndexRank(SubSingleIndexRankFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getMonthId())) { + formDTO.setMonthId(DateUtils.getBeforeNMonth(1)); + } + if (StringUtils.isBlank(formDTO.getSort())) { + formDTO.setSort(CommonOperateTypeEnum.DESC.getCode()); + } + if (formDTO.getTopNum() == null) { + formDTO.setTopNum(NumConstant.FIVE); + } + List list = screenIndexDataMonthlyDao.getSingleIndexRank(formDTO); + return list; + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 401d3d1a68..c5a9a6305d 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -205,4 +205,51 @@ LIMIT #{topNum} + From f9e0390959a0126dfd4e80aad8b804f83450f5c8 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 22 Oct 2020 13:58:22 +0800 Subject: [PATCH 17/53] backDoor --- .../controller/backdoor/BackDoorController.java | 9 +++------ .../service/backdoor/BackDoorService.java | 2 +- .../service/backdoor/impl/BackDoorServiceImpl.java | 14 ++++++++------ 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java index 4f45500cc0..117c1c7f62 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java @@ -3,10 +3,7 @@ package com.epmet.datareport.controller.backdoor; import com.epmet.commons.tools.utils.Result; import com.epmet.datareport.service.backdoor.BackDoorService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; /** * @Author zxc @@ -20,8 +17,8 @@ public class BackDoorController { private BackDoorService backDoorService; @PostMapping("backdoor") - public Result backDoor(@RequestHeader("Data-Type")String dataType, @RequestHeader("AppId")String appId, @RequestHeader("target")String target){ - return new Result().ok(backDoorService.backDoor(dataType,appId,target)); + public Result backDoor(@RequestHeader("Data-Type")String dataType, @RequestHeader("AppId")String appId, @RequestHeader("target")String target, @RequestBody Object o){ + return new Result().ok(backDoorService.backDoor(dataType,appId,target,o)); } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java index 245f061737..6fba40f564 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java @@ -8,6 +8,6 @@ import com.epmet.commons.tools.utils.Result; */ public interface BackDoorService { - Object backDoor(String dataType, String appId, String target); + Object backDoor(String dataType, String appId, String target, Object o); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java index 29807f7832..14be906b58 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java @@ -9,6 +9,7 @@ import com.epmet.datareport.constant.*; import com.epmet.datareport.service.backdoor.BackDoorService; import com.epmet.dto.result.AppIdInfoResultDTO; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -20,30 +21,31 @@ import java.util.Map; * @DateTime 2020/10/21 5:17 下午 */ @Service +@Slf4j public class BackDoorServiceImpl implements BackDoorService { @Autowired private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; @Override - public Object backDoor(String dataType, String appId, String target) { + public Object backDoor(String dataType, String appId, String target, Object o) { Result appIdInfoResultDTOResult = commonServiceOpenFeignClient.appIdInfo(appId); if (!appIdInfoResultDTOResult.success()){ throw new RenException("获取accessToken失败......"); } AppIdInfoResultDTO data = appIdInfoResultDTOResult.getData(); String url = FactConstant.URL.concat(target); - Map map = new HashMap(16); Map headerMap = new HashMap<>(16); headerMap.put("AccessToken",data.getAccessToken()); headerMap.put("AppId",data.getAppId()); headerMap.put("AuthType","jwt"); headerMap.put("Data-Type",dataType); -// headerMap.put("Authorization","eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJhcHAiOiJnb3YiLCJjbGllbnQiOiJ3eG1wIiwiZXhwIjoxNjAzODY2MjY2LCJ1c2VySWQiOiI0ZWYwYTA4YTBiNWVmOTM0ZjBiOGE4YzQ2ODJjMzY2NSIsImlhdCI6MTYwMzI2MTQ2Nn0.pW1Wzss-xtj6vUuJbvglUltdDWlUKqTyVQ6rGQ7WpSaE_Iz1uAd5XWI5OGLajyU4-aYCW14Dw3C-XoFepyiZJQ"); - map.put("bizType","community"); - Result stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, JSON.toJSONString(map),headerMap); + Result stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, JSON.toJSONString(o),headerMap); + log.info(JSON.toJSONString(stringResult),stringResult.error()); + if (!stringResult.success()){ + throw new RenException("请求【"+url+"】失败......"+stringResult.error()); + } JSONObject jsonObject = JSON.parseObject(stringResult.getData()); - System.out.println(jsonObject); return jsonObject; } } From a34d7ad04443562cc681cbc6853480588ab1df67 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 22 Oct 2020 14:02:04 +0800 Subject: [PATCH 18/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8A=BD=E5=8F=96=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ProjectExtractServiceImpl.java | 199 +++++++++--------- 1 file changed, 100 insertions(+), 99 deletions(-) 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 6ee0261ac4..562bee4650 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 @@ -194,10 +194,11 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { } } final List mainList = list; + List logList = new ArrayList<>(); //节点发起人 部门流转退回结案 List processList = projectProcessService.getProcessListByCustomer(customerId, dateString); if (!CollectionUtils.isEmpty(processList)) { - List logList = processList.stream().map(process -> { + logList = processList.stream().map(process -> { //获取日期相关维度 DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity(); @@ -243,67 +244,11 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { return entity; }).collect(Collectors.toList()); - - //节点发起人 响应 - List responseList = projectProcessService.getResponseProcessList(customerId, dateString); - if (!CollectionUtils.isEmpty(responseList)) { - logList.addAll(responseList.stream().map(process -> { - //获取日期相关维度 - DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); - FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity(); - entity.setCustomerId(customerId); - entity.setAgencyId(process.getAgencyId()); - entity.setYearId(dimId.getYearId()); - entity.setQuarterId(dimId.getQuarterId()); - entity.setMonthId(dimId.getMonthId()); - entity.setDateId(dimId.getDateId()); - entity.setProjectId(process.getProjectId()); - entity.setOperationUserId(process.getStaffId()); - entity.setActionCode(process.getOperation()); - entity.setIsActive(NumConstant.ONE); - entity.setPids(process.getPids()); - if (StringUtils.isNotBlank(process.getDepartmentId())) { - entity.setOrgType("department"); - entity.setOrgId(process.getDepartmentId()); - entity.setPid(process.getAgencyId()); - } else if (StringUtils.isNotBlank(process.getGridId())) { - entity.setOrgType("grid"); - entity.setOrgId(process.getGridId()); - entity.setPid(process.getAgencyId()); - } else { - if (!process.getPids().contains(StrConstant.COLON)) { - entity.setPids(""); - entity.setPid(NumConstant.ZERO_STR); - } else { - String[] orgArray = process.getPids().split(StrConstant.COLON); - if (orgArray.length > NumConstant.ONE) { - entity.setPid(orgArray[orgArray.length - NumConstant.TWO]); - String path = process.getPids().replaceAll(process.getAgencyId(), ""); - if (path.endsWith(StrConstant.COLON)) { - 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()); - entity.setPid(NumConstant.ZERO_STR); - entity.setPids(""); - } - } - } - - return entity; - }).collect(Collectors.toList())); - } - - //项目评论人 - List satisfactionRecordList = projectProcessService.getSatisfactionRecord(customerId, dateString); - - satisfactionRecordList.forEach(log -> mainList.stream().filter(project -> log.getProjectId().equals(project.getId())).forEach(main -> { - //进行满意度评价的居民的所属机关的父机机关信息 - log.setPid(main.getPid()); - log.setPids(main.getPids()); - })); - logList.addAll(satisfactionRecordList.stream().map(process -> { + } + //节点发起人 响应 + List responseList = projectProcessService.getResponseProcessList(customerId, dateString); + if (!CollectionUtils.isEmpty(responseList)) { + logList.addAll(responseList.stream().map(process -> { //获取日期相关维度 DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity(); @@ -317,67 +262,123 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { entity.setOperationUserId(process.getStaffId()); entity.setActionCode(process.getOperation()); entity.setIsActive(NumConstant.ONE); - entity.setOrgId(process.getGridId()); - entity.setOrgType("grid"); - entity.setPids(process.getPids()); - entity.setPid(process.getPid()); - return entity; - }).collect(Collectors.toList())); - - - //节点接收人 - List processStaffList = projectProcessService.getProcessStaffByCustomer(customerId, dateString); - logList.addAll(processStaffList.stream().map(process -> { - //获取日期相关维度 - DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); - FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity(); - entity.setCustomerId(customerId); - entity.setAgencyId(process.getAgencyId()); - entity.setYearId(dimId.getYearId()); - entity.setQuarterId(dimId.getQuarterId()); - entity.setMonthId(dimId.getMonthId()); - entity.setDateId(dimId.getDateId()); - entity.setProjectId(process.getProjectId()); - entity.setOperationUserId(process.getStaffId()); - entity.setActionCode(process.getOperation()); - entity.setIsActive(NumConstant.ZERO); entity.setPids(process.getPids()); if (StringUtils.isNotBlank(process.getDepartmentId())) { entity.setOrgType("department"); entity.setOrgId(process.getDepartmentId()); entity.setPid(process.getAgencyId()); - }else if (StringUtils.isNotBlank(process.getGridId())) { + } else if (StringUtils.isNotBlank(process.getGridId())) { entity.setOrgType("grid"); entity.setOrgId(process.getGridId()); entity.setPid(process.getAgencyId()); - }else{ - if(!process.getPids().contains(StrConstant.COLON)){ + } else { + if (!process.getPids().contains(StrConstant.COLON)) { entity.setPids(""); entity.setPid(NumConstant.ZERO_STR); - }else{ + } else { String[] orgArray = process.getPids().split(StrConstant.COLON); - if(orgArray.length > NumConstant.ONE){ + if (orgArray.length > NumConstant.ONE) { entity.setPid(orgArray[orgArray.length - NumConstant.TWO]); - String path = process.getPids().replaceAll(process.getAgencyId(),""); - if(path.endsWith(StrConstant.COLON)){ - path =path.substring(NumConstant.ZERO,path.length() - NumConstant.ONE); + String path = process.getPids().replaceAll(process.getAgencyId(), ""); + if (path.endsWith(StrConstant.COLON)) { + 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(""); } } } + return entity; }).collect(Collectors.toList())); + } - if (!logList.isEmpty()) { - factOriginProjectLogDailyService.deleteByDate(customerId, dateString); - factOriginProjectLogDailyService.insertBatch(logList); + //项目评论人 + List satisfactionRecordList = projectProcessService.getSatisfactionRecord(customerId, dateString); + + satisfactionRecordList.forEach(log -> mainList.stream().filter(project -> log.getProjectId().equals(project.getId())).forEach(main -> { + //进行满意度评价的居民的所属机关的父机机关信息 + log.setPid(main.getPid()); + log.setPids(main.getPids()); + })); + logList.addAll(satisfactionRecordList.stream().map(process -> { + //获取日期相关维度 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); + FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity(); + entity.setCustomerId(customerId); + entity.setAgencyId(process.getAgencyId()); + entity.setYearId(dimId.getYearId()); + entity.setQuarterId(dimId.getQuarterId()); + entity.setMonthId(dimId.getMonthId()); + entity.setDateId(dimId.getDateId()); + entity.setProjectId(process.getProjectId()); + entity.setOperationUserId(process.getStaffId()); + entity.setActionCode(process.getOperation()); + entity.setIsActive(NumConstant.ONE); + entity.setOrgId(process.getGridId()); + entity.setOrgType("grid"); + entity.setPids(process.getPids()); + entity.setPid(process.getPid()); + return entity; + }).collect(Collectors.toList())); + + + //节点接收人 + List processStaffList = projectProcessService.getProcessStaffByCustomer(customerId, dateString); + logList.addAll(processStaffList.stream().map(process -> { + //获取日期相关维度 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); + FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity(); + entity.setCustomerId(customerId); + entity.setAgencyId(process.getAgencyId()); + entity.setYearId(dimId.getYearId()); + entity.setQuarterId(dimId.getQuarterId()); + entity.setMonthId(dimId.getMonthId()); + entity.setDateId(dimId.getDateId()); + entity.setProjectId(process.getProjectId()); + entity.setOperationUserId(process.getStaffId()); + entity.setActionCode(process.getOperation()); + entity.setIsActive(NumConstant.ZERO); + entity.setPids(process.getPids()); + if (StringUtils.isNotBlank(process.getDepartmentId())) { + entity.setOrgType("department"); + entity.setOrgId(process.getDepartmentId()); + entity.setPid(process.getAgencyId()); + }else if (StringUtils.isNotBlank(process.getGridId())) { + entity.setOrgType("grid"); + entity.setOrgId(process.getGridId()); + entity.setPid(process.getAgencyId()); + }else{ + if(!process.getPids().contains(StrConstant.COLON)){ + entity.setPids(""); + entity.setPid(NumConstant.ZERO_STR); + }else{ + String[] orgArray = process.getPids().split(StrConstant.COLON); + if(orgArray.length > NumConstant.ONE){ + entity.setPid(orgArray[orgArray.length - NumConstant.TWO]); + String path = process.getPids().replaceAll(process.getAgencyId(),""); + if(path.endsWith(StrConstant.COLON)){ + 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()); + entity.setPid(NumConstant.ZERO_STR); + entity.setPids(""); + } + } } + return entity; + }).collect(Collectors.toList())); + + if (!logList.isEmpty()) { + factOriginProjectLogDailyService.deleteByDate(customerId, dateString); + factOriginProjectLogDailyService.insertBatch(logList); } + } /** From 3ba5cc7a958c3288e86d57a778f31a9802eadeba Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 22 Oct 2020 14:13:23 +0800 Subject: [PATCH 19/53] backDoor --- .../datareport/service/backdoor/impl/BackDoorServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java index 14be906b58..eed2603ede 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java @@ -41,7 +41,7 @@ public class BackDoorServiceImpl implements BackDoorService { headerMap.put("AuthType","jwt"); headerMap.put("Data-Type",dataType); Result stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, JSON.toJSONString(o),headerMap); - log.info(JSON.toJSONString(stringResult),stringResult.error()); + log.info(JSON.toJSONString(stringResult)); if (!stringResult.success()){ throw new RenException("请求【"+url+"】失败......"+stringResult.error()); } From 9a744f6625224322928b8d8acb46eaa37c4d05ff Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 22 Oct 2020 14:17:45 +0800 Subject: [PATCH 20/53] backDoor --- .../datareport/controller/backdoor/BackDoorController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java index 117c1c7f62..415cfe102b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java @@ -17,7 +17,7 @@ public class BackDoorController { private BackDoorService backDoorService; @PostMapping("backdoor") - public Result backDoor(@RequestHeader("Data-Type")String dataType, @RequestHeader("AppId")String appId, @RequestHeader("target")String target, @RequestBody Object o){ + public Result backDoor(@RequestHeader("Data-Type")String dataType, @RequestHeader("AppId")String appId, @RequestHeader("target")String target, @RequestBody(required = false) Object o){ return new Result().ok(backDoorService.backDoor(dataType,appId,target,o)); } From b9bf1d8a000985a20013a9429b0b714894bbead4 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 22 Oct 2020 14:20:15 +0800 Subject: [PATCH 21/53] backDoor --- .../datareport/controller/backdoor/BackDoorController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java index 415cfe102b..883f904a8f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java @@ -17,8 +17,8 @@ public class BackDoorController { private BackDoorService backDoorService; @PostMapping("backdoor") - public Result backDoor(@RequestHeader("Data-Type")String dataType, @RequestHeader("AppId")String appId, @RequestHeader("target")String target, @RequestBody(required = false) Object o){ - return new Result().ok(backDoorService.backDoor(dataType,appId,target,o)); + public Object backDoor(@RequestHeader("Data-Type")String dataType, @RequestHeader("AppId")String appId, @RequestHeader("target")String target, @RequestBody(required = false) Object o){ + return backDoorService.backDoor(dataType,appId,target,o); } } From 8c26411a6c01664936c66c5c15c3c35d8067eab5 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 22 Oct 2020 14:27:09 +0800 Subject: [PATCH 22/53] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ProjectExtractServiceImpl.java | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) 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 562bee4650..66c59bf20f 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 @@ -5,6 +5,8 @@ import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.OrgTypeConstant; +import com.epmet.constant.ProjectConstant; import com.epmet.dao.evaluationindex.extract.FactOriginProjectOrgPeriodDailyDao; import com.epmet.dto.ProjectDTO; import com.epmet.dto.extract.FactOriginProjectMainDailyDTO; @@ -32,10 +34,10 @@ import com.epmet.service.project.ProjectService; import com.epmet.service.topic.TopicService; import com.epmet.util.DimIdGenerator; 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.stereotype.Service; -import org.apache.commons.collections4.CollectionUtils; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -86,9 +88,9 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { if (!CollectionUtils.isEmpty(closedList)) { List closeProjects = pendingList.stream().flatMap(pending -> closedList.stream().filter(closed -> pending.getId().equals(closed.getProjectId())).map(process -> { - FactOriginProjectMainDailyEntity entity = new FactOriginProjectMainDailyEntity(); - entity.setId(process.getProjectId()); - entity.setProjectStatus("closed"); + FactOriginProjectMainDailyEntity entity = new FactOriginProjectMainDailyEntity(); + entity.setId(process.getProjectId()); + entity.setProjectStatus(ProjectConstant.CLOSED); entity.setCreatedTime(DateUtils.stringToDate(pending.getDateId(), DateUtils.DATE_PATTERN_YYYYMMDD)); entity.setUpdatedTime(process.getUpdatedTime()); entity.setIsResolved(process.getIsResolved()); @@ -214,11 +216,11 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { entity.setIsActive(NumConstant.ONE); entity.setPids(process.getPids()); if (StringUtils.isNotBlank(process.getDepartmentId())) { - entity.setOrgType("department"); + entity.setOrgType(OrgTypeConstant.DEPARTMENT); entity.setOrgId(process.getDepartmentId()); entity.setPid(process.getAgencyId()); }else if (StringUtils.isNotBlank(process.getGridId())) { - entity.setOrgType("grid"); + entity.setOrgType(OrgTypeConstant.GRID); entity.setOrgId(process.getGridId()); entity.setPid(process.getAgencyId()); }else{ @@ -264,11 +266,11 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { entity.setIsActive(NumConstant.ONE); entity.setPids(process.getPids()); if (StringUtils.isNotBlank(process.getDepartmentId())) { - entity.setOrgType("department"); + entity.setOrgType(OrgTypeConstant.DEPARTMENT); entity.setOrgId(process.getDepartmentId()); entity.setPid(process.getAgencyId()); } else if (StringUtils.isNotBlank(process.getGridId())) { - entity.setOrgType("grid"); + entity.setOrgType(OrgTypeConstant.GRID); entity.setOrgId(process.getGridId()); entity.setPid(process.getAgencyId()); } else { @@ -319,7 +321,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { entity.setActionCode(process.getOperation()); entity.setIsActive(NumConstant.ONE); entity.setOrgId(process.getGridId()); - entity.setOrgType("grid"); + entity.setOrgType(OrgTypeConstant.GRID); entity.setPids(process.getPids()); entity.setPid(process.getPid()); return entity; @@ -344,11 +346,11 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { entity.setIsActive(NumConstant.ZERO); entity.setPids(process.getPids()); if (StringUtils.isNotBlank(process.getDepartmentId())) { - entity.setOrgType("department"); + entity.setOrgType(OrgTypeConstant.DEPARTMENT); entity.setOrgId(process.getDepartmentId()); entity.setPid(process.getAgencyId()); }else if (StringUtils.isNotBlank(process.getGridId())) { - entity.setOrgType("grid"); + entity.setOrgType(OrgTypeConstant.GRID); entity.setOrgId(process.getGridId()); entity.setPid(process.getAgencyId()); }else{ @@ -405,21 +407,21 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { dest.setOrgType("dept"); dest.setPid(original.getOrgId()); dest.setPids(original.getOrgIdPath()); - }else if(StringUtils.isNotBlank(original.getGridId())){ - dest.setOrgType("grid"); + }else if(StringUtils.isNotBlank(original.getGridId())) { + dest.setOrgType(OrgTypeConstant.GRID); dest.setPid(original.getOrgId()); dest.setPids(original.getOrgIdPath()); - }else{ - dest.setOrgType("agency"); + }else { + dest.setOrgType(OrgTypeConstant.AGENCY); dest.setPids(""); String[] array = original.getOrgIdPath().split(StrConstant.COLON); - if(array.length <= NumConstant.ZERO){ + if (array.length <= NumConstant.ZERO) { dest.setPid(NumConstant.ZERO_STR); } - if(array[NumConstant.ZERO].equals(original.getOrgId()) && array.length == NumConstant.ONE){ + if (array[NumConstant.ZERO].equals(original.getOrgId()) && array.length == NumConstant.ONE) { dest.setPid(NumConstant.ZERO_STR); } - if(array.length > NumConstant.ONE && original.getOrgId().equals(array[array.length - NumConstant.ONE])){ + if (array.length > NumConstant.ONE && original.getOrgId().equals(array[array.length - NumConstant.ONE])) { dest.setPid(array[array.length - NumConstant.TWO]); dest.setPids(original.getOrgIdPath().replace(original.getOrgId(),"")); } @@ -457,7 +459,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { */ private Integer getDetentionDays(String id, Date startDate, Date endDate) { int result; - SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); + SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD); List list = new ArrayList<>(); WorkDayFormDTO workDayFormDTO = new WorkDayFormDTO(); From c1ba822d241f709e0f70813e343284474dfbd50c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 22 Oct 2020 14:40:59 +0800 Subject: [PATCH 23/53] =?UTF-8?q?=E6=8C=87=E6=A0=87=E5=88=86=E6=95=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/IndexCalculateCommunityServiceImpl.java | 6 +++--- .../indexcal/impl/IndexCalculateDistrictServiceImpl.java | 6 +++--- .../indexcal/impl/IndexCalculateStreetServiceImpl.java | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index bd290fd73d..fa0fc396b3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -197,7 +197,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); - return false; + return true; } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); @@ -272,7 +272,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); - return false; + return true; } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); @@ -344,7 +344,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); - return false; + return true; } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 35d59bf71b..5b18396a66 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -194,7 +194,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List indexDetailList = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(indexDetailList)) { log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); - return false; + return true; } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); @@ -271,7 +271,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); - return false; + return true; } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); @@ -350,7 +350,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); - return false; + return true; } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 468aa668a7..4669ae0cda 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -198,7 +198,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); - return false; + return true; } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); @@ -273,7 +273,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); - return false; + return true; } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); @@ -345,7 +345,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); - return false; + return true; } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); From 2d2404019384e9a833e1c507e16d61fafa12c58d Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 22 Oct 2020 15:58:18 +0800 Subject: [PATCH 24/53] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=99=A8=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../batch/BatchScoreCalculator.java | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index 900b15aaf5..47be178b7a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -66,22 +66,24 @@ public class BatchScoreCalculator { BigDecimal minScoreValue = idx.getScoreCalculator().getMinScore(); BigDecimal maxScoreValue = idx.getScoreCalculator().getMaxScore(); - if (idx.getScoreCalculator().getMaxValue().compareTo(idx.getScoreCalculator().getMinValue()) == 0) { - //*((max-min)/ (Math.PI/2))+min - //Math.atan(new Double(vo.getSampleValue().toString()))* - normalizeValue = new BigDecimal(Math.atan(new Double(getFinalSampleValue(vo.getSampleValue(), threshold).toString()))) - .multiply( - (maxScoreValue.subtract(minScoreValue).divide(new BigDecimal(Math.PI / 2), 10, RoundingMode.HALF_UP))) - .add(minScoreValue).setScale(6, RoundingMode.HALF_UP); - // - if (scoreCalculator.getCorrelation().getCode().equals(Correlation.NEGATIVE)) { - normalizeValue = maxScoreValue.subtract(normalizeValue); - } - }else { - //如果不需要归一 则 直接value*权重 - if (idx.isScore()) { - vo.setSampleValue(new BigDecimal(vo.getSampleValue().toString()).compareTo(NumConstant.ZERO_DECIMAL) == NumConstant.ZERO ? ScoreConstants.MIN_SCORE : new BigDecimal(vo.getSampleValue().toString())); - normalizeValue = getFinalSampleValue(vo.getSampleValue(), threshold); + + //1.如果是分数值(平均值)不需要归一 则 直接value*权重 + //2.否则 先判断 样本值是否相等 是:反正切函数 否:归一算法 + if (idx.isScore()) { + vo.setSampleValue(new BigDecimal(vo.getSampleValue().toString()).compareTo(NumConstant.ZERO_DECIMAL) == NumConstant.ZERO ? ScoreConstants.MIN_SCORE : new BigDecimal(vo.getSampleValue().toString())); + normalizeValue = getFinalSampleValue(vo.getSampleValue(), threshold); + } else { + if (idx.getScoreCalculator().getMaxValue().compareTo(idx.getScoreCalculator().getMinValue()) == 0) { + //*((max-min)/ (Math.PI/2))+min + //Math.atan(new Double(vo.getSampleValue().toString()))* + normalizeValue = new BigDecimal(Math.atan(new Double(getFinalSampleValue(vo.getSampleValue(), threshold).toString()))) + .multiply( + (maxScoreValue.subtract(minScoreValue).divide(new BigDecimal(Math.PI / 2), 10, RoundingMode.HALF_UP))) + .add(minScoreValue).setScale(6, RoundingMode.HALF_UP); + // + if (scoreCalculator.getCorrelation().getCode().equals(Correlation.NEGATIVE)) { + normalizeValue = maxScoreValue.subtract(normalizeValue); + } } else { normalizeValue = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold)); } From 1538f9af906a13acc6c4354d5e892f8c9dd0aada Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 23 Oct 2020 09:34:38 +0800 Subject: [PATCH 25/53] =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E3=80=90=E6=99=BA=E6=85=A7=E7=A4=BE=E5=8C=BA?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CompartmentByBizTypeFormDTO.java | 31 +++++++++++++++++ .../result/AgencyDistributionResultDTO.java | 5 +++ .../controller/screen/AgencyController.java | 7 ++++ .../screen/ScreenCustomerAgencyDao.java | 3 ++ .../evaluationindex/screen/AgencyService.java | 3 ++ .../screen/impl/AgencyServiceImpl.java | 19 +++++++++++ .../mapper/screen/ScreenCustomerAgencyDao.xml | 33 +++++++++++++++++++ 7 files changed, 101 insertions(+) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/CompartmentByBizTypeFormDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/CompartmentByBizTypeFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/CompartmentByBizTypeFormDTO.java new file mode 100644 index 0000000000..695255bccc --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/CompartmentByBizTypeFormDTO.java @@ -0,0 +1,31 @@ +package com.epmet.evaluationindex.screen.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/10/22 + */ +@Data +public class CompartmentByBizTypeFormDTO implements Serializable { + + private static final long serialVersionUID = -3354778434424878413L; + + public interface CompartmentByBizType extends CustomerClientShowGroup {} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {CompartmentByBizType.class}) + private String agencyId; + + /** + * 业务类型 + */ + @NotBlank(message = "bizType不能为空", groups = {CompartmentByBizType.class}) + private String bizType; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgencyDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgencyDistributionResultDTO.java index 753cf368dd..3a91fdfbf7 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgencyDistributionResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgencyDistributionResultDTO.java @@ -37,4 +37,9 @@ public class AgencyDistributionResultDTO implements Serializable { * 组织:agency; 网格:grid ; 部门:dept */ private String type; + + public AgencyDistributionResultDTO() { + this.subAreaMarks = ""; + this.subCenterMark = ""; + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java index 1fb253ac62..86a6f3213e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java @@ -3,6 +3,7 @@ package com.epmet.datareport.controller.screen; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.AgencyService; +import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO; import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; @@ -59,4 +60,10 @@ public class AgencyController { return new Result().ok(agencyService.compartment(compartmentFormDTO)); } + @PostMapping("compartmentbybiztype") + public Result compartmentByBizType(@RequestBody CompartmentByBizTypeFormDTO compartmentFormDTO){ + ValidatorUtils.validateEntity(compartmentFormDTO, CompartmentByBizTypeFormDTO.CompartmentByBizType.class); + return new Result().ok(agencyService.compartmentByBizType(compartmentFormDTO)); + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index c49b83e304..ebcd6ece9f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -60,6 +60,8 @@ public interface ScreenCustomerAgencyDao { */ CompartmentResultDTO getAgencyAreaInfo(@Param("agencyId")String agencyId); + CompartmentResultDTO getAgencyAreaInfoByBizType(@Param("agencyId")String agencyId,@Param("bizType")String bizType); + /** * @Description 查询子级区域分布信息【机关级别】 * @param agencyId @@ -67,6 +69,7 @@ public interface ScreenCustomerAgencyDao { * @date 2020/8/18 5:12 下午 */ List selectSubDistribution(@Param("agencyId")String agencyId); + List selectSubDistributionByType(@Param("agencyId")String agencyId,@Param("bizType")String bizType); /** * @Description 查询子级用户分布【机关级别】 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java index c9517701a3..046eaccbef 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java @@ -1,5 +1,6 @@ package com.epmet.datareport.service.evaluationindex.screen; +import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO; import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; @@ -32,4 +33,6 @@ public interface AgencyService { */ CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO); + CompartmentResultDTO compartmentByBizType(CompartmentByBizTypeFormDTO compartmentFormDTO); + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index 880036439e..24a5367d87 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -8,6 +8,7 @@ import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao; import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.datareport.service.evaluationindex.screen.AgencyService; import com.epmet.evaluationindex.screen.constant.ScreenConstant; +import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO; import com.epmet.evaluationindex.screen.dto.result.AgencyDistributionResultDTO; @@ -206,4 +207,22 @@ public class AgencyServiceImpl implements AgencyService { } return agencyAreaInfo; } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) + @Override + public CompartmentResultDTO compartmentByBizType(CompartmentByBizTypeFormDTO compartmentFormDTO) { + CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfoByBizType(compartmentFormDTO.getAgencyId(),compartmentFormDTO.getBizType()); + if (null == agencyAreaInfo){ + return new CompartmentResultDTO(); + } + if (agencyAreaInfo.getLevel().equals(ScreenConstant.COMMUNITY)){ + // 当level为"community"时,查询screen_customer_grid表 + List agencyDistributionResultDTOS = screenCustomerGridDao.selectSubDistribution(compartmentFormDTO.getAgencyId()); + agencyAreaInfo.setAgencyDistribution(agencyDistributionResultDTOS); + }else { + List agencyDistributionResultDTOS = screenCustomerAgencyDao.selectSubDistributionByType(compartmentFormDTO.getAgencyId(),compartmentFormDTO.getBizType()); + agencyAreaInfo.setAgencyDistribution(agencyDistributionResultDTOS); + } + return agencyAreaInfo; + } } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index ca4cb2c6a8..3dcb1871c3 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -151,4 +151,37 @@ ca.created_time DESC + + + + \ No newline at end of file From 8be82b93465d5ef8996119f13a7ef732679247e0 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 23 Oct 2020 11:03:40 +0800 Subject: [PATCH 26/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-report/data-report-client/pom.xml | 5 ++ .../project/constant/ProjectConstant.java | 2 + .../dto/result/ProjectDetailResultDTO.java | 51 +++++++++++++++++++ .../controller/project/ProjectController.java | 13 +++++ .../screen/ScreenDifficultyDataDao.java | 3 ++ .../service/project/ProjectService.java | 9 ++++ .../project/impl/ProjectServiceImpl.java | 29 +++++++++++ .../mapper/screen/ScreenDifficultyDataDao.xml | 16 ++++++ .../feign/GovProjectOpenFeignClient.java | 5 ++ .../GovProjectOpenFeignClientFallback.java | 7 +++ .../controller/ProjectTraceController.java | 13 +++++ 11 files changed, 153 insertions(+) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java diff --git a/epmet-module/data-report/data-report-client/pom.xml b/epmet-module/data-report/data-report-client/pom.xml index 5bba5f2cb4..8700a85f3b 100644 --- a/epmet-module/data-report/data-report-client/pom.xml +++ b/epmet-module/data-report/data-report-client/pom.xml @@ -17,6 +17,11 @@ epmet-commons-tools 2.0.0 + + com.epmet + gov-project-client + 2.0.0 + diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java index 27d195e832..7b07db5c72 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java @@ -20,4 +20,6 @@ public interface ProjectConstant { */ String TYPE_EXCEPTION = "必要参数为空或参数格式错误"; + String PROCESS_FAILURE = "查询项目进展失败......"; + } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java new file mode 100644 index 0000000000..05c4577742 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java @@ -0,0 +1,51 @@ +package com.epmet.project.dto.result; + +import com.epmet.dto.result.ProcesslistResultDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/10/23 10:13 上午 + */ +@Data +public class ProjectDetailResultDTO implements Serializable { + + private static final long serialVersionUID = 2450826789942547426L; + + /** 【事件 = 项目】 + * 事件标题 + */ + private String eventTitle; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 事件来源 + */ + private String eventSource; + + /** + * 事件图片集合 + */ + private List imgUrlList; + + /** + * 项目进展 + */ + private List processList; + + public ProjectDetailResultDTO() { + this.eventTitle = ""; + this.eventContent = ""; + this.eventSource = ""; + this.imgUrlList = new ArrayList<>(); + this.processList = new ArrayList<>(); + } +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java index 47a4765288..9966047056 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.module.project.service.ProjectService; import com.epmet.project.constant.ProjectConstant; import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; @@ -78,4 +79,16 @@ public class ProjectController { return new Result>().ok(projectService.getProjectIncrTrend(tokenDto, formDTO)); } + /** + * @Description 项目详情 + * @Param processListFormDTO + * @author zxc + * @date 2020/10/23 10:31 上午 + */ + @PostMapping("projectdetail") + public Result projectDetail(@RequestBody ProcessListFormDTO processListFormDTO){ + ValidatorUtils.validateEntity(processListFormDTO); + return new Result().ok(projectService.projectDetail(processListFormDTO)); + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java index 8697ba9adf..81293d999e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java @@ -18,6 +18,7 @@ package com.epmet.datareport.dao.evaluationindex.screen; import com.epmet.evaluationindex.screen.dto.result.DifficultProjectResultDTO; +import com.epmet.project.dto.result.ProjectDetailResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -41,4 +42,6 @@ public interface ScreenDifficultyDataDao { **/ List selectDifficulty(@Param("agencyId")String agencyId,@Param("type")String type); + ProjectDetailResultDTO projectDetail(@Param("projectId")String projectId); + } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java index baa6e664e0..f4c4afa4d0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java @@ -1,6 +1,7 @@ package com.epmet.module.project.service; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; import com.epmet.project.dto.result.*; @@ -41,4 +42,12 @@ public interface ProjectService { * @Description 数据-项目-日/月数据查询 **/ List getProjectIncrTrend(TokenDto tokenDto, ProjectIncrTrendFormDTO formDTO); + + /** + * @Description 项目详情 + * @Param processListFormDTO + * @author zxc + * @date 2020/10/23 10:33 上午 + */ + ProjectDetailResultDTO projectDetail( ProcessListFormDTO processListFormDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index 41af9351ac..eb78f8978e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -4,10 +4,15 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenDifficultyDataDao; import com.epmet.datareport.dao.project.ProjectDao; import com.epmet.dto.form.LoginUserDetailsFormDTO; +import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; +import com.epmet.dto.result.ProcesslistResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.feign.GovProjectOpenFeignClient; import com.epmet.module.project.service.ProjectService; import com.epmet.project.constant.ProjectConstant; import com.epmet.project.dto.FactAgencyProjectDailyDTO; @@ -35,6 +40,10 @@ public class ProjectServiceImpl implements ProjectService { private ProjectDao projectDao; @Autowired private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + @Autowired + private ScreenDifficultyDataDao screenDifficultyDataDao; + @Autowired + private GovProjectOpenFeignClient govProjectOpenFeignClient; /** * @Author sun @@ -168,6 +177,26 @@ public class ProjectServiceImpl implements ProjectService { return resultList; } + /** + * @Description 项目详情 + * @Param processListFormDTO + * @author zxc + * @date 2020/10/23 10:33 上午 + */ + @Override + public ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO) { + ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataDao.projectDetail(processListFormDTO.getProjectId()); + if (null == projectDetailResultDTO){ + return new ProjectDetailResultDTO(); + } + Result> processList = govProjectOpenFeignClient.getProcessList(processListFormDTO); + if (!processList.success()){ + throw new RenException(ProjectConstant.PROCESS_FAILURE); + } + projectDetailResultDTO.setProcessList(processList.getData()); + return projectDetailResultDTO; + } + /** * @author sun * @Description 获取机关ID diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index 0bb479ed65..dfdc3c2f26 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -30,4 +30,20 @@ DESC + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java index c16b8da399..ea9d169a57 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java @@ -1,8 +1,10 @@ package com.epmet.feign; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.result.PendProjectListResultDTO; +import com.epmet.dto.result.ProcesslistResultDTO; import org.springframework.cloud.openfeign.FeignClient; import com.epmet.commons.tools.constant.ServiceConstant; @@ -29,4 +31,7 @@ public interface GovProjectOpenFeignClient { */ @PostMapping("gov/project/project/pendprojectlist") Result> getPendProjectList(@RequestBody ProjectListFromDTO fromDTO); + + @PostMapping("gov/project/trace/processlistnotrule") + Result> getProcessList(@RequestBody ProcessListFormDTO fromDTO); } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java index aa84f509c5..5ae4f94533 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java @@ -3,8 +3,10 @@ package com.epmet.feign.fallback; 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.form.ProcessListFormDTO; import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.result.PendProjectListResultDTO; +import com.epmet.dto.result.ProcesslistResultDTO; import com.epmet.feign.GovProjectOpenFeignClient; import org.springframework.stereotype.Component; @@ -22,4 +24,9 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli public Result> getPendProjectList(ProjectListFromDTO fromDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getPendProjectList", fromDTO); } + + @Override + public Result> getProcessList(ProcessListFormDTO fromDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getProcessList", fromDTO); + } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java index d32f28f8de..9ca5fdc0db 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java @@ -179,6 +179,19 @@ public class ProjectTraceController { return new Result>().ok(projectProcessService.progressList(formDTO)); } + /** + * @param formDTO + * @return + * @Author zxc + * @Description 项目跟踪-项目处理进展列表 + **/ + @PostMapping("processlistnotrule") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PROJECT_TRACE_DETAIL) + public Result> processListNotRule(@RequestBody ProcessListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(projectProcessService.progressList(formDTO)); + } + /** * @param formDTO * @return From 986cdedb303ab2e241898b63cb34ba99758a1502 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 23 Oct 2020 11:12:23 +0800 Subject: [PATCH 27/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/evaluationindex/screen/ScreenDifficultyDataDao.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java index 81293d999e..5a0a566342 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java @@ -42,6 +42,6 @@ public interface ScreenDifficultyDataDao { **/ List selectDifficulty(@Param("agencyId")String agencyId,@Param("type")String type); - ProjectDetailResultDTO projectDetail(@Param("projectId")String projectId); + ProjectDetailResultDTO projectDetail(@Param("eventId")String projectId); } \ No newline at end of file From 40b8c2a77fb4cca7bad68cdcd2c388e31c50d258 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 23 Oct 2020 13:50:23 +0800 Subject: [PATCH 28/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenDifficultyDataService.java | 14 +++++++++ .../impl/ScreenDifficultyDataServiceImpl.java | 30 +++++++++++++++++++ .../project/impl/ProjectServiceImpl.java | 8 ++--- .../EpmetCommonServiceOpenFeignClient.java | 4 +-- 4 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenDifficultyDataService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenDifficultyDataService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenDifficultyDataService.java new file mode 100644 index 0000000000..d40e84cb11 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenDifficultyDataService.java @@ -0,0 +1,14 @@ +package com.epmet.datareport.service.evaluationindex.screen; + +import com.epmet.dto.form.ProcessListFormDTO; +import com.epmet.project.dto.result.ProjectDetailResultDTO; + +/** + * @Author zxc + * @DateTime 2020/10/23 1:26 下午 + */ +public interface ScreenDifficultyDataService { + + ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO); + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java new file mode 100644 index 0000000000..1b5b65cbb5 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java @@ -0,0 +1,30 @@ +package com.epmet.datareport.service.evaluationindex.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenDifficultyDataDao; +import com.epmet.datareport.service.evaluationindex.screen.ScreenDifficultyDataService; +import com.epmet.dto.form.ProcessListFormDTO; +import com.epmet.project.dto.result.ProjectDetailResultDTO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @Author zxc + * @DateTime 2020/10/23 1:26 下午 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class ScreenDifficultyDataServiceImpl implements ScreenDifficultyDataService { + + @Autowired + private ScreenDifficultyDataDao screenDifficultyDataDao; + + @Override + public ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO) { + ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataDao.projectDetail(processListFormDTO.getProjectId()); + return projectDetailResultDTO; + } +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index eb78f8978e..4e4d965dee 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -5,8 +5,8 @@ import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.datareport.dao.evaluationindex.screen.ScreenDifficultyDataDao; import com.epmet.datareport.dao.project.ProjectDao; +import com.epmet.datareport.service.evaluationindex.screen.ScreenDifficultyDataService; import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; @@ -41,9 +41,9 @@ public class ProjectServiceImpl implements ProjectService { @Autowired private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Autowired - private ScreenDifficultyDataDao screenDifficultyDataDao; - @Autowired private GovProjectOpenFeignClient govProjectOpenFeignClient; + @Autowired + private ScreenDifficultyDataService screenDifficultyDataService; /** * @Author sun @@ -185,7 +185,7 @@ public class ProjectServiceImpl implements ProjectService { */ @Override public ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO) { - ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataDao.projectDetail(processListFormDTO.getProjectId()); + ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataService.projectDetail(processListFormDTO); if (null == projectDetailResultDTO){ return new ProjectDetailResultDTO(); } diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java index 6dceb26d74..c2471c0255 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java @@ -21,8 +21,8 @@ import java.util.List; * @author yinzuomei@elink-cn.com * @date 2020/6/4 10:28 */ -//@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class) -@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class, url = "localhost:8103") +@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class) +//@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class, url = "localhost:8103") public interface EpmetCommonServiceOpenFeignClient { /** * @param formDTO From a94a22dc486386011e14ca9d46f7689e3b2652cb Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 23 Oct 2020 13:57:11 +0800 Subject: [PATCH 29/53] =?UTF-8?q?=E5=BE=AE=E8=B0=83=E5=90=8E=E9=97=A8?= =?UTF-8?q?=E5=A4=96=E9=83=A8=E8=B0=83=E7=94=A8=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backdoor/BackDoorController.java | 20 +++++++++++++++---- .../service/backdoor/BackDoorService.java | 4 +--- .../backdoor/impl/BackDoorServiceImpl.java | 20 +++++++++---------- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java index 883f904a8f..5da98ec9c7 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java @@ -1,6 +1,5 @@ package com.epmet.datareport.controller.backdoor; -import com.epmet.commons.tools.utils.Result; import com.epmet.datareport.service.backdoor.BackDoorService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -16,9 +15,22 @@ public class BackDoorController { @Autowired private BackDoorService backDoorService; - @PostMapping("backdoor") - public Object backDoor(@RequestHeader("Data-Type")String dataType, @RequestHeader("AppId")String appId, @RequestHeader("target")String target, @RequestBody(required = false) Object o){ - return backDoorService.backDoor(dataType,appId,target,o); + /** + * desc: 重定向到target 方法,适用于外部鉴权接口的查询 比如大屏的查询接口 + * + * @param dataType + * @param appId + * @param target + * @param targetParam + * @return java.lang.String + * @author LiuJanJun + * @date 2020/10/23 1:44 下午 + */ + @PostMapping("redirect/external") + public String backDoor(@RequestHeader(value = "Data-Type", defaultValue = "real", required = false) String dataType, + @RequestHeader("AppId") String appId, @RequestHeader("target") String target, + @RequestBody(required = false) String targetParam) { + return backDoorService.redirect(dataType, appId, target, targetParam); } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java index 6fba40f564..ecb40a843e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java @@ -1,13 +1,11 @@ package com.epmet.datareport.service.backdoor; -import com.epmet.commons.tools.utils.Result; - /** * @Author zxc * @DateTime 2020/10/21 5:17 下午 */ public interface BackDoorService { - Object backDoor(String dataType, String appId, String target, Object o); + String redirect(String dataType, String appId, String target, String o); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java index eed2603ede..9a10e683c8 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java @@ -1,11 +1,10 @@ package com.epmet.datareport.service.backdoor.impl; import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; -import com.epmet.datareport.constant.*; +import com.epmet.datareport.constant.FactConstant; import com.epmet.datareport.service.backdoor.BackDoorService; import com.epmet.dto.result.AppIdInfoResultDTO; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; @@ -28,24 +27,23 @@ public class BackDoorServiceImpl implements BackDoorService { private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; @Override - public Object backDoor(String dataType, String appId, String target, Object o) { + public String redirect(String dataType, String appId, String target, String targetParam) { Result appIdInfoResultDTOResult = commonServiceOpenFeignClient.appIdInfo(appId); - if (!appIdInfoResultDTOResult.success()){ + if (!appIdInfoResultDTOResult.success()) { throw new RenException("获取accessToken失败......"); } AppIdInfoResultDTO data = appIdInfoResultDTOResult.getData(); String url = FactConstant.URL.concat(target); - Map headerMap = new HashMap<>(16); - headerMap.put("AccessToken",data.getAccessToken()); - headerMap.put("AppId",data.getAppId()); - headerMap.put("AuthType","jwt"); + Map headerMap = new HashMap<>(16); + headerMap.put("AccessToken", data.getAccessToken()); + headerMap.put("AppId", data.getAppId()); + headerMap.put("AuthType", "jwt"); headerMap.put("Data-Type",dataType); - Result stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, JSON.toJSONString(o),headerMap); + Result stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, targetParam, headerMap); log.info(JSON.toJSONString(stringResult)); if (!stringResult.success()){ throw new RenException("请求【"+url+"】失败......"+stringResult.error()); } - JSONObject jsonObject = JSON.parseObject(stringResult.getData()); - return jsonObject; + return stringResult.getData(); } } From fd678eddb710c5dd23caf74b736909e18adaf273 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 23 Oct 2020 14:46:01 +0800 Subject: [PATCH 30/53] =?UTF-8?q?=E5=BE=AE=E8=B0=83=E5=90=8E=E9=97=A8?= =?UTF-8?q?=E5=A4=96=E9=83=A8=E8=B0=83=E7=94=A8=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/controller/backdoor/BackDoorController.java | 4 ++-- .../epmet/datareport/service/backdoor/BackDoorService.java | 2 +- .../service/backdoor/impl/BackDoorServiceImpl.java | 6 +++--- .../com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java | 4 ++++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java index 5da98ec9c7..723d1e9735 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java @@ -27,9 +27,9 @@ public class BackDoorController { * @date 2020/10/23 1:44 下午 */ @PostMapping("redirect/external") - public String backDoor(@RequestHeader(value = "Data-Type", defaultValue = "real", required = false) String dataType, + public Object backDoor(@RequestHeader(value = "Data-Type", defaultValue = "real", required = false) String dataType, @RequestHeader("AppId") String appId, @RequestHeader("target") String target, - @RequestBody(required = false) String targetParam) { + @RequestBody(required = false) Object targetParam) { return backDoorService.redirect(dataType, appId, target, targetParam); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java index ecb40a843e..afb5fc93bc 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java @@ -6,6 +6,6 @@ package com.epmet.datareport.service.backdoor; */ public interface BackDoorService { - String redirect(String dataType, String appId, String target, String o); + Object redirect(String dataType, String appId, String target, Object o); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java index 9a10e683c8..79f42baaa2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java @@ -27,7 +27,7 @@ public class BackDoorServiceImpl implements BackDoorService { private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; @Override - public String redirect(String dataType, String appId, String target, String targetParam) { + public Object redirect(String dataType, String appId, String target, Object targetParam) { Result appIdInfoResultDTOResult = commonServiceOpenFeignClient.appIdInfo(appId); if (!appIdInfoResultDTOResult.success()) { throw new RenException("获取accessToken失败......"); @@ -39,11 +39,11 @@ public class BackDoorServiceImpl implements BackDoorService { headerMap.put("AppId", data.getAppId()); headerMap.put("AuthType", "jwt"); headerMap.put("Data-Type",dataType); - Result stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, targetParam, headerMap); + Result stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, JSON.toJSONString(targetParam), headerMap); log.info(JSON.toJSONString(stringResult)); if (!stringResult.success()){ throw new RenException("请求【"+url+"】失败......"+stringResult.error()); } - return stringResult.getData(); + return JSON.parseObject(stringResult.getData()); } } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java index 147c3b540c..1714ed728a 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java @@ -90,4 +90,8 @@ public class ExtAppJwtTokenUtils { return createToken(claim, secret); } + public static void main(String[] args) { + genTestToken(); + } + } From 970757119c1e21b4bd025a4d095c6045b1d0ee63 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 23 Oct 2020 14:47:33 +0800 Subject: [PATCH 31/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/screen/ScreenDifficultyDataDao.xml | 14 ++++++++++++-- .../epmet/controller/ProjectTraceController.java | 1 - 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index dfdc3c2f26..2c7d900a41 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -30,13 +30,23 @@ DESC + + + + + + + + + + - SELECT dd.event_title AS eventTitle, dd.EVENT_CONTENT AS eventContent, dd.EVENT_SOURCE AS eventSource, - GROUP_CONCAT( did.EVENT_IMG_URL ) AS imgUrlList + did.EVENT_IMG_URL AS imgUrl FROM screen_difficulty_data dd LEFT JOIN screen_difficulty_img_data did ON did.EVENT_ID = dd.EVENT_ID diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java index 9ca5fdc0db..bbdfa5378b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java @@ -186,7 +186,6 @@ public class ProjectTraceController { * @Description 项目跟踪-项目处理进展列表 **/ @PostMapping("processlistnotrule") - @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PROJECT_TRACE_DETAIL) public Result> processListNotRule(@RequestBody ProcessListFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); return new Result>().ok(projectProcessService.progressList(formDTO)); From 2fccb11d764f568deb207a457c19d7ac25369c18 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 23 Oct 2020 15:12:50 +0800 Subject: [PATCH 32/53] =?UTF-8?q?backDoor=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/enums/EnvEnum.java | 18 ++++++++++++------ .../backdoor/BackDoorController.java | 3 ++- .../service/backdoor/BackDoorService.java | 2 +- .../backdoor/impl/BackDoorServiceImpl.java | 5 +++-- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java index ed782790e8..d0df724665 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java @@ -11,21 +11,23 @@ import org.springframework.core.env.Environment; * @date 2020-07-03 11:14 **/ public enum EnvEnum { - LOCAL("local", "本地环境"), - DEV("dev", "开发环境"), - TEST("test", "体验环境"), - PROD("prod", "生产环境"), - UN_KNOWN("un_known", "未知"), + LOCAL("local", "本地环境","http://localhost:8080/api/"), + DEV("dev", "开发环境","http://192.168.1.130:8080/api/"), + TEST("test", "体验环境","https://epmet-dev.elinkservice.cn/api/"), + PROD("prod", "生产环境","https://epmet-cloud.elinkservice.cn/api/"), + UN_KNOWN("un_known", "未知","https://epmet-dev.elinkservice.cn/api/"), ; private String code; private String name; + private String url; - EnvEnum(String code, String name) { + EnvEnum(String code, String name, String url) { this.code = code; this.name = name; + this.url = url; } public static EnvEnum getEnum(String code) { @@ -59,4 +61,8 @@ public enum EnvEnum { public String getName() { return name; } + + public String getUrl(){ + return url; + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java index 723d1e9735..e8b373f1b1 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java @@ -28,9 +28,10 @@ public class BackDoorController { */ @PostMapping("redirect/external") public Object backDoor(@RequestHeader(value = "Data-Type", defaultValue = "real", required = false) String dataType, + @RequestHeader(value = "env", defaultValue = "test", required = false) String env, @RequestHeader("AppId") String appId, @RequestHeader("target") String target, @RequestBody(required = false) Object targetParam) { - return backDoorService.redirect(dataType, appId, target, targetParam); + return backDoorService.redirect(dataType, appId, target, targetParam,env); } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java index afb5fc93bc..381d3874a1 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java @@ -6,6 +6,6 @@ package com.epmet.datareport.service.backdoor; */ public interface BackDoorService { - Object redirect(String dataType, String appId, String target, Object o); + Object redirect(String dataType, String appId, String target, Object o,String env); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java index 79f42baaa2..639d39526f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.datareport.service.backdoor.impl; import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.enums.EnvEnum; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; @@ -27,13 +28,13 @@ public class BackDoorServiceImpl implements BackDoorService { private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; @Override - public Object redirect(String dataType, String appId, String target, Object targetParam) { + public Object redirect(String dataType, String appId, String target, Object targetParam, String env) { Result appIdInfoResultDTOResult = commonServiceOpenFeignClient.appIdInfo(appId); if (!appIdInfoResultDTOResult.success()) { throw new RenException("获取accessToken失败......"); } AppIdInfoResultDTO data = appIdInfoResultDTOResult.getData(); - String url = FactConstant.URL.concat(target); + String url = EnvEnum.getEnum(env).getUrl().concat(target); Map headerMap = new HashMap<>(16); headerMap.put("AccessToken", data.getAccessToken()); headerMap.put("AppId", data.getAppId()); From 2091c4a77104359fc3e82da52efed7b9a7aef664 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 23 Oct 2020 15:16:23 +0800 Subject: [PATCH 33/53] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E6=97=B6=20=E6=B7=BB=E5=8A=A0=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5=20=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E4=B8=BA=20=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index 4e91fadb91..97eea5c398 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -24,6 +24,7 @@ PARTY_MARK, `LEVEL`, AREA_CODE, + IS_DISPLAY, DEL_FLAG, REVISION, CREATED_BY, @@ -46,6 +47,7 @@ #{item.partyMark}, #{item.level}, #{item.areaCode}, + ifnull(#{item.isDisplay},'1'), 0, 0, 'APP_USER', From ec18ded05c3438fb0faa8748ee51b11ef7967611 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 23 Oct 2020 15:28:32 +0800 Subject: [PATCH 34/53] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E6=97=B6=20=E6=B7=BB=E5=8A=A0=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5=20=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E4=B8=BA=20=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java index cebf258d31..a9f9d34697 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java @@ -68,4 +68,9 @@ public class CustomerAgencyFormDTO implements Serializable { * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) */ private String dataEndTime; + + /** + * 是否显示 + */ + private String isDisplay; } From 79c8e0fa32e4e5aaf34ceefff68efe14cbe8d009 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 23 Oct 2020 15:54:08 +0800 Subject: [PATCH 35/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index 2c7d900a41..52ce69d8f1 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -52,7 +52,6 @@ LEFT JOIN screen_difficulty_img_data did ON did.EVENT_ID = dd.EVENT_ID WHERE dd.DEL_FLAG = '0' - AND did.DEL_FLAG = '0' AND dd.EVENT_ID = #{eventId} From fd5796353e5b9373187761e35581878f1c441b0c Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 23 Oct 2020 16:10:18 +0800 Subject: [PATCH 36/53] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E6=97=B6=20=E6=B7=BB=E5=8A=A0=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5=20=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E4=B8=BA=20=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenCustomerAgencyDao.java | 39 ++++++++++++------- .../fact/impl/FactIndexServiceImpl.java | 10 ++--- .../mapper/screen/ScreenCustomerAgencyDao.xml | 12 ++++++ .../form/DifficultyDataDetailFormDTO.java | 5 +++ .../screen/ScreenDifficultyDataDao.xml | 2 + 5 files changed, 49 insertions(+), 19 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index ebcd6ece9f..7efd4d1853 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -33,18 +33,18 @@ import java.util.List; public interface ScreenCustomerAgencyDao { /** - * @Description 查询客户根组织ID * @param customerId + * @Description 查询客户根组织ID * @author zxc * @date 2020/8/18 2:44 下午 */ - TreeResultDTO selectRootAgencyId(@Param("customerId")String customerId); + TreeResultDTO selectRootAgencyId(@Param("customerId") String customerId); - TreeResultDTO selectRootAgencyIdByBizType(@Param("customerId")String customerId,@Param("bizType")String bizType); + TreeResultDTO selectRootAgencyIdByBizType(@Param("customerId") String customerId, @Param("bizType") String bizType); /** - * @Description 查询下级机关的 名称和id * @param subAgencyPids + * @Description 查询下级机关的 名称和id * @author zxc * @date 2020/8/18 4:48 下午 */ @@ -53,39 +53,40 @@ public interface ScreenCustomerAgencyDao { List selectSubAgencyListByBizType(@Param("subAgencyPids") String subAgencyPids); /** - * @Description 查询当前机关的区域信息 * @param agencyId + * @Description 查询当前机关的区域信息 * @author zxc * @date 2020/8/18 4:51 下午 */ - CompartmentResultDTO getAgencyAreaInfo(@Param("agencyId")String agencyId); + CompartmentResultDTO getAgencyAreaInfo(@Param("agencyId") String agencyId); - CompartmentResultDTO getAgencyAreaInfoByBizType(@Param("agencyId")String agencyId,@Param("bizType")String bizType); + CompartmentResultDTO getAgencyAreaInfoByBizType(@Param("agencyId") String agencyId, @Param("bizType") String bizType); /** - * @Description 查询子级区域分布信息【机关级别】 * @param agencyId + * @Description 查询子级区域分布信息【机关级别】 * @author zxc * @date 2020/8/18 5:12 下午 */ - List selectSubDistribution(@Param("agencyId")String agencyId); - List selectSubDistributionByType(@Param("agencyId")String agencyId,@Param("bizType")String bizType); + List selectSubDistribution(@Param("agencyId") String agencyId); + + List selectSubDistributionByType(@Param("agencyId") String agencyId, @Param("bizType") String bizType); /** - * @Description 查询子级用户分布【机关级别】 * @param parentId + * @Description 查询子级用户分布【机关级别】 * @author zxc * @date 2020/8/19 9:33 上午 */ - List selectUserDistributionAgency(@Param("parentId")String parentId); + List selectUserDistributionAgency(@Param("parentId") String parentId); /** - * @Description 查询子级党员分布【机关级别】 * @param parentId + * @Description 查询子级党员分布【机关级别】 * @author zxc * @date 2020/8/19 10:30 上午 */ - List selectParymemberDistribution(@Param("parentId")String parentId); + List selectParymemberDistribution(@Param("parentId") String parentId); /** * @param agencyId @@ -93,4 +94,14 @@ public interface ScreenCustomerAgencyDao { * @author sun */ int selectRootAgency(@Param("agencyId") String agencyId); + + /** + * desc: 根据orgId获取组织信息 + * + * @param agencyId + * @return com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO + * @author LiuJanJun + * @date 2020/10/23 3:54 下午 + */ + CompartmentResultDTO getAgencyInfoByAegncyId(@Param("agencyId") String agencyId); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java index e796935094..a73529b0dc 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java @@ -70,7 +70,7 @@ public class FactIndexServiceImpl implements FactIndexService { //组织层级数据 if (FactConstant.AGENCY.equals(formDTO.getOrgType())) { //3.根据组织Id查询组织信息 - CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId()); + CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyInfoByAegncyId(formDTO.getOrgId()); if (null == agency) { //throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId())); return resultList; @@ -172,7 +172,7 @@ public class FactIndexServiceImpl implements FactIndexService { //组织层级数据 if (FactConstant.AGENCY.equals(formDTO.getOrgType())) { //2.根据组织Id查询组织信息 - CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId()); + CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyInfoByAegncyId(formDTO.getOrgId()); if (null == agency) { //throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId())); return resultList; @@ -220,7 +220,7 @@ public class FactIndexServiceImpl implements FactIndexService { //组织层级数据 if (FactConstant.AGENCY.equals(formDTO.getOrgType())) { //3.根据组织Id查询组织信息 - CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId()); + CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyInfoByAegncyId(formDTO.getOrgId()); if (null == agency) { //throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId())); return resultList; @@ -291,7 +291,7 @@ public class FactIndexServiceImpl implements FactIndexService { //组织层级数据 if (FactConstant.AGENCY.equals(formDTO.getOrgType())) { //2.根据组织Id查询组织信息 - CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId()); + CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyInfoByAegncyId(formDTO.getOrgId()); if (null == agency) { //throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId())); return resultList; @@ -359,7 +359,7 @@ public class FactIndexServiceImpl implements FactIndexService { //组织层级数据 if (FactConstant.AGENCY.equals(formDTO.getOrgType())) { //3.根据组织Id查询组织信息 - CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId()); + CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyInfoByAegncyId(formDTO.getOrgId()); if (null == agency) { //throw new RenException(String.format("查询组织信息失败,组织Id:%s", formDTO.getOrgId())); return resultList; diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index 3dcb1871c3..1ea541d5e8 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -49,6 +49,7 @@ screen_customer_agency WHERE del_flag = 0 + and is_display = 1 AND agency_id = #{agencyId} @@ -184,4 +185,15 @@ AND sca.pid = #{agencyId} + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataDetailFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataDetailFormDTO.java index ab77a2363c..209cc61392 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataDetailFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataDetailFormDTO.java @@ -48,6 +48,11 @@ public class DifficultyDataDetailFormDTO implements Serializable { */ private String eventSource; + /** + * 事件标题 + */ + private String eventTitle; + /** * 事件内容 */ 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 e27bfde00f..36536a08b9 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 @@ -18,6 +18,7 @@ PARENT_ID, ORG_NAME, EVENT_ID, + EVENT_TITLE, EVENT_IMG_URL, EVENT_SOURCE, EVENT_CONTENT, @@ -47,6 +48,7 @@ #{item.parentId}, #{item.orgName}, #{item.eventId}, + #{item.eventTitle}, #{item.eventImgUrl}, #{item.eventSource}, #{item.eventContent}, From 27dbc20c8aac2e6493fd49cb590e9cfd6bb9f8a4 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 23 Oct 2020 16:35:33 +0800 Subject: [PATCH 37/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/ScreenDifficultyDataServiceImpl.java | 1 + .../main/resources/mapper/screen/ScreenDifficultyDataDao.xml | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java index 1b5b65cbb5..e044c24aab 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java @@ -22,6 +22,7 @@ public class ScreenDifficultyDataServiceImpl implements ScreenDifficultyDataServ @Autowired private ScreenDifficultyDataDao screenDifficultyDataDao; + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO) { ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataDao.projectDetail(processListFormDTO.getProjectId()); diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index 52ce69d8f1..a891aa0b11 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -35,9 +35,7 @@ - - - + From 2a3eb25d1fdd68567b8da2fd540d4aa42fb8fa39 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 23 Oct 2020 16:43:27 +0800 Subject: [PATCH 38/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ProjectDetailResultDTO.java | 3 +- .../dto/result/ProjectProcessResultDTO.java | 76 +++++++++++++++++++ .../project/impl/ProjectServiceImpl.java | 9 ++- 3 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectProcessResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java index 05c4577742..3e7f064407 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java @@ -1,6 +1,5 @@ package com.epmet.project.dto.result; -import com.epmet.dto.result.ProcesslistResultDTO; import lombok.Data; import java.io.Serializable; @@ -39,7 +38,7 @@ public class ProjectDetailResultDTO implements Serializable { /** * 项目进展 */ - private List processList; + private List processList; public ProjectDetailResultDTO() { this.eventTitle = ""; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectProcessResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectProcessResultDTO.java new file mode 100644 index 0000000000..1c4be126dd --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectProcessResultDTO.java @@ -0,0 +1,76 @@ +/** + * 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.project.dto.result; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; + + +/** + * 项目跟踪-项目处理进展列表-接口返参 + * + * @author sun + */ +@Data +public class ProjectProcessResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 项目Id + */ + private String projectId = ""; + + /** + * 项目处理进展Id + */ + private String processId = ""; + + /** + * 处理进展名称 + */ + private String processName = ""; + + /** + * 处理进展时间 + */ + private Long processTime; + + /** + * 处理进展时间 字符串 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private String processTimeStr; + + /** + * 处理部门 + */ + private String departmentName = ""; + + /** + * 公开答复 + */ + private String publicReply = ""; + + /** + * 内部备注 + */ + private String internalRemark = ""; +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index 4e4d965dee..8b642366cd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -3,6 +3,7 @@ package com.epmet.datareport.service.project.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.datareport.dao.project.ProjectDao; @@ -186,14 +187,16 @@ public class ProjectServiceImpl implements ProjectService { @Override public ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO) { ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataService.projectDetail(processListFormDTO); - if (null == projectDetailResultDTO){ + if (null == projectDetailResultDTO) { return new ProjectDetailResultDTO(); } Result> processList = govProjectOpenFeignClient.getProcessList(processListFormDTO); - if (!processList.success()){ + if (!processList.success()) { throw new RenException(ProjectConstant.PROCESS_FAILURE); } - projectDetailResultDTO.setProcessList(processList.getData()); + + List processResultDTOS = ConvertUtils.sourceToTarget(processList.getData(), ProjectProcessResultDTO.class); + projectDetailResultDTO.setProcessList(processResultDTOS); return projectDetailResultDTO; } From 4564033dac9028476eb00c19ed245e42c244c804 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 23 Oct 2020 17:06:32 +0800 Subject: [PATCH 39/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/screen/ScreenDifficultyDataDao.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index a891aa0b11..9c1325f591 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -35,7 +35,8 @@ - + + @@ -44,7 +45,8 @@ dd.event_title AS eventTitle, dd.EVENT_CONTENT AS eventContent, dd.EVENT_SOURCE AS eventSource, - did.EVENT_IMG_URL AS imgUrl + did.EVENT_IMG_URL AS imgUrl, + did.id as id FROM screen_difficulty_data dd LEFT JOIN screen_difficulty_img_data did ON did.EVENT_ID = dd.EVENT_ID From c80561d30acb36ccae1d28e1108fe1f39535ba0f Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 23 Oct 2020 17:07:04 +0800 Subject: [PATCH 40/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/project/dto/result/ProjectProcessResultDTO.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectProcessResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectProcessResultDTO.java index 1c4be126dd..8a0d6e82ac 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectProcessResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectProcessResultDTO.java @@ -17,7 +17,6 @@ package com.epmet.project.dto.result; -import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; @@ -56,8 +55,8 @@ public class ProjectProcessResultDTO implements Serializable { /** * 处理进展时间 字符串 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private String processTimeStr; + //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + //private String processTimeStr; /** * 处理部门 @@ -73,4 +72,6 @@ public class ProjectProcessResultDTO implements Serializable { * 内部备注 */ private String internalRemark = ""; + + } \ No newline at end of file From f0ce88c099e1f158e63a5b2d56b3a5021a53dbe2 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 23 Oct 2020 17:30:18 +0800 Subject: [PATCH 41/53] =?UTF-8?q?=E5=8C=BA=E5=88=92=E9=99=90=E5=88=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index 1ea541d5e8..9007350e5c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -65,6 +65,7 @@ screen_customer_agency WHERE del_flag = 0 + AND is_display = 1 AND pid = #{agencyId} From ce6613c17423169be373c62c075e1086477d8c3a Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 26 Oct 2020 10:14:51 +0800 Subject: [PATCH 42/53] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=AD=E4=B9=98?= =?UTF-8?q?=E4=BB=A5=E6=9D=83=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/dao/fact/FactIndexAgencyScoreDao.java | 6 +++--- .../dao/fact/FactIndexCommunityScoreDao.java | 4 ++-- .../datareport/dao/fact/FactIndexGridScoreDao.java | 4 ++-- .../service/fact/impl/FactIndexServiceImpl.java | 12 ++++++------ .../mapper/fact/FactIndexAgencyScoreDao.xml | 12 ++++++------ .../mapper/fact/FactIndexCommunityScoreDao.xml | 12 ++++++------ .../resources/mapper/fact/FactIndexGridScoreDao.xml | 12 ++++++------ 7 files changed, 31 insertions(+), 31 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java index 66cbc46d42..0c30eddd50 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java @@ -39,10 +39,10 @@ public interface FactIndexAgencyScoreDao { /** * @param formDTO - * @Description 分别查询区县、乡镇街道过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 + * @Description 分别查询区县、乡镇街道过去12个月党建能力、治理能力、服务能力每月各项乘以权重后的得分数据 * @author sun */ - LinkedList selectAblityIndex(AblityIndexFormDTO formDTO); + LinkedList selectAgencyAblityWeightScoreIndex(AblityIndexFormDTO formDTO); /** * @param formDTO @@ -56,5 +56,5 @@ public interface FactIndexAgencyScoreDao { * @Description 分别查询区县、乡镇街道过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 * @author sun */ - LinkedList selectMonthScoreList(MonthScoreListFormDTO formDTO); + LinkedList selectAgencyMonthWeightScoreList(MonthScoreListFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java index 0c7a7a7f65..1d1efd2b94 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java @@ -42,7 +42,7 @@ public interface FactIndexCommunityScoreDao { * @Description 分别查询社区过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 * @author sun */ - LinkedList selectCommunityAblityIndex(AblityIndexFormDTO formDTO); + LinkedList selectCommunityAblityWeightScore(AblityIndexFormDTO formDTO); /** * @param formDTO @@ -56,5 +56,5 @@ public interface FactIndexCommunityScoreDao { * @Description 分别查询社区过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 * @author sun */ - LinkedList selectCommunityMonthScoreList(MonthScoreListFormDTO formDTO); + LinkedList selectCommunityMonthWeightScoreList(MonthScoreListFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java index c5153b0933..8a36678362 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java @@ -42,7 +42,7 @@ public interface FactIndexGridScoreDao { * @Description 分别查网格过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 * @author sun */ - LinkedList selectGridAblityIndex(AblityIndexFormDTO formDTO); + LinkedList selectGridAblityWeightScore(AblityIndexFormDTO formDTO); /** * @param formDTO @@ -56,5 +56,5 @@ public interface FactIndexGridScoreDao { * @Description 分别查网格过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 * @author sun */ - LinkedList selectGridMonthScoreList(MonthScoreListFormDTO formDTO); + LinkedList selectGridMonthWeightScoreList(MonthScoreListFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java index a73529b0dc..38510aa15b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java @@ -79,12 +79,12 @@ public class FactIndexServiceImpl implements FactIndexService { //区县级、乡镇街道级 if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) { //4-1.查询过去12个月党建能力、治理能力、服务能力每月总分数据 - list = factIndexAgencyScoreDao.selectAblityIndex(formDTO); + list = factIndexAgencyScoreDao.selectAgencyAblityWeightScoreIndex(formDTO); //社区级 } else if ("community".equals(agency.getLevel())) { //4-1.查询过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 - list = factIndexCommunityScoreDao.selectCommunityAblityIndex(formDTO); + list = factIndexCommunityScoreDao.selectCommunityAblityWeightScore(formDTO); } else { //throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId())); return resultList; @@ -92,7 +92,7 @@ public class FactIndexServiceImpl implements FactIndexService { //网格层级数据 } else if (FactConstant.GRID.equals(formDTO.getOrgType())) { //5.查询网格过去12个月党建能力、治理能力、服务能力每月总分数据 - list = factIndexGridScoreDao.selectGridAblityIndex(formDTO); + list = factIndexGridScoreDao.selectGridAblityWeightScore(formDTO); } else { throw new RenException(String.format("能力指数查询,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType())); } @@ -229,12 +229,12 @@ public class FactIndexServiceImpl implements FactIndexService { //区县级、乡镇街道级 if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) { //4-1.查询过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 - list = factIndexAgencyScoreDao.selectMonthScoreList(formDTO); + list = factIndexAgencyScoreDao.selectAgencyMonthWeightScoreList(formDTO); //社区级 } else if ("community".equals(agency.getLevel())) { //4-1.查询过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 - list = factIndexCommunityScoreDao.selectCommunityMonthScoreList(formDTO); + list = factIndexCommunityScoreDao.selectCommunityMonthWeightScoreList(formDTO); } else { //throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId())); return resultList; @@ -242,7 +242,7 @@ public class FactIndexServiceImpl implements FactIndexService { //网格层级数据 } else if (FactConstant.GRID.equals(formDTO.getOrgType())) { //5.查询网格过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 - list = factIndexGridScoreDao.selectGridMonthScoreList(formDTO); + list = factIndexGridScoreDao.selectGridMonthWeightScoreList(formDTO); } else { throw new RenException(String.format("能力指数查询,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType())); } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml index 484abef720..8494abf052 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml @@ -3,10 +3,10 @@ - SELECT fact.month_id AS "monthId", - ROUND(fact.score, 1) AS "indexTotal", + ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", fact.index_code AS "indexCode" FROM fact_index_agency_score fact @@ -41,12 +41,12 @@ AND fact.month_id = #{monthId} - SELECT fact.month_id AS "monthId", - ROUND(fact.score, 1) AS "indexTotal", - ROUND(self.self_score, 1) AS "agencyScore", - ROUND(self.sub_score, 1) AS "subAgencyScore", + ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", + ROUND(self.self_score*self.SELF_WEIGHT, 1) AS "agencyScore", + ROUND(self.sub_score*self.SUB_WEIGHT, 1) AS "subAgencyScore", fact.index_code AS "indexCode" FROM fact_index_agency_score fact diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml index a2a4e89303..2bd729444b 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml @@ -3,10 +3,10 @@ - SELECT fact.month_id AS "monthId", - ROUND(fact.score, 1) AS "indexTotal", + ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", fact.index_code AS "indexCode" FROM fact_index_community_score fact @@ -41,12 +41,12 @@ AND fact.month_id = #{monthId} - SELECT fact.month_id AS "monthId", - ROUND(fact.score, 1) AS "indexTotal", - ROUND(self.self_score, 1) AS "agencyScore", - ROUND(self.sub_score, 1) AS "subAgencyScore", + ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", + ROUND(self.self_score*self.SELF_WEIGHT, 1) AS "agencyScore", + ROUND(self.sub_score*self.SUB_WEIGHT, 1) AS "subAgencyScore", fact.index_code AS "indexCode" FROM fact_index_community_score fact diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml index 65e511d43e..33c401d10b 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml @@ -3,10 +3,10 @@ - SELECT fact.month_id AS "monthId", - ROUND(fact.score, 1) AS "indexTotal", + ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", fact.index_code AS "indexCode" FROM fact_index_grid_score fact @@ -42,12 +42,12 @@ AND fact.month_id = #{monthId} - SELECT fact.month_id AS "monthId", - ROUND(fact.score, 1) AS "indexTotal", - ROUND(self.self_score, 1) AS "agencyScore", - ROUND(self.sub_score, 1) AS "subAgencyScore", + ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", + ROUND(self.self_score*self.SELF_WEIGHT, 1) AS "agencyScore", + ROUND(self.sub_score*self.SUB_WEIGHT, 1) AS "subAgencyScore", fact.index_code AS "indexCode" FROM fact_index_grid_score fact From 328a76a173b171af20fae68ed4a85468b5866a2f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 26 Oct 2020 10:19:33 +0800 Subject: [PATCH 43/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ProjectDetailResultDTO.java | 23 +++++++ .../project/impl/ProjectServiceImpl.java | 9 ++- .../ProcessAndCurrentDeptResultDTO.java | 41 ++++++++++++ .../feign/GovProjectOpenFeignClient.java | 3 +- .../GovProjectOpenFeignClientFallback.java | 3 +- .../controller/ProjectTraceController.java | 4 +- .../epmet/service/ProjectProcessService.java | 9 ++- .../epmet/service/ProjectTraceService.java | 2 + .../impl/ProjectProcessServiceImpl.java | 62 +++++++++++++++++++ 9 files changed, 148 insertions(+), 8 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessAndCurrentDeptResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java index 3e7f064407..88355feec4 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java @@ -1,6 +1,7 @@ package com.epmet.project.dto.result; import lombok.Data; +import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.ArrayList; @@ -40,6 +41,28 @@ public class ProjectDetailResultDTO implements Serializable { */ private List processList; + /** + * 当前跟进部门 + */ + private List departmentNameList; + /** + * 当前跟进部门 + */ + private List departmentList; + + @NoArgsConstructor + @Data + public static class DepartmentNameListBean { + /** + * 部门名 + */ + private String departmentName; + /** + * 工作人员 + */ + private List staffList; + } + public ProjectDetailResultDTO() { this.eventTitle = ""; this.eventContent = ""; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index 8b642366cd..ac9909f9a2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -11,6 +11,7 @@ import com.epmet.datareport.service.evaluationindex.screen.ScreenDifficultyDataS import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; +import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO; import com.epmet.dto.result.ProcesslistResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovProjectOpenFeignClient; @@ -190,13 +191,15 @@ public class ProjectServiceImpl implements ProjectService { if (null == projectDetailResultDTO) { return new ProjectDetailResultDTO(); } - Result> processList = govProjectOpenFeignClient.getProcessList(processListFormDTO); + Result processList = govProjectOpenFeignClient.getProcessList(processListFormDTO); if (!processList.success()) { throw new RenException(ProjectConstant.PROCESS_FAILURE); } - - List processResultDTOS = ConvertUtils.sourceToTarget(processList.getData(), ProjectProcessResultDTO.class); + ProcessAndCurrentDeptResultDTO data = processList.getData(); + List processResultDTOS = ConvertUtils.sourceToTarget(data.getProcessList(), ProjectProcessResultDTO.class); projectDetailResultDTO.setProcessList(processResultDTOS); + projectDetailResultDTO.setDepartmentList(data.getDepartmentList()); + projectDetailResultDTO.setDepartmentNameList(data.getDepartmentNameList()); return projectDetailResultDTO; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessAndCurrentDeptResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessAndCurrentDeptResultDTO.java new file mode 100644 index 0000000000..d55b9c8373 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessAndCurrentDeptResultDTO.java @@ -0,0 +1,41 @@ +package com.epmet.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/10/26 9:36 上午 + */ +@Data +public class ProcessAndCurrentDeptResultDTO implements Serializable { + + private static final long serialVersionUID = 2977695657920536933L; + + private List processList; + + /** + * 当前跟进部门 + */ + private List departmentNameList; + /** + * 当前跟进部门 + */ + private List departmentList; + + @NoArgsConstructor + @Data + public static class DepartmentNameListBean { + /** + * 部门名 + */ + private String departmentName; + /** + * 工作人员 + */ + private List staffList; + } +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java index ea9d169a57..0f89d630d4 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java @@ -4,6 +4,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.result.PendProjectListResultDTO; +import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO; import com.epmet.dto.result.ProcesslistResultDTO; import org.springframework.cloud.openfeign.FeignClient; @@ -33,5 +34,5 @@ public interface GovProjectOpenFeignClient { Result> getPendProjectList(@RequestBody ProjectListFromDTO fromDTO); @PostMapping("gov/project/trace/processlistnotrule") - Result> getProcessList(@RequestBody ProcessListFormDTO fromDTO); + Result getProcessList(@RequestBody ProcessListFormDTO fromDTO); } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java index 5ae4f94533..a3eb7d7e01 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.result.PendProjectListResultDTO; +import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO; import com.epmet.dto.result.ProcesslistResultDTO; import com.epmet.feign.GovProjectOpenFeignClient; import org.springframework.stereotype.Component; @@ -26,7 +27,7 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli } @Override - public Result> getProcessList(ProcessListFormDTO fromDTO) { + public Result getProcessList(ProcessListFormDTO fromDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getProcessList", fromDTO); } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java index bbdfa5378b..582d4e6413 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java @@ -186,9 +186,9 @@ public class ProjectTraceController { * @Description 项目跟踪-项目处理进展列表 **/ @PostMapping("processlistnotrule") - public Result> processListNotRule(@RequestBody ProcessListFormDTO formDTO) { + public Result processListNotRule(@RequestBody ProcessListFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); - return new Result>().ok(projectProcessService.progressList(formDTO)); + return new Result().ok(projectProcessService.progressAndCurrentDept(formDTO)); } /** diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java index 98bb36ec5d..c8b4dfdcc7 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java @@ -24,7 +24,6 @@ import com.epmet.dto.ProjectProcessDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.ProjectProcessEntity; -import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.Map; @@ -136,4 +135,12 @@ public interface ProjectProcessService extends BaseService */ ProjectDetailCheckResultDTO checkProjectClose(ProjectIdFormDTO projectIdFormDTO); + /** + * @Description 查询项目进展和当前处理部门 + * @Param formDTO + * @author zxc + * @date 2020/10/26 9:41 上午 + */ + ProcessAndCurrentDeptResultDTO progressAndCurrentDept(ProcessListFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java index d41408524c..feb2a47d9f 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java @@ -117,4 +117,6 @@ public interface ProjectTraceService { * @return void */ void response(TokenDto tokenDto, ProjectResponseFormDTO formDTO); + + ProjectDetailResultDTO selectCurrentDept(String projectId); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java index 8c8a2dc776..82747b2e41 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java @@ -35,15 +35,19 @@ import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.constant.ProjectConstant; import com.epmet.constant.ReadFlagConstant; import com.epmet.constant.UserMessageConstant; +import com.epmet.dao.ProjectDao; import com.epmet.dao.ProjectProcessDao; import com.epmet.dao.ProjectStaffDao; +import com.epmet.dto.ProjectDTO; import com.epmet.dto.ProjectProcessDTO; +import com.epmet.dto.ProjectStaffDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.ProjectEntity; import com.epmet.entity.ProjectProcessEntity; import com.epmet.entity.ProjectStaffEntity; import com.epmet.feign.EpmetUserFeignClient; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgFeignClient; import com.epmet.redis.ProjectProcessRedis; import com.epmet.service.ProjectProcessService; @@ -87,6 +91,10 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl page(Map params) { @@ -340,4 +348,58 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl departments = new ArrayList<>(); + List departmentNameList = new ArrayList<>(); + List departmentList = new ArrayList<>(); + ProjectDetailResultDTO projectDetailResultDTO = projectDao.selectProjectDetail(formDTO.getProjectId()); + if (ProjectConstant.CLOSED.equals(projectDetailResultDTO.getProjectStatus())) { + //项目已结案,跟进部门为空 + result.setDepartmentList(departmentList); + result.setDepartmentNameList(departments); + } else { + //项目未结案,找出所有跟进部门 + ProjectDTO projectDTO = new ProjectDTO(); + projectDTO.setId(formDTO.getProjectId()); + departmentNameList = projectDao.selectCurrentDepartmentList(projectDTO); + //提取工作人员ID + List staffIdList = departmentNameList.stream().map(ProjectStaffDTO::getStaffId).collect(Collectors.toList()); + staffIdList = staffIdList.stream().distinct().collect(Collectors.toList()); + //根据部门分组 + Map> departmentMap = + departmentNameList.stream().collect(Collectors.groupingBy(ProjectStaffDTO::getDepartmentName)); + //获取工作人员信息(姓名) + UserIdsFormDTO userIdsFormDTO = new UserIdsFormDTO(); + userIdsFormDTO.setUserIds(staffIdList); + Result> staffListResult = epmetUserOpenFeignClient.getStaffInfoList(userIdsFormDTO); + if (!staffListResult.success()) { + throw new RenException(staffListResult.getCode(), staffListResult.getMsg()); + } + List staffList = staffListResult.getData(); + for (String departmentName : departmentMap.keySet()) { + ProjectDetailResultDTO.DepartmentNameListBean bean = new ProjectDetailResultDTO.DepartmentNameListBean(); + bean.setDepartmentName(departmentName); + List staffDTOList = departmentMap.get(departmentName); + List staffNameList = + staffDTOList.stream().flatMap(staffDto -> staffList.stream().filter(staffInfo -> + staffDto.getStaffId().equals(staffInfo.getStaffId())).map((StaffSinGridResultDTO::getStaffName))).collect(Collectors.toList()); + bean.setStaffList(staffNameList); + departmentList.add(bean); + departments.add(departmentName); + } + result.setDepartmentList(departmentList); + result.setDepartmentNameList(departments); + } + return result; + } } \ No newline at end of file From a5915b119627c947a1f2f9b7f3a460990499155e Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 26 Oct 2020 10:26:57 +0800 Subject: [PATCH 44/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/ProjectTraceService.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java index feb2a47d9f..d41408524c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java @@ -117,6 +117,4 @@ public interface ProjectTraceService { * @return void */ void response(TokenDto tokenDto, ProjectResponseFormDTO formDTO); - - ProjectDetailResultDTO selectCurrentDept(String projectId); } From b943131d118f5842c079f8145146e223652c3c9f Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 26 Oct 2020 10:57:23 +0800 Subject: [PATCH 45/53] =?UTF-8?q?=E6=9C=AC=E7=BA=A7=E5=8F=8A=E4=B8=8B?= =?UTF-8?q?=E7=BA=A7=20=E4=B9=98=E4=BB=A5=E6=9D=83=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/fact/FactIndexController.java | 4 +--- .../datareport/dao/fact/FactIndexAgencyScoreDao.java | 2 +- .../dao/fact/FactIndexCommunityScoreDao.java | 2 +- .../datareport/dao/fact/FactIndexGridScoreDao.java | 2 +- .../service/fact/impl/FactIndexServiceImpl.java | 6 +++--- .../mapper/fact/FactIndexAgencyScoreDao.xml | 12 ++++++------ .../mapper/fact/FactIndexCommunityScoreDao.xml | 12 ++++++------ .../resources/mapper/fact/FactIndexGridScoreDao.xml | 12 ++++++------ 8 files changed, 25 insertions(+), 27 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java index 5780a6e4c3..2fe90dbce7 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java @@ -1,7 +1,5 @@ package com.epmet.datareport.controller.fact; -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.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.fact.FactIndexService; @@ -40,7 +38,7 @@ public class FactIndexController { /** * @param formDTO - * @Description 按月份查询各项能力分数 + * @Description 按月份查询本级及下级分数 * @author sun */ @PostMapping("index/scorelist") diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java index 0c30eddd50..57a9829f1d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java @@ -49,7 +49,7 @@ public interface FactIndexAgencyScoreDao { * @Description 查询当前组织某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分 * @author sun */ - List selectScoreList(ScoreListFormDTO formDTO); + List selectAgencyWeightScoreList(ScoreListFormDTO formDTO); /** * @param formDTO diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java index 1d1efd2b94..d0bfc62ac5 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java @@ -49,7 +49,7 @@ public interface FactIndexCommunityScoreDao { * @Description 查询社区级组织某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分 * @author sun */ - List selectCommunityScoreList(ScoreListFormDTO formDTO); + List selectCommunityWeightScoreList(ScoreListFormDTO formDTO); /** * @param formDTO diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java index 8a36678362..c94fdb23a3 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java @@ -49,7 +49,7 @@ public interface FactIndexGridScoreDao { * @Description 分别查网格某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分 * @author sun */ - List selectGridScoreList(ScoreListFormDTO formDTO); + List selectGridWeightScoreList(ScoreListFormDTO formDTO); /** * @param formDTO diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java index 38510aa15b..01e0a69ac6 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java @@ -181,11 +181,11 @@ public class FactIndexServiceImpl implements FactIndexService { //区县级、乡镇街道级 if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) { //3-1.查询当前组织某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分 - resultList = factIndexAgencyScoreDao.selectScoreList(formDTO); + resultList = factIndexAgencyScoreDao.selectAgencyWeightScoreList(formDTO); //社区级 } else if ("community".equals(agency.getLevel())) { //3-1.查询当前组织某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分 - resultList = factIndexCommunityScoreDao.selectCommunityScoreList(formDTO); + resultList = factIndexCommunityScoreDao.selectCommunityWeightScoreList(formDTO); } else { //throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId())); return resultList; @@ -194,7 +194,7 @@ public class FactIndexServiceImpl implements FactIndexService { //4.网格层级数据 } else if (FactConstant.GRID.equals(formDTO.getOrgType())) { //4-1.查询当前组织某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分 - resultList = factIndexGridScoreDao.selectGridScoreList(formDTO); + resultList = factIndexGridScoreDao.selectGridWeightScoreList(formDTO); } else { throw new RenException(String.format("按月份查询各项能力分数,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType())); } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml index 8494abf052..85ae080a02 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml @@ -21,12 +21,12 @@ fact.month_id ASC - SELECT fact.index_code AS "indexCode", - ROUND(fact.score, 1) AS "indexTotal", - ROUND(self.self_score, 1) AS "agencyScore", - ROUND(self.sub_score, 1) AS "subAgencyScore" + ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", + ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", + ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore" FROM fact_index_agency_score fact INNER JOIN fact_index_agency_self_sub_score self ON fact.agency_id = self.agency_id @@ -45,8 +45,8 @@ SELECT fact.month_id AS "monthId", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", - ROUND(self.self_score*self.SELF_WEIGHT, 1) AS "agencyScore", - ROUND(self.sub_score*self.SUB_WEIGHT, 1) AS "subAgencyScore", + ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", + ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore", fact.index_code AS "indexCode" FROM fact_index_agency_score fact diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml index 2bd729444b..29e6d24277 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml @@ -21,12 +21,12 @@ fact.month_id ASC - SELECT fact.index_code AS "indexCode", - ROUND(fact.score, 1) AS "indexTotal", - ROUND(self.self_score, 1) AS "agencyScore", - ROUND(self.sub_score, 1) AS "subAgencyScore" + ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", + ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", + ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore" FROM fact_index_community_score fact INNER JOIN fact_index_community_self_sub_score self ON fact.agency_id = self.agency_id @@ -45,8 +45,8 @@ SELECT fact.month_id AS "monthId", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", - ROUND(self.self_score*self.SELF_WEIGHT, 1) AS "agencyScore", - ROUND(self.sub_score*self.SUB_WEIGHT, 1) AS "subAgencyScore", + ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", + ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore", fact.index_code AS "indexCode" FROM fact_index_community_score fact diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml index 33c401d10b..249f24d125 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml @@ -21,12 +21,12 @@ fact.month_id ASC - SELECT fact.index_code AS "indexCode", - ROUND(fact.score, 1) AS "indexTotal", - ROUND(self.self_score, 1) AS "agencyScore", - ROUND(self.sub_score, 1) AS "subAgencyScore" + ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", + ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", + ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore" FROM fact_index_grid_score fact INNER JOIN fact_index_grid_self_sub_score self ON fact.grid_id = self.grid_id @@ -46,8 +46,8 @@ SELECT fact.month_id AS "monthId", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", - ROUND(self.self_score*self.SELF_WEIGHT, 1) AS "agencyScore", - ROUND(self.sub_score*self.SUB_WEIGHT, 1) AS "subAgencyScore", + ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", + ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore", fact.index_code AS "indexCode" FROM fact_index_grid_score fact From 3007f286f1ae2707e9213dcbd09bdffff83f8818 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 26 Oct 2020 14:04:01 +0800 Subject: [PATCH 46/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/ProjectProcessServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java index 82747b2e41..e4c08f2ce3 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java @@ -363,6 +363,10 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl departmentNameList = new ArrayList<>(); List departmentList = new ArrayList<>(); ProjectDetailResultDTO projectDetailResultDTO = projectDao.selectProjectDetail(formDTO.getProjectId()); + if (null == projectDetailResultDTO){ + result.setDepartmentList(departmentList); + result.setDepartmentNameList(departments); + } if (ProjectConstant.CLOSED.equals(projectDetailResultDTO.getProjectStatus())) { //项目已结案,跟进部门为空 result.setDepartmentList(departmentList); From ed2739ae60191a8ce70f73370e5a08d3f496c756 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 26 Oct 2020 14:07:34 +0800 Subject: [PATCH 47/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/ProjectProcessServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java index e4c08f2ce3..6af8b68c00 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java @@ -366,6 +366,7 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl Date: Mon, 26 Oct 2020 15:43:41 +0800 Subject: [PATCH 48/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/DepartmentNameListResultDTO.java | 28 +++++++++++++++++++ .../dto/result/ProjectDetailResultDTO.java | 16 ++--------- .../project/impl/ProjectServiceImpl.java | 5 ++-- .../ProcessAndCurrentDeptResultDTO.java | 7 +++++ 4 files changed, 40 insertions(+), 16 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DepartmentNameListResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DepartmentNameListResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DepartmentNameListResultDTO.java new file mode 100644 index 0000000000..94cfb8fc51 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DepartmentNameListResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.AllArgsConstructor; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/10/26 3:36 下午 + */ +@Data +@AllArgsConstructor +public class DepartmentNameListResultDTO implements Serializable { + + private static final long serialVersionUID = -801407836277197080L; + + /** + * 部门名 + */ + private String departmentName; + /** + * 工作人员 + */ + private List staffList; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java index 88355feec4..df2f60b2f2 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.project.dto.result; +import com.epmet.evaluationindex.screen.dto.result.DepartmentNameListResultDTO; import lombok.Data; import lombok.NoArgsConstructor; @@ -48,20 +49,7 @@ public class ProjectDetailResultDTO implements Serializable { /** * 当前跟进部门 */ - private List departmentList; - - @NoArgsConstructor - @Data - public static class DepartmentNameListBean { - /** - * 部门名 - */ - private String departmentName; - /** - * 工作人员 - */ - private List staffList; - } + private List departmentList; public ProjectDetailResultDTO() { this.eventTitle = ""; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index ac9909f9a2..6285b76353 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -12,7 +12,7 @@ import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO; -import com.epmet.dto.result.ProcesslistResultDTO; +import com.epmet.evaluationindex.screen.dto.result.DepartmentNameListResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovProjectOpenFeignClient; import com.epmet.module.project.service.ProjectService; @@ -198,7 +198,8 @@ public class ProjectServiceImpl implements ProjectService { ProcessAndCurrentDeptResultDTO data = processList.getData(); List processResultDTOS = ConvertUtils.sourceToTarget(data.getProcessList(), ProjectProcessResultDTO.class); projectDetailResultDTO.setProcessList(processResultDTOS); - projectDetailResultDTO.setDepartmentList(data.getDepartmentList()); + List departmentNameListResultDTOS = ConvertUtils.sourceToTarget(data.getProcessList(), DepartmentNameListResultDTO.class); + projectDetailResultDTO.setDepartmentList(departmentNameListResultDTOS); projectDetailResultDTO.setDepartmentNameList(data.getDepartmentNameList()); return projectDetailResultDTO; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessAndCurrentDeptResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessAndCurrentDeptResultDTO.java index d55b9c8373..fde671e08c 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessAndCurrentDeptResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessAndCurrentDeptResultDTO.java @@ -4,6 +4,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -38,4 +39,10 @@ public class ProcessAndCurrentDeptResultDTO implements Serializable { */ private List staffList; } + + public ProcessAndCurrentDeptResultDTO() { + this.processList = new ArrayList<>(); + this.departmentNameList = new ArrayList<>(); + this.departmentList = new ArrayList<>(); + } } From 1949da956b2b721144bf6727e840b06c226d1fb7 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 26 Oct 2020 17:07:03 +0800 Subject: [PATCH 49/53] =?UTF-8?q?=E4=BA=94=E7=BA=A7=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E5=8E=9F=E5=A7=8B=E5=80=BC=20=E6=B7=BB=E5=8A=A0=E6=9D=83?= =?UTF-8?q?=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/result/AblityListResultDTO.java | 6 ++++++ .../resources/mapper/fact/FactIndexAgencySubScoreDao.xml | 3 ++- .../resources/mapper/fact/FactIndexCommunitySubScoreDao.xml | 3 ++- .../main/resources/mapper/fact/FactIndexGridSubScoreDao.xml | 3 ++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java index 97c32e1994..d6cc4cd785 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; /** * 按月查询各项指标数据--接口返参 @@ -30,4 +31,9 @@ public class AblityListResultDTO implements Serializable { */ private String showType; + /** + * 指标对应的权重 + */ + private BigDecimal weight; + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml index 9744157016..691f149e1c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml @@ -7,7 +7,8 @@ SELECT fact.index_code AS "key", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", - dict.index_name AS "name" + dict.index_name AS "name", + round(fact.WEIGHT,2) AS weight FROM fact_index_agency_sub_score fact LEFT JOIN index_dict dict ON fact.index_code = dict.index_code diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml index 197b6f9bf9..db57d11ee3 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml @@ -7,7 +7,8 @@ SELECT fact.index_code AS "key", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", - dict.index_name AS "name" + dict.index_name AS "name", + round(fact.WEIGHT,2) AS weight FROM fact_index_community_sub_score fact LEFT JOIN index_dict dict ON fact.index_code = dict.index_code diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml index 1b317e2791..0cf826892b 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml @@ -7,7 +7,8 @@ SELECT fact.index_code AS "key", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", - dict.index_name AS "name" + dict.index_name AS "name", + round(fact.WEIGHT,2) AS weight FROM fact_index_grid_sub_score fact LEFT JOIN index_dict dict ON fact.index_code = dict.index_code From 9f3ee085532757f186060f00d478697afba86d7d Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 26 Oct 2020 17:28:21 +0800 Subject: [PATCH 50/53] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/controller/screen/DistributionController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java index 8c17f03238..7074ed33d8 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java @@ -27,8 +27,8 @@ public class DistributionController { private DistributionService distributionService; /** - * @Description 1、党支部 * @param formDTO + * @Description 1、党支部分布 * @author zxc * @date 2020/8/18 10:59 上午 */ From 1d81408cf4fc6a6f42e7d348817827b433fbc0b7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 26 Oct 2020 17:37:56 +0800 Subject: [PATCH 51/53] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=B8=83=EF=BC=8C=E7=94=A8=E6=88=B7=E5=88=86=E5=B8=83=EF=BC=8C?= =?UTF-8?q?=E5=85=9A=E5=91=98=E5=88=86=E5=B8=83=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=99=BA=E6=85=A7=E7=A4=BE=E5=8C=BA=E8=A6=81?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/screen/DistributionController.java | 6 +++--- .../mapper/screen/ScreenCustomerAgencyDao.xml | 4 ++-- .../mapper/screen/ScreenCustomerGridDao.xml | 14 ++++++++------ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java index 7074ed33d8..25bf9e5434 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java @@ -28,7 +28,7 @@ public class DistributionController { /** * @param formDTO - * @Description 1、党支部分布 + * @Description 1、党支部分布 【只显示 screen_customer_biz_org 表中存在的orgId的数据】 * @author zxc * @date 2020/8/18 10:59 上午 */ @@ -39,7 +39,7 @@ public class DistributionController { } /** - * @Description 2、用户分布 + * @Description 2、用户分布 【只显示 screen_customer_biz_org 表中存在的orgId的数据】 * @param userFormDTO * @author zxc * @date 2020/8/18 11:10 上午 @@ -51,7 +51,7 @@ public class DistributionController { } /** - * @Description 3、党员分布 + * @Description 3、党员分布 【只显示 screen_customer_biz_org 表中存在的orgId的数据】 * @param parymemberFormDTO * @author zxc * @date 2020/8/18 11:20 上午 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index 9007350e5c..f16395c129 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -80,7 +80,7 @@ sutd.org_type AS type FROM screen_user_total_data sutd - LEFT JOIN screen_customer_agency sca ON sca.agency_id = sutd.org_id + LEFT JOIN screen_customer_agency sca ON sca.agency_id = sutd.org_id AND sca.is_display = 1 WHERE sutd.del_flag = '0' AND sca.del_flag = 0 @@ -98,7 +98,7 @@ sutd.org_type AS type FROM screen_user_total_data sutd - LEFT JOIN screen_customer_agency sca ON sca.agency_id = sutd.org_id + LEFT JOIN screen_customer_agency sca ON sca.agency_id = sutd.org_id AND sca.is_display = 1 WHERE sutd.del_flag = '0' AND sca.del_flag = 0 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index b17fe0f6a8..c072214600 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -21,14 +21,16 @@ From ca48ac6fa56040542edda98059229da85924723a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 26 Oct 2020 17:40:20 +0800 Subject: [PATCH 52/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/service/project/impl/ProjectServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index 6285b76353..45f1f87a0b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -198,7 +198,7 @@ public class ProjectServiceImpl implements ProjectService { ProcessAndCurrentDeptResultDTO data = processList.getData(); List processResultDTOS = ConvertUtils.sourceToTarget(data.getProcessList(), ProjectProcessResultDTO.class); projectDetailResultDTO.setProcessList(processResultDTOS); - List departmentNameListResultDTOS = ConvertUtils.sourceToTarget(data.getProcessList(), DepartmentNameListResultDTO.class); + List departmentNameListResultDTOS = ConvertUtils.sourceToTarget(data.getDepartmentList(), DepartmentNameListResultDTO.class); projectDetailResultDTO.setDepartmentList(departmentNameListResultDTOS); projectDetailResultDTO.setDepartmentNameList(data.getDepartmentNameList()); return projectDetailResultDTO; From bfe805843727254556c9b02b625677e40005a6b9 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 27 Oct 2020 10:53:35 +0800 Subject: [PATCH 53/53] =?UTF-8?q?=E6=8C=89=E5=AE=A2=E6=88=B7=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=A8=A1=E6=9D=BFId=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CustomerTemplateListFormDTO.java | 27 +++++++++++++++++ .../result/CustomerTemplateListResultDTO.java | 30 +++++++++++++++++++ .../PersonalTemplateController.java | 15 ++++++++++ .../com/epmet/dao/PersonalTemplateDao.java | 9 ++++++ .../service/PersonalTemplateService.java | 9 ++++++ .../impl/PersonalTemplateServiceImpl.java | 12 ++++++++ .../resources/mapper/PersonalTemplateDao.xml | 15 ++++++++++ 7 files changed, 117 insertions(+) create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CustomerTemplateListFormDTO.java create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CustomerTemplateListResultDTO.java diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CustomerTemplateListFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CustomerTemplateListFormDTO.java new file mode 100644 index 0000000000..9dbabbfdbe --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CustomerTemplateListFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 获取客户小程序模板列表-接口入参 + * @Author sun + */ +@Data +public class CustomerTemplateListFormDTO implements Serializable { + + /** + * 客户Id + */ + @NotBlank(message="客户Id不能为空", groups = {AddUserInternalGroup.class}) + private String customerId; + /** + * 微信公共模板库模板Id + */ + @NotBlank(message="公共模板Id不能为空", groups = {AddUserInternalGroup.class}) + private String publicId; + public interface AddUserInternalGroup {} +} + diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CustomerTemplateListResultDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CustomerTemplateListResultDTO.java new file mode 100644 index 0000000000..e6d92fd8f3 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CustomerTemplateListResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 获取客户小程序模板列表-接口返参 + * @Author sun + */ +@Data +public class CustomerTemplateListResultDTO implements Serializable { + private static final long serialVersionUID = 6856602932571839314L; + + /** + * 模板Id + */ + private String templateId; + + /** + * 模板类型(站内信提醒) + */ + private String templateType; + + /** + * 所属端(居民端:resi 工作端:work) + */ + private String clientType; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PersonalTemplateController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PersonalTemplateController.java index bec7a2d3a8..dc6099d9fe 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PersonalTemplateController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PersonalTemplateController.java @@ -1,7 +1,10 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.CustomerTemplateListFormDTO; import com.epmet.dto.form.GetTemplateListFormDTO; +import com.epmet.dto.result.CustomerTemplateListResultDTO; import com.epmet.dto.result.GetTemplateListResultDTO; import com.epmet.service.PersonalTemplateService; import org.springframework.beans.factory.annotation.Autowired; @@ -30,8 +33,20 @@ public class PersonalTemplateController { */ @PostMapping("templatelist") public Result> templateList(@RequestBody GetTemplateListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GetTemplateListFormDTO.AddUserInternalGroup.class); return new Result>().ok(personalTemplateService.templateList(formDTO)); } + /** + * @return + * @Description 获取客户两个端站内信模板Id + * @author sun + */ + @PostMapping("customertemplatelist") + public Result> customerTemplateList(@RequestBody CustomerTemplateListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, CustomerTemplateListFormDTO.AddUserInternalGroup.class); + return new Result>().ok(personalTemplateService.customerTemplateList(formDTO)); + } + } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PersonalTemplateDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PersonalTemplateDao.java index a92981e0d4..6e229dc052 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PersonalTemplateDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PersonalTemplateDao.java @@ -19,8 +19,10 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.PersonalTemplateDTO; +import com.epmet.dto.form.CustomerTemplateListFormDTO; import com.epmet.dto.form.GetTemplateListFormDTO; import com.epmet.dto.result.CustomerTempResultDTO; +import com.epmet.dto.result.CustomerTemplateListResultDTO; import com.epmet.dto.result.GetTemplateListResultDTO; import com.epmet.dto.result.TemplateDTO; import com.epmet.entity.PersonalTemplateEntity; @@ -85,4 +87,11 @@ public interface PersonalTemplateDao extends BaseDao { * @author sun */ List selectTemplateList(GetTemplateListFormDTO formDTO); + + /** + * @return + * @Description 获取客户两个端站内信模板Id + * @author sun + */ + List selectCustomerTemplateList(CustomerTemplateListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PersonalTemplateService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PersonalTemplateService.java index 9f79ece63c..f3f0da9b49 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PersonalTemplateService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PersonalTemplateService.java @@ -20,7 +20,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.PersonalTemplateDTO; +import com.epmet.dto.form.CustomerTemplateListFormDTO; import com.epmet.dto.form.GetTemplateListFormDTO; +import com.epmet.dto.result.CustomerTemplateListResultDTO; import com.epmet.dto.result.GetTemplateListResultDTO; import com.epmet.dto.result.TemplateDTO; import com.epmet.entity.PersonalTemplateEntity; @@ -132,4 +134,11 @@ public interface PersonalTemplateService extends BaseService templateList(GetTemplateListFormDTO formDTO); + + /** + * @return + * @Description 获取客户两个端站内信模板Id + * @author sun + */ + List customerTemplateList(CustomerTemplateListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PersonalTemplateServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PersonalTemplateServiceImpl.java index 8a5764427a..154cca9082 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PersonalTemplateServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PersonalTemplateServiceImpl.java @@ -25,7 +25,9 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.PersonalTemplateDao; import com.epmet.dto.PersonalTemplateDTO; +import com.epmet.dto.form.CustomerTemplateListFormDTO; import com.epmet.dto.form.GetTemplateListFormDTO; +import com.epmet.dto.result.CustomerTemplateListResultDTO; import com.epmet.dto.result.GetTemplateListResultDTO; import com.epmet.dto.result.TemplateDTO; import com.epmet.entity.PersonalTemplateEntity; @@ -129,4 +131,14 @@ public class PersonalTemplateServiceImpl extends BaseServiceImpl customerTemplateList(CustomerTemplateListFormDTO formDTO) { + return baseDao.selectCustomerTemplateList(formDTO); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PersonalTemplateDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PersonalTemplateDao.xml index 0b3f7ace51..7eab9a2e63 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PersonalTemplateDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PersonalTemplateDao.xml @@ -89,4 +89,19 @@ ORDER BY CREATED_TIME DESC + + \ No newline at end of file