From 55916816f72ee16f60f131951d49754a204b5f0d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 6 Sep 2021 13:28:57 +0800 Subject: [PATCH 01/43] =?UTF-8?q?=E7=BB=84=E7=BB=87=E7=94=9F=E6=B4=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resi/group/constant/ActConstant.java | 17 ++++ .../act/OrganizationalLifeLineChartDTO.java | 44 ++++++++++ .../act/form/OrganizationalLifeFormDTO.java | 22 +++++ .../result/OrganizationalLifeResultDTO.java | 47 +++++++++++ .../controller/GroupActInfoController.java | 13 +++ .../modules/act/dao/GroupActInfoDao.java | 39 ++++++++- .../act/service/GroupActInfoService.java | 10 +++ .../service/impl/GroupActInfoServiceImpl.java | 84 +++++++++++++++++++ .../resources/mapper/act/GroupActInfoDao.xml | 59 +++++++++++++ 9 files changed, 334 insertions(+), 1 deletion(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/ActConstant.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/OrganizationalLifeLineChartDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/OrganizationalLifeFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/OrganizationalLifeResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/ActConstant.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/ActConstant.java new file mode 100644 index 0000000000..30f06ebaf6 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/ActConstant.java @@ -0,0 +1,17 @@ +package com.epmet.resi.group.constant; + +/** + * @Author zxc + * @DateTime 2021/9/3 4:39 下午 + * @DESC + */ +public interface ActConstant { + + /** + * 类型【组织活动次数:orgAct,应参加活动次数:joinAct,活动签到次数:signAct】 + */ + String ORG_ACT = "orgAct"; + String JOIN_ACT = "joinAct"; + String SIGN_ACT = "signAct"; + +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/OrganizationalLifeLineChartDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/OrganizationalLifeLineChartDTO.java new file mode 100644 index 0000000000..ad5dca0bba --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/OrganizationalLifeLineChartDTO.java @@ -0,0 +1,44 @@ +package com.epmet.resi.group.dto.act; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/9/3 3:35 下午 + * @DESC + */ +@Data +public class OrganizationalLifeLineChartDTO implements Serializable { + + private static final long serialVersionUID = -4224453421929580053L; + + /** + * 月份 + */ + private String month; + + /** + * 组织活动次数 + */ + private Integer organizationalActCount; + + /** + * 应参加活动次数 + */ + private Integer shouldJoinActCount; + + /** + * 活动签到次数 + */ + private Integer actSignCount; + + public OrganizationalLifeLineChartDTO() { + this.month = ""; + this.organizationalActCount = NumConstant.ZERO; + this.shouldJoinActCount = NumConstant.ZERO; + this.actSignCount = NumConstant.ZERO; + } +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/OrganizationalLifeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/OrganizationalLifeFormDTO.java new file mode 100644 index 0000000000..3e515c2c75 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/OrganizationalLifeFormDTO.java @@ -0,0 +1,22 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/9/3 2:52 下午 + * @DESC + */ +@Data +public class OrganizationalLifeFormDTO implements Serializable { + + private static final long serialVersionUID = -8611679719504666547L; + + private String yearId; + + private String userId; + + private String customerId; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/OrganizationalLifeResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/OrganizationalLifeResultDTO.java new file mode 100644 index 0000000000..e68cbd02be --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/OrganizationalLifeResultDTO.java @@ -0,0 +1,47 @@ +package com.epmet.resi.group.dto.act.result; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.resi.group.dto.act.OrganizationalLifeLineChartDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/9/3 2:35 下午 + * @DESC + */ +@Data +public class OrganizationalLifeResultDTO implements Serializable { + + private static final long serialVersionUID = 6991638491754890967L; + + /** + * 组织活动次数 + */ + private Integer organizationalActCount; + + /** + * 应参加活动次数 + */ + private Integer shouldJoinActCount; + + /** + * 活动签到次数 + */ + private Integer actSignCount; + + /** + * 折线图 + */ + private List lineChart; + + public OrganizationalLifeResultDTO() { + this.organizationalActCount = NumConstant.ZERO; + this.shouldJoinActCount = NumConstant.ZERO; + this.actSignCount = NumConstant.ZERO; + this.lineChart = new ArrayList<>(); + } +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index 4a1a973022..34fc73ec23 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -27,6 +27,7 @@ import com.epmet.resi.group.dto.act.GroupActIdDTO; import com.epmet.resi.group.dto.act.form.*; import com.epmet.resi.group.dto.act.result.ActDetailByLinkResultDTO; import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; +import com.epmet.resi.group.dto.act.result.OrganizationalLifeResultDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -153,4 +154,16 @@ public class GroupActInfoController { return new Result(); } + /** + * @Description 组织生活 + * @Param formDTO + * @author zxc + * @date 2021/9/3 2:57 下午 + */ + @PostMapping("organizationallife") + public Result organizationalLife(@LoginUser TokenDto tokenDto, @RequestBody OrganizationalLifeFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + return new Result().ok(groupActInfoService.organizationalLife(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActInfoDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActInfoDao.java index 85f243e608..c4082b67c9 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActInfoDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActInfoDao.java @@ -19,7 +19,13 @@ package com.epmet.modules.act.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.act.entity.GroupActInfoEntity; +import com.epmet.resi.group.dto.act.OrganizationalLifeLineChartDTO; +import com.epmet.resi.group.dto.act.form.OrganizationalLifeFormDTO; +import com.epmet.resi.group.dto.act.result.OrganizationalLifeResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 组织活动信息 @@ -29,5 +35,36 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface GroupActInfoDao extends BaseDao { - + + /** + * @Description 根据人查询支部小组,小组审核状态为 approved 的,小组类型为 branch 的,GROUP_LEADER_FLAG 为 leader 的,人员状态为 approved 的 + * @Param userId + * @Param leaderFlag 是否是组长标志 + * @author zxc + * @date 2021/9/3 3:48 下午 + */ + List selectBranchGroupByUserId(@Param("userId")String userId,@Param("leaderFlag")Boolean leaderFlag); + + /** + * @Description 按照yearId查询组织生活,组织活动次数、应参加活动次数、活动签到次数 + * @Param formDTO + * @Param groupIds + * @Param leaderFlag 是否是组长标志 + * @author zxc + * @date 2021/9/3 4:12 下午 + */ + OrganizationalLifeResultDTO selectOrgLife(@Param("userId")String userId, @Param("groupIds")List groupIds, + @Param("leaderFlag")Boolean leaderFlag,@Param("yearId")String yearId); + + /** + * @Description 组织生活折线图 + * @Param leaderGroupIds + * @Param memberGroupIds + * @Param yearId + * @author zxc + * @date 2021/9/6 10:24 上午 + */ + List selectLineChart(@Param("groupIds") List groupId,@Param("leaderFlag")Boolean leaderFlag, + @Param("yearId")String yearId); + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java index b815bb7358..9ed4a2b015 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java @@ -24,6 +24,7 @@ import com.epmet.resi.group.dto.act.GroupActInfoDTO; import com.epmet.resi.group.dto.act.form.*; import com.epmet.resi.group.dto.act.result.ActDetailByLinkResultDTO; import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; +import com.epmet.resi.group.dto.act.result.OrganizationalLifeResultDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; /** @@ -89,4 +90,13 @@ public interface GroupActInfoService extends BaseService { * @return */ void closeAct(CloseGroupActFormDTO formDTO); + + /** + * @Description 组织生活 + * @Param formDTO + * @author zxc + * @date 2021/9/3 2:57 下午 + */ + OrganizationalLifeResultDTO organizationalLife(OrganizationalLifeFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java index 48334bac4e..41e77cee6a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java @@ -58,9 +58,11 @@ import com.epmet.modules.invitation.service.InvitationRecordService; import com.epmet.modules.member.service.ResiGroupMemberService; import com.epmet.resi.group.dto.act.GroupActIdDTO; import com.epmet.resi.group.dto.act.GroupActInfoDTO; +import com.epmet.resi.group.dto.act.OrganizationalLifeLineChartDTO; import com.epmet.resi.group.dto.act.form.*; import com.epmet.resi.group.dto.act.result.ActDetailByLinkResultDTO; import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; +import com.epmet.resi.group.dto.act.result.OrganizationalLifeResultDTO; import com.epmet.resi.group.dto.group.GroupMessageDTO; import com.epmet.resi.group.dto.group.ResiGroupDTO; import com.epmet.resi.group.dto.invitation.InvitationRecordDTO; @@ -75,6 +77,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import java.time.LocalDate; import java.util.*; import java.util.stream.Collectors; @@ -862,4 +865,85 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl leaderGroupIds = baseDao.selectBranchGroupByUserId(formDTO.getUserId(),true); + List chartResult = new ArrayList<>(); + if (!CollectionUtils.isEmpty(leaderGroupIds)){ + // 按照yearId查询组织生活【我创建的活动】,组织活动次数、应参加活动次数、活动签到次数 + OrganizationalLifeResultDTO dto = baseDao.selectOrgLife(formDTO.getUserId(), leaderGroupIds,true,formDTO.getYearId()); + result.setOrganizationalActCount(dto.getOrganizationalActCount()); + result.setActSignCount(dto.getActSignCount()); + // 当此人是组长,创建了几个活动就应参加几个活动 + result.setShouldJoinActCount(dto.getOrganizationalActCount()); + List chartDTOS = baseDao.selectLineChart(leaderGroupIds, true, formDTO.getYearId()); + if (!CollectionUtils.isEmpty(chartDTOS)){ + chartResult.addAll(chartDTOS); + } + } + // 查询此人不是组长,客户下所有支部小组 + List memberGroupIds = baseDao.selectBranchGroupByUserId(formDTO.getUserId(),false); + if (!CollectionUtils.isEmpty(memberGroupIds)){ + // 按照yearId查询组织生活【我所在支部组的活动】,组织活动次数、应参加活动次数、活动签到次数 + OrganizationalLifeResultDTO dto = baseDao.selectOrgLife(formDTO.getUserId(), memberGroupIds,false, formDTO.getYearId()); + result.setActSignCount(result.getActSignCount() + dto.getActSignCount()); + // 当此人不是组长,支部小组下有几个活动,应参加活动就是几 + result.setShouldJoinActCount(result.getShouldJoinActCount() + dto.getOrganizationalActCount()); + // 此人不是组长,我组织的活动这就不加了 + + List chartDTOS = baseDao.selectLineChart(memberGroupIds, false, formDTO.getYearId()); + if (!CollectionUtils.isEmpty(chartDTOS)){ + chartResult.addAll(chartDTOS); + } + } + // 折线图组装 + List lineChart = lineChart(); + if (!CollectionUtils.isEmpty(chartResult)){ + Map> groupByMonth = chartResult.stream().collect(Collectors.groupingBy(OrganizationalLifeLineChartDTO::getMonth)); + groupByMonth.forEach((month,list) -> { + lineChart.forEach(l -> { + if (month.equals(l.getMonth())){ + l.setOrganizationalActCount(list.stream().collect(Collectors.summingInt(OrganizationalLifeLineChartDTO::getOrganizationalActCount))); + l.setShouldJoinActCount(list.stream().collect(Collectors.summingInt(OrganizationalLifeLineChartDTO::getShouldJoinActCount))); + l.setActSignCount(list.stream().collect(Collectors.summingInt(OrganizationalLifeLineChartDTO::getActSignCount))); + } + }); + }); + } + result.setLineChart(lineChart); + return result; + } + + /** + * @Description 折线图构造 + * @author zxc + * @date 2021/9/6 10:55 上午 + */ + public List lineChart(){ + List lineChart = new ArrayList<>(); + for (int i = NumConstant.ONE; i <= NumConstant.TWELVE; i++) { + OrganizationalLifeLineChartDTO dto = new OrganizationalLifeLineChartDTO(); + if (i < NumConstant.TEN){ + dto.setMonth(NumConstant.ZERO + String.valueOf(i) + "月"); + }else { + dto.setMonth(String.valueOf(i) + "月"); + } + lineChart.add(dto); + } + return lineChart; + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActInfoDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActInfoDao.xml index 70b86b20e5..6ebd2be427 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActInfoDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActInfoDao.xml @@ -3,6 +3,65 @@ + + + + + + \ No newline at end of file From 29256d2d77c1dd4bb7955806c8ea520e38fa1c9a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 6 Sep 2021 14:09:00 +0800 Subject: [PATCH 02/43] =?UTF-8?q?=E7=BE=A4=E7=BB=84=E4=BB=8B=E7=BB=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/dto/group/result/AllGroupListResultDTO.java | 4 ++++ .../group/dto/group/result/RecommendGroupResultDTO.java | 5 +++++ .../group/dto/group/result/RecommendedListResultDTO.java | 5 +++++ .../src/main/resources/mapper/group/ResiGroupDao.xml | 9 ++++++--- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/AllGroupListResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/AllGroupListResultDTO.java index d31e01cab8..3ddbd344d2 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/AllGroupListResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/AllGroupListResultDTO.java @@ -47,4 +47,8 @@ public class AllGroupListResultDTO implements Serializable { */ private String groupType; + /** + * 群介绍 + */ + private String groupIntroduction = ""; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/RecommendGroupResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/RecommendGroupResultDTO.java index 72de523d2a..ff080a5864 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/RecommendGroupResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/RecommendGroupResultDTO.java @@ -48,4 +48,9 @@ public class RecommendGroupResultDTO implements Serializable { */ private String groupType; + /** + * 群介绍 + */ + private String groupIntroduction = ""; + } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/RecommendedListResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/RecommendedListResultDTO.java index 47fbf7d9be..4e9834470a 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/RecommendedListResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/RecommendedListResultDTO.java @@ -37,4 +37,9 @@ public class RecommendedListResultDTO implements Serializable { * 组长名 */ private String leaderName; + + /** + * 群介绍 + */ + private String groupIntroduction = ""; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml index 82d1531781..bf17a2004e 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml @@ -157,7 +157,8 @@ rg.GROUP_NAME AS groupName, rg.GROUP_TYPE AS groupType, rgs.TOTAL_MEMBERS AS totalMember, - rgs.TOTAL_PARTY_MEMBERS AS totalPartyMember + rgs.TOTAL_PARTY_MEMBERS AS totalPartyMember, + rg.GROUP_INTRODUCTION FROM resi_group rg LEFT JOIN resi_group_statistical rgs ON ( rg.id = rgs.RESI_GROUP_ID ) @@ -452,7 +453,8 @@ rg.GROUP_HEAD_PHOTO AS groupHeadPhoto, rg.GROUP_NAME AS groupName, rgs.TOTAL_MEMBERS AS totalMember, - rgs.TOTAL_PARTY_MEMBERS AS totalPartyMember + rgs.TOTAL_PARTY_MEMBERS AS totalPartyMember, + rg.GROUP_INTRODUCTION FROM resi_group rg LEFT JOIN resi_group_statistical rgs ON ( rg.id = rgs.RESI_GROUP_ID ) @@ -647,7 +649,8 @@ rg.group_name AS groupName, rg.group_type AS groupType, rgs.total_members AS totalMember, - rgs.total_party_members AS totalPartyMember + rgs.total_party_members AS totalPartyMember, + rg.GROUP_INTRODUCTION FROM resi_group rg LEFT JOIN resi_group_statistical rgs ON (rg.id = rgs.resi_group_id) From da4abdd281b268f87edb0ed75b013d2138220090 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 6 Sep 2021 16:08:42 +0800 Subject: [PATCH 03/43] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E4=B8=8B=E5=85=9A=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/ResiPartyMemberOpenFeignClient.java | 10 ++++++++++ .../ResiPartyMemberOpenFeignClientFallback.java | 5 +++++ .../controller/PartymemberInfoController.java | 11 +++++++++++ .../modules/partymember/dao/PartymemberInfoDao.java | 8 ++++++++ .../partymember/service/PartymemberInfoService.java | 8 ++++++++ .../service/impl/PartymemberInfoServiceImpl.java | 11 +++++++++++ .../mapper/partymember/PartymemberInfoDao.xml | 11 +++++++++++ 7 files changed, 64 insertions(+) diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java index 0eb5f2f018..0f320cf9be 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java @@ -95,4 +95,14 @@ public interface ResiPartyMemberOpenFeignClient { **/ @PostMapping(value = "/resi/partymember/partymemberinfo/getPartymemberInfoByGridId", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) Result> getPartymemberInfoByGridId(@RequestBody List gridIdList); + + /** + * @Description 根据客户ID查询党员 + * @Param customerId + * @author zxc + * @date 2021/9/6 3:54 下午 + */ + @PostMapping(value = "/resi/partymember/partymemberinfo/getpartymemberinfobycustomerid") + Result> getPartyMemberInfoByCustomerId(@RequestParam("customerId")String customerId); + } diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java index 9591f35234..953d5ca326 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java @@ -64,4 +64,9 @@ public class ResiPartyMemberOpenFeignClientFallback implements ResiPartyMemberOp public Result> getPartymemberInfoByGridId(List gridIdList) { return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "getPartymemberInfoByGridId", gridIdList); } + + @Override + public Result> getPartyMemberInfoByCustomerId(String customerId) { + return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "getPartyMemberInfoByCustomerId", customerId); + } } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberInfoController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberInfoController.java index 5d7d081e13..98b56b8475 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberInfoController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberInfoController.java @@ -157,4 +157,15 @@ public class PartymemberInfoController { List list = partymemberInfoService.listPartymemberInfoByGridId(gridIdList); return new Result>().ok(list); } + + /** + * @Description 根据客户ID查询党员 + * @Param customerId + * @author zxc + * @date 2021/9/6 3:54 下午 + */ + @PostMapping("getpartymemberinfobycustomerid") + public Result> getPartyMemberInfoByCustomerId(@RequestParam("customerId")String customerId){ + return new Result>().ok(partymemberInfoService.getPartyMemberInfoByCustomerId(customerId)); + } } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java index f395beac8b..c363cd42a0 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java @@ -95,4 +95,12 @@ public interface PartymemberInfoDao extends BaseDao { * @Date 2020/7/22 12:14 **/ List selectListPartymemberInfoByGridId(@Param("gridIdList") List gridIdList); + + /** + * @Description 根据客户ID查询党员 + * @Param customerId + * @author zxc + * @date 2021/9/6 3:54 下午 + */ + List selectListPartyMemberInfoByCustomerId(@Param("customerId") String customerId); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberInfoService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberInfoService.java index 4a25939dad..eed9482da3 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberInfoService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberInfoService.java @@ -170,4 +170,12 @@ public interface PartymemberInfoService extends BaseService getPartyMemberInfoByCustomerId(String customerId); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java index 57e6a2922c..dfb4c42f71 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java @@ -248,4 +248,15 @@ public class PartymemberInfoServiceImpl extends BaseServiceImpl getPartyMemberInfoByCustomerId(String customerId) { + return baseDao.selectListPartyMemberInfoByCustomerId(customerId); + } } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml index 876e1102f0..d6585f8dfb 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml @@ -169,4 +169,15 @@ + + + From f86ea8eae01165c09e861c61585a9f02d1ff6998 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 6 Sep 2021 17:17:02 +0800 Subject: [PATCH 04/43] =?UTF-8?q?=E5=8A=9E=E4=BA=8B=E6=8C=87=E5=8D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/GuideAttachmentDTO.java | 117 ++++++++++++++++++ .../java/com/epmet/dto/GuideCategoryDTO.java | 91 ++++++++++++++ .../epmet/dto/GuideCategoryDefaultDTO.java | 86 +++++++++++++ .../com/epmet/dto/GuideCollectionDTO.java | 91 ++++++++++++++ .../src/main/java/com/epmet/dto/GuideDTO.java | 101 +++++++++++++++ .../com/epmet/dto/GuideExternalLinkDTO.java | 91 ++++++++++++++ .../java/com/epmet/dto/GuideModuleDTO.java | 91 ++++++++++++++ .../com/epmet/dto/GuideModuleDictDTO.java | 96 ++++++++++++++ .../epmet/dto/GuideModuleDictDefaultDTO.java | 91 ++++++++++++++ .../controller/GuideCategoryController.java | 84 +++++++++++++ .../controller/GuideCollectionController.java | 84 +++++++++++++ .../com/epmet/controller/GuideController.java | 84 +++++++++++++ .../controller/GuideModuleController.java | 84 +++++++++++++ .../controller/GuideModuleDictController.java | 84 +++++++++++++ .../com/epmet/dao/GuideAttachmentDao.java | 33 +++++ .../java/com/epmet/dao/GuideCategoryDao.java | 33 +++++ .../epmet/dao/GuideCategoryDefaultDao.java | 33 +++++ .../com/epmet/dao/GuideCollectionDao.java | 33 +++++ .../src/main/java/com/epmet/dao/GuideDao.java | 33 +++++ .../com/epmet/dao/GuideExternalLinkDao.java | 33 +++++ .../java/com/epmet/dao/GuideModuleDao.java | 33 +++++ .../com/epmet/dao/GuideModuleDictDao.java | 33 +++++ .../epmet/dao/GuideModuleDictDefaultDao.java | 33 +++++ .../epmet/entity/GuideAttachmentEntity.java | 83 +++++++++++++ .../entity/GuideCategoryDefaultEntity.java | 56 +++++++++ .../com/epmet/entity/GuideCategoryEntity.java | 61 +++++++++ .../epmet/entity/GuideCollectionEntity.java | 61 +++++++++ .../java/com/epmet/entity/GuideEntity.java | 71 +++++++++++ .../epmet/entity/GuideExternalLinkEntity.java | 61 +++++++++ .../entity/GuideModuleDictDefaultEntity.java | 61 +++++++++ .../epmet/entity/GuideModuleDictEntity.java | 66 ++++++++++ .../com/epmet/entity/GuideModuleEntity.java | 61 +++++++++ .../epmet/service/GuideAttachmentService.java | 95 ++++++++++++++ .../service/GuideCategoryDefaultService.java | 95 ++++++++++++++ .../epmet/service/GuideCategoryService.java | 95 ++++++++++++++ .../epmet/service/GuideCollectionService.java | 95 ++++++++++++++ .../service/GuideExternalLinkService.java | 95 ++++++++++++++ .../GuideModuleDictDefaultService.java | 95 ++++++++++++++ .../epmet/service/GuideModuleDictService.java | 95 ++++++++++++++ .../com/epmet/service/GuideModuleService.java | 95 ++++++++++++++ .../java/com/epmet/service/GuideService.java | 95 ++++++++++++++ .../impl/GuideAttachmentServiceImpl.java | 100 +++++++++++++++ .../impl/GuideCategoryDefaultServiceImpl.java | 100 +++++++++++++++ .../impl/GuideCategoryServiceImpl.java | 100 +++++++++++++++ .../impl/GuideCollectionServiceImpl.java | 100 +++++++++++++++ .../impl/GuideExternalLinkServiceImpl.java | 100 +++++++++++++++ .../GuideModuleDictDefaultServiceImpl.java | 100 +++++++++++++++ .../impl/GuideModuleDictServiceImpl.java | 100 +++++++++++++++ .../service/impl/GuideModuleServiceImpl.java | 100 +++++++++++++++ .../epmet/service/impl/GuideServiceImpl.java | 100 +++++++++++++++ .../resources/mapper/GuideAttachmentDao.xml | 26 ++++ .../resources/mapper/GuideCategoryDao.xml | 21 ++++ .../mapper/GuideCategoryDefaultDao.xml | 20 +++ .../resources/mapper/GuideCollectionDao.xml | 21 ++++ .../src/main/resources/mapper/GuideDao.xml | 23 ++++ .../resources/mapper/GuideExternalLinkDao.xml | 21 ++++ .../main/resources/mapper/GuideModuleDao.xml | 21 ++++ .../resources/mapper/GuideModuleDictDao.xml | 22 ++++ .../mapper/GuideModuleDictDefaultDao.xml | 21 ++++ 59 files changed, 4104 insertions(+) create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideAttachmentDTO.java create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDTO.java create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDefaultDTO.java create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCollectionDTO.java create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideDTO.java create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideExternalLinkDTO.java create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDTO.java create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDTO.java create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDefaultDTO.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCollectionController.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleController.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleDictController.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideAttachmentDao.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDefaultDao.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCollectionDao.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideDao.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideExternalLinkDao.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDao.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDao.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDefaultDao.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideAttachmentEntity.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryDefaultEntity.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryEntity.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCollectionEntity.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideEntity.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideExternalLinkEntity.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictDefaultEntity.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictEntity.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleEntity.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideAttachmentService.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryDefaultService.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideExternalLinkService.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictDefaultService.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictService.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleService.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideService.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideAttachmentServiceImpl.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryDefaultServiceImpl.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideExternalLinkServiceImpl.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictDefaultServiceImpl.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictServiceImpl.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleServiceImpl.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideAttachmentDao.xml create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDefaultDao.xml create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCollectionDao.xml create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideExternalLinkDao.xml create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDao.xml create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDictDao.xml create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDictDefaultDao.xml diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideAttachmentDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideAttachmentDTO.java new file mode 100644 index 0000000000..212e9bc369 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideAttachmentDTO.java @@ -0,0 +1,117 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 办事指南附件 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Data +public class GuideAttachmentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 办事指南ID + */ + private String guideId; + + /** + * 附件名 + */ + private String attachmentName; + + /** + * 文件大小 单位byte + */ + private Integer attachmentSize; + + /** + * 文件格式 word、excel、pdf + */ + private String attachmentFormat; + + /** + * 类型 + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 排序 + */ + private Integer sort; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer 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-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDTO.java new file mode 100644 index 0000000000..ccd59bc862 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDTO.java @@ -0,0 +1,91 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 指南分类 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Data +public class GuideCategoryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 分类名 + */ + private String categoryName; + + /** + * 排序 + */ + private Integer sort; + + /** + * 状态 禁用disable 启用enable + */ + private String status; + + /** + * 删除标识 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-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDefaultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDefaultDTO.java new file mode 100644 index 0000000000..3d7080d2ff --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDefaultDTO.java @@ -0,0 +1,86 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 指南默认分类 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Data +public class GuideCategoryDefaultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 分类名 + */ + private String categoryName; + + /** + * 排序 + */ + private Integer sort; + + /** + * 状态 禁用disable 启用enable + */ + private String status; + + /** + * 删除标识 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-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCollectionDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCollectionDTO.java new file mode 100644 index 0000000000..6b9dbfaeee --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCollectionDTO.java @@ -0,0 +1,91 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 指南收藏表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Data +public class GuideCollectionDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 指南ID + */ + private String guideId; + + /** + * 用户ID + */ + private String userId; + + /** + * 用户所属客户端 居民端resi 工作端gov + */ + private String app; + + /** + * 删除标识 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-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideDTO.java new file mode 100644 index 0000000000..9d5377c34d --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideDTO.java @@ -0,0 +1,101 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 办事指南表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Data +public class GuideDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 唯一标识 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 发布单位ID + */ + private String agencyId; + + /** + * 所属组织机构ID(customer_agency.id) + */ + private String pid; + + /** + * 所有上级组织ID,英文:隔开 + */ + private String pids; + + /** + * 标题 + */ + private String title; + + /** + * 分类ID + */ + private String categoryId; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer 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-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideExternalLinkDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideExternalLinkDTO.java new file mode 100644 index 0000000000..3cbc69462e --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideExternalLinkDTO.java @@ -0,0 +1,91 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 指南外链表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Data +public class GuideExternalLinkDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 指南ID + */ + private String guideId; + + /** + * 链接说明 + */ + private String description; + + /** + * 外部链接 + */ + private String externalLink; + + /** + * 删除标识 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-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDTO.java new file mode 100644 index 0000000000..40e4fed74e --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDTO.java @@ -0,0 +1,91 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 指南模块关联表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Data +public class GuideModuleDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 指南ID + */ + private String guideId; + + /** + * 模块ID + */ + private String moduleId; + + /** + * + */ + private String moduleContent; + + /** + * 删除标识 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-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDTO.java new file mode 100644 index 0000000000..938e7b211a --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDTO.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 指南模块字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Data +public class GuideModuleDictDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 模块key + */ + private String moduleValue; + + /** + * 模块名 + */ + private String moduleName; + + /** + * 排序 + */ + private Integer sort; + + /** + * 状态 禁用disable 启用enable + */ + private String status; + + /** + * 删除标识 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-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDefaultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDefaultDTO.java new file mode 100644 index 0000000000..6c59d906f9 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDefaultDTO.java @@ -0,0 +1,91 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 指南模块默认字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Data +public class GuideModuleDictDefaultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 模块key + */ + private String moduleValue; + + /** + * 模块名 + */ + private String moduleName; + + /** + * 排序 + */ + private Integer sort; + + /** + * 状态 禁用disable 启用enable + */ + private String status; + + /** + * 删除标识 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-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java new file mode 100644 index 0000000000..03bd231c0b --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java @@ -0,0 +1,84 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.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.GuideCategoryDTO; +import com.epmet.service.GuideCategoryService; +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 2021-09-06 + */ +@RestController +@RequestMapping("guidecategory") +public class GuideCategoryController { + + @Autowired + private GuideCategoryService guideCategoryService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = guideCategoryService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + GuideCategoryDTO data = guideCategoryService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody GuideCategoryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + guideCategoryService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody GuideCategoryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + guideCategoryService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + guideCategoryService.delete(ids); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCollectionController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCollectionController.java new file mode 100644 index 0000000000..08f94a4126 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCollectionController.java @@ -0,0 +1,84 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.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.GuideCollectionDTO; +import com.epmet.service.GuideCollectionService; +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 2021-09-06 + */ +@RestController +@RequestMapping("guidecollection") +public class GuideCollectionController { + + @Autowired + private GuideCollectionService guideCollectionService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = guideCollectionService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + GuideCollectionDTO data = guideCollectionService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody GuideCollectionDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + guideCollectionService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody GuideCollectionDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + guideCollectionService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + guideCollectionService.delete(ids); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java new file mode 100644 index 0000000000..d484148233 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java @@ -0,0 +1,84 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.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.GuideDTO; +import com.epmet.service.GuideService; +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 2021-09-06 + */ +@RestController +@RequestMapping("guide") +public class GuideController { + + @Autowired + private GuideService guideService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = guideService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + GuideDTO data = guideService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody GuideDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + guideService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody GuideDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + guideService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + guideService.delete(ids); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleController.java new file mode 100644 index 0000000000..c1823c7684 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleController.java @@ -0,0 +1,84 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.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.GuideModuleDTO; +import com.epmet.service.GuideModuleService; +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 2021-09-06 + */ +@RestController +@RequestMapping("guidemodule") +public class GuideModuleController { + + @Autowired + private GuideModuleService guideModuleService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = guideModuleService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + GuideModuleDTO data = guideModuleService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody GuideModuleDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + guideModuleService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody GuideModuleDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + guideModuleService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + guideModuleService.delete(ids); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleDictController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleDictController.java new file mode 100644 index 0000000000..a8a59b6b8b --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleDictController.java @@ -0,0 +1,84 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.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.GuideModuleDictDTO; +import com.epmet.service.GuideModuleDictService; +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 2021-09-06 + */ +@RestController +@RequestMapping("guidemoduledict") +public class GuideModuleDictController { + + @Autowired + private GuideModuleDictService guideModuleDictService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = guideModuleDictService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + GuideModuleDictDTO data = guideModuleDictService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody GuideModuleDictDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + guideModuleDictService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody GuideModuleDictDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + guideModuleDictService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + guideModuleDictService.delete(ids); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideAttachmentDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideAttachmentDao.java new file mode 100644 index 0000000000..01e5baddd7 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideAttachmentDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.GuideAttachmentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 办事指南附件 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Mapper +public interface GuideAttachmentDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java new file mode 100644 index 0000000000..a6b9a24cc8 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.GuideCategoryEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 指南分类 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Mapper +public interface GuideCategoryDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDefaultDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDefaultDao.java new file mode 100644 index 0000000000..3c3b31a12b --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDefaultDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.GuideCategoryDefaultEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 指南默认分类 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Mapper +public interface GuideCategoryDefaultDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCollectionDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCollectionDao.java new file mode 100644 index 0000000000..905dfb9f3e --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCollectionDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.GuideCollectionEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 指南收藏表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Mapper +public interface GuideCollectionDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideDao.java new file mode 100644 index 0000000000..cc5039c8d4 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.GuideEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 办事指南表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Mapper +public interface GuideDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideExternalLinkDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideExternalLinkDao.java new file mode 100644 index 0000000000..f766b71680 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideExternalLinkDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.GuideExternalLinkEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 指南外链表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Mapper +public interface GuideExternalLinkDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDao.java new file mode 100644 index 0000000000..d77324965b --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.GuideModuleEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 指南模块关联表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Mapper +public interface GuideModuleDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDao.java new file mode 100644 index 0000000000..8af7910511 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.GuideModuleDictEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 指南模块字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Mapper +public interface GuideModuleDictDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDefaultDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDefaultDao.java new file mode 100644 index 0000000000..071c7ed2c1 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDefaultDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.GuideModuleDictDefaultEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 指南模块默认字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Mapper +public interface GuideModuleDictDefaultDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideAttachmentEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideAttachmentEntity.java new file mode 100644 index 0000000000..192f52b306 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideAttachmentEntity.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 办事指南附件 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("guide_attachment") +public class GuideAttachmentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 办事指南ID + */ + private String guideId; + + /** + * 附件名 + */ + private String attachmentName; + + /** + * 文件大小 单位byte + */ + private Integer attachmentSize; + + /** + * 文件格式 word、excel、pdf + */ + private String attachmentFormat; + + /** + * 类型 + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryDefaultEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryDefaultEntity.java new file mode 100644 index 0000000000..bb6056e549 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryDefaultEntity.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.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 2021-09-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("guide_category_default") +public class GuideCategoryDefaultEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 分类名 + */ + private String categoryName; + + /** + * 排序 + */ + private Integer sort; + + /** + * 状态 禁用disable 启用enable + */ + private String status; + +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryEntity.java new file mode 100644 index 0000000000..8231f9d5ef --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryEntity.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +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 2021-09-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("guide_category") +public class GuideCategoryEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 分类名 + */ + private String categoryName; + + /** + * 排序 + */ + private Integer sort; + + /** + * 状态 禁用disable 启用enable + */ + private String status; + +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCollectionEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCollectionEntity.java new file mode 100644 index 0000000000..f522884f79 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCollectionEntity.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +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 2021-09-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("guide_collection") +public class GuideCollectionEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 指南ID + */ + private String guideId; + + /** + * 用户ID + */ + private String userId; + + /** + * 用户所属客户端 居民端resi 工作端gov + */ + private String app; + +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideEntity.java new file mode 100644 index 0000000000..f135e3f676 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideEntity.java @@ -0,0 +1,71 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 办事指南表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("guide") +public class GuideEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 发布单位ID + */ + private String agencyId; + + /** + * 所属组织机构ID(customer_agency.id) + */ + private String pid; + + /** + * 所有上级组织ID,英文:隔开 + */ + private String pids; + + /** + * 标题 + */ + private String title; + + /** + * 分类ID + */ + private String categoryId; + +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideExternalLinkEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideExternalLinkEntity.java new file mode 100644 index 0000000000..4113a168c5 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideExternalLinkEntity.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +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 2021-09-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("guide_external_link") +public class GuideExternalLinkEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 指南ID + */ + private String guideId; + + /** + * 链接说明 + */ + private String description; + + /** + * 外部链接 + */ + private String externalLink; + +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictDefaultEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictDefaultEntity.java new file mode 100644 index 0000000000..f01788acdc --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictDefaultEntity.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +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 2021-09-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("guide_module_dict_default") +public class GuideModuleDictDefaultEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 模块key + */ + private String moduleValue; + + /** + * 模块名 + */ + private String moduleName; + + /** + * 排序 + */ + private Integer sort; + + /** + * 状态 禁用disable 启用enable + */ + private String status; + +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictEntity.java new file mode 100644 index 0000000000..2816effef0 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictEntity.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 指南模块字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("guide_module_dict") +public class GuideModuleDictEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 模块key + */ + private String moduleValue; + + /** + * 模块名 + */ + private String moduleName; + + /** + * 排序 + */ + private Integer sort; + + /** + * 状态 禁用disable 启用enable + */ + private String status; + +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleEntity.java new file mode 100644 index 0000000000..35d602602e --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleEntity.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +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 2021-09-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("guide_module") +public class GuideModuleEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 指南ID + */ + private String guideId; + + /** + * 模块ID + */ + private String moduleId; + + /** + * + */ + private String moduleContent; + +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideAttachmentService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideAttachmentService.java new file mode 100644 index 0000000000..0c56c55e62 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideAttachmentService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.GuideAttachmentDTO; +import com.epmet.entity.GuideAttachmentEntity; + +import java.util.List; +import java.util.Map; + +/** + * 办事指南附件 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +public interface GuideAttachmentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-09-06 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-09-06 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GuideAttachmentDTO + * @author generator + * @date 2021-09-06 + */ + GuideAttachmentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void save(GuideAttachmentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void update(GuideAttachmentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-09-06 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryDefaultService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryDefaultService.java new file mode 100644 index 0000000000..f7b73ceae8 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryDefaultService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.GuideCategoryDefaultDTO; +import com.epmet.entity.GuideCategoryDefaultEntity; + +import java.util.List; +import java.util.Map; + +/** + * 指南默认分类 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +public interface GuideCategoryDefaultService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-09-06 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-09-06 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GuideCategoryDefaultDTO + * @author generator + * @date 2021-09-06 + */ + GuideCategoryDefaultDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void save(GuideCategoryDefaultDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void update(GuideCategoryDefaultDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-09-06 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java new file mode 100644 index 0000000000..84f995d0fd --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.GuideCategoryDTO; +import com.epmet.entity.GuideCategoryEntity; + +import java.util.List; +import java.util.Map; + +/** + * 指南分类 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +public interface GuideCategoryService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-09-06 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-09-06 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GuideCategoryDTO + * @author generator + * @date 2021-09-06 + */ + GuideCategoryDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void save(GuideCategoryDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void update(GuideCategoryDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-09-06 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java new file mode 100644 index 0000000000..6e8266c556 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.GuideCollectionDTO; +import com.epmet.entity.GuideCollectionEntity; + +import java.util.List; +import java.util.Map; + +/** + * 指南收藏表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +public interface GuideCollectionService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-09-06 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-09-06 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GuideCollectionDTO + * @author generator + * @date 2021-09-06 + */ + GuideCollectionDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void save(GuideCollectionDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void update(GuideCollectionDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-09-06 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideExternalLinkService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideExternalLinkService.java new file mode 100644 index 0000000000..fcb7cc5b65 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideExternalLinkService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.GuideExternalLinkDTO; +import com.epmet.entity.GuideExternalLinkEntity; + +import java.util.List; +import java.util.Map; + +/** + * 指南外链表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +public interface GuideExternalLinkService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-09-06 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-09-06 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GuideExternalLinkDTO + * @author generator + * @date 2021-09-06 + */ + GuideExternalLinkDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void save(GuideExternalLinkDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void update(GuideExternalLinkDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-09-06 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictDefaultService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictDefaultService.java new file mode 100644 index 0000000000..1af3f23de9 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictDefaultService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.GuideModuleDictDefaultDTO; +import com.epmet.entity.GuideModuleDictDefaultEntity; + +import java.util.List; +import java.util.Map; + +/** + * 指南模块默认字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +public interface GuideModuleDictDefaultService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-09-06 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-09-06 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GuideModuleDictDefaultDTO + * @author generator + * @date 2021-09-06 + */ + GuideModuleDictDefaultDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void save(GuideModuleDictDefaultDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void update(GuideModuleDictDefaultDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-09-06 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictService.java new file mode 100644 index 0000000000..50ea1e80e0 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.GuideModuleDictDTO; +import com.epmet.entity.GuideModuleDictEntity; + +import java.util.List; +import java.util.Map; + +/** + * 指南模块字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +public interface GuideModuleDictService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-09-06 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-09-06 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GuideModuleDictDTO + * @author generator + * @date 2021-09-06 + */ + GuideModuleDictDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void save(GuideModuleDictDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void update(GuideModuleDictDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-09-06 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleService.java new file mode 100644 index 0000000000..e03d399b5c --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.GuideModuleDTO; +import com.epmet.entity.GuideModuleEntity; + +import java.util.List; +import java.util.Map; + +/** + * 指南模块关联表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +public interface GuideModuleService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-09-06 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-09-06 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GuideModuleDTO + * @author generator + * @date 2021-09-06 + */ + GuideModuleDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void save(GuideModuleDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void update(GuideModuleDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-09-06 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideService.java new file mode 100644 index 0000000000..415a968d01 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.GuideDTO; +import com.epmet.entity.GuideEntity; + +import java.util.List; +import java.util.Map; + +/** + * 办事指南表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-09-06 + */ +public interface GuideService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-09-06 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-09-06 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GuideDTO + * @author generator + * @date 2021-09-06 + */ + GuideDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void save(GuideDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-06 + */ + void update(GuideDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-09-06 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideAttachmentServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideAttachmentServiceImpl.java new file mode 100644 index 0000000000..2f66e4b70e --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideAttachmentServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.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.GuideAttachmentDao; +import com.epmet.dto.GuideAttachmentDTO; +import com.epmet.entity.GuideAttachmentEntity; +import com.epmet.service.GuideAttachmentService; +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 2021-09-06 + */ +@Service +public class GuideAttachmentServiceImpl extends BaseServiceImpl implements GuideAttachmentService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GuideAttachmentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GuideAttachmentDTO.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 GuideAttachmentDTO get(String id) { + GuideAttachmentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GuideAttachmentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GuideAttachmentDTO dto) { + GuideAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, GuideAttachmentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GuideAttachmentDTO dto) { + GuideAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, GuideAttachmentEntity.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-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryDefaultServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryDefaultServiceImpl.java new file mode 100644 index 0000000000..4fba3fa9ec --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryDefaultServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.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.GuideCategoryDefaultDao; +import com.epmet.dto.GuideCategoryDefaultDTO; +import com.epmet.entity.GuideCategoryDefaultEntity; +import com.epmet.service.GuideCategoryDefaultService; +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 2021-09-06 + */ +@Service +public class GuideCategoryDefaultServiceImpl extends BaseServiceImpl implements GuideCategoryDefaultService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GuideCategoryDefaultDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GuideCategoryDefaultDTO.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 GuideCategoryDefaultDTO get(String id) { + GuideCategoryDefaultEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GuideCategoryDefaultDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GuideCategoryDefaultDTO dto) { + GuideCategoryDefaultEntity entity = ConvertUtils.sourceToTarget(dto, GuideCategoryDefaultEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GuideCategoryDefaultDTO dto) { + GuideCategoryDefaultEntity entity = ConvertUtils.sourceToTarget(dto, GuideCategoryDefaultEntity.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-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java new file mode 100644 index 0000000000..502f18571a --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.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.GuideCategoryDao; +import com.epmet.dto.GuideCategoryDTO; +import com.epmet.entity.GuideCategoryEntity; +import com.epmet.service.GuideCategoryService; +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 2021-09-06 + */ +@Service +public class GuideCategoryServiceImpl extends BaseServiceImpl implements GuideCategoryService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GuideCategoryDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GuideCategoryDTO.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 GuideCategoryDTO get(String id) { + GuideCategoryEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GuideCategoryDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GuideCategoryDTO dto) { + GuideCategoryEntity entity = ConvertUtils.sourceToTarget(dto, GuideCategoryEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GuideCategoryDTO dto) { + GuideCategoryEntity entity = ConvertUtils.sourceToTarget(dto, GuideCategoryEntity.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-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java new file mode 100644 index 0000000000..a73d8228ee --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.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.GuideCollectionDao; +import com.epmet.dto.GuideCollectionDTO; +import com.epmet.entity.GuideCollectionEntity; +import com.epmet.service.GuideCollectionService; +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 2021-09-06 + */ +@Service +public class GuideCollectionServiceImpl extends BaseServiceImpl implements GuideCollectionService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GuideCollectionDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GuideCollectionDTO.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 GuideCollectionDTO get(String id) { + GuideCollectionEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GuideCollectionDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GuideCollectionDTO dto) { + GuideCollectionEntity entity = ConvertUtils.sourceToTarget(dto, GuideCollectionEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GuideCollectionDTO dto) { + GuideCollectionEntity entity = ConvertUtils.sourceToTarget(dto, GuideCollectionEntity.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-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideExternalLinkServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideExternalLinkServiceImpl.java new file mode 100644 index 0000000000..a9f080965e --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideExternalLinkServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.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.GuideExternalLinkDao; +import com.epmet.dto.GuideExternalLinkDTO; +import com.epmet.entity.GuideExternalLinkEntity; +import com.epmet.service.GuideExternalLinkService; +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 2021-09-06 + */ +@Service +public class GuideExternalLinkServiceImpl extends BaseServiceImpl implements GuideExternalLinkService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GuideExternalLinkDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GuideExternalLinkDTO.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 GuideExternalLinkDTO get(String id) { + GuideExternalLinkEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GuideExternalLinkDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GuideExternalLinkDTO dto) { + GuideExternalLinkEntity entity = ConvertUtils.sourceToTarget(dto, GuideExternalLinkEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GuideExternalLinkDTO dto) { + GuideExternalLinkEntity entity = ConvertUtils.sourceToTarget(dto, GuideExternalLinkEntity.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-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictDefaultServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictDefaultServiceImpl.java new file mode 100644 index 0000000000..6be5e56dc4 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictDefaultServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.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.GuideModuleDictDefaultDao; +import com.epmet.dto.GuideModuleDictDefaultDTO; +import com.epmet.entity.GuideModuleDictDefaultEntity; +import com.epmet.service.GuideModuleDictDefaultService; +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 2021-09-06 + */ +@Service +public class GuideModuleDictDefaultServiceImpl extends BaseServiceImpl implements GuideModuleDictDefaultService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GuideModuleDictDefaultDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GuideModuleDictDefaultDTO.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 GuideModuleDictDefaultDTO get(String id) { + GuideModuleDictDefaultEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GuideModuleDictDefaultDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GuideModuleDictDefaultDTO dto) { + GuideModuleDictDefaultEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleDictDefaultEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GuideModuleDictDefaultDTO dto) { + GuideModuleDictDefaultEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleDictDefaultEntity.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-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictServiceImpl.java new file mode 100644 index 0000000000..c758eebdad --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.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.GuideModuleDictDao; +import com.epmet.dto.GuideModuleDictDTO; +import com.epmet.entity.GuideModuleDictEntity; +import com.epmet.service.GuideModuleDictService; +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 2021-09-06 + */ +@Service +public class GuideModuleDictServiceImpl extends BaseServiceImpl implements GuideModuleDictService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GuideModuleDictDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GuideModuleDictDTO.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 GuideModuleDictDTO get(String id) { + GuideModuleDictEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GuideModuleDictDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GuideModuleDictDTO dto) { + GuideModuleDictEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleDictEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GuideModuleDictDTO dto) { + GuideModuleDictEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleDictEntity.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-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleServiceImpl.java new file mode 100644 index 0000000000..ce07f2e233 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.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.GuideModuleDao; +import com.epmet.dto.GuideModuleDTO; +import com.epmet.entity.GuideModuleEntity; +import com.epmet.service.GuideModuleService; +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 2021-09-06 + */ +@Service +public class GuideModuleServiceImpl extends BaseServiceImpl implements GuideModuleService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GuideModuleDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GuideModuleDTO.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 GuideModuleDTO get(String id) { + GuideModuleEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GuideModuleDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GuideModuleDTO dto) { + GuideModuleEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GuideModuleDTO dto) { + GuideModuleEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleEntity.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-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java new file mode 100644 index 0000000000..5ac7a56e3e --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.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.GuideDao; +import com.epmet.dto.GuideDTO; +import com.epmet.entity.GuideEntity; +import com.epmet.service.GuideService; +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 2021-09-06 + */ +@Service +public class GuideServiceImpl extends BaseServiceImpl implements GuideService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GuideDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GuideDTO.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 GuideDTO get(String id) { + GuideEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GuideDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GuideDTO dto) { + GuideEntity entity = ConvertUtils.sourceToTarget(dto, GuideEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GuideDTO dto) { + GuideEntity entity = ConvertUtils.sourceToTarget(dto, GuideEntity.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-voice/gov-voice-server/src/main/resources/mapper/GuideAttachmentDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideAttachmentDao.xml new file mode 100644 index 0000000000..7c34e2d2f2 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideAttachmentDao.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml new file mode 100644 index 0000000000..dad8bb6c4c --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDefaultDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDefaultDao.xml new file mode 100644 index 0000000000..af77665580 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDefaultDao.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCollectionDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCollectionDao.xml new file mode 100644 index 0000000000..69f598adf7 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCollectionDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml new file mode 100644 index 0000000000..071bf38535 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideExternalLinkDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideExternalLinkDao.xml new file mode 100644 index 0000000000..e570f994b4 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideExternalLinkDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDao.xml new file mode 100644 index 0000000000..a75b2d018f --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDictDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDictDao.xml new file mode 100644 index 0000000000..be18e67c5d --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDictDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDictDefaultDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDictDefaultDao.xml new file mode 100644 index 0000000000..89cc9ac2e3 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDictDefaultDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From cbde6493a7a985d432cfe84efc4dc22e6d96e10c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 7 Sep 2021 09:21:22 +0800 Subject: [PATCH 05/43] =?UTF-8?q?=E5=85=A8=E9=83=A8=E5=85=9A=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/AllPartyFormDTO.java | 46 +++++++++++++++++++ .../epmet/dto/result/AllPartyResultDTO.java | 41 +++++++++++++++++ .../epmet/controller/ResiPointController.java | 12 +++++ .../UserPointStatisticalDailyService.java | 10 ++++ .../UserPointStatisticalDailyServiceImpl.java | 33 +++++++++++++ 5 files changed, 142 insertions(+) create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/AllPartyFormDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/AllPartyResultDTO.java diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/AllPartyFormDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/AllPartyFormDTO.java new file mode 100644 index 0000000000..ebfea4f918 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/AllPartyFormDTO.java @@ -0,0 +1,46 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/9/6 3:13 下午 + * @DESC + */ +@Data +public class AllPartyFormDTO implements Serializable { + + private static final long serialVersionUID = -600409785611581009L; + + + /** + * 页码 + **/ + private Integer pageNo = NumConstant.ONE; + + /** + * 每页数据条数 + **/ + private Integer pageSize = NumConstant.TEN; + + /** + * 本月 monthly 总排行 all; + * */ + private String type; + + /** + * 认证成功的党员 的用户ID + * */ + private List userIds; + + /** + * 客户ID + */ + private String customerId; + +} diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/AllPartyResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/AllPartyResultDTO.java new file mode 100644 index 0000000000..25413e04a5 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/AllPartyResultDTO.java @@ -0,0 +1,41 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/9/6 3:12 下午 + * @DESC + */ +@Data +public class AllPartyResultDTO implements Serializable { + + private static final long serialVersionUID = -5889648842876122793L; + + /** + * 排序 + **/ + private Integer ranking; + + /** + * 积分 + **/ + private Integer point; + + /** + * 头像 + **/ + private String userHeadPhoto; + + /** + * 名称 + **/ + private String realName; + + /** + * 用户id + **/ + private String userId; +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java index b52a602ede..9f5ee8acf8 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java @@ -159,6 +159,18 @@ public class ResiPointController { return new Result>().ok(resultDTOS); } + /** + * @Description 全部党员积分排行 + * @Param formDTO + * @author zxc + * @date 2021/9/6 3:30 下午 + */ + @PostMapping("allparty") + public Result> allParty(@RequestBody AllPartyFormDTO formDTO,@LoginUser TokenDto tokenDto){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result>().ok(userPointStatisticalDailyService.allParty(formDTO)); + } + /** * @return com.epmet.commons.tools.utils.Result> * @param tokenDto diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java index 6630a87891..1a82b5ca14 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java @@ -20,8 +20,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.UserPointStatisticalDailyDTO; +import com.epmet.dto.form.AllPartyFormDTO; import com.epmet.dto.form.ResiAroundPartyPointRankFormDTO; import com.epmet.dto.form.ResiPointRankFormDTO; +import com.epmet.dto.result.AllPartyResultDTO; import com.epmet.dto.result.ResiAroundPartyPointRankResultDTO; import com.epmet.dto.result.ResiPointRankListResultDTO; import com.epmet.entity.UserPointStatisticalDailyEntity; @@ -125,4 +127,12 @@ public interface UserPointStatisticalDailyService extends BaseService listAroundPartyPointRank(ResiAroundPartyPointRankFormDTO formDTO); + + /** + * @Description 全部党员积分排行 + * @Param formDTO + * @author zxc + * @date 2021/9/6 3:30 下午 + */ + List allParty(AllPartyFormDTO formDTO); } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java index 10ed45500f..23d0381cee 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java @@ -23,11 +23,13 @@ import com.epmet.common.enu.AroundPartyConstant; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.UserPointStatisticalDailyDao; import com.epmet.dto.UserPointStatisticalDailyDTO; +import com.epmet.dto.form.AllPartyFormDTO; import com.epmet.dto.form.ResiAroundPartyPointRankFormDTO; import com.epmet.dto.form.ResiPointRankFormDTO; import com.epmet.dto.result.*; @@ -45,6 +47,7 @@ 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 org.springframework.util.CollectionUtils; import java.util.*; import java.util.stream.Collectors; @@ -292,6 +295,36 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl allParty(AllPartyFormDTO formDTO) { + Result> partyMemberInfosResult = resiPartyMemberOpenFeignClient.getPartyMemberInfoByCustomerId(formDTO.getCustomerId()); + if (!partyMemberInfosResult.success()){ + throw new RenException("查询客户下的党员失败......"); + } + if (CollectionUtils.isEmpty(partyMemberInfosResult.getData())){ + return new ArrayList<>(); + } + List partyMemberInfos = partyMemberInfosResult.getData(); + List userIds = partyMemberInfos.stream().map(m -> m.getUserId()).collect(Collectors.toList()); + ResiAroundPartyPointRankFormDTO selDto = ConvertUtils.sourceToTarget(formDTO, ResiAroundPartyPointRankFormDTO.class); + selDto.setUserIds(userIds); + List resultDTOS = new ArrayList<>(); + if (AroundPartyConstant.ALL.equals(formDTO.getType())){ + resultDTOS = baseDao.selectListGridPartyRankByUsablePoint(selDto); + }else if (AroundPartyConstant.MONTHLY.equals(formDTO.getType())){ + resultDTOS = baseDao.selectListGridPartyRankByMonth(selDto); + } + resultDTOS = getPartyBaseInfo(resultDTOS); + List result = ConvertUtils.sourceToTarget(resultDTOS, AllPartyResultDTO.class); + return result; + } + /** * 获取认证通过的党员的 用户id * From ccfbbbe015db88bf35f510d025b6d6fb80ab4a5d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 7 Sep 2021 09:22:30 +0800 Subject: [PATCH 06/43] =?UTF-8?q?=E5=85=A8=E9=83=A8=E5=85=9A=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/UserPointStatisticalDailyServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java index 23d0381cee..aa9942312d 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java @@ -303,6 +303,7 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl allParty(AllPartyFormDTO formDTO) { + formDTO.setPageNo((formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize()); Result> partyMemberInfosResult = resiPartyMemberOpenFeignClient.getPartyMemberInfoByCustomerId(formDTO.getCustomerId()); if (!partyMemberInfosResult.success()){ throw new RenException("查询客户下的党员失败......"); From bc1c0b292e75abd43c4762b2e9cf072b0309978f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 7 Sep 2021 13:37:50 +0800 Subject: [PATCH 07/43] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/UserPointStatisticalDailyDao.java | 3 ++ .../UserPointStatisticalDailyServiceImpl.java | 10 ++--- .../mapper/UserPointStatisticalDailyDao.xml | 41 +++++++++++++++++++ 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java index 63a3e68c1c..2ae8bb24f5 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.ResiAroundPartyPointRankFormDTO; +import com.epmet.dto.result.AllPartyResultDTO; import com.epmet.dto.result.ResiAroundPartyPointRankResultDTO; import com.epmet.dto.result.ResiPointRankResultDTO; import com.epmet.entity.UserPointStatisticalDailyEntity; @@ -73,6 +74,7 @@ public interface UserPointStatisticalDailyDao extends BaseDao selectListGridPartyRankByUsablePoint(ResiAroundPartyPointRankFormDTO formDTO); + List selectListGridPartyNewRankByUsablePoint(ResiAroundPartyPointRankFormDTO formDTO); /** * 身边党员-积分排行 :按网格统计,对本月党员增加的积分 进行排序 @@ -82,4 +84,5 @@ public interface UserPointStatisticalDailyDao extends BaseDao selectListGridPartyRankByMonth(ResiAroundPartyPointRankFormDTO formDTO); + List selectListGridPartyNewRankByMonth(ResiAroundPartyPointRankFormDTO formDTO); } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java index aa9942312d..c75edbae56 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java @@ -315,14 +315,14 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl userIds = partyMemberInfos.stream().map(m -> m.getUserId()).collect(Collectors.toList()); ResiAroundPartyPointRankFormDTO selDto = ConvertUtils.sourceToTarget(formDTO, ResiAroundPartyPointRankFormDTO.class); selDto.setUserIds(userIds); - List resultDTOS = new ArrayList<>(); + List resultDTOS = new ArrayList<>(); if (AroundPartyConstant.ALL.equals(formDTO.getType())){ - resultDTOS = baseDao.selectListGridPartyRankByUsablePoint(selDto); + resultDTOS = baseDao.selectListGridPartyNewRankByUsablePoint(selDto); }else if (AroundPartyConstant.MONTHLY.equals(formDTO.getType())){ - resultDTOS = baseDao.selectListGridPartyRankByMonth(selDto); + resultDTOS = baseDao.selectListGridPartyNewRankByMonth(selDto); } - resultDTOS = getPartyBaseInfo(resultDTOS); - List result = ConvertUtils.sourceToTarget(resultDTOS, AllPartyResultDTO.class); + List partyBaseInfo = getPartyBaseInfo(ConvertUtils.sourceToTarget(resultDTOS, ResiAroundPartyPointRankResultDTO.class)); + List result = ConvertUtils.sourceToTarget(partyBaseInfo, AllPartyResultDTO.class); return result; } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml index d49ca80396..7d7677ffd1 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml @@ -184,4 +184,45 @@ ORDER BY P.point DESC LIMIT #{pageNo}, #{pageSize} + + + + From b5fcc12655cbb5fc5ee33712c4fcc2d2bdb12390 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 7 Sep 2021 13:50:52 +0800 Subject: [PATCH 08/43] =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/UserPointStatisticalDailyDao.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml index 7d7677ffd1..49179803c7 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml @@ -186,6 +186,7 @@ + SELECT + g.ID AS "guideId", + g.TITLE AS "title", + gc.CATEGORY_NAME AS categoryName, + g.CREATED_BY AS createdId, + g.UPDATED_TIME AS updatedTime, + FROM + guide g + INNER JOIN guide_category gc ON g.CATEGORY_ID = gc.ID + WHERE g.DEL_FLAG = 0 + + AND g.PIDS LIKE CONCAT( '%', #{agencyId}, '%' ) + + + AND g.TITLE LIKE CONCAT( '%', #{guideTitle}, '%' ) + + + AND g.CATEGORY_ID = #{categoryId} + + + + \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDao.xml index a75b2d018f..3d329b642d 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDao.xml @@ -16,6 +16,19 @@ + \ No newline at end of file From d919a1c09ac9d6ec35c552e6a12333828ee0e1ae Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 8 Sep 2021 13:39:32 +0800 Subject: [PATCH 12/43] =?UTF-8?q?=E6=88=91=E7=9A=84=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/group/ResiGroupDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml index bf17a2004e..4e7e7b418c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml @@ -77,8 +77,8 @@ AND rg.CUSTOMER_ID = #{customerId} AND rg.GRID_ID =#{gridId} AND rgm.CUSTOMER_USER_ID = #{userId} - AND rgm.STATUS IN ( 'approved', 'silent' ) - AND rg.STATE in('approved','hidden','closed') + AND rgm.STATUS IN ( 'approved', 'silent' ,'under_auditting') + AND rg.STATE in('approved','hidden','closed','under_auditting') AND rg.GROUP_TYPE = #{groupType} From de42e5226aef2d257607b7f076e6c0b750e63ff4 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 8 Sep 2021 13:43:28 +0800 Subject: [PATCH 13/43] paixushijian --- .../src/main/resources/mapper/group/ResiGroupDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml index 4e7e7b418c..3d416b3a91 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml @@ -82,7 +82,7 @@ AND rg.GROUP_TYPE = #{groupType} - order by rg.LATEST_TOPIC_PUBLISH_DATE desc + order by rg.CREATED_TIME desc LIMIT #{pageNo}, #{pageSize} From e59701c4deb525e2790fdd8049b57b5945cf6d03 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 8 Sep 2021 15:39:29 +0800 Subject: [PATCH 14/43] =?UTF-8?q?web=E5=88=86=E7=B1=BB=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=B8=8D=E5=88=86=E9=A1=B5=EF=BC=8C=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E4=B8=8B=E6=8B=89=E6=A1=86=E9=80=9A=E7=94=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/constant/Constant.java | 11 +++ .../java/com/epmet/dto/GuideCategoryDTO.java | 43 ++++++---- .../form/GuideCategoryDropDownFormDTO.java | 28 +++++++ .../dto/form/GuideCategoryPageFormDTO.java | 21 +++++ .../com/epmet/dto/result/GuideDictResDTO.java | 36 +++++++++ .../controller/GuideCategoryController.java | 43 +++++++++- .../java/com/epmet/dao/GuideCategoryDao.java | 27 ++++++- .../com/epmet/entity/GuideCategoryEntity.java | 34 ++++---- .../epmet/service/GuideCategoryService.java | 25 ++++-- .../impl/GuideCategoryServiceImpl.java | 78 +++++++++++++++++-- .../resources/mapper/GuideCategoryDao.xml | 59 ++++++++++---- 11 files changed, 342 insertions(+), 63 deletions(-) create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCategoryDropDownFormDTO.java create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCategoryPageFormDTO.java create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDictResDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/Constant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/Constant.java index 29a7dcda6b..400e3893e4 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/Constant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/Constant.java @@ -160,4 +160,15 @@ public interface Constant { // resi_footbar_highlight_num // gov_footbar_highlight_num String FOOTBAR_HIGHLIGHT_NUM="_footbar_highlight_num"; + + + /** + * 未被禁用标识 + * */ + String ENABLE = "enable"; + + /** + * 被禁用标识 + * */ + String DISABLE = "disable"; } diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDTO.java index ccd59bc862..7d0ed1eef4 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDTO.java @@ -17,16 +17,18 @@ package com.epmet.dto; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** * 指南分类 * * @author generator generator@elink-cn.com - * @since v1.0.0 2021-09-06 + * @since v1.0.0 2021-09-08 */ @Data public class GuideCategoryDTO implements Serializable { @@ -36,56 +38,67 @@ public class GuideCategoryDTO implements Serializable { /** * 主键 */ - private String id; + private String id; + + /** + * 客户id,产品默认配置此列存储default + */ + private String customerId; /** - * 客户id + * 分类名,客户内唯一 */ - private String customerId; + private String categoryName; /** - * 分类名 + * 分类编码:分类名的全拼; eg:gongjijin */ - private String categoryName; + private String categoryCode; /** * 排序 */ - private Integer sort; + private Integer sort; /** * 状态 禁用disable 启用enable */ - private String status; + private String status; /** * 删除标识 0未删除、1已删除 */ - private String delFlag; + @JsonIgnore + private String delFlag; /** * 乐观锁 */ - private Integer revision; + @JsonIgnore + private Integer revision; /** * 创建人 */ - private String createdBy; + @JsonIgnore + private String createdBy; /** * 创建时间 */ - private Date createdTime; + @JsonIgnore + private Date createdTime; /** * 更新人 */ - private String updatedBy; + @JsonIgnore + private String updatedBy; /** * 更新时间 */ - private Date updatedTime; + @JsonIgnore + private Date updatedTime; } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCategoryDropDownFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCategoryDropDownFormDTO.java new file mode 100644 index 0000000000..a92e1c2e09 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCategoryDropDownFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 发布指南、编辑指南、查询指南列表 分类下拉框 + * @Author yinzuomei + * @Date 2021/9/8 2:57 下午 + */ +@Data +public class GuideCategoryDropDownFormDTO implements Serializable { + private static final long serialVersionUID = 9122708701080412461L; + public interface AddUserInternalGroup { + } + /** + * 新增指南:saveorupdate;查询指南列表:query + */ + @NotBlank(message = "新增指南:saveorupdate;查询指南列表:query",groups = AddUserInternalGroup.class) + private String queryOrigin; + + @NotBlank(message = "当前工作人员所属客户id不能为空",groups = AddUserInternalGroup.class) + private String customerId; + +} + diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCategoryPageFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCategoryPageFormDTO.java new file mode 100644 index 0000000000..b67686e451 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCategoryPageFormDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 工作端PC或者运营端分页 + * @Author yinzuomei + * @Date 2021/9/8 1:35 下午 + */ +@Data +public class GuideCategoryPageFormDTO implements Serializable { + private static final long serialVersionUID = -7551388716349439643L; + public interface AddUserInternalGroup { + } + @NotBlank(message = "客户id不能为空,运营端传default", groups = AddUserInternalGroup.class) + private String customerId; +} + diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDictResDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDictResDTO.java new file mode 100644 index 0000000000..8b1cbdf94f --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDictResDTO.java @@ -0,0 +1,36 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 办事指南】可用分类列表 新增、编辑指南时的下拉框:展示未禁用的分类; 查询指南列表:如果禁用的分类下存在指南列表,则展示,不存在直接不展示 + * @Author yinzuomei + * @Date 2021/9/8 2:44 下午 + */ +@Data +public class GuideDictResDTO implements Serializable { + + /** + * 分类名,客户内唯一 + */ + private String categoryName; + + /** + * 分类编码:分类名的全拼; eg:gongjijin + */ + private String categoryCode; + + /** + * 排序 + */ + private Integer sort; + + /** + * 状态 禁用disable 启用enable + */ + private String status; +} + + diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java index 03bd231c0b..e34e38770a 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -25,11 +27,14 @@ 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.GuideCategoryDTO; +import com.epmet.dto.form.GuideCategoryDropDownFormDTO; +import com.epmet.dto.form.GuideCategoryPageFormDTO; +import com.epmet.dto.result.GuideDictResDTO; import com.epmet.service.GuideCategoryService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import java.util.Map; +import java.util.List; /** @@ -45,12 +50,42 @@ public class GuideCategoryController { @Autowired private GuideCategoryService guideCategoryService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = guideCategoryService.page(params); + /** + * 【办事指南】分类列表-工作端PC和运营端用不分页 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @author yinzuomei + * @date 2021/9/8 1:33 下午 + */ + @PostMapping("page") + public Result> page(@RequestBody GuideCategoryPageFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, GuideCategoryPageFormDTO.AddUserInternalGroup.class); + PageData page = guideCategoryService.page(formDTO); return new Result>().ok(page); } + /** + * 办事指南】可用分类列表 新增、编辑指南时的下拉框:展示未禁用的分类; 查询指南列表:如果禁用的分类下存在指南列表,则展示,不存在直接不展示 + * + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author yinzuomei + * @date 2021/9/8 2:47 下午 + */ + @PostMapping("getcategory") + public Result> getCategory(@LoginUser TokenDto tokenDto,@RequestBody GuideCategoryDropDownFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,GuideCategoryDropDownFormDTO.AddUserInternalGroup.class); + return new Result>().ok(guideCategoryService.getCategory(formDTO)); + } + + + + + + + @GetMapping("{id}") public Result get(@PathVariable("id") String id){ GuideCategoryDTO data = guideCategoryService.get(id); diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java index a6b9a24cc8..02d8bcbe43 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java @@ -18,8 +18,13 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.GuideCategoryDTO; +import com.epmet.dto.result.GuideDictResDTO; import com.epmet.entity.GuideCategoryEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 指南分类 @@ -29,5 +34,25 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface GuideCategoryDao extends BaseDao { - + + /** + * 工作端PC或者运营端分类列表查询,不分页 + * + * @param customerId + * @return java.util.List + * @author yinzuomei + * @date 2021/9/8 1:57 下午 + */ + List selectPageByCid(String customerId); + + /** + * 办事指南】可用分类列表 新增、编辑指南时的下拉框:展示未禁用的分类; 查询指南列表:如果禁用的分类下存在指南列表,则展示,不存在直接不展示 + * + * @param customerId + * @param queryOrigin + * @return java.util.List + * @author yinzuomei + * @date 2021/9/8 3:15 下午 + */ + List selectCategoryDict(@Param("customerId") String customerId, @Param("queryOrigin") String queryOrigin); } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryEntity.java index 8231f9d5ef..c13a7a3df9 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryEntity.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryEntity.java @@ -18,18 +18,15 @@ 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 2021-09-06 + * @since v1.0.0 2021-09-08 */ @Data @EqualsAndHashCode(callSuper=false) @@ -38,24 +35,29 @@ public class GuideCategoryEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; - /** - * 客户id - */ + /** + * 客户id,产品默认配置此列存储default + */ private String customerId; - /** - * 分类名 - */ + /** + * 分类名,客户内唯一 + */ private String categoryName; - /** - * 排序 - */ + /** + * 分类编码:分类名的全拼; eg:gongjijin + */ + private String categoryCode; + + /** + * 排序 + */ private Integer sort; - /** - * 状态 禁用disable 启用enable - */ + /** + * 状态 禁用disable 启用enable + */ private String status; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java index 84f995d0fd..22f9ecbc61 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java @@ -20,6 +20,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.GuideCategoryDTO; +import com.epmet.dto.form.GuideCategoryDropDownFormDTO; +import com.epmet.dto.form.GuideCategoryPageFormDTO; +import com.epmet.dto.result.GuideDictResDTO; import com.epmet.entity.GuideCategoryEntity; import java.util.List; @@ -34,14 +37,24 @@ import java.util.Map; public interface GuideCategoryService extends BaseService { /** - * 默认分页 + * 【办事指南】分类列表-工作端PC和运营端用不分页 * - * @param params - * @return PageData - * @author generator - * @date 2021-09-06 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @author yinzuomei + * @date 2021/9/8 1:33 下午 + */ + PageData page(GuideCategoryPageFormDTO formDTO); + + /** + * 办事指南】可用分类列表 新增、编辑指南时的下拉框:展示未禁用的分类; 查询指南列表:如果禁用的分类下存在指南列表,则展示,不存在直接不展示 + * + * @param formDTO + * @return java.util.List + * @author yinzuomei + * @date 2021/9/8 3:06 下午 */ - PageData page(Map params); + List getCategory(GuideCategoryDropDownFormDTO formDTO); /** * 默认查询 diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java index 502f18571a..32e879790a 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java @@ -18,15 +18,20 @@ 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.Constant; 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.GuideCategoryDao; import com.epmet.dto.GuideCategoryDTO; +import com.epmet.dto.form.GuideCategoryDropDownFormDTO; +import com.epmet.dto.form.GuideCategoryPageFormDTO; +import com.epmet.dto.result.GuideDictResDTO; import com.epmet.entity.GuideCategoryEntity; import com.epmet.service.GuideCategoryService; +import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -45,15 +50,74 @@ import java.util.Map; public class GuideCategoryServiceImpl extends BaseServiceImpl implements GuideCategoryService { + /** + * 【办事指南】分类列表-工作端PC和运营端用不分页 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @author yinzuomei + * @date 2021/9/8 1:33 下午 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public PageData page(GuideCategoryPageFormDTO formDTO) { + List list = baseDao.selectPageByCid(formDTO.getCustomerId()); + if (CollectionUtils.isEmpty(list) && !formDTO.getCustomerId().equals(Constant.DEFAULT_CUSTOMER)) { + //初始化默认的给客户 + initCustomerGuideCategory(formDTO.getCustomerId()); + list = baseDao.selectPageByCid(formDTO.getCustomerId()); + } + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal()); + } + + /** + * 产品默认分类同步给客户,已经禁用的不同步 + * + * @param customerId + * @return void + * @author yinzuomei + * @date 2021/9/8 2:17 下午 + */ + private void initCustomerGuideCategory(String customerId) { + List list = baseDao.selectPageByCid(Constant.DEFAULT_CUSTOMER); + int sort = 1; + for (GuideCategoryDTO dto : list) { + // 已经禁用的,不同步给客户 + if (Constant.DISABLE.equals(dto.getStatus())) { + continue; + } + dto.setCustomerId(customerId); + //清空主键 + dto.setId(null); + dto.setSort(sort); + GuideCategoryEntity entity = ConvertUtils.sourceToTarget(dto, GuideCategoryEntity.class); + insert(entity); + sort++; + } + } + + + /** + * 办事指南】可用分类列表 新增、编辑指南时的下拉框:展示未禁用的分类; 查询指南列表:如果禁用的分类下存在指南列表,则展示,不存在直接不展示 + * + * @param formDTO + * @return java.util.List + * @author yinzuomei + * @date 2021/9/8 3:06 下午 + */ @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, GuideCategoryDTO.class); + public List getCategory(GuideCategoryDropDownFormDTO formDTO) { + List list=baseDao.selectCategoryDict(formDTO.getCustomerId(),formDTO.getQueryOrigin()); + if (CollectionUtils.isEmpty(list) && !formDTO.getCustomerId().equals(Constant.DEFAULT_CUSTOMER)) { + //初始化默认的给客户 + initCustomerGuideCategory(formDTO.getCustomerId()); + list=baseDao.selectCategoryDict(formDTO.getCustomerId(),formDTO.getQueryOrigin()); + } + return list; } + @Override public List list(Map params) { List entityList = baseDao.selectList(getWrapper(params)); diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml index dad8bb6c4c..6af20116bc 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml @@ -3,19 +3,50 @@ - - - - - - - - - - - - - - + + + + \ No newline at end of file From 18c04e0ced3f4a4e494c1207704bd5927b637de7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 8 Sep 2021 15:59:44 +0800 Subject: [PATCH 15/43] =?UTF-8?q?getcategory=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/result/GuideDictResDTO.java | 3 +++ .../java/com/epmet/service/impl/GuideCategoryServiceImpl.java | 2 +- .../src/main/resources/mapper/GuideCategoryDao.xml | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDictResDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDictResDTO.java index 8b1cbdf94f..00f56ad3f9 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDictResDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDictResDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -25,11 +26,13 @@ public class GuideDictResDTO implements Serializable { /** * 排序 */ + @JsonIgnore private Integer sort; /** * 状态 禁用disable 启用enable */ + @JsonIgnore private String status; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java index 32e879790a..c876885d6c 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java @@ -81,7 +81,7 @@ public class GuideCategoryServiceImpl extends BaseServiceImpl list = baseDao.selectPageByCid(Constant.DEFAULT_CUSTOMER); - int sort = 1; + int sort = 0; for (GuideCategoryDTO dto : list) { // 已经禁用的,不同步给客户 if (Constant.DISABLE.equals(dto.getStatus())) { diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml index 6af20116bc..08243e6558 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml @@ -32,12 +32,12 @@ gc.category_code, gc.`STATUS`, gc.sort, - ( SELECT count( g.id ) FROM guide g WHERE g.CUSTOMER_ID = '' AND g.DEL_FLAG = '0' AND g.CATEGORY_CODE = gc.CATEGORY_CODE ) AS guideTotal + ( SELECT count( g.id ) FROM guide g WHERE g.CUSTOMER_ID = #{customerId} AND g.DEL_FLAG = '0' AND g.CATEGORY_CODE = gc.CATEGORY_CODE ) AS guideTotal FROM guide_category gc WHERE gc.DEL_FLAG = '0' - AND CUSTOMER_ID = 'default' + AND CUSTOMER_ID = #{customerId} ) temp WHERE temp.`STATUS` = 'enable' From 005487aebaf9e1a533c3f5d0547aabf7d60e4c7f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 8 Sep 2021 16:47:27 +0800 Subject: [PATCH 16/43] =?UTF-8?q?=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 1 + .../dto/form/EditGuideCategoryFormDTO.java | 47 ++++++++++++++ .../epmet/dto/form/GuideCateOrderFormDTO.java | 56 ++++++++++++++++ .../controller/GuideCategoryController.java | 65 ++++++++++++++----- .../java/com/epmet/dao/GuideCategoryDao.java | 34 ++++++++++ .../epmet/service/GuideCategoryService.java | 40 ++++++------ .../impl/GuideCategoryServiceImpl.java | 59 ++++++++++++----- .../resources/mapper/GuideCategoryDao.xml | 41 ++++++++++++ 8 files changed, 294 insertions(+), 49 deletions(-) create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/EditGuideCategoryFormDTO.java create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCateOrderFormDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 4d717f919e..81350a74ba 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -74,6 +74,7 @@ public enum EpmetErrorCode { AREA_CODE_ALREADY_EXISTS(8208,"组织区划已被占用,请重新选择"), AGENCY_NAME_ALREADY_EXISTS(8209,"当前组织名称已存在,请重新修改"), SET_PARENT_AREA_CODE(8210,"请先设置上级组织区划"), + HAVE_GUIDE_CANNOT_DEL(8211,"当前分类已经存在办事指南,不允许删除"), REQUIRE_PERMISSION(8301, "您没有足够的操作权限"), THIRD_PLAT_REQUEST_ERROR(8302, "请求第三方平台错误"), diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/EditGuideCategoryFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/EditGuideCategoryFormDTO.java new file mode 100644 index 0000000000..eedb988ffe --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/EditGuideCategoryFormDTO.java @@ -0,0 +1,47 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 编辑、禁用、删除统一入参 + * @Author yinzuomei + * @Date 2021/9/8 4:15 下午 + */ +@Data +public class EditGuideCategoryFormDTO implements Serializable { + private static final long serialVersionUID = -6853534660181580456L; + + public interface AddUserInternalGroup { + } + + public interface StatusGroup { + } + + public interface UpdateInfoGroup extends CustomerClientShowGroup { + } + + public interface DelGroup { + } + @NotBlank(message = "当前操作人id不能为空", groups = AddUserInternalGroup.class) + private String staffId; + + @NotBlank(message = "客户id不能为空",groups = DelGroup.class) + private String customerId; + + @NotBlank(message = "id不能为空", groups = AddUserInternalGroup.class) + private String id; + + @NotBlank(message = "status不能为空", groups = StatusGroup.class) + private String status; + + @NotBlank(message = "分类名称不能为空不能为空", groups = UpdateInfoGroup.class) + @Length(max = 10, message = "分类名称最多填入10个字", groups = UpdateInfoGroup.class) + private String categoryName; + +} + diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCateOrderFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCateOrderFormDTO.java new file mode 100644 index 0000000000..6b66e9f7c5 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCateOrderFormDTO.java @@ -0,0 +1,56 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import java.io.Serializable; +import java.util.List; + +/** + * @Description 分类排序入参DTO + * @Author yinzuomei + * @Date 2021/9/8 4:03 下午 + */ +@Data +public class GuideCateOrderFormDTO implements Serializable { + private static final long serialVersionUID = 8671295475212569124L; + + public interface AddUserInternalGroup { + } + + @NotBlank(message = "当前操作人id不能为空", groups = AddUserInternalGroup.class) + private String staffId; + + + @NotEmpty(message = "顺序不能为空", groups = {AddUserInternalGroup.class}) + private List orderList; + + /** + * 排序索引号dto + */ + public static class OrderIndexDTO { + private String id; + private Integer orderIndex; + + public OrderIndexDTO() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Integer getOrderIndex() { + return orderIndex; + } + + public void setOrderIndex(Integer orderIndex) { + this.orderIndex = orderIndex; + } + } +} + diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java index e34e38770a..b29c853eec 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java @@ -21,12 +21,13 @@ import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.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.GuideCategoryDTO; +import com.epmet.dto.form.EditGuideCategoryFormDTO; +import com.epmet.dto.form.GuideCateOrderFormDTO; import com.epmet.dto.form.GuideCategoryDropDownFormDTO; import com.epmet.dto.form.GuideCategoryPageFormDTO; import com.epmet.dto.result.GuideDictResDTO; @@ -81,17 +82,58 @@ public class GuideCategoryController { } + /** + * 保存排序 + * + * @param tokenDto + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @date 2021/9/8 4:09 下午 + */ + @PostMapping("saveorder") + public Result saveOrder(@LoginUser TokenDto tokenDto,@RequestBody GuideCateOrderFormDTO formDTO){ + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,GuideCateOrderFormDTO.AddUserInternalGroup.class); + guideCategoryService.saveOrder(formDTO); + return new Result(); + } + /** + * 禁用或者启用分类 + * + * @param tokenDto + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @date 2021/9/8 4:19 下午 + */ + @PostMapping("disable") + public Result disable(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.AddUserInternalGroup.class,EditGuideCategoryFormDTO.StatusGroup.class); + guideCategoryService.disableGuideCategory(formDTO); + return new Result(); + } - - - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - GuideCategoryDTO data = guideCategoryService.get(id); - return new Result().ok(data); + /** + * 删除分类,已经存在指南的不允许删除,给予提示 + * + * @param tokenDto + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @date 2021/9/8 4:45 下午 + */ + @PostMapping("delete") + public Result delete(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.AddUserInternalGroup.class,EditGuideCategoryFormDTO.DelGroup.class); + guideCategoryService.delete(formDTO); + return new Result(); } + @PostMapping public Result save(@RequestBody GuideCategoryDTO dto){ //效验数据 @@ -108,12 +150,5 @@ public class GuideCategoryController { return new Result(); } - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - guideCategoryService.delete(ids); - return new Result(); - } } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java index 02d8bcbe43..7f66753eca 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java @@ -55,4 +55,38 @@ public interface GuideCategoryDao extends BaseDao { * @date 2021/9/8 3:15 下午 */ List selectCategoryDict(@Param("customerId") String customerId, @Param("queryOrigin") String queryOrigin); + + /** + * 保存排序 + * + * @param id + * @param orderIndex + * @param staffId + * @return int + * @author yinzuomei + * @date 2021/9/8 4:11 下午 + */ + int updateOrder(@Param("id") String id, @Param("orderIndex") Integer orderIndex, @Param("staffId") String staffId); + + /** + * 启用或者禁用 + * + * @param id + * @param status + * @param staffId + * @return int + * @author yinzuomei + * @date 2021/9/8 4:22 下午 + */ + int updateStatus(@Param("id") String id, @Param("status")String status, @Param("staffId")String staffId); + + /** + * 查询这个分类下的项目数 + * + * @param id + * @return int + * @author yinzuomei + * @date 2021/9/8 4:36 下午 + */ + int selectGuideTotal(@Param("id") String id,@Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java index 22f9ecbc61..905ea44517 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java @@ -20,13 +20,14 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.GuideCategoryDTO; +import com.epmet.dto.form.EditGuideCategoryFormDTO; +import com.epmet.dto.form.GuideCateOrderFormDTO; import com.epmet.dto.form.GuideCategoryDropDownFormDTO; import com.epmet.dto.form.GuideCategoryPageFormDTO; import com.epmet.dto.result.GuideDictResDTO; import com.epmet.entity.GuideCategoryEntity; import java.util.List; -import java.util.Map; /** * 指南分类 @@ -57,24 +58,25 @@ public interface GuideCategoryService extends BaseService { List getCategory(GuideCategoryDropDownFormDTO formDTO); /** - * 默认查询 + * 保存排序 * - * @param params - * @return java.util.List - * @author generator - * @date 2021-09-06 + * @param formDTO + * @return void + * @author yinzuomei + * @date 2021/9/8 4:09 下午 */ - List list(Map params); + void saveOrder(GuideCateOrderFormDTO formDTO); + /** - * 单条查询 + * 启用或者禁用分类 * - * @param id - * @return GuideCategoryDTO - * @author generator - * @date 2021-09-06 + * @param formDTO + * @return int + * @author yinzuomei + * @date 2021/9/8 4:20 下午 */ - GuideCategoryDTO get(String id); + void disableGuideCategory(EditGuideCategoryFormDTO formDTO); /** * 默认保存 @@ -97,12 +99,12 @@ public interface GuideCategoryService extends BaseService { void update(GuideCategoryDTO dto); /** - * 批量删除 + * 删除分类,存在办事指南的不允许删除,给予提示 * - * @param ids - * @return void - * @author generator - * @date 2021-09-06 + * @param formDTO + * @return void + * @author yinzuomei + * @date 2021/9/8 4:34 下午 */ - void delete(String[] ids); + void delete(EditGuideCategoryFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java index c876885d6c..020ee7848b 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java @@ -21,10 +21,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.Constant; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.GuideCategoryDao; import com.epmet.dto.GuideCategoryDTO; +import com.epmet.dto.form.EditGuideCategoryFormDTO; +import com.epmet.dto.form.GuideCateOrderFormDTO; import com.epmet.dto.form.GuideCategoryDropDownFormDTO; import com.epmet.dto.form.GuideCategoryPageFormDTO; import com.epmet.dto.result.GuideDictResDTO; @@ -36,7 +40,6 @@ 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; @@ -117,12 +120,33 @@ public class GuideCategoryServiceImpl extends BaseServiceImpl list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public void saveOrder(GuideCateOrderFormDTO formDTO) { + for (GuideCateOrderFormDTO.OrderIndexDTO idx : formDTO.getOrderList()) { + baseDao.updateOrder(idx.getId(), idx.getOrderIndex(),formDTO.getStaffId()); + } + } - return ConvertUtils.sourceToTarget(entityList, GuideCategoryDTO.class); + /** + * 启用或者禁用分类 + * + * @param formDTO + * @return int + * @author yinzuomei + * @date 2021/9/8 4:20 下午 + */ + @Override + public void disableGuideCategory(EditGuideCategoryFormDTO formDTO) { + baseDao.updateStatus(formDTO.getId(), formDTO.getStatus(),formDTO.getStaffId()); } private QueryWrapper getWrapper(Map params){ @@ -134,12 +158,6 @@ public class GuideCategoryServiceImpl extends BaseServiceImpl0){ + throw new RenException(EpmetErrorCode.HAVE_GUIDE_CANNOT_DEL.getCode(),EpmetErrorCode.HAVE_GUIDE_CANNOT_DEL.getMsg()); + } + baseDao.deleteById(formDTO.getId()); } + } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml index 08243e6558..6baff0aed8 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml @@ -49,4 +49,45 @@ ORDER BY temp.sort ASC + + + + + update guide_category + set SORT=#{orderIndex}, + UPDATED_BY=#{staffId}, + UPDATED_TIME=NOW() + where id=#{id} + and del_flag='0' + + + + + update guide_category + set status=#{status}, + UPDATED_BY=#{staffId}, + UPDATED_TIME=NOW() + where id=#{id} + and del_flag='0' + + + + \ No newline at end of file From b0eb2dc7adb4c5533de1ce9e30de8e26adb3352f Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 8 Sep 2021 17:13:19 +0800 Subject: [PATCH 17/43] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=B8=8B=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E6=A0=91=20=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E6=89=80=E5=9C=A8=E7=BB=84=E7=BB=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/AgencyTreeResultDTO.java | 31 +++++++++++ .../dto/result/StaffOrgListResultDTO.java | 27 ++++++++++ .../controller/CustomerAgencyController.java | 12 +++++ .../com/epmet/controller/StaffController.java | 12 +++++ .../java/com/epmet/dao/CustomerAgencyDao.java | 4 ++ .../epmet/service/CustomerAgencyService.java | 10 ++++ .../java/com/epmet/service/StaffService.java | 9 ++++ .../impl/CustomerAgencyServiceImpl.java | 14 +++++ .../epmet/service/impl/StaffServiceImpl.java | 51 ++++++++++++++++++- .../resources/mapper/CustomerAgencyDao.xml | 35 +++++++++++++ 10 files changed, 203 insertions(+), 2 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyTreeResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffOrgListResultDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyTreeResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyTreeResultDTO.java new file mode 100644 index 0000000000..896ebfb57c --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyTreeResultDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/9/8 15:06 + */ +@Data +public class AgencyTreeResultDTO implements Serializable { + private static final long serialVersionUID = -311212619121062367L; + /** + * 机关组织Id + */ + private String agencyId; + + /** + * 机关组织名称 + */ + private String agencyName; + + private String pid; + /** + * 下级机关组织 + */ + private List subAgencyList; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffOrgListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffOrgListResultDTO.java new file mode 100644 index 0000000000..2473c623fd --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffOrgListResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/9/8 15:11 + */ +@Data +public class StaffOrgListResultDTO implements Serializable { + private static final long serialVersionUID = -7717333635633000120L; + /** + * 组织ID + */ + private String orgId; + /** + * 组织名称 + */ + private String orgName; + /** + * 组织类型机关agency 网格grid 部门dept + */ + private String orgType; +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index 70c254ee26..11d5e13542 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -324,4 +324,16 @@ public class CustomerAgencyController { return new Result().ok(customerAgencyService.getAgencyInfo(formDTO)); } + /** + * @Description 获取客户下组织树 + * @Param tokenDTO + * @Return {@link Result< AgencyTreeResultDTO >} + * @Author zhaoqifeng + * @Date 2021/9/8 15:20 + */ + @PostMapping("agencylist") + public Result getAgencyList(@LoginUser TokenDto tokenDTO) { + return new Result().ok(customerAgencyService.getAgencyList(tokenDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java index b95b96c0b9..6d3b50b408 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java @@ -195,4 +195,16 @@ public class StaffController { return staffService.addStaffV2(fromDTO); } + /** + * @Description 用户所属组织 + * @Param tokenDto + * @Return {@link Result< StaffOrgListResultDTO>} + * @Author zhaoqifeng + * @Date 2021/9/8 16:55 + */ + @PostMapping("orgList") + public Result> staffOrgList(@LoginUser TokenDto tokenDto) { + return new Result>().ok(staffService.staffOrgList(tokenDto)); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index b0149c28d8..145178f50f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -239,4 +239,8 @@ public interface CustomerAgencyDao extends BaseDao { * @author sun */ OrgResultDTO selectAgencyDetail(@Param("orgId") String orgId, @Param("orgType") String orgType); + + AgencyTreeResultDTO getAllAgency(@Param("customerId") String customerId); + + List getSubAgencyList(@Param("pid") String pid); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java index aaa691f239..c1a1915a72 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java @@ -19,6 +19,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.form.*; @@ -245,4 +246,13 @@ public interface CustomerAgencyService extends BaseService * @Date 2021/9/7 15:28 */ OrgResultDTO getAgencyInfo(OrgFormDTO formDTO); + + /** + * @Description 获取客户下组织树 + * @Param tokenDTO + * @Return {@link AgencyTreeResultDTO} + * @Author zhaoqifeng + * @Date 2021/9/8 15:21 + */ + AgencyTreeResultDTO getAgencyList(TokenDto tokenDTO); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java index d88298dfbf..ccd998c0fc 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java @@ -129,4 +129,13 @@ public interface StaffService { * @author sun */ Result addStaffV2(AddStaffV2FromDTO fromDTO); + + /** + * @Description 工作人员所属组织 + * @Param tokenDto + * @Return {@link StaffOrgListResultDTO} + * @Author zhaoqifeng + * @Date 2021/9/8 16:57 + */ + List staffOrgList(TokenDto tokenDto); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index 554d263173..4f1de1ae91 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -25,6 +25,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerAgencyConstant; @@ -1089,4 +1090,17 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl staffOrgList(TokenDto tokenDto) { + //redis获取工作人员信息 + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); + if (null == staffInfoCache) { + return Collections.emptyList(); + } + List list = new ArrayList<>(); + //工作人员所在组织 + StaffOrgListResultDTO agency = new StaffOrgListResultDTO(); + agency.setOrgId(staffInfoCache.getAgencyId()); + agency.setOrgName(staffInfoCache.getAgencyName()); + agency.setOrgType(OrgInfoConstant.AGENCY); + list.add(agency); + //工作人员所在部门 + if(CollectionUtils.isNotEmpty(staffInfoCache.getDeptList())) { + List deptList = staffInfoCache.getDeptList().stream().map(item -> { + StaffOrgListResultDTO dto = new StaffOrgListResultDTO(); + dto.setOrgId(item.getId()); + dto.setOrgName(item.getName()); + dto.setOrgType(OrgInfoConstant.DEPT); + return dto; + }).collect(Collectors.toList()); + list.addAll(deptList); + } + //工作人员所在网格 + if(CollectionUtils.isNotEmpty(staffInfoCache.getGridList())) { + List gridList = staffInfoCache.getGridList().stream().map(item -> { + StaffOrgListResultDTO dto = new StaffOrgListResultDTO(); + dto.setOrgId(item.getId()); + dto.setOrgName(item.getName()); + dto.setOrgType(OrgInfoConstant.GRID); + return dto; + }).collect(Collectors.toList()); + list.addAll(gridList); + } + return list; + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index a30207d922..2799ea36a0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -503,5 +503,40 @@ + + + + + + + + + + + + \ No newline at end of file From 6e79562bffdab748cd812f25715755892c6d9ec0 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 8 Sep 2021 17:26:52 +0800 Subject: [PATCH 18/43] =?UTF-8?q?=E5=8A=9E=E4=BA=8B=E6=8C=87=E5=8D=97?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/OssController.java | 31 +++++++++++++++++++ .../java/com/epmet/utils/ModuleConstant.java | 1 + 2 files changed, 32 insertions(+) diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java index 4fc64984c9..8ab04b8758 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java @@ -401,4 +401,35 @@ public class OssController { return ossService.uploadImgV2(file, PrivacyType.EXTERNAL, customerId); } + /** + * @Description 办事指南上传附件 + * @Param file + * @Param customerId + * @Return {@link Result< UploadImgResultDTO>} + * @Author zhaoqifeng + * @Date 2021/9/8 17:14 + */ + @PostMapping("upload-guide-file") + public Result uploadGuideFile(@RequestPart(value = "file") MultipartFile file, @RequestParam("customerId") String customerId) { + String fileName = file.getOriginalFilename(); + String format = "-" + fileName.substring(fileName.lastIndexOf(".") + NumConstant.ONE) + "-"; + format = format.toLowerCase(); + // 体积限制 + int sizeMb = 10; + // 大小限制10m + int sizeThreshold = sizeMb * 1024 * 1024; + if (file.getSize() > sizeThreshold) { + throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode(), + EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg().concat(",限制在").concat(String.valueOf(sizeMb)).concat("M以内")); + } + + // 格式限制,只允许png和jpeg + if (!ModuleConstant.GUIDE_FILE_DOC.contains(format)) { + throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode() + , EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg()); + } + + return ossService.uploadImgV2(file, PrivacyType.EXTERNAL, customerId); + } + } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java index 07a11d9ed7..71d5f177e2 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java @@ -43,6 +43,7 @@ public interface ModuleConstant extends Constant { * 项目附件-允许的文件类型 */ String PROJECT_FILE_DOC = "-pdf-ppt-pptx-doc-docx-xls-xlsx-"; + String GUIDE_FILE_DOC = "-pdf-doc-docx-xls-xlsx-"; /** * 项目附件-允许的音频类型 */ From 0fe294e7dc5432c2427a11bb9e7d45e60f49ba2b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 8 Sep 2021 17:58:07 +0800 Subject: [PATCH 19/43] qihuo --- epmet-commons/epmet-commons-tools/pom.xml | 6 +++ .../tools/exception/EpmetErrorCode.java | 1 + .../commons/tools/utils}/Pinyin4jUtil.java | 13 ++--- .../epmet/model/IndexExcelDataListener.java | 2 +- .../main/java/com/epmet/model/IndexModel.java | 2 +- .../dto/form/EditGuideCategoryFormDTO.java | 10 ++-- .../controller/GuideCategoryController.java | 49 +++++++++++++------ .../java/com/epmet/dao/GuideCategoryDao.java | 6 +++ .../epmet/service/GuideCategoryService.java | 4 +- .../impl/GuideCategoryServiceImpl.java | 42 +++++++++++++--- .../resources/mapper/GuideCategoryDao.xml | 37 ++++++++++++++ .../dto/result/StaffBasicInfoResultDTO.java | 7 +++ .../java/com/epmet/dao/CustomerStaffDao.java | 2 + .../impl/CustomerStaffServiceImpl.java | 3 ++ .../resources/mapper/CustomerStaffDao.xml | 10 ++++ 15 files changed, 159 insertions(+), 35 deletions(-) rename {epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util => epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils}/Pinyin4jUtil.java (94%) diff --git a/epmet-commons/epmet-commons-tools/pom.xml b/epmet-commons/epmet-commons-tools/pom.xml index d8073505ce..ae545279f9 100644 --- a/epmet-commons/epmet-commons-tools/pom.xml +++ b/epmet-commons/epmet-commons-tools/pom.xml @@ -163,6 +163,12 @@ com.squareup.okhttp3 okhttp + + io.github.wnjustdoit + pinyin4j + 2.6.0 + compile + diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 81350a74ba..5efb12edb9 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -75,6 +75,7 @@ public enum EpmetErrorCode { AGENCY_NAME_ALREADY_EXISTS(8209,"当前组织名称已存在,请重新修改"), SET_PARENT_AREA_CODE(8210,"请先设置上级组织区划"), HAVE_GUIDE_CANNOT_DEL(8211,"当前分类已经存在办事指南,不允许删除"), + GUIDE_CATEGORY_NAME_EXITS(8212,"分类已存在"), REQUIRE_PERMISSION(8301, "您没有足够的操作权限"), THIRD_PLAT_REQUEST_ERROR(8302, "请求第三方平台错误"), diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Pinyin4jUtil.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java rename to epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Pinyin4jUtil.java index 8d392a2c21..103baa6b0d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Pinyin4jUtil.java @@ -1,4 +1,4 @@ -package com.epmet.util; +package com.epmet.commons.tools.utils; import net.sourceforge.pinyin4j.PinyinHelper; import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; @@ -42,7 +42,7 @@ public class Pinyin4jUtil { */ public static String getFirstSpellPinYin(String src, boolean isFullSpell) { String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell, 1)); - System.out.println(targetStr); + System.out.println("targetStr="+targetStr); String[] split = targetStr.split(","); if (split.length > 1) { targetStr = split[0]; @@ -59,7 +59,7 @@ public class Pinyin4jUtil { */ public static String getSpellPinYin(String src, boolean isFullSpell,Integer preFont) { String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell, preFont)); - System.out.println(targetStr); + System.out.println("targetStr="+targetStr); String[] split = targetStr.split(","); if (split.length > 1) { targetStr = split[0]; @@ -196,8 +196,9 @@ public class Pinyin4jUtil { } public static void main(String[] args) { - System.out.println(getFirstSpellPinYin("区直部门",false)); - System.out.println(getSpellPinYin("党员提出话题数",false,4)); - System.out.println(getSpellPinYin("社区超期项目数",false,4)); + //System.out.println(getSpellPinYin("社区超期项目数",true,0)); + System.out.println(getFirstSpellPinYin("区直部门",true)); + //System.out.println(getSpellPinYin("党员提出话题数",false,4)); + //System.out.println(getSpellPinYin("社区超期项目数",false,4)); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 3fe392276f..690543f0d2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -4,6 +4,7 @@ import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.event.AnalysisEventListener; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.utils.Pinyin4jUtil; import com.epmet.commons.tools.utils.UniqueIdGenerator; import com.epmet.entity.evaluationindex.screen.IndexDictEntity; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity; @@ -13,7 +14,6 @@ import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; import com.epmet.service.evaluationindex.screen.IndexGroupDetailTemplateService; import com.epmet.service.evaluationindex.screen.IndexGroupTemplateService; import com.epmet.support.normalizing.Correlation; -import com.epmet.util.Pinyin4jUtil; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java index cc1aed7759..b1860f8dfc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java @@ -2,7 +2,7 @@ package com.epmet.model; import com.alibaba.excel.annotation.ExcelProperty; import com.epmet.commons.tools.constant.StrConstant; -import com.epmet.util.Pinyin4jUtil; +import com.epmet.commons.tools.utils.Pinyin4jUtil; import lombok.Data; @Data diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/EditGuideCategoryFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/EditGuideCategoryFormDTO.java index eedb988ffe..79286ba45f 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/EditGuideCategoryFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/EditGuideCategoryFormDTO.java @@ -24,23 +24,25 @@ public class EditGuideCategoryFormDTO implements Serializable { public interface UpdateInfoGroup extends CustomerClientShowGroup { } + public interface SaveInfoGroup extends CustomerClientShowGroup { + } public interface DelGroup { } @NotBlank(message = "当前操作人id不能为空", groups = AddUserInternalGroup.class) private String staffId; - @NotBlank(message = "客户id不能为空",groups = DelGroup.class) + @NotBlank(message = "客户id不能为空",groups = {DelGroup.class,UpdateInfoGroup.class,SaveInfoGroup.class}) private String customerId; - @NotBlank(message = "id不能为空", groups = AddUserInternalGroup.class) + @NotBlank(message = "id不能为空", groups = {StatusGroup.class,DelGroup.class,UpdateInfoGroup.class}) private String id; @NotBlank(message = "status不能为空", groups = StatusGroup.class) private String status; - @NotBlank(message = "分类名称不能为空不能为空", groups = UpdateInfoGroup.class) - @Length(max = 10, message = "分类名称最多填入10个字", groups = UpdateInfoGroup.class) + @NotBlank(message = "分类名称不能为空不能为空", groups = {UpdateInfoGroup.class,SaveInfoGroup.class}) + @Length(max = 10, message = "分类名称最多填入10个字", groups = {UpdateInfoGroup.class,SaveInfoGroup.class}) private String categoryName; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java index b29c853eec..7015ade670 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java @@ -22,9 +22,6 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.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.GuideCategoryDTO; import com.epmet.dto.form.EditGuideCategoryFormDTO; import com.epmet.dto.form.GuideCateOrderFormDTO; @@ -33,7 +30,10 @@ import com.epmet.dto.form.GuideCategoryPageFormDTO; import com.epmet.dto.result.GuideDictResDTO; import com.epmet.service.GuideCategoryService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import java.util.List; @@ -111,7 +111,7 @@ public class GuideCategoryController { @PostMapping("disable") public Result disable(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ formDTO.setStaffId(tokenDto.getUserId()); - ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.AddUserInternalGroup.class,EditGuideCategoryFormDTO.StatusGroup.class); + ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.StatusGroup.class,EditGuideCategoryFormDTO.AddUserInternalGroup.class); guideCategoryService.disableGuideCategory(formDTO); return new Result(); } @@ -134,19 +134,38 @@ public class GuideCategoryController { } - @PostMapping - public Result save(@RequestBody GuideCategoryDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - guideCategoryService.save(dto); + /** + * 新增分类,名称和编码客户内唯一 + * + * @param tokenDto + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @date 2021/9/8 5:11 下午 + */ + @PostMapping("save") + public Result save(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.AddUserInternalGroup.class,EditGuideCategoryFormDTO.SaveInfoGroup.class); + guideCategoryService.save(formDTO); return new Result(); } - @PutMapping - public Result update(@RequestBody GuideCategoryDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - guideCategoryService.update(dto); + + /** + * 编辑名称 + * + * @param tokenDto + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @date 2021/9/8 5:37 下午 + */ + @PostMapping("update") + public Result update(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.AddUserInternalGroup.class,EditGuideCategoryFormDTO.UpdateInfoGroup.class); + guideCategoryService.update(formDTO); return new Result(); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java index 7f66753eca..71f757fd23 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java @@ -89,4 +89,10 @@ public interface GuideCategoryDao extends BaseDao { * @date 2021/9/8 4:36 下午 */ int selectGuideTotal(@Param("id") String id,@Param("customerId") String customerId); + + int selectCategoryName(@Param("categoryName") String categoryName, @Param("customerId")String customerId, @Param("excludeId") String excludeId); + + int selectCurrentOrder(String customerId); + + int selectCategoryCode(@Param("categoryCode") String categoryCode, @Param("customerId")String customerId, @Param("excludeId") String excludeId); } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java index 905ea44517..f652f1036a 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java @@ -86,7 +86,7 @@ public interface GuideCategoryService extends BaseService { * @author generator * @date 2021-09-06 */ - void save(GuideCategoryDTO dto); + void save(EditGuideCategoryFormDTO dto); /** * 默认更新 @@ -96,7 +96,7 @@ public interface GuideCategoryService extends BaseService { * @author generator * @date 2021-09-06 */ - void update(GuideCategoryDTO dto); + void update(EditGuideCategoryFormDTO dto); /** * 删除分类,存在办事指南的不允许删除,给予提示 diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java index 020ee7848b..44ceab9717 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java @@ -25,6 +25,7 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Pinyin4jUtil; import com.epmet.dao.GuideCategoryDao; import com.epmet.dto.GuideCategoryDTO; import com.epmet.dto.form.EditGuideCategoryFormDTO; @@ -158,20 +159,49 @@ public class GuideCategoryServiceImpl extends BaseServiceImpl 0) { + throw new RenException(EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getCode(), EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getMsg()); + } + String categoryCode = Pinyin4jUtil.getFirstSpellPinYin(dto.getCategoryName(), true); + if (baseDao.selectCategoryCode(categoryCode, dto.getCustomerId(), null) > 0) { + throw new RenException(EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getCode(), EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getMsg()); + } + GuideCategoryEntity entity = new GuideCategoryEntity(); + entity.setCustomerId(dto.getCustomerId()); + entity.setCategoryName(dto.getCategoryName()); + entity.setCategoryCode(categoryCode); + int currentMax = baseDao.selectCurrentOrder(dto.getCustomerId()); + entity.setSort(currentMax == 0 ? currentMax : currentMax + 1); + entity.setStatus(Constant.ENABLE); insert(entity); } @Override @Transactional(rollbackFor = Exception.class) - public void update(GuideCategoryDTO dto) { - GuideCategoryEntity entity = ConvertUtils.sourceToTarget(dto, GuideCategoryEntity.class); - updateById(entity); + public void update(EditGuideCategoryFormDTO dto) { + if (baseDao.selectCategoryName(dto.getCategoryName().trim(), dto.getCustomerId(), dto.getId()) > 0) { + throw new RenException(EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getCode(), EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getMsg()); + } + String categoryCode = Pinyin4jUtil.getFirstSpellPinYin(dto.getCategoryName(), true); + if (baseDao.selectCategoryCode(categoryCode, dto.getCustomerId(), dto.getId()) > 0) { + throw new RenException(EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getCode(), EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getMsg()); + } + GuideCategoryEntity origin=baseDao.selectById(dto.getId()); + origin.setCategoryCode(categoryCode); + origin.setCategoryName(dto.getCategoryName()); + updateById(origin); } - /** * 删除分类,存在办事指南的不允许删除,给予提示 * diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml index 6baff0aed8..7bd2f78df8 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml @@ -90,4 +90,41 @@ AND gc.id = #{id} ) + + + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java index 04962a5396..7de2636450 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * 获取pc工作端登陆用户信息 @@ -60,4 +61,10 @@ public class StaffBasicInfoResultDTO implements Serializable { * 状态 0:停用 1:正常 */ private Integer status; + + /** + * 工作人员的所有角色key,09.08新增:工作端PC端用到了 + */ + private List roleList; + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java index d0679eb2b6..97e4bf7424 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java @@ -213,4 +213,6 @@ public interface CustomerStaffDao extends BaseDao { * @return */ List listDTOS(@Param("customerId") String customerId, @Param("realName") String realName, @Param("mobile") String mobile, @Param("userIds") List userIds); + + List selectStaffRoles(@Param("userId") String userId,@Param("customerId") String customerId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 740b4b8d6e..989b86924d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -703,6 +703,9 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl selectStaffBasicInfo(String userId) { StaffBasicInfoResultDTO resultDTO = baseDao.selectStaffBasicInfo(userId); + if(null!=resultDTO){ + resultDTO.setRoleList(baseDao.selectStaffRoles(userId,resultDTO.getCustomerId())); + } return new Result().ok(resultDTO); } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml index 9e3265747c..4448cb0566 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml @@ -416,4 +416,14 @@ ) + From 1556f334df998c6eb317946eea5bb47bd557be81 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 8 Sep 2021 18:07:07 +0800 Subject: [PATCH 20/43] bugfix --- .../com/epmet/controller/GuideCategoryController.java | 10 ++++------ .../java/com/epmet/service/GuideCategoryService.java | 4 ++-- .../epmet/service/impl/GuideCategoryServiceImpl.java | 6 ++++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java index 7015ade670..b1e8824223 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java @@ -144,11 +144,10 @@ public class GuideCategoryController { * @date 2021/9/8 5:11 下午 */ @PostMapping("save") - public Result save(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ + public Result save(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ formDTO.setStaffId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.AddUserInternalGroup.class,EditGuideCategoryFormDTO.SaveInfoGroup.class); - guideCategoryService.save(formDTO); - return new Result(); + return new Result().ok(guideCategoryService.save(formDTO)); } @@ -162,11 +161,10 @@ public class GuideCategoryController { * @date 2021/9/8 5:37 下午 */ @PostMapping("update") - public Result update(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ + public Result update(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ formDTO.setStaffId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.AddUserInternalGroup.class,EditGuideCategoryFormDTO.UpdateInfoGroup.class); - guideCategoryService.update(formDTO); - return new Result(); + return new Result().ok(guideCategoryService.update(formDTO)); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java index f652f1036a..5bde4619e6 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java @@ -86,7 +86,7 @@ public interface GuideCategoryService extends BaseService { * @author generator * @date 2021-09-06 */ - void save(EditGuideCategoryFormDTO dto); + GuideCategoryDTO save(EditGuideCategoryFormDTO dto); /** * 默认更新 @@ -96,7 +96,7 @@ public interface GuideCategoryService extends BaseService { * @author generator * @date 2021-09-06 */ - void update(EditGuideCategoryFormDTO dto); + GuideCategoryDTO update(EditGuideCategoryFormDTO dto); /** * 删除分类,存在办事指南的不允许删除,给予提示 diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java index 44ceab9717..6f3f7a082a 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java @@ -169,7 +169,7 @@ public class GuideCategoryServiceImpl extends BaseServiceImpl 0) { throw new RenException(EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getCode(), EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getMsg()); } @@ -185,11 +185,12 @@ public class GuideCategoryServiceImpl extends BaseServiceImpl 0) { throw new RenException(EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getCode(), EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getMsg()); } @@ -201,6 +202,7 @@ public class GuideCategoryServiceImpl extends BaseServiceImpl Date: Wed, 8 Sep 2021 18:07:54 +0800 Subject: [PATCH 21/43] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=8A=9E=E4=BA=8B?= =?UTF-8?q?=E6=8C=87=E5=8D=97=E5=86=85=E5=AE=B9=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GuideModuleDictDefaultService.java | 9 ++++ .../epmet/service/GuideModuleDictService.java | 10 +++++ .../GuideModuleDictDefaultServiceImpl.java | 14 ++++++ .../impl/GuideModuleDictServiceImpl.java | 43 +++++++++++++++++++ .../epmet/service/impl/GuideServiceImpl.java | 3 ++ 5 files changed, 79 insertions(+) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictDefaultService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictDefaultService.java index 1af3f23de9..2bf1b3aac7 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictDefaultService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictDefaultService.java @@ -92,4 +92,13 @@ public interface GuideModuleDictDefaultService extends BaseService} + * @Author zhaoqifeng + * @Date 2021/9/8 17:44 + */ + List getList(); } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictService.java index 50ea1e80e0..7f1ae4a0e4 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictService.java @@ -20,6 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.GuideModuleDictDTO; +import com.epmet.dto.ModuleDTO; import com.epmet.entity.GuideModuleDictEntity; import java.util.List; @@ -92,4 +93,13 @@ public interface GuideModuleDictService extends BaseService} + * @Author zhaoqifeng + * @Date 2021/9/8 17:50 + */ + List getModuleList(String customerId); } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictDefaultServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictDefaultServiceImpl.java index 6be5e56dc4..ecc0fff0bb 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictDefaultServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictDefaultServiceImpl.java @@ -97,4 +97,18 @@ public class GuideModuleDictDefaultServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2021/9/8 17:44 + */ + @Override + public List getList() { + QueryWrapper wrapper = new QueryWrapper<>(); + return ConvertUtils.sourceToTarget(baseDao.selectList(wrapper), GuideModuleDictDefaultDTO.class); + } + } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictServiceImpl.java index c758eebdad..72bfeb9d05 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictServiceImpl.java @@ -17,6 +17,7 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -25,15 +26,21 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.GuideModuleDictDao; import com.epmet.dto.GuideModuleDictDTO; +import com.epmet.dto.GuideModuleDictDefaultDTO; +import com.epmet.dto.ModuleDTO; import com.epmet.entity.GuideModuleDictEntity; +import com.epmet.service.GuideModuleDictDefaultService; import com.epmet.service.GuideModuleDictService; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 指南模块字典表 @@ -44,6 +51,8 @@ import java.util.Map; @Service public class GuideModuleDictServiceImpl extends BaseServiceImpl implements GuideModuleDictService { + @Resource + private GuideModuleDictDefaultService guideModuleDictDefaultService; @Override public PageData page(Map params) { @@ -97,4 +106,38 @@ public class GuideModuleDictServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2021/9/8 17:50 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public List getModuleList(String customerId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(GuideModuleDictEntity::getCustomerId, customerId); + wrapper.orderByAsc(GuideModuleDictEntity::getSort); + List list = baseDao.selectList(wrapper); + //结果为空,初始化默认配置 + if (CollectionUtils.isEmpty(list)) { + List defaultList = guideModuleDictDefaultService.getList(); + List moduleList = ConvertUtils.sourceToTarget(defaultList, GuideModuleDictEntity.class); + moduleList.forEach(item -> { + item.setCustomerId(customerId); + }); + insertBatch(moduleList); + list = baseDao.selectList(wrapper); + } + return list.stream().map(item -> { + ModuleDTO dto = new ModuleDTO(); + dto.setModuleId(item.getId()); + dto.setModuleValue(item.getModuleValue()); + dto.setModuleName(item.getModuleName()); + return dto; + }).collect(Collectors.toList()); + } + } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java index d8a2d2deeb..ac643590eb 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java @@ -165,6 +165,7 @@ public class GuideServiceImpl extends BaseServiceImpl imp * @Date 2021/9/7 14:12 */ @Override + @Transactional(rollbackFor = Exception.class) public void guideAdd(TokenDto tokenDto, GuideAddFormDTO formDTO) { if (CollectionUtils.isEmpty(formDTO.getModuleList()) && CollectionUtils.isEmpty(formDTO.getAttachmentList()) && CollectionUtils.isEmpty(formDTO.getExternalLinks())) { @@ -251,6 +252,7 @@ public class GuideServiceImpl extends BaseServiceImpl imp * @Date 2021/9/7 14:12 */ @Override + @Transactional(rollbackFor = Exception.class) public void guideEdit(GuideEditFormDTO formDTO) { if (CollectionUtils.isEmpty(formDTO.getModuleList()) && CollectionUtils.isEmpty(formDTO.getAttachmentList()) && CollectionUtils.isEmpty(formDTO.getExternalLinks())) { @@ -342,6 +344,7 @@ public class GuideServiceImpl extends BaseServiceImpl imp * @Date 2021/9/7 14:12 */ @Override + @Transactional(rollbackFor = Exception.class) public void guideDel(GuideFormDTO formDTO) { GuideDTO guide = get(formDTO.getGuideId()); if (!formDTO.getStaffId().equals(guide.getCreatedBy())) { From 71fe7cacd7208901a9bec8289ce2ef2ecbd25b45 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 9 Sep 2021 09:53:32 +0800 Subject: [PATCH 22/43] =?UTF-8?q?/oper/crm/customer/getcostomerInfo?= =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=8C=E5=A6=82=E6=9E=9C=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E5=B7=B2=E5=88=A0=E9=99=A4=EF=BC=8C=E4=B8=8D=E8=A6=81=E6=8A=A5?= =?UTF-8?q?=E7=A9=BA=E6=8C=87=E9=92=88=EF=BC=8Cuser=E3=80=81crm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/CustomerServiceImpl.java | 4 ++++ .../java/com/epmet/service/impl/UserAdviceServiceImpl.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java index f66c547f6c..3b31e4feac 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java @@ -215,6 +215,10 @@ public class CustomerServiceImpl extends BaseServiceImpl getCustomerInfo(CustomerDTO dto) { CustomerEntity entity = baseDao.selectById(dto.getId()); + if (null == entity) { + log.warn(String.format("当前客户id:%s,已删除", dto.getId())); + return new Result(); + } List customerIds=customerRelationService.getAllSubCustomerIds(dto.getId()); CustomerDTO customerDTO=ConvertUtils.sourceToTarget(entity, CustomerDTO.class); if(CollectionUtils.isEmpty(customerIds)){ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserAdviceServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserAdviceServiceImpl.java index bdf908849f..3f189b5426 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserAdviceServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserAdviceServiceImpl.java @@ -334,7 +334,7 @@ public class UserAdviceServiceImpl extends BaseServiceImpl customerInfo = operCrmOpenFeignClient.getCustomerInfo(customerDTO); - if (customerInfo.success()){ + if (customerInfo.success() && null != customerInfo.getData()) { userAdviceDTO.setCustomerName(customerInfo.getData().getCustomerName()); }else { logger.error("customerId:{},获取customerName失败",dto.getCustomerId()); From 04bdc9b6589b6a1137117724ca22c865bd3ed77e Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 9 Sep 2021 10:41:22 +0800 Subject: [PATCH 23/43] =?UTF-8?q?=E6=8C=87=E5=8D=97=E6=94=B6=E8=97=8F?= =?UTF-8?q?=E5=92=8C=E6=88=91=E7=9A=84=E6=94=B6=E8=97=8F=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/GuideListFormDTO.java | 1 + .../controller/GuideCollectionController.java | 18 ++++++++++ .../com/epmet/controller/GuideController.java | 8 +++++ .../src/main/java/com/epmet/dao/GuideDao.java | 11 ++++++ .../epmet/service/GuideCollectionService.java | 12 +++++++ .../java/com/epmet/service/GuideService.java | 11 ++++++ .../impl/GuideCollectionServiceImpl.java | 35 +++++++++++++++++++ .../epmet/service/impl/GuideServiceImpl.java | 27 ++++++++++++++ .../src/main/resources/mapper/GuideDao.xml | 18 +++++++++- 9 files changed, 140 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideListFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideListFormDTO.java index d4ff3bdfcb..2e36d7c517 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideListFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideListFormDTO.java @@ -16,6 +16,7 @@ import java.io.Serializable; public class GuideListFormDTO extends PageFormDTO implements Serializable { private static final long serialVersionUID = -4471422632936288213L; + private String customerId; /** * 组织ID */ diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCollectionController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCollectionController.java index 08f94a4126..5c6ffe5019 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCollectionController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCollectionController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -25,6 +27,7 @@ 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.GuideCollectionDTO; +import com.epmet.dto.form.GuideFormDTO; import com.epmet.service.GuideCollectionService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -81,4 +84,19 @@ public class GuideCollectionController { return new Result(); } + /** + * @Description 收藏指南 + * @Param tokenDto + * @Param formDTO + * @Return {@link Result} + * @Author zhaoqifeng + * @Date 2021/9/9 9:46 + */ + @PostMapping("collection") + public Result collection(@LoginUser TokenDto tokenDto, @RequestBody GuideFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + guideCollectionService.collection(tokenDto, formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java index 602916807e..c9b9ccfead 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java @@ -169,4 +169,12 @@ public class GuideController { } + @PostMapping("collectionlist") + public Result> collectionList(@LoginUser TokenDto tokenDto, @RequestBody PageFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); + PageData page = guideService.collectionList(tokenDto, formDTO); + return new Result>().ok(page); + } + + } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideDao.java index ec78fb5803..77d3f6e805 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideDao.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.form.GuideListFormDTO; import com.epmet.dto.result.GuideDetailResultDTO; import com.epmet.dto.result.GuideListResultDTO; @@ -56,4 +57,14 @@ public interface GuideDao extends BaseDao { */ GuideDetailResultDTO getGuideDetail(@Param("guideId") String guideId); + /** + * 收藏列表 + * + * @Param tokenDto + * @Return {@link List< GuideListResultDTO>} + * @Author zhaoqifeng + * @Date 2021/9/9 10:09 + */ + List getCollectionList(TokenDto tokenDto); + } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java index 6e8266c556..a4acb0b6e4 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java @@ -19,7 +19,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.GuideCollectionDTO; +import com.epmet.dto.form.GuideFormDTO; import com.epmet.entity.GuideCollectionEntity; import java.util.List; @@ -92,4 +94,14 @@ public interface GuideCollectionService extends BaseService { * @Date 2021/9/7 14:12 */ GuideDetailResultDTO guideDetail(GuideFormDTO formDTO); + + /** + * @Description 收藏列表 + * @Param tokenDto + * @Param formDTO + * @Return {@link PageData< GuideListResultDTO>} + * @Author zhaoqifeng + * @Date 2021/9/9 10:07 + */ + PageData collectionList(TokenDto tokenDto, PageFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java index a73d8228ee..382a9db1ce 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java @@ -17,14 +17,17 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.GuideCollectionDao; import com.epmet.dto.GuideCollectionDTO; +import com.epmet.dto.form.GuideFormDTO; import com.epmet.entity.GuideCollectionEntity; import com.epmet.service.GuideCollectionService; import org.apache.commons.lang3.StringUtils; @@ -97,4 +100,36 @@ public class GuideCollectionServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(GuideCollectionEntity::getGuideId, formDTO.getGuideId()); + wrapper.eq(GuideCollectionEntity::getUserId, tokenDto.getUserId()); + wrapper.eq(GuideCollectionEntity::getApp, tokenDto.getApp()); + wrapper.eq(GuideCollectionEntity::getCustomerId, tokenDto.getCustomerId()); + GuideCollectionEntity entity = baseDao.selectOne(wrapper); + //如果没有收藏记录,则添加收藏,有就删除收藏 + if (null == entity) { + entity = new GuideCollectionEntity(); + entity.setCustomerId(tokenDto.getCustomerId()); + entity.setUserId(tokenDto.getUserId()); + entity.setGuideId(formDTO.getGuideId()); + entity.setApp(tokenDto.getApp()); + insert(entity); + } else { + deleteById(entity.getId()); + } + } + } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java index ac643590eb..abd1116256 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java @@ -21,6 +21,7 @@ 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.dto.form.PageFormDTO; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; @@ -142,6 +143,7 @@ public class GuideServiceImpl extends BaseServiceImpl imp @Override public PageData guideList(TokenDto tokenDto, GuideListFormDTO formDTO) { PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + formDTO.setCustomerId(tokenDto.getCustomerId()); List list = baseDao.getGuideList(formDTO); list.forEach(item -> { CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), item.getCreatedId()); @@ -382,4 +384,29 @@ public class GuideServiceImpl extends BaseServiceImpl imp return result; } + /** + * @param tokenDto + * @Description 收藏列表 + * @Param tokenDto + * @Param formDTO + * @Return {@link PageData< GuideListResultDTO>} + * @Author zhaoqifeng + * @Date 2021/9/9 10:03 + */ + @Override + public PageData collectionList(TokenDto tokenDto, PageFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = baseDao.getCollectionList(tokenDto); + list.forEach(item -> { + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), item.getCreatedId()); + if (null == staffInfoCache) { + item.setCategoryName(""); + } else { + item.setCreatedName(staffInfoCache.getRealName()); + } + }); + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal()); + } + } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml index 82a784dbe9..c557360208 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml @@ -29,8 +29,9 @@ g.UPDATED_TIME AS updatedTime, FROM guide g - INNER JOIN guide_category gc ON g.CATEGORY_ID = gc.ID + INNER JOIN guide_category gc ON g.CATEGORY_ID = gc.ID AND gc.DEL_FLAG = 0 AND gc.CUSTOMER_ID = #{customerId} WHERE g.DEL_FLAG = 0 + AND g.CUSTOMER_ID = #{customerId} AND g.PIDS LIKE CONCAT( '%', #{agencyId}, '%' ) @@ -56,6 +57,21 @@ WHERE g.ID = #{guideId} + \ No newline at end of file From 02af83b58b2b51513373a4568a3ed5538c375670 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 9 Sep 2021 10:47:47 +0800 Subject: [PATCH 24/43] =?UTF-8?q?=E6=8C=87=E5=8D=97=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/result/GuideDetailResultDTO.java | 2 +- .../gov-voice-server/src/main/resources/mapper/GuideDao.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDetailResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDetailResultDTO.java index 2987b227a0..88844f301c 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDetailResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDetailResultDTO.java @@ -30,7 +30,7 @@ public class GuideDetailResultDTO implements Serializable { /** * 分类ID */ - private String categoryId; + private String categoryCode; /** * 分类名 */ diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml index c557360208..6c1afa1cf6 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml @@ -49,7 +49,7 @@ ORG_ID, ORG_NAME, TITLE, - CATEGORY_CODE + CATEGORY_CODE, CATEGORY_NAME FROM guide g From 40ad19b6f3d1b231e4b2bce0f8fc94123826ebc5 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 9 Sep 2021 11:08:53 +0800 Subject: [PATCH 25/43] =?UTF-8?q?=E6=8C=87=E5=8D=97=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/GuideServiceImpl.java | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java index abd1116256..0d06633106 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java @@ -145,14 +145,16 @@ public class GuideServiceImpl extends BaseServiceImpl imp PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); formDTO.setCustomerId(tokenDto.getCustomerId()); List list = baseDao.getGuideList(formDTO); - list.forEach(item -> { - CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), item.getCreatedId()); - if (null == staffInfoCache) { - item.setCategoryName(""); - } else { - item.setCreatedName(staffInfoCache.getRealName()); - } - }); + if (CollectionUtils.isNotEmpty(list)) { + list.forEach(item -> { + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), item.getCreatedId()); + if (null == staffInfoCache) { + item.setCategoryName(""); + } else { + item.setCreatedName(staffInfoCache.getRealName()); + } + }); + } PageInfo pageInfo = new PageInfo<>(list); return new PageData<>(list, pageInfo.getTotal()); } @@ -397,14 +399,16 @@ public class GuideServiceImpl extends BaseServiceImpl imp public PageData collectionList(TokenDto tokenDto, PageFormDTO formDTO) { PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); List list = baseDao.getCollectionList(tokenDto); - list.forEach(item -> { - CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), item.getCreatedId()); - if (null == staffInfoCache) { - item.setCategoryName(""); - } else { - item.setCreatedName(staffInfoCache.getRealName()); - } - }); + if (CollectionUtils.isNotEmpty(list)) { + list.forEach(item -> { + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), item.getCreatedId()); + if (null == staffInfoCache) { + item.setCategoryName(""); + } else { + item.setCreatedName(staffInfoCache.getRealName()); + } + }); + } PageInfo pageInfo = new PageInfo<>(list); return new PageData<>(list, pageInfo.getTotal()); } From a36d41696e916f425f2cfdb7c6f2ac3ebe2a473f Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 9 Sep 2021 11:55:20 +0800 Subject: [PATCH 26/43] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=B8=8B=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E6=A0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/CustomerAgencyDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index 2799ea36a0..481d222f04 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -526,7 +526,7 @@ AND PID= #{pid} ORDER BY ID - select ID AS agencyId, ORGANIZATION_NAME AS agencyName, From 7c465452e377eba37970d87b2caa72d49f1a5c4a Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 9 Sep 2021 12:01:41 +0800 Subject: [PATCH 27/43] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=B8=8B=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E6=A0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/CustomerAgencyDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index 481d222f04..89a5df87f4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -510,7 +510,7 @@ - From 9ecc4f4e1865ba6867448c5a676465772d13b8c3 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 9 Sep 2021 13:56:04 +0800 Subject: [PATCH 28/43] =?UTF-8?q?=E6=8C=87=E5=8D=97=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/GuideDao.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml index 6c1afa1cf6..037eabb07f 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml @@ -24,12 +24,12 @@ SELECT g.ID AS "guideId", g.TITLE AS "title", - gc.CATEGORY_NAME AS categoryName, - g.CREATED_BY AS createdId, - g.UPDATED_TIME AS updatedTime, + gc.CATEGORY_NAME AS "categoryName", + g.CREATED_BY AS "createdId", + g.UPDATED_TIME AS "updatedTime" FROM guide g - INNER JOIN guide_category gc ON g.CATEGORY_ID = gc.ID AND gc.DEL_FLAG = 0 AND gc.CUSTOMER_ID = #{customerId} + INNER JOIN guide_category gc ON g.CATEGORY_CODE = gc.CATEGORY_CODE AND gc.DEL_FLAG = 0 AND gc.CUSTOMER_ID = #{customerId} WHERE g.DEL_FLAG = 0 AND g.CUSTOMER_ID = #{customerId} @@ -41,6 +41,7 @@ AND g.CATEGORY_ID = #{categoryId} + ORDER BY g.CREATED_TIME DESC From 1783725b734797072806a569da85a9d5a94b6086 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 10 Sep 2021 10:02:46 +0800 Subject: [PATCH 37/43] =?UTF-8?q?=E6=8C=87=E5=8D=97=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=98=B2=E6=AD=A2=E6=8A=A5=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/GuideController.java | 2 +- .../epmet/service/GuideCollectionService.java | 10 +++++++++ .../java/com/epmet/service/GuideService.java | 3 ++- .../impl/GuideCollectionServiceImpl.java | 22 +++++++++++++++++++ .../epmet/service/impl/GuideServiceImpl.java | 15 ++++++++----- 5 files changed, 45 insertions(+), 7 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java index c9b9ccfead..88d8115216 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java @@ -164,7 +164,7 @@ public class GuideController { public Result guideDetail(@LoginUser TokenDto tokenDto, @RequestBody GuideFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); formDTO.setCustomerId(tokenDto.getCustomerId()); - GuideDetailResultDTO result = guideService.guideDetail(formDTO); + GuideDetailResultDTO result = guideService.guideDetail(tokenDto, formDTO); return new Result().ok(result); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java index a4acb0b6e4..bd2e97c482 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java @@ -104,4 +104,14 @@ public interface GuideCollectionService extends BaseService { /** * 指南详情 * + * @Param tokenDto * @Param formDTO * @Return {@link GuideDetailResultDTO} * @Author zhaoqifeng * @Date 2021/9/7 14:12 */ - GuideDetailResultDTO guideDetail(GuideFormDTO formDTO); + GuideDetailResultDTO guideDetail(TokenDto tokenDto, GuideFormDTO formDTO); /** * @Description 收藏列表 diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java index 382a9db1ce..ef0696fa12 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java @@ -132,4 +132,26 @@ public class GuideCollectionServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(GuideCollectionEntity::getGuideId, guideId); + wrapper.eq(GuideCollectionEntity::getUserId, tokenDto.getUserId()); + wrapper.eq(GuideCollectionEntity::getApp, tokenDto.getApp()); + wrapper.eq(GuideCollectionEntity::getCustomerId, tokenDto.getCustomerId()); + GuideCollectionEntity entity = baseDao.selectOne(wrapper); + return ConvertUtils.sourceToTarget(entity, GuideCollectionDTO.class); + } + } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java index 6bfbb59e41..d93f21b2af 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java @@ -21,6 +21,7 @@ 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.constant.NumConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; @@ -42,10 +43,7 @@ import com.epmet.entity.GuideEntity; import com.epmet.entity.GuideExternalLinkEntity; import com.epmet.entity.GuideModuleEntity; import com.epmet.feign.GovOrgOpenFeignClient; -import com.epmet.service.GuideAttachmentService; -import com.epmet.service.GuideExternalLinkService; -import com.epmet.service.GuideModuleService; -import com.epmet.service.GuideService; +import com.epmet.service.*; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.collections4.CollectionUtils; @@ -77,6 +75,8 @@ public class GuideServiceImpl extends BaseServiceImpl imp private GuideAttachmentService guideAttachmentService; @Resource private GuideExternalLinkService guideExternalLinkService; + @Resource + private GuideCollectionService guideCollectionService; @Override public PageData page(Map params) { @@ -373,7 +373,7 @@ public class GuideServiceImpl extends BaseServiceImpl imp * @Date 2021/9/7 14:12 */ @Override - public GuideDetailResultDTO guideDetail(GuideFormDTO formDTO) { + public GuideDetailResultDTO guideDetail(TokenDto tokenDto, GuideFormDTO formDTO) { //获取指南详情 GuideDetailResultDTO result = baseDao.getGuideDetail(formDTO.getCustomerId(), formDTO.getGuideId()); if (null == result) { @@ -385,6 +385,11 @@ public class GuideServiceImpl extends BaseServiceImpl imp result.setAttachmentList(guideAttachmentService.getByGuideId(formDTO.getGuideId())); //获取指南外链地址 result.setExternalLinks(guideExternalLinkService.getByGuideId(formDTO.getGuideId())); + //是否收藏 + result.setCollectionFlag(NumConstant.ZERO_STR); + if (null != guideCollectionService.getCollection(tokenDto, formDTO.getGuideId())) { + result.setCollectionFlag(NumConstant.ONE_STR); + } return result; } From abb5e472b4812fc5be26f2fc81c7f77e7ff7aeb0 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 10 Sep 2021 17:31:57 +0800 Subject: [PATCH 38/43] =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E7=A7=AF=E5=88=86=E6=8E=92=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/BizPointUserTotalDetailDTO.java | 5 +- .../dto/result/GridPointRankResultDTO.java | 21 +++ .../dto/result/MyPointRankResultDTO.java | 21 +++ .../epmet/controller/ResiPointController.java | 30 ++++ .../dao/UserPointStatisticalDailyDao.java | 6 + .../UserPointStatisticalDailyService.java | 26 +++- .../UserPointStatisticalDailyServiceImpl.java | 144 +++++++++++++++++- .../mapper/UserPointStatisticalDailyDao.xml | 50 ++++++ 8 files changed, 298 insertions(+), 5 deletions(-) create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/GridPointRankResultDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyPointRankResultDTO.java diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/BizPointUserTotalDetailDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/BizPointUserTotalDetailDTO.java index 3e5dc04f11..fde907f861 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/BizPointUserTotalDetailDTO.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/BizPointUserTotalDetailDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -103,4 +104,6 @@ public class BizPointUserTotalDetailDTO implements Serializable { */ private Date updatedTime; + private String rank; + } \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/GridPointRankResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/GridPointRankResultDTO.java new file mode 100644 index 0000000000..2ef1819bcc --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/GridPointRankResultDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/9/10 14:11 + */ +@NoArgsConstructor +@Data +public class GridPointRankResultDTO implements Serializable { + + private static final long serialVersionUID = 3288606889536923166L; + private String gridName; + private String agencyRank; + private String customerRank; +} diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyPointRankResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyPointRankResultDTO.java new file mode 100644 index 0000000000..484c8f8055 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyPointRankResultDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/9/10 13:44 + */ +@NoArgsConstructor +@Data +public class MyPointRankResultDTO implements Serializable { + + private static final long serialVersionUID = -2438231097029179782L; + private String headPhoto; + private String gridRank; + private String customerRank; +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java index 9f5ee8acf8..dbef30e35f 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java @@ -190,4 +190,34 @@ public class ResiPointController { ValidatorUtils.validateEntity(formDTO); return new Result>().ok(pointActionLogService.queryMyPointTaskList(formDTO)); } + + /** + * @Description 个人当月积分在网格和客户中的排名 + * @Param tokenDto + * @Param formDTO + * @Return {@link Result< MyPointTaskResultDTO>} + * @Author zhaoqifeng + * @Date 2021/9/10 14:13 + */ + @PostMapping("mypointrank") + public Result myPointRank(@LoginUser TokenDto tokenDto, @RequestBody GroupPointFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.GridRank.class); + return new Result().ok(userPointStatisticalDailyService.myPointRank(tokenDto, formDTO)); + } + + /** + * @Description 网格当月积分在组织和客户内排名 + * @Param tokenDto + * @Param formDTO + * @Return {@link Result} + * @Author zhaoqifeng + * @Date 2021/9/10 14:13 + */ + @PostMapping("gridpointrank") + public Result gridPointRank(@LoginUser TokenDto tokenDto, @RequestBody GroupPointFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.GridRank.class); + return new Result().ok(userPointStatisticalDailyService.gridPointRank(tokenDto, formDTO)); + } + + } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java index 2ae8bb24f5..2966e00f75 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.BizPointUserTotalDetailDTO; import com.epmet.dto.form.ResiAroundPartyPointRankFormDTO; import com.epmet.dto.result.AllPartyResultDTO; import com.epmet.dto.result.ResiAroundPartyPointRankResultDTO; @@ -85,4 +86,9 @@ public interface UserPointStatisticalDailyDao extends BaseDao selectListGridPartyRankByMonth(ResiAroundPartyPointRankFormDTO formDTO); List selectListGridPartyNewRankByMonth(ResiAroundPartyPointRankFormDTO formDTO); + + List selectUserPointByMonth(@Param("customerId") String customerId, @Param("agencyId") String agencyId, + @Param("gridId") String gridId); + + List selectGridPointByMonth(@Param("customerId") String customerId, @Param("agencyId") String agencyId); } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java index 1a82b5ca14..a563768be5 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java @@ -19,13 +19,13 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.UserPointStatisticalDailyDTO; import com.epmet.dto.form.AllPartyFormDTO; +import com.epmet.dto.form.GroupPointFormDTO; import com.epmet.dto.form.ResiAroundPartyPointRankFormDTO; import com.epmet.dto.form.ResiPointRankFormDTO; -import com.epmet.dto.result.AllPartyResultDTO; -import com.epmet.dto.result.ResiAroundPartyPointRankResultDTO; -import com.epmet.dto.result.ResiPointRankListResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.UserPointStatisticalDailyEntity; import java.util.List; @@ -135,4 +135,24 @@ public interface UserPointStatisticalDailyService extends BaseService allParty(AllPartyFormDTO formDTO); + + /** + * @Description 个人当月积分在网格和客户中的排名 + * @Param tokenDto + * @Param formDTO + * @Return {@link MyPointRankResultDTO} + * @Author zhaoqifeng + * @Date 2021/9/10 14:18 + */ + MyPointRankResultDTO myPointRank(TokenDto tokenDto, GroupPointFormDTO formDTO); + + /** + * @Description 网格当月积分在组织和客户内排名 + * @Param tokenDto + * @Param formDTO + * @Return {@link GridPointRankResultDTO} + * @Author zhaoqifeng + * @Date 2021/9/10 14:18 + */ + GridPointRankResultDTO gridPointRank(TokenDto tokenDto, GroupPointFormDTO formDTO); } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java index c75edbae56..65f8916512 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java @@ -25,11 +25,14 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.UserPointStatisticalDailyDao; +import com.epmet.dto.BizPointUserTotalDetailDTO; import com.epmet.dto.UserPointStatisticalDailyDTO; import com.epmet.dto.form.AllPartyFormDTO; +import com.epmet.dto.form.GroupPointFormDTO; import com.epmet.dto.form.ResiAroundPartyPointRankFormDTO; import com.epmet.dto.form.ResiPointRankFormDTO; import com.epmet.dto.result.*; @@ -43,13 +46,14 @@ import com.epmet.utils.DimIdGenerator; import com.epmet.utils.ModuleConstant; import com.github.pagehelper.PageHelper; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.CollectionUtils; import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; /** @@ -326,6 +330,64 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl userIds = new ArrayList<>(); + userIds.add(tokenDto.getUserId()); + //获取我的个人信息 + Result> myInfoResult = epmetUserOpenFeignClient.queryUserBaseInfo(userIds); + if(!myInfoResult.success()){ + throw new RenException(myInfoResult.getCode(), myInfoResult.getMsg()); + } + MyPointRankResultDTO result = new MyPointRankResultDTO(); + result.setHeadPhoto(myInfoResult.getData().get(0).getHeadImgUrl()); + //获取客户下用户积分 + List list = getUserPointList(tokenDto.getCustomerId(), null, null); + result.setCustomerRank(getRank(list, tokenDto.getUserId())); + //获取网格用户积分 + List gridRankList = getUserPointList(tokenDto.getCustomerId(), null, formDTO.getGridId()); + result.setCustomerRank(getRank(gridRankList, tokenDto.getUserId())); + return result; + } + + /** + * @param tokenDto + * @param formDTO + * @Description 网格当月积分在组织和客户内排名 + * @Param tokenDto + * @Param formDTO + * @Return {@link GridPointRankResultDTO} + * @Author zhaoqifeng + * @Date 2021/9/10 14:18 + */ + @Override + public GridPointRankResultDTO gridPointRank(TokenDto tokenDto, GroupPointFormDTO formDTO) { + GridPointRankResultDTO result = new GridPointRankResultDTO(); + //获取网格信息 + Result gridInfoResult = govOrgOpenFeignClient.queryGridInfo(formDTO.getGridId()); + if (!gridInfoResult.success()) { + throw new RenException(gridInfoResult.getCode()); + } + result.setGridName(gridInfoResult.getData().getGridName()); + String agencyId = gridInfoResult.getData().getParentAgencyId(); + //获取客户下用户积分 + List list = getGridPointList(tokenDto.getCustomerId(), null); + result.setCustomerRank(getGridRank(list, formDTO.getGridId())); + List agencyPointList = getGridPointList(tokenDto.getCustomerId(), agencyId); + result.setAgencyRank(getGridRank(agencyPointList, formDTO.getGridId())); + return result; + } + /** * 获取认证通过的党员的 用户id * @@ -372,4 +434,84 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2021/9/10 15:04 + */ + private List getUserPointList(String customerId, String agencyId, String gridId) { + return baseDao.selectUserPointByMonth(customerId, agencyId, gridId); + } + + private List getGridPointList(String customerId, String agencyId) { + return baseDao.selectGridPointByMonth(customerId, agencyId); + } + + private Boolean havePoint(List list, String userId) { + Map map = list.stream().collect(Collectors.toMap(BizPointUserTotalDetailDTO::getUserId, BizPointUserTotalDetailDTO::getTotalPoint)); + return null != map.get(userId); + } + + + private String getGridRank(List list, String gridId) { + if (CollectionUtils.isEmpty(list)) { + return NumConstant.ONE_STR; + } + //如果当月网格没有积分变动,则积分为0 + Map map = list.stream().collect(Collectors.toMap(BizPointUserTotalDetailDTO::getGridId, BizPointUserTotalDetailDTO::getTotalPoint)); + if (null == map.get(gridId)) { + BizPointUserTotalDetailDTO dto = new BizPointUserTotalDetailDTO(); + dto.setGridId(gridId); + dto.setTotalPoint(NumConstant.ZERO); + list.add(dto); + } + //排序 + list = list.stream().sorted(Comparator.comparing(BizPointUserTotalDetailDTO :: getTotalPoint).reversed() + .thenComparing(BizPointUserTotalDetailDTO::getGridId)) + .collect(Collectors.toList()); + AtomicInteger i = new AtomicInteger(1); + AtomicInteger point = new AtomicInteger(0); + list.forEach(item -> { + if (item.getTotalPoint().equals(point.get())) { + item.setRank(String.valueOf(i)); + } else { + item.setRank(String.valueOf(i.getAndIncrement())); + } + point.set(item.getTotalPoint()); + }); + Map rankMap = list.stream().collect(Collectors.toMap(BizPointUserTotalDetailDTO::getGridId, BizPointUserTotalDetailDTO::getRank)); + return rankMap.get(gridId); + } + + private String getRank(List list, String userId) { + if (CollectionUtils.isEmpty(list)) { + return NumConstant.ONE_STR; + } + if (!havePoint(list, userId)) { + BizPointUserTotalDetailDTO dto = new BizPointUserTotalDetailDTO(); + dto.setUserId(userId); + dto.setTotalPoint(NumConstant.ZERO); + list.add(dto); + } + //排序 + list = list.stream().sorted(Comparator.comparing(BizPointUserTotalDetailDTO :: getTotalPoint).reversed() + .thenComparing(BizPointUserTotalDetailDTO::getUserId)) + .collect(Collectors.toList()); + AtomicInteger i = new AtomicInteger(1); + AtomicInteger point = new AtomicInteger(0); + list.forEach(item -> { + if (item.getTotalPoint().equals(point.get())) { + item.setRank(String.valueOf(i)); + } else { + item.setRank(String.valueOf(i.getAndIncrement())); + } + point.set(item.getTotalPoint()); + }); + Map map = list.stream().collect(Collectors.toMap(BizPointUserTotalDetailDTO::getUserId, BizPointUserTotalDetailDTO::getRank)); + return map.get(userId); + } } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml index 49179803c7..6bd5f6b76a 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml @@ -227,4 +227,54 @@ ORDER BY P.point DESC LIMIT #{pageNo}, #{pageSize} + + + From 71179f6cb7bcc942c92396be5358da80dfda6024 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 13 Sep 2021 14:07:24 +0800 Subject: [PATCH 39/43] =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/act/service/impl/GroupActInfoServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java index 41e77cee6a..9a44da87ea 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java @@ -929,17 +929,19 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl lineChart(){ + String year = String.valueOf(LocalDate.now().getYear()); List lineChart = new ArrayList<>(); for (int i = NumConstant.ONE; i <= NumConstant.TWELVE; i++) { OrganizationalLifeLineChartDTO dto = new OrganizationalLifeLineChartDTO(); if (i < NumConstant.TEN){ - dto.setMonth(NumConstant.ZERO + String.valueOf(i) + "月"); + dto.setMonth(year +"-"+NumConstant.ZERO + String.valueOf(i)); }else { - dto.setMonth(String.valueOf(i) + "月"); + dto.setMonth(year +"-"+ String.valueOf(i) + "月"); } lineChart.add(dto); } From 773a2d136b903a127c3f28aa4d806d1b7bb1410a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 13 Sep 2021 14:15:32 +0800 Subject: [PATCH 40/43] =?UTF-8?q?=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/act/service/impl/GroupActInfoServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java index 9a44da87ea..8fedb2b70b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java @@ -910,7 +910,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl lineChart = lineChart(); + List lineChart = lineChart(formDTO.getYearId()); if (!CollectionUtils.isEmpty(chartResult)){ Map> groupByMonth = chartResult.stream().collect(Collectors.groupingBy(OrganizationalLifeLineChartDTO::getMonth)); groupByMonth.forEach((month,list) -> { @@ -933,8 +933,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl lineChart(){ - String year = String.valueOf(LocalDate.now().getYear()); + public List lineChart(String yearId){ + String year = yearId.substring(NumConstant.ZERO,NumConstant.FOUR); List lineChart = new ArrayList<>(); for (int i = NumConstant.ONE; i <= NumConstant.TWELVE; i++) { OrganizationalLifeLineChartDTO dto = new OrganizationalLifeLineChartDTO(); From a0b75c9ad4631a71a4ef91f02b885d5a613eae50 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 13 Sep 2021 14:20:22 +0800 Subject: [PATCH 41/43] ....... --- .../epmet/modules/act/service/impl/GroupActInfoServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java index 8fedb2b70b..326380d48f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java @@ -941,7 +941,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Mon, 13 Sep 2021 15:23:15 +0800 Subject: [PATCH 42/43] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=A5=E5=8F=82?= =?UTF-8?q?=EF=BC=8C=E5=8E=9F=E6=9D=A5=E5=9B=BA=E5=AE=9A=E4=BB=8Etoken?= =?UTF-8?q?=E5=8F=96=EF=BC=8C=E6=94=B9=E4=B8=BA=E5=89=8D=E7=AB=AF=E4=BC=A0?= =?UTF-8?q?=EF=BC=8C=E6=B2=A1=E4=BC=A0=E4=BB=8Etoken=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/GetAgencyListFormDTO.java | 18 ++++++++++++++++++ .../controller/CustomerAgencyController.java | 7 +++++-- .../epmet/service/CustomerAgencyService.java | 2 +- .../impl/CustomerAgencyServiceImpl.java | 4 ++-- 4 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetAgencyListFormDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetAgencyListFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetAgencyListFormDTO.java new file mode 100644 index 0000000000..0d97988fd7 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetAgencyListFormDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/9/13 3:20 下午 + * @DESC + */ +@Data +public class GetAgencyListFormDTO implements Serializable { + + private static final long serialVersionUID = -5846836779036328298L; + + private String customerId; +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index 11d5e13542..c3937127ba 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -332,8 +332,11 @@ public class CustomerAgencyController { * @Date 2021/9/8 15:20 */ @PostMapping("agencylist") - public Result getAgencyList(@LoginUser TokenDto tokenDTO) { - return new Result().ok(customerAgencyService.getAgencyList(tokenDTO)); + public Result getAgencyList(@LoginUser TokenDto tokenDTO,@RequestBody GetAgencyListFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getCustomerId())){ + formDTO.setCustomerId(tokenDTO.getCustomerId()); + } + return new Result().ok(customerAgencyService.getAgencyList(formDTO)); } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java index c1a1915a72..b13bae23e7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java @@ -254,5 +254,5 @@ public interface CustomerAgencyService extends BaseService * @Author zhaoqifeng * @Date 2021/9/8 15:21 */ - AgencyTreeResultDTO getAgencyList(TokenDto tokenDTO); + AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index 4f1de1ae91..acacd98237 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -1099,8 +1099,8 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl Date: Tue, 14 Sep 2021 10:03:35 +0800 Subject: [PATCH 43/43] =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E7=A7=AF=E5=88=86=E6=8E=92=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/GroupPointFormDTO.java | 3 ++- .../main/java/com/epmet/controller/ResiPointController.java | 4 ++-- .../service/impl/UserPointStatisticalDailyServiceImpl.java | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java index b727bb5d1b..a90e01a1de 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java @@ -17,8 +17,9 @@ public class GroupPointFormDTO implements Serializable { public interface GroupPoint extends CustomerClientShowGroup {} public interface GridRank extends CustomerClientShowGroup {} + public interface PointRank extends CustomerClientShowGroup {} @NotBlank(message = "小组Id不能为空", groups = {GroupPoint.class, GridRank.class}) private String groupId; - @NotBlank(message = "网格Id不能为空", groups = {GridRank.class}) + @NotBlank(message = "网格Id不能为空", groups = {GridRank.class, PointRank.class}) private String gridId; } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java index dbef30e35f..795f557449 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java @@ -201,7 +201,7 @@ public class ResiPointController { */ @PostMapping("mypointrank") public Result myPointRank(@LoginUser TokenDto tokenDto, @RequestBody GroupPointFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.GridRank.class); + ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.PointRank.class); return new Result().ok(userPointStatisticalDailyService.myPointRank(tokenDto, formDTO)); } @@ -215,7 +215,7 @@ public class ResiPointController { */ @PostMapping("gridpointrank") public Result gridPointRank(@LoginUser TokenDto tokenDto, @RequestBody GroupPointFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.GridRank.class); + ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.PointRank.class); return new Result().ok(userPointStatisticalDailyService.gridPointRank(tokenDto, formDTO)); } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java index 65f8916512..5842e34bf6 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java @@ -356,7 +356,7 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl gridRankList = getUserPointList(tokenDto.getCustomerId(), null, formDTO.getGridId()); - result.setCustomerRank(getRank(gridRankList, tokenDto.getUserId())); + result.setGridRank(getRank(gridRankList, tokenDto.getUserId())); return result; }