From 69a74644bff4e4769b34844c7781a15e0efb5d80 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 16:50:58 +0800 Subject: [PATCH 01/31] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/ProjectInfoDTO.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java new file mode 100644 index 0000000000..9978336a86 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java @@ -0,0 +1,33 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.util.List; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/24 16:11 + */ +@Data +public class ProjectInfoDTO { + // 【事件 = 项目】 + + /** + * 事件图片集合 + */ + private List imgUrlList; + + private String fromGridName; + + /** + * 项目标题 + */ + private String eventTitle; + + /** + * 项目内容 + */ + private String eventContent; +} From ae0ef253a738cee3a34a6ce22c0a324bbc6e3e9f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 16:51:30 +0800 Subject: [PATCH 02/31] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=9A=82=E5=AD=981?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/impl/ProjectServiceImpl.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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 9c2336d992..3daf34aa23 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 @@ -27,6 +27,7 @@ import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; import com.epmet.project.dto.result.ProjectDetailResultDTO; import com.epmet.project.dto.result.*; import com.github.pagehelper.PageHelper; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -42,6 +43,7 @@ import java.util.List; * @Author sun * @Description 数据-项目 **/ +@Slf4j @Service public class ProjectServiceImpl implements ProjectService { @@ -197,10 +199,22 @@ public class ProjectServiceImpl implements ProjectService { */ @Override public ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO) { - ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataService.projectDetail(processListFormDTO); + /*ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataService.projectDetail(processListFormDTO); if (null == projectDetailResultDTO) { return new ProjectDetailResultDTO(); - } + }*/ + ProjectDetailResultDTO projectDetailResultDTO=new ProjectDetailResultDTO(); + //todo + /*Result result=govProjectOpenFeignClient.queryProjectInfoByProjectId(processListFormDTO.getProjectId()); + if(result.success()&&null!=result.getData()){ + ProjectInfoDTO projectInfoDTO=result.getData(); + projectDetailResultDTO.setImgUrlList(projectInfoDTO.getImgUrlList()); + projectDetailResultDTO.setEventSource(projectInfoDTO.getFromGridName()); + projectDetailResultDTO.setEventTitle(projectInfoDTO.getEventTitle()); + projectDetailResultDTO.setEventContent(projectInfoDTO.getEventContent()); + }else{ + log.warn(String.format("项目信息查询失败,projectId:%s",processListFormDTO.getProjectId())); + }*/ Result processList = govProjectOpenFeignClient.getProcessList(processListFormDTO); if (!processList.success()) { throw new RenException(ProjectConstant.PROCESS_FAILURE); From 39a40e6b1f6e1f6a41e378810d0a2f0b3ba1fba0 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 24 Feb 2021 17:22:40 +0800 Subject: [PATCH 03/31] =?UTF-8?q?=E5=85=88=E9=94=8B=E6=A8=A1=E8=8C=83?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/form/FineExampleFormDTO.java | 3 ++ .../screen/PartyMemberLeadController.java | 7 +-- .../screen/ScreenPioneerDataDao.java | 13 +++++ .../impl/PartyMemberLeadServiceImpl.java | 47 ++++++++++++++----- .../mapper/screen/ScreenPioneerDataDao.xml | 35 ++++++++++++++ 5 files changed, 89 insertions(+), 16 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java index 5ed5b9fc1a..938c15bdf4 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -21,4 +22,6 @@ public class FineExampleFormDTO implements Serializable { */ @NotBlank(message = "机关ID不能为空",groups = {FineExample.class}) private String agencyId; + + private String customerId; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java index ca1104f534..9a0d67f2b2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java @@ -6,10 +6,7 @@ import com.epmet.datareport.service.evaluationindex.screen.PartyMemberLeadServic import com.epmet.evaluationindex.screen.dto.form.*; import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -33,7 +30,7 @@ public class PartyMemberLeadController { * @date 2020/8/20 1:56 下午 */ @PostMapping("fineexample") - public Result fineExample(@RequestBody FineExampleFormDTO fineExampleFormDTO){ + public Result fineExample(@RequestHeader("CustomerId") String customerId, @RequestBody FineExampleFormDTO fineExampleFormDTO){ ValidatorUtils.validateEntity(fineExampleFormDTO, FineExampleFormDTO.FineExample.class); return new Result().ok(partyMemberLeadService.fineExample(fineExampleFormDTO)); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java index 92177ec52c..5bc3077e85 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java @@ -21,6 +21,8 @@ import com.epmet.evaluationindex.screen.dto.result.FineExampleResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 党建引领-先锋模范数据 * @@ -37,5 +39,16 @@ public interface ScreenPioneerDataDao{ * @date 2020/8/20 5:22 下午 */ FineExampleResultDTO selectFineExample(@Param("agencyId")String agencyId); + + /** + * @Description 根据地区码查询先锋模范 + * @param areaCode + * @param customerId + * @param customerIds - 子级客户列表 + * @return com.epmet.evaluationindex.screen.dto.result.FineExampleResultDTO + * @author wangc + * @date 2021.02.24 15:39 + */ + FineExampleResultDTO selectFineExampleByAreaCode(@Param("areaCode")String areaCode,@Param("customerId")String customerId,@Param("list") List customerIds); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java index 941a294e49..2de292f6ea 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java @@ -2,18 +2,22 @@ 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.exception.RenException; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screen.*; import com.epmet.datareport.service.evaluationindex.screen.PartyMemberLeadService; import com.epmet.datareport.utils.DateUtils; import com.epmet.datareport.utils.ModuleConstant; +import com.epmet.dto.result.ScreenCustomerAgencyDTO; import com.epmet.evaluationindex.screen.constant.ScreenConstant; import com.epmet.evaluationindex.screen.dto.form.AgencyAndNumFormDTO; import com.epmet.evaluationindex.screen.dto.form.ContactMassLineChartFormDTO; import com.epmet.evaluationindex.screen.dto.form.FineExampleFormDTO; import com.epmet.evaluationindex.screen.dto.form.VolunteerServiceFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; +import com.epmet.feign.OperCrmOpenFeignClient; import com.github.pagehelper.PageHelper; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -48,7 +52,10 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { private DateUtils dateUtils; @Autowired private ScreenPartyUserRankDataDao screenPartyUserRankDataDao; - + @Autowired + private ScreenCustomerAgencyDao customerAgencyDao; + @Autowired + private OperCrmOpenFeignClient operCrmOpenFeignClient; /** * @Description 1、先锋模范 * @param fineExampleFormDTO @@ -58,17 +65,35 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public FineExampleResultDTO fineExample(FineExampleFormDTO fineExampleFormDTO) { - FineExampleResultDTO fineExampleResultDTO = screenPioneerDataDao.selectFineExample(fineExampleFormDTO.getAgencyId()); - if (null == fineExampleResultDTO){ - return new FineExampleResultDTO(); + String customerId = fineExampleFormDTO.getCustomerId(); + String areaCode = null; + if(StringUtils.isBlank(customerId)){ + ScreenCustomerAgencyDTO agencyInfo = customerAgencyDao.selectByAgencyId(fineExampleFormDTO.getAgencyId()); + if(null == agencyInfo) throw new RenException("未找到对应的机关"); + customerId = agencyInfo.getCustomerId(); + areaCode = agencyInfo.getAreaCode(); } - fineExampleResultDTO.setIssueRatio(this.getRatio(fineExampleResultDTO.getIssueRatioA())); - fineExampleResultDTO.setPublishIssueRatio(this.getRatio(fineExampleResultDTO.getPublishIssueRatioA())); - fineExampleResultDTO.setResolvedProjectRatio(this.getRatio(fineExampleResultDTO.getResolvedProjectRatioA())); - fineExampleResultDTO.setTopicRatio(this.getRatio(fineExampleResultDTO.getTopicRatioA())); - fineExampleResultDTO.setShiftProjectRatio(this.getRatio(fineExampleResultDTO.getShiftProjectRatioA())); - fineExampleResultDTO.setPlatJoinPartyRatio(this.getRatio(Double.valueOf(fineExampleResultDTO.getPlatJoinPartyRatio()))); - return fineExampleResultDTO; + Result> crmResponse = operCrmOpenFeignClient.getAllSubCustomerIds(customerId); + if(null == crmResponse || !crmResponse.success()){ + throw new RenException("获取子客户列表失败"); + } + List subCustomers = crmResponse.getData(); + FineExampleResultDTO fineExampleResultDTO; + if(CollectionUtils.isEmpty(subCustomers)) + fineExampleResultDTO = screenPioneerDataDao.selectFineExample(fineExampleFormDTO.getAgencyId()); + else + fineExampleResultDTO = screenPioneerDataDao.selectFineExampleByAreaCode(areaCode,customerId,subCustomers); + + if (null == fineExampleResultDTO) { + return new FineExampleResultDTO(); + } + fineExampleResultDTO.setIssueRatio(this.getRatio(fineExampleResultDTO.getIssueRatioA())); + fineExampleResultDTO.setPublishIssueRatio(this.getRatio(fineExampleResultDTO.getPublishIssueRatioA())); + fineExampleResultDTO.setResolvedProjectRatio(this.getRatio(fineExampleResultDTO.getResolvedProjectRatioA())); + fineExampleResultDTO.setTopicRatio(this.getRatio(fineExampleResultDTO.getTopicRatioA())); + fineExampleResultDTO.setShiftProjectRatio(this.getRatio(fineExampleResultDTO.getShiftProjectRatioA())); + fineExampleResultDTO.setPlatJoinPartyRatio(this.getRatio(Double.valueOf(fineExampleResultDTO.getPlatJoinPartyRatio()))); + return fineExampleResultDTO; } /** diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml index c1a5570113..afbddb095b 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml @@ -26,4 +26,39 @@ ORDER BY data_end_time DESC LIMIT 1 + + + + + + From f47aca28de7a1848170c8b7912120a92b33373a5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 24 Feb 2021 17:27:34 +0800 Subject: [PATCH 04/31] =?UTF-8?q?=E6=A0=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AreaCodeServiceImpl.java | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java index 1360f92778..5e865cfc44 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java @@ -386,6 +386,7 @@ public class AreaCodeServiceImpl extends BaseServiceImpl areaCodeChildDTOS = childDao.selectAllChild(); List fourResult = new ArrayList<>(); + List fiveResult = new ArrayList<>(); // 街道-社区 Map> groupByLevel = areaCodeChildDTOS.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getLevel)); //社区 @@ -393,23 +394,40 @@ public class AreaCodeServiceImpl extends BaseServiceImpl> groupByPCode = levelFive.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode)); //街道 List levelFour = groupByLevel.get(NumConstant.FOUR); + // 6级 + List levelSix = groupByLevel.get(NumConstant.SIX); + Map> groupBySixPCode = levelSix.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode)); + + levelFive.forEach(f -> { + AreaCodeDictResultDTO dto = new AreaCodeDictResultDTO(); + dto.setCode(f.getCode()); + dto.setName(f.getName()); + dto.setParentCode(f.getPCode()); + groupBySixPCode.forEach((k,v) -> { + if (dto.getCode().equals(k)){ + List six = new ArrayList<>(); + v.forEach(s -> { + AreaCodeDictResultDTO sixDto = new AreaCodeDictResultDTO(); + sixDto.setCode(s.getCode()); + sixDto.setName(s.getName()); + sixDto.setParentCode(k); + six.add(sixDto); + }); + List collect = six.stream().sorted(Comparator.comparing(AreaCodeDictResultDTO::getCode)).collect(Collectors.toList()); + dto.setChildren(collect); + } + }); + fiveResult.add(dto); + }); + Map> groupByFivePCode = fiveResult.stream().collect(Collectors.groupingBy(AreaCodeDictResultDTO::getParentCode)); levelFour.forEach(four -> { AreaCodeDictResultDTO dto = new AreaCodeDictResultDTO(); dto.setCode(four.getCode()); dto.setName(four.getName()); dto.setParentCode(four.getPCode()); - groupByPCode.forEach((pCode,v) -> { + groupByFivePCode.forEach((pCode,v) -> { if (dto.getCode().equals(pCode)){ - List fiveResult = new ArrayList<>(); - v.forEach(five -> { - AreaCodeDictResultDTO fiveDto = new AreaCodeDictResultDTO(); - fiveDto.setCode(five.getCode()); - fiveDto.setName(five.getName()); - fiveDto.setParentCode(pCode); - fiveResult.add(fiveDto); - }); - List fiveSort = fiveResult.stream().sorted(Comparator.comparing(AreaCodeDictResultDTO::getCode)).collect(Collectors.toList()); - dto.setChildren(fiveSort); + dto.setChildren(v); } }); fourResult.add(dto); From c54fcacde80e90d9499446d0390c77c70d82c5b8 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Feb 2021 17:29:22 +0800 Subject: [PATCH 05/31] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/result/WorkRecordTrendResultDTO.java | 10 +++++----- .../impl/ScreenWorkRecordOrgDailyServiceImpl.java | 11 ++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordTrendResultDTO.java index b456eb5326..eb5df34e99 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordTrendResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordTrendResultDTO.java @@ -1,10 +1,10 @@ package com.epmet.plugins.result; import com.fasterxml.jackson.annotation.JsonIgnore; -import lombok.AllArgsConstructor; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -18,17 +18,17 @@ public class WorkRecordTrendResultDTO implements Serializable { * 横轴 过去十二个月份 * ['1月', '2月', '3月', '4月', '5月','6月','7月','8月','9月','10月','11月','12月'] */ - private List xAxis; + private List xAxis = new ArrayList<>(); /** * 资源标签名 * ['三会一课', '主题党日', '三述专题', '志愿服务', '党内关怀'] */ - private List legend; + private List legend = new ArrayList<>(); /** *各项资源对应数据对象 */ - private List series; + private List series = new ArrayList<>(); @Data public static class SeriesResultDTO { @@ -40,7 +40,7 @@ public class WorkRecordTrendResultDTO implements Serializable { /** * 各项资源对应12月份数据 */ - private List data; + private List data = new ArrayList<>(); /** * 数据对应的月份Id */ diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java index 635a03a5df..0d662c87e1 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -152,18 +152,19 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl map = dateUtils.getXpro(); - resultDTO.setXAxis(map.values().stream().collect(Collectors.toList())); - List monthIdList = map.keySet().stream().collect(Collectors.toList()); - //2.根据资源编码查询资源名称集合,按sort升序 + //1.根据资源编码查询资源名称集合,按sort升序 List legendList = screenCustomerWorkRecordDictDao.selectListByDataType(formDTO.getCustomerId(), formDTO.getDataType()); resultDTO.setLegend(legendList); if (null == legendList || legendList.size() < NumConstant.ONE) { return resultDTO; } + //2.查询当前月过去12个月份 + Map map = dateUtils.getXpro(); + resultDTO.setXAxis(map.values().stream().collect(Collectors.toList())); + List monthIdList = map.keySet().stream().collect(Collectors.toList()); + //3-1.查询当前组织及所有下级过去12个月份某项数据所有资源的统计数据 DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyyMM"); LocalDate today = LocalDate.now(); From 1f072c3e84fc911c1fd994fe7075ca62bc5d3380 Mon Sep 17 00:00:00 2001 From: liushaowen <565850092@qq.com> Date: Wed, 24 Feb 2021 18:02:37 +0800 Subject: [PATCH 06/31] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=EF=BC=8C=E5=92=8C=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/ScreenProjectDetailFormDTO.java | 19 ++ .../ScreenProjectDistributionFormDTO.java | 21 ++ .../result/ScreenProjectDetailResultDTO.java | 124 ++++++++++ .../ScreenProjectDistributionResultDTO.java | 32 +++ .../screen/ScreenProjectController.java | 23 ++ .../screen/ScreenProjectDataDao.java | 24 ++ .../screen/ScreenProjectService.java | 6 + .../screen/impl/ScreenProjectServiceImpl.java | 49 +++- .../mapper/screen/ScreenProjectDataDao.xml | 87 +++++++ .../dto/screen/ScreenProjectDataDTO.java | 172 ++++++++++++++ .../dto/screen/ScreenProjectImgDataDTO.java | 91 +++++++ .../ScreenProjectProcessAttachmentDTO.java | 136 +++++++++++ .../dto/screen/ScreenProjectProcessDTO.java | 146 ++++++++++++ .../form/ScreenProjectDataInfoFormDTO.java | 112 +++++++++ .../form/ScreenProjectProcessFormDTO.java | 20 ++ .../ScreenProjectDataCollController.java | 37 +++ .../screen/ScreenProjectDataDao.java | 39 +++ .../screen/ScreenProjectImgDataDao.java | 33 +++ .../ScreenProjectProcessAttachmentDao.java | 33 +++ .../screen/ScreenProjectProcessDao.java | 35 +++ .../screen/ScreenProjectDataEntity.java | 142 +++++++++++ .../screen/ScreenProjectImgDataEntity.java | 61 +++++ .../ScreenProjectProcessAttachmentEntity.java | 106 +++++++++ .../screen/ScreenProjectProcessEntity.java | 110 +++++++++ .../screen/ScreenProjectDataService.java | 99 ++++++++ .../screen/ScreenProjectImgDataService.java | 96 ++++++++ ...ScreenProjectProcessAttachmentService.java | 95 ++++++++ .../screen/ScreenProjectProcessService.java | 99 ++++++++ .../impl/ScreenProjectDataServiceImpl.java | 222 ++++++++++++++++++ .../impl/ScreenProjectImgDataServiceImpl.java | 99 ++++++++ ...enProjectProcessAttachmentServiceImpl.java | 98 ++++++++ .../impl/ScreenProjectProcessServiceImpl.java | 156 ++++++++++++ .../screen/ScreenProjectDataDao.xml | 43 ++++ .../screen/ScreenProjectImgDataDao.xml | 21 ++ .../ScreenProjectProcessAttachmentDao.xml | 30 +++ .../screen/ScreenProjectProcessDao.xml | 13 + 36 files changed, 2728 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDetailFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDistributionFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDetailResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDistributionResultDTO.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectDataDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectImgDataDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessAttachmentDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectDataInfoFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectProcessFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectImgDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessAttachmentDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectImgDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectProcessAttachmentEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectProcessEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectImgDataService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessAttachmentService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectImgDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessAttachmentDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDetailFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDetailFormDTO.java new file mode 100644 index 0000000000..be3585067d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDetailFormDTO.java @@ -0,0 +1,19 @@ +package com.epmet.evaluationindex.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @description: + * @author: liushaowen + * @date: 2021/2/24 16:12 + */ +@Data +public class ScreenProjectDetailFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @NotBlank(message = "projectId不能为空") + private String projectId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDistributionFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDistributionFormDTO.java new file mode 100644 index 0000000000..69da09b886 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDistributionFormDTO.java @@ -0,0 +1,21 @@ +package com.epmet.evaluationindex.screen.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @description: + * @author: liushaowen + * @date: 2021/2/24 15:22 + */ +@Data +public class ScreenProjectDistributionFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + + private String areaCode; + + private String level; + + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDetailResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDetailResultDTO.java new file mode 100644 index 0000000000..7ec31acd09 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDetailResultDTO.java @@ -0,0 +1,124 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * @description: + * @author: liushaowen + * @date: 2021/2/24 16:15 + */ +@Data +public class ScreenProjectDetailResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + /** + * 项目id + */ + private String projectId; + /** + * 议题内容,其实就是项目内容 + */ + private String projectContent; + /** + * 上报时间,对应的是立项时间;格式:yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private String reportTime; + /** + * 所属类别名称 + */ + private String categoryName; + /** + * 上报人名 + */ + private String reportUserName; + /** + * 上报人电话 + */ + private String mobile; + /** + * 上报位置 + */ + private String reportAddress; + /** + * 图片列表 + */ + private List imgList; + /** + * 处理进展列表(返回的是按时间升序的集合) + */ + private List processList; + + @Data + public static class processDTO{ + @JsonIgnore + private String processId; + /** + * 处理部门名称 + */ + private String handleDeptName; + /** + * 公开处理意见 + */ + private String suggestion; + /** + * 处理时间:yyyy-MM-dd HH:mm:ss + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date reponseTime; + /** + * 关闭:close; 回应 response,结案closed_case,退回return,部门流转transfer,创建项目created + */ + private String operation; + /** + * 被吹哨部门;如果是多个以逗号隔开返给前端。 + */ + private String whistleDeptName; + + private List attachments; + + @Data + public static class AttachmentDTO{ + @JsonInclude(JsonInclude.Include.NON_NULL) + /** + * 文件名 + */ + private String fileName; + @JsonInclude(JsonInclude.Include.NON_NULL) + /** + * 附件名(uuid随机生成) + */ + private String attachmentName; + @JsonInclude(JsonInclude.Include.NON_NULL) + /** + * 附件大小 字节为单位 + */ + private String attachmentSize; + @JsonInclude(JsonInclude.Include.NON_NULL) + /** + * 文件格式(JPG、PNG、JPEG、BMP、GIF、PDF、PPT、PPTX、DOC、DOCX、XLS、XLSX、MP3、WMA、M4A、MP4、AVI、MOV、RMVB、RM、WMV) + */ + private String attachmentFormat; + @JsonInclude(JsonInclude.Include.NON_NULL) + /** + * 文件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + /** + * url地址 + */ + private String attachmentUrl; + @JsonInclude(JsonInclude.Include.NON_NULL) + /** + * 语音或视频时长,秒 + */ + private String duration; + } + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDistributionResultDTO.java new file mode 100644 index 0000000000..839870a4ab --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDistributionResultDTO.java @@ -0,0 +1,32 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @description: + * @author: liushaowen + * @date: 2021/2/24 15:26 + */ +@Data +public class ScreenProjectDistributionResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + /** + * 主键id + */ + private String id; + /** + * 项目标题 + */ + private String projectTitle; + /** + * 项目等级 1:红色事件;2:黄色事件;3:绿色事件 + */ + private String level; + /** + * 经纬度 + */ + private String longitude; + private String latitude; +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java index 8d00c29f2f..6462fa61ec 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java @@ -3,10 +3,14 @@ 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.ScreenProjectService; +import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDetailFormDTO; +import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDistributionFormDTO; import com.epmet.dto.form.screen.CategoryAnalysisFormDTO; import com.epmet.dto.result.screen.CategoryAnalysisResultDTO; import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO; import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO; +import oracle.jdbc.proxy.annotation.Post; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -37,6 +41,25 @@ public class ScreenProjectController { return new Result().ok(screenProjectService.projectDetail(projectDetailFormDTO)); } + /** + * @Description 中央区事件分析-项目分布 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author liushaowen + * @Date 2021/2/24 16:10 + */ + @PostMapping("projectdistribution") + public Result projectDistribution(@RequestBody ScreenProjectDistributionFormDTO formDTO){ + if (StringUtils.isBlank(formDTO.getAreaCode()) && StringUtils.isBlank(formDTO.getAgencyId())){ + formDTO.setAreaCode("370124"); + } + return screenProjectService.projectDistribution(formDTO); + } + + @PostMapping("projectdetail") + public Result projectDetail(@RequestBody ScreenProjectDetailFormDTO formDTO){ + return screenProjectService.projectDistributionDetail(formDTO); + } /** * 【事件分析】类型分析 * @author zhaoqifeng diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java new file mode 100644 index 0000000000..6ac5ef48ea --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java @@ -0,0 +1,24 @@ +package com.epmet.datareport.dao.evaluationindex.screen; + +import com.epmet.evaluationindex.screen.dto.result.ScreenProjectDetailResultDTO; +import com.epmet.evaluationindex.screen.dto.result.ScreenProjectDistributionResultDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface ScreenProjectDataDao { + + List projectDistribution(@Param("agencyId") String agencyId, @Param("ids") List ids, @Param("level") String level); + + List selectIdsByAreaCode(@Param("areaCode") String areaCode); + + List projectDistributionDetail(@Param("projectId") String projectId); + + List selectProjectImgs(@Param("projectId") String projectId); + + List selectProjectProcess(@Param("projectId") String projectId); + + List selectProjectProcessAttachments(@Param("processId") String processId); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectService.java index aa39e9345a..b4b0fe8725 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectService.java @@ -1,5 +1,8 @@ package com.epmet.datareport.service.evaluationindex.screen; +import com.epmet.commons.tools.utils.Result; +import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDetailFormDTO; +import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDistributionFormDTO; import com.epmet.dto.form.screen.CategoryAnalysisFormDTO; import com.epmet.dto.result.screen.CategoryAnalysisResultDTO; import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO; @@ -33,4 +36,7 @@ public interface ScreenProjectService { */ List categoryAnalysis(String customerId, CategoryAnalysisFormDTO formDTO); + Result projectDistribution(ScreenProjectDistributionFormDTO formDTO); + + Result projectDistributionDetail(ScreenProjectDetailFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java index 63111dd7f0..780df28bd5 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java @@ -1,16 +1,23 @@ package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventDataDao; import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventImgDataDao; import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectCategoryOrgDailyDao; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectDataDao; import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectService; import com.epmet.dto.form.screen.CategoryAnalysisFormDTO; import com.epmet.dto.result.screen.CategoryAnalysisResultDTO; +import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDetailFormDTO; +import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDistributionFormDTO; import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO; import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO; +import com.epmet.evaluationindex.screen.dto.result.ScreenProjectDetailResultDTO; +import com.epmet.evaluationindex.screen.dto.result.ScreenProjectDistributionResultDTO; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -31,6 +38,9 @@ public class ScreenProjectServiceImpl implements ScreenProjectService { private ScreenEventDataDao screenEventDataDao; @Autowired private ScreenEventImgDataDao screenEventImgDataDao; + @Autowired + private ScreenProjectDataDao screenProjectDataDao; + @Autowired private ScreenProjectCategoryOrgDailyDao screenProjectCategoryOrgDailyDao; @@ -52,6 +62,43 @@ public class ScreenProjectServiceImpl implements ScreenProjectService { return projectDetailResultDTO; } + /** + * @Description 中央区事件分析-项目分布 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author liushaowen + * @Date 2021/2/24 15:25 + */ + @Override + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + public Result projectDistribution(ScreenProjectDistributionFormDTO formDTO) { + List areaIds = null; + if (StringUtils.isNotBlank(formDTO.getAreaCode())){ + areaIds = screenProjectDataDao.selectIdsByAreaCode(formDTO.getAreaCode()); + } + List resultDTOS = screenProjectDataDao.projectDistribution(formDTO.getAgencyId(),areaIds,formDTO.getLevel()); + return new Result().ok(resultDTOS); + } + + @Override + public Result projectDistributionDetail(ScreenProjectDetailFormDTO formDTO) { + List resultDTOS = screenProjectDataDao.projectDistributionDetail(formDTO.getProjectId()); + resultDTOS.forEach(item -> { + //项目图片 + List imgList = screenProjectDataDao.selectProjectImgs(formDTO.getProjectId()); + item.setImgList(imgList); + //项目处理流程 + List processDTOS = screenProjectDataDao.selectProjectProcess(formDTO.getProjectId()); + //流程附件 + processDTOS.forEach(processDTO -> { + List attachmentDTOS = screenProjectDataDao.selectProjectProcessAttachments(processDTO.getProcessId()); + processDTO.setAttachments(attachmentDTOS); + }); + item.setProcessList(processDTOS); + }); + return new Result().ok(resultDTOS); + } + /** * 【事件分析】类型分析 * @@ -66,4 +113,4 @@ public class ScreenProjectServiceImpl implements ScreenProjectService { String dateId = DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYYMMDD); return screenProjectCategoryOrgDailyDao.selectCategoryAnalysis(formDTO.getAgencyId(), dateId); } -} \ No newline at end of file +} diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml new file mode 100644 index 0000000000..ddf23a8bb0 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectDataDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectDataDTO.java new file mode 100644 index 0000000000..b638f53197 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectDataDTO.java @@ -0,0 +1,172 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.screen; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 中央区-项目数据 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +public class ScreenProjectDataDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 原始事件Id + */ + private String projectId; + + /** + * 事件名称 + */ + private String projectTitle; + + /** + * 事件时间 + */ + private Date projectCreateTime; + + /** + * 上报人 + */ + private String linkName; + + /** + * 电话 + */ + private String linkMobile; + + /** + * 事件描述 + */ + private String projectContent; + + /** + * 事件级别 红色1级:已超期;黄色2级:即将超期;绿色3级:未超期 + */ + private Integer projectLevel; + + /** + * 事件地址 + */ + private String projectAddress; + + /** + * 所有分类名,用 - 连接 + */ + private String allCategoryName; + + /** + * 事件所在经度 + */ + private BigDecimal longitude; + + /** + * 事件所在维度 + */ + private BigDecimal latitude; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 事件状态key pending:处理中 已结案:closed_case ;已关闭:closed + */ + private String projectStatusCode; + + /** + * 结案日期 + */ + private String closeCaseTime; + + /** + * 数据更新至: yyyy|yyyMM|yyyyMMdd + */ + private String dataEndTime; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectImgDataDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectImgDataDTO.java new file mode 100644 index 0000000000..b175d7a41d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectImgDataDTO.java @@ -0,0 +1,91 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.screen; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 中央区-项目数据图片 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +public class ScreenProjectImgDataDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 原始事件Id + */ + private String projectId; + + /** + * 图片图片地址 + */ + private String projectImgUrl; + + /** + * 排序 + */ + private Integer sort; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessAttachmentDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessAttachmentDTO.java new file mode 100644 index 0000000000..7655456484 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessAttachmentDTO.java @@ -0,0 +1,136 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.screen; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 中央区-项目数据处理节点附件表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +public class ScreenProjectProcessAttachmentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 附件id + */ + private String attachmentId; + + /** + * 客户ID + */ + private String customerId; + + /** + * 项目ID + */ + private String projectId; + + /** + * 项目进展表ID + */ + private String processId; + + /** + * 文件所属位置(内部备注: internal 公开答复:public) + */ + private String filePlace; + + /** + * 文件名 + */ + private String fileName; + + /** + * 附件名(uuid随机生成) + */ + private String attachmentName; + + /** + * 文件大小,单位b + */ + private Integer attachmentSize; + + /** + * 文件格式(JPG、PNG、JPEG、BMP、GIF、PDF、PPT、PPTX、DOC、DOCX、XLS、XLSX、MP3、WMA、M4A、MP4、AVI、MOV、RMVB、RM、WMV) + */ + private String attachmentFormat; + + /** + * 文件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * url地址 + */ + private String attachmentUrl; + + /** + * 排序(需求确定,按上传顺序排序) + */ + private Integer sort; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessDTO.java new file mode 100644 index 0000000000..efb46d4387 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessDTO.java @@ -0,0 +1,146 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.screen; + +import java.io.Serializable; +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + + +/** + * 中央区-项目数据项目处理进展表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +public class ScreenProjectProcessDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 处理进展id + */ + private String processId; + + /** + * 项目ID + */ + private String projectId; + + /** + * 被流转的部门名称 + */ + private String transferDeptName; + + /** + * 被流转的部门名称 + */ + private String transferDeptIds; + + /** + * 处理者名称 + */ + private String handlerName; + + /** + * 处理者类型 未知unknown,机关agency,部门department,网格grid + */ + private String handlerType; + + /** + * 处理者ID + */ + private String handlerId; + + + /** + * 所属机关(11:22:33) + */ + private String orgIdPath; + + /** + * 回应 response,结案close,退回return,部门流转transfer,创建项目created + */ + private String operation; + + /** + * 公开答复 + */ + private String publicReply; + + /** + * 内部备注 + */ + private String internalRemark; + + /** + * 处理时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date processTime; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 数据截止日期 + */ + private String DataEndTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectDataInfoFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectDataInfoFormDTO.java new file mode 100644 index 0000000000..2365ec57f0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectDataInfoFormDTO.java @@ -0,0 +1,112 @@ +package com.epmet.dto.screen.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * @description: + * @author: liushaowen + * @date: 2021/2/23 17:30 + */ +@Data +public class ScreenProjectDataInfoFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 原始事件Id + */ + private String projectId; + + /** + * 事件名称 + */ + private String projectTitle; + + /** + * 事件时间 + */ + private String projectCreateTime; + + /** + * 上报人 + */ + private String linkName; + + /** + * 电话 + */ + private String linkMobile; + + /** + * 事件描述 + */ + private String projectContent; + + /** + * 事件级别 红色1级:已超期;黄色2级:即将超期;绿色3级:未超期 + */ + private Integer projectLevel; + + /** + * 事件地址 + */ + private String projectAddress; + + /** + * 所有分类名,用 - 连接 + */ + private String allCategoryName; + + /** + * 事件所在经度 + */ + private BigDecimal longitude; + + /** + * 事件所在维度 + */ + private BigDecimal latitude; + + /** + * 事件状态key pending:处理中 已结案:closed_case ;已关闭:closed + */ + private String projectStatusCode; + + /** + * 结案日期 + */ + private String closeCaseTime; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 议题图片地址 + */ + private String[] projectImgUrl; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectProcessFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectProcessFormDTO.java new file mode 100644 index 0000000000..e8a72eadbd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectProcessFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.screen.form; + +import com.epmet.dto.screen.ScreenProjectProcessAttachmentDTO; +import com.epmet.dto.screen.ScreenProjectProcessDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @description: + * @author: liushaowen + * @date: 2021/2/24 14:06 + */ +@Data +public class ScreenProjectProcessFormDTO extends ScreenProjectProcessDTO implements Serializable{ + private static final long serialVersionUID = 1L; + + private List attachments; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java index ce5b55a305..cfb2a30536 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java @@ -3,6 +3,8 @@ package com.epmet.controller; import com.epmet.commons.tools.exception.ValidateException; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.screen.*; +import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO; +import com.epmet.dto.screen.form.ScreenProjectProcessFormDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.service.evaluationindex.screen.*; import lombok.extern.slf4j.Slf4j; @@ -37,6 +39,10 @@ public class ScreenProjectDataCollController { private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService; @Autowired private ScreenProjectCategoryOrgDailyService projectCategoryOrgDailyService; + @Autowired + private ScreenProjectDataService projectDataService; + @Autowired + private ScreenProjectProcessService projectProcessService; /** * @author wangc @@ -125,4 +131,35 @@ public class ScreenProjectDataCollController { return new Result(); } //上述两个接口可以有采集接口方便灌假数。后面项目分类统计两个方案A:从项目信息中分析计算到大屏表; B:下面三个子客户(榆山街道、孔村街道、锦水街道)单独上报;子客户根据area_code计算 + + /** + * @Description 项目信息上报 + * @return com.epmet.commons.tools.utils.Result + * @Author liushaowen + * @Date 2021/2/23 17:25 + */ + @RequestMapping("uploadprojectinfo") + public Result uploadProjectInfo(@RequestHeader("CustomerId") String customerId,@RequestBody ScreenCollFormDTO param){ + if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { + throw new ValidateException("参数错误:dataList不能为空且dataId不能为空"); + } + projectDataService.collect(customerId,param); + return new Result(); + } + + /** + * @Description 项目处理进展上报 + * @return com.epmet.commons.tools.utils.Result + * @Author liushaowen + * @Date 2021/2/23 17:25 + */ + @RequestMapping("uploadprojectprocess") + public Result uploadProjectProcess(@RequestHeader("CustomerId") String customerId,@RequestBody ScreenCollFormDTO param){ + if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { + throw new ValidateException("参数错误:dataList不能为空且dataId不能为空"); + } + projectProcessService.collect(customerId,param); + return new Result(); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java new file mode 100644 index 0000000000..b1cea20772 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java @@ -0,0 +1,39 @@ +/** + * 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.screen.form.ScreenProjectDataInfoFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectDataEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 中央区-项目数据 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Mapper +public interface ScreenProjectDataDao extends BaseDao { + + int deleteByDateIdAndCustomerId(@Param("customerId") String customerId,@Param("dateId") String dateId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectImgDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectImgDataDao.java new file mode 100644 index 0000000000..2c4039af04 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectImgDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.evaluationindex.screen.ScreenProjectImgDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 中央区-项目数据图片 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Mapper +public interface ScreenProjectImgDataDao extends BaseDao { + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessAttachmentDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessAttachmentDao.java new file mode 100644 index 0000000000..d4650815f5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessAttachmentDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 中央区-项目数据处理节点附件表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Mapper +public interface ScreenProjectProcessAttachmentDao extends BaseDao { + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessDao.java new file mode 100644 index 0000000000..4ad6a11e69 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessDao.java @@ -0,0 +1,35 @@ +/** + * 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.entity.evaluationindex.screen.ScreenProjectProcessEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 中央区-项目数据项目处理进展表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Mapper +public interface ScreenProjectProcessDao extends BaseDao { + + int deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectDataEntity.java new file mode 100644 index 0000000000..f58769cfe1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectDataEntity.java @@ -0,0 +1,142 @@ +/** + * 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; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 中央区-项目数据 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_project_data") +public class ScreenProjectDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 原始事件Id + */ + private String projectId; + + /** + * 事件名称 + */ + private String projectTitle; + + /** + * 事件时间 + */ + private String projectCreateTime; + + /** + * 上报人 + */ + private String linkName; + + /** + * 电话 + */ + private String linkMobile; + + /** + * 事件描述 + */ + private String projectContent; + + /** + * 事件级别 红色1级:已超期;黄色2级:即将超期;绿色3级:未超期 + */ + private Integer projectLevel; + + /** + * 事件地址 + */ + private String projectAddress; + + /** + * 所有分类名,用 - 连接 + */ + private String allCategoryName; + + /** + * 事件所在经度 + */ + private BigDecimal longitude; + + /** + * 事件所在维度 + */ + private BigDecimal latitude; + + /** + * 事件状态key + */ + private String projectStatusCode; + + /** + * 结案日期 + */ + private String closeCaseTime; + + /** + * 数据更新至: yyyy|yyyMM|yyyyMMdd + */ + private String dataEndTime; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectImgDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectImgDataEntity.java new file mode 100644 index 0000000000..dba5258e51 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectImgDataEntity.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 中央区-项目数据图片 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_project_img_data") +public class ScreenProjectImgDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 原始事件Id + */ + private String projectId; + + /** + * 图片图片地址 + */ + private String projectImgUrl; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectProcessAttachmentEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectProcessAttachmentEntity.java new file mode 100644 index 0000000000..41e9313679 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectProcessAttachmentEntity.java @@ -0,0 +1,106 @@ +/** + * 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; + +import java.util.Date; + +/** + * 中央区-项目数据处理节点附件表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_project_process_attachment") +public class ScreenProjectProcessAttachmentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 附件id + */ + private String attachmentId; + + /** + * 客户ID + */ + private String customerId; + + /** + * 项目ID + */ + private String projectId; + + /** + * 项目进展表ID + */ + private String processId; + + /** + * 文件所属位置(内部备注: internal 公开答复:public) + */ + private String filePlace; + + /** + * 文件名 + */ + private String fileName; + + /** + * 附件名(uuid随机生成) + */ + private String attachmentName; + + /** + * 文件大小,单位b + */ + private Integer attachmentSize; + + /** + * 文件格式(JPG、PNG、JPEG、BMP、GIF、PDF、PPT、PPTX、DOC、DOCX、XLS、XLSX、MP3、WMA、M4A、MP4、AVI、MOV、RMVB、RM、WMV) + */ + private String attachmentFormat; + + /** + * 文件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * url地址 + */ + private String attachmentUrl; + + /** + * 排序(需求确定,按上传顺序排序) + */ + private Integer sort; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectProcessEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectProcessEntity.java new file mode 100644 index 0000000000..e8b3fbb134 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectProcessEntity.java @@ -0,0 +1,110 @@ +/** + * 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; + +import java.util.Date; + +/** + * 中央区-项目数据项目处理进展表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_project_process") +public class ScreenProjectProcessEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 处理进展id + */ + private String processId; + + /** + * 项目ID + */ + private String projectId; + + /** + * 被流转的部门名称 + */ + private String transferDeptName; + + /** + * 被流转的部门名称 + */ + private String transferDeptIds; + + /** + * 处理者名称 + */ + private String handlerName; + + /** + * 处理者类型 未知unknown,机关agency,部门department,网格grid + */ + private String handlerType; + + /** + * 处理者ID + */ + private String handlerId; + + /** + * 所属机关(11:22:33) + */ + private String orgIdPath; + + /** + * 回应 response,结案close,退回return,部门流转transfer,创建项目created + */ + private String operation; + + /** + * 公开答复 + */ + private String publicReply; + + /** + * 内部备注 + */ + private String internalRemark; + + /** + * 处理时间 + */ + private Date processTime; + + /** + * 数据截止日期 + */ + private String DataEndTime; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java new file mode 100644 index 0000000000..82d296a1a3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java @@ -0,0 +1,99 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.screen.ScreenProjectDataDTO; +import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectDataEntity; + +import java.util.List; +import java.util.Map; + +/** + * 中央区-项目数据 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +public interface ScreenProjectDataService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-02-23 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-02-23 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenProjectDataDTO + * @author generator + * @date 2021-02-23 + */ + ScreenProjectDataDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void save(ScreenProjectDataDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void update(ScreenProjectDataDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-02-23 + */ + void delete(String[] ids); + + void collect(String customerId, ScreenCollFormDTO param); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectImgDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectImgDataService.java new file mode 100644 index 0000000000..eba2c666d8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectImgDataService.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.screen.ScreenProjectImgDataDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectImgDataEntity; + +import java.util.List; +import java.util.Map; + +/** + * 中央区-项目数据图片 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +public interface ScreenProjectImgDataService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-02-23 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-02-23 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenProjectImgDataDTO + * @author generator + * @date 2021-02-23 + */ + ScreenProjectImgDataDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void save(ScreenProjectImgDataDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void update(ScreenProjectImgDataDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-02-23 + */ + void delete(String[] ids); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessAttachmentService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessAttachmentService.java new file mode 100644 index 0000000000..de086e33a2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessAttachmentService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.screen.ScreenProjectProcessAttachmentDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEntity; + +import java.util.List; +import java.util.Map; + +/** + * 中央区-项目数据处理节点附件表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +public interface ScreenProjectProcessAttachmentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-02-23 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-02-23 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenProjectProcessAttachmentDTO + * @author generator + * @date 2021-02-23 + */ + ScreenProjectProcessAttachmentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void save(ScreenProjectProcessAttachmentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void update(ScreenProjectProcessAttachmentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-02-23 + */ + void delete(String[] ids); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java new file mode 100644 index 0000000000..f4b050fe13 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java @@ -0,0 +1,99 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.screen.ScreenProjectProcessDTO; +import com.epmet.dto.screen.form.ScreenProjectProcessFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessEntity; + +import java.util.List; +import java.util.Map; + +/** + * 中央区-项目数据项目处理进展表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +public interface ScreenProjectProcessService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-02-23 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-02-23 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenProjectProcessDTO + * @author generator + * @date 2021-02-23 + */ + ScreenProjectProcessDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void save(ScreenProjectProcessDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void update(ScreenProjectProcessDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-02-23 + */ + void delete(String[] ids); + + void collect(String customerId, ScreenCollFormDTO param); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java new file mode 100644 index 0000000000..b826fd1f6e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java @@ -0,0 +1,222 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.screen.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.screen.*; +import com.epmet.dto.screen.ScreenProjectDataDTO; +import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.entity.evaluationindex.screen.*; +import com.epmet.service.evaluationindex.screen.*; +import com.google.common.collect.Lists; +import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 中央区-项目数据 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Service +public class ScreenProjectDataServiceImpl extends BaseServiceImpl implements ScreenProjectDataService { + + @Resource + private ScreenProjectImgDataDao screenProjectImgDataDao; + @Resource + private ScreenCustomerAgencyDao agencyDao; + @Resource + private ScreenCustomerDeptDao deptDao; + @Resource + private ScreenCustomerGridDao gridDao; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenProjectDataDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenProjectDataDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenProjectDataDTO get(String id) { + ScreenProjectDataEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenProjectDataDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenProjectDataDTO dto) { + ScreenProjectDataEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectDataEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenProjectDataDTO dto) { + ScreenProjectDataEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectDataEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + public void collect(String customerId, ScreenCollFormDTO param) { + if (param.getIsFirst()) { + int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, param.getDateId()); + while (affectedRows > 0) { + affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, param.getDateId()); + } + } + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Date today = new Date(); + param.getDataList().forEach(item -> { + String projectStatusCode = item.getProjectStatusCode(); + + //todo 动态获取超时时间 + //如果结案 结案时间立项时间; + if ("closed_case".equals(projectStatusCode)) { + try { + Date createTime = sdf.parse(item.getProjectCreateTime()); + Date closeCaseTime = sdf.parse(item.getCloseCaseTime()); + + if (closeCaseTime.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 4) { + //如果结案时间-立项时间小于等于4天 未超期 level3 + item.setProjectLevel(3); + } else if (closeCaseTime.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 5) { + //如果结案时间-立项时间大于4天小于5天 即将超期 level2 + item.setProjectLevel(2); + } else { + //大于5天 已超期 level1 + item.setProjectLevel(1); + } + } catch (ParseException e) { + e.printStackTrace(); + } + } else if ("pending".equals(projectStatusCode)) { + //如果处理中 当前时间-立项时间; + try { + Date createTime = sdf.parse(item.getProjectCreateTime()); + + if (today.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 4) { + //如果当前时间-立项时间小于等于4天 未超期 level3 + item.setProjectLevel(3); + } else if (today.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 5) { + //如果当前时间-立项时间大于4天小于5天 即将超期 level2 + item.setProjectLevel(2); + } else { + //大于5天 已超期 level1 + item.setProjectLevel(1); + } + } catch (ParseException e) { + e.printStackTrace(); + } + } + //先删除该projectId对应的旧数据 + QueryWrapper deleteWrapper = new QueryWrapper<>(); + deleteWrapper.eq(StringUtils.isNotBlank(item.getProjectId()), "project_id", item.getProjectId()) + .eq(StringUtils.isNotBlank(customerId), "customer_id", customerId); + baseDao.delete(deleteWrapper); + QueryWrapper screenProjectImgDataEntityQueryWrapper = new QueryWrapper<>(); + screenProjectImgDataEntityQueryWrapper.eq(StringUtils.isNotBlank(item.getProjectId()), "project_id", item.getProjectId()) + .eq(StringUtils.isNotBlank(customerId), "customer_id", customerId); + screenProjectImgDataDao.delete(screenProjectImgDataEntityQueryWrapper); + + //如果orgType未知,获取一下 +// if ("unknown".equals(item.getOrgType())){ +// ScreenCustomerAgencyEntity screenCustomerAgencyEntity = agencyDao.selectById(item.getOrgId()); +// if (screenCustomerAgencyEntity != null){ +// item.setOrgType("agency"); +// }else { +// ScreenCustomerDeptEntity screenCustomerDeptEntity = deptDao.selectById(item.getOrgId()); +// if (screenCustomerDeptEntity!=null){ +// item.setOrgType("department"); +// }else { +// ScreenCustomerGridEntity screenCustomerGridEntity = gridDao.selectById(item.getOrgId()); +// if (screenCustomerGridEntity != null){ +// item.setOrgType("grid"); +// } +// } +// } +// } + + //插入项目表 + ScreenProjectDataEntity screenProjectDataEntity = ConvertUtils.sourceToTarget(item, ScreenProjectDataEntity.class); + screenProjectDataEntity.setCustomerId(customerId); + screenProjectDataEntity.setDataEndTime(param.getDateId()); + baseDao.insert(screenProjectDataEntity); + //插入图片表 + String[] projectImgUrl = item.getProjectImgUrl(); + if (ArrayUtils.isNotEmpty(projectImgUrl)) { + for (int i = 0; i < projectImgUrl.length; i++) { + ScreenProjectImgDataEntity screenProjectImgDataEntity = new ScreenProjectImgDataEntity(); + screenProjectImgDataEntity.setCustomerId(customerId); + screenProjectImgDataEntity.setProjectId(item.getProjectId()); + screenProjectImgDataEntity.setProjectImgUrl(projectImgUrl[i]); + screenProjectImgDataEntity.setSort(i); + screenProjectImgDataDao.insert(screenProjectImgDataEntity); + } + } + }); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java new file mode 100644 index 0000000000..3b149b2d37 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java @@ -0,0 +1,99 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.screen.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.evaluationindex.screen.ScreenProjectImgDataDao; +import com.epmet.dto.screen.ScreenProjectImgDataDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectImgDataEntity; +import com.epmet.service.evaluationindex.screen.ScreenProjectImgDataService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 中央区-项目数据图片 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Service +public class ScreenProjectImgDataServiceImpl extends BaseServiceImpl implements ScreenProjectImgDataService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenProjectImgDataDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenProjectImgDataDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenProjectImgDataDTO get(String id) { + ScreenProjectImgDataEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenProjectImgDataDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenProjectImgDataDTO dto) { + ScreenProjectImgDataEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectImgDataEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenProjectImgDataDTO dto) { + ScreenProjectImgDataEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectImgDataEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java new file mode 100644 index 0000000000..7219b2ae21 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java @@ -0,0 +1,98 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.screen.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.evaluationindex.screen.ScreenProjectProcessAttachmentDao; +import com.epmet.dto.screen.ScreenProjectProcessAttachmentDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEntity; +import com.epmet.service.evaluationindex.screen.ScreenProjectProcessAttachmentService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 中央区-项目数据处理节点附件表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Service +public class ScreenProjectProcessAttachmentServiceImpl extends BaseServiceImpl implements ScreenProjectProcessAttachmentService { + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenProjectProcessAttachmentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenProjectProcessAttachmentDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenProjectProcessAttachmentDTO get(String id) { + ScreenProjectProcessAttachmentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenProjectProcessAttachmentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenProjectProcessAttachmentDTO dto) { + ScreenProjectProcessAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectProcessAttachmentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenProjectProcessAttachmentDTO dto) { + ScreenProjectProcessAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectProcessAttachmentEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java new file mode 100644 index 0000000000..1d18eb0b7f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java @@ -0,0 +1,156 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.screen.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.screen.ScreenProjectProcessAttachmentDao; +import com.epmet.dao.evaluationindex.screen.ScreenProjectProcessDao; +import com.epmet.dto.screen.ScreenProjectProcessAttachmentDTO; +import com.epmet.dto.screen.ScreenProjectProcessDTO; +import com.epmet.dto.screen.form.ScreenProjectProcessFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEntity; +import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessEntity; +import com.epmet.service.evaluationindex.screen.ScreenProjectProcessService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 中央区-项目数据项目处理进展表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Service +public class ScreenProjectProcessServiceImpl extends BaseServiceImpl implements ScreenProjectProcessService { + + @Resource + private ScreenProjectProcessAttachmentDao screenProjectProcessAttachmentDao; + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenProjectProcessDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenProjectProcessDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenProjectProcessDTO get(String id) { + ScreenProjectProcessEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenProjectProcessDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenProjectProcessDTO dto) { + ScreenProjectProcessEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectProcessEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenProjectProcessDTO dto) { + ScreenProjectProcessEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectProcessEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + public void collect(String customerId, ScreenCollFormDTO param) { + if (param.getIsFirst()) { + int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, param.getDateId()); + while (affectedRows > 0) { + affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, param.getDateId()); + } + } + param.getDataList().forEach(item -> { + //先删除旧数据 + QueryWrapper screenProjectProcessEntityQueryWrapper = new QueryWrapper<>(); + screenProjectProcessEntityQueryWrapper.eq(StringUtils.isNotBlank(item.getProjectId()), "project_id", item.getProjectId()) + .eq(StringUtils.isNotBlank(customerId), "customer_id", customerId) + .eq(StringUtils.isNotBlank(item.getProcessId()), "process_id", item.getProcessId()); + baseDao.delete(screenProjectProcessEntityQueryWrapper); + + QueryWrapper screenProjectProcessAttachmentEntityQueryWrapper = new QueryWrapper<>(); + screenProjectProcessAttachmentEntityQueryWrapper.eq(StringUtils.isNotBlank(item.getProjectId()), "project_id", item.getProjectId()) + .eq(StringUtils.isNotBlank(customerId), "customer_id", customerId) + .eq(StringUtils.isNotBlank(item.getProcessId()), "process_id", item.getProcessId()); + screenProjectProcessAttachmentDao.delete(screenProjectProcessAttachmentEntityQueryWrapper); + //插入 + ScreenProjectProcessEntity screenProjectProcessEntity = ConvertUtils.sourceToTarget(item, ScreenProjectProcessEntity.class); + screenProjectProcessEntity.setCustomerId(customerId); + screenProjectProcessEntity.setDataEndTime(param.getDateId()); + baseDao.insert(screenProjectProcessEntity); + + List attachments = item.getAttachments(); + if (!CollectionUtils.isEmpty(attachments)){ + for (int i = 0; i < attachments.size(); i++) { + ScreenProjectProcessAttachmentEntity attachmentEntity = ConvertUtils.sourceToTarget(attachments.get(i), ScreenProjectProcessAttachmentEntity.class); + attachmentEntity.setCustomerId(customerId); + attachmentEntity.setProcessId(item.getProcessId()); + attachmentEntity.setProjectId(item.getProjectId()); + if (attachmentEntity.getSort() == null) { + attachmentEntity.setSort(i); + } + screenProjectProcessAttachmentDao.insert(attachmentEntity); + } + } + }); + + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml new file mode 100644 index 0000000000..82e0587dc5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_project_data + where customer_id = #{customerId} + and DATA_END_TIME = #{dateId} + limit 1000 + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectImgDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectImgDataDao.xml new file mode 100644 index 0000000000..3604a5df25 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectImgDataDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessAttachmentDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessAttachmentDao.xml new file mode 100644 index 0000000000..8560281d3b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessAttachmentDao.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml new file mode 100644 index 0000000000..06023e11b6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml @@ -0,0 +1,13 @@ + + + + + + + delete from screen_project_process + where customer_id = #{customerId} + and DATA_END_TIME = #{dateId} + limit 1000 + + + From 8176c3542f40ec1cfb440683090f657b26a2c322 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 18:21:51 +0800 Subject: [PATCH 07/31] =?UTF-8?q?=E9=BE=99=E6=B9=BE=EF=BC=9A=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E8=AF=A6=E6=83=85=EF=BC=9B=E9=9A=BE=E7=82=B9=E8=B5=8C?= =?UTF-8?q?=E7=82=B9=E4=B8=BB=E5=9B=BE=E4=B8=A4=E4=B8=AA=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/GrassRootsGovernServiceImpl.java | 6 +++++ .../project/impl/ProjectServiceImpl.java | 6 ++--- .../com/epmet/dto/result/IssueResultDTO.java | 4 +++ .../epmet/feign/GovIssueOpenFeignClient.java | 3 +++ .../GovIssueOpenFeignClientFallBack.java | 6 ++++- .../com/epmet/controller/IssueController.java | 2 +- .../epmet/service/impl/IssueServiceImpl.java | 9 +++++++ .../com/epmet/dto/result/ProjectInfoDTO.java | 17 +++++++------ .../feign/GovProjectOpenFeignClient.java | 10 +++++--- .../GovProjectOpenFeignClientFallback.java | 10 +++++--- .../epmet/controller/ProjectController.java | 17 +++++++++++-- .../main/java/com/epmet/dao/ProjectDao.java | 7 +++--- .../com/epmet/service/ProjectService.java | 8 ++++++ .../service/impl/ProjectServiceImpl.java | 25 +++++++++++++++++++ .../src/main/resources/mapper/ProjectDao.xml | 22 ++++++++++++++++ 15 files changed, 126 insertions(+), 26 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java index e33e7c9334..fca810d21f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.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.constant.StrConstant; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screen.*; @@ -87,6 +88,11 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { } PageHelper.startPage(NumConstant.ONE,param.getTopNum()); List result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType()); + for(DifficultProjectResultDTO resultDTO:result){ + if(!resultDTO.getImgUrl().contains("http")){ + resultDTO.setImgUrl(StrConstant.EPMETY_STR); + } + } if(null == result) return new ArrayList<>(); return result; } 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 3daf34aa23..e0742c8a0c 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 @@ -205,16 +205,16 @@ public class ProjectServiceImpl implements ProjectService { }*/ ProjectDetailResultDTO projectDetailResultDTO=new ProjectDetailResultDTO(); //todo - /*Result result=govProjectOpenFeignClient.queryProjectInfoByProjectId(processListFormDTO.getProjectId()); + Result result=govProjectOpenFeignClient.queryProjectInfoByProjectId(processListFormDTO.getProjectId()); if(result.success()&&null!=result.getData()){ ProjectInfoDTO projectInfoDTO=result.getData(); projectDetailResultDTO.setImgUrlList(projectInfoDTO.getImgUrlList()); - projectDetailResultDTO.setEventSource(projectInfoDTO.getFromGridName()); + projectDetailResultDTO.setEventSource(projectInfoDTO.getGridName()); projectDetailResultDTO.setEventTitle(projectInfoDTO.getEventTitle()); projectDetailResultDTO.setEventContent(projectInfoDTO.getEventContent()); }else{ log.warn(String.format("项目信息查询失败,projectId:%s",processListFormDTO.getProjectId())); - }*/ + } Result processList = govProjectOpenFeignClient.getProcessList(processListFormDTO); if (!processList.success()) { throw new RenException(ProjectConstant.PROCESS_FAILURE); diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java index b278b9f585..c2dbdb85eb 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java @@ -44,5 +44,9 @@ public class IssueResultDTO implements Serializable { */ private String topicId; + /** + * 上级-网格名 20210224add + */ + private String gridName; } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index 8f04ff87b0..f5d2786c93 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -241,4 +241,7 @@ public interface GovIssueOpenFeignClient { */ @PostMapping("/gov/issue/issuesharelink/sharelinkinfo") Result shareLinkInfo(@RequestParam String shareLinkId); + + @PostMapping("/gov/issue/issue/detail") + Result queryIssueDetail(@RequestBody IssueDetailFormDTO formDTO); } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index 50e37286e5..84b1220993 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java @@ -18,7 +18,6 @@ import com.epmet.resi.group.dto.group.result.*; import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO; import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO; import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.RequestParam; import java.util.List; import java.util.Map; @@ -207,4 +206,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient public Result shareLinkInfo(String shareLinkId) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "shareLinkInfo", shareLinkId); } + + @Override + public Result queryIssueDetail(IssueDetailFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "detail", formDTO); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java index 8ccb30aa15..c64573730a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java @@ -34,7 +34,7 @@ public class IssueController { /** * @Description 议题详情 * @param issueDetail - * @author zxc + * @author zxc 这个接口内部feign也调用,不要加权限注解 * @date 2020/5/11 9:42 */ @PostMapping(value = "detail") diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 3b724521a5..40fb145f77 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -181,6 +181,15 @@ public class IssueServiceImpl extends BaseServiceImpl imp public IssueResultDTO detail(IssueDetailFormDTO issueDetail) { //议题信息 IssueResultDTO issueResult = issueDao.issueDetail(issueDetail); + if (null != issueResult && StringUtils.isNotBlank(issueResult.getGridId())) { + BelongGridNameFormDTO formDTO = new BelongGridNameFormDTO(); + formDTO.setGridId(issueResult.getGridId()); + Result result = govOrgOpenFeignClient.getGridNameByGridId(formDTO); + logger.info("根据网格id查询网格名称接口返参:" + JSON.toJSONString(result)); + if (result.success() && null != result.getData()) { + issueResult.setGridName(result.getData().getBelongsGridName()); + } + } return issueResult; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java index 9978336a86..b427707f58 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java @@ -13,13 +13,7 @@ import java.util.List; @Data public class ProjectInfoDTO { // 【事件 = 项目】 - - /** - * 事件图片集合 - */ - private List imgUrlList; - - private String fromGridName; + private String projectId; /** * 项目标题 @@ -30,4 +24,13 @@ public class ProjectInfoDTO { * 项目内容 */ private String eventContent; + + private String issueId; + private String gridName; + private String gridId; + + /** + * 项目附件图片集合 + */ + private List imgUrlList; } 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 2cd5f5f5fb..49b573f0be 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 @@ -6,13 +6,12 @@ import com.epmet.dto.ProjectDTO; import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; import com.epmet.dto.form.ProjectListFromDTO; -import com.epmet.dto.result.MyPartProjectsResultDTO; -import com.epmet.dto.result.PendProjectListResultDTO; -import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO; -import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO; +import com.epmet.dto.result.*; import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -75,4 +74,7 @@ public interface GovProjectOpenFeignClient { */ @PostMapping("gov/project/project/list-by-createtopic-userid") Result> listProjectsByCreateTopicUserId(@RequestBody ProjectByCreateTopicUserFormDTO form); + + @GetMapping("gov/project/project/queryprojectinfobyprojectid/{projectId}") + Result queryProjectInfoByProjectId(@PathVariable("projectId")String projectId); } 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 fd478f1245..ca4488be17 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 @@ -7,10 +7,7 @@ import com.epmet.dto.ProjectDTO; import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; import com.epmet.dto.form.ProjectListFromDTO; -import com.epmet.dto.result.MyPartProjectsResultDTO; -import com.epmet.dto.result.PendProjectListResultDTO; -import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO; -import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO; +import com.epmet.dto.result.*; import com.epmet.feign.GovProjectOpenFeignClient; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import org.springframework.stereotype.Component; @@ -69,4 +66,9 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli public Result> listProjectsByCreateTopicUserId(ProjectByCreateTopicUserFormDTO form) { return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "listProjectsByCreateTopicUserId", form); } + + @Override + public Result queryProjectInfoByProjectId(String projectId) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "queryProjectInfoByProjectId", projectId); + } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index 3c3641dac5..05fe6c04b4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -17,9 +17,7 @@ package com.epmet.controller; -import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -33,6 +31,7 @@ import com.epmet.dto.result.*; import com.epmet.excel.ProjectExcel; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import com.epmet.service.ProjectService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -204,4 +203,18 @@ public class ProjectController { List projects = projectService.listProjectsByCreateTopicUserId(form.getUserId(), form.getCustomerId(), form.getPageNo(), form.getPageSize()); return new Result().ok(projects); } + + /** + * @param projectId + * @author yinzuomei + * @description 查询项目信息(龙湾临时调用) + * @Date 2021/2/24 17:04 + **/ + @GetMapping("queryprojectinfobyprojectid/{projectId}") + public Result queryProjectInfoByProjectId(@PathVariable("projectId")String projectId){ + if(StringUtils.isNotBlank(projectId)){ + return new Result().ok(projectService.queryProjectInfoByProjectId(projectId)); + } + return new Result<>(); + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java index e4dfd04800..5eccc08f67 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java @@ -23,10 +23,7 @@ import com.epmet.dto.ProjectStaffDTO; import com.epmet.dto.form.LatestListFormDTO; import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.form.ShiftProjectsFromDTO; -import com.epmet.dto.result.LatestListResultDTO; -import com.epmet.dto.result.MyPartProjectsResultDTO; -import com.epmet.dto.result.ProjectDetailResultDTO; -import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.ProjectEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -148,4 +145,6 @@ public interface ProjectDao extends BaseDao { */ List listProjectsByCreateTopicUserId(@Param("userId") String userId, @Param("customerId") String customerId); + + ProjectInfoDTO queryProjectInfoByProjectId(String projectId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java index e60657fa26..3216f2d576 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java @@ -268,4 +268,12 @@ public interface ProjectService extends BaseService { * @author sun */ void responseV2(ProjectResponseFormDTO formDTO); + + /** + * @param projectId + * @author yinzuomei + * @description 查询项目信息(龙湾临时调用) + * @Date 2021/2/24 17:07 + **/ + ProjectInfoDTO queryProjectInfoByProjectId(String projectId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index a72ad4c6f2..2fb4b5f45c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -105,6 +105,8 @@ public class ProjectServiceImpl extends BaseServiceImpl issueDTOResult=govIssueOpenFeignClient.queryIssueDetail(formDTO); + if(issueDTOResult.success()&&null!=issueDTOResult.getData()){ + projectInfoDTO.setGridId(issueDTOResult.getData().getGridId()); + projectInfoDTO.setGridName(issueDTOResult.getData().getGridName()); + }else{ + log.warn("查询议题详情失败issueId="+formDTO.getIssueId()); + } + } + return projectInfoDTO; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index a3747fe72e..c47def3cc0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -246,4 +246,26 @@ order by p.CREATED_TIME desc + + + + + + + + + + + + + \ No newline at end of file From 0e2b56c435ff2894100aca308db4d64492e1e082 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 24 Feb 2021 18:26:14 +0800 Subject: [PATCH 08/31] =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/UserBadgeServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java index 5b8638ab15..02e3c8c875 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java @@ -175,6 +175,7 @@ public class UserBadgeServiceImpl implements UserBadgeService { return; } List userBaseInfoResultDTOS = userBaseInfoService.queryUserBaseInfo(reUserIds); + log.info("user基本信息:"+userBaseInfoResultDTOS.toString()); if (CollectionUtils.isEmpty(userBaseInfoResultDTOS)) { log.error("未查询到党员基本信息......"); throw new RenException("未查询到党员基本信息......"); From a1b269b67108ce5c23925881a8f5b6324c22a15f Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 24 Feb 2021 18:37:19 +0800 Subject: [PATCH 09/31] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E7=99=BB?= =?UTF-8?q?=E9=99=86=E8=BF=94=E5=9B=9E=E5=AE=A2=E6=88=B7Id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/result/UserTokenResultDTO.java | 1 + .../src/main/java/com/epmet/service/impl/SsoServiceImpl.java | 1 + 2 files changed, 2 insertions(+) diff --git a/epmet-auth/src/main/java/com/epmet/dto/result/UserTokenResultDTO.java b/epmet-auth/src/main/java/com/epmet/dto/result/UserTokenResultDTO.java index 8e4b715422..c7ce124a75 100644 --- a/epmet-auth/src/main/java/com/epmet/dto/result/UserTokenResultDTO.java +++ b/epmet-auth/src/main/java/com/epmet/dto/result/UserTokenResultDTO.java @@ -17,4 +17,5 @@ public class UserTokenResultDTO implements Serializable { * 令牌 */ private String token; + private String customerId; } diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java index 282108736d..98702d2216 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java @@ -176,6 +176,7 @@ public class SsoServiceImpl implements SsoService { this.disposeTokenDto(formDTO.getApp(), formDTO.getClient(), epmetUser.getUserId(), token, thirdUser.getCustomerId()); UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO(); userTokenResultDTO.setToken(token); + userTokenResultDTO.setCustomerId(thirdUser.getCustomerId()); return userTokenResultDTO; } From ceda07db1cf3dd1bcc022ccc09317eb0caf867a1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 19:00:01 +0800 Subject: [PATCH 10/31] datastat+1 --- .../com/epmet/service/crm/impl/CustomerRelationServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java index 9b6c4ab7f1..018e215af1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java @@ -38,7 +38,7 @@ import java.util.stream.Collectors; * @author generator generator@elink-cn.com * @since v1.0.0 2021-01-14 */ -@DataSource(DataSourceConstant.STATS) +@DataSource(DataSourceConstant.OPER_CRM) @Service public class CustomerRelationServiceImpl extends BaseServiceImpl implements CustomerRelationService { From abef0b95d3299a400b2c8bd096fc42847cb3e792 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 19:51:44 +0800 Subject: [PATCH 11/31] =?UTF-8?q?data-stat=E7=BB=9F=E8=AE=A1=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E4=BF=AE=E6=94=B9:=E6=8C=87=E6=A0=87=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E8=8E=B7=E5=8F=96=E5=AD=90=E5=AE=A2=E6=88=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dao/crm/CustomerRelationDao.java | 6 ++---- .../crm/impl/CustomerRelationServiceImpl.java | 19 +++++++++++++++++-- .../mapper/crm/CustomerRelationDao.xml | 16 +++------------- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java index d79e843076..87a8db63bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java @@ -23,8 +23,6 @@ import com.epmet.entity.crm.CustomerRelationEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import java.util.List; - /** * 客户关系表(01.14 add) * @@ -35,10 +33,10 @@ import java.util.List; public interface CustomerRelationDao extends BaseDao { /** - * @param customerIds + * @param customerId * @author yinzuomei * @description 查询当前客户的area_code信息、以及下一级客户列表 * @Date 2021/1/21 11:27 **/ - List selectCustomerSubInfo(@Param("list") List customerIds); + CustomerSubInfoDTO selectCustomerSubInfo(@Param("customerId")String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java index 018e215af1..440491f8a5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java @@ -22,11 +22,15 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.crm.CustomerRelationDao; import com.epmet.dto.indexcal.CustomerSubInfoDTO; +import com.epmet.dto.stats.DimCustomerDTO; import com.epmet.entity.crm.CustomerRelationEntity; import com.epmet.service.crm.CustomerRelationService; +import com.epmet.service.stats.DimCustomerService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -42,7 +46,8 @@ import java.util.stream.Collectors; @Service public class CustomerRelationServiceImpl extends BaseServiceImpl implements CustomerRelationService { - + @Autowired + private DimCustomerService dimCustomerService; /** * @param customerIds * @return java.util.Map @@ -52,7 +57,17 @@ public class CustomerRelationServiceImpl extends BaseServiceImpl getCustomerInfoMap(List customerIds) { - List list = baseDao.selectCustomerSubInfo(customerIds); + List list=new ArrayList<>(); + for(String customerId:customerIds){ + CustomerSubInfoDTO customerSubInfoDTO = baseDao.selectCustomerSubInfo(customerId); + if(null!=customerSubInfoDTO){ + DimCustomerDTO dimCustomerDTO=dimCustomerService.get(customerId); + if(null!=dimCustomerDTO){ + customerSubInfoDTO.setCustomerName(dimCustomerDTO.getCustomerName()); + } + list.add(customerSubInfoDTO); + } + } if(CollectionUtils.isEmpty(list)){ return new HashMap<>(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml index b6d60ae9a4..a92c55e9f9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml @@ -4,7 +4,6 @@ - @@ -14,22 +13,13 @@ \ No newline at end of file From 87c944462551c988cd3fcae95d4ac0fe218520e3 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 24 Feb 2021 20:02:00 +0800 Subject: [PATCH 12/31] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenGrassrootsGovernDataAbsorptionServiceImpl.java | 7 ++++--- .../src/main/resources/mapper/topic/TopicDao.xml | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java index 5a560cd05c..05ab26289b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java @@ -163,10 +163,11 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr Map contentMap = topicService.getTopicContent(projectSourceMap); difficulties.forEach( diff -> { - if(!CollectionUtils.isEmpty(imgMap)) { - List figureList = imgMap.get(diff.getEventId()); + + List figureList = CollectionUtils.isEmpty(imgMap) ? null : imgMap.get(diff.getEventId()); diff.setEventImgUrl(CollectionUtils.isEmpty(figureList) ? "" : figureList.get(NumConstant.ZERO).getEventImgUrl()); - } + + if(!CollectionUtils.isEmpty(contentMap)) { diff.setEventContent(contentMap.get(diff.getEventId())); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml index 700c7fde61..ab24c331f7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml @@ -225,6 +225,7 @@ resi_topic_attachment WHERE DEL_FLAG = '0' + AND ATTACHMENT_TYPE = 'image' TOPIC_ID = #{item.sourceId} From 0ee93cfde9814ebc2e834799d8b848c3dffa2c88 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 25 Feb 2021 00:49:27 +0800 Subject: [PATCH 13/31] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/GrassRootsGovernServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java index fca810d21f..afdbf95f82 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java @@ -14,6 +14,7 @@ import com.epmet.evaluationindex.screen.dto.form.AgencyFormDTO; import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import com.github.pagehelper.PageHelper; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -89,7 +90,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { PageHelper.startPage(NumConstant.ONE,param.getTopNum()); List result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType()); for(DifficultProjectResultDTO resultDTO:result){ - if(!resultDTO.getImgUrl().contains("http")){ + if (StringUtils.isNotBlank(resultDTO.getImgUrl()) && !resultDTO.getImgUrl().contains("http")) { resultDTO.setImgUrl(StrConstant.EPMETY_STR); } } From 47b29d5bc486d9ecb71890373db4f604d799f3b1 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 25 Feb 2021 09:26:01 +0800 Subject: [PATCH 14/31] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E7=99=BB?= =?UTF-8?q?=E9=99=86=E8=BF=94=E5=9B=9E=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/thirdplat/apiservice/pyld/PyldApiService.java | 3 +-- .../com/epmet/commons/thirdplat/constants/PyldConstants.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java index c5bc39b88c..c5f176b073 100644 --- a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java +++ b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java @@ -113,8 +113,7 @@ public class PyldApiService extends AbstractApiService { } PyldUserInfoResultDTO userInfo = data.getObject("userInfo", PyldUserInfoResultDTO.class); if (userInfo == null || StringUtils.isBlank(userInfo.getMobile()) || StringUtils.isBlank(userInfo.getReserved())) { - throw new RenException(EpmetErrorCode.THIRD_PLAT_REQUEST_ERROR.getCode(), - EpmetErrorCode.THIRD_PLAT_REQUEST_ERROR.getMsg().concat(":").concat(PyldConstants.REPONSE_USER_NOT_LOGIN)); + throw new RenException(EpmetErrorCode.THIRD_PLAT_REQUEST_ERROR.getCode(), PyldConstants.REPONSE_USER_NOT_LOGIN); } return userInfo; } diff --git a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/constants/PyldConstants.java b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/constants/PyldConstants.java index 1844b2e66d..ffb6dbde97 100644 --- a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/constants/PyldConstants.java +++ b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/constants/PyldConstants.java @@ -14,5 +14,5 @@ public interface PyldConstants { String PLAT_PARAM_MANAGEMENTKEY = "managementKey"; String PLAT_PARAM_MANAGEMENTKEY_VALUE = "epmet_work"; - String REPONSE_USER_NOT_LOGIN = "用户未登陆"; + String REPONSE_USER_NOT_LOGIN = "token失效,请重新登陆"; } From b99b803b9d229c08238903e5d4ee4eebeea4f7bb Mon Sep 17 00:00:00 2001 From: liushaowen <565850092@qq.com> Date: Thu, 25 Feb 2021 10:14:32 +0800 Subject: [PATCH 15/31] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=EF=BC=8C=E5=92=8C=E6=9F=A5=E8=AF=A2=20?= =?UTF-8?q?=E8=A1=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/screen/ScreenProjectDataDao.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml index ddf23a8bb0..cf1743a6da 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml @@ -31,8 +31,6 @@ From 8954b31f190a8b9e799decca8386bfa989155345 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 25 Feb 2021 10:16:40 +0800 Subject: [PATCH 16/31] =?UTF-8?q?=E6=B7=BB=E5=8A=A0del=5Fflag=3D'0'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/AreaCodeChildDao.xml | 2 +- .../src/main/resources/mapper/AreaCodeDao.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml index 422565051c..c918bb7702 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml @@ -5,7 +5,7 @@ - select * from area_code + select * from area_code m where m.DEL_FLAG = '0' diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml index 277e6c17dc..04793de3ee 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml @@ -31,4 +31,43 @@ totalData.PROJECT_TOTAL desc + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml index 42f6d5753c..c954dc41d3 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml @@ -24,6 +24,35 @@ AND MONTH_ID = #{monthId} + + + + + \ No newline at end of file From a66c42e28c84bbbac15d44112298c1ee980e89fc Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 25 Feb 2021 16:34:04 +0800 Subject: [PATCH 23/31] =?UTF-8?q?=E5=85=9A=E5=91=98=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E6=83=85=E5=86=B5-=E9=A5=BC=E7=8A=B6=E5=9B=BE=E6=A6=82?= =?UTF-8?q?=E5=86=B5=20=E6=92=A4=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/form/ParymemberFormDTO.java | 5 ----- .../screen/ScreenUserTotalDataDao.java | 1 - .../screen/impl/GrassrootsPartyDevServiceImpl.java | 7 +------ .../mapper/screen/ScreenUserTotalDataDao.xml | 11 ----------- 4 files changed, 1 insertion(+), 23 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java index 15b3e36477..fdf525f37b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java @@ -21,9 +21,4 @@ public class ParymemberFormDTO implements Serializable { */ @NotBlank(message = "机关ID不能为空",groups = {Parymember.class}) private String agencyId; - - /** - * 目前只有平阴在传,默认赋值:370124 - */ - private String areaCode; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java index 8a50ec4c61..653cf3f606 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java @@ -39,7 +39,6 @@ public interface ScreenUserTotalDataDao { * @date 2020.08.18 15:17 **/ PartymemberPercentResultDTO selectAgencyPartymemberPercent(@Param("agencyId")String agencyId); - PartymemberPercentResultDTO selectAgencyPartymemberPercentNew(@Param("agencyId")String agencyId); /** * @Description 查询top区概况 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java index 7905306f8c..30e3d5d32e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java @@ -63,12 +63,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService @Override public PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param) { - PartymemberPercentResultDTO result = new PartymemberPercentResultDTO(); - if (StringUtils.isEmpty(param.getAreaCode())) { - result = screenUserTotalDataDao.selectAgencyPartymemberPercent(param.getAgencyId()); - }else { - result = screenUserTotalDataDao.selectAgencyPartymemberPercentNew(param.getAgencyId()); - } + PartymemberPercentResultDTO result = screenUserTotalDataDao.selectAgencyPartymemberPercent(param.getAgencyId()); if(null == result){ result = new PartymemberPercentResultDTO(); logger.warn("com.epmet.datareport.service.screen.impl.GrassrootsPartyDevServiceImpl.partymemberBaseInfo:未查询出指定agencyId下的党员基础信息数据,agencyId :: {}",param.getAgencyId()); diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml index 986e077712..57b2959430 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml @@ -67,15 +67,4 @@ ISSUE_TOTAL desc, PROJECT_TOTAL desc - \ No newline at end of file From 2ec73d7dc22564535b9e80e946c88fd1b0ddcf12 Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 25 Feb 2021 17:08:29 +0800 Subject: [PATCH 24/31] =?UTF-8?q?=E3=80=90=E9=85=92=E5=9F=8Ee=E9=80=9A?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=99=BB=E5=BD=95=E3=80=91=E5=B0=86yml?= =?UTF-8?q?=E7=9A=84=E7=A7=98=E9=92=A5=E7=9B=B8=E5=85=B3=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=88=86=E6=88=902=E4=BB=BD=EF=BC=8Cc=E7=AB=AF=E5=92=8Cg?= =?UTF-8?q?=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-auth/pom.xml | 36 ++++++++++++------- epmet-auth/src/main/resources/bootstrap.yml | 12 ++++--- .../com/epmet/commons/thirdplat/DemoApp.java | 2 +- .../apiservice/jcet/JcetApiService.java | 18 +++++----- .../thirdplat/properties/ThirdplatProps.java | 6 +++- 5 files changed, 48 insertions(+), 26 deletions(-) diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml index 5015feb391..74e4e92ab9 100644 --- a/epmet-auth/pom.xml +++ b/epmet-auth/pom.xml @@ -200,9 +200,13 @@ - http://101.206.141.251:21006 - soXDEoM1 - V7ea0KnlYt7eSyzc + http://101.206.141.251:21006 + soXDEoM1 + V7ea0KnlYt7eSyzc + + http://101.206.141.219:21006 + xSMONWwP + UUCnxLyXiB4eBF4p @@ -249,9 +253,13 @@ - http://101.206.141.251:21006 - soXDEoM1 - V7ea0KnlYt7eSyzc + http://101.206.141.251:21006 + soXDEoM1 + V7ea0KnlYt7eSyzc + + http://101.206.141.219:21006 + xSMONWwP + UUCnxLyXiB4eBF4p @@ -293,9 +301,13 @@ - http://101.206.141.251:21006 - soXDEoM1 - V7ea0KnlYt7eSyzc + http://101.206.141.251:21006 + soXDEoM1 + V7ea0KnlYt7eSyzc + + http://101.206.141.219:21006 + xSMONWwP + UUCnxLyXiB4eBF4p @@ -341,9 +353,9 @@ - https://jcytc.lzjczl.com:21009 - 2cy0a9lA - 6hU3PQgxLcXr27SE + https://jcytc.lzjczl.com:21009 + 2cy0a9lA + 6hU3PQgxLcXr27SE diff --git a/epmet-auth/src/main/resources/bootstrap.yml b/epmet-auth/src/main/resources/bootstrap.yml index 6efee6a635..35d3f0e1f7 100644 --- a/epmet-auth/src/main/resources/bootstrap.yml +++ b/epmet-auth/src/main/resources/bootstrap.yml @@ -135,7 +135,11 @@ shutdown: # 调用第三方平台相关参数 thirdplat: - jcet: - domain: @thirdplat.jcet.domain@ - appkey: @thirdplat.jcet.appkey@ - appsecret: @thirdplat.jcet.appsecret@ \ No newline at end of file + jcetCend: + domain: @thirdplat.jcet.c.domain@ + appkey: @thirdplat.jcet.c.appkey@ + appsecret: @thirdplat.jcet.c.appsecret@ + jcetGend: + domain: @thirdplat.jcet.g.domain@ + appkey: @thirdplat.jcet.g.appkey@ + appsecret: @thirdplat.jcet.g.appsecret@ \ No newline at end of file diff --git a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/DemoApp.java b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/DemoApp.java index 43b27e385b..1b874efc82 100644 --- a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/DemoApp.java +++ b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/DemoApp.java @@ -20,7 +20,7 @@ public class DemoApp { //ssoToken.setSsoToken("wxz"); SsoTicketFormDTO ssoTicket = new SsoTicketFormDTO(); - ssoTicket.setSsoTicket("wxz"); + ssoTicket.setSsoTicket("ssoTicket-jGOAW66udmRtUWBKgs3q7k1w7prGxd5I"); int bodyLength = JSON.toJSONString(ssoTicket).getBytes("utf-8").length; diff --git a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java index c5f0753f47..b158a61b6e 100644 --- a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java +++ b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java @@ -22,11 +22,13 @@ public class JcetApiService extends AbstractApiService { Logger logger = LoggerFactory.getLogger(getClass()); - private JcetThirdplatProps jcetThirdplatProps; + private JcetThirdplatProps jcetThirdplatCendProps; + private JcetThirdplatProps jcetThirdplatGendProps; public JcetApiService(ThirdplatProps props) { this.thirdplatProps = props; - jcetThirdplatProps = props.getJcet(); + jcetThirdplatCendProps = props.getJcetCend(); + jcetThirdplatGendProps = props.getJcetGend(); } /** @@ -43,12 +45,12 @@ public class JcetApiService extends AbstractApiService { SsoTicketFormDTO ssoTicket = new SsoTicketFormDTO(); ssoTicket.setSsoTicket(ticket); - String domain = jcetThirdplatProps.getDomain(); + String domain = jcetThirdplatCendProps.getDomain(); Result result = HttpClientManager.getInstance().sendPost( domain.concat(JcetConstants.URL_GET_USER_BY_TICKET), domain.startsWith("https://"), JSON.toJSONString(ssoTicket), - getHeaders(ssoTicket)); + getHeaders(ssoTicket, jcetThirdplatCendProps.getAppkey(), jcetThirdplatCendProps.getAppsecret())); try { logger.info("【请求酒城e通第三方平台】getUserInfoByTicket()接口返回:{}", result.getData()); @@ -98,15 +100,15 @@ public class JcetApiService extends AbstractApiService { * @return * @throws UnsupportedEncodingException */ - private Map getHeaders(Object contentObject) throws UnsupportedEncodingException { + private Map getHeaders(Object contentObject, String appKey, String appSecret) throws UnsupportedEncodingException { int bodyLength = JSON.toJSONString(contentObject).getBytes("utf-8").length; Map headers = new HashMap(); long timestamp = System.currentTimeMillis(); headers.put(JcetConstants.PLAT_HEADER_OPEN_TIMESTAMP, String.valueOf(timestamp)); - headers.put(JcetConstants.PLAT_HEADER_OPEN_APP_ID, jcetThirdplatProps.getAppkey()); - String encryptContent = jcetThirdplatProps.getAppkey() + timestamp + bodyLength; - headers.put(JcetConstants.PLAT_HEADER_OPEN_SIGN, SignUtils.generate(encryptContent, jcetThirdplatProps.getAppsecret())); + headers.put(JcetConstants.PLAT_HEADER_OPEN_APP_ID, appKey); + String encryptContent = appKey + timestamp + bodyLength; + headers.put(JcetConstants.PLAT_HEADER_OPEN_SIGN, SignUtils.generate(encryptContent, appSecret)); return headers; } diff --git a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/properties/ThirdplatProps.java b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/properties/ThirdplatProps.java index 07c4919bd9..6ce8c89f9b 100644 --- a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/properties/ThirdplatProps.java +++ b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/properties/ThirdplatProps.java @@ -7,6 +7,10 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "thirdplat") public class ThirdplatProps { - private JcetThirdplatProps jcet; + // C端 + private JcetThirdplatProps jcetCend; + + // G端 + private JcetThirdplatProps jcetGend; } From 84605cc7cbb97fb4a5e0ce0a1de39f9001bc58cb Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 25 Feb 2021 17:18:48 +0800 Subject: [PATCH 25/31] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E4=B8=8D=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java index 8f8e59cd11..a6d7e065dd 100644 --- a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java +++ b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java @@ -104,7 +104,7 @@ public class JcetApiService extends AbstractApiService { * @return * @throws UnsupportedEncodingException */ - private Map getHeaders(Object contentObject, String appKey, String appSecret) throws UnsupportedEncodingException { + private Map getHeaders(Object contentObject, String appKey, String appSecret) throws UnsupportedEncodingException { int bodyLength = JSON.toJSONString(contentObject).getBytes(StandardCharsets.UTF_8).length; Map headers = new HashMap(); From 0563e65ff9217c14475ed9e2110bd5d23b06d5a1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 25 Feb 2021 17:50:05 +0800 Subject: [PATCH 26/31] =?UTF-8?q?=E5=85=9A=E5=91=98=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E7=BE=A4=E4=BC=97=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/ContactMassLineChartFormDTO.java | 5 +++ .../screen/ScreenCustomerAgencyDao.java | 1 + .../screen/ScreenPartyLinkMassesDataDao.java | 3 +- .../evaluationindex/screen/AgencyService.java | 9 +++++ .../screen/impl/AgencyServiceImpl.java | 13 ++++++++ .../impl/PartyMemberLeadServiceImpl.java | 13 +++++++- .../mapper/screen/ScreenCustomerAgencyDao.xml | 30 +++++++++++++++++ .../screen/ScreenPartyLinkMassesDataDao.xml | 33 +++++++++++++++++++ 8 files changed, 105 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ContactMassLineChartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ContactMassLineChartFormDTO.java index c2deeac60b..b696426a2e 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ContactMassLineChartFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ContactMassLineChartFormDTO.java @@ -21,4 +21,9 @@ public class ContactMassLineChartFormDTO implements Serializable { */ @NotBlank(message = "机关ID不能为空",groups = {ContactMassLineChart.class}) private String agencyId; + + /** + * 目前只有平阴在传,默认赋值:370124 + */ + private String areaCode; } 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 af4b0b7af2..d0a4f459a6 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 @@ -150,4 +150,5 @@ public interface ScreenCustomerAgencyDao { **/ List selectGridList(@Param("areaCode") String areaCode,@Param("agencyId") String agencyId); + List getNextAgencyIds(@Param("areaCode")String areaCode,@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/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java index 1ca974982f..30094b7225 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java @@ -39,5 +39,6 @@ public interface ScreenPartyLinkMassesDataDao { * @date 2020/8/20 2:48 下午 */ List selectContactMassLineChart(@Param("agencyId")String agencyId); - + + List selectContactMassLineChartByAgencyIds(@Param("agencyIdList")List agencyIdList); } \ No newline at end of file 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 8e265fb34b..f637a0e942 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 @@ -61,4 +61,13 @@ public interface AgencyService { AgencyNodeDTO queryStaffAgencyTree(String agencyId); ScreenCustomerAgencyDTO queryAgencyInfo(String agencyId); + + /** + * @return java.util.List + * @param agencyId + * @author yinzuomei + * @description 获取当前组织的下级组织集合 + * @Date 2021/2/25 16:52 + **/ + List getNextAgencyIds(String areaCode,String agencyId); } 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 23d960354f..9731353c92 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 @@ -297,4 +297,17 @@ public class AgencyServiceImpl implements AgencyService { public ScreenCustomerAgencyDTO queryAgencyInfo(String agencyId) { return screenCustomerAgencyDao.selectByAgencyId(agencyId); } + + /** + * @param agencyId + * @return java.util.List + * @author yinzuomei + * @description 获取当前组织的下级组织集合 + * @Date 2021/2/25 16:52 + **/ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) + @Override + public List getNextAgencyIds(String areaCode,String agencyId) { + return screenCustomerAgencyDao.getNextAgencyIds(areaCode,agencyId); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java index 073f26ef94..67911d8185 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.datareport.service.evaluationindex.screen.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; @@ -7,6 +8,7 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screen.*; +import com.epmet.datareport.service.evaluationindex.screen.AgencyService; import com.epmet.datareport.service.evaluationindex.screen.PartyMemberLeadService; import com.epmet.datareport.utils.DateUtils; import com.epmet.datareport.utils.ModuleConstant; @@ -56,6 +58,9 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { private ScreenCustomerAgencyDao customerAgencyDao; @Autowired private OperCrmOpenFeignClient operCrmOpenFeignClient; + @Autowired + private AgencyService screenCustomerAgencyService; + /** * @Description 1、先锋模范 * @param fineExampleFormDTO @@ -117,8 +122,14 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public ContactMassLineChartResultDTO contactMassLineChart(ContactMassLineChartFormDTO contactMassLineChartFormDTO) { + + List subAgencyIdorGridIdList=screenCustomerAgencyService.getNextAgencyIds(contactMassLineChartFormDTO.getAreaCode(),contactMassLineChartFormDTO.getAgencyId()); + log.info("当前组织的下级id:"+JSON.toJSONString(subAgencyIdorGridIdList)); + ContactMassLineChartResultDTO result = new ContactMassLineChartResultDTO(); - List contactMassLineChartResults = screenPartyLinkMassesDataDao.selectContactMassLineChart(contactMassLineChartFormDTO.getAgencyId()); + // List contactMassLineChartResults = screenPartyLinkMassesDataDao.selectContactMassLineChart(contactMassLineChartFormDTO.getAgencyId()); + //多客户版修改如下: + List contactMassLineChartResults = screenPartyLinkMassesDataDao.selectContactMassLineChartByAgencyIds(subAgencyIdorGridIdList); if (contactMassLineChartResults.size() == NumConstant.ZERO){ result.setXAxis(new ArrayList<>()); result.setGroupMemberData(new ArrayList<>()); 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 cf3b1a7631..04dabd6847 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 @@ -272,4 +272,34 @@ and grid.PARENT_AGENCY_ID=#{agencyId} + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml index 7f4520f8ff..29c20cb493 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml @@ -19,4 +19,37 @@ AND md.ORG_TYPE = CASE WHEN sca.LEVEL = 'community' THEN 'grid' ELSE 'agency' END + + \ No newline at end of file From c054afee8573d1694c5e9111c8d2c4456e06ca53 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 25 Feb 2021 18:25:30 +0800 Subject: [PATCH 27/31] =?UTF-8?q?screen/project=20=E6=9C=88=E5=BA=A6?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E5=88=86=E6=9E=90=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenProjectController.java | 51 ++++++++++++++++++- ...nProjectQuantityOrgMonthlyServiceImpl.java | 18 ++++--- 2 files changed, 61 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java index 2b5dea4b2d..2d2c1e79a0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java @@ -2,9 +2,17 @@ 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.ScreenProjectOrgDailyService; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService; import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectService; import com.epmet.dto.form.screen.CategoryAnalysisFormDTO; +import com.epmet.dto.form.screen.EfficiencyAnalysisFormDTO; +import com.epmet.dto.form.screen.QueryQuantityMonthlyFormDTO; +import com.epmet.dto.form.screen.ScreenCommonFormDTO; import com.epmet.dto.result.screen.CategoryAnalysisResultDTO; +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; +import com.epmet.dto.result.screen.ProjectQuantityResultDTO; +import com.epmet.dto.result.screen.QueryQuantityMonthlyResultDTO; import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO; import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDetailFormDTO; import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDistributionFormDTO; @@ -29,7 +37,10 @@ public class ScreenProjectController { @Autowired private ScreenProjectService screenProjectService; - + @Autowired + private ScreenProjectOrgDailyService projectOrgDailyService; + @Autowired + private ScreenProjectQuantityOrgMonthlyService projectQuantityOrgMonthlyService; /** * @Description 3、项目详情 * @param projectDetailFormDTO @@ -77,4 +88,42 @@ public class ScreenProjectController { return new Result>().ok(screenProjectService.categoryAnalysis(customerId, formDTO)); } + + /** + * @param customerId + * @param formDTO + * @description 【事件分析】数量统计查询 平阴大屏 + **/ + @PostMapping("queryquantity") + public Result queryQuantity(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCommonFormDTO formDTO){ + formDTO.setCustomerId(customerId); + return new Result().ok(projectOrgDailyService.queryQuantity(formDTO)); + } + + /** + * @param customerId + * @param formDTO + * @author yinzuomei + * @description 近12个月【事件分析】月度数量分析 平阴大屏 + **/ + @PostMapping("queryquantity-monthly") + public Result queryQuantityMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody QueryQuantityMonthlyFormDTO formDTO) { + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO); + return new Result().ok(projectQuantityOrgMonthlyService.queryQuantityMonthly(formDTO)); + } + + /** + * @param customerId + * @param formDTO + * @author yinzuomei + * @description 【事件分析】效率分析 平阴大屏 + **/ + @PostMapping("efficiency-analysis") + public Result> efficiencyAnalysis(@RequestHeader("CustomerId") String customerId, @RequestBody EfficiencyAnalysisFormDTO formDTO){ + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(projectOrgDailyService.efficiencyAnalysis(formDTO)); + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java index 1e4855604d..72cc5f40cc 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java @@ -32,10 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -74,20 +71,27 @@ public class ScreenProjectQuantityOrgMonthlyServiceImpl implements ScreenProject Map dtoMap = new HashMap<>(); if (!CollectionUtils.isEmpty(dtoList)) { dtoMap = dtoList.stream().collect(Collectors.toMap(ScreenProjectQuantityOrgMonthlyDTO::getMonthId, Function.identity(), (key1, key2) -> key2)); + List blank = dtoMap.keySet().stream().filter(query -> !monthIdList.contains(query)).collect(Collectors.toList()); + if(!CollectionUtils.isEmpty(blank)){ + for(int i = NumConstant.ZERO; i < blank.size(); i++){dtoMap.put(blank.get(i),null);} + } + }else{ + for(int i = NumConstant.ZERO; i < monthIdList.size(); i++){dtoMap.put(monthIdList.get(i),null);} } for (String monthId : monthIdList) { //202101=>01月 xAxis.add(monthId.substring(NumConstant.FOUR, NumConstant.SIX).concat(ScreenConstant.MONTH)); if (!CollectionUtils.isEmpty(dtoList)) { + ScreenProjectQuantityOrgMonthlyDTO en = dtoMap.get(monthId); if ("incr".equals(formDTO.getType())) { - yAxis.add(dtoMap.get(monthId).getProjectIncr()); + yAxis.add( null == en ? NumConstant.ZERO : en.getProjectIncr()); } else if ("sum".equals(formDTO.getType())) { - yAxis.add(dtoMap.get(monthId).getProjectTotal()); + yAxis.add( null == en ? NumConstant.ZERO : en.getProjectTotal() ); } continue; } //没有数据默认赋值0 - yAxis.add(0); + //yAxis.add(0); } resultDTO.setXAxis(xAxis); resultDTO.setYAxis(yAxis); From 87a22641ffc6c3a70a169420833707507e8e7cd2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 25 Feb 2021 18:34:03 +0800 Subject: [PATCH 28/31] =?UTF-8?q?=E5=85=88=E8=BF=9B=E6=94=AF=E9=83=A8?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/form/AgencyAndNumFormDTO.java | 5 ++ .../screen/ScreenOrgRankDataDao.java | 2 + .../impl/PartyMemberLeadServiceImpl.java | 54 +++++++++++++------ .../mapper/screen/ScreenOrgRankDataDao.xml | 32 +++++++++++ 4 files changed, 76 insertions(+), 17 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyAndNumFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyAndNumFormDTO.java index cd31c9688b..9410dda13a 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyAndNumFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyAndNumFormDTO.java @@ -25,4 +25,9 @@ public class AgencyAndNumFormDTO implements Serializable { * */ @NotBlank(message = "机关Id不能为空" , groups = AgencyFormDTO.CommonAgencyIdGroup.class) private String agencyId; + + /** + * 目前只有平阴在传,默认赋值:370124 + */ + private String areaCode; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenOrgRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenOrgRankDataDao.java index 2b9bdba497..1e9a5efe09 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenOrgRankDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenOrgRankDataDao.java @@ -42,4 +42,6 @@ public interface ScreenOrgRankDataDao{ **/ List selectGridDataMonthly(@Param("agencyId") String agencyId, @Param("monthId") String monthId); + List selectGridDataMonthlyAreaCode(@Param("monthId") String monthId, + @Param("areaCode")String areaCode); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java index 67911d8185..5a125e55cd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java @@ -258,6 +258,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public List advancedBranchRank(AgencyAndNumFormDTO param) { + List result = new LinkedList<>(); if(null == param.getTopNum()){ param.setTopNum(NumConstant.FIVE); }else if(NumConstant.ZERO == param.getTopNum()){ @@ -265,24 +266,43 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { } PageHelper.startPage(NumConstant.ONE,param.getTopNum()); String monthId = dateUtils.getCurrentMonthId(); - List gridData = - screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId); - int time = NumConstant.TWELVE; - while(CollectionUtils.isEmpty(gridData) && time > NumConstant.ONE){ - time--; - monthId = dateUtils.getPreviousMonthIdByDest(null,monthId); - PageHelper.startPage(NumConstant.ONE,param.getTopNum()); - gridData = screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId); + if(StringUtils.isNotBlank(param.getAreaCode())){ + log.info("先进排行榜单-先进支部排行入参"+JSON.toJSONString(param)); + //areaCode不为空,按照areaCode查询 + List gridData = + screenOrgRankDataDao.selectGridDataMonthlyAreaCode(monthId,param.getAreaCode()); + int time = NumConstant.TWELVE; + while(CollectionUtils.isEmpty(gridData) && time > NumConstant.ONE){ + time--; + monthId = dateUtils.getPreviousMonthIdByDest(null,monthId); + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + gridData = screenOrgRankDataDao.selectGridDataMonthlyAreaCode(monthId,param.getAreaCode()); + } + if(null == gridData || gridData.isEmpty()) return result; + gridData.forEach( data -> { + AdvanceBranchRankResultDTO o = ConvertUtils.sourceToTarget(data,AdvanceBranchRankResultDTO.class); + o.setClosedProjectRatio(convertPercentStr(data.getClosedProjectRatio())); + o.setSatisfactionRatio(convertPercentStr(data.getSatisfactionRatio())); + result.add(o); + }); + }else{ + List gridData = + screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId); + int time = NumConstant.TWELVE; + while(CollectionUtils.isEmpty(gridData) && time > NumConstant.ONE){ + time--; + monthId = dateUtils.getPreviousMonthIdByDest(null,monthId); + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + gridData = screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId); + } + if(null == gridData || gridData.isEmpty()) return result; + gridData.forEach( data -> { + AdvanceBranchRankResultDTO o = ConvertUtils.sourceToTarget(data,AdvanceBranchRankResultDTO.class); + o.setClosedProjectRatio(convertPercentStr(data.getClosedProjectRatio())); + o.setSatisfactionRatio(convertPercentStr(data.getSatisfactionRatio())); + result.add(o); + }); } - List result = new LinkedList<>(); - if(null == gridData || gridData.isEmpty()) return result; - gridData.forEach( data -> { - AdvanceBranchRankResultDTO o = ConvertUtils.sourceToTarget(data,AdvanceBranchRankResultDTO.class); - o.setClosedProjectRatio(convertPercentStr(data.getClosedProjectRatio())); - o.setSatisfactionRatio(convertPercentStr(data.getSatisfactionRatio())); - result.add(o); - }); - return result; } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml index bc1fa8f0aa..5d2be597be 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml @@ -34,4 +34,36 @@ + \ No newline at end of file From b68d7062be16856cb2bd1edbed7fc7fec0939f72 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 25 Feb 2021 18:46:04 +0800 Subject: [PATCH 29/31] =?UTF-8?q?=E5=85=88=E8=BF=9B=E5=85=9A=E5=91=98?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenPartyUserRankDataDao.java | 2 ++ .../screen/impl/PartyMemberLeadServiceImpl.java | 8 +++++++- .../mapper/screen/ScreenPartyUserRankDataDao.xml | 16 ++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java index 0f442931b5..5a22e7511b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java @@ -71,4 +71,6 @@ public interface ScreenPartyUserRankDataDao{ * @author sun */ List selectPartymemberPointList(PartIndexScroeRankFormDTO formDTO); + + List selectPartymemberPointOrderByAreaCode(@Param("areaCode") String areaCode); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java index 5a125e55cd..ce075165b6 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java @@ -319,7 +319,13 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { public List advancedPartymemberRank(AgencyAndNumFormDTO param) { if(null == param.getTopNum()) param.setTopNum(NumConstant.TEN); PageHelper.startPage(NumConstant.ONE,param.getTopNum()); - List result = screenPartyUserRankDataDao.selectPartymemberPointOrder(param.getAgencyId()); + List result=new ArrayList<>(); + if(StringUtils.isNotBlank(param.getAreaCode())){ + log.info("先进排行榜单-先进党员排行按照areaCode查询入参:"+param.getAreaCode()); + result=screenPartyUserRankDataDao.selectPartymemberPointOrderByAreaCode(param.getAreaCode()); + }else{ + result=screenPartyUserRankDataDao.selectPartymemberPointOrder(param.getAgencyId()); + } if(null == result) return new ArrayList<>(); return result; } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index ed4cf4c4d1..525d52f207 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -98,4 +98,20 @@ LIMIT #{topNum} + \ No newline at end of file From 179e2d69a4c9d3b0691d86e757486ea727b7a765 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 25 Feb 2021 19:18:32 +0800 Subject: [PATCH 30/31] =?UTF-8?q?=E7=83=AD=E5=BF=83=E5=B8=82=E6=B0=91?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/form/ParymemberFormDTO.java | 5 ++++ .../screen/ScreenPartyUserRankDataDao.java | 2 ++ .../screen/ScreenUserTotalDataDao.java | 5 +++- .../impl/GrassRootsGovernServiceImpl.java | 10 ++++++- .../impl/GrassrootsPartyDevServiceImpl.java | 27 ++++++++++++++++--- .../screen/ScreenPartyLinkMassesDataDao.xml | 4 +++ .../screen/ScreenPartyUserRankDataDao.xml | 17 ++++++++++++ .../mapper/screen/ScreenUserTotalDataDao.xml | 15 +++++++++++ 8 files changed, 80 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java index fdf525f37b..15b3e36477 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java @@ -21,4 +21,9 @@ public class ParymemberFormDTO implements Serializable { */ @NotBlank(message = "机关ID不能为空",groups = {Parymember.class}) private String agencyId; + + /** + * 目前只有平阴在传,默认赋值:370124 + */ + private String areaCode; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java index 5a22e7511b..fe5adc1a77 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java @@ -73,4 +73,6 @@ public interface ScreenPartyUserRankDataDao{ List selectPartymemberPointList(PartIndexScroeRankFormDTO formDTO); List selectPartymemberPointOrderByAreaCode(@Param("areaCode") String areaCode); + + List selectUserPointOrderByAreaCode(@Param("areaCode") String areaCode); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java index 653cf3f606..8de5eaadfc 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java @@ -22,6 +22,8 @@ import com.epmet.evaluationindex.screen.dto.result.TopProfileResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 中央区-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数 * @@ -56,5 +58,6 @@ public interface ScreenUserTotalDataDao { * @date 2020.08.20 14:54 **/ int selectAvgIssue(@Param("agencyId")String agencyId); - + + PartymemberPercentResultDTO selectAgencyPartymemberPercentByIds(@Param("orgIds") List orgIds); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java index 8dc27f6d18..081f7aa28e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java @@ -18,6 +18,7 @@ import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.feign.OperCrmOpenFeignClient; import com.github.pagehelper.PageHelper; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -36,6 +37,7 @@ import java.util.stream.Collectors; * @author yinzuomei@elink-cn.com * @date 2020/8/18 10:20 */ +@Slf4j @Service @DataSource(DataSourceConstant.EVALUATION_INDEX) public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { @@ -73,7 +75,13 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { param.setTopNum(NumConstant.FIVE); } PageHelper.startPage(NumConstant.ONE,param.getTopNum()); - List userPointList = screenPartyUserRankDataDao.selectUserPointOrder(param.getAgencyId()); + List userPointList = new ArrayList<>(); + if(StringUtils.isNotBlank(param.getAreaCode())){ + log.info("热心市民积分排行按照areaCode查询"+param.getAreaCode()); + userPointList=screenPartyUserRankDataDao.selectUserPointOrderByAreaCode(param.getAreaCode()); + }else{ + userPointList=screenPartyUserRankDataDao.selectUserPointOrder(param.getAgencyId()); + } UserPointRankResultDTO result = new UserPointRankResultDTO(); result.setNameData(userPointList.stream().map(UserPointResultDTO::getName).collect(Collectors.toList())); result.setPointsData(userPointList.stream().map(UserPointResultDTO::getPoint).collect(Collectors.toList())); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java index 30e3d5d32e..6285e007f4 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java @@ -8,6 +8,7 @@ import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screen.ScreenCpcBaseDataDao; import com.epmet.datareport.dao.evaluationindex.screen.ScreenPartyBranchDataDao; import com.epmet.datareport.dao.evaluationindex.screen.ScreenUserTotalDataDao; +import com.epmet.datareport.service.evaluationindex.screen.AgencyService; import com.epmet.datareport.service.evaluationindex.screen.GrassrootsPartyDevService; import com.epmet.datareport.utils.DateUtils; import com.epmet.datareport.utils.ModuleConstant; @@ -50,7 +51,8 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService private DateUtils dateUtils; @Autowired private OperCrmOpenFeignClient operCrmOpenFeignClient; - + @Autowired + private AgencyService screenCustomerAgencyService; /** * @Description 1、党员基本情况-饼状图概况 * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321324 @@ -62,10 +64,29 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param) { - + if(StringUtils.isNotBlank(param.getAreaCode())){ + logger.info(String.format("党员基本情况-饼状图概况按照areaCode查询:%s",param.getAreaCode())); + List ids=screenCustomerAgencyService.getNextAgencyIds(param.getAreaCode(),param.getAgencyId()); + if(org.apache.commons.collections4.CollectionUtils.isNotEmpty(ids)){ + PartymemberPercentResultDTO result = screenUserTotalDataDao.selectAgencyPartymemberPercentByIds(ids); + if(null == result){ + logger.warn("selectAgencyPartymemberPercentByIds is null"); + result = new PartymemberPercentResultDTO(); + result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); + return result; + } + if(null == result.getPlatFormTotal() || NumConstant.ZERO == result.getPlatFormTotal()){ + result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); + }else{ + result.setPercentInPlatForm(convertPercentStr(new BigDecimal((result.getPartyMemberTotal().doubleValue()/result.getPlatFormTotal().doubleValue())))); + } + return result; + } + logger.warn("当前组织没有下级getNextAgencyIds is empty"); + return new PartymemberPercentResultDTO(); + } PartymemberPercentResultDTO result = screenUserTotalDataDao.selectAgencyPartymemberPercent(param.getAgencyId()); if(null == result){ - result = new PartymemberPercentResultDTO(); logger.warn("com.epmet.datareport.service.screen.impl.GrassrootsPartyDevServiceImpl.partymemberBaseInfo:未查询出指定agencyId下的党员基础信息数据,agencyId :: {}",param.getAgencyId()); result = new PartymemberPercentResultDTO(); result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml index 29c20cb493..0db5e467e1 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml @@ -32,10 +32,12 @@ ON ( sca.agency_id = md.ORG_ID AND md.del_flag = '0' ) WHERE SCA.DEL_FLAG='0' AND sca.is_display = '1' + AND sca.agency_id in #{agencyId} + union SELECT scg.GRID_ID as orgId, @@ -47,9 +49,11 @@ LEFT JOIN screen_party_link_masses_data md ON ( scg.GRID_ID = md.ORG_ID AND md.del_flag = '0' ) WHERE scg.DEL_FLAG='0' + AND scg.GRID_ID in #{agencyId} + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index 525d52f207..f6d5c66ca4 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -114,4 +114,21 @@ ORDER BY m.POINT_TOTAL DESC + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml index 57b2959430..d2040d3e13 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml @@ -15,6 +15,21 @@ AND PARENT_ID = #{agencyId} + \ No newline at end of file