From a3ed034c05f34d3337277c869e908760f1a36281 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 11 Mar 2022 09:22:45 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E6=B4=BB=E8=B7=83?= =?UTF-8?q?=E5=BA=A6=E4=B8=9A=E5=8A=A1=E8=B0=83=E6=95=B4=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=95=B0=E6=94=B9=E4=B8=BA=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E5=86=85=E4=BA=A7=E7=94=9F=E7=9A=84=E9=A1=B9=E7=9B=AE=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataaggre/dao/datastats/DataStatsDao.java | 7 +++++++ .../service/datastats/DataStatsService.java | 6 ++++++ .../datastats/impl/DataStatsServiceImpl.java | 9 +++++++++ .../service/govorg/impl/GovOrgServiceImpl.java | 6 ++++-- .../mapper/datastats/DatsStatsDao.xml | 18 ++++++++++++++++++ 5 files changed, 44 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java index 4e8050c4f3..af97c5e52c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java @@ -366,4 +366,11 @@ public interface DataStatsDao { * @author sun */ List gridDateProjectIncrList(GridLivelyFormDTO formDTO); + + /** + * @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录,一个网格一天一条 + * @author sun + */ + List getGridProejctToProjectMain(GridLivelyFormDTO formDTO); + } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java index a42d6db2ad..dcda985bf4 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java @@ -292,4 +292,10 @@ public interface DataStatsService { * @author sun */ List getGridDateProjectIncrList(GridLivelyFormDTO formDTO); + + /** + * @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录,一个网格一天一条 + * @author sun + */ + List getGridProejctToProjectMain(GridLivelyFormDTO formDTO); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java index 527b6a484b..f461727c34 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java @@ -2217,4 +2217,13 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve public List getGridDateProjectIncrList(GridLivelyFormDTO formDTO) { return dataStatsDao.gridDateProjectIncrList(formDTO); } + + /** + * @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录,一个网格一天一条 + * @author sun + */ + @Override + public List getGridProejctToProjectMain(GridLivelyFormDTO formDTO) { + return dataStatsDao.getGridProejctToProjectMain(formDTO); + } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java index dc63adc141..03b3789fb1 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java @@ -692,8 +692,10 @@ public class GovOrgServiceImpl implements GovOrgService { Map gridMap = gridList.stream().collect(Collectors.toMap(GridInfoResultDTO :: getGridId, v -> v, (v1, v2) -> v1)); //2.查询直属下级组织下网格在查询时间段内存在例行工作次数的网格,一天一条 List workList = epmetUserService.getGridDateRoutineWorkList(formDTO); - //3.查询直属下级组织下网格在查询时间段内存在上报事件(直接立项)数的网格,一天一条 - List projectList = dataStatsService.getGridDateProjectIncrList(formDTO); + /*//3.查询直属下级组织下网格在查询时间段内存在上报事件(直接立项)数的网格,一天一条 + List projectList = dataStatsService.getGridDateProjectIncrList(formDTO);*/ + //3.查询直属下级组织下网格在查询时间段内存在创建项目记录,一个网格一天一条 + List projectList = dataStatsService.getGridProejctToProjectMain(formDTO); //4.汇总数据,一个网格一天只记录一条数据,这条数据可能是例行工作的也可能是上报事件的,也可能某一天两个数都有,但只记录一条 Set map = workList.stream().map(o -> o.getGridId() + o.getDateId()).collect(Collectors.toSet()); projectList.stream().filter(pro -> !map.contains(pro.getGridId() + pro.getDateId())).forEach(p -> workList.add(p)); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml index 891e6f2cf4..106489dbb5 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml @@ -1180,4 +1180,22 @@ AND pids LIKE CONCAT('%', #{agencyId}, '%') GROUP BY grid_id, date_id + + + From 26a9de532e0ca75d26dd83bb73e8b66d09cf5cbd Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Fri, 11 Mar 2022 15:00:30 +0800 Subject: [PATCH 02/15] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E8=B0=83=E5=8A=A8=EF=BC=8Cdetail=E8=A1=A8=E7=9A=84typ?= =?UTF-8?q?e=E5=92=8CtypeName=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcResiUserImportServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index c636d91b43..3eed6a252d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -1572,7 +1572,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res if (!StringUtils.isAllBlank(categoryDescBefore, categoryDescAfter)) { IcUserChangeRecordEntity categoryChangeRecord = fillChangeRecord(loginUserCustomerId, resiId, resiName, transferRecord.getId(), operator.getStaffId(), - operator.getRealName(), categoryDescBefore, categoryDescAfter , "category", "类别", "", now); + operator.getRealName(), categoryDescBefore, categoryDescAfter , "transfer", "调动", "", now); icUserChangeRecordDao.insert(categoryChangeRecord); } @@ -1586,7 +1586,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res if ("1".equals(oldValue)) { IcUserChangeDetailedEntity changeDetail = fillChangeDetail(loginUserCustomerId, resiId, transferChangeRecord.getId(), oldAgencyId, oldGridId, oldvillageId, oldBuildId, oldUnitId, - oldHomeId, transferChangeRecord.getType(), transferChangeRecord.getTypeName(), key, -1, pids); + oldHomeId, "out", "迁出", key, -1, pids); icUserChangeDetailedDao.insert(changeDetail); } } @@ -1600,7 +1600,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res if ("1".equals(newValue)) { IcUserChangeDetailedEntity changeDetail = fillChangeDetail(loginUserCustomerId, resiId, transferChangeRecord.getId(), newAgencyId, newGridId, newvillageId, newBuildId, newUnitId, - newHomeId, transferChangeRecord.getType(), transferChangeRecord.getTypeName(), key, 1, pids); + newHomeId, "in", "迁入", key, 1, pids); icUserChangeDetailedDao.insert(changeDetail); } } From fa02b878511cb50bdd279511d95966b9e5437da5 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 11 Mar 2022 15:12:23 +0800 Subject: [PATCH 03/15] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E6=97=A5=E7=BB=9F=E8=AE=A1=20=E6=9F=A5=E8=AF=A2=E7=BD=91?= =?UTF-8?q?=E6=A0=BC=E9=A1=B9=E7=9B=AE=E4=BF=AE=E6=94=B9=EF=BC=8C=E7=BD=91?= =?UTF-8?q?=E6=A0=BC=E7=9A=84=E9=A1=B9=E7=9B=AE=E4=B8=8D=E5=86=8D=E5=8F=AA?= =?UTF-8?q?=E6=98=AF=E6=9D=A5=E6=BA=90=E8=AE=AE=E9=A2=98=EF=BC=8C=E4=B9=9F?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=9D=A5=E6=BA=90=E4=BA=8B=E4=BB=B6=E6=88=96?= =?UTF-8?q?=E8=80=85=E7=BD=91=E6=A0=BC=E5=91=98=E4=B8=8A=E6=8A=A5=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E6=89=80=E4=BB=A5=E6=94=B9=E6=9F=A5=E9=A1=B9?= =?UTF-8?q?=E7=9B=AEmain=E8=A1=A8=E7=BD=91=E6=A0=BC=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/GridProjectToProjectMainDTO.java | 56 ++++++++++++++++ .../dao/stats/FactAgencyProjectDailyDao.java | 8 +++ .../service/impl/StatsProjectServiceImpl.java | 65 +++++++++++-------- .../stats/FactAgencyProjectDailyService.java | 8 +++ .../FactAgencyProjectDailyServiceImpl.java | 12 ++++ .../stats/FactAgencyProjectDailyDao.xml | 17 +++++ 6 files changed, 139 insertions(+), 27 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridProjectToProjectMainDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridProjectToProjectMainDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridProjectToProjectMainDTO.java new file mode 100644 index 0000000000..7d06186528 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridProjectToProjectMainDTO.java @@ -0,0 +1,56 @@ +/** + * 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.extract.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 网格项目main表数据 + */ +@Data +public class GridProjectToProjectMainDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 项目ID + */ + private String projectId; + /** + * 项目的发布日期yyyyMMdd + */ + private String dateId; + /** + * 网格ID + */ + private String gridId; + /** + * 状态 + */ + private String projectStatus; + /** + * resolved unresolved + * */ + private String isResolved; + + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java index 87409a6607..61e8057193 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java @@ -18,8 +18,10 @@ package com.epmet.dao.stats; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.extract.result.GridProjectToProjectMainDTO; import com.epmet.dto.project.form.MonthProjectListFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity; +import com.epmet.entity.project.ProjectEntity; import com.epmet.entity.stats.FactAgencyProjectDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -60,4 +62,10 @@ public interface FactAgencyProjectDailyDao extends BaseDao selectProjectCountByOrgLevel(@Param("orgLevel") String orgLevel, @Param("customerId") String customerId, @Param("dateId")String dateId ); + /** + * @Author sun + * @Description 查询客户项目main表里是网格项目的数据 + **/ + List getGridProjectToProjectMain(ProjectEntity projectEntity); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java index 852fb8c47d..1891c55e7d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java @@ -5,12 +5,11 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.PingYinConstant; import com.epmet.constant.ProjectConstant; -import com.epmet.dto.ProjectDTO; import com.epmet.dto.StatsFormDTO; +import com.epmet.dto.extract.result.GridProjectToProjectMainDTO; import com.epmet.dto.project.form.MonthProjectListFormDTO; import com.epmet.dto.stats.DimAgencyDTO; import com.epmet.dto.stats.DimGridDTO; -import com.epmet.entity.issue.IssueEntity; import com.epmet.entity.org.CustomerAgencyEntity; import com.epmet.entity.project.ProjectEntity; import com.epmet.entity.project.ProjectProcessEntity; @@ -677,26 +676,16 @@ public class StatsProjectServiceImpl implements StatsProjectService { } //2022.3.3 end sun - //3:根据客户Id查询项目业务表已结案数据(查询传入日期及之前的数据) - ProjectEntity projectEntity = new ProjectEntity(); - projectEntity.setCustomerId(customerId); - projectEntity.setCreatedTime(date); - projectEntity.setStatus(ProjectConstant.CLOSED); - List projectList = projectService.getProjectList(projectEntity); - - //4:查询项目处理进展表中有效数据(创建日期截取yyyy-mm-dd格式字段值)(查询传入日期及之前的数据) - List processList = projectProcessService.getProcessList(projectEntity); - - //5:网格层级日月统计 + //3:网格层级日月统计 if (null != dimGridList && dimGridList.size() > NumConstant.ZERO) { - //5.1:执行网格日数据统计 + //3-1:执行网格日数据统计 try { - gridDateProjectStats(customerId, dimId, date, dimGridList, projectList, processList); + gridDateProjectStats(customerId, dimId, date, dimGridList); } catch (Exception e) { log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, "gridDateProjectStats", customerId, dimId.getDateId()), e); } - //5.2:执行网格月数据统计 + //3-2:执行网格月数据统计 try { gridMonthProjectStats(customerId, dimId, dimGridList); } catch (Exception e) { @@ -712,22 +701,44 @@ public class StatsProjectServiceImpl implements StatsProjectService { * @Author sun * @Description 数据-项目-网格日统计 **/ - private String gridDateProjectStats(String customerId, DimIdGenerator.DimIdBean dimId, Date date, List dimGridList, List projectList, List processList) { + private String gridDateProjectStats(String customerId, DimIdGenerator.DimIdBean dimId, Date date, List dimGridList) { //批量网格日统计新增对象 List gridDateEntityList = new ArrayList<>(); //计算百分比使用,保留小数点后两位 NumberFormat numberFormat = NumberFormat.getInstance(); numberFormat.setMaximumFractionDigits(6); - //1:根据客户Id查询议题库已转项目的网格项目关系数据 + /*//1:根据客户Id查询议题库已转项目的网格项目关系数据 IssueEntity issueEntity = new IssueEntity(); issueEntity.setCustomerId(customerId); issueEntity.setCreatedTime(date); - List gridProjectList = issueService.getGridProjectList(issueEntity); + List gridProjectList = issueService.getGridProjectList(issueEntity);*/ - //2:遍历网格维度数据,统计每个网格各项指标数据 + ProjectEntity projectEntity = new ProjectEntity(); + projectEntity.setCustomerId(customerId); + projectEntity.setCreatedTime(date); + //2022.3.11 网格项目数据原先查的是来源议题的项目,现在网格的项目有来源议题、事件上报给网格、网格员在网格内上报事件,所以网格的项目统计改查询项目的main表中网格项目数据 + //1.查询客户项目main表里是网格项目的数据 + List gridProjectList = factAgencyProjectDailyService.getGridProjectToProjectMain(projectEntity); + + //2.筛选出已结案项目,用于后续统计结案项目的已解决未解决数 + List projectList = new ArrayList<>(); + ProjectEntity entity = null; + for (GridProjectToProjectMainDTO gp : gridProjectList){ + if(ProjectConstant.CLOSED.equals(gp.getProjectStatus())){ + entity = new ProjectEntity(); + entity.setId(gp.getProjectId() ); + entity.setClosedStatus(gp.getProjectStatus()); + projectList.add(entity); + } + } + + //3.查询客户下项目节点表数据,用于统计不同状态项目数、日增量数 + List processList = projectProcessService.getProcessList(projectEntity); + + //4:遍历网格维度数据,统计每个网格各项指标数据 for (DimGridEntity grid : dimGridList) { - //2.1:存放网格下的项目Id + //4-1:存放网格下的项目Id Map map = new HashMap<>(); gridProjectList.forEach(gridProject -> { if (grid.getId().equals(gridProject.getGridId())) { @@ -748,7 +759,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { Map closeMap = new HashMap<>(); //存放前一日已结案项目Id,用于统计日增量中已结案项目的已解决、未解决数量 Map closeDateMap = new HashMap<>(); - //2.2:遍历进展数据,统计截止当日的项目总量、处理中总量、已结案总量以及日增量中的项目总量、处理中总量、已结案总量 + //4-2:遍历进展数据,统计截止当日的项目总量、处理中总量、已结案总量以及日增量中的项目总量、处理中总量、已结案总量 //截止当日项目总数 projectTotal.addAndGet(map.size()); processList.forEach(process -> { @@ -771,7 +782,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { } } }); - //2.3:遍历项目业务数据,统计截止当日的已结案已解决总量、已结案未解决总量以及日增量中的已结案已解决总量、已结案未解决总量 + //4-3:遍历项目业务数据,统计截止当日的已结案已解决总量、已结案未解决总量以及日增量中的已结案已解决总量、已结案未解决总量 projectList.forEach(project -> { //当前机关及下级 if (map.containsKey(project.getId())) { @@ -798,7 +809,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { } }); - //2.4:封装日数据对象 + //4-4:封装日数据对象 FactGridProjectDailyEntity gridDailyEntity = new FactGridProjectDailyEntity(); gridDailyEntity.setCustomerId(customerId); gridDailyEntity.setAgencyId(grid.getAgencyId()); @@ -830,16 +841,16 @@ public class StatsProjectServiceImpl implements StatsProjectService { gridDateEntityList.add(gridDailyEntity); } - //3:批量新增数据,先删后增 + //5:批量新增数据,先删后增 if (null != gridDateEntityList && gridDateEntityList.size() > NumConstant.ZERO) { - //3.1:根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 + //5-1:根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 FactAgencyProjectDailyEntity delEntity = new FactAgencyProjectDailyEntity(); delEntity.setCustomerId(customerId); delEntity.setDateId(dimId.getDateId()); log.info("StatsProjectServiceImpl.gridDateProjectStats-根据客户Id、日维度Id批量删除网格项目日统计表数据,对应客户Id:" + customerId + ",日维度Id:" + dimId.getDateId()); factGridProjectDailyService.delDateProject(delEntity); - //3.2:批量保存网格日统计数据 + //5-2:批量保存网格日统计数据 log.info("StatsProjectServiceImpl.gridDateProjectStats-批量新增网格项目日统计表数据,对应客户Id:" + customerId + ",日维度Id:" + dimId.getDateId()); factGridProjectDailyService.insertBatch(gridDateEntityList); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectDailyService.java index f7df122755..2fc68f316a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectDailyService.java @@ -18,7 +18,9 @@ package com.epmet.service.stats; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.extract.result.GridProjectToProjectMainDTO; import com.epmet.dto.project.form.MonthProjectListFormDTO; +import com.epmet.entity.project.ProjectEntity; import com.epmet.entity.stats.FactAgencyProjectDailyEntity; import java.util.List; @@ -44,4 +46,10 @@ public interface FactAgencyProjectDailyService extends BaseService getGridProjectToProjectMain(ProjectEntity projectEntity); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java index ddf18955ec..a80d9f740b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java @@ -21,7 +21,9 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactAgencyProjectDailyDao; +import com.epmet.dto.extract.result.GridProjectToProjectMainDTO; import com.epmet.dto.project.form.MonthProjectListFormDTO; +import com.epmet.entity.project.ProjectEntity; import com.epmet.entity.stats.FactAgencyProjectDailyEntity; import com.epmet.service.stats.FactAgencyProjectDailyService; import org.springframework.stereotype.Service; @@ -58,4 +60,14 @@ public class FactAgencyProjectDailyServiceImpl extends BaseServiceImpl getGridProjectToProjectMain(ProjectEntity projectEntity) { + return baseDao.getGridProjectToProjectMain(projectEntity); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectDailyDao.xml index b2333a5451..89b2351bd5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectDailyDao.xml @@ -44,5 +44,22 @@ AND DATE_ID = #{dateId} + + \ No newline at end of file From 53f98c8c421da4c078af44ed638b581d8fef137f Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Fri, 11 Mar 2022 15:25:04 +0800 Subject: [PATCH 04/15] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcResiUserImportServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index 3eed6a252d..e659784cbf 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -1538,7 +1538,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res // 保存 调动changeRecord IcUserChangeRecordEntity transferChangeRecord = fillChangeRecord(loginUserCustomerId, resiId, resiName, transferRecord.getId(), operator.getStaffId(), - operator.getRealName(), sbBefore.toString(), sbAfter.toString(), "transfer", "调动", "", now); + operator.getRealName(), sbBefore.toString(), sbAfter.toString(), "category", "类别", "", now); icUserChangeRecordDao.insert(transferChangeRecord); // 保存 类别变更changeRecord From b748556401cbd6f084517bcf306efdeffebf9169 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Fri, 11 Mar 2022 15:28:34 +0800 Subject: [PATCH 05/15] - --- .../com/epmet/service/impl/IcResiUserImportServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index e659784cbf..ba259e7f43 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -1538,7 +1538,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res // 保存 调动changeRecord IcUserChangeRecordEntity transferChangeRecord = fillChangeRecord(loginUserCustomerId, resiId, resiName, transferRecord.getId(), operator.getStaffId(), - operator.getRealName(), sbBefore.toString(), sbAfter.toString(), "category", "类别", "", now); + operator.getRealName(), sbBefore.toString(), sbAfter.toString(), "transfer", "调动", "", now); icUserChangeRecordDao.insert(transferChangeRecord); // 保存 类别变更changeRecord @@ -1572,7 +1572,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res if (!StringUtils.isAllBlank(categoryDescBefore, categoryDescAfter)) { IcUserChangeRecordEntity categoryChangeRecord = fillChangeRecord(loginUserCustomerId, resiId, resiName, transferRecord.getId(), operator.getStaffId(), - operator.getRealName(), categoryDescBefore, categoryDescAfter , "transfer", "调动", "", now); + operator.getRealName(), categoryDescBefore, categoryDescAfter , "category", "类别", "", now); icUserChangeRecordDao.insert(categoryChangeRecord); } From 4efd53bb10770b458eaf92349c2609f9e34c729b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 11 Mar 2022 16:17:02 +0800 Subject: [PATCH 06/15] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E6=B4=BB=E8=B7=83?= =?UTF-8?q?=E5=BA=A6=E7=BB=9F=E8=AE=A1=E6=9F=A5=E8=AF=A2=EF=BC=8C=E6=BA=90?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=94=B9=E6=9F=A5screen=5Fproject=5Fdata?= =?UTF-8?q?=E8=A1=A8=EF=BC=8C=E8=BF=99=E4=B8=AA=E8=A1=A8=E5=B9=B3=E9=98=B4?= =?UTF-8?q?=E7=9A=84=E6=98=AF=E4=B8=89=E4=B8=AA=E8=A1=97=E9=81=93=E5=92=8C?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=95=B0=E6=8D=AE=E9=83=BD=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/evaluationindex/EvaluationIndexDao.java | 7 +++++++ .../evaluationindex/EvaluationIndexService.java | 8 ++++++++ .../impl/EvaluationIndexServiceImpl.java | 11 +++++++++++ .../service/govorg/impl/GovOrgServiceImpl.java | 9 +++++++-- .../evaluationindex/EvaluationIndexDao.xml | 16 ++++++++++++++++ 5 files changed, 49 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java index 5afe394900..da7f97b6bf 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java @@ -21,6 +21,8 @@ import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO; +import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO; +import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO; import com.epmet.dataaggre.dto.govproject.form.ProjectCategoryTotalFormDTO; import com.epmet.dataaggre.dto.govproject.result.ProjectCategoryTotalResultDTO; import org.apache.ibatis.annotations.Mapper; @@ -111,4 +113,9 @@ public interface EvaluationIndexDao { */ List projectCategoryList(ProjectCategoryTotalFormDTO formDTO); + /** + * @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录,一个网格一天一条 + * @author sun + */ + List getGridProejctToProjectMain(GridLivelyFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java index bd5cfd6886..381b6f9625 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java @@ -6,6 +6,8 @@ import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO; +import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO; +import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO; import com.epmet.dataaggre.dto.govproject.form.ProjectCategoryTotalFormDTO; import com.epmet.dataaggre.dto.govproject.result.ProjectCategoryTotalResultDTO; @@ -93,4 +95,10 @@ public interface EvaluationIndexService { * @author sun */ List projectCategoryList(ProjectCategoryTotalFormDTO formDTO); + + /** + * @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录,一个网格一天一条 + * @author sun + */ + List getGridProejctToProjectMain(GridLivelyFormDTO formDTO); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java index e3f1b246af..3e8f60d6a9 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java @@ -11,6 +11,8 @@ import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO; +import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO; +import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO; import com.epmet.dataaggre.dto.govproject.form.ProjectCategoryTotalFormDTO; import com.epmet.dataaggre.dto.govproject.result.ProjectCategoryTotalResultDTO; import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService; @@ -217,4 +219,13 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService { return evaluationIndexDao.projectCategoryList(formDTO); } + /** + * @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录,一个网格一天一条 + * @author sun + */ + @Override + public List getGridProejctToProjectMain(GridLivelyFormDTO formDTO) { + return evaluationIndexDao.getGridProejctToProjectMain(formDTO); + } + } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java index 03b3789fb1..13e5507083 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java @@ -34,6 +34,7 @@ import com.epmet.dataaggre.excel.GridLivelyExcel; import com.epmet.dataaggre.service.commonservice.AreaCodeService; import com.epmet.dataaggre.service.datastats.DataStatsService; import com.epmet.dataaggre.service.epmetuser.EpmetUserService; +import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService; import com.epmet.dataaggre.service.govorg.GovOrgService; import com.epmet.dataaggre.service.opercrm.CustomerRelation; import com.epmet.dto.result.UploadImgResultDTO; @@ -88,6 +89,8 @@ public class GovOrgServiceImpl implements GovOrgService { private DataStatsService dataStatsService; @Autowired private OssFeignClient ossFeignClient; + @Autowired + private EvaluationIndexService evaluationIndexService; /** * @param staffId @@ -694,8 +697,10 @@ public class GovOrgServiceImpl implements GovOrgService { List workList = epmetUserService.getGridDateRoutineWorkList(formDTO); /*//3.查询直属下级组织下网格在查询时间段内存在上报事件(直接立项)数的网格,一天一条 List projectList = dataStatsService.getGridDateProjectIncrList(formDTO);*/ - //3.查询直属下级组织下网格在查询时间段内存在创建项目记录,一个网格一天一条 - List projectList = dataStatsService.getGridProejctToProjectMain(formDTO); + /*//3.查询直属下级组织下网格在查询时间段内存在创建项目记录,一个网格一天一条 + List projectList = dataStatsService.getGridProejctToProjectMain(formDTO);*/ + //3.查询直属下级组织下网格在查询时间段内存在创建项目记录,一个网格一天一条[改查screen_project_data表,因为平阴三个街道和小程序的数据都在这个表有] + List projectList = evaluationIndexService.getGridProejctToProjectMain(formDTO); //4.汇总数据,一个网格一天只记录一条数据,这条数据可能是例行工作的也可能是上报事件的,也可能某一天两个数都有,但只记录一条 Set map = workList.stream().map(o -> o.getGridId() + o.getDateId()).collect(Collectors.toSet()); projectList.stream().filter(pro -> !map.contains(pro.getGridId() + pro.getDateId())).forEach(p -> workList.add(p)); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml index c3b45aba0d..37f8d40bd6 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml @@ -196,4 +196,20 @@ ORDER BY project_total DESC + + From 89ae2fa56764c8da0691253b3270f98e868c6726 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 14 Mar 2022 09:52:08 +0800 Subject: [PATCH 07/15] =?UTF-8?q?=E5=A4=87=E4=BB=BD=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/template/Controller.java.vm | 21 +++-- .../resources/template/Controller.java.vm_bak | 77 ++++++++++++++++ .../template/ServiceImpl.java.vm.bak | 87 +++++++++++++++++++ 3 files changed, 174 insertions(+), 11 deletions(-) create mode 100644 epmet-cloud-generator/src/main/resources/template/Controller.java.vm_bak create mode 100644 epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm.bak diff --git a/epmet-cloud-generator/src/main/resources/template/Controller.java.vm b/epmet-cloud-generator/src/main/resources/template/Controller.java.vm index e7d642a3ca..27b578fcfc 100644 --- a/epmet-cloud-generator/src/main/resources/template/Controller.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Controller.java.vm @@ -1,5 +1,6 @@ package ${package}.controller; +import ${main}.commons.tools.aop.NoRepeatSubmit; import ${main}.commons.tools.page.PageData; import ${main}.commons.tools.utils.ExcelUtils; import ${main}.commons.tools.utils.Result; @@ -28,22 +29,23 @@ import java.util.Map; @RestController @RequestMapping("${pathName}") public class ${className}Controller { - + @Autowired private ${className}Service ${classname}Service; - @GetMapping("page") + @RequestMapping("page") public Result> page(@RequestParam Map params){ PageData<${className}DTO> page = ${classname}Service.page(params); return new Result>().ok(page); } - @GetMapping("{id}") + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) public Result<${className}DTO> get(@PathVariable("id") String id){ ${className}DTO data = ${classname}Service.get(id); return new Result<${className}DTO>().ok(data); } + @NoRepeatSubmit @PostMapping public Result save(@RequestBody ${className}DTO dto){ //效验数据 @@ -52,7 +54,8 @@ public class ${className}Controller { return new Result(); } - @PutMapping + @NoRepeatSubmit + @PostMapping public Result update(@RequestBody ${className}DTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -60,7 +63,7 @@ public class ${className}Controller { return new Result(); } - @DeleteMapping + @PostMapping public Result delete(@RequestBody String[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -68,10 +71,6 @@ public class ${className}Controller { return new Result(); } - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List<${className}DTO> list = ${classname}Service.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, ${className}Excel.class); - } -} \ No newline at end of file + +} diff --git a/epmet-cloud-generator/src/main/resources/template/Controller.java.vm_bak b/epmet-cloud-generator/src/main/resources/template/Controller.java.vm_bak new file mode 100644 index 0000000000..3bfa395628 --- /dev/null +++ b/epmet-cloud-generator/src/main/resources/template/Controller.java.vm_bak @@ -0,0 +1,77 @@ +package ${package}.controller; + +import ${main}.commons.tools.page.PageData; +import ${main}.commons.tools.utils.ExcelUtils; +import ${main}.commons.tools.utils.Result; +import ${main}.commons.tools.validator.AssertUtils; +import ${main}.commons.tools.validator.ValidatorUtils; +import ${main}.commons.tools.validator.group.AddGroup; +import ${main}.commons.tools.validator.group.UpdateGroup; +import ${main}.commons.tools.validator.group.DefaultGroup; +import ${package}.dto.${className}DTO; +import ${package}.excel.${className}Excel; +import ${package}.service.${className}Service; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * ${comments} + * + * @author ${author} ${email} + * @since ${version} ${date} + */ +@RestController +@RequestMapping("${pathName}") +public class ${className}Controller { + + @Autowired + private ${className}Service ${classname}Service; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData<${className}DTO> page = ${classname}Service.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result<${className}DTO> get(@PathVariable("id") String id){ + ${className}DTO data = ${classname}Service.get(id); + return new Result<${className}DTO>().ok(data); + } + + @PostMapping + public Result save(@RequestBody ${className}DTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + ${classname}Service.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody ${className}DTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + ${classname}Service.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + ${classname}Service.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List<${className}DTO> list = ${classname}Service.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, ${className}Excel.class); + } + +} diff --git a/epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm.bak b/epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm.bak new file mode 100644 index 0000000000..f0bcfe2a7e --- /dev/null +++ b/epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm.bak @@ -0,0 +1,87 @@ +package ${package}.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import ${main}.commons.mybatis.service.impl.BaseServiceImpl; +import ${main}.commons.tools.page.PageData; +import ${main}.commons.tools.utils.ConvertUtils; +import ${package}.commons.tools.constant.FieldConstant; +import ${package}.dao.${className}Dao; +import ${package}.dto.${className}DTO; +import ${package}.entity.${className}Entity; +import ${package}.redis.${className}Redis; +import ${package}.service.${className}Service; +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 java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * ${comments} + * + * @author ${author} ${email} + * @since ${version} ${date} + */ +@Service +public class ${className}ServiceImpl extends BaseServiceImpl<${className}Dao, ${className}Entity> implements ${className}Service { + + @Autowired + private ${className}Redis ${classname}Redis; + + @Override + public PageData<${className}DTO> page(Map params) { + IPage<${className}Entity> page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ${className}DTO.class); + } + + @Override + public List<${className}DTO> list(Map params) { + List<${className}Entity> entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ${className}DTO.class); + } + + private QueryWrapper<${className}Entity> getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper<${className}Entity> wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ${className}DTO get(String id) { + ${className}Entity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ${className}DTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(${className}DTO dto) { + ${className}Entity entity = ConvertUtils.sourceToTarget(dto, ${className}Entity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(${className}DTO dto) { + ${className}Entity entity = ConvertUtils.sourceToTarget(dto, ${className}Entity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file From ed2e228306c42b1c76613164c5f4d7cec953b9e5 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 14 Mar 2022 10:32:52 +0800 Subject: [PATCH 08/15] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E7=A8=8B=E5=BA=8F=E8=B0=83=E6=95=B4=EF=BC=8C?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E7=BD=91=E6=A0=BC=E9=A1=B9=E7=9B=AE=E7=9A=84?= =?UTF-8?q?(=E8=AE=AE=E9=A2=98=E8=BD=AC=E7=9A=84=E3=80=81=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E6=8A=A5=E7=9A=84=E3=80=81=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E5=91=98=E4=B8=8A=E6=8A=A5=E4=BA=8B=E4=BB=B6=E7=9A=84)?= =?UTF-8?q?=E6=89=80=E6=9C=89=E6=95=B0=E6=8D=AE=EF=BC=8C=E4=B8=8D=E5=9C=A8?= =?UTF-8?q?=E5=8F=AA=E6=98=AF=E7=BB=9F=E8=AE=A1=E8=AE=AE=E9=A2=98=E8=BD=AC?= =?UTF-8?q?=E7=9A=84=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/enums/BizTypeEnum.java | 1 + .../controller/ShiBeiICJobController.java | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/BizTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/BizTypeEnum.java index 8edc31e7e2..e6318f61b6 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/BizTypeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/BizTypeEnum.java @@ -16,6 +16,7 @@ public enum BizTypeEnum { GROUP("group", "小组"), TOPIC("topic", "话题"), ISSUE("issue", "议题"), + GRID_PROJECT("grid_project", "网格项目"), PROJECT("project", "项目"), ARTICLE("article", "文章(党建声音)"), ; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiICJobController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiICJobController.java index 0534f38363..c08ef1af1f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiICJobController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiICJobController.java @@ -73,6 +73,9 @@ public class ShiBeiICJobController { if (bizType.equals(BizTypeEnum.PROJECT.getType())) { this.agencyProjectStats(customerId, d); } + if (bizType.equals(BizTypeEnum.GRID_PROJECT.getType())) { + this.gridProjectStats(customerId, d); + } } /** @@ -95,6 +98,26 @@ public class ShiBeiICJobController { new Result(); } + /** + * @Author sun + * @Description 数据-项目-网格日(月)统计 + **/ + private void gridProjectStats(String customerId, String dateId) { + try { + if (StringUtils.isNotBlank(dateId)) { + dateId = DateUtils.format(DateUtils.parseDate(dateId, DateUtils.DATE_PATTERN_YYYYMMDD)); + } + StatsFormDTO formDTO = new StatsFormDTO(); + formDTO.setCustomerId(customerId); + formDTO.setDate(dateId); + + statsProjectService.gridProjectStats(formDTO); + } catch (Exception e) { + log.error("网格项目日、月统计失败,参数为:{}" + customerId + StrConstant.HYPHEN + dateId, e); + } + new Result(); + } + private void extractUserPointData(String customerId, String dateId) { try { //基层治理 - 热心市民 screen_party_user_rank_data From 3e8bc953ea409f33f909de85260491cc103dd94d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 14 Mar 2022 14:17:37 +0800 Subject: [PATCH 09/15] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E7=A8=8B=E5=BA=8F=E8=B0=83=E6=95=B4=EF=BC=8C?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E7=BD=91=E6=A0=BC=E9=A1=B9=E7=9B=AE=E7=9A=84?= =?UTF-8?q?(=E8=AE=AE=E9=A2=98=E8=BD=AC=E7=9A=84=E3=80=81=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E6=8A=A5=E7=9A=84=E3=80=81=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E5=91=98=E4=B8=8A=E6=8A=A5=E4=BA=8B=E4=BB=B6=E7=9A=84)?= =?UTF-8?q?=E6=89=80=E6=9C=89=E6=95=B0=E6=8D=AE=EF=BC=8C=E4=B8=8D=E5=9C=A8?= =?UTF-8?q?=E5=8F=AA=E6=98=AF=E7=BB=9F=E8=AE=A1=E8=AE=AE=E9=A2=98=E8=BD=AC?= =?UTF-8?q?=E7=9A=84=E9=A1=B9=E7=9B=AE=20=20=20=E7=A8=8B=E5=BA=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/StatsProjectServiceImpl.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/impl/StatsProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java index 1891c55e7d..493d504007 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java @@ -728,7 +728,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { if(ProjectConstant.CLOSED.equals(gp.getProjectStatus())){ entity = new ProjectEntity(); entity.setId(gp.getProjectId() ); - entity.setClosedStatus(gp.getProjectStatus()); + entity.setClosedStatus(gp.getIsResolved()); projectList.add(entity); } } From 8f0ea3e73c76a456ac6238394c08670a80d8a84b Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 14 Mar 2022 14:43:56 +0800 Subject: [PATCH 10/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=A1=E6=9F=A5?= =?UTF-8?q?=E9=94=81=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/mq/listener/OpenDataPatrolChangeEventListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java index 682185ca8a..a9c2b50e57 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java @@ -83,7 +83,7 @@ public class OpenDataPatrolChangeEventListener implements MessageListenerConcurr } RLock lock = null; try { - lock = distributedLock.getLock(String.format("lock:open_data_patrol:%s", msgObj.getPatrolId()), + lock = distributedLock.getLock(String.format("lock:open_data_patrol:%s:%s",tags, msgObj.getObjectId()), 30L, 30L, TimeUnit.SECONDS); UpsertPatrolRecordForm patrolRecordForm = new UpsertPatrolRecordForm(); patrolRecordForm.setCustomerId(msgObj.getCustomerId()); From 2aa45e4dc5f05cc5859c4f770bf46df4cced0d8a Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 14 Mar 2022 21:11:03 +0800 Subject: [PATCH 11/15] =?UTF-8?q?mapingurl=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/template/Controller.java.vm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-cloud-generator/src/main/resources/template/Controller.java.vm b/epmet-cloud-generator/src/main/resources/template/Controller.java.vm index 27b578fcfc..b0aaad89eb 100644 --- a/epmet-cloud-generator/src/main/resources/template/Controller.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Controller.java.vm @@ -46,7 +46,7 @@ public class ${className}Controller { } @NoRepeatSubmit - @PostMapping + @PostMapping("save") public Result save(@RequestBody ${className}DTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -55,7 +55,7 @@ public class ${className}Controller { } @NoRepeatSubmit - @PostMapping + @PostMapping("update") public Result update(@RequestBody ${className}DTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -63,7 +63,7 @@ public class ${className}Controller { return new Result(); } - @PostMapping + @PostMapping("delete") public Result delete(@RequestBody String[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); From 605c532b79b4a610dc0bd372c0d16c7ca521168f Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 14 Mar 2022 21:19:59 +0800 Subject: [PATCH 12/15] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=A9=BC=E5=B3=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/renren/utils/GenUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-cloud-generator/src/main/java/io/renren/utils/GenUtils.java b/epmet-cloud-generator/src/main/java/io/renren/utils/GenUtils.java index 1b1959d1a2..e6571fe2c5 100644 --- a/epmet-cloud-generator/src/main/java/io/renren/utils/GenUtils.java +++ b/epmet-cloud-generator/src/main/java/io/renren/utils/GenUtils.java @@ -125,7 +125,7 @@ public class GenUtils { map.put("pk", tableEntity.getPk()); map.put("className", tableEntity.getClassName()); map.put("classname", tableEntity.getClassname()); - map.put("pathName", tableEntity.getClassname().toLowerCase()); + map.put("pathName", tableEntity.getClassname()); map.put("columns", tableEntity.getColumns()); map.put("hasBigDecimal", hasBigDecimal); map.put("main", main); From 79cec12400c23ec72f41e57d53c0d72f140f0aa8 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 15 Mar 2022 09:37:45 +0800 Subject: [PATCH 13/15] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/MemoAttachmentDTO.java | 105 ++++++++++++++++++ .../main/java/com/epmet/dto/MemoAttrDTO.java | 80 +++++++++++++ .../java/com/epmet/dto/MemoConcernDTO.java | 105 ++++++++++++++++++ .../java/com/epmet/dto/MemoDifficultyDTO.java | 85 ++++++++++++++ .../java/com/epmet/dto/MemoWorkDiaryDTO.java | 75 +++++++++++++ .../controller/MemoAttachmentController.java | 72 ++++++++++++ .../epmet/controller/MemoAttrController.java | 72 ++++++++++++ .../controller/MemoConcernController.java | 72 ++++++++++++ .../controller/MemoDifficultyController.java | 72 ++++++++++++ .../controller/MemoWorkDiaryController.java | 72 ++++++++++++ .../java/com/epmet/dao/MemoAttachmentDao.java | 16 +++ .../main/java/com/epmet/dao/MemoAttrDao.java | 16 +++ .../java/com/epmet/dao/MemoConcernDao.java | 16 +++ .../java/com/epmet/dao/MemoDifficultyDao.java | 16 +++ .../java/com/epmet/dao/MemoWorkDiaryDao.java | 16 +++ .../epmet/entity/MemoAttachmentEntity.java | 71 ++++++++++++ .../java/com/epmet/entity/MemoAttrEntity.java | 48 ++++++++ .../com/epmet/entity/MemoConcernEntity.java | 73 ++++++++++++ .../epmet/entity/MemoDifficultyEntity.java | 53 +++++++++ .../com/epmet/entity/MemoWorkDiaryEntity.java | 43 +++++++ .../epmet/service/MemoAttachmentService.java | 78 +++++++++++++ .../com/epmet/service/MemoAttrService.java | 78 +++++++++++++ .../com/epmet/service/MemoConcernService.java | 78 +++++++++++++ .../epmet/service/MemoDifficultyService.java | 78 +++++++++++++ .../epmet/service/MemoWorkDiaryService.java | 78 +++++++++++++ .../impl/MemoAttachmentServiceImpl.java | 83 ++++++++++++++ .../service/impl/MemoAttrServiceImpl.java | 83 ++++++++++++++ .../service/impl/MemoConcernServiceImpl.java | 83 ++++++++++++++ .../impl/MemoDifficultyServiceImpl.java | 83 ++++++++++++++ .../impl/MemoWorkDiaryServiceImpl.java | 83 ++++++++++++++ .../resources/mapper/MemoAttachmentDao.xml | 8 ++ .../src/main/resources/mapper/MemoAttrDao.xml | 8 ++ .../main/resources/mapper/MemoConcernDao.xml | 8 ++ .../resources/mapper/MemoDifficultyDao.xml | 8 ++ .../resources/mapper/MemoWorkDiaryDao.xml | 8 ++ 35 files changed, 2023 insertions(+) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttachmentDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttrDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoConcernDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoDifficultyDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoWorkDiaryDTO.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttachmentController.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttrController.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoConcernController.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoDifficultyController.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoWorkDiaryController.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttachmentDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttrDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoConcernDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoDifficultyDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoWorkDiaryDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttachmentEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttrEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoConcernEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoDifficultyEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoWorkDiaryEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttachmentService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttrService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoConcernService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoDifficultyService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoWorkDiaryService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttachmentServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttrServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoConcernServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoDifficultyServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoWorkDiaryServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttachmentDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttrDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoConcernDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoDifficultyDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoWorkDiaryDao.xml diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttachmentDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttachmentDTO.java new file mode 100644 index 0000000000..d1dec98f34 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttachmentDTO.java @@ -0,0 +1,105 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 备忘录-附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Data +public class MemoAttachmentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * REMIND_MSG.ID + */ + private String remindMsgId; + + /** + * 文件名 + */ + private String fileName; + + /** + * 附件名(uuid随机生成) + */ + private String attachmentName; + + /** + * 文件大小,单位b + */ + private Integer attachmentSize; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 排序字段 + */ + private Integer sort; + + /** + * 删除标记 0:未删除,1:已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttrDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttrDTO.java new file mode 100644 index 0000000000..6f219e43ad --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttrDTO.java @@ -0,0 +1,80 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 备忘录-属性表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Data +public class MemoAttrDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 提醒时间 + */ + private Date remindTime; + + /** + * 业务类型 人员关怀:concern;难点堵点:difficulty;工作日志:work_diary + */ + private String type; + + /** + * 阅读标记1 已读;0未读 + */ + private Integer readFlag; + + /** + * 接收人ID + */ + private String receiver; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoConcernDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoConcernDTO.java new file mode 100644 index 0000000000..500e28d53e --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoConcernDTO.java @@ -0,0 +1,105 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 备忘录-人文关怀 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Data +public class MemoConcernDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识(同memo_attr表Id) + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 关怀类型 + */ + private String concernType; + + /** + * 关怀对象 + */ + private String resiName; + + /** + * 关怀对象电话 + */ + private String phnoe; + + /** + * 关怀对象地址 + */ + private String address; + + /** + * 关怀事项 + */ + private String content; + + /** + * 计划执行时间 + */ + private Date scheduledTime; + + /** + * 实际执行时间 + */ + private Date actualTime; + + /** + * 状态 0未完成 1已完成 + */ + private Integer status; + + /** + * 提醒时间 + */ + private Date remindTime; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 操作人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoDifficultyDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoDifficultyDTO.java new file mode 100644 index 0000000000..6b3008fa42 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoDifficultyDTO.java @@ -0,0 +1,85 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 备忘录-难点读点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Data +public class MemoDifficultyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识(同memo_attr表Id) + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 内容 + */ + private String content; + + /** + * 解决方式 + */ + private String resolveWay; + + /** + * 备注 + */ + private String remark; + + /** + * 计划执行时间 + */ + private Date scheduledTime; + + /** + * 提醒时间 + */ + private Date remindTime; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoWorkDiaryDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoWorkDiaryDTO.java new file mode 100644 index 0000000000..f72cb66a95 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoWorkDiaryDTO.java @@ -0,0 +1,75 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 备忘录-工作日志 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Data +public class MemoWorkDiaryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识(同memo_attr表Id) + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 工作事项 + */ + private String workType; + + /** + * 内容 + */ + private String content; + + /** + * 提醒时间 + */ + private Date remindTime; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttachmentController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttachmentController.java new file mode 100644 index 0000000000..3090cd1ec7 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttachmentController.java @@ -0,0 +1,72 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.MemoAttachmentDTO; +import com.epmet.service.MemoAttachmentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + + +/** + * 备忘录-附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@RestController +@RequestMapping("memoAttachment") +public class MemoAttachmentController { + + @Autowired + private MemoAttachmentService memoAttachmentService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = memoAttachmentService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + MemoAttachmentDTO data = memoAttachmentService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody MemoAttachmentDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + memoAttachmentService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody MemoAttachmentDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + memoAttachmentService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + memoAttachmentService.delete(ids); + return new Result(); + } + + + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttrController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttrController.java new file mode 100644 index 0000000000..c88ccdc7c1 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttrController.java @@ -0,0 +1,72 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.MemoAttrDTO; +import com.epmet.service.MemoAttrService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + + +/** + * 备忘录-属性表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@RestController +@RequestMapping("memoAttr") +public class MemoAttrController { + + @Autowired + private MemoAttrService memoAttrService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = memoAttrService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + MemoAttrDTO data = memoAttrService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody MemoAttrDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + memoAttrService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody MemoAttrDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + memoAttrService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + memoAttrService.delete(ids); + return new Result(); + } + + + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoConcernController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoConcernController.java new file mode 100644 index 0000000000..39d1beb1d4 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoConcernController.java @@ -0,0 +1,72 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.MemoConcernDTO; +import com.epmet.service.MemoConcernService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + + +/** + * 备忘录-人文关怀 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@RestController +@RequestMapping("memoConcern") +public class MemoConcernController { + + @Autowired + private MemoConcernService memoConcernService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = memoConcernService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + MemoConcernDTO data = memoConcernService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody MemoConcernDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + memoConcernService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody MemoConcernDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + memoConcernService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + memoConcernService.delete(ids); + return new Result(); + } + + + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoDifficultyController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoDifficultyController.java new file mode 100644 index 0000000000..c932841cf8 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoDifficultyController.java @@ -0,0 +1,72 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.MemoDifficultyDTO; +import com.epmet.service.MemoDifficultyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + + +/** + * 备忘录-难点读点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@RestController +@RequestMapping("memoDifficulty") +public class MemoDifficultyController { + + @Autowired + private MemoDifficultyService memoDifficultyService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = memoDifficultyService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + MemoDifficultyDTO data = memoDifficultyService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody MemoDifficultyDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + memoDifficultyService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody MemoDifficultyDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + memoDifficultyService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + memoDifficultyService.delete(ids); + return new Result(); + } + + + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoWorkDiaryController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoWorkDiaryController.java new file mode 100644 index 0000000000..43faecbcab --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoWorkDiaryController.java @@ -0,0 +1,72 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.MemoWorkDiaryDTO; +import com.epmet.service.MemoWorkDiaryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + + +/** + * 备忘录-工作日志 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@RestController +@RequestMapping("memoWorkDiary") +public class MemoWorkDiaryController { + + @Autowired + private MemoWorkDiaryService memoWorkDiaryService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = memoWorkDiaryService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + MemoWorkDiaryDTO data = memoWorkDiaryService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody MemoWorkDiaryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + memoWorkDiaryService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody MemoWorkDiaryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + memoWorkDiaryService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + memoWorkDiaryService.delete(ids); + return new Result(); + } + + + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttachmentDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttachmentDao.java new file mode 100644 index 0000000000..941b5d7ca1 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttachmentDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.MemoAttachmentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 备忘录-附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Mapper +public interface MemoAttachmentDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttrDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttrDao.java new file mode 100644 index 0000000000..ad1b4216cc --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttrDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.MemoAttrEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 备忘录-属性表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Mapper +public interface MemoAttrDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoConcernDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoConcernDao.java new file mode 100644 index 0000000000..723dbe4444 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoConcernDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.MemoConcernEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 备忘录-人文关怀 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Mapper +public interface MemoConcernDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoDifficultyDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoDifficultyDao.java new file mode 100644 index 0000000000..8449129bbd --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoDifficultyDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.MemoDifficultyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 备忘录-难点读点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Mapper +public interface MemoDifficultyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoWorkDiaryDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoWorkDiaryDao.java new file mode 100644 index 0000000000..dd27cdd763 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoWorkDiaryDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.MemoWorkDiaryEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 备忘录-工作日志 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Mapper +public interface MemoWorkDiaryDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttachmentEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttachmentEntity.java new file mode 100644 index 0000000000..fcc0c1622d --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttachmentEntity.java @@ -0,0 +1,71 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 备忘录-附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("memo_attachment") +public class MemoAttachmentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * REMIND_MSG.ID + */ + private String remindMsgId; + + /** + * 文件名 + */ + private String fileName; + + /** + * 附件名(uuid随机生成) + */ + private String attachmentName; + + /** + * 文件大小,单位b + */ + private Integer attachmentSize; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 排序字段 + */ + private Integer sort; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttrEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttrEntity.java new file mode 100644 index 0000000000..69a68497ce --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttrEntity.java @@ -0,0 +1,48 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 备忘录-属性表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("memo_attr") +public class MemoAttrEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 提醒时间 + */ + private Date remindTime; + + /** + * 业务类型 人员关怀:concern;难点堵点:difficulty;工作日志:work_diary + */ + private String type; + + /** + * 阅读标记1 已读;0未读 + */ + private Integer readFlag; + + /** + * 接收人ID + */ + private String receiver; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoConcernEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoConcernEntity.java new file mode 100644 index 0000000000..7d62073752 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoConcernEntity.java @@ -0,0 +1,73 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 备忘录-人文关怀 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("memo_concern") +public class MemoConcernEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 关怀类型 + */ + private String concernType; + + /** + * 关怀对象 + */ + private String resiName; + + /** + * 关怀对象电话 + */ + private String phnoe; + + /** + * 关怀对象地址 + */ + private String address; + + /** + * 关怀事项 + */ + private String content; + + /** + * 计划执行时间 + */ + private Date scheduledTime; + + /** + * 实际执行时间 + */ + private Date actualTime; + + /** + * 状态 0未完成 1已完成 + */ + private Integer status; + + /** + * 提醒时间 + */ + private Date remindTime; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoDifficultyEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoDifficultyEntity.java new file mode 100644 index 0000000000..453f2eed09 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoDifficultyEntity.java @@ -0,0 +1,53 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 备忘录-难点读点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("memo_difficulty") +public class MemoDifficultyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 内容 + */ + private String content; + + /** + * 解决方式 + */ + private String resolveWay; + + /** + * 备注 + */ + private String remark; + + /** + * 计划执行时间 + */ + private Date scheduledTime; + + /** + * 提醒时间 + */ + private Date remindTime; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoWorkDiaryEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoWorkDiaryEntity.java new file mode 100644 index 0000000000..2407b046e9 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoWorkDiaryEntity.java @@ -0,0 +1,43 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 备忘录-工作日志 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("memo_work_diary") +public class MemoWorkDiaryEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 工作事项 + */ + private String workType; + + /** + * 内容 + */ + private String content; + + /** + * 提醒时间 + */ + private Date remindTime; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttachmentService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttachmentService.java new file mode 100644 index 0000000000..dde25470fe --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttachmentService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.MemoAttachmentDTO; +import com.epmet.entity.MemoAttachmentEntity; + +import java.util.List; +import java.util.Map; + +/** + * 备忘录-附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +public interface MemoAttachmentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-03-15 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-03-15 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return MemoAttachmentDTO + * @author generator + * @date 2022-03-15 + */ + MemoAttachmentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-15 + */ + void save(MemoAttachmentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-15 + */ + void update(MemoAttachmentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-03-15 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttrService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttrService.java new file mode 100644 index 0000000000..e7d717187d --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttrService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.MemoAttrDTO; +import com.epmet.entity.MemoAttrEntity; + +import java.util.List; +import java.util.Map; + +/** + * 备忘录-属性表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +public interface MemoAttrService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-03-15 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-03-15 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return MemoAttrDTO + * @author generator + * @date 2022-03-15 + */ + MemoAttrDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-15 + */ + void save(MemoAttrDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-15 + */ + void update(MemoAttrDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-03-15 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoConcernService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoConcernService.java new file mode 100644 index 0000000000..f18784a348 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoConcernService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.MemoConcernDTO; +import com.epmet.entity.MemoConcernEntity; + +import java.util.List; +import java.util.Map; + +/** + * 备忘录-人文关怀 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +public interface MemoConcernService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-03-15 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-03-15 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return MemoConcernDTO + * @author generator + * @date 2022-03-15 + */ + MemoConcernDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-15 + */ + void save(MemoConcernDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-15 + */ + void update(MemoConcernDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-03-15 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoDifficultyService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoDifficultyService.java new file mode 100644 index 0000000000..00a825fb23 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoDifficultyService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.MemoDifficultyDTO; +import com.epmet.entity.MemoDifficultyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 备忘录-难点读点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +public interface MemoDifficultyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-03-15 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-03-15 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return MemoDifficultyDTO + * @author generator + * @date 2022-03-15 + */ + MemoDifficultyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-15 + */ + void save(MemoDifficultyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-15 + */ + void update(MemoDifficultyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-03-15 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoWorkDiaryService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoWorkDiaryService.java new file mode 100644 index 0000000000..29d7614886 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoWorkDiaryService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.MemoWorkDiaryDTO; +import com.epmet.entity.MemoWorkDiaryEntity; + +import java.util.List; +import java.util.Map; + +/** + * 备忘录-工作日志 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +public interface MemoWorkDiaryService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-03-15 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-03-15 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return MemoWorkDiaryDTO + * @author generator + * @date 2022-03-15 + */ + MemoWorkDiaryDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-15 + */ + void save(MemoWorkDiaryDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-15 + */ + void update(MemoWorkDiaryDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-03-15 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttachmentServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttachmentServiceImpl.java new file mode 100644 index 0000000000..b670d73537 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttachmentServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.MemoAttachmentDao; +import com.epmet.dto.MemoAttachmentDTO; +import com.epmet.entity.MemoAttachmentEntity; +import com.epmet.service.MemoAttachmentService; +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 generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Service +public class MemoAttachmentServiceImpl extends BaseServiceImpl implements MemoAttachmentService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, MemoAttachmentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, MemoAttachmentDTO.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 MemoAttachmentDTO get(String id) { + MemoAttachmentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, MemoAttachmentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(MemoAttachmentDTO dto) { + MemoAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttachmentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(MemoAttachmentDTO dto) { + MemoAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttachmentEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttrServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttrServiceImpl.java new file mode 100644 index 0000000000..5af16cb67b --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttrServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.MemoAttrDao; +import com.epmet.dto.MemoAttrDTO; +import com.epmet.entity.MemoAttrEntity; +import com.epmet.service.MemoAttrService; +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 generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Service +public class MemoAttrServiceImpl extends BaseServiceImpl implements MemoAttrService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, MemoAttrDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, MemoAttrDTO.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 MemoAttrDTO get(String id) { + MemoAttrEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, MemoAttrDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(MemoAttrDTO dto) { + MemoAttrEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttrEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(MemoAttrDTO dto) { + MemoAttrEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttrEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoConcernServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoConcernServiceImpl.java new file mode 100644 index 0000000000..060ede4916 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoConcernServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.MemoConcernDao; +import com.epmet.dto.MemoConcernDTO; +import com.epmet.entity.MemoConcernEntity; +import com.epmet.service.MemoConcernService; +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 generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Service +public class MemoConcernServiceImpl extends BaseServiceImpl implements MemoConcernService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, MemoConcernDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, MemoConcernDTO.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 MemoConcernDTO get(String id) { + MemoConcernEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, MemoConcernDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(MemoConcernDTO dto) { + MemoConcernEntity entity = ConvertUtils.sourceToTarget(dto, MemoConcernEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(MemoConcernDTO dto) { + MemoConcernEntity entity = ConvertUtils.sourceToTarget(dto, MemoConcernEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoDifficultyServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoDifficultyServiceImpl.java new file mode 100644 index 0000000000..4c40dfc3b1 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoDifficultyServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.MemoDifficultyDao; +import com.epmet.dto.MemoDifficultyDTO; +import com.epmet.entity.MemoDifficultyEntity; +import com.epmet.service.MemoDifficultyService; +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 generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Service +public class MemoDifficultyServiceImpl extends BaseServiceImpl implements MemoDifficultyService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, MemoDifficultyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, MemoDifficultyDTO.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 MemoDifficultyDTO get(String id) { + MemoDifficultyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, MemoDifficultyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(MemoDifficultyDTO dto) { + MemoDifficultyEntity entity = ConvertUtils.sourceToTarget(dto, MemoDifficultyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(MemoDifficultyDTO dto) { + MemoDifficultyEntity entity = ConvertUtils.sourceToTarget(dto, MemoDifficultyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoWorkDiaryServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoWorkDiaryServiceImpl.java new file mode 100644 index 0000000000..f4be3dfd27 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoWorkDiaryServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.MemoWorkDiaryDao; +import com.epmet.dto.MemoWorkDiaryDTO; +import com.epmet.entity.MemoWorkDiaryEntity; +import com.epmet.service.MemoWorkDiaryService; +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 generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Service +public class MemoWorkDiaryServiceImpl extends BaseServiceImpl implements MemoWorkDiaryService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, MemoWorkDiaryDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, MemoWorkDiaryDTO.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 MemoWorkDiaryDTO get(String id) { + MemoWorkDiaryEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, MemoWorkDiaryDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(MemoWorkDiaryDTO dto) { + MemoWorkDiaryEntity entity = ConvertUtils.sourceToTarget(dto, MemoWorkDiaryEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(MemoWorkDiaryDTO dto) { + MemoWorkDiaryEntity entity = ConvertUtils.sourceToTarget(dto, MemoWorkDiaryEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttachmentDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttachmentDao.xml new file mode 100644 index 0000000000..f892f237a5 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttachmentDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttrDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttrDao.xml new file mode 100644 index 0000000000..5c98e2eb58 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttrDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoConcernDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoConcernDao.xml new file mode 100644 index 0000000000..fa6d92a22a --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoConcernDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoDifficultyDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoDifficultyDao.xml new file mode 100644 index 0000000000..42e16012e4 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoDifficultyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoWorkDiaryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoWorkDiaryDao.xml new file mode 100644 index 0000000000..b563021ce0 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoWorkDiaryDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From bed41c106ba6800e5eb94154a7b8e2a83b5f48ff Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 15 Mar 2022 13:50:53 +0800 Subject: [PATCH 14/15] =?UTF-8?q?=E5=85=9A=E7=BE=A4=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DelPartyServiceCenterResultDTO.java | 23 +++++++++ .../IcPartyServiceCenterController.java | 2 +- .../epmet/dao/IcPartyServiceCenterDao.java | 27 ++++++++++ .../impl/IcPartyServiceCenterServiceImpl.java | 51 +++++++++++++++++-- .../mapper/IcPartyServiceCenterDao.xml | 49 ++++++++++++++++++ 5 files changed, 148 insertions(+), 4 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DelPartyServiceCenterResultDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DelPartyServiceCenterResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DelPartyServiceCenterResultDTO.java new file mode 100644 index 0000000000..30f5f9ceb9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DelPartyServiceCenterResultDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/3/15 10:43 上午 + * @DESC + */ +@Data +public class DelPartyServiceCenterResultDTO implements Serializable { + + private static final long serialVersionUID = -2238226229442700788L; + + private String date; + private String matterId; + private String timeId; + private String startTime; + private String endTime; + private String centerName; +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java index a2f71aa778..df9fa9100d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java @@ -84,7 +84,7 @@ public class IcPartyServiceCenterController { return new Result(); } - @DeleteMapping + @PostMapping("del") public Result delete(@RequestBody String[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java index 065dc62906..75f75e87fc 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java @@ -19,12 +19,14 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.result.AllMattersResultDTO; +import com.epmet.dto.result.DelPartyServiceCenterResultDTO; import com.epmet.dto.result.PartyServiceCenterListResultDTO; import com.epmet.entity.IcPartyServiceCenterEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 党群服务中心 @@ -61,4 +63,29 @@ public interface IcPartyServiceCenterDao extends BaseDao getAllMattersByOrgId(@Param("matterIds")List matterIds); + /** + * Desc: 根据党群服务中心查询可预约事项ID + * @param centerIds + * @author zxc + * @date 2022/3/15 9:33 上午 + */ + + List selectMatterByIds(@Param("centerIds")List centerIds); + + /** + * Desc: 根据事项ID查询预约记录 + * @param matterIds + * @author zxc + * @date 2022/3/15 9:46 上午 + */ + List selectAppointmentList(@Param("matterIds")List matterIds); + + /** + * Desc: 删除可预约事项 + * @param centerIds + * @author zxc + * @date 2022/3/15 1:37 下午 + */ + void delMatters(@Param("centerIds")List centerIds); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 8c313c780f..208dde8fc2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -41,7 +41,6 @@ import com.epmet.constant.PartyServiceCenterConstant; import com.epmet.dao.IcMatterAppointmentRecordDao; import com.epmet.dao.IcPartyServiceCenterDao; import com.epmet.dto.IcPartyServiceCenterDTO; -import com.epmet.dto.RegisterRelationDTO; import com.epmet.dto.TimeDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; @@ -63,6 +62,7 @@ import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.*; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; @@ -130,8 +130,53 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl centerIds = Arrays.asList(ids); + List matterIds = baseDao.selectMatterByIds(centerIds); + if (CollectionUtils.isEmpty(matterIds)){ + baseDao.deleteBatchIds(centerIds); + }else { + List appointmentList = baseDao.selectAppointmentList(matterIds); + if (CollectionUtils.isEmpty(appointmentList)){ + baseDao.deleteBatchIds(centerIds); + baseDao.delMatters(centerIds); + }else { + List names = new ArrayList<>(); + Map> groupByMatterId = appointmentList.stream().collect(Collectors.groupingBy(DelPartyServiceCenterResultDTO::getMatterId)); + groupByMatterId.forEach((k,v) -> { + if (getMatterAppointmentList(v)){ + names.add(v.get(0).getCenterName()); + } + }); + if (CollectionUtils.isNotEmpty(names)){ + throw new EpmetException(names.stream().collect(Collectors.joining("、")) + "存在未来时间的预约事项,不允许删除"); + } + baseDao.deleteBatchIds(centerIds); + baseDao.delMatters(centerIds); + } + } + + } + + public boolean getMatterAppointmentList(List list){ + AtomicBoolean result = new AtomicBoolean(false); + if (CollectionUtils.isNotEmpty(list)){ + list.forEach(l -> { + int[] timeIds = Arrays.asList(l.getTimeId().split(",")).stream().mapToInt(m -> Integer.parseInt(m)).toArray(); + List intervalTimeList = getIntervalTimeList(l.getStartTime(), l.getEndTime(), 30); + for (int timeId : timeIds) { + for (int i1 = 0; i1 < intervalTimeList.size(); i1++) { + if (timeId == i1 + 1){ + String date = l.getDate() + " " + intervalTimeList.get(i1) + ":00"; + if (DateUtils.parse(date,DateUtils.DATE_TIME_PATTERN).after(new Date())){ + result.set(true); + return; + } + } + } + } + }); + } + return result.get(); } /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml index f159698f7f..51fa3a720c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml @@ -118,4 +118,53 @@ ) + + + + + + + + + + UPDATE ic_party_service_center_matter + SET del_flag = 1, + UPDATED_TIME = NOW() + WHERE DEL_FLAG = 0 + AND PARTY_SERVICE_CENTER_ID IN ( + + #{centerId} + + ) + + \ No newline at end of file From 44484685d58215c448ef683688072ade59dfc092 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 15 Mar 2022 14:24:13 +0800 Subject: [PATCH 15/15] warn --- .../java/com/epmet/service/impl/StatsResiWarnServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java index 79fbdc4ca3..e7507aeefb 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java @@ -368,7 +368,7 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService { //南宁路社区第二网格亿联小区2号楼失业人员超出预警! BuildingInfoCache infoCache = CustomerIcHouseRedis.getBuildingInfo(dto.getBuildingId()); if (null == infoCache) { - log.error(String.format("获取楼栋信息为null,buildingId=%s", dto.getBuildingId())); + log.warn(String.format("获取楼栋信息为null,buildingId=%s", dto.getBuildingId())); continue; } String categoryName = StringUtils.isBlank(configMap.get(dto.getConfigId())) ? StrConstant.EPMETY_STR : configMap.get(dto.getConfigId());