From caefe9a9cc486247f831e46356b0b03ca450fdf9 Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期五, 25 二月 2022 10:14:36 +0800 Subject: [PATCH] Merge branch 'dev' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into dev --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamServiceImpl.java | 225 + springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventDetailsVO.java | 3 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/FeedbackFmsServiceDTO.java | 41 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsServiceServiceImpl.java | 425 ++ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsServiceEvaluationsServiceImpl.java | 54 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsClassroomService.java | 89 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamTypeMapper.xml | 38 springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml | 5 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsClassroomTopStatisticsVO.java | 23 springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java | 14 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditTeamDTO.java | 47 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsTeamDTO.java | 32 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComFmsApi.java | 518 +++ springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsClassroomAdminDTO.java | 45 springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComFmsApi.java | 663 ++++ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsServiceEvaluationsService.java | 22 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddFmsServiceAdminDTO.java | 64 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamMemberDAO.java | 89 springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/resources/bootstrap.yml | 1 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/CascadeCommVO.java | 31 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsServiceTopStatisticsVO.java | 32 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsServiceRecordService.java | 14 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsService.java | 97 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberExportExcelVO.java | 39 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamService.java | 66 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddTeamTypeDTO.java | 34 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsServiceRecordDAO.java | 39 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditTeamMemberDTO.java | 52 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComFmsServiceImportExcelListen.java | 176 + springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceEvaluateVO.java | 40 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/TeamMemberTopStatisticsVO.java | 23 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java | 692 ++++ springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsEventTopStatisticsVO.java | 23 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsServiceRecord.java | 57 springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/CommunityJobHandler.java | 11 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageTeamMemberDTO.java | 42 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddTeamMemberDTO.java | 50 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsServiceEvaluations.java | 49 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberVO.java | 50 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/EventMapper.java | 195 + springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceVO.java | 101 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsEventVO.java | 55 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/enums/PresetPictureType.java | 4 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/ApprovalFmsServiceAdminDTO.java | 36 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditTeamTypeDTO.java | 36 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsServiceAppletsDTO.java | 46 springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java | 8 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsServiceService.java | 123 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeamType.java | 49 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsClassroomServiceImpl.java | 232 + springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsEventAdminDTO.java | 43 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComFmsTeamMemberImportExcelListen.java | 188 + springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EvaluationFmsServiceDTO.java | 36 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsClassroom.java | 66 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsServiceAdminDTO.java | 36 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsClassroomVO.java | 42 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamMapper.xml | 61 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeamMember.java | 66 springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java | 9 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberImportMistakeExcelVO.java | 37 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/ValidateUtils.java | 19 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/EventMapper.xml | 1509 +++++++++ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamDAO.java | 57 springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComFmsApi.java | 216 + springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamMemberMapper.xml | 122 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamVO.java | 42 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamMemberRelationService.java | 14 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamMemberServiceImpl.java | 364 ++ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamMemberRelationDAO.java | 39 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsServiceMapper.xml | 119 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsServiceEvaluationsMapper.xml | 38 springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml | 16 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamTypeDAO.java | 39 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamMemberRelationMapper.xml | 20 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamTypeService.java | 45 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberImportExcelVO.java | 34 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/EventDO.java | 230 + springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java | 8 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamMemberService.java | 79 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsClassroomDAO.java | 86 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeam.java | 62 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsServiceEvaluationsDAO.java | 39 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeamMemberRelation.java | 29 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsServiceRecordServiceImpl.java | 19 springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventMapper.java | 7 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsServiceRecordMapper.xml | 38 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/LoginUserInfoVO.java | 3 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceImportExcelVO.java | 34 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceRecordVO.java | 40 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddFmsClassroomAdminDTO.java | 45 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddTeamDTO.java | 46 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsClassroomMapper.xml | 126 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditFmsClassroomAdminDTO.java | 44 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/ApplyFmsServiceDTO.java | 33 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamMemberRelationServiceImpl.java | 19 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamTypeServiceImpl.java | 127 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsServiceDAO.java | 97 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceImportMistakeExcelVO.java | 37 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/DeleteTeamMemberDTO.java | 30 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamTypeVO.java | 23 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/Constants.java | 3 101 files changed, 9,422 insertions(+), 59 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComFmsApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComFmsApi.java new file mode 100644 index 0000000..076ba33 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComFmsApi.java @@ -0,0 +1,216 @@ +package com.panzhihua.applets.api; + +import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; + +import javax.annotation.Resource; +import javax.validation.Valid; + +import com.panzhihua.common.model.dtos.community.fms.AddFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.ApplyFmsServiceDTO; +import com.panzhihua.common.model.dtos.community.fms.ApprovalFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.EvaluationFmsServiceDTO; +import com.panzhihua.common.model.dtos.community.fms.FeedbackFmsServiceDTO; +import com.panzhihua.common.model.vos.LoginUserInfoVO; +import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; +import com.panzhihua.common.model.vos.community.fms.CascadeCommVO; +import org.springframework.web.bind.annotation.GetMapping; +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.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.panzhihua.common.controller.BaseController; +import com.panzhihua.common.model.dtos.community.fms.PageFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsEventAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsServiceAppletsDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsTeamDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.fms.ComFmsClassroomVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsServiceVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamTypeVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamVO; +import com.panzhihua.common.model.vos.grid.EventDetailsVO; +import com.panzhihua.common.model.vos.grid.EventVO; +import com.panzhihua.common.service.community.CommunityService; +import com.panzhihua.common.service.grid.GridService; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; + +/** + * @title: ComFmsApi + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务相关接口 + * @author: hans + * @date: 2022/02/11 13:23 + */ +@Slf4j +@Api(tags = {"五微服务"}) +@RestController +@RequestMapping("/fms") +public class ComFmsApi extends BaseController { + + @Resource + private CommunityService communityService; + @Resource + private GridService gridService; + + @ApiOperation(value = "获取团队类型列表", response = ComFmsTeamTypeVO.class) + @ApiImplicitParam(name = "communityId", value = "社区id", required = true) + @GetMapping("/teamType/list") + public R listFmsTeamType(@RequestParam(value = "communityId", required = false) Long communityId) { + LoginUserInfoVO userInfo = this.getLoginUserInfoSureNoLogin(); + if (isNull(userInfo) && isNull(communityId)) { + return R.fail("社区id不能为空"); + } + if (nonNull(userInfo)) { + communityId = userInfo.getCommunityId(); + } + return communityService.listFmsTeamType(communityId); + } + + @ApiOperation(value = "分页/全部查询团队信息", response = ComFmsTeamVO.class) + @PostMapping("/team/page") + public R pageFmsTeam(@RequestBody PageFmsTeamDTO pageFmsTeamDTO) { + LoginUserInfoVO userInfo = this.getLoginUserInfoSureNoLogin(); + if (isNull(userInfo) && isNull(pageFmsTeamDTO.getCommunityId())) { + return R.fail("社区id不能为空"); + } + if (nonNull(userInfo)) { + pageFmsTeamDTO.setCommunityId(userInfo.getCommunityId()); + } + return communityService.pageFmsTeamApplets(pageFmsTeamDTO); + } + + @ApiOperation(value = "分页查询微讲堂", response = ComFmsClassroomVO.class) + @PostMapping("/classroom/page") + public R pageFmsClassroom(@RequestBody @Valid PageFmsClassroomAdminDTO adminDTO) { + LoginUserInfoVO userInfo = this.getLoginUserInfoSureNoLogin(); + if (isNull(userInfo) && isNull(adminDTO.getCommunityId())) { + return R.fail("社区id不能为空"); + } + if (nonNull(userInfo)) { + adminDTO.setCommunityId(userInfo.getCommunityId()); + } + return communityService.pageFmsClassroomAdmin(adminDTO); + } + + @ApiOperation(value = "获取微讲堂详情", response = ComFmsClassroomVO.class) + @ApiImplicitParam(name = "id", value = "微讲堂id", required = true) + @GetMapping("/classroom/detail") + public R detailFmsClassroom(@RequestParam("id") Long id) { + return communityService.detailFmsClassroomApplets(id); + } + + @ApiOperation(value = "分页查询微调节/微防控", response = EventVO.class) + @PostMapping("/event/page") + public R pageFmsEvent(@RequestBody @Valid PageFmsEventAdminDTO adminDTO) { + LoginUserInfoVO userInfo = this.getLoginUserInfoSureNoLogin(); + if (isNull(userInfo) && isNull(adminDTO.getCommunityId())) { + return R.fail("社区id不能为空"); + } + if (nonNull(userInfo)) { + adminDTO.setCommunityId(userInfo.getCommunityId()); + } + return communityService.pageFmsEventApplets(adminDTO); + } + + @ApiOperation(value = "微调节/微防控事件详情", response = EventDetailsVO.class) + @ApiImplicitParam(name = "eventId", value = "事件id", required = true) + @GetMapping("/event/detail") + public R detailFmsEvent(@RequestParam("eventId") Long eventId) { + return gridService.eventDetails(eventId); + } + + @ApiOperation(value = "分页查询微服务", response = ComFmsServiceVO.class) + @PostMapping("/service/page") + public R pageFmsService(@RequestBody @Valid PageFmsServiceAppletsDTO adminDTO) { + LoginUserInfoVO userInfo = this.getLoginUserInfoSureNoLogin(); + if (isNull(userInfo) && isNull(adminDTO.getCommunityId())) { + return R.fail("社区id不能为空"); + } + if (nonNull(userInfo)) { + adminDTO.setCommunityId(userInfo.getCommunityId()); + } + return communityService.pageFmsServiceApplets(adminDTO); + } + + @ApiOperation(value = "查看微服务详情", response = ComFmsServiceVO.class) + @ApiImplicitParam(name = "serviceId", value = "服务id", required = true) + @GetMapping("/service/detail") + public R detailFmsService(@RequestParam("serviceId") Long serviceId) { + LoginUserInfoVO userInfo = this.getLoginUserInfoSureNoLogin(); + Long userId = null; + if (nonNull(userInfo)) { + userId = userInfo.getUserId(); + } + return communityService.detailFmsServiceApplets(serviceId, userId); + } + + @ApiOperation("微服务申请") + @PostMapping("/service/apply") + public R applyFmsService(@RequestBody @Valid ApplyFmsServiceDTO adminDTO) { + LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); + adminDTO.setUserInfo(loginUserInfo); + return communityService.applyFmsService(adminDTO); + } + + @ApiOperation(value = "分页查询我的微服务", response = ComFmsServiceVO.class) + @PostMapping("/service/pageMy") + public R pageMyFmsService(@RequestBody @Valid PageFmsServiceAppletsDTO adminDTO) { + adminDTO.setCommunityId(this.getCommunityId()); + adminDTO.setUserId(this.getUserId()); + return communityService.pageMyFmsService(adminDTO); + } + + @ApiOperation(value = "微服务评价") + @PostMapping("/service/evaluate") + public R evaluateFmsService(@RequestBody @Valid EvaluationFmsServiceDTO evaluationFmsServiceDTO) { + evaluationFmsServiceDTO.setUserId(this.getUserId()); + return communityService.evaluateFmsService(evaluationFmsServiceDTO); + } + + @ApiOperation(value = "微团队成员分页查询服务处理", response = ComFmsServiceVO.class) + @PostMapping("/service/pageDeal") + public R pageDealFmsService(@RequestBody @Valid PageFmsServiceAppletsDTO adminDTO) { + LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); + adminDTO.setCommunityId(loginUserInfo.getCommunityId()); + adminDTO.setUserId(loginUserInfo.getUserId()); + adminDTO.setUserInfo(loginUserInfo); + return communityService.pageDealFmsService(adminDTO); + } + + @ApiOperation(value = "微团队成员服务反馈", response = ComFmsServiceVO.class) + @PostMapping("/service/feedback") + public R feedbackFmsService(@RequestBody @Valid FeedbackFmsServiceDTO adminDTO) { + LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); + adminDTO.setUserId(loginUserInfo.getUserId()); + adminDTO.setUserInfo(loginUserInfo); + return communityService.feedbackFmsService(adminDTO); + } + + @ApiOperation("核实微服务") + @PostMapping("/service/approval") + public R approvalFmsService(@RequestBody @Valid ApprovalFmsServiceAdminDTO adminDTO) { + if (adminDTO.getIsPass() && isNull(adminDTO.getMemberId())) { + return R.fail("未分配服务人员"); + } + adminDTO.setUpdatedBy(this.getUserId()); + return communityService.approvalFmsService(adminDTO); + } + + @ApiOperation("后台新增微服务") + @PostMapping("/service/add") + public R addFmsService(@RequestBody @Valid AddFmsServiceAdminDTO adminDTO) { + LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); + adminDTO.setCommunityId(loginUserInfo.getCommunityId()); + adminDTO.setCreatedBy(loginUserInfo.getUserId()); + adminDTO.setUpdatedBy(loginUserInfo.getUserId()); + return communityService.addFmsServiceAdmin(adminDTO); + } + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/Constants.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/Constants.java index e104862..a4ce060 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/Constants.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/Constants.java @@ -198,6 +198,9 @@ public static final String CLUSTER_MEMBER_DEFAULT_IMAGE_URL = "https://www.psciio.com/files/4822602b68af48bcbbea7842aa463227/a6a7882b3fd24d60ac6809fef42d879d.png"; + public static final String FMS_MEMBER_ERROR_LIST = "FMS_MEMBER_ERROR_LIST_"; + public static final String FMS_SERVICE_ERROR_LIST = "FMS_SERVICE_ERROR_LIST_"; + /** * 高德地图获取天气url */ diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/enums/PresetPictureType.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/enums/PresetPictureType.java index 2300053..5b12efb 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/enums/PresetPictureType.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/enums/PresetPictureType.java @@ -12,4 +12,8 @@ * 物业宣传 */ public static Integer PROPERTY_PUBLICITY = 1; + /** + * 五微服务-微讲堂 + */ + public static Integer FMS_CLASSROOM = 2; } diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComFmsServiceImportExcelListen.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComFmsServiceImportExcelListen.java new file mode 100644 index 0000000..fcf8571 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComFmsServiceImportExcelListen.java @@ -0,0 +1,176 @@ +package com.panzhihua.common.listen; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import cn.hutool.core.date.DateUtil; +import com.panzhihua.common.utlis.ValidateUtils; +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.data.redis.core.ValueOperations; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.alibaba.fastjson.JSONArray; +import com.google.common.collect.Lists; +import com.panzhihua.common.constants.Constants; +import com.panzhihua.common.exceptions.ServiceException; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.fms.ComFmsServiceImportExcelVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsServiceImportMistakeExcelVO; +import com.panzhihua.common.service.community.CommunityService; +import com.panzhihua.common.utlis.StringUtils; + +import lombok.extern.slf4j.Slf4j; + +/** + * @title: ComFmsTeamMemberImportExcelListen + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-微服务导入监听 + * @author: hans + * @date: 2022/02/15 10:16 + */ +@Slf4j +public class ComFmsServiceImportExcelListen extends AnalysisEventListener<Map<Integer, String>> { + /** + * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 + */ + private static final int BATCH_COUNT = 5000; + private static int headSize = 0; + List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); + private CommunityService communityService; + private Long communityId; + private Long userId; + private Map<Integer, String> headData; + private StringRedisTemplate stringRedisTemplate; + + public ComFmsServiceImportExcelListen(CommunityService communityService, Long communityId, Long userId, + StringRedisTemplate stringRedisTemplate) { + this.communityService = communityService; + this.communityId = communityId; + this.userId = userId; + this.stringRedisTemplate = stringRedisTemplate; + } + + @Override + public void invoke(Map<Integer, String> data, AnalysisContext context) { + list.add(data); + if (list.size() >= BATCH_COUNT) { + saveData(); + list.clear(); + } + } + + /** + * 这里会一行行的返回头 + * + * @param headMap + * @param context + */ + @Override + public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { + headSize = headMap.size(); + headData = headMap; + } + + @Override + public void doAfterAllAnalysed(AnalysisContext context) { + saveData(); + log.info("所有数据解析完成!"); + } + + /** + * 不是固定的列只能手动处理 + */ + private void saveData() { + log.info("开始导入微服务数据"); + log.info("表格总数据:" + list.size()); + if (list.size() == 0) { + throw new ServiceException("100", "导入数据为空!"); + } + ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); + String key = Constants.FMS_SERVICE_ERROR_LIST + communityId; + + int index = 2; + try { + String[] parsePatterns = new String[] {"yyyy-MM-dd", "yyyy-M-dd", "yyyy-MM-d", "yyyy-M-d", "yyyy/MM/dd", + "yyyy/M/dd", "yyyy/MM/d", "yyyy/M/d"}; + ArrayList<ComFmsServiceImportExcelVO> voList = Lists.newArrayList(); + ArrayList<ComFmsServiceImportMistakeExcelVO> mistakes = Lists.newArrayList(); + for (Map<Integer, String> oneData : list) { + ComFmsServiceImportExcelVO vo = new ComFmsServiceImportExcelVO(); + vo.setUserName(oneData.get(0)); + if (StringUtils.isNotEmpty(oneData.get(1)) && !ValidateUtils.assertPhoneIsValid(oneData.get(1))) { + ComFmsServiceImportMistakeExcelVO mistake = new ComFmsServiceImportMistakeExcelVO(); + index++; + setServiceImportMistake(oneData, mistake); + mistake.setMistake("联系电话有误,请检查"); + mistakes.add(mistake); + continue; + } + vo.setPhone(oneData.get(1)); + if (StringUtils.isEmpty(oneData.get(2))) { + ComFmsServiceImportMistakeExcelVO mistake = new ComFmsServiceImportMistakeExcelVO(); + index++; + setServiceImportMistake(oneData, mistake); + mistake.setMistake("服务时间不可为空,请填写服务时间"); + mistakes.add(mistake); + continue; + } + vo.setServiceAt(DateUtil.parse(oneData.get(2).trim(), parsePatterns)); + + if (StringUtils.isEmpty(oneData.get(3))) { + ComFmsServiceImportMistakeExcelVO mistake = new ComFmsServiceImportMistakeExcelVO(); + index++; + setServiceImportMistake(oneData, mistake); + mistake.setMistake("服务内容不可为空,请填写服务内容"); + mistakes.add(mistake); + continue; + } + vo.setServiceContent(oneData.get(3)); + + if (StringUtils.isEmpty(oneData.get(4))) { + ComFmsServiceImportMistakeExcelVO mistake = new ComFmsServiceImportMistakeExcelVO(); + index++; + setServiceImportMistake(oneData, mistake); + mistake.setMistake("服务过程不可为空,请填写服务过程"); + mistakes.add(mistake); + continue; + } + vo.setServiceProcess(oneData.get(4)); + voList.add(vo); + index++; + } + if (!voList.isEmpty()) { + log.info("开始进入业务层处理逻辑"); + R r = communityService.listSaveFmsServiceExcelVO(voList, communityId, userId); + log.info("业务层处理逻辑完成"); + if (R.isOk(r)) { + log.info("业务层处理成功"); + } else { + log.info("业务层处理逻辑失败"); + } + } + if (!mistakes.isEmpty()) { + log.info("将错误数据缓存到redis中"); + valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); + log.info("将错误数据缓存到redis中成功"); + throw new ServiceException("500", key); + } + } catch (NumberFormatException e) { + log.info("处理数据时失败"); + e.printStackTrace(); + log.error("数据格式有误,第" + index + "行"); + throw new ServiceException("500", "导入失败111"); + } + } + + private void setServiceImportMistake(Map<Integer, String> map, ComFmsServiceImportMistakeExcelVO vo) { + vo.setUserName(map.get(0)); + vo.setPhone(map.get(1)); + vo.setServiceAt(map.get(2)); + vo.setServiceContent(map.get(3)); + vo.setServiceProcess(map.get(4)); + } +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComFmsTeamMemberImportExcelListen.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComFmsTeamMemberImportExcelListen.java new file mode 100644 index 0000000..6761910 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComFmsTeamMemberImportExcelListen.java @@ -0,0 +1,188 @@ +package com.panzhihua.common.listen; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.data.redis.core.ValueOperations; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.alibaba.fastjson.JSONArray; +import com.google.common.collect.Lists; +import com.panzhihua.common.constants.Constants; +import com.panzhihua.common.exceptions.ServiceException; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberImportExcelVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberImportMistakeExcelVO; +import com.panzhihua.common.service.community.CommunityService; +import com.panzhihua.common.utlis.StringUtils; + +import cn.hutool.core.util.IdcardUtil; +import lombok.extern.slf4j.Slf4j; + +/** + * @title: ComFmsTeamMemberImportExcelListen + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-团队成员导入监听 + * @author: hans + * @date: 2022/02/15 10:16 + */ +@Slf4j +public class ComFmsTeamMemberImportExcelListen extends AnalysisEventListener<Map<Integer, String>> { + /** + * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 + */ + private static final int BATCH_COUNT = 5000; + private static int headSize = 0; + List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); + private CommunityService communityService; + private Long communityId; + private Long userId; + private Map<Integer, String> headData; + private StringRedisTemplate stringRedisTemplate; + + public ComFmsTeamMemberImportExcelListen(CommunityService communityService, Long communityId, Long userId, + StringRedisTemplate stringRedisTemplate) { + this.communityService = communityService; + this.communityId = communityId; + this.userId = userId; + this.stringRedisTemplate = stringRedisTemplate; + } + + @Override + public void invoke(Map<Integer, String> data, AnalysisContext context) { + list.add(data); + if (list.size() >= BATCH_COUNT) { + saveData(); + list.clear(); + } + } + + /** + * 这里会一行行的返回头 + * + * @param headMap + * @param context + */ + @Override + public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { + headSize = headMap.size(); + headData = headMap; + } + + @Override + public void doAfterAllAnalysed(AnalysisContext context) { + saveData(); + log.info("所有数据解析完成!"); + } + + /** + * 不是固定的列只能手动处理 + */ + private void saveData() { + log.info("开始导入团队成员数据"); + log.info("表格总数据:" + list.size()); + if (list.size() == 0) { + throw new ServiceException("100", "导入数据为空!"); + } + ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); + String key = Constants.FMS_MEMBER_ERROR_LIST + communityId; + + int index = 2; + try { + ArrayList<ComFmsTeamMemberImportExcelVO> voList = Lists.newArrayList(); + ArrayList<ComFmsTeamMemberImportMistakeExcelVO> mistakes = Lists.newArrayList(); + for (Map<Integer, String> oneData : list) { + ComFmsTeamMemberImportExcelVO vo = new ComFmsTeamMemberImportExcelVO(); + if (StringUtils.isEmpty(oneData.get(0))) { + ComFmsTeamMemberImportMistakeExcelVO mistake = new ComFmsTeamMemberImportMistakeExcelVO(); + index++; + setMemberImportMistake(oneData, mistake); + mistake.setMistake("团队类型不可为空,请填写团队类型"); + mistakes.add(mistake); + continue; + } + vo.setTeamType(oneData.get(0)); + if (StringUtils.isEmpty(oneData.get(1))) { + ComFmsTeamMemberImportMistakeExcelVO mistake = new ComFmsTeamMemberImportMistakeExcelVO(); + index++; + setMemberImportMistake(oneData, mistake); + mistake.setMistake("团队名称不可为空,请填写团队名称"); + mistakes.add(mistake); + continue; + } + vo.setTeamName(oneData.get(1)); + + if (StringUtils.isEmpty(oneData.get(2))) { + ComFmsTeamMemberImportMistakeExcelVO mistake = new ComFmsTeamMemberImportMistakeExcelVO(); + index++; + setMemberImportMistake(oneData, mistake); + mistake.setMistake("团队成员不可为空,请填写团队成员"); + mistakes.add(mistake); + continue; + } + vo.setTeamMember(oneData.get(2)); + + if (StringUtils.isNotEmpty(oneData.get(3))) { + // 判断身份证号码位数 + if (!IdcardUtil.isValidCard(oneData.get(3))) { + ComFmsTeamMemberImportMistakeExcelVO mistake = new ComFmsTeamMemberImportMistakeExcelVO(); + index++; + setMemberImportMistake(oneData, mistake); + mistake.setMistake("身份证号有误,请检查身份证号码是否正确"); + mistakes.add(mistake); + continue; + } + vo.setIdCard(oneData.get(3).toUpperCase()); + } + + if (StringUtils.isEmpty(oneData.get(4))) { + ComFmsTeamMemberImportMistakeExcelVO mistake = new ComFmsTeamMemberImportMistakeExcelVO(); + index++; + setMemberImportMistake(oneData, mistake); + mistake.setMistake("联系电话不可为空,请填写联系电话"); + mistakes.add(mistake); + continue; + } + vo.setPhone(oneData.get(4)); + voList.add(vo); + index++; + } + if (!voList.isEmpty()) { + log.info("开始进入业务层处理逻辑"); + R r = communityService.listSaveFmsTeamMemberExcelVO(voList, communityId, userId); + log.info("业务层处理逻辑完成"); + if (R.isOk(r)) { + log.info("业务层处理成功"); + List<ComFmsTeamMemberImportMistakeExcelVO> list = + JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComFmsTeamMemberImportMistakeExcelVO.class); + mistakes.addAll(list); + } else { + log.info("业务层处理逻辑失败"); + } + } + if (!mistakes.isEmpty()) { + log.info("将错误数据存入redis中"); + valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); + log.info("将错误数据存入redis中成功"); + throw new ServiceException("500", key); + } + } catch (NumberFormatException e) { + log.info("处理数据时失败"); + e.printStackTrace(); + log.error("数据格式有误,第" + index + "行"); + throw new ServiceException("500", "导入失败111"); + } + } + + private void setMemberImportMistake(Map<Integer, String> map, ComFmsTeamMemberImportMistakeExcelVO vo) { + vo.setTeamType(map.get(0)); + vo.setTeamName(map.get(1)); + vo.setTeamMember(map.get(2)); + vo.setIdCard(map.get(3)); + vo.setPhone(map.get(4)); + } +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddFmsClassroomAdminDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddFmsClassroomAdminDTO.java new file mode 100644 index 0000000..4fe86af --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddFmsClassroomAdminDTO.java @@ -0,0 +1,45 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: AddFmsServiceDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 后台新增微讲堂请求参数类 + * @author: hans + * @date: 2022/02/16 11:22 + */ +@Data +@ApiModel("后台新增微讲堂请求参数类") +public class AddFmsClassroomAdminDTO { + + @ApiModelProperty("标题") + @NotBlank + @Size(min = 1, max = 30) + private String title; + + @ApiModelProperty("参与学习人数") + private Integer scholars; + + @ApiModelProperty("封面") + @NotBlank + private String cover; + + @ApiModelProperty("内容") + @NotBlank + private String content; + + @ApiModelProperty(value = "所属社区", hidden = true) + private Long communityId; + + @ApiModelProperty(value = "创建者", hidden = true) + private Long createdBy; + + @ApiModelProperty(value = "由谁更新", hidden = true) + private Long updatedBy; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddFmsServiceAdminDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddFmsServiceAdminDTO.java new file mode 100644 index 0000000..a5cf22d --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddFmsServiceAdminDTO.java @@ -0,0 +1,64 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import java.util.Date; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; +import javax.validation.constraints.Size; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: AddFmsServiceDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 后台新增微服务请求参数类 + * @author: hans + * @date: 2022/02/16 11:22 + */ +@Data +@ApiModel("后台新增微服务请求参数类") +public class AddFmsServiceAdminDTO { + + @ApiModelProperty("服务用户") + @NotBlank + @Size(min = 1, max = 10) + private String userName; + + @ApiModelProperty("联系电话") + @NotBlank(message = "联系电话不能为空") + @Pattern(message = "联系电话格式错误", regexp = "^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\\d{8}$") + private String phone; + + @ApiModelProperty("服务时间") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @NotNull + private Date serviceAt; + + @ApiModelProperty("服务内容") + @NotBlank(message = "服务内容不能为空") + private String serviceContent; + + @ApiModelProperty("服务内容图片,多张逗号隔开") + private String serviceImage; + + @ApiModelProperty("服务过程") + @NotBlank(message = "服务过程不能为空") + private String serviceProcess; + + @ApiModelProperty("服务过程图片,多张逗号隔开") + private String processImage; + + @ApiModelProperty(value = "所属社区", hidden = true) + private Long communityId; + + @ApiModelProperty(value = "创建者", hidden = true) + private Long createdBy; + + @ApiModelProperty(value = "由谁更新", hidden = true) + private Long updatedBy; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddTeamDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddTeamDTO.java new file mode 100644 index 0000000..177ae73 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddTeamDTO.java @@ -0,0 +1,46 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: AddTeamTypeDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 新增团队请求参数类 + * @author: hans + * @date: 2022/02/11 13:40 + */ +@Data +@ApiModel("新增团队请求参数类") +public class AddTeamDTO { + + @ApiModelProperty("团队名称") + @NotBlank + @Size(min = 1, max = 20) + private String name; + + @ApiModelProperty("所属团队类型") + @NotNull + private Long teamType; + + @ApiModelProperty("服务电话") + private String phone; + + @ApiModelProperty("团队照片") + @NotBlank + private String image; + + @ApiModelProperty(value = "所属社区", hidden = true) + private Long communityId; + + @ApiModelProperty(value = "创建者", hidden = true) + private Long createdBy; + + @ApiModelProperty(value = "由谁更新", hidden = true) + private Long updatedBy; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddTeamMemberDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddTeamMemberDTO.java new file mode 100644 index 0000000..7327f04 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddTeamMemberDTO.java @@ -0,0 +1,50 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import java.util.List; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.Pattern; +import javax.validation.constraints.Size; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: AddTeamTypeDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 新增团队成员请求参数类 + * @author: hans + * @date: 2022/02/11 13:40 + */ +@Data +@ApiModel("新增团队成员请求参数类") +public class AddTeamMemberDTO { + + @ApiModelProperty("成员姓名") + @NotBlank + @Size(min = 1, max = 10) + private String name; + + @ApiModelProperty("所属团队") + @NotEmpty + private List<Long> teamIds; + + @ApiModelProperty("联系电话") + @NotBlank(message = "联系电话不能为空") + @Pattern(message = "联系电话格式错误", regexp = "^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\\d{8}$") + private String phone; + + @ApiModelProperty(value = "身份证号") + private String idCard; + + @ApiModelProperty(value = "所属社区", hidden = true) + private Long communityId; + + @ApiModelProperty(value = "创建者", hidden = true) + private Long createdBy; + + @ApiModelProperty(value = "由谁更新", hidden = true) + private Long updatedBy; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddTeamTypeDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddTeamTypeDTO.java new file mode 100644 index 0000000..1288dd3 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/AddTeamTypeDTO.java @@ -0,0 +1,34 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +/** + * @title: AddTeamTypeDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 团队类型新增请求参数类 + * @author: hans + * @date: 2022/02/11 13:40 + */ +@Data +@ApiModel("团队类型新增请求参数类") +public class AddTeamTypeDTO { + + @ApiModelProperty("团队类型名称") + @NotBlank + @Size(min = 1, max = 10) + private String name; + + @ApiModelProperty(value = "所属社区", hidden = true) + private Long communityId; + + @ApiModelProperty(value = "创建者", hidden = true) + private Long createdBy; + + @ApiModelProperty(value = "由谁更新", hidden = true) + private Long updatedBy; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/ApplyFmsServiceDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/ApplyFmsServiceDTO.java new file mode 100644 index 0000000..1c9b2b1 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/ApplyFmsServiceDTO.java @@ -0,0 +1,33 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +import com.panzhihua.common.model.vos.LoginUserInfoVO; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: ApplyFmsServiceDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 申请微服务请求参数类 + * @author: hans + * @date: 2022/02/19 13:42 + */ +@Data +@ApiModel("申请微服务请求参数类") +public class ApplyFmsServiceDTO { + + @ApiModelProperty("申请服务内容") + @NotBlank(message = "申请服务内容不能为空") + @Size(min = 1, max = 200) + private String serviceContent; + + @ApiModelProperty("服务内容图片,多张逗号隔开") + private String serviceImage; + + @ApiModelProperty(value = "创建者", hidden = true) + private LoginUserInfoVO userInfo; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/ApprovalFmsServiceAdminDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/ApprovalFmsServiceAdminDTO.java new file mode 100644 index 0000000..3ed39bd --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/ApprovalFmsServiceAdminDTO.java @@ -0,0 +1,36 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** + * @title: AddFmsServiceDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 后台核实微服务请求参数类 + * @author: hans + * @date: 2022/02/16 11:22 + */ +@Data +@ApiModel("后台核实微服务请求参数类") +public class ApprovalFmsServiceAdminDTO { + + @ApiModelProperty("服务id") + @NotNull + private Long serviceId; + + @ApiModelProperty("反馈内容") + private String content; + + @ApiModelProperty("是否通过(TRUE-通过,FALSE-不通过)") + @NotNull + private Boolean isPass; + + @ApiModelProperty("分派服务人员id") + private Long memberId; + + @ApiModelProperty(value = "由谁更新", hidden = true) + private Long updatedBy; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/DeleteTeamMemberDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/DeleteTeamMemberDTO.java new file mode 100644 index 0000000..9b6748d --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/DeleteTeamMemberDTO.java @@ -0,0 +1,30 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotNull; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: AddTeamTypeDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 团队成员删除请求参数类 + * @author: hans + * @date: 2022/02/11 13:40 + */ +@Data +@ApiModel("团队成员删除请求参数类") +public class DeleteTeamMemberDTO { + + @ApiModelProperty("成员id") + @NotNull + private Long id; + + @ApiModelProperty("所属团队") + @NotNull + private Long teamId; + + @ApiModelProperty(value = "所属社区", hidden = true) + private Long communityId; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditFmsClassroomAdminDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditFmsClassroomAdminDTO.java new file mode 100644 index 0000000..c5aca81 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditFmsClassroomAdminDTO.java @@ -0,0 +1,44 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: AddFmsServiceDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 后台编辑微讲堂请求参数类 + * @author: hans + * @date: 2022/02/16 11:22 + */ +@Data +@ApiModel("后台编辑微讲堂请求参数类") +public class EditFmsClassroomAdminDTO { + + @ApiModelProperty("讲堂id") + @NotNull + private Long id; + + @ApiModelProperty("标题") + @NotBlank + @Size(min = 1, max = 30) + private String title; + + @ApiModelProperty("参与学习人数") + private Integer scholars; + + @ApiModelProperty("封面") + @NotBlank + private String cover; + + @ApiModelProperty("内容") + @NotBlank + private String content; + + @ApiModelProperty(value = "由谁更新", hidden = true) + private Long updatedBy; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditTeamDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditTeamDTO.java new file mode 100644 index 0000000..1eee164 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditTeamDTO.java @@ -0,0 +1,47 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: AddTeamTypeDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 团队信息编辑请求参数类 + * @author: hans + * @date: 2022/02/11 13:40 + */ +@Data +@ApiModel("团队信息编辑请求参数类") +public class EditTeamDTO { + + @ApiModelProperty("团队id") + @NotNull + private Long id; + + @ApiModelProperty("团队名称") + @NotBlank + @Size(min = 1, max = 20) + private String name; + + @ApiModelProperty("所属团队类型") + @NotNull + private Long teamType; + + @ApiModelProperty("服务电话") + private String phone; + + @ApiModelProperty("团队照片") + @NotBlank + private String image; + + @ApiModelProperty(value = "所属社区", hidden = true) + private Long communityId; + + @ApiModelProperty(value = "由谁更新", hidden = true) + private Long updatedBy; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditTeamMemberDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditTeamMemberDTO.java new file mode 100644 index 0000000..5fc0d27 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditTeamMemberDTO.java @@ -0,0 +1,52 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; +import javax.validation.constraints.Size; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @title: AddTeamTypeDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 团队成员编辑请求参数类 + * @author: hans + * @date: 2022/02/11 13:40 + */ +@Data +@ApiModel("团队成员编辑请求参数类") +public class EditTeamMemberDTO { + + @ApiModelProperty("成员id") + @NotNull + private Long id; + + @ApiModelProperty("成员姓名") + @NotBlank + @Size(min = 1, max = 10) + private String name; + + @ApiModelProperty("所属团队") + @NotEmpty + private List<Long> teamIds; + + @ApiModelProperty("联系电话") + @NotBlank(message = "联系电话不能为空") + @Pattern(message = "联系电话格式错误", regexp = "^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\\d{8}$") + private String phone; + + @ApiModelProperty(value = "身份证号") + private String idCard; + + @ApiModelProperty(value = "所属社区", hidden = true) + private Long communityId; + + @ApiModelProperty(value = "由谁更新", hidden = true) + private Long updatedBy; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditTeamTypeDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditTeamTypeDTO.java new file mode 100644 index 0000000..856b250 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EditTeamTypeDTO.java @@ -0,0 +1,36 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: AddTeamTypeDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 团队类型编辑请求参数类 + * @author: hans + * @date: 2022/02/11 13:40 + */ +@Data +@ApiModel("团队类型编辑请求参数类") +public class EditTeamTypeDTO { + + @ApiModelProperty("团队类型id") + @NotNull + private Long id; + + @ApiModelProperty("团队类型名称") + @NotBlank + @Size(min = 1, max = 10) + private String name; + + @ApiModelProperty(value = "所属社区", hidden = true) + private Long communityId; + + @ApiModelProperty(value = "由谁更新", hidden = true) + private Long updatedBy; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EvaluationFmsServiceDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EvaluationFmsServiceDTO.java new file mode 100644 index 0000000..40e68b0 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/EvaluationFmsServiceDTO.java @@ -0,0 +1,36 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotNull; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: EvaluationFmsServiceDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 服务评价请求参数类 + * @author: hans + * @date: 2022/02/19 14:19 + */ +@Data +@ApiModel("服务评价请求参数类") +public class EvaluationFmsServiceDTO { + + @ApiModelProperty("服务id") + @NotNull + private Long serviceId; + + @ApiModelProperty("评分星级(1.非常差2.差3.一般4.满意5.非常满意)") + @NotNull + private Integer starLevel; + + @ApiModelProperty("评价内容") + private String evaluateContent; + + @ApiModelProperty("图片") + private String image; + + @ApiModelProperty(value = "用户", hidden = true) + private Long userId; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/FeedbackFmsServiceDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/FeedbackFmsServiceDTO.java new file mode 100644 index 0000000..b776bf8 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/FeedbackFmsServiceDTO.java @@ -0,0 +1,41 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotNull; + +import com.panzhihua.common.model.vos.LoginUserInfoVO; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: FeedbackFmsServiceDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 服务反馈微服务信息请求参数 + * @author: hans + * @date: 2022/02/19 14:52 + */ +@Data +@ApiModel("服务反馈微服务信息请求参数") +public class FeedbackFmsServiceDTO { + + @ApiModelProperty(value = "服务id") + @NotNull + private Long serviceId; + + @ApiModelProperty(value = "反馈内容") + private String feedbackContent; + + @ApiModelProperty(value = "反馈图片") + private String image; + + @ApiModelProperty("结束服务(TRUE-是,FALSE-否)") + @NotNull + private Boolean isEnd; + + @ApiModelProperty(value = "用户id", hidden = true) + private Long userId; + + @ApiModelProperty(value = "用户信息", hidden = true) + private LoginUserInfoVO userInfo; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsClassroomAdminDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsClassroomAdminDTO.java new file mode 100644 index 0000000..5a1ed1a --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsClassroomAdminDTO.java @@ -0,0 +1,45 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import java.util.Date; + +import javax.validation.constraints.NotNull; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: PageFmsClassroomAdminDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 后台分页查询微讲堂信息请求参数 + * @author: hans + * @date: 2022/02/17 14:15 + */ +@Data +@ApiModel("后台分页查询微讲堂信息请求参数") +public class PageFmsClassroomAdminDTO { + + @ApiModelProperty(value = "关键字") + private String keyword; + + @ApiModelProperty("发布时间-起") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdAtBegin; + + @ApiModelProperty("发布时间-止") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdAtEnd; + + @ApiModelProperty(value = "分页-当前页数", example = "1") + @NotNull(message = "分页参数不能为空") + private Long pageNum; + + @ApiModelProperty(value = "分页-每页记录数", example = "10") + @NotNull(message = "分页参数不能为空") + private Long pageSize; + + @ApiModelProperty(value = "社区id") + private Long communityId; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsEventAdminDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsEventAdminDTO.java new file mode 100644 index 0000000..ec59342 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsEventAdminDTO.java @@ -0,0 +1,43 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotNull; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: PageFmsClassroomAdminDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 后台分页查询微调节/微防控信息请求参数 + * @author: hans + * @date: 2022/02/17 14:15 + */ +@Data +@ApiModel("后台分页查询微调节/微防控信息请求参数") +public class PageFmsEventAdminDTO { + + @ApiModelProperty(value = "关键字") + private String keyword; + + @ApiModelProperty(value = "事件类型") + private String eventClazz; + + @ApiModelProperty(value = "状态(1.待处理2.已解决)") + private Integer eventProcessStatus; + + @ApiModelProperty(value = "查询类型(1.微调节数据2.微防控数)") + @NotNull(message = "查询类型不能为空") + private Integer type; + + @ApiModelProperty(value = "分页-当前页数", example = "1") + @NotNull(message = "分页参数不能为空") + private Long pageNum; + + @ApiModelProperty(value = "分页-每页记录数", example = "10") + @NotNull(message = "分页参数不能为空") + private Long pageSize; + + @ApiModelProperty(value = "社区id") + private Long communityId; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsServiceAdminDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsServiceAdminDTO.java new file mode 100644 index 0000000..8c70cf7 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsServiceAdminDTO.java @@ -0,0 +1,36 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotNull; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: PageFmsServiceAdminDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 后台分页查询微服务信息请求参数 + * @author: hans + * @date: 2022/02/16 14:05 + */ +@Data +@ApiModel("后台分页查询微服务信息请求参数") +public class PageFmsServiceAdminDTO { + + @ApiModelProperty(value = "关键字") + private String keyword; + + @ApiModelProperty(value = "服务状态(1.待核实2.进行中3.待评价4.已完成5.未通过)") + private Integer serviceStatus; + + @ApiModelProperty(value = "分页-当前页数", example = "1") + @NotNull(message = "分页参数不能为空") + private Long pageNum; + + @ApiModelProperty(value = "分页-每页记录数", example = "10") + @NotNull(message = "分页参数不能为空") + private Long pageSize; + + @ApiModelProperty(value = "社区id", hidden = true) + private Long communityId; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsServiceAppletsDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsServiceAppletsDTO.java new file mode 100644 index 0000000..608d299 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsServiceAppletsDTO.java @@ -0,0 +1,46 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotNull; + +import com.panzhihua.common.model.vos.LoginUserInfoVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: PageFmsServiceAdminDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 小程序分页查询微服务信息请求参数 + * @author: hans + * @date: 2022/02/16 14:05 + */ +@Data +@ApiModel("小程序分页查询微服务信息请求参数") +public class PageFmsServiceAppletsDTO { + + @ApiModelProperty(value = "此状态和服务状态不一致(1.已完成2.进行中)") + private Integer status; + + @ApiModelProperty(value = "微服务处理状态(1.待我服务2.待核实3.已完成)") + private Integer dealStatus; + + @ApiModelProperty(value = "分页-当前页数", example = "1") + @NotNull(message = "分页参数不能为空") + private Long pageNum; + + @ApiModelProperty(value = "分页-每页记录数", example = "10") + @NotNull(message = "分页参数不能为空") + private Long pageSize; + + @ApiModelProperty(value = "社区id") + private Long communityId; + + @ApiModelProperty(value = "用户id", hidden = true) + private Long userId; + + @ApiModelProperty(value = "用户信息", hidden = true) + private LoginUserInfoVO userInfo; + + @ApiModelProperty(value = "成员id", hidden = true) + private Long memberId; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsTeamDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsTeamDTO.java new file mode 100644 index 0000000..f8e9075 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageFmsTeamDTO.java @@ -0,0 +1,32 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: PageFmsTeamDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 分页查询团队信息请求参数 + * @author: hans + * @date: 2022/02/18 10:16 + */ +@Data +@ApiModel("分页查询团队信息请求参数") +public class PageFmsTeamDTO { + + @ApiModelProperty(value = "关键字") + private String keyword; + + @ApiModelProperty(value = "团队类型") + private Long teamType; + + @ApiModelProperty(value = "分页-当前页数", example = "1") + private Long pageNum; + + @ApiModelProperty(value = "分页-每页记录数", example = "10") + private Long pageSize; + + @ApiModelProperty(value = "社区id") + private Long communityId; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageTeamMemberDTO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageTeamMemberDTO.java new file mode 100644 index 0000000..85b307d --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/fms/PageTeamMemberDTO.java @@ -0,0 +1,42 @@ +package com.panzhihua.common.model.dtos.community.fms; + +import javax.validation.constraints.NotNull; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: PageTeamMemberDTO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 分页查询团队成员信息请求参数 + * @author: hans + * @date: 2022/02/14 15:28 + */ +@Data +@ApiModel("分页查询团队成员信息请求参数") +public class PageTeamMemberDTO { + + @ApiModelProperty(value = "关键字") + private String keyword; + + @ApiModelProperty(value = "团队类型") + private Long teamType; + + @ApiModelProperty(value = "所属团队") + private Long teamId; + + @ApiModelProperty(value = "性别(1.男2.女3.未知)") + private Integer gender; + + @ApiModelProperty(value = "分页-当前页数", example = "1") + @NotNull(message = "分页参数不能为空") + private Long pageNum; + + @ApiModelProperty(value = "分页-每页记录数", example = "10") + @NotNull(message = "分页参数不能为空") + private Long pageSize; + + @ApiModelProperty(value = "社区id", hidden = true) + private Long communityId; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/LoginUserInfoVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/LoginUserInfoVO.java index 7dbd3a0..81e2087 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/LoginUserInfoVO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/LoginUserInfoVO.java @@ -193,6 +193,9 @@ @ApiModelProperty("是否物业工作人员 1.是 2.否") private Integer isPropertyWorker; + @ApiModelProperty("是否微团队成员 1.是 2.否") + private Integer isFmsMember; + @ApiModelProperty("appid") private String appId; @ApiModelProperty("appSecret") diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/CascadeCommVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/CascadeCommVO.java new file mode 100644 index 0000000..6d7e12b --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/CascadeCommVO.java @@ -0,0 +1,31 @@ +package com.panzhihua.common.model.vos.community.fms; + +import java.util.List; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: CascadeCommVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 级联数据公共类 + * @author: hans + * @date: 2022/02/14 11:13 + */ +@Data +@ApiModel("级联数据公共类") +public class CascadeCommVO { + + @ApiModelProperty("value") + private Long value; + + @ApiModelProperty("parentId") + private Long parentId; + + @ApiModelProperty("label") + private String label; + + @ApiModelProperty("children") + private List<CascadeCommVO> children; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsClassroomVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsClassroomVO.java new file mode 100644 index 0000000..73b4e29 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsClassroomVO.java @@ -0,0 +1,42 @@ +package com.panzhihua.common.model.vos.community.fms; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: ComFmsClassroomVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-微讲堂信息 + * @author: hans + * @date: 2022/02/17 14:16 + */ +@Data +@ApiModel("五微服务-微讲堂信息") +public class ComFmsClassroomVO { + + @ApiModelProperty("主键") + private Long id; + + @ApiModelProperty("标题") + private String title; + + @ApiModelProperty("参与学习人数") + private Integer scholars; + + @ApiModelProperty("封面") + private String cover; + + @ApiModelProperty("内容") + private String content; + + @ApiModelProperty("浏览量") + private Integer viewNum; + + @ApiModelProperty("发布时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdAt; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceEvaluateVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceEvaluateVO.java new file mode 100644 index 0000000..238c126 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceEvaluateVO.java @@ -0,0 +1,40 @@ +package com.panzhihua.common.model.vos.community.fms; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: ComFmsServiceVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-评论详情 + * @author: hans + * @date: 2022/02/16 14:13 + */ +@Data +@ApiModel("五微服务-评论详情") +public class ComFmsServiceEvaluateVO { + + @ApiModelProperty("主键") + private Long id; + + @ApiModelProperty("服务关联id") + private Long serviceId; + + @ApiModelProperty("评分星级(1.非常差2.差3.一般4.满意5.非常满意)") + private String starLevel; + + @ApiModelProperty("内") + private String evaluateContent; + + @ApiModelProperty("图片") + private String image; + + @ApiModelProperty("创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdAt; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceImportExcelVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceImportExcelVO.java new file mode 100644 index 0000000..8ca2142 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceImportExcelVO.java @@ -0,0 +1,34 @@ +package com.panzhihua.common.model.vos.community.fms; + +import java.io.Serializable; +import java.util.Date; + +import com.alibaba.excel.annotation.ExcelProperty; + +import lombok.Data; + +/** + * @title: ComFmsTeamMemberImportExcelVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-微服务导入信息 + * @author: hans + * @date: 2022/02/15 10:36 + */ +@Data +public class ComFmsServiceImportExcelVO implements Serializable { + + @ExcelProperty(value = "服务用户", index = 0) + private String userName; + + @ExcelProperty(value = "联系电话", index = 1) + private String phone; + + @ExcelProperty(value = "服务时间", index = 2) + private Date serviceAt; + + @ExcelProperty(value = "服务内容", index = 3) + private String serviceContent; + + @ExcelProperty(value = "服务过程", index = 4) + private String serviceProcess; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceImportMistakeExcelVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceImportMistakeExcelVO.java new file mode 100644 index 0000000..c48f451 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceImportMistakeExcelVO.java @@ -0,0 +1,37 @@ +package com.panzhihua.common.model.vos.community.fms; + +import java.io.Serializable; +import java.util.Date; + +import com.alibaba.excel.annotation.ExcelProperty; + +import lombok.Data; + +/** + * @title: ComFmsTeamMemberImportExcelVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-微服务导入错误反馈信息 + * @author: hans + * @date: 2022/02/15 10:36 + */ +@Data +public class ComFmsServiceImportMistakeExcelVO implements Serializable { + + @ExcelProperty(value = "服务用户", index = 0) + private String userName; + + @ExcelProperty(value = "联系电话", index = 1) + private String phone; + + @ExcelProperty(value = "服务时间", index = 2) + private String serviceAt; + + @ExcelProperty(value = "服务内容", index = 3) + private String serviceContent; + + @ExcelProperty(value = "服务过程", index = 4) + private String serviceProcess; + + @ExcelProperty(value = "错误信息", index = 5) + private String mistake; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceRecordVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceRecordVO.java new file mode 100644 index 0000000..fb4ea18 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceRecordVO.java @@ -0,0 +1,40 @@ +package com.panzhihua.common.model.vos.community.fms; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: ComFmsServiceVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-微服务记录 + * @author: hans + * @date: 2022/02/16 14:13 + */ +@Data +@ApiModel("五微服务-微服务记录") +public class ComFmsServiceRecordVO { + + @ApiModelProperty("主键") + private Long id; + + @ApiModelProperty("服务关联id") + private Long serviceId; + + @ApiModelProperty("服务阶段") + private String stage; + + @ApiModelProperty("内容") + private String content; + + @ApiModelProperty("图片") + private String image; + + @ApiModelProperty("创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdAt; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceVO.java new file mode 100644 index 0000000..9686ba5 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsServiceVO.java @@ -0,0 +1,101 @@ +package com.panzhihua.common.model.vos.community.fms; + +import java.util.Date; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: ComFmsServiceVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-微服务信息 + * @author: hans + * @date: 2022/02/16 14:13 + */ +@Data +@ApiModel("五微服务-微服务信息") +public class ComFmsServiceVO { + + @ApiModelProperty("主键") + private Long id; + + @ApiModelProperty("用户姓名") + private String userName; + + @ApiModelProperty("真实姓名") + private String realName; + + @ApiModelProperty("用户关联id") + private Long userId; + + @ApiModelProperty("联系电话") + private String phone; + + @ApiModelProperty("服务内容") + private String serviceContent; + + @ApiModelProperty("服务内容图片") + private String serviceImage; + + @ApiModelProperty("反馈内容") + private String approvalContent; + + @ApiModelProperty("审核时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date approvalAt; + + @ApiModelProperty("团队服务人员关联id") + private Long memberId; + + @ApiModelProperty("服务人员") + private String serviceMember; + + @ApiModelProperty("服务评价") + private Integer starLevel; + + @ApiModelProperty("服务状态(1.待核实2.进行中3.待评价4.已完成5.未通过)") + private Integer serviceStatus; + + @ApiModelProperty("服务时间") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date serviceAt; + + @ApiModelProperty("创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdAt; + + @ApiModelProperty("创建者") + private Long createdBy; + + @ApiModelProperty("更新时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updatedAt; + + @ApiModelProperty("由谁更新") + private Long updatedBy; + + @ApiModelProperty("所属社区") + private Long communityId; + + @ApiModelProperty("服务进度") + private List<ComFmsServiceRecordVO> serviceRecords; + + @ApiModelProperty("小程序用户昵称") + private String nickName; + + @ApiModelProperty("小程序用户头像") + private String imageUrl; + + @ApiModelProperty("服务评价") + private ComFmsServiceEvaluateVO evaluateVO; + + @ApiModelProperty("是否本人") + private Boolean isMyself; + + @ApiModelProperty("自动评价倒计时") + private Long autoEvaluateAt; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberExportExcelVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberExportExcelVO.java new file mode 100644 index 0000000..04a57b8 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberExportExcelVO.java @@ -0,0 +1,39 @@ +package com.panzhihua.common.model.vos.community.fms; + +import com.alibaba.excel.annotation.ExcelProperty; + +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * @title: ComFmsTeamMemberExportExcleVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-团队成员导出信息 + * @author: hans + * @date: 2022/02/16 10:34 + */ +@Data +@ApiModel("五微服务-团队成员导出信息") +public class ComFmsTeamMemberExportExcelVO { + + @ExcelProperty(value = "团队类型", index = 0) + private String teamType; + + @ExcelProperty(value = "团队名称", index = 1) + private String teamName; + + @ExcelProperty(value = "团队成员", index = 2) + private String teamMember; + + @ExcelProperty(value = "身份证号", index = 3) + private String idCard; + + @ExcelProperty(value = "性别", index = 4) + private String gender; + + @ExcelProperty(value = "年龄", index = 5) + private String age; + + @ExcelProperty(value = "联系电话", index = 6) + private String phone; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberImportExcelVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberImportExcelVO.java new file mode 100644 index 0000000..ac87b0f --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberImportExcelVO.java @@ -0,0 +1,34 @@ +package com.panzhihua.common.model.vos.community.fms; + +import java.io.Serializable; +import java.util.Date; + +import com.alibaba.excel.annotation.ExcelProperty; + +import lombok.Data; + +/** + * @title: ComFmsTeamMemberImportExcelVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-团队成员导入信息 + * @author: hans + * @date: 2022/02/15 10:36 + */ +@Data +public class ComFmsTeamMemberImportExcelVO implements Serializable { + + @ExcelProperty(value = "团队类型", index = 0) + private String teamType; + + @ExcelProperty(value = "团队名称", index = 1) + private String teamName; + + @ExcelProperty(value = "团队成员", index = 2) + private String teamMember; + + @ExcelProperty(value = "身份证号(非必填)", index = 3) + private String idCard; + + @ExcelProperty(value = "联系电话", index = 4) + private String phone; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberImportMistakeExcelVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberImportMistakeExcelVO.java new file mode 100644 index 0000000..fe21488 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberImportMistakeExcelVO.java @@ -0,0 +1,37 @@ +package com.panzhihua.common.model.vos.community.fms; + +import java.io.Serializable; +import java.util.Date; + +import com.alibaba.excel.annotation.ExcelProperty; + +import lombok.Data; + +/** + * @title: ComFmsTeamMemberImportExcelVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-团队成员导入错误反馈信息 + * @author: hans + * @date: 2022/02/15 10:36 + */ +@Data +public class ComFmsTeamMemberImportMistakeExcelVO implements Serializable { + + @ExcelProperty(value = "团队类型", index = 0) + private String teamType; + + @ExcelProperty(value = "团队名称", index = 1) + private String teamName; + + @ExcelProperty(value = "团队成员", index = 2) + private String teamMember; + + @ExcelProperty(value = "身份证号(非必填)", index = 3) + private String idCard; + + @ExcelProperty(value = "联系电话", index = 4) + private String phone; + + @ExcelProperty(value = "错误信息", index = 5) + private String mistake; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberVO.java new file mode 100644 index 0000000..7895c67 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamMemberVO.java @@ -0,0 +1,50 @@ +package com.panzhihua.common.model.vos.community.fms; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: ComFmsTeamTypeVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-团队成员信息 + * @author: hans + * @date: 2022/02/11 14:54 + */ +@Data +@ApiModel("五微服务-团队成员信息") +public class ComFmsTeamMemberVO { + + @ApiModelProperty("团队成员id") + private Long id; + + @ApiModelProperty("成员姓名") + private String name; + + @ApiModelProperty("联系电话") + private String phone; + + @ApiModelProperty("身份证号") + private String idCard; + + @ApiModelProperty("所属团队类型") + private Long teamType; + + @ApiModelProperty("所属团队类型名称") + private String teamTypeName; + + @ApiModelProperty("所属团队") + private Long teamId; + + @ApiModelProperty("所属团队名称") + private String teamName; + + @ApiModelProperty("性别(1.男2.女3.未知)") + private Integer gender; + + @ApiModelProperty("年龄") + private Integer age; + + @ApiModelProperty("团队级联关系") + private String cascadeIds; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamTypeVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamTypeVO.java new file mode 100644 index 0000000..cb6545c --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamTypeVO.java @@ -0,0 +1,23 @@ +package com.panzhihua.common.model.vos.community.fms; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: ComFmsTeamTypeVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-团队类型信息 + * @author: hans + * @date: 2022/02/11 14:54 + */ +@Data +@ApiModel("五微服务-团队类型信息") +public class ComFmsTeamTypeVO { + + @ApiModelProperty("团队类型id") + private Long id; + + @ApiModelProperty("团队类型名称") + private String name; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamVO.java new file mode 100644 index 0000000..5fb957e --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/ComFmsTeamVO.java @@ -0,0 +1,42 @@ +package com.panzhihua.common.model.vos.community.fms; + +import java.util.List; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @title: ComFmsTeamTypeVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-团队信息 + * @author: hans + * @date: 2022/02/11 14:54 + */ +@Data +@ApiModel("五微服务-团队信息") +public class ComFmsTeamVO { + + @ApiModelProperty("团队id") + private Long id; + + @ApiModelProperty("团队名称") + private String name; + + @ApiModelProperty("服务电话") + private String phone; + + @ApiModelProperty("所属团队类型") + private Long teamType; + + @ApiModelProperty("团队照片") + private String image; + + @ApiModelProperty("团队成员总数") + private Integer teamMemberTotal; + + @ApiModelProperty("团队成员列表") + private List<ComFmsTeamMemberVO> memberList; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsClassroomTopStatisticsVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsClassroomTopStatisticsVO.java new file mode 100644 index 0000000..03eabda --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsClassroomTopStatisticsVO.java @@ -0,0 +1,23 @@ +package com.panzhihua.common.model.vos.community.fms; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: FmsServiceTopStatisticsVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-微讲堂顶部统计 + * @author: hans + * @date: 2022/02/17 10:11 + */ +@Data +@ApiModel("五微服务-微讲堂顶部统计") +public class FmsClassroomTopStatisticsVO { + + @ApiModelProperty("开课次数") + private Integer classroomCount; + + @ApiModelProperty("学习人数") + private Integer learnCount; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsEventTopStatisticsVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsEventTopStatisticsVO.java new file mode 100644 index 0000000..45fce79 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsEventTopStatisticsVO.java @@ -0,0 +1,23 @@ +package com.panzhihua.common.model.vos.community.fms; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: FmsServiceTopStatisticsVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-微调节/微防控顶部统计 + * @author: hans + * @date: 2022/02/17 10:11 + */ +@Data +@ApiModel("五微服务-微调节/微防控顶部统计") +public class FmsEventTopStatisticsVO { + + @ApiModelProperty("待处理") + private Integer unHandledCount; + + @ApiModelProperty("已解决") + private Integer handledCount; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsEventVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsEventVO.java new file mode 100644 index 0000000..08e15bf --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsEventVO.java @@ -0,0 +1,55 @@ +package com.panzhihua.common.model.vos.community.fms; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: ComFmsClassroomVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-事件信息 + * @author: hans + * @date: 2022/02/17 14:16 + */ +@Data +@ApiModel("五微服务-事件信息") +public class FmsEventVO { + + @ApiModelProperty("事件id") + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + @ApiModelProperty("事件类型") + private String eventClazz; + + @ApiModelProperty("发生区域") + private String gridName; + + @ApiModelProperty("发生地经纬度") + private String happentLatLng; + + @ApiModelProperty("发生时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date happenTime; + + @ApiModelProperty("事件描述") + private String eventDes; + + @ApiModelProperty("危险级别") + private Integer dangerLevel; + + @ApiModelProperty("是否紧急") + private Boolean urgent; + + @ApiModelProperty("是否重大") + private Boolean major; + + @ApiModelProperty("状态") + private Integer eventProcessStatus; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsServiceTopStatisticsVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsServiceTopStatisticsVO.java new file mode 100644 index 0000000..0748c0f --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/FmsServiceTopStatisticsVO.java @@ -0,0 +1,32 @@ +package com.panzhihua.common.model.vos.community.fms; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: FmsServiceTopStatisticsVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-微服务顶部统计 + * @author: hans + * @date: 2022/02/17 10:11 + */ +@Data +@ApiModel("五微服务-微服务顶部统计") +public class FmsServiceTopStatisticsVO { + + @ApiModelProperty("已完成") + private Integer completedCount; + + @ApiModelProperty("待核实") + private Integer unVerifiedCount; + + @ApiModelProperty("进行中") + private Integer inProgressCount; + + @ApiModelProperty("待评价") + private Integer unEvaluateCount; + + @ApiModelProperty("未通过") + private Integer unPassCount; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/TeamMemberTopStatisticsVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/TeamMemberTopStatisticsVO.java new file mode 100644 index 0000000..5789b35 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/fms/TeamMemberTopStatisticsVO.java @@ -0,0 +1,23 @@ +package com.panzhihua.common.model.vos.community.fms; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @title: ComFmsTeamTypeVO + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务-微团队顶部统计 + * @author: hans + * @date: 2022/02/11 14:54 + */ +@Data +@ApiModel("五微服务-微团队顶部统计") +public class TeamMemberTopStatisticsVO { + + @ApiModelProperty("团队数量") + private Integer teamCount; + + @ApiModelProperty("团队成员") + private Integer memberCount; +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventDetailsVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventDetailsVO.java index 563b416..c85c0d2 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventDetailsVO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventDetailsVO.java @@ -200,4 +200,7 @@ @ApiModelProperty(value = "网格绑定社区id") private Long communityId; + @ApiModelProperty(value = "撤销人") + private String revoke; + } diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java index 2c3fc46..c2dbbbf 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java @@ -1,75 +1,237 @@ package com.panzhihua.common.service.community; -import java.io.Serializable; -import java.util.Date; import java.util.List; -import com.panzhihua.common.model.dtos.common.*; -import com.panzhihua.common.model.dtos.community.microCommercialStreet.DeleteProductDTO; -import com.panzhihua.common.model.vos.community.volunteer.ComMngVolunteerExcelVO; -import com.panzhihua.common.model.dtos.PageBaseDTO; -import com.panzhihua.common.model.dtos.civil.*; -import com.panzhihua.common.model.dtos.community.warehouse.ComActWarehouseApplyDTO; -import com.panzhihua.common.model.dtos.community.GetIdentityEidTokenDTO; -import com.panzhihua.common.model.dtos.community.*; -import com.panzhihua.common.model.dtos.community.building.admin.*; -import com.panzhihua.common.model.dtos.community.cluster.PageClusterMemberDto; -import com.panzhihua.common.model.dtos.community.cluster.admin.*; -import com.panzhihua.common.model.dtos.property.CommonPage; -import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO; -import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO; -import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; -import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; -import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; -import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; -import com.panzhihua.common.model.dtos.neighbor.*; -import com.panzhihua.common.model.vos.*; -import com.panzhihua.common.model.vos.civil.ComActSocialWorkerDetailsVO; -import com.panzhihua.common.model.vos.community.*; -import com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelVO; -import com.panzhihua.common.model.vos.community.raffle.ComActRaffleRecordVO; -import com.panzhihua.common.model.vos.community.raffle.ComActRaffleVO; -import com.panzhihua.common.model.vos.community.social.*; -import io.swagger.annotations.ApiOperation; -import com.panzhihua.common.model.vos.community.*; -import org.springframework.beans.BeanUtils; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.scheduling.annotation.Async; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; import com.panzhihua.common.model.dtos.AppletesBackstageConfigDTO; import com.panzhihua.common.model.dtos.PageBaseDTO; import com.panzhihua.common.model.dtos.PageDTO; import com.panzhihua.common.model.dtos.advertisement.ComOpsAdvDTO; import com.panzhihua.common.model.dtos.advertisement.PageComOpsAdvDTO; -import com.panzhihua.common.model.dtos.community.*; -import com.panzhihua.common.model.dtos.community.bigscreen.*; +import com.panzhihua.common.model.dtos.civil.ComActSocialWorkerAddDTO; +import com.panzhihua.common.model.dtos.civil.ComActSocialWorkerDeleteDTO; +import com.panzhihua.common.model.dtos.civil.ComActSocialWorkerEditDTO; +import com.panzhihua.common.model.dtos.civil.ComActSocialWorkerExcelVO; +import com.panzhihua.common.model.dtos.civil.PageComActSocialWorkerDTO; +import com.panzhihua.common.model.dtos.common.AddComMngVolunteerOrgTeamDto; +import com.panzhihua.common.model.dtos.common.AddComMngVolunteerServiceTypeDto; +import com.panzhihua.common.model.dtos.common.AddComMngVolunteerSkillDto; +import com.panzhihua.common.model.dtos.common.EditComMngVolunteerOrgTeamDto; +import com.panzhihua.common.model.dtos.common.EditComMngVolunteerServiceTypeDto; +import com.panzhihua.common.model.dtos.common.EditComMngVolunteerSkillDto; +import com.panzhihua.common.model.dtos.common.PageComMngVolunteerOrgTeamDto; +import com.panzhihua.common.model.dtos.common.PageComMngVolunteerServiceTypeDto; +import com.panzhihua.common.model.dtos.common.PageComMngVolunteerSkillDto; +import com.panzhihua.common.model.dtos.community.AddComActDynTypeDTO; +import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; +import com.panzhihua.common.model.dtos.community.CancelRecordDTO; +import com.panzhihua.common.model.dtos.community.CascadeHouseDTO; +import com.panzhihua.common.model.dtos.community.ComActDiscussCommentDTO; +import com.panzhihua.common.model.dtos.community.ComActDiscussCommentUserDTO; +import com.panzhihua.common.model.dtos.community.ComActDiscussDTO; +import com.panzhihua.common.model.dtos.community.ComActDiscussOptionUserDTO; +import com.panzhihua.common.model.dtos.community.ComActDiscussUserDTO; +import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentDTO; +import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentUserDTO; +import com.panzhihua.common.model.dtos.community.ComCvtBusinessDTO; +import com.panzhihua.common.model.dtos.community.ComCvtCategoryDTO; +import com.panzhihua.common.model.dtos.community.ComCvtServeDTO; +import com.panzhihua.common.model.dtos.community.ComExServicemanDTO; +import com.panzhihua.common.model.dtos.community.ComMngCarAppletDTO; +import com.panzhihua.common.model.dtos.community.ComMngCarSaveDTO; +import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; +import com.panzhihua.common.model.dtos.community.ComMngPopulationEditDTO; +import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseAdminDTO; +import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseEditAdminDTO; +import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseInsertAdminDTO; +import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseUserVO; +import com.panzhihua.common.model.dtos.community.ComMngPopulationTagDTO; +import com.panzhihua.common.model.dtos.community.ComMngRealCompanyBelongsDTO; +import com.panzhihua.common.model.dtos.community.ComOpsHouseDTO; +import com.panzhihua.common.model.dtos.community.ComPropertyPublicityDTO; +import com.panzhihua.common.model.dtos.community.ComSwDangerReportEditDTO; +import com.panzhihua.common.model.dtos.community.ComSwDangerReportHandleDTO; +import com.panzhihua.common.model.dtos.community.ComSwDangerReportRectifyDTO; +import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordAddDTO; +import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordEditDTO; +import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordPageDTO; +import com.panzhihua.common.model.dtos.community.ComSwRotaPageDTO; +import com.panzhihua.common.model.dtos.community.ComSwRotaSaveDTO; +import com.panzhihua.common.model.dtos.community.ComSwSafetyWorkEditDTO; +import com.panzhihua.common.model.dtos.community.DisabledPersonsDTO; +import com.panzhihua.common.model.dtos.community.EditComActDynTypeDTO; +import com.panzhihua.common.model.dtos.community.EldersAuthAddByFamilyDTO; +import com.panzhihua.common.model.dtos.community.EldersAuthAddDTO; +import com.panzhihua.common.model.dtos.community.EldersAuthDeleteDTO; +import com.panzhihua.common.model.dtos.community.EldersAuthEditDTO; +import com.panzhihua.common.model.dtos.community.EldersAuthElderlyDTO; +import com.panzhihua.common.model.dtos.community.EldersAuthFeedbackAddDTO; +import com.panzhihua.common.model.dtos.community.EldersAuthTypeQueryDTO; +import com.panzhihua.common.model.dtos.community.ExportComMngCarExcelDTO; +import com.panzhihua.common.model.dtos.community.ExportRealAssetsExcelDTO; +import com.panzhihua.common.model.dtos.community.ExportRealCompanyExcelDTO; +import com.panzhihua.common.model.dtos.community.GetIdentityEidTokenDTO; +import com.panzhihua.common.model.dtos.community.GrantRewardDTO; +import com.panzhihua.common.model.dtos.community.KeyPersonInfoDTO; +import com.panzhihua.common.model.dtos.community.OperationDetailDTO; +import com.panzhihua.common.model.dtos.community.PageActWorkGuideDTO; +import com.panzhihua.common.model.dtos.community.PageComActDTO; +import com.panzhihua.common.model.dtos.community.PageComActDiscussCommentDTO; +import com.panzhihua.common.model.dtos.community.PageComActDiscussDTO; +import com.panzhihua.common.model.dtos.community.PageComActDynTypeDTO; +import com.panzhihua.common.model.dtos.community.PageComActEasyPhotoCommentDTO; +import com.panzhihua.common.model.dtos.community.PageComCvtBusinessAppletsDTO; +import com.panzhihua.common.model.dtos.community.PageComCvtBusinessDTO; +import com.panzhihua.common.model.dtos.community.PageComCvtCategoryDTO; +import com.panzhihua.common.model.dtos.community.PageComCvtServeDTO; +import com.panzhihua.common.model.dtos.community.PageComEldersRecordsDTO; +import com.panzhihua.common.model.dtos.community.PageComMngCarDTO; +import com.panzhihua.common.model.dtos.community.PageComMngRealAssetsDTO; +import com.panzhihua.common.model.dtos.community.PageComMngRealCompanyDTO; +import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO; +import com.panzhihua.common.model.dtos.community.PageComOpsHouseDTO; +import com.panzhihua.common.model.dtos.community.PageComPropertyPublicityDTO; +import com.panzhihua.common.model.dtos.community.PageComStreetDTO; +import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; +import com.panzhihua.common.model.dtos.community.PageEldersAuthDTO; +import com.panzhihua.common.model.dtos.community.PageEldersAuthElderlyDTO; +import com.panzhihua.common.model.dtos.community.PageEldersAuthHistoryDTO; +import com.panzhihua.common.model.dtos.community.PageEldersAuthRecordDTO; +import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; +import com.panzhihua.common.model.dtos.community.PageQuestnaireAnswerDTO; +import com.panzhihua.common.model.dtos.community.PageQuestnaireDTO; +import com.panzhihua.common.model.dtos.community.PageQuestnaireSubDetailsDTO; +import com.panzhihua.common.model.dtos.community.PageUserReserveDTO; +import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDTO; +import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDetailDTO; +import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticAgeGenderDTO; +import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticPartyActivityDTO; +import com.panzhihua.common.model.dtos.community.bigscreen.PageBigScreenStatisticPartyOrg; import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityListDTO; import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO; import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenDiscussListDTO; import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; -import com.panzhihua.common.model.dtos.community.building.admin.*; +import com.panzhihua.common.model.dtos.community.building.admin.AddBuildingHouseDto; +import com.panzhihua.common.model.dtos.community.building.admin.AddBuildingUnitDto; +import com.panzhihua.common.model.dtos.community.building.admin.DeleteBuildingHousePopulationDto; +import com.panzhihua.common.model.dtos.community.building.admin.EditBuildingHouseDto; +import com.panzhihua.common.model.dtos.community.building.admin.EditBuildingUnitDto; +import com.panzhihua.common.model.dtos.community.building.admin.PageBuildingListDto; +import com.panzhihua.common.model.dtos.community.building.admin.PageBuildingUnitHouseListDto; import com.panzhihua.common.model.dtos.community.cluster.PageClusterMemberDto; -import com.panzhihua.common.model.dtos.community.cluster.admin.*; -import com.panzhihua.common.model.dtos.community.convenient.*; +import com.panzhihua.common.model.dtos.community.cluster.admin.AddClusterAdminDto; +import com.panzhihua.common.model.dtos.community.cluster.admin.AddClusterMemberAdminDto; +import com.panzhihua.common.model.dtos.community.cluster.admin.EditClusterAdminDto; +import com.panzhihua.common.model.dtos.community.cluster.admin.EditClusterMemberAdminDto; +import com.panzhihua.common.model.dtos.community.cluster.admin.PageClusterAdminDto; +import com.panzhihua.common.model.dtos.community.cluster.admin.PageClusterMemberAdminDto; +import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; +import com.panzhihua.common.model.dtos.community.convenient.ConvenientProductCategoryDTO; +import com.panzhihua.common.model.dtos.community.convenient.ConvenientProductDTO; +import com.panzhihua.common.model.dtos.community.convenient.ConvenientServiceCategoryDTO; +import com.panzhihua.common.model.dtos.community.convenient.DeleteConvenientProductDTO; +import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO; +import com.panzhihua.common.model.dtos.community.convenient.ExportMerchantDTO; +import com.panzhihua.common.model.dtos.community.convenient.OnShelfOrOffShelfProductDTO; +import com.panzhihua.common.model.dtos.community.convenient.PageClassifyMerchantDTO; +import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO; +import com.panzhihua.common.model.dtos.community.convenient.PageConvenientProductCategoryDTO; +import com.panzhihua.common.model.dtos.community.convenient.PageConvenientProductDTO; +import com.panzhihua.common.model.dtos.community.convenient.PageConvenientServiceCategoryDTO; +import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; +import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO; +import com.panzhihua.common.model.dtos.community.convenient.ResetPasswordConvenientMerchantDTO; import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO; import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO; -import com.panzhihua.common.model.dtos.community.easyPhoto.*; +import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoActivityDTO; +import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoClassifyDTO; +import com.panzhihua.common.model.dtos.community.easyPhoto.EditEasyPhotoActivityDTO; +import com.panzhihua.common.model.dtos.community.easyPhoto.ExportEasyPhotoDTO; +import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityDTO; +import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityUserDTO; import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; +import com.panzhihua.common.model.dtos.community.fms.AddFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.AddFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.AddTeamDTO; +import com.panzhihua.common.model.dtos.community.fms.AddTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.AddTeamTypeDTO; +import com.panzhihua.common.model.dtos.community.fms.ApplyFmsServiceDTO; +import com.panzhihua.common.model.dtos.community.fms.ApprovalFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.DeleteTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.EditFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamTypeDTO; +import com.panzhihua.common.model.dtos.community.fms.EvaluationFmsServiceDTO; +import com.panzhihua.common.model.dtos.community.fms.FeedbackFmsServiceDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsEventAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsServiceAppletsDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsTeamDTO; +import com.panzhihua.common.model.dtos.community.fms.PageTeamMemberDTO; import com.panzhihua.common.model.dtos.community.integral.ComActIntegralCommunityRankDTO; import com.panzhihua.common.model.dtos.community.integral.admin.AddComActIntegralUserDTO; import com.panzhihua.common.model.dtos.community.integral.admin.EditComActIntegralRuleDTO; import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralRuleDTO; import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralTradeDTO; -import com.panzhihua.common.model.dtos.community.microCommercialStreet.*; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.DeleteProductDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.DisableOrEnableMcsMerchantDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsEvaluateDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsGameDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsInfoDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsProductDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageJoinGameListDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsEvaluateDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsGameDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsInformationDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsMerchantDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsProductDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageVerifyRecordDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.PutUserInfoDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetPopularForGameDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForGameDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForInfoDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForProductDTO; import com.panzhihua.common.model.dtos.community.questnaire.StatisticsSummaryDTO; -import com.panzhihua.common.model.dtos.community.rentingHouses.*; -import com.panzhihua.common.model.dtos.community.reserve.*; +import com.panzhihua.common.model.dtos.community.rentingHouses.NearbyDTO; +import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHouseRegisterDTO; +import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHousesConfigDTO; +import com.panzhihua.common.model.dtos.community.rentingHouses.ReleaseOrCancelHouseDTO; +import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHouseRegisterDTO; +import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHousesConfigDTO; +import com.panzhihua.common.model.dtos.community.reserve.AddReserveAdminDTO; +import com.panzhihua.common.model.dtos.community.reserve.CancelReserveRecordDTO; +import com.panzhihua.common.model.dtos.community.reserve.ComActReserveMakeStatisticsDTO; +import com.panzhihua.common.model.dtos.community.reserve.ComActReserveRegisterStatisticsDTO; +import com.panzhihua.common.model.dtos.community.reserve.EditComActReserveInfoDTO; +import com.panzhihua.common.model.dtos.community.reserve.EditComActReserveStatusDTO; +import com.panzhihua.common.model.dtos.community.reserve.EditReserveAdminDTO; +import com.panzhihua.common.model.dtos.community.reserve.MakeHandleAdminDTO; +import com.panzhihua.common.model.dtos.community.reserve.PageReserveAdminDTO; +import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeAdminDTO; +import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeHandleAdminDTO; +import com.panzhihua.common.model.dtos.community.reserve.PageReserveRegisterDetailedAdminDTO; import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO; -import com.panzhihua.common.model.dtos.community.wallet.*; +import com.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO; +import com.panzhihua.common.model.dtos.community.wallet.ComActWalletSettlementAdminDTO; +import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletAdminDTO; +import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeAdminDTO; +import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO; import com.panzhihua.common.model.dtos.community.warehouse.ComActWarehouseApplyDTO; import com.panzhihua.common.model.dtos.community.warehouse.ComActWarehouseDonatesDTO; import com.panzhihua.common.model.dtos.community.warehouse.ExportDonatesDTO; @@ -77,17 +239,70 @@ import com.panzhihua.common.model.dtos.elders.ComEldersAuthGetResultDTO; import com.panzhihua.common.model.dtos.elders.ComEldersAuthPageDTO; import com.panzhihua.common.model.dtos.elders.ComEldersAuthUserAddAppDTO; -import com.panzhihua.common.model.dtos.grid.*; -import com.panzhihua.common.model.dtos.grid.admin.*; -import com.panzhihua.common.model.dtos.neighbor.*; +import com.panzhihua.common.model.dtos.grid.AddComMngHousePopulationDTO; +import com.panzhihua.common.model.dtos.grid.ComMngVillageListAppDTO; +import com.panzhihua.common.model.dtos.grid.DelComMngHousePopulationDTO; +import com.panzhihua.common.model.dtos.grid.PageComMngPopulationDTO; +import com.panzhihua.common.model.dtos.grid.PageComMngVillageBuildHouseAppDTO; +import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; +import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationExportDTO; +import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; +import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationRelationHouseDTO; +import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationSubordinateDTO; +import com.panzhihua.common.model.dtos.grid.admin.ComMngVillageListExportAdminDTO; +import com.panzhihua.common.model.dtos.grid.admin.PageComMngVillagePopulationDTO; +import com.panzhihua.common.model.dtos.grid.admin.PageComMngVillagePopulationHouseDTO; +import com.panzhihua.common.model.dtos.neighbor.AddComActNeighborCircleAppDTO; +import com.panzhihua.common.model.dtos.neighbor.AddNeighborCircleTopicAdminDTO; +import com.panzhihua.common.model.dtos.neighbor.AddNeighborCircleTopicAppDTO; +import com.panzhihua.common.model.dtos.neighbor.ComActNeighborAddBrowseAppDTO; +import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO; +import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAppDTO; +import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleDetailAppDTO; +import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleTopicAdminDTO; +import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCommentAppDTO; +import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCommentReplyAppDTO; +import com.panzhihua.common.model.dtos.neighbor.ComActNeighborFabulousAppDTO; +import com.panzhihua.common.model.dtos.neighbor.ComActNeighborForwardAppDTO; +import com.panzhihua.common.model.dtos.neighbor.ComActNeighborReplyAppDTO; +import com.panzhihua.common.model.dtos.neighbor.DeleteNeighborCircleAppDTO; +import com.panzhihua.common.model.dtos.neighbor.DetailNeighborAllCommentByAdminDTO; +import com.panzhihua.common.model.dtos.neighbor.DetailNeighborCommentReplyByAdminDTO; import com.panzhihua.common.model.dtos.property.CommonPage; -import com.panzhihua.common.model.dtos.shop.*; +import com.panzhihua.common.model.dtos.shop.ComShopAddressDTO; +import com.panzhihua.common.model.dtos.shop.ComShopCartDTO; +import com.panzhihua.common.model.dtos.shop.ComShopEditNubCartDTO; +import com.panzhihua.common.model.dtos.shop.ComShopFundsExportDTO; +import com.panzhihua.common.model.dtos.shop.ComShopGoodsDTO; +import com.panzhihua.common.model.dtos.shop.ComShopOrderCreateDTO; +import com.panzhihua.common.model.dtos.shop.ComShopOrderDeliverDTO; +import com.panzhihua.common.model.dtos.shop.ComShopOrderExportDTO; +import com.panzhihua.common.model.dtos.shop.ComShopOrderPreviewDTO; +import com.panzhihua.common.model.dtos.shop.ComShopOrderQueryDTO; +import com.panzhihua.common.model.dtos.shop.ComShopOrderShipDTO; +import com.panzhihua.common.model.dtos.shop.ComShopSysConfDTO; +import com.panzhihua.common.model.dtos.shop.OrderPayDTO; +import com.panzhihua.common.model.dtos.shop.PageComOrderListDTO; +import com.panzhihua.common.model.dtos.shop.PageComShopAddressDTO; +import com.panzhihua.common.model.dtos.shop.PageComShopFundsSearchDTO; +import com.panzhihua.common.model.dtos.shop.PageComShopGoodsDTO; +import com.panzhihua.common.model.dtos.shop.PageComShopOrderSearchDTO; +import com.panzhihua.common.model.dtos.shop.PageComShopStoreDTO; +import com.panzhihua.common.model.dtos.shop.PageComShopSysConfDTO; +import com.panzhihua.common.model.dtos.shop.WxPayNotifyOrderDTO; import com.panzhihua.common.model.dtos.user.PageInputUserDTO; import com.panzhihua.common.model.dtos.vaccines.VaccinesByAdminDTO; import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollByAdminDTO; import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollByAppDTO; import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollUserByAppDTO; import com.panzhihua.common.model.dtos.vaccines.VaccinesInoculationByAdminDTO; +import com.panzhihua.common.model.vos.BcDictionaryItemVO; +import com.panzhihua.common.model.vos.BcDictionaryVO; +import com.panzhihua.common.model.vos.ComActSocialMemberVO; +import com.panzhihua.common.model.vos.DictionaryVO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.SystemmanagementConfigVO; +import com.panzhihua.common.model.vos.civil.ComActSocialWorkerDetailsVO; import com.panzhihua.common.model.vos.community.ActivitySignVO; import com.panzhihua.common.model.vos.community.BatchhouseVO; import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; @@ -150,25 +365,32 @@ import com.panzhihua.common.model.vos.community.QRActivityCodeVO; import com.panzhihua.common.model.vos.community.ResetComActMessageVO; import com.panzhihua.common.model.vos.community.SignactivityVO; -import com.panzhihua.common.model.dtos.vaccines.*; -import com.panzhihua.common.model.vos.*; -import com.panzhihua.common.model.vos.community.*; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticAgeGender; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyActivity; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyBuild; import com.panzhihua.common.model.vos.community.bigscreen.PartyBuildingMemberVO; import com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelVO; import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsServiceImportExcelVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberImportExcelVO; import com.panzhihua.common.model.vos.community.microCommercialStreet.McsConfigVO; import com.panzhihua.common.model.vos.community.microCommercialStreet.McsOrderVO; import com.panzhihua.common.model.vos.community.questnaire.EditComActQuestnaireVo; import com.panzhihua.common.model.vos.community.questnaire.QuestnaireVO; import com.panzhihua.common.model.vos.community.questnaire.UsersAnswerQuestnaireVO; +import com.panzhihua.common.model.vos.community.raffle.ComActRaffleRecordVO; +import com.panzhihua.common.model.vos.community.raffle.ComActRaffleVO; import com.panzhihua.common.model.vos.community.rentHouse.RentingHourseOrderVO; import com.panzhihua.common.model.vos.community.rentHouse.RentingHoursePreOrderVO; import com.panzhihua.common.model.vos.community.rentHouse.WxPayNotifyOrderVO; import com.panzhihua.common.model.vos.community.rentHouse.WxPayOrderVO; import com.panzhihua.common.model.vos.community.reserve.ComActReserveDetailAdminVO; +import com.panzhihua.common.model.vos.community.social.ComActSocialProjectMemberVO; +import com.panzhihua.common.model.vos.community.social.ComActSocialProjectPublicityVO; +import com.panzhihua.common.model.vos.community.social.ComActSocialProjectScheduleVO; +import com.panzhihua.common.model.vos.community.social.ComActSocialWorkerServiceVO; +import com.panzhihua.common.model.vos.community.social.SocialProjectVO; +import com.panzhihua.common.model.vos.community.volunteer.ComMngVolunteerExcelVO; import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseApplyVO; import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseBaseVO; import com.panzhihua.common.model.vos.community.warehouse.QRCodeVO; @@ -182,8 +404,6 @@ import com.panzhihua.common.model.vos.shop.ShopStoreVO; import com.panzhihua.common.model.vos.user.UserElectronicFileVO; import com.panzhihua.common.model.vos.user.UserPhoneVO; - -import javax.validation.Valid; /** * @program: springcloud_k8s_panzhihuazhihuishequ @@ -8739,4 +8959,374 @@ */ @GetMapping("act/getActBelongRegionCode") String getActBelongRegionCode(@RequestParam("communityId") Long communityId); + + /** + * 新增团队类型 + * @param addTeamTypeDTO + * @return + */ + @PostMapping("/fms/teamType/add") + R addFmsTeamType(@RequestBody AddTeamTypeDTO addTeamTypeDTO); + + /** + * 修改团队类型 + * @param editTeamTypeDTO + * @return + */ + @PostMapping("/fms/teamType/edit") + R editFmsTeamType(@RequestBody EditTeamTypeDTO editTeamTypeDTO); + + /** + * 删除团队类型 + * @param teamTypeId + * @param communityId + * @return + */ + @DeleteMapping("/fms/teamType/delete") + R deleteFmsTeamType(@RequestParam("teamTypeId") Long teamTypeId, + @RequestParam("communityId") Long communityId); + + /** + * 获取团队类型列表 + * @param communityId + * @return + */ + @GetMapping("/fms/teamType/list") + R listFmsTeamType(@RequestParam("communityId") Long communityId); + + /** + * 新增团队 + * @param addTeamDTO + * @return + */ + @PostMapping("/fms/team/add") + R addFmsTeam(@RequestBody AddTeamDTO addTeamDTO); + + /** + * 修改团队信息 + * @param editTeamDTO + * @return + */ + @PostMapping("/fms/team/edit") + R editFmsTeam(@RequestBody EditTeamDTO editTeamDTO); + + /** + * 删除团队 + * @param teamId + * @return + */ + @DeleteMapping("/fms/team/delete") + R deleteFmsTeam(@RequestParam("teamId") Long teamId); + + /** + * 获取团队列表 + * @param teamTypeId + * @return + */ + @GetMapping("/fms/team/list") + R listFmsTeam(@RequestParam("teamTypeId") Long teamTypeId); + + /** + * 获取团队详情 + * @param teamId + * @return + */ + @GetMapping("/fms/team/detail") + R detailFmsTeam(@RequestParam("teamId") Long teamId); + + /** + * 级联查询团队数据 + * @param communityId + * @return + */ + @GetMapping("/fms/team/cascade") + R retrieveFmsTeamCascade(@RequestParam("communityId") Long communityId); + + /** + * 新增团队成员 + * @param addTeamMemberDTO + * @return + */ + @PostMapping("/fms/teamMember/add") + R addFmsTeamMember(@RequestBody AddTeamMemberDTO addTeamMemberDTO); + + /** + * 编辑团队成员 + * @param editTeamMemberDTO + * @return + */ + @PostMapping("/fms/teamMember/edit") + R editFmsTeamMember(@RequestBody EditTeamMemberDTO editTeamMemberDTO); + + /** + * 删除团队成员 + * @param deleteTeamMemberDTO + * @return + */ + @PostMapping("/fms/teamMember/delete") + R deleteFmsTeamMember(@RequestBody DeleteTeamMemberDTO deleteTeamMemberDTO); + + /** + * 分页查询团队成员 + * @param pageTeamMemberDTO + * @return + */ + @PostMapping("/fms/teamMember/page") + R pageFmsTeamMember(@RequestBody PageTeamMemberDTO pageTeamMemberDTO); + + /** + * 微团队顶部统计 + * @param communityId + * @return + */ + @GetMapping("/fms/teamMember/statistics") + R statisticsFmsTeamMember(@RequestParam("communityId") Long communityId); + + /** + * 批量导入团队成员 + * @param voList + * @param communityId + * @param userId + * @return + */ + @PostMapping("/fms/teamMember/import") + R listSaveFmsTeamMemberExcelVO(@RequestBody List<ComFmsTeamMemberImportExcelVO> voList, + @RequestParam("communityId") Long communityId, @RequestParam("userId") Long userId); + + /** + * 团队人员导出 + * @param pageTeamMemberDTO + * @return + */ + @PostMapping("/fms/teamMember/export") + R exportTeamMember(@RequestBody PageTeamMemberDTO pageTeamMemberDTO); + + /** + * 后台新增微服务 + * @param adminDTO + * @return + */ + @PostMapping("/fms/service/adminAdd") + R addFmsServiceAdmin(@RequestBody AddFmsServiceAdminDTO adminDTO); + + /** + * 后台分页查询微服务 + * @param adminDTO + * @return + */ + @PostMapping("/fms/service/adminPage") + R pageFmsServiceAdmin(@RequestBody PageFmsServiceAdminDTO adminDTO); + + /** + * 后台核实微服务 + * @param adminDTO + * @return + */ + @PostMapping("/fms/service/approval") + R approvalFmsService(@RequestBody ApprovalFmsServiceAdminDTO adminDTO); + + /** + * 级联查询团队服务人员 + * @param communityId + * @return + */ + @GetMapping("/fms/teamMember/cascade") + R retrieveFmsTeamMemberCascade(@RequestParam("communityId") Long communityId); + + /** + * 后台查看微服务详情 + * @param serviceId + * @return + */ + @GetMapping("/fms/service/detailAdmin") + R detailFmsServiceAdmin(@RequestParam("serviceId") Long serviceId); + + /** + * 后台删除微服务 + * @param serviceId + * @return + */ + @DeleteMapping("/fms/service/delete") + R deleteFmsServiceAdmin(@RequestParam("serviceId") Long serviceId); + + /** + * 微服务顶部统计 + * @param communityId + * @return + */ + @GetMapping("/fms/service/statistics") + R statisticsFmsService(@RequestParam("communityId") Long communityId); + + /** + * 后台导入微服务数据 + * @param voList + * @param communityId + * @param userId + * @return + */ + @PostMapping("/fms/service/import") + R listSaveFmsServiceExcelVO(@RequestBody List<ComFmsServiceImportExcelVO> voList, + @RequestParam("communityId") Long communityId, + @RequestParam("userId") Long userId); + + /** + * 后台新增微讲堂 + * @param adminDTO + * @return + */ + @PostMapping("/fms/classroom/add") + R addFmsClassroom(@RequestBody AddFmsClassroomAdminDTO adminDTO); + + /** + * 后台编辑微讲堂 + * @param adminDTO + * @return + */ + @PostMapping("/fms/classroom/edit") + R editFmsClassroom(@RequestBody EditFmsClassroomAdminDTO adminDTO); + + /** + * 后台删除微讲堂 + * @param id + * @return + */ + @DeleteMapping("/fms/classroom/delete") + R deleteFmsClassroom(@RequestParam("id") Long id); + + /** + * 后台获取微讲堂详情 + * @param id + * @return + */ + @GetMapping("/fms/classroom/detail") + R detailFmsClassroom(@RequestParam("id") Long id); + + /** + * 后台分页查询微讲堂 + * @param adminDTO + * @return + */ + @PostMapping("/fms/classroom/pageAdmin") + R pageFmsClassroomAdmin(@RequestBody PageFmsClassroomAdminDTO adminDTO); + + /** + * 微讲堂顶部统计 + * @param communityId + * @return + */ + @GetMapping("/fms/classroom/statistics") + R statisticsFmsClassroom(@RequestParam("communityId") Long communityId); + + /** + * 后台分页查询微调节/微防控 + * @param adminDTO + * @return + */ + @PostMapping("/fms/event/page") + R pageFmsEvent(@RequestBody PageFmsEventAdminDTO adminDTO); + + /** + * 微调节/微防控顶部统计 + * @param type + * @param communityId + * @return + */ + @GetMapping("/fms/event/statistics") + R statisticsFmsEvent(@RequestParam("type") Integer type, @RequestParam("communityId") Long communityId); + + /** + * 微调节/微防控事件详情 + * @param eventId + * @return + */ + @GetMapping("/fms/event/detail") + R detailFmsEvent(@RequestParam("eventId") Long eventId); + + /** + * 小程序分页查询团队信息 + * @param pageFmsTeamDTO + * @return + */ + @PostMapping("/fms/team/pageApplets") + R pageFmsTeamApplets(@RequestBody PageFmsTeamDTO pageFmsTeamDTO); + + /** + * 获取微讲堂详情 + * @param id + * @return + */ + @GetMapping("/fms/classroom/detailApplets") + R detailFmsClassroomApplets(@RequestParam("id") Long id); + + /** + * 小程序分页查询微调节/微防控 + * @param adminDTO + * @return + */ + @PostMapping("/fms/event/pageApplets") + R pageFmsEventApplets(@RequestBody PageFmsEventAdminDTO adminDTO); + + /** + * 小程序分页查询微服务 + * @param adminDTO + * @return + */ + @PostMapping("/fms/service/pageApplets") + R pageFmsServiceApplets(@RequestBody PageFmsServiceAppletsDTO adminDTO); + + /** + * 小程序查看微服务详情 + * @param serviceId + * @param userId + * @return + */ + @GetMapping("/fms/service/detailApplets") + R detailFmsServiceApplets(@RequestParam("serviceId") Long serviceId, @RequestParam(value = "userId", required = false) Long userId); + + /** + * 微服务申请 + * @param adminDTO + * @return + */ + @PostMapping("/fms/service/apply") + R applyFmsService(@RequestBody ApplyFmsServiceDTO adminDTO); + + /** + * 分页查询我的微服务 + * @param adminDTO + * @return + */ + @PostMapping("/fms/service/pageMy") + R pageMyFmsService(@RequestBody PageFmsServiceAppletsDTO adminDTO); + + /** + * 微服务评价 + * @param evaluationFmsServiceDTO + * @return + */ + @PostMapping("/fms/service/evaluate") + R evaluateFmsService(@RequestBody EvaluationFmsServiceDTO evaluationFmsServiceDTO); + + /** + * 微团队成员分页查询服务处理 + * @param adminDTO + * @return + */ + @PostMapping("/fms/service/pageDeal") + R pageDealFmsService(@RequestBody PageFmsServiceAppletsDTO adminDTO); + + /** + * 微团队成员服务反馈 + * @param adminDTO + * @return + */ + @PostMapping("/fms/service/feedback") + R feedbackFmsService(@RequestBody FeedbackFmsServiceDTO adminDTO); + + /** + * 定时任务针对服务结束后3天还未评价的用户默认好评 + * @return + */ + @PostMapping("/fms/service/defaultPraise") + R timedTaskFmsServiceDefaultPraise(); } diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/ValidateUtils.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/ValidateUtils.java new file mode 100644 index 0000000..e0f6380 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/ValidateUtils.java @@ -0,0 +1,19 @@ +package com.panzhihua.common.utlis; + +import java.util.regex.Pattern; + +/** + * @title: ValidateUtils + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 验证相关工具类 + * @author: hans + * @date: 2022/02/11 15:16 + */ +public class ValidateUtils { + + private static final String PHONE_REGEX = "^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\\d{8}$"; + + public static Boolean assertPhoneIsValid(String phone) { + return Pattern.matches(PHONE_REGEX, phone); + } +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComFmsApi.java b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComFmsApi.java new file mode 100644 index 0000000..587c42c --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComFmsApi.java @@ -0,0 +1,663 @@ +package com.panzhihua.community_backstage.api; + +import static java.util.Objects.isNull; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.data.redis.core.ValueOperations; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +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.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelWriter; +import com.alibaba.excel.write.metadata.WriteSheet; +import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; +import com.alibaba.fastjson.JSONArray; +import com.panzhihua.common.constants.Constants; +import com.panzhihua.common.controller.BaseController; +import com.panzhihua.common.enums.PresetPictureType; +import com.panzhihua.common.listen.ComFmsServiceImportExcelListen; +import com.panzhihua.common.listen.ComFmsTeamMemberImportExcelListen; +import com.panzhihua.common.model.dtos.community.fms.AddFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.AddFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.AddTeamDTO; +import com.panzhihua.common.model.dtos.community.fms.AddTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.AddTeamTypeDTO; +import com.panzhihua.common.model.dtos.community.fms.ApprovalFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.DeleteTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.EditFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamTypeDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsEventAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageTeamMemberDTO; +import com.panzhihua.common.model.vos.LoginUserInfoVO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.ComActPictureLibraryVO; +import com.panzhihua.common.model.vos.community.fms.CascadeCommVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsClassroomVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsServiceImportMistakeExcelVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsServiceVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberExportExcelVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberImportMistakeExcelVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamTypeVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamVO; +import com.panzhihua.common.model.vos.community.fms.FmsClassroomTopStatisticsVO; +import com.panzhihua.common.model.vos.community.fms.FmsEventTopStatisticsVO; +import com.panzhihua.common.model.vos.community.fms.FmsEventVO; +import com.panzhihua.common.model.vos.community.fms.FmsServiceTopStatisticsVO; +import com.panzhihua.common.model.vos.community.fms.TeamMemberTopStatisticsVO; +import com.panzhihua.common.model.vos.grid.EventDetailsVO; +import com.panzhihua.common.service.community.CommunityService; +import com.panzhihua.common.service.grid.GridService; +import com.panzhihua.common.utlis.DateUtils; +import com.panzhihua.common.utlis.SFTPUtil; +import com.panzhihua.common.utlis.ValidateUtils; +import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; + +/** + * @title: ComFmsApi + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务相关接口 + * @author: hans + * @date: 2022/02/11 13:23 + */ +@Slf4j +@Api(tags = {"五微服务"}) +@RestController +@RequestMapping("/fms") +public class ComFmsApi extends BaseController { + + // FTP 登录用户名 + @Value("${ftp.username}") + private String userName; + // FTP 登录密码 + @Value("${ftp.password}") + private String password; + // FTP 服务器地址IP地址 + @Value("${ftp.host}") + private String host; + // FTP 端口 + @Value("${ftp.port}") + private int port; + @Value("${ftp.url}") + private String url; + @Value("${excel.userurl}") + private String excelUrl; + + @Resource + private CommunityService communityService; + @Resource + private StringRedisTemplate stringRedisTemplate; + @Resource + private GridService gridService; + + @ApiOperation("新增团队类型") + @PostMapping("/teamType/add") + public R addFmsTeamType(@RequestBody @Valid AddTeamTypeDTO addTeamTypeDTO) { + LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); + addTeamTypeDTO.setCommunityId(loginUserInfo.getCommunityId()); + addTeamTypeDTO.setCreatedBy(loginUserInfo.getUserId()); + addTeamTypeDTO.setUpdatedBy(loginUserInfo.getUserId()); + return communityService.addFmsTeamType(addTeamTypeDTO); + } + + @ApiOperation("修改团队类型") + @PostMapping("/teamType/edit") + public R editFmsTeamType(@RequestBody @Valid EditTeamTypeDTO editTeamTypeDTO) { + LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); + editTeamTypeDTO.setCommunityId(loginUserInfo.getCommunityId()); + editTeamTypeDTO.setUpdatedBy(loginUserInfo.getUserId()); + return communityService.editFmsTeamType(editTeamTypeDTO); + } + + @ApiOperation("删除团队类型") + @ApiImplicitParam(name = "teamTypeId", value = "团队类型id", required = true) + @DeleteMapping("/teamType/delete") + public R deleteFmsTeamType(@RequestParam("teamTypeId") Long teamTypeId) { + return communityService.deleteFmsTeamType(teamTypeId, this.getCommunityId()); + } + + @ApiOperation(value = "获取团队类型列表", response = ComFmsTeamTypeVO.class) + @GetMapping("/teamType/list") + public R listFmsTeamType() { + return communityService.listFmsTeamType(this.getCommunityId()); + } + + @ApiOperation("新增团队") + @PostMapping("/team/add") + public R addFmsTeam(@RequestBody @Valid AddTeamDTO addTeamDTO) { + if (isNotBlank(addTeamDTO.getPhone()) && !ValidateUtils.assertPhoneIsValid(addTeamDTO.getPhone())) { + return R.fail("手机号格式错误"); + } + LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); + addTeamDTO.setCommunityId(loginUserInfo.getCommunityId()); + addTeamDTO.setCreatedBy(loginUserInfo.getUserId()); + addTeamDTO.setUpdatedBy(loginUserInfo.getUserId()); + return communityService.addFmsTeam(addTeamDTO); + } + + @ApiOperation("修改团队信息") + @PostMapping("/team/edit") + public R editFmsTeam(@RequestBody @Valid EditTeamDTO editTeamDTO) { + if (isNotBlank(editTeamDTO.getPhone()) && !ValidateUtils.assertPhoneIsValid(editTeamDTO.getPhone())) { + return R.fail("手机号格式错误"); + } + LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); + editTeamDTO.setCommunityId(loginUserInfo.getCommunityId()); + editTeamDTO.setUpdatedBy(loginUserInfo.getUserId()); + return communityService.editFmsTeam(editTeamDTO); + } + + @ApiOperation("删除团队") + @ApiImplicitParam(name = "teamId", value = "团队id", required = true) + @DeleteMapping("/team/delete") + public R deleteFmsTeam(@RequestParam("teamId") Long teamId) { + return communityService.deleteFmsTeam(teamId); + } + + @ApiOperation(value = "获取团队列表", response = ComFmsTeamVO.class) + @ApiImplicitParam(name = "teamTypeId", value = "团队类型id", required = true) + @GetMapping("/team/list") + public R listFmsTeam(@RequestParam("teamTypeId") Long teamTypeId) { + return communityService.listFmsTeam(teamTypeId); + } + + @ApiOperation(value = "获取团队详情", response = ComFmsTeamVO.class) + @ApiImplicitParam(name = "teamId", value = "团队id", required = true) + @GetMapping("/team/detail") + public R detailFmsTeam(@RequestParam("teamId") Long teamId) { + return communityService.detailFmsTeam(teamId); + } + + + @ApiOperation(value = "级联查询团队数据", response = CascadeCommVO.class) + @GetMapping("/team/cascade") + public R retrieveFmsTeamCascade() { + return communityService.retrieveFmsTeamCascade(this.getCommunityId()); + } + + @ApiOperation("新增团队成员") + @PostMapping("/teamMember/add") + public R addFmsTeamMember(@RequestBody @Valid AddTeamMemberDTO addTeamMemberDTO) { + LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); + addTeamMemberDTO.setCommunityId(loginUserInfo.getCommunityId()); + addTeamMemberDTO.setCreatedBy(loginUserInfo.getUserId()); + addTeamMemberDTO.setUpdatedBy(loginUserInfo.getUserId()); + return communityService.addFmsTeamMember(addTeamMemberDTO); + } + + @ApiOperation("编辑团队成员") + @PostMapping("/teamMember/edit") + public R editFmsTeamMember(@RequestBody @Valid EditTeamMemberDTO editTeamMemberDTO) { + LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); + editTeamMemberDTO.setCommunityId(loginUserInfo.getCommunityId()); + editTeamMemberDTO.setUpdatedBy(loginUserInfo.getUserId()); + return communityService.editFmsTeamMember(editTeamMemberDTO); + } + + @ApiOperation("删除团队成员") + @PostMapping("/teamMember/delete") + public R deleteFmsTeamMember(@RequestBody @Valid DeleteTeamMemberDTO deleteTeamMemberDTO) { + deleteTeamMemberDTO.setCommunityId(this.getCommunityId()); + return communityService.deleteFmsTeamMember(deleteTeamMemberDTO); + } + + @ApiOperation(value = "分页查询团队成员", response = ComFmsTeamMemberVO.class) + @PostMapping("/teamMember/page") + public R pageFmsTeamMember(@RequestBody @Valid PageTeamMemberDTO pageTeamMemberDTO) { + pageTeamMemberDTO.setCommunityId(this.getCommunityId()); + return communityService.pageFmsTeamMember(pageTeamMemberDTO); + } + + @ApiOperation(value = "微团队顶部统计", response = TeamMemberTopStatisticsVO.class) + @GetMapping("/teamMember/statistics") + public R statisticsFmsTeamMember() { + return communityService.statisticsFmsTeamMember(this.getCommunityId()); + } + + @ApiOperation(value = "下载团队成员导入模板") + @GetMapping("/teamMember/template") + public R getTeamMemberTemplate() { + // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 + String ftpUrl = "/mnt/data/web/excel/"; + String name = "团队成员导入模板.xlsx"; + try { + SFTPUtil sftp = new SFTPUtil(userName, password, host, port); + sftp.login(); + boolean existDir = sftp.isExistDir(ftpUrl + name); + if (!existDir) { + String property = System.getProperty("user.dir"); + String fileName = property + File.separator + name; + // 这里 需要指定写用哪个class去写 + ExcelWriter excelWriter = null; + InputStream inputStream = null; + try { + List<List<String>> list = new ArrayList<>(); + list = headDataFilling(); + EasyExcel.write(fileName).head(list).sheet("团队成员导入模板").doWrite(null); + File file = new File(fileName); + inputStream = new FileInputStream(file); + sftp.uploadMore(ftpUrl, name, inputStream); + sftp.logout(); + inputStream.close(); + String absolutePath = file.getAbsolutePath(); + boolean delete = file.delete(); + log.info("删除excel【{}】结果【{}】", absolutePath, delete); + } finally { + // 千万别忘记finish 会帮忙关闭流 + if (inputStream != null) { + inputStream.close(); + } + } + } + return R.ok(excelUrl + name); + } catch (Exception e) { + e.printStackTrace(); + log.error("文件传输失败【{}】", e.getMessage()); + return R.fail(); + } + } + + @ApiOperation(value = "excel导入团队成员") + @PostMapping(value = "/teamMember/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") + public R importTeamMember(@RequestParam MultipartFile file, HttpServletRequest request) { + // 获取文件名 + String fileName = file.getOriginalFilename(); + log.info("传入文件名字【{}】", fileName); + InputStream inputStream = null; + try { + inputStream = file.getInputStream(); + ComFmsTeamMemberImportExcelListen comFmsTeamMemberImportExcelListen = new ComFmsTeamMemberImportExcelListen( + communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); + EasyExcel.read(inputStream, null, comFmsTeamMemberImportExcelListen).sheet().doRead(); + } catch (IOException e) { + log.error("导入失败【{}】", e.getMessage()); + e.printStackTrace(); + } + return R.ok(); + } + + @ApiOperation(value = "导出团队成员") + @PostMapping(value = "/teamMember/export") + public R exportTeamMember(@RequestBody PageTeamMemberDTO pageTeamMemberDTO) { + Long communityId = this.getLoginUserInfo().getCommunityId(); + pageTeamMemberDTO.setCommunityId(communityId); + String ftpUrl = "/mnt/data/web/excel/"; + String nowDate = DateUtils.getCurrentDateString(); + String name = "团队成员导出数据" + nowDate + ".xlsx"; + try { + SFTPUtil sftp = new SFTPUtil(userName, password, host, port); + sftp.login(); + boolean existDir = sftp.isExistDir(ftpUrl + name); + if (!existDir) { + String property = System.getProperty("user.dir"); + String fileName = property + File.separator + name; + // 这里 需要指定写用哪个class去写 + ExcelWriter excelWriter = null; + InputStream inputStream = null; + try { + R r = communityService.exportTeamMember(pageTeamMemberDTO); + List<ComFmsTeamMemberExportExcelVO> list = new ArrayList<>(); + if (R.isOk(r)) { + list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComFmsTeamMemberExportExcelVO.class); + } + excelWriter = EasyExcel.write(fileName, ComFmsTeamMemberExportExcelVO.class) + .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) + .registerWriteHandler(new CustomSheetWriteHandler()).build(); + WriteSheet writeSheet = EasyExcel.writerSheet("团队成员导出数据").build(); + excelWriter.write(list, writeSheet); + excelWriter.finish(); + File file = new File(fileName); + inputStream = new FileInputStream(file); + sftp.uploadMore(ftpUrl, name, inputStream); + sftp.logout(); + inputStream.close(); + String absolutePath = file.getAbsolutePath(); + boolean delete = file.delete(); + log.info("删除excel【{}】结果【{}】", absolutePath, delete); + } finally { + // 千万别忘记finish 会帮忙关闭流 + if (inputStream != null) { + inputStream.close(); + } + if (excelWriter != null) { + excelWriter.finish(); + } + } + } + return R.ok(excelUrl + name); + } catch (Exception e) { + e.printStackTrace(); + log.error("文件传输失败【{}】", e.getMessage()); + return R.fail(); + } + } + + @ApiOperation("后台新增微服务") + @PostMapping("/service/add") + public R addFmsService(@RequestBody @Valid AddFmsServiceAdminDTO adminDTO) { + LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); + adminDTO.setCommunityId(loginUserInfo.getCommunityId()); + adminDTO.setCreatedBy(loginUserInfo.getUserId()); + adminDTO.setUpdatedBy(loginUserInfo.getUserId()); + return communityService.addFmsServiceAdmin(adminDTO); + } + + @ApiOperation(value = "后台分页查询微服务", response = ComFmsServiceVO.class) + @PostMapping("/service/page") + public R pageFmsService(@RequestBody @Valid PageFmsServiceAdminDTO adminDTO) { + adminDTO.setCommunityId(this.getCommunityId()); + return communityService.pageFmsServiceAdmin(adminDTO); + } + + @ApiOperation("后台核实微服务") + @PostMapping("/service/approval") + public R approvalFmsService(@RequestBody @Valid ApprovalFmsServiceAdminDTO adminDTO) { + if (adminDTO.getIsPass() && isNull(adminDTO.getMemberId())) { + return R.fail("未分配服务人员"); + } + adminDTO.setUpdatedBy(this.getUserId()); + return communityService.approvalFmsService(adminDTO); + } + + @ApiOperation(value = "级联查询团队服务人员", response = CascadeCommVO.class) + @GetMapping("/teamMember/cascade") + public R retrieveFmsTeamMemberCascade() { + return communityService.retrieveFmsTeamMemberCascade(this.getCommunityId()); + } + + @ApiOperation(value = "后台查看微服务详情", response = ComFmsServiceVO.class) + @ApiImplicitParam(name = "serviceId", value = "服务id", required = true) + @GetMapping("/service/detail") + public R detailFmsService(@RequestParam("serviceId") Long serviceId) { + return communityService.detailFmsServiceAdmin(serviceId); + } + + @ApiOperation(value = "后台删除微服务") + @ApiImplicitParam(name = "serviceId", value = "服务id", required = true) + @DeleteMapping("/service/delete") + public R deleteFmsService(@RequestParam("serviceId") Long serviceId) { + return communityService.deleteFmsServiceAdmin(serviceId); + } + + @ApiOperation(value = "微服务顶部统计", response = FmsServiceTopStatisticsVO.class) + @GetMapping("/service/statistics") + public R statisticsFmsService() { + return communityService.statisticsFmsService(this.getCommunityId()); + } + + @ApiOperation(value = "下载微服务导入模板") + @GetMapping("/service/template") + public R getServiceTemplate() { + // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 + String ftpUrl = "/mnt/data/web/excel/"; + String name = "微服务导入模板.xlsx"; + try { + SFTPUtil sftp = new SFTPUtil(userName, password, host, port); + sftp.login(); + boolean existDir = sftp.isExistDir(ftpUrl + name); + if (!existDir) { + String property = System.getProperty("user.dir"); + String fileName = property + File.separator + name; + // 这里 需要指定写用哪个class去写 + ExcelWriter excelWriter = null; + InputStream inputStream = null; + try { + List<List<String>> list = new ArrayList<>(); + list = fmsServiceHeadDataFilling(); + EasyExcel.write(fileName).head(list).sheet("微服务导入模板").doWrite(null); + File file = new File(fileName); + inputStream = new FileInputStream(file); + sftp.uploadMore(ftpUrl, name, inputStream); + sftp.logout(); + inputStream.close(); + String absolutePath = file.getAbsolutePath(); + boolean delete = file.delete(); + log.info("删除excel【{}】结果【{}】", absolutePath, delete); + } finally { + // 千万别忘记finish 会帮忙关闭流 + if (inputStream != null) { + inputStream.close(); + } + } + } + return R.ok(excelUrl + name); + } catch (Exception e) { + e.printStackTrace(); + log.error("文件传输失败【{}】", e.getMessage()); + return R.fail(); + } + } + + @ApiOperation(value = "excel导入微服务") + @PostMapping(value = "/service/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") + public R importFmsService(@RequestParam MultipartFile file, HttpServletRequest request) { + // 获取文件名 + String fileName = file.getOriginalFilename(); + log.info("传入文件名字【{}】", fileName); + InputStream inputStream = null; + try { + inputStream = file.getInputStream(); + ComFmsServiceImportExcelListen fmsServiceImportExcelListen = new ComFmsServiceImportExcelListen( + communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); + EasyExcel.read(inputStream, null, fmsServiceImportExcelListen).sheet().doRead(); + } catch (IOException e) { + log.error("导入失败【{}】", e.getMessage()); + e.printStackTrace(); + } + return R.ok(); + } + + @ApiOperation("后台新增微讲堂") + @PostMapping("/classroom/add") + public R addFmsClassroom(@RequestBody @Valid AddFmsClassroomAdminDTO adminDTO) { + LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); + adminDTO.setCommunityId(loginUserInfo.getCommunityId()); + adminDTO.setCreatedBy(loginUserInfo.getUserId()); + adminDTO.setUpdatedBy(loginUserInfo.getUserId()); + return communityService.addFmsClassroom(adminDTO); + } + + @ApiOperation("后台编辑微讲堂") + @PostMapping("/classroom/edit") + public R editFmsClassroom(@RequestBody @Valid EditFmsClassroomAdminDTO adminDTO) { + adminDTO.setUpdatedBy(this.getUserId()); + return communityService.editFmsClassroom(adminDTO); + } + + @ApiOperation("后台删除微讲堂") + @ApiImplicitParam(name = "id", value = "微讲堂id", required = true) + @DeleteMapping("/classroom/delete") + public R deleteFmsClassroom(@RequestParam("id") Long id) { + return communityService.deleteFmsClassroom(id); + } + + @ApiOperation(value = "后台获取微讲堂详情", response = ComFmsClassroomVO.class) + @ApiImplicitParam(name = "id", value = "微讲堂id", required = true) + @GetMapping("/classroom/detail") + public R detailFmsClassroom(@RequestParam("id") Long id) { + return communityService.detailFmsClassroom(id); + } + + @ApiOperation(value = "后台分页查询微讲堂", response = ComFmsClassroomVO.class) + @PostMapping("/classroom/page") + public R pageFmsClassroom(@RequestBody @Valid PageFmsClassroomAdminDTO adminDTO) { + adminDTO.setCommunityId(this.getCommunityId()); + return communityService.pageFmsClassroomAdmin(adminDTO); + } + + @ApiOperation(value = "微讲堂顶部统计", response = FmsClassroomTopStatisticsVO.class) + @GetMapping("/classroom/statistics") + public R statisticsFmsClassroom() { + return communityService.statisticsFmsClassroom(this.getCommunityId()); + } + + @ApiOperation(value = "获取预设图库",response = ComActPictureLibraryVO.class) + @GetMapping("/picture/library") + public R getPresetPictureLibrary() { + return communityService.getPresetPictureLibrary(PresetPictureType.FMS_CLASSROOM, 0); + } + + @ApiOperation(value = "后台分页查询微调节/微防控", response = FmsEventVO.class) + @PostMapping("/event/page") + public R pageFmsEvent(@RequestBody @Valid PageFmsEventAdminDTO adminDTO) { + adminDTO.setCommunityId(this.getCommunityId()); + return communityService.pageFmsEvent(adminDTO); + } + + @ApiOperation(value = "微调节/微防控顶部统计", response = FmsEventTopStatisticsVO.class) + @ApiImplicitParam(name = "type", value = "查询类型(1.微调节数据2.微防控数)", required = true) + @GetMapping("/event/statistics") + public R statisticsFmsEvent(@RequestParam("type") Integer type) { + return communityService.statisticsFmsEvent(type, this.getCommunityId()); + } + + @ApiOperation(value = "微调节/微防控事件详情", response = EventDetailsVO.class) + @ApiImplicitParam(name = "eventId", value = "事件id", required = true) + @GetMapping("/event/detail") + public R detailFmsEvent(@RequestParam("eventId") Long eventId) { + return gridService.eventDetails(eventId); + } + + @ApiOperation(value = "下载导入错误数据") + @PostMapping("/download/import/error") + public R downloadErrorAuthRecord(@RequestParam(value = "key") String key) { + String baseName = "导入错误数据"; + Class clazz = null; + if (key.contains(Constants.FMS_MEMBER_ERROR_LIST)) { + baseName = "团队成员导入错误数据"; + clazz = ComFmsTeamMemberImportMistakeExcelVO.class; + } else if (key.contains(Constants.FMS_SERVICE_ERROR_LIST)) { + baseName = "微服务导入错误数据"; + clazz = ComFmsServiceImportMistakeExcelVO.class; + } + List list = new ArrayList<>(); + Boolean isExits = stringRedisTemplate.hasKey(key); + ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); + if (isExits) { + String json = valueOperations.get(key); + list = JSONArray.parseArray(json, clazz); + } + String ftpUrl = "/mnt/data/web/excel/"; + String nowDate = DateUtils.getCurrentDateString(); + String name = baseName + nowDate + ".xlsx"; + try { + SFTPUtil sftp = new SFTPUtil(userName, password, host, port); + sftp.login(); + boolean existDir = sftp.isExistDir(ftpUrl + name); + if (!existDir) { + String property = System.getProperty("user.dir"); + String fileName = property + File.separator + name; + // 这里 需要指定写用哪个class去写 + ExcelWriter excelWriter = null; + InputStream inputStream = null; + try { + excelWriter = EasyExcel.write(fileName, clazz) + .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) + .registerWriteHandler(new CustomSheetWriteHandler()).build(); + WriteSheet writeSheet = EasyExcel.writerSheet(baseName).build(); + excelWriter.write(list, writeSheet); + excelWriter.finish(); + File file = new File(fileName); + inputStream = new FileInputStream(file); + sftp.uploadMore(ftpUrl, name, inputStream); + sftp.logout(); + inputStream.close(); + String absolutePath = file.getAbsolutePath(); + boolean delete = file.delete(); + log.info("删除excel【{}】结果【{}】", absolutePath, delete); + } finally { + // 千万别忘记finish 会帮忙关闭流 + if (inputStream != null) { + inputStream.close(); + } + if (excelWriter != null) { + excelWriter.finish(); + } + } + } + return R.ok(excelUrl + name); + } catch (Exception e) { + e.printStackTrace(); + log.error("文件传输失败【{}】", e.getMessage()); + return R.fail(); + } + } + + @ApiOperation(value = "手动触发微服务自动评价定时任务") + @PostMapping("/service/timeJob") + public R timeJobFmsService() { + return communityService.timedTaskFmsServiceDefaultPraise(); + } + + /** + * 表头构建 + * @return 表头数据 + */ + private List<List<String>> headDataFilling() { + List<List<String>> list = new ArrayList<List<String>>(); + List<String> head0 = new ArrayList<String>(); + head0.add("团队类型"); + List<String> head1 = new ArrayList<String>(); + head1.add("团队名称"); + List<String> head2 = new ArrayList<String>(); + head2.add("团队成员"); + List<String> head3 = new ArrayList<String>(); + head3.add("身份证号(非必填)"); + List<String> head4 = new ArrayList<String>(); + head4.add("联系电话"); + list.add(head0); + list.add(head1); + list.add(head2); + list.add(head3); + list.add(head4); + return list; + } + + private List<List<String>> fmsServiceHeadDataFilling() { + List<List<String>> list = new ArrayList<List<String>>(); + List<String> head0 = new ArrayList<String>(); + head0.add("服务用户"); + List<String> head1 = new ArrayList<String>(); + head1.add("联系电话"); + List<String> head2 = new ArrayList<String>(); + head2.add("服务时间"); + List<String> head3 = new ArrayList<String>(); + head3.add("服务内容"); + List<String> head4 = new ArrayList<String>(); + head4.add("服务过程"); + list.add(head0); + list.add(head1); + list.add(head2); + list.add(head3); + list.add(head4); + return list; + } +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComFmsApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComFmsApi.java new file mode 100644 index 0000000..5e8d564 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComFmsApi.java @@ -0,0 +1,518 @@ +package com.panzhihua.service_community.api; + +import com.panzhihua.common.model.dtos.community.fms.AddFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.AddFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.AddTeamDTO; +import com.panzhihua.common.model.dtos.community.fms.AddTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.AddTeamTypeDTO; +import com.panzhihua.common.model.dtos.community.fms.ApplyFmsServiceDTO; +import com.panzhihua.common.model.dtos.community.fms.ApprovalFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.DeleteTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.EditFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamTypeDTO; +import com.panzhihua.common.model.dtos.community.fms.EvaluationFmsServiceDTO; +import com.panzhihua.common.model.dtos.community.fms.FeedbackFmsServiceDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsEventAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsServiceAppletsDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsTeamDTO; +import com.panzhihua.common.model.dtos.community.fms.PageTeamMemberDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.fms.ComFmsServiceImportExcelVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberImportExcelVO; +import com.panzhihua.service_community.service.ComFmsClassroomService; +import com.panzhihua.service_community.service.ComFmsServiceEvaluationsService; +import com.panzhihua.service_community.service.ComFmsServiceService; +import com.panzhihua.service_community.service.ComFmsTeamMemberService; +import com.panzhihua.service_community.service.ComFmsTeamService; +import com.panzhihua.service_community.service.ComFmsTeamTypeService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +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.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @title: ComFmsApi + * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 + * @description: 五微服务相关接口 + * @author: hans + * @date: 2022/02/11 13:23 + */ +@Slf4j +@RestController +@RequestMapping("/fms") +public class ComFmsApi { + + @Resource + private ComFmsTeamTypeService comFmsTeamTypeService; + @Resource + private ComFmsTeamService comFmsTeamService; + @Resource + private ComFmsTeamMemberService comFmsTeamMemberService; + @Resource + private ComFmsServiceService comFmsServiceService; + @Resource + private ComFmsClassroomService comFmsClassroomService; + @Resource + private ComFmsServiceEvaluationsService comFmsServiceEvaluationsService; + + /** + * 新增团队类型 + * @param addTeamTypeDTO + * @return + */ + @PostMapping("/teamType/add") + public R addFmsTeamType(@RequestBody AddTeamTypeDTO addTeamTypeDTO) { + return comFmsTeamTypeService.addFmsTeamType(addTeamTypeDTO); + } + + /** + * 修改团队类型 + * @param editTeamTypeDTO + * @return + */ + @PostMapping("/teamType/edit") + public R editFmsTeamType(@RequestBody EditTeamTypeDTO editTeamTypeDTO) { + return comFmsTeamTypeService.editFmsTeamType(editTeamTypeDTO); + } + + /** + * 删除团队类型 + * @param teamTypeId + * @param communityId + * @return + */ + @DeleteMapping("/teamType/delete") + public R deleteFmsTeamType(@RequestParam("teamTypeId") Long teamTypeId, + @RequestParam("communityId") Long communityId) { + return comFmsTeamTypeService.deleteFmsTeamType(teamTypeId, communityId); + } + + /** + * 获取团队类型列表 + * @param communityId + * @return + */ + @GetMapping("/teamType/list") + public R listFmsTeamType(@RequestParam("communityId") Long communityId) { + return comFmsTeamTypeService.listFmsTeamType(communityId); + } + + /** + * 新增团队 + * @param addTeamDTO + * @return + */ + @PostMapping("/team/add") + public R addFmsTeam(@RequestBody AddTeamDTO addTeamDTO) { + return comFmsTeamService.addFmsTeam(addTeamDTO); + } + + /** + * 修改团队信息 + * @param editTeamDTO + * @return + */ + @PostMapping("/team/edit") + public R editFmsTeam(@RequestBody EditTeamDTO editTeamDTO) { + return comFmsTeamService.editFmsTeam(editTeamDTO); + } + + /** + * 删除团队 + * @param teamId + * @return + */ + @DeleteMapping("/team/delete") + public R deleteFmsTeam(@RequestParam("teamId") Long teamId) { + return comFmsTeamService.deleteFmsTeam(teamId); + } + + /** + * 获取团队列表 + * @param teamTypeId + * @return + */ + @GetMapping("/team/list") + public R listFmsTeam(@RequestParam("teamTypeId") Long teamTypeId) { + return comFmsTeamService.listFmsTeam(teamTypeId); + } + + /** + * 获取团队详情 + * @param teamId + * @return + */ + @GetMapping("/team/detail") + public R detailFmsTeam(@RequestParam("teamId") Long teamId) { + return comFmsTeamService.detailFmsTeam(teamId); + } + + /** + * 级联查询团队数据 + * @param communityId + * @return + */ + @GetMapping("/team/cascade") + public R retrieveFmsTeamCascade(@RequestParam("communityId") Long communityId) { + return comFmsTeamService.retrieveFmsTeamCascade(communityId); + } + + /** + * 新增团队成员 + * @param addTeamMemberDTO + * @return + */ + @PostMapping("/teamMember/add") + public R addFmsTeamMember(@RequestBody AddTeamMemberDTO addTeamMemberDTO) { + return comFmsTeamMemberService.addFmsTeamMember(addTeamMemberDTO); + } + + /** + * 编辑团队成员 + * @param editTeamMemberDTO + * @return + */ + @PostMapping("/teamMember/edit") + public R editFmsTeamMember(@RequestBody EditTeamMemberDTO editTeamMemberDTO) { + return comFmsTeamMemberService.editFmsTeamMember(editTeamMemberDTO); + } + + /** + * 删除团队成员 + * @param deleteTeamMemberDTO + * @return + */ + @PostMapping("/teamMember/delete") + public R deleteFmsTeamMember(@RequestBody DeleteTeamMemberDTO deleteTeamMemberDTO) { + return comFmsTeamMemberService.deleteFmsTeamMember(deleteTeamMemberDTO); + } + + /** + * 分页查询团队成员 + * @param pageTeamMemberDTO + * @return + */ + @PostMapping("/teamMember/page") + public R pageFmsTeamMember(@RequestBody PageTeamMemberDTO pageTeamMemberDTO) { + return comFmsTeamMemberService.pageFmsTeamMember(pageTeamMemberDTO); + } + + /** + * 微团队顶部统计 + * @param communityId + * @return + */ + @GetMapping("/teamMember/statistics") + public R statisticsFmsTeamMember(@RequestParam("communityId") Long communityId) { + return comFmsTeamMemberService.statisticsFmsTeamMember(communityId); + } + + /** + * 批量导入团队成员 + * @param voList + * @param communityId + * @param userId + * @return + */ + @PostMapping("/teamMember/import") + public R listSaveFmsTeamMemberExcelVO(@RequestBody List<ComFmsTeamMemberImportExcelVO> voList, + @RequestParam("communityId") Long communityId, @RequestParam("userId") Long userId) { + return comFmsTeamMemberService.listSaveFmsTeamMemberExcelVO(voList, communityId, userId); + } + + /** + * 团队人员导出 + * @param pageTeamMemberDTO + * @return + */ + @PostMapping("/teamMember/export") + public R exportTeamMember(@RequestBody PageTeamMemberDTO pageTeamMemberDTO) { + return comFmsTeamMemberService.exportTeamMember(pageTeamMemberDTO); + } + + /** + * 后台新增微服务 + * @param adminDTO + * @return + */ + @PostMapping("/service/adminAdd") + public R addFmsServiceAdmin(@RequestBody AddFmsServiceAdminDTO adminDTO) { + return comFmsServiceService.addFmsServiceAdmin(adminDTO); + } + + /** + * 后台分页查询微服务 + * @param adminDTO + * @return + */ + @PostMapping("/service/adminPage") + public R pageFmsServiceAdmin(@RequestBody PageFmsServiceAdminDTO adminDTO) { + return comFmsServiceService.pageFmsServiceAdmin(adminDTO); + } + + /** + * 后台核实微服务 + * @param adminDTO + * @return + */ + @PostMapping("/service/approval") + public R approvalFmsService(@RequestBody ApprovalFmsServiceAdminDTO adminDTO) { + return comFmsServiceService.approvalFmsService(adminDTO); + } + + /** + * 级联查询团队服务人员 + * @param communityId + * @return + */ + @GetMapping("/teamMember/cascade") + public R retrieveFmsTeamMemberCascade(@RequestParam("communityId") Long communityId) { + return comFmsTeamMemberService.retrieveFmsTeamMemberCascade(communityId); + } + + /** + * 后台查看微服务详情 + * @param serviceId + * @return + */ + @GetMapping("/service/detailAdmin") + public R detailFmsServiceAdmin(@RequestParam("serviceId") Long serviceId) { + return comFmsServiceService.detailFmsServiceAdmin(serviceId); + } + + /** + * 后台删除微服务 + * @param serviceId + * @return + */ + @DeleteMapping("/service/delete") + public R deleteFmsServiceAdmin(@RequestParam("serviceId") Long serviceId) { + return comFmsServiceService.deleteFmsServiceAdmin(serviceId); + } + + /** + * 微服务顶部统计 + * @param communityId + * @return + */ + @GetMapping("/service/statistics") + public R statisticsFmsService(@RequestParam("communityId") Long communityId) { + return comFmsServiceService.statisticsFmsService(communityId); + } + + /** + * 后台导入微服务数据 + * @param voList + * @param communityId + * @param userId + * @return + */ + @PostMapping("/service/import") + public R listSaveFmsServiceExcelVO(@RequestBody List<ComFmsServiceImportExcelVO> voList, + @RequestParam("communityId") Long communityId, + @RequestParam("userId") Long userId) { + return comFmsServiceService.listSaveFmsServiceExcelVO(voList, communityId, userId); + } + + /** + * 后台新增微讲堂 + * @param adminDTO + * @return + */ + @PostMapping("/classroom/add") + public R addFmsClassroom(@RequestBody AddFmsClassroomAdminDTO adminDTO) { + return comFmsClassroomService.addFmsClassroom(adminDTO); + } + + /** + * 后台编辑微讲堂 + * @param adminDTO + * @return + */ + @PostMapping("/classroom/edit") + public R editFmsClassroom(@RequestBody EditFmsClassroomAdminDTO adminDTO) { + return comFmsClassroomService.editFmsClassroom(adminDTO); + } + + /** + * 后台删除微讲堂 + * @param id + * @return + */ + @DeleteMapping("/classroom/delete") + public R deleteFmsClassroom(@RequestParam("id") Long id) { + return comFmsClassroomService.deleteFmsClassroom(id); + } + + /** + * 后台获取微讲堂详情 + * @param id + * @return + */ + @GetMapping("/classroom/detail") + public R detailFmsClassroom(@RequestParam("id") Long id) { + return comFmsClassroomService.detailFmsClassroom(id); + } + + /** + * 后台分页查询微讲堂 + * @param adminDTO + * @return + */ + @PostMapping("/classroom/pageAdmin") + public R pageFmsClassroomAdmin(@RequestBody PageFmsClassroomAdminDTO adminDTO) { + return comFmsClassroomService.pageFmsClassroomAdmin(adminDTO); + } + + /** + * 微讲堂顶部统计 + * @param communityId + * @return + */ + @GetMapping("/classroom/statistics") + public R statisticsFmsClassroom(@RequestParam("communityId") Long communityId) { + return comFmsClassroomService.statisticsFmsClassroom(communityId); + } + + /** + * 后台分页查询微调节/微防控 + * @param adminDTO + * @return + */ + @PostMapping("/event/page") + public R pageFmsEvent(@RequestBody PageFmsEventAdminDTO adminDTO) { + return comFmsClassroomService.pageFmsEvent(adminDTO); + } + + /** + * 微调节/微防控顶部统计 + * @param type + * @param communityId + * @return + */ + @GetMapping("/event/statistics") + public R statisticsFmsEvent(@RequestParam("type") Integer type, @RequestParam("communityId") Long communityId) { + return comFmsClassroomService.statisticsFmsEvent(type, communityId); + } + + /** + * 小程序分页查询团队信息 + * @param pageFmsTeamDTO + * @return + */ + @PostMapping("/team/pageApplets") + public R pageFmsTeamApplets(@RequestBody PageFmsTeamDTO pageFmsTeamDTO) { + return comFmsTeamService.pageFmsTeamApplets(pageFmsTeamDTO); + } + + /** + * 小程序获取微讲堂详情 + * @param id + * @return + */ + @GetMapping("/classroom/detailApplets") + public R detailFmsClassroomApplets(@RequestParam("id") Long id) { + return comFmsClassroomService.detailFmsClassroomApplets(id); + } + + /** + * 小程序分页查询微调节/微防控 + * @param adminDTO + * @return + */ + @PostMapping("/event/pageApplets") + public R pageFmsEventApplets(@RequestBody PageFmsEventAdminDTO adminDTO) { + return comFmsClassroomService.pageFmsEventApplets(adminDTO); + } + + /** + * 小程序分页查询微服务 + * @param adminDTO + * @return + */ + @PostMapping("/service/pageApplets") + public R pageFmsServiceApplets(@RequestBody PageFmsServiceAppletsDTO adminDTO) { + return comFmsServiceService.pageFmsServiceApplets(adminDTO); + } + + /** + * 小程序查看微服务详情 + * @param serviceId + * @param userId + * @return + */ + @GetMapping("/service/detailApplets") + public R detailFmsServiceApplets(@RequestParam("serviceId") Long serviceId, @RequestParam(value = "userId", required = false) Long userId) { + return comFmsServiceService.detailFmsServiceApplets(serviceId, userId); + } + + /** + * 微服务申请 + * @param adminDTO + * @return + */ + @PostMapping("/service/apply") + public R applyFmsService(@RequestBody ApplyFmsServiceDTO adminDTO) { + return comFmsServiceService.applyFmsService(adminDTO); + } + + /** + * 分页查询我的微服务 + * @param adminDTO + * @return + */ + @PostMapping("/service/pageMy") + public R pageMyFmsService(@RequestBody PageFmsServiceAppletsDTO adminDTO) { + return comFmsServiceService.pageMyFmsService(adminDTO); + } + + /** + * 微服务评价 + * @param evaluationFmsServiceDTO + * @return + */ + @PostMapping("/service/evaluate") + public R evaluateFmsService(@RequestBody EvaluationFmsServiceDTO evaluationFmsServiceDTO) { + return comFmsServiceEvaluationsService.evaluateFmsService(evaluationFmsServiceDTO); + } + + /** + * 微团队成员分页查询服务处理 + * @param adminDTO + * @return + */ + @PostMapping("/service/pageDeal") + public R pageDealFmsService(@RequestBody PageFmsServiceAppletsDTO adminDTO) { + return comFmsServiceService.pageDealFmsService(adminDTO); + } + + /** + * 微团队成员服务反馈 + * @param adminDTO + * @return + */ + @PostMapping("/service/feedback") + public R feedbackFmsService(@RequestBody FeedbackFmsServiceDTO adminDTO) { + return comFmsServiceService.feedbackFmsService(adminDTO); + } + + /** + * 定时任务针对服务结束后3天还未评价的用户默认好评 + * @return + */ + @PostMapping("/service/defaultPraise") + public R timedTaskFmsServiceDefaultPraise() { + return comFmsServiceService.defaultPraise(); + } +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsClassroomDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsClassroomDAO.java new file mode 100644 index 0000000..1f49861 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsClassroomDAO.java @@ -0,0 +1,86 @@ +package com.panzhihua.service_community.dao; + +import java.util.List; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.panzhihua.common.model.dtos.community.fms.PageFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsEventAdminDTO; +import com.panzhihua.common.model.vos.community.fms.ComFmsClassroomVO; +import com.panzhihua.common.model.vos.community.fms.FmsClassroomTopStatisticsVO; +import com.panzhihua.common.model.vos.community.fms.FmsEventTopStatisticsVO; +import com.panzhihua.common.model.vos.community.fms.FmsEventVO; +import com.panzhihua.common.model.vos.grid.EventVO; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Mapper; +import com.panzhihua.service_community.entity.ComFmsClassroom; + +/** + * 五微服务-微学堂(ComFmsClassroom)表数据库访问层 + * + * @author makejava + * @since 2022-02-11 13:35:51 + */ +@Mapper +public interface ComFmsClassroomDAO extends BaseMapper<ComFmsClassroom> { + + /** + * 批量新增数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsClassroom> 实例对象列表 + * @return 影响行数 + */ + int insertBatch(@Param("entities") List<ComFmsClassroom> entities); + + /** + * 批量新增或按主键更新数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsClassroom> 实例对象列表 + * @return 影响行数 + * @throws org.springframework.jdbc.BadSqlGrammarException + * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 + */ + int insertOrUpdateBatch(@Param("entities") List<ComFmsClassroom> entities); + + /** + * 后台分页查询微讲堂 + * @param page + * @param adminDTO + * @return + */ + IPage<ComFmsClassroomVO> pageFmsClassroomAdmin(@Param("page") Page page, @Param("adminDTO") PageFmsClassroomAdminDTO adminDTO); + + /** + * 微讲堂顶部统计数据查询 + * @param communityId + * @return + */ + FmsClassroomTopStatisticsVO statisticsFmsClassroom(@Param("communityId") Long communityId); + + /** + * 后台分页查询微调节/微防控 + * @param page + * @param adminDTO + * @return + */ + IPage<FmsEventVO> pageFmsEvent(@Param("page") Page page, @Param("adminDTO") PageFmsEventAdminDTO adminDTO); + + /** + * 微调节/微防控顶部统计 + * @param type + * @param communityId + * @return + */ + FmsEventTopStatisticsVO statisticsFmsEvent(@Param("type") Integer type, @Param("communityId") Long communityId); + + /** + * 小程序分页查询微调节/微防控 + * @param page + * @param adminDTO + * @return + */ + IPage<EventVO> pageFmsEventApplets(@Param("page") Page page, @Param("adminDTO") PageFmsEventAdminDTO adminDTO); +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsServiceDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsServiceDAO.java new file mode 100644 index 0000000..4b0449f --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsServiceDAO.java @@ -0,0 +1,97 @@ +package com.panzhihua.service_community.dao; + +import java.util.List; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.panzhihua.common.model.dtos.community.fms.PageFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsServiceAppletsDTO; +import com.panzhihua.common.model.vos.community.fms.ComFmsServiceVO; +import com.panzhihua.common.model.vos.community.fms.FmsServiceTopStatisticsVO; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Mapper; +import com.panzhihua.service_community.entity.ComFmsService; + +/** + * 五微服务-微服务(ComFmsService)表数据库访问层 + * + * @author makejava + * @since 2022-02-11 13:35:52 + */ +@Mapper +public interface ComFmsServiceDAO extends BaseMapper<ComFmsService> { + + /** + * 批量新增数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsService> 实例对象列表 + * @return 影响行数 + */ + int insertBatch(@Param("entities") List<ComFmsService> entities); + + /** + * 批量新增或按主键更新数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsService> 实例对象列表 + * @return 影响行数 + * @throws org.springframework.jdbc.BadSqlGrammarException + * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 + */ + int insertOrUpdateBatch(@Param("entities") List<ComFmsService> entities); + + /** + * 后台分页查询微服务 + * @param page + * @param adminDTO + * @return + */ + IPage<ComFmsServiceVO> pageFmsServiceAdmin(@Param("page") Page page, @Param("adminDTO") PageFmsServiceAdminDTO adminDTO); + + /** + * 后台查看微服务详情 + * @param serviceId + * @return + */ + ComFmsServiceVO detailFmsServiceAdmin(@Param("serviceId") Long serviceId); + + /** + * 微服务顶部统计数据查询 + * @param communityId + * @return + */ + FmsServiceTopStatisticsVO statisticsFmsService(@Param("communityId") Long communityId); + + /** + * 小程序分页查询微服务 + * @param page + * @param adminDTO + * @return + */ + IPage<ComFmsServiceVO> pageFmsServiceAdminApplets(@Param("page") Page page, @Param("adminDTO") PageFmsServiceAppletsDTO adminDTO); + + /** + * 小程序查看微服务详情 + * @param serviceId + * @return + */ + ComFmsServiceVO detailFmsServiceApplets(@Param("serviceId") Long serviceId); + + /** + * 分页查询我的微服务 + * @param page + * @param adminDTO + * @return + */ + IPage<ComFmsServiceVO> pageMyFmsService(@Param("page") Page page, @Param("adminDTO") PageFmsServiceAppletsDTO adminDTO); + + /** + * 微团队成员分页查询服务处理 + * @param page + * @param adminDTO + * @return + */ + IPage<ComFmsServiceVO> pageDealFmsService(@Param("page") Page page, @Param("adminDTO") PageFmsServiceAppletsDTO adminDTO); +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsServiceEvaluationsDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsServiceEvaluationsDAO.java new file mode 100644 index 0000000..2a146ae --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsServiceEvaluationsDAO.java @@ -0,0 +1,39 @@ +package com.panzhihua.service_community.dao; + +import java.util.List; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Mapper; +import com.panzhihua.service_community.entity.ComFmsServiceEvaluations; + +/** + * 五微服务-服务评价(ComFmsServiceEvaluations)表数据库访问层 + * + * @author makejava + * @since 2022-02-11 13:35:53 + */ +@Mapper +public interface ComFmsServiceEvaluationsDAO extends BaseMapper<ComFmsServiceEvaluations> { + + /** + * 批量新增数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsServiceEvaluations> 实例对象列表 + * @return 影响行数 + */ + int insertBatch(@Param("entities") List<ComFmsServiceEvaluations> entities); + + /** + * 批量新增或按主键更新数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsServiceEvaluations> 实例对象列表 + * @return 影响行数 + * @throws org.springframework.jdbc.BadSqlGrammarException + * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 + */ + int insertOrUpdateBatch(@Param("entities") List<ComFmsServiceEvaluations> entities); + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsServiceRecordDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsServiceRecordDAO.java new file mode 100644 index 0000000..d58aa6b --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsServiceRecordDAO.java @@ -0,0 +1,39 @@ +package com.panzhihua.service_community.dao; + +import java.util.List; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Mapper; +import com.panzhihua.service_community.entity.ComFmsServiceRecord; + +/** + * 五微服务-服务记录(ComFmsServiceRecord)表数据库访问层 + * + * @author makejava + * @since 2022-02-11 13:35:54 + */ +@Mapper +public interface ComFmsServiceRecordDAO extends BaseMapper<ComFmsServiceRecord> { + + /** + * 批量新增数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsServiceRecord> 实例对象列表 + * @return 影响行数 + */ + int insertBatch(@Param("entities") List<ComFmsServiceRecord> entities); + + /** + * 批量新增或按主键更新数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsServiceRecord> 实例对象列表 + * @return 影响行数 + * @throws org.springframework.jdbc.BadSqlGrammarException + * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 + */ + int insertOrUpdateBatch(@Param("entities") List<ComFmsServiceRecord> entities); + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamDAO.java new file mode 100644 index 0000000..bbba448 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamDAO.java @@ -0,0 +1,57 @@ +package com.panzhihua.service_community.dao; + +import java.util.List; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.panzhihua.common.model.dtos.community.fms.PageFmsTeamDTO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamVO; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Mapper; +import com.panzhihua.service_community.entity.ComFmsTeam; + +/** + * 五微服务-微团队(ComFmsTeam)表数据库访问层 + * + * @author makejava + * @since 2022-02-11 13:35:54 + */ +@Mapper +public interface ComFmsTeamDAO extends BaseMapper<ComFmsTeam> { + + /** + * 批量新增数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsTeam> 实例对象列表 + * @return 影响行数 + */ + int insertBatch(@Param("entities") List<ComFmsTeam> entities); + + /** + * 批量新增或按主键更新数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsTeam> 实例对象列表 + * @return 影响行数 + * @throws org.springframework.jdbc.BadSqlGrammarException + * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 + */ + int insertOrUpdateBatch(@Param("entities") List<ComFmsTeam> entities); + + /** + * 小程序分页查询团队信息 + * @param page + * @param pageFmsTeamDTO + * @return + */ + IPage<ComFmsTeamVO> pageFmsTeamApplets(@Param("page") Page page, @Param("pageFmsTeamDTO") PageFmsTeamDTO pageFmsTeamDTO); + + /** + * 小程序查询团队信息 + * @param pageFmsTeamDTO + * @return + */ + List<ComFmsTeamVO> listFmsTeamApplets(@Param("pageFmsTeamDTO") PageFmsTeamDTO pageFmsTeamDTO); +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamMemberDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamMemberDAO.java new file mode 100644 index 0000000..0ee1261 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamMemberDAO.java @@ -0,0 +1,89 @@ +package com.panzhihua.service_community.dao; + +import java.util.List; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.panzhihua.common.model.dtos.community.fms.PageTeamMemberDTO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberExportExcelVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberVO; +import com.panzhihua.common.model.vos.community.fms.TeamMemberTopStatisticsVO; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Mapper; +import com.panzhihua.service_community.entity.ComFmsTeamMember; + +/** + * 五微服务-团队成员(ComFmsTeamMember)表数据库访问层 + * + * @author makejava + * @since 2022-02-11 13:35:55 + */ +@Mapper +public interface ComFmsTeamMemberDAO extends BaseMapper<ComFmsTeamMember> { + + /** + * 批量新增数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsTeamMember> 实例对象列表 + * @return 影响行数 + */ + int insertBatch(@Param("entities") List<ComFmsTeamMember> entities); + + /** + * 批量新增或按主键更新数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsTeamMember> 实例对象列表 + * @return 影响行数 + * @throws org.springframework.jdbc.BadSqlGrammarException + * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 + */ + int insertOrUpdateBatch(@Param("entities") List<ComFmsTeamMember> entities); + + /** + * 分页查询团队成员 + * @param page + * @param pageTeamMemberDTO + * @return + */ + IPage<ComFmsTeamMemberVO> pageFmsTeamMember(@Param("page") Page page, @Param("pageTeamMemberDTO") PageTeamMemberDTO pageTeamMemberDTO); + + /** + * 获取成员数量 + * @param communityId + * @param idCard + * @param phone + * @return + */ + Integer countMember(@Param("communityId") Long communityId, @Param("idCard") String idCard, @Param("phone") String phone); + + /** + * 微团队顶部统计 + * @param communityId + * @return + */ + TeamMemberTopStatisticsVO statisticsFmsTeamMember(@Param("communityId") Long communityId); + + /** + * 获取团队人员导出数据 + * @param pageTeamMemberDTO + * @return + */ + List<ComFmsTeamMemberExportExcelVO> exportTeamMember(@Param("pageTeamMemberDTO") PageTeamMemberDTO pageTeamMemberDTO); + + /** + * 通过社区id获取团队成员 + * @param communityId + * @return + */ + List<ComFmsTeamMemberVO> selectListByCommunityId(@Param("communityId") Long communityId); + + /** + * 通过团队id查询团队成员 + * @param teamId + * @return + */ + List<ComFmsTeamMemberVO> selectVOListByTeamId(@Param("teamId") Long teamId); +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamMemberRelationDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamMemberRelationDAO.java new file mode 100644 index 0000000..418b64d --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamMemberRelationDAO.java @@ -0,0 +1,39 @@ +package com.panzhihua.service_community.dao; + +import java.util.List; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Mapper; +import com.panzhihua.service_community.entity.ComFmsTeamMemberRelation; + +/** + * 五微服务-团队&成员关系表(ComFmsTeamMemberRelation)表数据库访问层 + * + * @author makejava + * @since 2022-02-14 14:41:35 + */ +@Mapper +public interface ComFmsTeamMemberRelationDAO extends BaseMapper<ComFmsTeamMemberRelation> { + + /** + * 批量新增数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsTeamMemberRelation> 实例对象列表 + * @return 影响行数 + */ + int insertBatch(@Param("entities") List<ComFmsTeamMemberRelation> entities); + + /** + * 批量新增或按主键更新数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsTeamMemberRelation> 实例对象列表 + * @return 影响行数 + * @throws org.springframework.jdbc.BadSqlGrammarException + * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 + */ + int insertOrUpdateBatch(@Param("entities") List<ComFmsTeamMemberRelation> entities); + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamTypeDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamTypeDAO.java new file mode 100644 index 0000000..bbee9b9 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComFmsTeamTypeDAO.java @@ -0,0 +1,39 @@ +package com.panzhihua.service_community.dao; + +import java.util.List; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Mapper; +import com.panzhihua.service_community.entity.ComFmsTeamType; + +/** + * 五微服务-团队类型(ComFmsTeamType)表数据库访问层 + * + * @author makejava + * @since 2022-02-11 13:35:56 + */ +@Mapper +public interface ComFmsTeamTypeDAO extends BaseMapper<ComFmsTeamType> { + + /** + * 批量新增数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsTeamType> 实例对象列表 + * @return 影响行数 + */ + int insertBatch(@Param("entities") List<ComFmsTeamType> entities); + + /** + * 批量新增或按主键更新数据(MyBatis原生foreach方法) + * + * @param entities + * List<ComFmsTeamType> 实例对象列表 + * @return 影响行数 + * @throws org.springframework.jdbc.BadSqlGrammarException + * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 + */ + int insertOrUpdateBatch(@Param("entities") List<ComFmsTeamType> entities); + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/EventMapper.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/EventMapper.java new file mode 100644 index 0000000..8a668d0 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/EventMapper.java @@ -0,0 +1,195 @@ +package com.panzhihua.service_community.dao; + +import java.util.List; +import java.util.Map; + +import com.panzhihua.service_community.model.dos.EventDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.panzhihua.common.model.dtos.community.bigscreen.event.ScreenEventListDTO; +import com.panzhihua.common.model.dtos.grid.GridEventStatisticsDTO; +import com.panzhihua.common.model.dtos.grid.PageEventDTO; +import com.panzhihua.common.model.dtos.grid.PageEventManageDTO; +import com.panzhihua.common.model.dtos.grid.PageEventSpecialPopulationDTO; +import com.panzhihua.common.model.dtos.grid.PagePublicityEventCommunityDTO; +import com.panzhihua.common.model.dtos.grid.PagePublicityEventDTO; +import com.panzhihua.common.model.vos.community.StatisticsCommVO; +import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO; +import com.panzhihua.common.model.vos.community.screen.event.EventComprehensiveGovernanceStatisticsVO; +import com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO; +import com.panzhihua.common.model.vos.community.screen.event.EventListVO; +import com.panzhihua.common.model.vos.grid.ComMapGridEventVO; +import com.panzhihua.common.model.vos.grid.EventSpecialPopulationVO; +import com.panzhihua.common.model.vos.grid.EventStatisticsAllAdminVO; +import com.panzhihua.common.model.vos.grid.EventVO; +import com.panzhihua.common.model.vos.grid.GridEventStatisticsDetailVO; +import com.panzhihua.common.model.vos.grid.GridEventStatisticsVO; +import com.panzhihua.common.model.vos.screen.DateScreenVO; +import com.panzhihua.common.model.vos.screen.EventDetailWorkVO; +import com.panzhihua.common.model.vos.screen.EventTypeWorkVO; +import com.panzhihua.common.model.vos.screen.EventWorkVO; +import com.panzhihua.common.model.vos.screen.ScreenDrawEventPopulationTotalVO; + +/** + * DAO + * + * @author cedoo email:cedoo(a)qq.com + * @version 1.0 + * @date 2021-05-26 + * @since 1.0 + */ +@Mapper +public interface EventMapper extends BaseMapper<EventDO> { + + /** + * 分页查询事件 + * + * @param pageEventDTO + * @return + */ + IPage<EventVO> findByPage(Page page, @Param("pageEventDTO") PageEventDTO pageEventDTO); + + /** + * 分页查询宣传教育 + * + * @param pagePublicityEventDTO + * @return + */ + IPage<EventVO> findPublicityByPage(Page page, + @Param("pagePublicityEventDTO") PagePublicityEventDTO pagePublicityEventDTO); + + /** + * 地图模块-根据网格id查询网格办件事件 + * + * @param gridId + * 网格id + * @return 网格办件事件 + */ + List<ComMapGridEventVO> getEventByGridId(@Param("gridId") Long gridId); + + /** + * 根据网格员id查询网格员头像url + * + * @param gridMemberId + * 网格员id + * @return 头像url + */ + Map<String, String> getGridMemberImageUrl(@Param("gridMemberId") Long gridMemberId); + + /** + * 查询事件(管理)列表 + * + * @param page + * @param pageEventManageDTO + * @return + */ + IPage<EventVO> findToManageByPage(Page page, @Param("pageEventManageDTO") PageEventManageDTO pageEventManageDTO); + + /** + * 查询事件(管理)列表 + * + * @param page + * @param pagePublicityEventCommunityDTO + * @return + */ + IPage<EventVO> findCommunityPublicityByPage(Page page, + @Param("pagePublicityEventCommunityDTO") PagePublicityEventCommunityDTO pagePublicityEventCommunityDTO); + + /** + * 后台管理-统计模块 + * + * @param communityId + * 社区id + * @return 统计信息 + */ + EventStatisticsAllAdminVO eventStatistics(@Param("communityId") Long communityId); + + Integer getEventCountByGridIds(@Param("ids") List<Long> ids); + + /** + * 根据网格id查询网格统计数据 + * + * @param gridId + * 网格id + * @return 网格统计数据 + */ + GridEventStatisticsVO getGridEventStatisticsByApp(@Param("gridId") Long gridId); + + /** + * 查询网格事件统计数据 + * + * @param statisticsDTO + * 请求参数 + * @return 网格事件统计数据 + */ + GridEventStatisticsDetailVO + getGridEventDetailStatisticsByApp(@Param("statisticsDTO") GridEventStatisticsDTO statisticsDTO); + + /** + * 查询时间发布者基本信息 + * + * @param gridMemberId + * @return + */ + Map<String, Object> getUserBaseInfo(@Param("gridMemberId") Long gridMemberId); + + /** + * 事件大屏查询事件列表 + * + * @param eventListDTO + * 请求参数 + * @return 事件列表 + */ + IPage<EventListVO> getScreenEventList(Page page, @Param("eventListDTO") ScreenEventListDTO eventListDTO); + + /** + * 特殊人群上报-社区人口数据列表 + * + * @param specialPopulationDTO + * 请求参数 + * @return 社区人口数据列表 + */ + IPage<EventSpecialPopulationVO> specialPopulationList(Page page, + @Param("specialPopulationDTO") PageEventSpecialPopulationDTO specialPopulationDTO); + + Map<String, Long> countByCommunityId(@Param("communityId") Long communityId, @Param("nowDate") String nowDate); + + DateScreenVO countByAvgCommunityId(@Param("communityId") Long communityId); + + List<EventDetailWorkVO> getWorkScreenEventList(@Param("communityId") Long communityId); + + EventWorkVO countByTime(@Param("start") String start, @Param("end") String end, + @Param("communityId") Long communityId); + + EventTypeWorkVO getComplete(@Param("communityId") Long communityId); + + EventTypeWorkVO getNoComplete(@Param("communityId") Long communityId); + + Map<String, Long> getSSPEventTotal(@Param("communityId") Long communityId); + + List<EventGridIncidentStatisticsVO> getEventListByCommunityId(@Param("communityId") Long communityId); + + List<CivilVillageStatisticsVO> getCivilScreenVillageList(@Param("communityId") Long communityId); + + ScreenDrawEventPopulationTotalVO getVillagePopulationTotal(@Param("villageId") Long villageId); + + List<Map<String, Object>> getMemberBuildName(@Param("userId") Long userId); + + Integer getPopulationByLabelCount(@Param("floor") String floor, @Param("villageId") Long villageId); + + /** + * 西区大数据分析平台-综合治理栏数据 + * @return + */ + EventComprehensiveGovernanceStatisticsVO selectComprehensiveGovernanceStatics(); + + List<EventGridIncidentStatisticsVO> getGridsGovernanceEventList(@Param("communityId") Long communityId); + + ScreenDrawEventPopulationTotalVO getVillagePopulationTotalNew(@Param("villageId") Long villageId); + + List<StatisticsCommVO> selectStatisticsForAge(@Param("villageIds") List<Long> villageIds); +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsClassroom.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsClassroom.java new file mode 100644 index 0000000..4e7c30c --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsClassroom.java @@ -0,0 +1,66 @@ +package com.panzhihua.service_community.entity; + + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 五微服务-微学堂(ComFmsClassroom)表实体类 + * + * @author makejava + * @since 2022-02-16 14:00:59 + */ +@Data +@TableName(value = "com_fms_classroom") +@SuppressWarnings("serial") +public class ComFmsClassroom implements Serializable { + private static final long serialVersionUID = 478204526855062234L; + /** + * 主键 + */ + private Long id; + /** + * 标题 + */ + private String title; + /** + * 参与学习人数 + */ + private Integer scholars; + /** + * 封面 + */ + private String cover; + /** + * 内容 + */ + private String content; + /** + * 浏览量 + */ + private Integer viewNum; + /** + * 创建时间 + */ + private Date createdAt; + /** + * 创建者 + */ + private Long createdBy; + /** + * 更新时间 + */ + private Date updatedAt; + /** + * 由谁更新 + */ + private Long updatedBy; + /** + * 所属社区 + */ + private Long communityId; + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsService.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsService.java new file mode 100644 index 0000000..790864f --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsService.java @@ -0,0 +1,97 @@ +package com.panzhihua.service_community.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 五微服务-微服务(ComFmsService)表实体类 + * + * @author makejava + * @since 2022-02-16 13:57:58 + */ +@Data +@TableName(value = "com_fms_service") +@SuppressWarnings("serial") +public class ComFmsService implements Serializable { + private static final long serialVersionUID = -29895236382912525L; + /** + * 主键 + */ + private Long id; + /** + * 用户姓名 + */ + private String userName; + /** + * 用户关联id + */ + private Long userId; + /** + * 联系电话 + */ + private String phone; + /** + * 服务内容 + */ + private String serviceContent; + /** + * 服务内容图片 + */ + private String serviceImage; + /** + * 反馈内容 + */ + private String approvalContent; + /** + * 审核时间 + */ + private Date approvalAt; + /** + * 团队服务人员关联id + */ + private Long memberId; + /** + * 服务状态(1.待核实2.进行中3.待评价4.已完成5.未通过) + */ + private Integer serviceStatus; + /** + * 服务时间 + */ + private Date serviceAt; + /** + * 创建时间 + */ + private Date createdAt; + /** + * 创建者 + */ + private Long createdBy; + /** + * 更新时间 + */ + private Date updatedAt; + /** + * 由谁更新 + */ + private Long updatedBy; + + /** + * 所属社区 + */ + private Long communityId; + + /** + * 服务状态(1.待核实2.进行中3.待评价4.已完成5.未通过) + */ + public interface ServiceStatus { + int dhs = 1; + int jxz = 2; + int dpj = 3; + int ywc = 4; + int wtg = 5; + } + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsServiceEvaluations.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsServiceEvaluations.java new file mode 100644 index 0000000..5fde0e7 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsServiceEvaluations.java @@ -0,0 +1,49 @@ +package com.panzhihua.service_community.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 五微服务-服务评价(ComFmsServiceEvaluations)表实体类 + * + * @author makejava + * @since 2022-02-11 13:35:53 + */ +@Data +@TableName(value = "com_fms_service_evaluations") +@SuppressWarnings("serial") +public class ComFmsServiceEvaluations implements Serializable { + private static final long serialVersionUID = -73970369473437007L; + /** + * 主键 + */ + private Long id; + /** + * 服务关联id + */ + private Long serviceId; + /** + * 用户关联id + */ + private Long userId; + /** + * 评分星级(1.非常差2.差3.一般4.满意5.非常满意) + */ + private Integer starLevel; + /** + * 评价内容 + */ + private String evaluateContent; + /** + * 图片 + */ + private String image; + /** + * 创建时间 + */ + private Date createdAt; + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsServiceRecord.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsServiceRecord.java new file mode 100644 index 0000000..c852e1a --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsServiceRecord.java @@ -0,0 +1,57 @@ +package com.panzhihua.service_community.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 五微服务-服务记录(ComFmsServiceRecord)表实体类 + * + * @author makejava + * @since 2022-02-11 13:35:54 + */ +@Data +@TableName(value = "com_fms_service_record") +@SuppressWarnings("serial") +public class ComFmsServiceRecord implements Serializable { + private static final long serialVersionUID = -62643130900160237L; + /** + * 主键 + */ + private Long id; + /** + * 服务关联id + */ + private Long serviceId; + /** + * 服务阶段 + */ + private String stage; + /** + * 内容 + */ + private String content; + /** + * 图片 + */ + private String image; + /** + * 创建时间 + */ + private Date createdAt; + /** + * 创建者 + */ + private Long createdBy; + + //服务阶段 + public interface Stage { + String TJFWSQ = "提交服务申请"; + String SHTG = "审核通过,已分派服务人员"; + String FWFK = "服务反馈"; + String WCFW = "完成服务"; + } + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeam.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeam.java new file mode 100644 index 0000000..c017860 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeam.java @@ -0,0 +1,62 @@ +package com.panzhihua.service_community.entity; + + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 五微服务-微团队(ComFmsTeam)表实体类 + * + * @author makejava + * @since 2022-02-14 11:26:00 + */ +@Data +@TableName(value = "com_fms_team") +@SuppressWarnings("serial") +public class ComFmsTeam implements Serializable { + private static final long serialVersionUID = -23489485985260679L; + /** + * 主键 + */ + private Long id; + /** + * 团队名称 + */ + private String name; + /** + * 服务电话 + */ + private String phone; + /** + * 所属团队类型 + */ + private Long teamType; + /** + * 创建时间 + */ + private Date createdAt; + /** + * 创建者 + */ + private Long createdBy; + /** + * 更新时间 + */ + private Date updatedAt; + /** + * 由谁更新 + */ + private Long updatedBy; + /** + * 社区id + */ + private Long communityId; + /** + * 团队照片 + */ + private String image; + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeamMember.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeamMember.java new file mode 100644 index 0000000..a9cbbe6 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeamMember.java @@ -0,0 +1,66 @@ +package com.panzhihua.service_community.entity; + + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 五微服务-团队成员(ComFmsTeamMember)表实体类 + * + * @author makejava + * @since 2022-02-14 16:55:39 + */ +@Data +@TableName(value = "com_fms_team_member") +@SuppressWarnings("serial") +public class ComFmsTeamMember implements Serializable { + private static final long serialVersionUID = 183663328661464263L; + /** + * 主键 + */ + private Long id; + /** + * 成员姓名 + */ + private String name; + /** + * 联系电话 + */ + private String phone; + /** + * 身份证号 + */ + private String idCard; + /** + * 所属社区 + */ + private Long communityId; + /** + * 创建时间 + */ + private Date createdAt; + /** + * 创建者 + */ + private Long createdBy; + /** + * 更新时间 + */ + private Date updatedAt; + /** + * 由谁更新 + */ + private Long updatedBy; + /** + * 团队级联关系 + */ + private String cascadeIds; + /** + * 性别(1.男2.女3.未知) + */ + private Integer gender; + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeamMemberRelation.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeamMemberRelation.java new file mode 100644 index 0000000..254f9d4 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeamMemberRelation.java @@ -0,0 +1,29 @@ +package com.panzhihua.service_community.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 五微服务-团队&成员关系表(ComFmsTeamMemberRelation)表实体类 + * + * @author makejava + * @since 2022-02-14 14:41:36 + */ +@Data +@TableName(value = "com_fms_team_member_relation") +@SuppressWarnings("serial") +public class ComFmsTeamMemberRelation implements Serializable { + private static final long serialVersionUID = -75599228117060880L; + /** + * 团队id + */ + private Long teamId; + /** + * 成员id + */ + private Long memberId; + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeamType.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeamType.java new file mode 100644 index 0000000..4fc1dc2 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComFmsTeamType.java @@ -0,0 +1,49 @@ +package com.panzhihua.service_community.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 五微服务-团队类型(ComFmsTeamType)表实体类 + * + * @author makejava + * @since 2022-02-11 13:35:56 + */ +@Data +@TableName(value = "com_fms_team_type") +@SuppressWarnings("serial") +public class ComFmsTeamType implements Serializable { + private static final long serialVersionUID = -78377643285663874L; + /** + * 主键 + */ + private Long id; + /** + * 团队类型名称 + */ + private String name; + /** + * 所属社区 + */ + private Long communityId; + /** + * 创建时间 + */ + private Date createdAt; + /** + * 创建者 + */ + private Long createdBy; + /** + * 更新时间 + */ + private Date updatedAt; + /** + * 由谁更新 + */ + private Long updatedBy; + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/EventDO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/EventDO.java new file mode 100644 index 0000000..fc1d6e5 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/EventDO.java @@ -0,0 +1,230 @@ +package com.panzhihua.service_community.model.dos; + +import java.io.Serializable; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import lombok.Data; + +/** + * 事件实体类 + * + * @author cedoo email:cedoo(a)qq.com + * @version 1.0 + * @since 1.0 + * @date 2021-05-26 + */ +@Data +@TableName("event") +public class EventDO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * id 列: id + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 服务单号 列: order_sn + */ + private String orderSn; + /** + * 1、办件事件2是宣传事件3是阅读事件 列: event_category + */ + private Long eventCategory; + /** + * 网格员所处的街道 列: grid_member_street + */ + private Long gridMemberStreet; + /** + * 网格员所处社区 列: grid_member_community + */ + private Long gridMemberCommunity; + /** + * 网格ID 列: grid_id + */ + private Long gridId; + /** + * 网格员 列: grid_member_id + */ + private Long gridMemberId; + /** + * 网格员名字 列: grid_member_name + */ + private String gridMemberName; + /** + * 网格员联系方式 列: grid_member_telephone + */ + private String gridMemberTelephone; + /** + * 事件标题 列: event_title + */ + private String eventTitle; + /** + * 宣传类型 列: propaganda_type + */ + private String propagandaType; + /** + * 宣传时间 列: propaganda_time + */ + private Date propagandaTime; + /** + * 当event_type_category是1填写事件分类1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群信息上报 列: event_type + */ + private Integer eventType; + /** + * 事件类型 列: event_clazz + */ + private String eventClazz; + /** + * 事件描述 列: event_des + */ + private String eventDes; + /** + * 宣传对象 列: propaganda_object + */ + private String propagandaObject; + /** + * 宣传人数 列: propaganda_num + */ + private String propagandaNum; + /** + * 社区处理(0是无需社区1是社区处理) 列: community_process + */ + private Integer communityProcess; + /** + * 发生时间 列: happen_time + */ + private Date happenTime; + /** + * 事件发生地点备注 列: happent_address + */ + private String happentAddress; + /** + * 事件发生地点 列: happen_address + */ + private String happenAddress; + /** + * 发生的精度纬度信息(逗号隔开) 列: happent_lat_lng + */ + private String happentLatLng; + /** + * 事件状态(1草稿箱2发布3逻辑删除4、撤销) 列: event_status + */ + private Integer eventStatus; + /** + * 1待处理2已解决3待验证 列: event_process_status + */ + private Integer eventProcessStatus; + /** + * 当前处理对象类型(1、网格员2、社区3、是街道) 列: process_type + */ + private Integer processType; + /** + * 处理人ID 列: process_user_id + */ + private Long processUserId; + /** + * 处理流程记录ID 列: process_record_id + */ + private Long processRecordId; + /** + * 处理人名称 列: process_user_name + */ + private String processUserName; + /** + * 处理时间 列: process_date + */ + private Date processDate; + /** + * 解决人针对解决事件的处理描述 列: process_desc + */ + private String processDesc; + /** + * 事件来源 列: event_resource + */ + private String eventResource; + /** + * 危险级别 列: danger_level + */ + private Integer dangerLevel; + /** + * 红牌 列: red_card + */ + private Boolean redCard; + /** + * 黄牌 列: yellow_card + */ + private Boolean yellowCard; + /** + * 是否有效 列: invalid + */ + private Boolean invalid; + /** + * 是否重大 列: major + */ + private Boolean major; + /** + * 死亡人数 列: deaths_number + */ + private Integer deathsNumber; + /** + * 受伤人数 列: injuries_number + */ + private Integer injuriesNumber; + /** + * 是否疑难事件 列: difficult + */ + private Boolean difficult; + /** + * 是否紧急 列: urgent + */ + private Boolean urgent; + /** + * 是否催办 列: urgent_dell + */ + private Boolean urgentDell; + /** + * 上报提交时间 列: submit_date + */ + private Date submitDate; + /** + * 事件处理状态 列: event_deal_status + */ + private Integer eventDealStatus; + /** + * 创建人 列: create_by + */ + private Long createBy; + /** + * 创建时间 列: create_at + */ + @TableField(fill = FieldFill.INSERT) + private Date createAt; + /** + * 修改人 列: update_by + */ + private Long updateBy; + /** + * 修改时间 列: update_at + */ + @TableField(fill = FieldFill.UPDATE) + private Date updateAt; + + private Boolean upload; + + /** + * 撤销人/社区ID 列: revoke_id + */ + private Long revokeId; + /** + * 修改时间 列: revoke_type + */ + private Integer revokeType; +} \ No newline at end of file diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsClassroomService.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsClassroomService.java new file mode 100644 index 0000000..2369fe6 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsClassroomService.java @@ -0,0 +1,89 @@ +package com.panzhihua.service_community.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.panzhihua.common.model.dtos.community.fms.AddFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.EditFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsEventAdminDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.service_community.entity.ComFmsClassroom; + +/** + * 五微服务-微学堂(ComFmsClassroom)表服务接口 + * + * @author makejava + * @since 2022-02-11 13:35:52 + */ +public interface ComFmsClassroomService extends IService<ComFmsClassroom> { + + /** + * 后台新增微讲堂 + * @param adminDTO + * @return + */ + R addFmsClassroom(AddFmsClassroomAdminDTO adminDTO); + + /** + * 后台编辑微讲堂 + * @param adminDTO + * @return + */ + R editFmsClassroom(EditFmsClassroomAdminDTO adminDTO); + + /** + * 后台删除微讲堂 + * @param id + * @return + */ + R deleteFmsClassroom(Long id); + + /** + * 后台获取微讲堂详情 + * @param id + * @return + */ + R detailFmsClassroom(Long id); + + /** + * 后台分页查询微讲堂 + * @param adminDTO + * @return + */ + R pageFmsClassroomAdmin(PageFmsClassroomAdminDTO adminDTO); + + /** + * 微讲堂顶部统计 + * @param communityId + * @return + */ + R statisticsFmsClassroom(Long communityId); + + /** + * 后台分页查询微调节/微防控 + * @param adminDTO + * @return + */ + R pageFmsEvent(PageFmsEventAdminDTO adminDTO); + + /** + * 微调节/微防控顶部统计 + * @param type + * @param communityId + * @return + */ + R statisticsFmsEvent(Integer type, Long communityId); + + /** + * 小程序获取微讲堂详情 + * @param id + * @return + */ + R detailFmsClassroomApplets(Long id); + + /** + * 小程序分页查询微调节/微防控 + * @param adminDTO + * @return + */ + R pageFmsEventApplets(PageFmsEventAdminDTO adminDTO); +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsServiceEvaluationsService.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsServiceEvaluationsService.java new file mode 100644 index 0000000..a0e20f2 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsServiceEvaluationsService.java @@ -0,0 +1,22 @@ +package com.panzhihua.service_community.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.panzhihua.common.model.dtos.community.fms.EvaluationFmsServiceDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.service_community.entity.ComFmsServiceEvaluations; + +/** + * 五微服务-服务评价(ComFmsServiceEvaluations)表服务接口 + * + * @author makejava + * @since 2022-02-11 13:35:53 + */ +public interface ComFmsServiceEvaluationsService extends IService<ComFmsServiceEvaluations> { + + /** + * 微服务评价 + * @param evaluationFmsServiceDTO + * @return + */ + R evaluateFmsService(EvaluationFmsServiceDTO evaluationFmsServiceDTO); +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsServiceRecordService.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsServiceRecordService.java new file mode 100644 index 0000000..fe9912b --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsServiceRecordService.java @@ -0,0 +1,14 @@ +package com.panzhihua.service_community.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.panzhihua.service_community.entity.ComFmsServiceRecord; + +/** + * 五微服务-服务记录(ComFmsServiceRecord)表服务接口 + * + * @author makejava + * @since 2022-02-11 13:35:54 + */ +public interface ComFmsServiceRecordService extends IService<ComFmsServiceRecord> { + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsServiceService.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsServiceService.java new file mode 100644 index 0000000..d7a4c74 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsServiceService.java @@ -0,0 +1,123 @@ +package com.panzhihua.service_community.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.panzhihua.common.model.dtos.community.fms.AddFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.ApplyFmsServiceDTO; +import com.panzhihua.common.model.dtos.community.fms.ApprovalFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.FeedbackFmsServiceDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsServiceAppletsDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.fms.ComFmsServiceImportExcelVO; +import com.panzhihua.service_community.entity.ComFmsService; + +import java.util.List; + +/** + * 五微服务-微服务(ComFmsService)表服务接口 + * + * @author makejava + * @since 2022-02-11 13:35:53 + */ +public interface ComFmsServiceService extends IService<ComFmsService> { + + /** + * 后台新增微服务 + * @param adminDTO + * @return + */ + R addFmsServiceAdmin(AddFmsServiceAdminDTO adminDTO); + + /** + * 后台分页查询微服务 + * @param adminDTO + * @return + */ + R pageFmsServiceAdmin(PageFmsServiceAdminDTO adminDTO); + + /** + * 后台核实微服务 + * @param adminDTO + * @return + */ + R approvalFmsService(ApprovalFmsServiceAdminDTO adminDTO); + + /** + * 后台查看微服务详情 + * @param serviceId + * @return + */ + R detailFmsServiceAdmin(Long serviceId); + + /** + * 后台删除微服务 + * @param serviceId + * @return + */ + R deleteFmsServiceAdmin(Long serviceId); + + /** + * 微服务顶部统计 + * @param communityId + * @return + */ + R statisticsFmsService(Long communityId); + + /** + * 后台导入微服务数据 + * @param voList + * @param communityId + * @param userId + * @return + */ + R listSaveFmsServiceExcelVO(List<ComFmsServiceImportExcelVO> voList, Long communityId, Long userId); + + /** + * 小程序分页查询微服务 + * @param adminDTO + * @return + */ + R pageFmsServiceApplets(PageFmsServiceAppletsDTO adminDTO); + + /** + * 小程序查看微服务详情 + * @param serviceId + * @param userId + * @return + */ + R detailFmsServiceApplets(Long serviceId, Long userId); + + /** + * 微服务申请 + * @param adminDTO + * @return + */ + R applyFmsService(ApplyFmsServiceDTO adminDTO); + + /** + * 分页查询我的微服务 + * @param adminDTO + * @return + */ + R pageMyFmsService(PageFmsServiceAppletsDTO adminDTO); + + /** + * 微团队成员分页查询服务处理 + * @param adminDTO + * @return + */ + R pageDealFmsService(PageFmsServiceAppletsDTO adminDTO); + + /** + * 微团队成员服务反馈 + * @param adminDTO + * @return + */ + R feedbackFmsService(FeedbackFmsServiceDTO adminDTO); + + /** + * 定时任务针对服务结束后3天还未评价的用户默认好评 + * @return + */ + R defaultPraise(); +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamMemberRelationService.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamMemberRelationService.java new file mode 100644 index 0000000..22e82d0 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamMemberRelationService.java @@ -0,0 +1,14 @@ +package com.panzhihua.service_community.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.panzhihua.service_community.entity.ComFmsTeamMemberRelation; + +/** + * 五微服务-团队&成员关系表(ComFmsTeamMemberRelation)表服务接口 + * + * @author makejava + * @since 2022-02-14 14:41:36 + */ +public interface ComFmsTeamMemberRelationService extends IService<ComFmsTeamMemberRelation> { + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamMemberService.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamMemberService.java new file mode 100644 index 0000000..6a7e61f --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamMemberService.java @@ -0,0 +1,79 @@ +package com.panzhihua.service_community.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.panzhihua.common.model.dtos.community.fms.AddTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.DeleteTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.PageTeamMemberDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberImportExcelVO; +import com.panzhihua.service_community.entity.ComFmsTeamMember; + +import java.util.List; + +/** + * 五微服务-团队成员(ComFmsTeamMember)表服务接口 + * + * @author makejava + * @since 2022-02-11 13:35:55 + */ +public interface ComFmsTeamMemberService extends IService<ComFmsTeamMember> { + + /** + * 新增团队成员 + * @param addTeamMemberDTO + * @return + */ + R addFmsTeamMember(AddTeamMemberDTO addTeamMemberDTO); + + /** + * 编辑团队成员 + * @param editTeamMemberDTO + * @return + */ + R editFmsTeamMember(EditTeamMemberDTO editTeamMemberDTO); + + /** + * 删除团队成员 + * @param deleteTeamMemberDTO + * @return + */ + R deleteFmsTeamMember(DeleteTeamMemberDTO deleteTeamMemberDTO); + + /** + * 分页查询团队成员 + * @param pageTeamMemberDTO + * @return + */ + R pageFmsTeamMember(PageTeamMemberDTO pageTeamMemberDTO); + + /** + * 微团队顶部统计 + * @param communityId + * @return + */ + R statisticsFmsTeamMember(Long communityId); + + /** + * 批量导入团队成员 + * @param voList + * @param communityId + * @param userId + * @return + */ + R listSaveFmsTeamMemberExcelVO(List<ComFmsTeamMemberImportExcelVO> voList, Long communityId, Long userId); + + /** + * 团队人员导出 + * @param pageTeamMemberDTO + * @return + */ + R exportTeamMember(PageTeamMemberDTO pageTeamMemberDTO); + + /** + * 级联查询团队服务人员 + * @param communityId + * @return + */ + R retrieveFmsTeamMemberCascade(Long communityId); +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamService.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamService.java new file mode 100644 index 0000000..74dbeae --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamService.java @@ -0,0 +1,66 @@ +package com.panzhihua.service_community.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.panzhihua.common.model.dtos.community.fms.AddTeamDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsTeamDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.service_community.entity.ComFmsTeam; + +/** + * 五微服务-微团队(ComFmsTeam)表服务接口 + * + * @author makejava + * @since 2022-02-11 13:35:55 + */ +public interface ComFmsTeamService extends IService<ComFmsTeam> { + + /** + * 新增团队 + * @param addTeamDTO + * @return + */ + R addFmsTeam(AddTeamDTO addTeamDTO); + + /** + * 修改团队信息 + * @param editTeamDTO + * @return + */ + R editFmsTeam(EditTeamDTO editTeamDTO); + + /** + * 删除团队 + * @param teamId + * @return + */ + R deleteFmsTeam(Long teamId); + + /** + * 获取团队列表 + * @param teamTypeId + * @return + */ + R listFmsTeam(Long teamTypeId); + + /** + * 获取团队详情 + * @param teamId + * @return + */ + R detailFmsTeam(Long teamId); + + /** + * 级联查询团队数据 + * @param communityId + * @return + */ + R retrieveFmsTeamCascade(Long communityId); + + /** + * 小程序分页查询团队信息 + * @param pageFmsTeamDTO + * @return + */ + R pageFmsTeamApplets(PageFmsTeamDTO pageFmsTeamDTO); +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamTypeService.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamTypeService.java new file mode 100644 index 0000000..43c6209 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComFmsTeamTypeService.java @@ -0,0 +1,45 @@ +package com.panzhihua.service_community.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.panzhihua.common.model.dtos.community.fms.AddTeamTypeDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamTypeDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.service_community.entity.ComFmsTeamType; + +/** + * 五微服务-团队类型(ComFmsTeamType)表服务接口 + * + * @author makejava + * @since 2022-02-11 13:35:56 + */ +public interface ComFmsTeamTypeService extends IService<ComFmsTeamType> { + + /** + * 新增团队类型 + * @param addTeamTypeDTO + * @return + */ + R addFmsTeamType(AddTeamTypeDTO addTeamTypeDTO); + + /** + * 修改团队类型 + * @param editTeamTypeDTO + * @return + */ + R editFmsTeamType(EditTeamTypeDTO editTeamTypeDTO); + + /** + * 删除团队类型 + * @param teamTypeId + * @param communityId + * @return + */ + R deleteFmsTeamType(Long teamTypeId, Long communityId); + + /** + * 获取团队类型列表 + * @param communityId + * @return + */ + R listFmsTeamType(Long communityId); +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsClassroomServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsClassroomServiceImpl.java new file mode 100644 index 0000000..765583b --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsClassroomServiceImpl.java @@ -0,0 +1,232 @@ +package com.panzhihua.service_community.service.impl; + +import static java.util.Objects.isNull; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.panzhihua.common.model.dtos.community.fms.PageFmsEventAdminDTO; +import com.panzhihua.common.model.vos.community.fms.FmsEventTopStatisticsVO; +import com.panzhihua.common.model.vos.community.fms.FmsEventVO; +import com.panzhihua.common.model.vos.grid.EventResourceVO; +import com.panzhihua.common.model.vos.grid.EventVO; +import com.panzhihua.common.utlis.StringUtils; +import com.panzhihua.service_community.dao.EventMapper; +import com.panzhihua.service_community.model.dos.EventResourceDO; +import com.panzhihua.service_community.service.EventResourceService; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.panzhihua.common.model.dtos.community.fms.AddFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.EditFmsClassroomAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsClassroomAdminDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.fms.ComFmsClassroomVO; +import com.panzhihua.service_community.dao.ComFmsClassroomDAO; +import com.panzhihua.service_community.entity.ComFmsClassroom; +import com.panzhihua.service_community.service.ComFmsClassroomService; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 五微服务-微学堂(ComFmsClassroom)表服务实现类 + * + * @author makejava + * @since 2022-02-11 13:35:52 + */ +@Service("comFmsClassroomService") +public class ComFmsClassroomServiceImpl extends ServiceImpl<ComFmsClassroomDAO, ComFmsClassroom> + implements ComFmsClassroomService { + + @Resource + private EventMapper eventMapper; + @Resource + private EventResourceService eventResourceService; + + /** + * 后台新增微讲堂 + * @param adminDTO + * @return + */ + @Override + public R addFmsClassroom(AddFmsClassroomAdminDTO adminDTO) { + ComFmsClassroom fmsClassroom = new ComFmsClassroom(); + BeanUtils.copyProperties(adminDTO, fmsClassroom); + int num = this.baseMapper.insert(fmsClassroom); + if (num > 0) { + return R.ok(); + } + return R.fail("操作失败,请重新尝试"); + } + + /** + * 后台编辑微讲堂 + * @param adminDTO + * @return + */ + @Override + public R editFmsClassroom(EditFmsClassroomAdminDTO adminDTO) { + ComFmsClassroom comFmsClassroom = this.baseMapper.selectById(adminDTO.getId()); + if (isNull(comFmsClassroom)) { + return R.fail("资源不存在"); + } + BeanUtils.copyProperties(adminDTO, comFmsClassroom); + int num = this.baseMapper.updateById(comFmsClassroom); + if (num > 0) { + return R.ok(); + } + return R.fail("操作失败,请重新尝试"); + } + + /** + * 后台删除微讲堂 + * @param id + * @return + */ + @Override + public R deleteFmsClassroom(Long id) { + this.baseMapper.deleteById(id); + return R.ok(); + } + + /** + * 后台获取微讲堂详情 + * @param id + * @return + */ + @Override + public R detailFmsClassroom(Long id) { + ComFmsClassroom comFmsClassroom = this.baseMapper.selectById(id); + if (isNull(comFmsClassroom)) { + return R.fail("资源不存在"); + } + ComFmsClassroomVO comFmsClassroomVO = new ComFmsClassroomVO(); + BeanUtils.copyProperties(comFmsClassroom, comFmsClassroomVO); + return R.ok(comFmsClassroomVO); + } + + /** + * 后台分页查询微讲堂 + * @param adminDTO + * @return + */ + @Override + public R pageFmsClassroomAdmin(PageFmsClassroomAdminDTO adminDTO) { + Page page = new Page<>(); + page.setCurrent(adminDTO.getPageNum()); + page.setSize(adminDTO.getPageSize()); + return R.ok(this.baseMapper.pageFmsClassroomAdmin(page, adminDTO)); + } + + /** + * 微讲堂顶部统计 + * @param communityId + * @return + */ + @Override + public R statisticsFmsClassroom(Long communityId) { + return R.ok(this.baseMapper.statisticsFmsClassroom(communityId)); + } + + /** + * 后台分页查询微调节/微防控 + * @param adminDTO + * @return + */ + @Override + public R pageFmsEvent(PageFmsEventAdminDTO adminDTO) { + Page page = new Page<>(); + page.setCurrent(adminDTO.getPageNum()); + page.setSize(adminDTO.getPageSize()); + return R.ok(this.baseMapper.pageFmsEvent(page, adminDTO)); + } + + /** + * 微调节/微防控顶部统计 + * @param type + * @param communityId + * @return + */ + @Override + public R statisticsFmsEvent(Integer type, Long communityId) { + return R.ok(this.baseMapper.statisticsFmsEvent(type, communityId)); + } + + /** + * 小程序获取微讲堂详情 + * @param id + * @return + */ + @Override + public R detailFmsClassroomApplets(Long id) { + ComFmsClassroom comFmsClassroom = this.baseMapper.selectById(id); + if (isNull(comFmsClassroom)) { + return R.fail("资源不存在"); + } + //增加浏览量 + comFmsClassroom.setViewNum(comFmsClassroom.getViewNum() + 1); + this.baseMapper.updateById(comFmsClassroom); + ComFmsClassroomVO comFmsClassroomVO = new ComFmsClassroomVO(); + BeanUtils.copyProperties(comFmsClassroom, comFmsClassroomVO); + return R.ok(comFmsClassroomVO); + } + + /** + * 小程序分页查询微调节/微防控 + * @param adminDTO + * @return + */ + @Override + public R pageFmsEventApplets(PageFmsEventAdminDTO adminDTO) { + Page page = new Page(); + page.setCurrent(adminDTO.getPageNum()); + page.setSize(adminDTO.getPageSize()); + IPage<EventVO> ipage = this.baseMapper.pageFmsEventApplets(page, adminDTO); + if (ipage != null) { + List<EventVO> eventVOList = ipage.getRecords(); + eventVOList.forEach(eventVO -> { + List<EventResourceDO> eventResourceDOList = + eventResourceService.getBaseMapper().selectList(new LambdaQueryWrapper<EventResourceDO>() + .eq(EventResourceDO::getClassification, 1).eq(EventResourceDO::getRefId, eventVO.getId())); + List<EventResourceVO> picList = new ArrayList<>(); + List<EventResourceVO> audioList = new ArrayList<>(); + List<EventResourceVO> videoList = new ArrayList<>(); + eventResourceDOList.forEach(eventResourceDO -> { + switch (eventResourceDO.getType()) { + case 1: + EventResourceVO picEventResourceVO = new EventResourceVO(); + BeanUtils.copyProperties(eventResourceDO, picEventResourceVO); + picList.add(picEventResourceVO); + break; + case 2: + EventResourceVO audioResourceVO = new EventResourceVO(); + BeanUtils.copyProperties(eventResourceDO, audioResourceVO); + audioList.add(audioResourceVO); + break; + case 3: + EventResourceVO videoResourceVO = new EventResourceVO(); + BeanUtils.copyProperties(eventResourceDO, videoResourceVO); + videoList.add(videoResourceVO); + break; + } + }); + eventVO.setAudios(audioList); + eventVO.setPics(picList); + eventVO.setVideos(videoList); + + // 查询网格员头像 + Map<String, String> userMap = eventMapper.getGridMemberImageUrl(eventVO.getGridMemberId()); + if (StringUtils.isNotEmpty(userMap)) { + eventVO.setGridMemberName(userMap.get("nick_name")); + eventVO.setGridMemberImageUrl(userMap.get("image_url")); + } + }); + return R.ok(ipage); + } + return R.fail(); + } +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsServiceEvaluationsServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsServiceEvaluationsServiceImpl.java new file mode 100644 index 0000000..e3f67db --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsServiceEvaluationsServiceImpl.java @@ -0,0 +1,54 @@ +package com.panzhihua.service_community.service.impl; + +import static java.util.Objects.isNull; + +import javax.annotation.Resource; + +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.panzhihua.common.model.dtos.community.fms.EvaluationFmsServiceDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.service_community.dao.ComFmsServiceDAO; +import com.panzhihua.service_community.dao.ComFmsServiceEvaluationsDAO; +import com.panzhihua.service_community.entity.ComFmsService; +import com.panzhihua.service_community.entity.ComFmsServiceEvaluations; +import com.panzhihua.service_community.service.ComFmsServiceEvaluationsService; + +/** + * 五微服务-服务评价(ComFmsServiceEvaluations)表服务实现类 + * + * @author makejava + * @since 2022-02-11 13:35:53 + */ +@Service("comFmsServiceEvaluationsService") +public class ComFmsServiceEvaluationsServiceImpl extends + ServiceImpl<ComFmsServiceEvaluationsDAO, ComFmsServiceEvaluations> implements ComFmsServiceEvaluationsService { + + @Resource + private ComFmsServiceDAO comFmsServiceDAO; + + /** + * 微服务评价 + * @param evaluationFmsServiceDTO + * @return + */ + @Override + public R evaluateFmsService(EvaluationFmsServiceDTO evaluationFmsServiceDTO) { + ComFmsService comFmsService = comFmsServiceDAO.selectById(evaluationFmsServiceDTO.getServiceId()); + if (isNull(comFmsService)) { + return R.fail("资源不存在"); + } + ComFmsServiceEvaluations evaluations = new ComFmsServiceEvaluations(); + BeanUtils.copyProperties(evaluationFmsServiceDTO, evaluations); + int num = this.baseMapper.insert(evaluations); + if (num > 0) { + comFmsService.setServiceStatus(ComFmsService.ServiceStatus.ywc); + comFmsService.setUpdatedBy(evaluationFmsServiceDTO.getUserId()); + comFmsServiceDAO.updateById(comFmsService); + return R.ok(); + } + return R.fail("操作失败,请重新尝试"); + } +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsServiceRecordServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsServiceRecordServiceImpl.java new file mode 100644 index 0000000..e2ab1cc --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsServiceRecordServiceImpl.java @@ -0,0 +1,19 @@ +package com.panzhihua.service_community.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.panzhihua.service_community.dao.ComFmsServiceRecordDAO; +import com.panzhihua.service_community.entity.ComFmsServiceRecord; +import com.panzhihua.service_community.service.ComFmsServiceRecordService; +import org.springframework.stereotype.Service; + +/** + * 五微服务-服务记录(ComFmsServiceRecord)表服务实现类 + * + * @author makejava + * @since 2022-02-11 13:35:54 + */ +@Service("comFmsServiceRecordService") +public class ComFmsServiceRecordServiceImpl extends ServiceImpl<ComFmsServiceRecordDAO, ComFmsServiceRecord> + implements ComFmsServiceRecordService { + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsServiceServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsServiceServiceImpl.java new file mode 100644 index 0000000..9cfb598 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsServiceServiceImpl.java @@ -0,0 +1,425 @@ +package com.panzhihua.service_community.service.impl; + +import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.annotation.Resource; + +import com.panzhihua.service_community.dao.ComFmsTeamMemberDAO; +import com.panzhihua.service_community.entity.ComFmsTeamMember; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +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.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.panzhihua.common.model.dtos.community.fms.AddFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.ApplyFmsServiceDTO; +import com.panzhihua.common.model.dtos.community.fms.ApprovalFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.FeedbackFmsServiceDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsServiceAdminDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsServiceAppletsDTO; +import com.panzhihua.common.model.vos.LoginUserInfoVO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.fms.ComFmsServiceEvaluateVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsServiceImportExcelVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsServiceRecordVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsServiceVO; +import com.panzhihua.common.utlis.DateUtils; +import com.panzhihua.service_community.dao.ComFmsServiceDAO; +import com.panzhihua.service_community.dao.ComFmsServiceEvaluationsDAO; +import com.panzhihua.service_community.dao.ComFmsServiceRecordDAO; +import com.panzhihua.service_community.entity.ComFmsService; +import com.panzhihua.service_community.entity.ComFmsServiceEvaluations; +import com.panzhihua.service_community.entity.ComFmsServiceRecord; +import com.panzhihua.service_community.service.ComFmsServiceService; + +/** + * 五微服务-微服务(ComFmsService)表服务实现类 + * + * @author makejava + * @since 2022-02-11 13:35:53 + */ +@Service("comFmsServiceService") +public class ComFmsServiceServiceImpl extends ServiceImpl<ComFmsServiceDAO, ComFmsService> + implements ComFmsServiceService { + + @Resource + private ComFmsServiceRecordDAO comFmsServiceRecordDAO; + @Resource + private ComFmsServiceEvaluationsDAO comFmsServiceEvaluationsDAO; + @Resource + private ComFmsTeamMemberDAO comFmsTeamMemberDAO; + + /** + * 后台新增微服务 + * @param adminDTO + * @return + */ + @Override + public R addFmsServiceAdmin(AddFmsServiceAdminDTO adminDTO) { + ComFmsService comFmsService = new ComFmsService(); + BeanUtils.copyProperties(adminDTO, comFmsService); + comFmsService.setServiceStatus(ComFmsService.ServiceStatus.ywc); + comFmsService.setApprovalAt(new Date()); + int num = this.baseMapper.insert(comFmsService); + if (num > 0) { + //服务记录 + ComFmsServiceRecord comFmsServiceRecord = new ComFmsServiceRecord(); + comFmsServiceRecord.setServiceId(comFmsService.getId()); + comFmsServiceRecord.setContent(adminDTO.getServiceProcess()); + comFmsServiceRecord.setImage(adminDTO.getProcessImage()); + comFmsServiceRecord.setStage(ComFmsServiceRecord.Stage.WCFW); + comFmsServiceRecord.setCreatedBy(adminDTO.getCreatedBy()); + comFmsServiceRecordDAO.insert(comFmsServiceRecord); + //默认好评 + ComFmsServiceEvaluations evaluation = new ComFmsServiceEvaluations(); + evaluation.setServiceId(comFmsService.getId()); + evaluation.setStarLevel(5); + evaluation.setEvaluateContent("系统默认好评!"); + evaluation.setUserId(comFmsService.getUserId()); + comFmsServiceEvaluationsDAO.insert(evaluation); + return R.ok(); + } + return R.fail("操作失败,请重新尝试"); + } + + /** + * 后台分页查询微服务 + * @param adminDTO + * @return + */ + @Override + public R pageFmsServiceAdmin(PageFmsServiceAdminDTO adminDTO) { + Page page = new Page<>(); + page.setSize(adminDTO.getPageSize()); + page.setCurrent(adminDTO.getPageNum()); + return R.ok(this.baseMapper.pageFmsServiceAdmin(page, adminDTO)); + } + + /** + * 后台核实微服务 + * @param adminDTO + * @return + */ + @Override + public R approvalFmsService(ApprovalFmsServiceAdminDTO adminDTO) { + ComFmsService comFmsService = this.baseMapper.selectById(adminDTO.getServiceId()); + if (isNull(comFmsService)) { + return R.fail("资源不存在"); + } + comFmsService.setServiceStatus(adminDTO.getIsPass() ? ComFmsService.ServiceStatus.jxz : ComFmsService.ServiceStatus.wtg); + comFmsService.setApprovalContent(adminDTO.getContent()); + comFmsService.setApprovalAt(new Date()); + if (adminDTO.getIsPass()) { + comFmsService.setMemberId(adminDTO.getMemberId()); + } + comFmsService.setUpdatedBy(adminDTO.getUpdatedBy()); + int num = this.baseMapper.updateById(comFmsService); + if (num > 0) { + if (adminDTO.getIsPass()) { + ComFmsServiceRecord comFmsServiceRecord = new ComFmsServiceRecord(); + comFmsServiceRecord.setServiceId(comFmsService.getId()); + comFmsServiceRecord.setContent(adminDTO.getContent()); + comFmsServiceRecord.setStage(ComFmsServiceRecord.Stage.SHTG); + comFmsServiceRecord.setCreatedBy(adminDTO.getUpdatedBy()); + comFmsServiceRecordDAO.insert(comFmsServiceRecord); + } + return R.ok(); + } + return R.fail("操作失败,请重新尝试"); + } + + /** + * 后台查看微服务详情 + * @param serviceId + * @return + */ + @Override + public R detailFmsServiceAdmin(Long serviceId) { + ComFmsServiceVO serviceVO = this.baseMapper.detailFmsServiceAdmin(serviceId); + if (isNull(serviceVO)) { + return R.fail("资源不存在"); + } + List<ComFmsServiceRecord> serviceRecords = comFmsServiceRecordDAO.selectList(new LambdaQueryWrapper<ComFmsServiceRecord>() + .eq(ComFmsServiceRecord::getServiceId, serviceId) + .orderByDesc(ComFmsServiceRecord::getCreatedAt)); + if (!serviceRecords.isEmpty()) { + List<ComFmsServiceRecordVO> recordVOList = new ArrayList<>(); + serviceRecords.forEach(e -> { + ComFmsServiceRecordVO recordVO = new ComFmsServiceRecordVO(); + BeanUtils.copyProperties(e, recordVO); + recordVOList.add(recordVO); + }); + serviceVO.setServiceRecords(recordVOList); + } + return R.ok(serviceVO); + } + + /** + * 后台删除微服务 + * @param serviceId + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public R deleteFmsServiceAdmin(Long serviceId) { + int num = this.baseMapper.deleteById(serviceId); + if (num > 0) { + comFmsServiceRecordDAO.delete(new LambdaQueryWrapper<ComFmsServiceRecord>().eq(ComFmsServiceRecord::getServiceId, serviceId)); + comFmsServiceEvaluationsDAO.delete(new LambdaQueryWrapper<ComFmsServiceEvaluations>().eq(ComFmsServiceEvaluations::getServiceId, serviceId)); + return R.ok(); + } + return R.fail("操作失败,请重新尝试"); + } + + /** + * 微服务顶部统计 + * @param communityId + * @return + */ + @Override + public R statisticsFmsService(Long communityId) { + return R.ok(this.baseMapper.statisticsFmsService(communityId)); + } + + /** + * 后台导入微服务数据 + * @param voList + * @param communityId + * @param userId + * @return + */ + @Override + public R listSaveFmsServiceExcelVO(List<ComFmsServiceImportExcelVO> voList, Long communityId, Long userId) { + voList.forEach(e -> { + ComFmsService comFmsService = new ComFmsService(); + BeanUtils.copyProperties(e, comFmsService); + comFmsService.setCommunityId(communityId); + comFmsService.setCreatedBy(userId); + comFmsService.setUpdatedBy(userId); + comFmsService.setServiceStatus(ComFmsService.ServiceStatus.ywc); + int num = this.baseMapper.insert(comFmsService); + if (num > 0) { + ComFmsServiceRecord comFmsServiceRecord = new ComFmsServiceRecord(); + comFmsServiceRecord.setServiceId(comFmsService.getId()); + comFmsServiceRecord.setContent(e.getServiceProcess()); + comFmsServiceRecord.setStage(ComFmsServiceRecord.Stage.WCFW); + comFmsServiceRecord.setCreatedBy(userId); + comFmsServiceRecordDAO.insert(comFmsServiceRecord); + + //默认好评 + ComFmsServiceEvaluations evaluation = new ComFmsServiceEvaluations(); + evaluation.setServiceId(comFmsService.getId()); + evaluation.setStarLevel(5); + evaluation.setEvaluateContent("系统默认好评!"); + evaluation.setUserId(comFmsService.getUserId()); + comFmsServiceEvaluationsDAO.insert(evaluation); + } + }); + return R.ok(); + } + + /** + * 小程序分页查询微服务 + * @param adminDTO + * @return + */ + @Override + public R pageFmsServiceApplets(PageFmsServiceAppletsDTO adminDTO) { + Page page = new Page<>(); + page.setSize(adminDTO.getPageSize()); + page.setCurrent(adminDTO.getPageNum()); + return R.ok(this.baseMapper.pageFmsServiceAdminApplets(page, adminDTO)); + } + + /** + * 小程序查看微服务详情 + * @param serviceId + * @param userId + * @return + */ + @Override + public R detailFmsServiceApplets(Long serviceId, Long userId) { + ComFmsServiceVO serviceDetail = this.baseMapper.detailFmsServiceApplets(serviceId); + if (nonNull(serviceDetail)) { + List<ComFmsServiceRecord> serviceRecords = comFmsServiceRecordDAO.selectList(new LambdaQueryWrapper<ComFmsServiceRecord>() + .eq(ComFmsServiceRecord::getServiceId, serviceId) + .orderByDesc(ComFmsServiceRecord::getCreatedAt)); + if (!serviceRecords.isEmpty()) { + List<ComFmsServiceRecordVO> recordVOList = new ArrayList<>(); + serviceRecords.forEach(e -> { + ComFmsServiceRecordVO recordVO = new ComFmsServiceRecordVO(); + BeanUtils.copyProperties(e, recordVO); + recordVOList.add(recordVO); + }); + serviceDetail.setServiceRecords(recordVOList); + } + ComFmsServiceEvaluations evaluation = comFmsServiceEvaluationsDAO.selectOne(new LambdaQueryWrapper<ComFmsServiceEvaluations>() + .eq(ComFmsServiceEvaluations::getServiceId, serviceId)); + if (nonNull(evaluation)) { + ComFmsServiceEvaluateVO evaluateVO = new ComFmsServiceEvaluateVO(); + BeanUtils.copyProperties(evaluation, evaluateVO); + serviceDetail.setEvaluateVO(evaluateVO); + } + serviceDetail.setIsMyself(nonNull(userId) && userId.equals(serviceDetail.getUserId())); + if (serviceDetail.getServiceStatus().equals(ComFmsService.ServiceStatus.dpj)) { + Date autoEvaluateAt = DateUtils.addDay(serviceDetail.getCreatedAt(), 3); + Date nowDate = new Date(); + serviceDetail.setAutoEvaluateAt(autoEvaluateAt.getTime() - nowDate.getTime()); + } + } + return R.ok(serviceDetail); + } + + /** + * 微服务申请 + * @param adminDTO + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public R applyFmsService(ApplyFmsServiceDTO adminDTO) { + LoginUserInfoVO userInfo = adminDTO.getUserInfo(); + ComFmsService comFmsService = new ComFmsService(); + BeanUtils.copyProperties(adminDTO, comFmsService); + comFmsService.setCommunityId(userInfo.getCommunityId()); + comFmsService.setCreatedBy(userInfo.getUserId()); + comFmsService.setUpdatedBy(userInfo.getUserId()); + comFmsService.setUserId(userInfo.getUserId()); + comFmsService.setUserName(userInfo.getName()); + comFmsService.setPhone(userInfo.getPhone()); + int num = this.baseMapper.insert(comFmsService); + if (num > 0) { + ComFmsServiceRecord comFmsServiceRecord = new ComFmsServiceRecord(); + comFmsServiceRecord.setServiceId(comFmsService.getId()); + comFmsServiceRecord.setContent(adminDTO.getServiceContent()); + comFmsServiceRecord.setImage(adminDTO.getServiceImage()); + comFmsServiceRecord.setStage(ComFmsServiceRecord.Stage.TJFWSQ); + comFmsServiceRecord.setCreatedBy(userInfo.getUserId()); + comFmsServiceRecordDAO.insert(comFmsServiceRecord); + return R.ok(); + } + return R.fail("操作失败,请重新尝试"); + } + + /** + * 分页查询我的微服务 + * @param adminDTO + * @return + */ + @Override + public R pageMyFmsService(PageFmsServiceAppletsDTO adminDTO) { + Page page = new Page<>(); + page.setSize(adminDTO.getPageSize()); + page.setCurrent(adminDTO.getPageNum()); + IPage<ComFmsServiceVO> serviceVOIPage = this.baseMapper.pageMyFmsService(page, adminDTO); + List<ComFmsServiceVO> serviceVOList = serviceVOIPage.getRecords(); + if (!serviceVOList.isEmpty()) { + serviceVOList.forEach(e -> { + if (e.getServiceStatus().equals(ComFmsService.ServiceStatus.dpj)) { + Date autoEvaluateAt = DateUtils.addDay(e.getCreatedAt(), 3); + Date nowDate = new Date(); + e.setAutoEvaluateAt(autoEvaluateAt.getTime() - nowDate.getTime()); + } + }); + } + return R.ok(serviceVOList); + } + + /** + * 微团队成员分页查询服务处理 + * @param adminDTO + * @return + */ + @Override + public R pageDealFmsService(PageFmsServiceAppletsDTO adminDTO) { + Page page = new Page<>(); + page.setSize(adminDTO.getPageSize()); + page.setCurrent(adminDTO.getPageNum()); + LoginUserInfoVO userInfo = adminDTO.getUserInfo(); + ComFmsTeamMember comFmsTeamMember = comFmsTeamMemberDAO.selectOne(new LambdaQueryWrapper<ComFmsTeamMember>() + .eq(ComFmsTeamMember::getPhone, userInfo.getPhone()) + .eq(ComFmsTeamMember::getCommunityId, userInfo.getCommunityId())); + if (nonNull(comFmsTeamMember)) { + adminDTO.setMemberId(comFmsTeamMember.getId()); + } + return R.ok(this.baseMapper.pageDealFmsService(page, adminDTO)); + } + + /** + * 微团队成员服务反馈 + * @param adminDTO + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public R feedbackFmsService(FeedbackFmsServiceDTO adminDTO) { + ComFmsService comFmsService = this.baseMapper.selectById(adminDTO.getServiceId()); + if (isNull(comFmsService)) { + return R.fail("资源不存在"); + } + if (isNull(comFmsService.getMemberId())) { + return R.fail("还未分配服务人员"); + } + LoginUserInfoVO userInfo = adminDTO.getUserInfo(); + ComFmsTeamMember comFmsTeamMember = comFmsTeamMemberDAO.selectOne(new LambdaQueryWrapper<ComFmsTeamMember>() + .eq(ComFmsTeamMember::getPhone, userInfo.getPhone()) + .eq(ComFmsTeamMember::getCommunityId, userInfo.getCommunityId())); + if (isNull(comFmsTeamMember) || !comFmsService.getMemberId().equals(comFmsTeamMember.getId())) { + return R.fail("不是指定的分配服务人员"); + } + Boolean isEnd = adminDTO.getIsEnd(); + ComFmsServiceRecord comFmsServiceRecord = new ComFmsServiceRecord(); + comFmsServiceRecord.setServiceId(comFmsService.getId()); + comFmsServiceRecord.setContent(adminDTO.getFeedbackContent()); + comFmsServiceRecord.setImage(adminDTO.getImage()); + comFmsServiceRecord.setStage(isEnd ? ComFmsServiceRecord.Stage.WCFW : ComFmsServiceRecord.Stage.FWFK); + comFmsServiceRecord.setCreatedBy(adminDTO.getUserId()); + int num = comFmsServiceRecordDAO.insert(comFmsServiceRecord); + if (num > 0) { + if (isEnd) { + comFmsService.setServiceStatus(ComFmsService.ServiceStatus.dpj); + comFmsService.setServiceAt(new Date()); + this.baseMapper.updateById(comFmsService); + } + return R.ok(); + } + return R.fail("操作失败,请重新尝试"); + } + + /** + * 定时任务针对服务结束后3天还未评价的用户默认好评 + * @return + */ + @Override + public R defaultPraise() { + List<ComFmsService> fmsServiceList = this.baseMapper.selectList(new QueryWrapper<ComFmsService>().lambda() + .eq(ComFmsService::getServiceStatus, ComFmsService.ServiceStatus.dpj) + .le(ComFmsService::getServiceAt, DateUtils.addDay(new Date(), -3))); + if (!fmsServiceList.isEmpty()) { + List<ComFmsServiceEvaluations> evaluations = new ArrayList<>(); + fmsServiceList.forEach(e -> { + ComFmsServiceEvaluations evaluation = new ComFmsServiceEvaluations(); + evaluation.setServiceId(e.getId()); + evaluation.setStarLevel(5); + evaluation.setEvaluateContent("系统默认好评!"); + evaluation.setUserId(e.getUserId()); + evaluations.add(evaluation); + }); + int num = comFmsServiceEvaluationsDAO.insertBatch(evaluations); + if (num > 0) { + fmsServiceList.forEach(e -> e.setServiceStatus(ComFmsService.ServiceStatus.ywc)); + this.updateBatchById(fmsServiceList); + } + } + return R.ok(); + } +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamMemberRelationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamMemberRelationServiceImpl.java new file mode 100644 index 0000000..8021a88 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamMemberRelationServiceImpl.java @@ -0,0 +1,19 @@ +package com.panzhihua.service_community.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.panzhihua.service_community.dao.ComFmsTeamMemberRelationDAO; +import com.panzhihua.service_community.entity.ComFmsTeamMemberRelation; +import com.panzhihua.service_community.service.ComFmsTeamMemberRelationService; +import org.springframework.stereotype.Service; + +/** + * 五微服务-团队&成员关系表(ComFmsTeamMemberRelation)表服务实现类 + * + * @author makejava + * @since 2022-02-14 14:41:37 + */ +@Service("comFmsTeamMemberRelationService") +public class ComFmsTeamMemberRelationServiceImpl extends + ServiceImpl<ComFmsTeamMemberRelationDAO, ComFmsTeamMemberRelation> implements ComFmsTeamMemberRelationService { + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamMemberServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamMemberServiceImpl.java new file mode 100644 index 0000000..854a64b --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamMemberServiceImpl.java @@ -0,0 +1,364 @@ +package com.panzhihua.service_community.service.impl; + +import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; +import static org.apache.commons.lang3.StringUtils.isNotEmpty; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import javax.annotation.Resource; + +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.google.common.collect.Lists; +import com.panzhihua.common.model.dtos.community.fms.AddTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.DeleteTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamMemberDTO; +import com.panzhihua.common.model.dtos.community.fms.PageTeamMemberDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.fms.CascadeCommVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberExportExcelVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberImportExcelVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberImportMistakeExcelVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberVO; +import com.panzhihua.service_community.dao.ComFmsTeamDAO; +import com.panzhihua.service_community.dao.ComFmsTeamMemberDAO; +import com.panzhihua.service_community.dao.ComFmsTeamMemberRelationDAO; +import com.panzhihua.service_community.dao.ComFmsTeamTypeDAO; +import com.panzhihua.service_community.entity.ComFmsTeam; +import com.panzhihua.service_community.entity.ComFmsTeamMember; +import com.panzhihua.service_community.entity.ComFmsTeamMemberRelation; +import com.panzhihua.service_community.entity.ComFmsTeamType; +import com.panzhihua.service_community.service.ComFmsTeamMemberService; + +import cn.hutool.core.util.IdcardUtil; + +/** + * 五微服务-团队成员(ComFmsTeamMember)表服务实现类 + * + * @author makejava + * @since 2022-02-11 13:35:56 + */ +@Service("comFmsTeamMemberService") +public class ComFmsTeamMemberServiceImpl extends ServiceImpl<ComFmsTeamMemberDAO, ComFmsTeamMember> + implements ComFmsTeamMemberService { + + @Resource + private ComFmsTeamDAO comFmsTeamDAO; + @Resource + private ComFmsTeamMemberRelationDAO comFmsTeamMemberRelationDAO; + @Resource + private ComFmsTeamTypeDAO comFmsTeamTypeDAO; + + /** + * 新增团队成员 + * @param addTeamMemberDTO + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public R addFmsTeamMember(AddTeamMemberDTO addTeamMemberDTO) { + String idCard = addTeamMemberDTO.getIdCard(); + if (isNotBlank(idCard) && !IdcardUtil.isValidCard(idCard)) { + return R.fail("身份证号码有误"); + } + List<Long> teamIds = addTeamMemberDTO.getTeamIds(); + List<ComFmsTeam> comFmsTeam = comFmsTeamDAO.selectBatchIds(teamIds); + if (comFmsTeam.size() != teamIds.size() || comFmsTeam.stream().anyMatch(e -> !e.getCommunityId().equals(addTeamMemberDTO.getCommunityId()))) { + return R.fail("团队id有误"); + } + Integer countMember = this.baseMapper.countMember(addTeamMemberDTO.getCommunityId(), + addTeamMemberDTO.getIdCard(), addTeamMemberDTO.getPhone()); + if (countMember > 0) { + return R.fail("团队成员已存在,如需添加团队关系,请编辑该成员"); + } + ComFmsTeamMember comFmsTeamMember = new ComFmsTeamMember(); + BeanUtils.copyProperties(addTeamMemberDTO, comFmsTeamMember); + if (isNotBlank(idCard)) { + comFmsTeamMember.setGender(IdcardUtil.getGenderByIdCard(idCard) == 1 ? 1 : 2); + } + this.baseMapper.insert(comFmsTeamMember); + Long memberId = comFmsTeamMember.getId(); + if (nonNull(memberId)) { + List<ComFmsTeamMemberRelation> teamMemberRelations = new ArrayList<>(); + List<List<Long>> cascadeIds = new ArrayList<>(); + teamIds.forEach(e -> { + Long teamType = comFmsTeam.stream().filter(team -> team.getId().equals(e)).collect(Collectors.toList()).get(0).getTeamType(); + ComFmsTeamMemberRelation teamMemberRelation = new ComFmsTeamMemberRelation(); + teamMemberRelation.setTeamId(e); + teamMemberRelation.setMemberId(memberId); + teamMemberRelations.add(teamMemberRelation); + cascadeIds.add(Arrays.asList(teamType, e)); + }); + int num = comFmsTeamMemberRelationDAO.insertBatch(teamMemberRelations); + if (num > 0) { + comFmsTeamMember.setCascadeIds(cascadeIds.toString()); + this.baseMapper.updateById(comFmsTeamMember); + return R.ok(); + } + } + return R.fail("新增失败,请重新尝试"); + } + + /** + * 编辑团队成员 + * @param editTeamMemberDTO + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public R editFmsTeamMember(EditTeamMemberDTO editTeamMemberDTO) { + String idCard = editTeamMemberDTO.getIdCard(); + if (isNotBlank(idCard) && !IdcardUtil.isValidCard(idCard)) { + return R.fail("身份证号码有误"); + } + List<Long> teamIds = editTeamMemberDTO.getTeamIds(); + List<ComFmsTeam> comFmsTeam = comFmsTeamDAO.selectBatchIds(teamIds); + if (comFmsTeam.size() != teamIds.size() || comFmsTeam.stream().anyMatch(e -> !e.getCommunityId().equals(editTeamMemberDTO.getCommunityId()))) { + return R.fail("团队id有误"); + } + ComFmsTeamMember comFmsTeamMember = this.baseMapper.selectById(editTeamMemberDTO.getId()); + if (isNull(comFmsTeamMember)) { + return R.fail("团队成员不存在"); + } + Integer countMember = 0; + if (!comFmsTeamMember.getPhone().equals(editTeamMemberDTO.getPhone())) { + countMember = this.baseMapper.selectCount(new LambdaQueryWrapper<ComFmsTeamMember>() + .eq(ComFmsTeamMember::getCommunityId, editTeamMemberDTO.getCommunityId()) + .eq(ComFmsTeamMember::getPhone, editTeamMemberDTO.getPhone())); + } + if (isNotBlank(idCard) && !idCard.equals(comFmsTeamMember.getIdCard())) { + countMember = this.baseMapper.selectCount(new LambdaQueryWrapper<ComFmsTeamMember>() + .eq(ComFmsTeamMember::getCommunityId, editTeamMemberDTO.getCommunityId()) + .eq(ComFmsTeamMember::getIdCard, editTeamMemberDTO.getIdCard())); + } + if (countMember > 0) { + return R.fail("该手机号或身份证号已存在团队成员"); + } + BeanUtils.copyProperties(editTeamMemberDTO, comFmsTeamMember); + if (isNotBlank(idCard)) { + comFmsTeamMember.setGender(IdcardUtil.getGenderByIdCard(idCard) == 1 ? 1 : 2); + } + comFmsTeamMemberRelationDAO.delete(new LambdaQueryWrapper<ComFmsTeamMemberRelation>() + .eq(ComFmsTeamMemberRelation::getMemberId, editTeamMemberDTO.getId())); + List<ComFmsTeamMemberRelation> teamMemberRelations = new ArrayList<>(); + List<List<Long>> cascadeIds = new ArrayList<>(); + teamIds.forEach(e -> { + Long teamType = comFmsTeam.stream().filter(team -> team.getId().equals(e)).collect(Collectors.toList()).get(0).getTeamType(); + ComFmsTeamMemberRelation teamMemberRelation = new ComFmsTeamMemberRelation(); + teamMemberRelation.setTeamId(e); + teamMemberRelation.setMemberId(editTeamMemberDTO.getId()); + teamMemberRelations.add(teamMemberRelation); + cascadeIds.add(Arrays.asList(teamType, e)); + }); + comFmsTeamMemberRelationDAO.insertBatch(teamMemberRelations); + comFmsTeamMember.setCascadeIds(cascadeIds.toString()); + int num = this.baseMapper.updateById(comFmsTeamMember); + if (num > 0) { + return R.ok(); + } + return R.fail("编辑失败,请重新尝试"); + } + + /** + * 删除团队成员 + * @param deleteTeamMemberDTO + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public R deleteFmsTeamMember(DeleteTeamMemberDTO deleteTeamMemberDTO) { + ComFmsTeamMember comFmsTeamMember = this.baseMapper.selectById(deleteTeamMemberDTO.getId()); + if (isNull(comFmsTeamMember)) { + return R.fail("资源不存在"); + } + if (!comFmsTeamMember.getCommunityId().equals(deleteTeamMemberDTO.getCommunityId())) { + return R.fail("非本社区工作人员"); + } + Integer count = comFmsTeamMemberRelationDAO.selectCount(new LambdaQueryWrapper<ComFmsTeamMemberRelation>() + .eq(ComFmsTeamMemberRelation::getMemberId, deleteTeamMemberDTO.getId())); + int num = comFmsTeamMemberRelationDAO.delete(new LambdaQueryWrapper<ComFmsTeamMemberRelation>() + .eq(ComFmsTeamMemberRelation::getMemberId, deleteTeamMemberDTO.getId()).eq(ComFmsTeamMemberRelation::getTeamId, deleteTeamMemberDTO.getTeamId())); + if (num > 0) { + if (count == 1) { + this.baseMapper.deleteById(deleteTeamMemberDTO.getId()); + } + return R.ok(); + } + return R.fail("删除失败,请重新尝试"); + } + + /** + * 分页查询团队成员 + * @param pageTeamMemberDTO + * @return + */ + @Override + public R pageFmsTeamMember(PageTeamMemberDTO pageTeamMemberDTO) { + Page page = new Page<>(); + page.setSize(pageTeamMemberDTO.getPageSize()); + page.setCurrent(pageTeamMemberDTO.getPageNum()); + IPage<ComFmsTeamMemberVO> memberVOIPage = this.baseMapper.pageFmsTeamMember(page, pageTeamMemberDTO); + List<ComFmsTeamMemberVO> records = memberVOIPage.getRecords(); + if (!records.isEmpty()) { + records.forEach(e -> { + String idCard = e.getIdCard(); + if (isNotEmpty(idCard)) { + e.setAge(IdcardUtil.getAgeByIdCard(idCard)); + } + }); + } + return R.ok(memberVOIPage); + } + + /** + * 微团队顶部统计 + * @param communityId + * @return + */ + @Override + public R statisticsFmsTeamMember(Long communityId) { + return R.ok(this.baseMapper.statisticsFmsTeamMember(communityId)); + } + + /** + * 批量导入团队成员 + * @param voList + * @param communityId + * @param userId + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public R listSaveFmsTeamMemberExcelVO(List<ComFmsTeamMemberImportExcelVO> voList, Long communityId, Long userId) { + List<ComFmsTeamType> comFmsTeamTypes = comFmsTeamTypeDAO.selectList(new LambdaQueryWrapper<ComFmsTeamType>().eq(ComFmsTeamType::getCommunityId, communityId)); + List<ComFmsTeam> comFmsTeams = comFmsTeamDAO.selectList(new LambdaQueryWrapper<ComFmsTeam>().eq(ComFmsTeam::getCommunityId, communityId)); + List<ComFmsTeamMemberRelation> teamMemberRelations = new ArrayList<>(); + List<ComFmsTeamMemberImportMistakeExcelVO> mistakes = Lists.newArrayList(); + for (ComFmsTeamMemberImportExcelVO e : voList) { + String teamType = e.getTeamType(); + String teamName = e.getTeamName(); + ComFmsTeamType fmsTeamType = comFmsTeamTypes.stream().filter(type -> type.getName().equals(teamType)).findFirst().orElse(null); + if (isNull(fmsTeamType)) { + ComFmsTeamMemberImportMistakeExcelVO mistake = new ComFmsTeamMemberImportMistakeExcelVO(); + BeanUtils.copyProperties(e, mistake); + mistake.setMistake("团队类型有误,请填写正确的团队类型"); + mistakes.add(mistake); + continue; + } + ComFmsTeam fmsTeam = comFmsTeams.stream().filter(team -> team.getName().equals(teamName)).findFirst().orElse(null); + if (isNull(fmsTeam)) { + ComFmsTeamMemberImportMistakeExcelVO mistake = new ComFmsTeamMemberImportMistakeExcelVO(); + BeanUtils.copyProperties(e, mistake); + mistake.setMistake("团队名称有误,请填写正确的团队名称"); + mistakes.add(mistake); + continue; + } + String idCard = e.getIdCard(); + Integer countMember = this.baseMapper.countMember(communityId, idCard, e.getPhone()); + if (countMember > 0) { + ComFmsTeamMemberImportMistakeExcelVO mistake = new ComFmsTeamMemberImportMistakeExcelVO(); + BeanUtils.copyProperties(e, mistake); + mistake.setMistake("团队成员已存在,如需添加团队关系,请编辑该成员"); + mistakes.add(mistake); + continue; + } + ComFmsTeamMember comFmsTeamMember = new ComFmsTeamMember(); + comFmsTeamMember.setName(e.getTeamMember()); + comFmsTeamMember.setPhone(e.getPhone()); + comFmsTeamMember.setIdCard(idCard); + if (isNotBlank(idCard)) { + comFmsTeamMember.setGender(IdcardUtil.getGenderByIdCard(idCard) == 1 ? 1 : 2); + } + comFmsTeamMember.setCascadeIds(Arrays.asList(fmsTeamType.getId(), fmsTeam.getId()).toString()); + comFmsTeamMember.setCommunityId(communityId); + comFmsTeamMember.setCreatedBy(userId); + comFmsTeamMember.setUpdatedBy(userId); + int num = this.baseMapper.insert(comFmsTeamMember); + if (num > 0) { + ComFmsTeamMemberRelation teamMemberRelation = new ComFmsTeamMemberRelation(); + teamMemberRelation.setMemberId(comFmsTeamMember.getId()); + teamMemberRelation.setTeamId(fmsTeam.getId()); + teamMemberRelations.add(teamMemberRelation); + } + } + if (!teamMemberRelations.isEmpty()) { + comFmsTeamMemberRelationDAO.insertBatch(teamMemberRelations); + } + return R.ok(mistakes); + } + + /** + * 团队人员导出 + * @param pageTeamMemberDTO + * @return + */ + @Override + public R exportTeamMember(PageTeamMemberDTO pageTeamMemberDTO) { + List<ComFmsTeamMemberExportExcelVO> memberExportExcelVOList = this.baseMapper.exportTeamMember(pageTeamMemberDTO); + if (!memberExportExcelVOList.isEmpty()) { + memberExportExcelVOList.forEach(e -> { + if (isNotBlank(e.getIdCard())) { + e.setAge(IdcardUtil.getAgeByIdCard(e.getIdCard()) + ""); + } else { + e.setAge("未知"); + } + }); + } + return R.ok(memberExportExcelVOList); + } + + /** + * 级联查询团队服务人员 + * @param communityId + * @return + */ + @Override + public R retrieveFmsTeamMemberCascade(Long communityId) { + List<ComFmsTeamMemberVO> memberList = this.baseMapper.selectListByCommunityId(communityId); + List<CascadeCommVO> cascade = null; + if (!memberList.isEmpty()) { + Map<Long, List<CascadeCommVO>> allMemberGroup = memberList.stream().map(e -> { + CascadeCommVO cascadeCommVO = new CascadeCommVO(); + cascadeCommVO.setValue(e.getId()); + cascadeCommVO.setParentId(e.getTeamId()); + cascadeCommVO.setLabel(e.getName()); + return cascadeCommVO; + }).collect(Collectors.groupingBy(CascadeCommVO::getParentId)); + List<ComFmsTeam> teamList = comFmsTeamDAO.selectBatchIds(allMemberGroup.keySet()); + if (!teamList.isEmpty()) { + Map<Long, List<CascadeCommVO>> allTeamGroup = teamList.stream().map(e -> { + CascadeCommVO cascadeCommVO = new CascadeCommVO(); + cascadeCommVO.setValue(e.getId()); + cascadeCommVO.setParentId(e.getTeamType()); + cascadeCommVO.setLabel(e.getName()); + return cascadeCommVO; + }).collect(Collectors.groupingBy(CascadeCommVO::getParentId)); + List<ComFmsTeamType> teamTypeList = comFmsTeamTypeDAO.selectBatchIds(allTeamGroup.keySet()); + if (!teamTypeList.isEmpty()) { + cascade = teamTypeList.stream().map(e -> { + CascadeCommVO cascadeCommVO = new CascadeCommVO(); + cascadeCommVO.setValue(e.getId()); + cascadeCommVO.setLabel(e.getName()); + return cascadeCommVO; + }).collect(Collectors.toList()); + cascade.forEach(e1 -> e1.setChildren(allTeamGroup.get(e1.getValue()))); + cascade.forEach(e1 -> e1.getChildren().forEach(e2 -> e2.setChildren(allMemberGroup.get(e2.getValue())))); + } + } + } + return R.ok(cascade); + } +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamServiceImpl.java new file mode 100644 index 0000000..c7ddf85 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamServiceImpl.java @@ -0,0 +1,225 @@ +package com.panzhihua.service_community.service.impl; + +import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import javax.annotation.Resource; + +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.panzhihua.common.model.dtos.community.fms.AddTeamDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamDTO; +import com.panzhihua.common.model.dtos.community.fms.PageFmsTeamDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.fms.CascadeCommVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberVO; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamVO; +import com.panzhihua.service_community.dao.ComFmsTeamDAO; +import com.panzhihua.service_community.dao.ComFmsTeamMemberDAO; +import com.panzhihua.service_community.dao.ComFmsTeamMemberRelationDAO; +import com.panzhihua.service_community.dao.ComFmsTeamTypeDAO; +import com.panzhihua.service_community.entity.ComFmsTeam; +import com.panzhihua.service_community.entity.ComFmsTeamMemberRelation; +import com.panzhihua.service_community.entity.ComFmsTeamType; +import com.panzhihua.service_community.service.ComFmsTeamService; + +/** + * 五微服务-微团队(ComFmsTeam)表服务实现类 + * + * @author makejava + * @since 2022-02-11 13:35:55 + */ +@Service("comFmsTeamService") +public class ComFmsTeamServiceImpl extends ServiceImpl<ComFmsTeamDAO, ComFmsTeam> implements ComFmsTeamService { + + @Resource + private ComFmsTeamMemberDAO comFmsTeamMemberDAO; + @Resource + private ComFmsTeamTypeDAO comFmsTeamTypeDAO; + @Resource + private ComFmsTeamMemberRelationDAO comFmsTeamMemberRelationDAO; + + /** + * 新增团队 + * @param addTeamDTO + * @return + */ + @Override + public R addFmsTeam(AddTeamDTO addTeamDTO) { + Integer count = this.baseMapper.selectCount(new LambdaQueryWrapper<ComFmsTeam>() + .eq(ComFmsTeam::getName, addTeamDTO.getName()) + .eq(ComFmsTeam::getTeamType, addTeamDTO.getTeamType())); + if (count > 0) { + return R.fail("该团队已存在于目标类型下"); + } + ComFmsTeam comFmsTeam = new ComFmsTeam(); + BeanUtils.copyProperties(addTeamDTO, comFmsTeam); + int num = this.baseMapper.insert(comFmsTeam); + if (num > 0) { + return R.ok(); + } + return R.fail("新增失败,请重新尝试"); + } + + /** + * 修改团队信息 + * @param editTeamDTO + * @return + */ + @Override + public R editFmsTeam(EditTeamDTO editTeamDTO) { + ComFmsTeam comFmsTeam = this.baseMapper.selectById(editTeamDTO.getId()); + if (isNull(comFmsTeam)) { + return R.fail("资源不存在"); + } + Integer count = this.baseMapper.selectCount(new LambdaQueryWrapper<ComFmsTeam>() + .eq(ComFmsTeam::getName, editTeamDTO.getName()) + .eq(ComFmsTeam::getTeamType, editTeamDTO.getTeamType())); + if (count > 0) { + return R.fail("该团队已存在于目标类型下"); + } + BeanUtils.copyProperties(editTeamDTO, comFmsTeam); + int num = this.baseMapper.updateById(comFmsTeam); + if (num > 0) { + return R.ok(); + } + return R.fail("修改失败,请重新尝试"); + } + + /** + * 删除团队 + * @param teamId + * @return + */ + @Override + public R deleteFmsTeam(Long teamId) { + ComFmsTeam comFmsTeam = this.baseMapper.selectById(teamId); + if (isNull(comFmsTeam)) { + return R.fail("资源不存在"); + } + Integer count = comFmsTeamMemberRelationDAO.selectCount(new LambdaQueryWrapper<ComFmsTeamMemberRelation>().eq(ComFmsTeamMemberRelation::getTeamId, teamId)); + if (count > 0) { + return R.fail("该数据已被引用,无法删除!"); + } + int num = this.baseMapper.deleteById(teamId); + if (num > 0) { + return R.ok(); + } + return R.fail("删除失败,请重新尝试"); + } + + /** + * 获取团队列表 + * @param teamTypeId + * @return + */ + @Override + public R listFmsTeam(Long teamTypeId) { + List<ComFmsTeam> comFmsTeams = this.baseMapper.selectList(new LambdaQueryWrapper<ComFmsTeam>() + .eq(ComFmsTeam::getTeamType, teamTypeId).orderByDesc(ComFmsTeam::getCreatedAt)); + List<ComFmsTeamVO> fmsTeamVOList = new ArrayList<>(); + if (!comFmsTeams.isEmpty()) { + comFmsTeams.forEach(comFmsTeam -> { + ComFmsTeamVO comFmsTeamVO = new ComFmsTeamVO(); + BeanUtils.copyProperties(comFmsTeam, comFmsTeamVO); + fmsTeamVOList.add(comFmsTeamVO); + }); + } + return R.ok(fmsTeamVOList); + } + + /** + * 获取团队详情 + * @param teamId + * @return + */ + @Override + public R detailFmsTeam(Long teamId) { + ComFmsTeam comFmsTeam = this.baseMapper.selectById(teamId); + if (isNull(comFmsTeam)) { + return R.fail("资源不存在"); + } + ComFmsTeamVO comFmsTeamVO = new ComFmsTeamVO(); + BeanUtils.copyProperties(comFmsTeam, comFmsTeamVO); + return R.ok(comFmsTeamVO); + } + + /** + * 级联查询团队数据 + * @param communityId + * @return + */ + @Override + public R retrieveFmsTeamCascade(Long communityId) { + List<ComFmsTeamType> teamTypeList = comFmsTeamTypeDAO.selectList(new LambdaQueryWrapper<ComFmsTeamType>() + .eq(ComFmsTeamType::getCommunityId, communityId).orderByDesc(ComFmsTeamType::getCreatedAt)); + List<CascadeCommVO> cascade = null; + if (!teamTypeList.isEmpty()) { + List<ComFmsTeam> teamList = this.baseMapper.selectList(new LambdaQueryWrapper<ComFmsTeam>().eq(ComFmsTeam::getCommunityId, communityId)); + List<CascadeCommVO> allTeamType = teamTypeList.stream().map(e -> { + CascadeCommVO cascadeCommVO = new CascadeCommVO(); + cascadeCommVO.setValue(e.getId()); + cascadeCommVO.setLabel(e.getName()); + return cascadeCommVO; + }).collect(Collectors.toList()); + if (!teamList.isEmpty()) { + Map<Long, List<CascadeCommVO>> allTeamGroup = teamList.stream().map(e -> { + CascadeCommVO cascadeCommVO = new CascadeCommVO(); + cascadeCommVO.setValue(e.getId()); + cascadeCommVO.setParentId(e.getTeamType()); + cascadeCommVO.setLabel(e.getName()); + return cascadeCommVO; + }).collect(Collectors.groupingBy(CascadeCommVO::getParentId)); + allTeamType.forEach(e -> e.setChildren(allTeamGroup.get(e.getValue()))); + } + cascade = allTeamType.stream().filter(e -> nonNull(e.getChildren()) && !e.getChildren().isEmpty()).collect(Collectors.toList()); + } + return R.ok(cascade); + } + + /** + * 小程序分页查询团队信息 + * @param pageFmsTeamDTO + * @return + */ + @Override + public R pageFmsTeamApplets(PageFmsTeamDTO pageFmsTeamDTO) { + Long pageNum = pageFmsTeamDTO.getPageNum(); + Long pageSize = pageFmsTeamDTO.getPageSize(); + List<ComFmsTeamVO> teamList; + if (nonNull(pageNum) && nonNull(pageSize)) { + Page page = new Page<>(); + page.setSize(pageSize); + page.setCurrent(pageNum); + IPage<ComFmsTeamVO> fmsTeamIPage = this.baseMapper.pageFmsTeamApplets(page, pageFmsTeamDTO); + teamList = fmsTeamIPage.getRecords(); + if (!teamList.isEmpty()) { + teamList.forEach(e -> { + List<ComFmsTeamMemberVO> members = comFmsTeamMemberDAO.selectVOListByTeamId(e.getId()); + e.setTeamMemberTotal(members.size()); + e.setMemberList(members); + }); + } + return R.ok(fmsTeamIPage); + } + teamList = this.baseMapper.listFmsTeamApplets(pageFmsTeamDTO); + if (!teamList.isEmpty()) { + teamList.forEach(e -> { + List<ComFmsTeamMemberVO> members = comFmsTeamMemberDAO.selectVOListByTeamId(e.getId()); + e.setTeamMemberTotal(members.size()); + e.setMemberList(members); + }); + } + return R.ok(teamList); + } +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamTypeServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamTypeServiceImpl.java new file mode 100644 index 0000000..983071b --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComFmsTeamTypeServiceImpl.java @@ -0,0 +1,127 @@ +package com.panzhihua.service_community.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.panzhihua.common.model.dtos.community.fms.AddTeamTypeDTO; +import com.panzhihua.common.model.dtos.community.fms.EditTeamTypeDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.fms.ComFmsTeamTypeVO; +import com.panzhihua.service_community.dao.ComFmsTeamDAO; +import com.panzhihua.service_community.dao.ComFmsTeamTypeDAO; +import com.panzhihua.service_community.entity.ComFmsTeam; +import com.panzhihua.service_community.entity.ComFmsTeamType; +import com.panzhihua.service_community.service.ComFmsTeamTypeService; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +import java.util.ArrayList; +import java.util.List; + +import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; + +/** + * 五微服务-团队类型(ComFmsTeamType)表服务实现类 + * + * @author makejava + * @since 2022-02-11 13:35:56 + */ +@Service("comFmsTeamTypeService") +public class ComFmsTeamTypeServiceImpl extends ServiceImpl<ComFmsTeamTypeDAO, ComFmsTeamType> + implements ComFmsTeamTypeService { + + @Resource + private ComFmsTeamDAO comFmsTeamDAO; + + /** + * 新增团队类型 + * @param addTeamTypeDTO + * @return + */ + @Override + public R addFmsTeamType(AddTeamTypeDTO addTeamTypeDTO) { + ComFmsTeamType comFmsTeamType = this.baseMapper.selectOne(new LambdaQueryWrapper<ComFmsTeamType>() + .eq(ComFmsTeamType::getName, addTeamTypeDTO.getName()) + .eq(ComFmsTeamType::getCommunityId, addTeamTypeDTO.getCommunityId())); + if (nonNull(comFmsTeamType)) { + return R.fail("团队类型已存在"); + } + comFmsTeamType = new ComFmsTeamType(); + BeanUtils.copyProperties(addTeamTypeDTO, comFmsTeamType); + int num = this.baseMapper.insert(comFmsTeamType); + if (num > 0) { + return R.ok(); + } + return R.fail("添加失败,请重新尝试"); + } + + /** + * 修改团队类型 + * @param editTeamTypeDTO + * @return + */ + @Override + public R editFmsTeamType(EditTeamTypeDTO editTeamTypeDTO) { + ComFmsTeamType comFmsTeamType = this.baseMapper.selectById(editTeamTypeDTO.getId()); + if (isNull(comFmsTeamType)) { + return R.fail("资源不存在"); + } + if (!editTeamTypeDTO.getCommunityId().equals(comFmsTeamType.getCommunityId())) { + return R.fail("非本社区工作人员"); + } + BeanUtils.copyProperties(editTeamTypeDTO, comFmsTeamType); + int num = this.baseMapper.updateById(comFmsTeamType); + if (num > 0) { + return R.ok(); + } + return R.fail("修改失败,请重新尝试"); + } + + /** + * 删除团队类型 + * @param teamTypeId + * @param communityId + * @return + */ + @Override + public R deleteFmsTeamType(Long teamTypeId, Long communityId) { + ComFmsTeamType comFmsTeamType = this.baseMapper.selectById(teamTypeId); + if (isNull(comFmsTeamType)) { + return R.fail("团队类型不存在"); + } + if (!communityId.equals(comFmsTeamType.getCommunityId())) { + return R.fail("非本社区工作人员"); + } + Integer count = comFmsTeamDAO.selectCount(new LambdaQueryWrapper<ComFmsTeam>().eq(ComFmsTeam::getTeamType, teamTypeId)); + if (count > 0) { + return R.fail("该数据已被引用,无法删除!"); + } + int num = this.baseMapper.deleteById(teamTypeId); + if (num > 0) { + return R.ok(); + } + return R.fail("删除失败,请重新尝试"); + } + + /** + * 获取团队类型列表 + * @param communityId + * @return + */ + @Override + public R listFmsTeamType(Long communityId) { + List<ComFmsTeamType> comFmsTeamTypes = this.baseMapper.selectList(new LambdaQueryWrapper<ComFmsTeamType>() + .eq(ComFmsTeamType::getCommunityId, communityId).orderByDesc(ComFmsTeamType::getCreatedAt)); + List<ComFmsTeamTypeVO> teamTypeVOList = new ArrayList<>(); + if (!comFmsTeamTypes.isEmpty()) { + comFmsTeamTypes.forEach(comFmsTeamType -> { + ComFmsTeamTypeVO comFmsTeamTypeVO = new ComFmsTeamTypeVO(); + BeanUtils.copyProperties(comFmsTeamType, comFmsTeamTypeVO); + teamTypeVOList.add(comFmsTeamTypeVO); + }); + } + return R.ok(teamTypeVOList); + } +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsClassroomMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsClassroomMapper.xml new file mode 100644 index 0000000..33a47be --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsClassroomMapper.xml @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.panzhihua.service_community.dao.ComFmsClassroomDAO"> + + <resultMap type="com.panzhihua.service_community.entity.ComFmsClassroom" id="ComFmsClassroomMap"> + <result property="id" column="id" jdbcType="INTEGER"/> + <result property="title" column="title" jdbcType="VARCHAR"/> + <result property="scholars" column="scholars" jdbcType="INTEGER"/> + <result property="cover" column="cover" jdbcType="VARCHAR"/> + <result property="content" column="content" jdbcType="VARCHAR"/> + <result property="viewNum" column="view_num" jdbcType="INTEGER"/> + <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> + <result property="createdBy" column="created_by" jdbcType="INTEGER"/> + <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/> + <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/> + <result property="communityId" column="community_id" jdbcType="INTEGER"/> + </resultMap> + + <!-- 批量插入 --> + <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_classroom(title, scholars, cover, content, view_num, created_at, created_by, updated_at, updated_by, community_id) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.title}, #{entity.scholars}, #{entity.cover}, #{entity.content}, #{entity.viewNum}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy}, #{entity.communityId}) + </foreach> + </insert> + <!-- 批量插入或按主键更新 --> + <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_classroom(title, scholars, cover, content, view_num, created_at, created_by, updated_at, updated_by, community_id) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.title}, #{entity.scholars}, #{entity.cover}, #{entity.content}, #{entity.viewNum}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy}, #{entity.communityId}) + </foreach> + on duplicate key update + title = values(title) , scholars = values(scholars) , cover = values(cover) , content = values(content) , view_num = values(view_num) , created_at = values(created_at) , created_by = values(created_by) , updated_at = values(updated_at) , updated_by = values(updated_by) , community_id = values(community_id) </insert> + <select id="pageFmsClassroomAdmin" + resultType="com.panzhihua.common.model.vos.community.fms.ComFmsClassroomVO"> + SELECT id, title, scholars, cover, view_num, created_at + FROM com_fms_classroom + WHERE community_id = #{adminDTO.communityId} + <if test="adminDTO.keyword != null and adminDTO.keyword != """> + AND title LIKE CONCAT('%',#{adminDTO.keyword},'%') + </if> + <if test="adminDTO.createdAtBegin != null"> + AND created_at >= #{adminDTO.createdAtBegin} + </if> + <if test="adminDTO.createdAtEnd != null"> + AND created_at <= #{adminDTO.createdAtEnd} + </if> + ORDER BY created_at DESC + </select> + <select id="statisticsFmsClassroom" + resultType="com.panzhihua.common.model.vos.community.fms.FmsClassroomTopStatisticsVO"> + SELECT + (SELECT COUNT(id) FROM com_fms_classroom WHERE community_id = #{communityId}) AS classroomCount, + (SELECT IF(SUM(scholars) IS NULL,0,SUM(scholars)) FROM com_fms_classroom WHERE community_id = #{communityId}) AS learnCount + </select> + <select id="pageFmsEvent" resultType="com.panzhihua.common.model.vos.community.fms.FmsEventVO"> + SELECT e.id, e.event_clazz, egd.grid_name, e.happent_lat_lng, e.happen_time, e.event_des, + e.danger_level, e.urgent, e.major, e.event_process_status + FROM `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE e.event_category = 1 AND e.event_status = 2 AND egd.grid_community_id = #{adminDTO.communityId} + <if test="adminDTO.eventClazz != null and adminDTO.eventClazz != """> + AND e.event_clazz = #{adminDTO.eventClazz} + </if> + <if test="adminDTO.eventProcessStatus != null"> + AND e.event_process_status = #{adminDTO.eventProcessStatus} + </if> + <if test="adminDTO.eventProcessStatus == null"> + AND e.event_process_status IN(1,2) + </if> + <if test="adminDTO.type != null and adminDTO.type == 1"> + AND e.event_type = 3 + </if> + <if test="adminDTO.type != null and adminDTO.type == 2"> + AND e.event_type = 1 + </if> + <if test="adminDTO.keyword != null and adminDTO.keyword != """> + AND e.event_des LIKE CONCAT('%',#{adminDTO.keyword},'%') + </if> + ORDER BY e.happen_time DESC + </select> + <select id="statisticsFmsEvent" + resultType="com.panzhihua.common.model.vos.community.fms.FmsEventTopStatisticsVO"> + SELECT + (SELECT COUNT(e.id) FROM `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE e.event_category = 1 AND e.event_status = 2 AND e.event_process_status = 1 AND egd.grid_community_id = #{communityId} + <if test="type != null and type == 1"> + AND e.event_type = 3 + </if> + <if test="type != null and type == 2"> + AND e.event_type = 1 + </if> + ) AS unHandledCount, + (SELECT COUNT(e.id) FROM `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE e.event_category = 1 AND e.event_status = 2 AND e.event_process_status = 2 AND egd.grid_community_id = #{communityId} + <if test="type != null and type == 1"> + AND e.event_type = 3 + </if> + <if test="type != null and type == 2"> + AND e.event_type = 1 + </if> + ) AS handledCount + </select> + <select id="pageFmsEventApplets" resultType="com.panzhihua.common.model.vos.grid.EventVO"> + SELECT e.id, e.event_clazz, e.happen_time, e.event_des, e.grid_member_id + FROM `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE e.event_category = 1 AND e.event_status = 2 AND egd.grid_community_id = #{adminDTO.communityId} AND e.event_process_status = 2 + <if test="adminDTO.eventClazz != null and adminDTO.eventClazz != """> + AND e.event_clazz = #{adminDTO.eventClazz} + </if> + <if test="adminDTO.type != null and adminDTO.type == 1"> + AND e.event_type = 3 + </if> + <if test="adminDTO.type != null and adminDTO.type == 2"> + AND e.event_type = 1 + </if> + ORDER BY e.happen_time DESC + </select> + +</mapper> + diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsServiceEvaluationsMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsServiceEvaluationsMapper.xml new file mode 100644 index 0000000..071b8f4 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsServiceEvaluationsMapper.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.panzhihua.service_community.dao.ComFmsServiceEvaluationsDAO"> + + <resultMap type="com.panzhihua.service_community.entity.ComFmsServiceEvaluations" id="ComFmsServiceEvaluationsMap"> + <result property="id" column="id" jdbcType="INTEGER"/> + <result property="serviceId" column="service_id" jdbcType="INTEGER"/> + <result property="userId" column="user_id" jdbcType="INTEGER"/> + <result property="starLevel" column="star_level" jdbcType="INTEGER"/> + <result property="evaluateContent" column="evaluate_content" jdbcType="VARCHAR"/> + <result property="image" column="image" jdbcType="VARCHAR"/> + <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> + </resultMap> + + <!-- 批量插入 --> + <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_service_evaluations(service_id, user_id, star_level, evaluate_content, image) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.serviceId}, #{entity.userId}, #{entity.starLevel}, #{entity.evaluateContent}, #{entity.image}) + </foreach> + </insert> + <!-- 批量插入或按主键更新 --> + <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_service_evaluations(service_id, user_id, star_level, evaluate_content, image, + created_at) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.serviceId}, #{entity.userId}, #{entity.starLevel}, #{entity.evaluateContent}, #{entity.image}, + #{entity.createdAt}) + </foreach> + on duplicate key update + service_id = values(service_id) , user_id = values(user_id) , star_level = values(star_level) , evaluate_content + = values(evaluate_content) , image = values(image) , created_at = values(created_at) + </insert> + +</mapper> + diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsServiceMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsServiceMapper.xml new file mode 100644 index 0000000..f332e45 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsServiceMapper.xml @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.panzhihua.service_community.dao.ComFmsServiceDAO"> + + <resultMap type="com.panzhihua.service_community.entity.ComFmsService" id="ComFmsServiceMap"> + <result property="id" column="id" jdbcType="INTEGER"/> + <result property="userName" column="user_name" jdbcType="VARCHAR"/> + <result property="userId" column="user_id" jdbcType="INTEGER"/> + <result property="phone" column="phone" jdbcType="VARCHAR"/> + <result property="serviceContent" column="service_content" jdbcType="VARCHAR"/> + <result property="serviceImage" column="service_image" jdbcType="VARCHAR"/> + <result property="approvalContent" column="approval_content" jdbcType="VARCHAR"/> + <result property="approvalAt" column="approval_at" jdbcType="TIMESTAMP"/> + <result property="memberId" column="member_id" jdbcType="INTEGER"/> + <result property="serviceStatus" column="service_status" jdbcType="INTEGER"/> + <result property="serviceAt" column="service_at" jdbcType="TIMESTAMP"/> + <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> + <result property="createdBy" column="created_by" jdbcType="INTEGER"/> + <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/> + <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/> + <result property="communityId" column="community_id" jdbcType="INTEGER"/> + </resultMap> + + <!-- 批量插入 --> + <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_service(user_name, user_id, phone, service_content, service_image, approval_content, approval_at, member_id, service_status, service_at, created_at, created_by, updated_at, updated_by, community_id) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.userName}, #{entity.userId}, #{entity.phone}, #{entity.serviceContent}, #{entity.serviceImage}, #{entity.approvalContent}, #{entity.approvalAt}, #{entity.memberId}, #{entity.serviceStatus}, #{entity.serviceAt}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy}, #{entity.communityId}) + </foreach> + </insert> + <!-- 批量插入或按主键更新 --> + <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_service(user_name, user_id, phone, service_content, service_image, approval_content, approval_at, member_id, service_status, service_at, created_at, created_by, updated_at, updated_by, community_id) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.userName}, #{entity.userId}, #{entity.phone}, #{entity.serviceContent}, #{entity.serviceImage}, #{entity.approvalContent}, #{entity.approvalAt}, #{entity.memberId}, #{entity.serviceStatus}, #{entity.serviceAt}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy}, #{entity.communityId}) + </foreach> + on duplicate key update + user_name = values(user_name) , user_id = values(user_id) , phone = values(phone) , service_content = values(service_content) , service_image = values(service_image) , approval_content = values(approval_content) , approval_at = values(approval_at) , member_id = values(member_id) , service_status = values(service_status) , service_at = values(service_at) , created_at = values(created_at) , created_by = values(created_by) , updated_at = values(updated_at) , updated_by = values(updated_by) , community_id = values(community_id) </insert> + <select id="pageFmsServiceAdmin" resultType="com.panzhihua.common.model.vos.community.fms.ComFmsServiceVO"> + SELECT t1.id, t1.user_name, t1.phone, t1.created_at, t1.service_content, t2.`name` AS serviceMember, t3.star_level, t1.service_status + FROM com_fms_service t1 + LEFT JOIN com_fms_team_member t2 ON t1.member_id = t2.id + LEFT JOIN com_fms_service_evaluations t3 ON t1.id = t3.service_id + WHERE t1.community_id = #{adminDTO.communityId} + <if test="adminDTO.keyword != null and adminDTO.keyword != """> + AND(t1.user_name LIKE CONCAT('%',#{adminDTO.keyword},'%') + OR t2.`name` LIKE CONCAT('%',#{adminDTO.keyword},'%') + OR t1.service_content LIKE CONCAT('%',#{adminDTO.keyword},'%')) + </if> + <if test="adminDTO.serviceStatus != null"> + AND t1.service_status = #{adminDTO.serviceStatus} + </if> + ORDER BY t1.created_at DESC + </select> + <select id="detailFmsServiceAdmin" + resultType="com.panzhihua.common.model.vos.community.fms.ComFmsServiceVO"> + SELECT t1.id, t1.user_name, t2.`name` AS realName, t1.phone, t1.service_content, t1.service_image, + t1.service_status + FROM com_fms_service t1 + LEFT JOIN com_fms_team_member t2 ON t1.member_id = t2.id + WHERE t1.id = #{serviceId} + </select> + <select id="statisticsFmsService" + resultType="com.panzhihua.common.model.vos.community.fms.FmsServiceTopStatisticsVO"> + SELECT + (SELECT COUNT(id) FROM com_fms_service WHERE community_id = #{communityId} AND service_status = 4) AS completedCount, + (SELECT COUNT(id) FROM com_fms_service WHERE community_id = #{communityId} AND service_status = 1) AS unVerifiedCount, + (SELECT COUNT(id) FROM com_fms_service WHERE community_id = #{communityId} AND service_status = 2) AS inProgressCount, + (SELECT COUNT(id) FROM com_fms_service WHERE community_id = #{communityId} AND service_status = 3) AS unEvaluateCount, + (SELECT COUNT(id) FROM com_fms_service WHERE community_id = #{communityId} AND service_status = 5) AS unPassCount + </select> + <select id="pageFmsServiceAdminApplets" + resultType="com.panzhihua.common.model.vos.community.fms.ComFmsServiceVO"> + SELECT t1.id, t1.service_content, t1.service_image, IF(t2.nick_name IS NULL,'匿名用户',t2.nick_name) AS nickName, t2.image_url + FROM com_fms_service t1 + LEFT JOIN sys_user t2 ON t1.user_id = t2.user_id + WHERE t1.community_id = #{adminDTO.communityId} + <if test="adminDTO.status != null and adminDTO.status == 1"> + AND t1.service_status IN (3,4) + </if> + <if test="adminDTO.status != null and adminDTO.status == 2"> + AND t1.service_status = 2 + </if> + ORDER BY t1.created_at DESC + </select> + <select id="detailFmsServiceApplets" + resultType="com.panzhihua.common.model.vos.community.fms.ComFmsServiceVO"> + SELECT t1.id, t1.service_content, t1.service_image, t1.phone, t1.service_status, + t1.created_at, IF(t2.nick_name IS NULL,'匿名用户',t2.nick_name) AS nickName, t2.image_url + FROM com_fms_service t1 + LEFT JOIN sys_user t2 ON t1.user_id = t2.user_id + WHERE t1.id = #{serviceId} + </select> + <select id="pageMyFmsService" resultType="com.panzhihua.common.model.vos.community.fms.ComFmsServiceVO"> + SELECT id, service_content, service_image, service_status, created_at + FROM com_fms_service WHERE user_id = #{adminDTO.userId} AND community_id = #{adminDTO.communityId} + ORDER BY created_at DESC + </select> + <select id="pageDealFmsService" resultType="com.panzhihua.common.model.vos.community.fms.ComFmsServiceVO"> + SELECT t1.id, t1.service_content, t1.service_image, t1.service_status, t1.created_at, IF(t2.nick_name IS NULL,'匿名用户',t2.nick_name) AS nickName, t2.image_url + FROM com_fms_service t1 + LEFT JOIN sys_user t2 ON t1.user_id = t2.user_id + WHERE t1.community_id = #{adminDTO.communityId} + <if test="adminDTO.dealStatus != null and adminDTO.dealStatus == 1"> + AND t1.member_id = #{adminDTO.memberId} + </if> + <if test="adminDTO.dealStatus != null and adminDTO.dealStatus == 2"> + AND t1.service_status = 1 + </if> + <if test="adminDTO.dealStatus != null and adminDTO.dealStatus == 3"> + AND t1.service_status = 4 + </if> + ORDER BY t1.created_at DESC + </select> + +</mapper> + diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsServiceRecordMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsServiceRecordMapper.xml new file mode 100644 index 0000000..6f11610 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsServiceRecordMapper.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.panzhihua.service_community.dao.ComFmsServiceRecordDAO"> + + <resultMap type="com.panzhihua.service_community.entity.ComFmsServiceRecord" id="ComFmsServiceRecordMap"> + <result property="id" column="id" jdbcType="INTEGER"/> + <result property="serviceId" column="service_id" jdbcType="INTEGER"/> + <result property="stage" column="stage" jdbcType="VARCHAR"/> + <result property="content" column="content" jdbcType="VARCHAR"/> + <result property="image" column="image" jdbcType="VARCHAR"/> + <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> + <result property="createdBy" column="created_by" jdbcType="INTEGER"/> + </resultMap> + + <!-- 批量插入 --> + <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_service_record(service_id, stage, content, image, created_at, created_by) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.serviceId}, #{entity.stage}, #{entity.content}, #{entity.image}, #{entity.createdAt}, + #{entity.createdBy}) + </foreach> + </insert> + <!-- 批量插入或按主键更新 --> + <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_service_record(service_id, stage, content, image, created_at, created_by) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.serviceId}, #{entity.stage}, #{entity.content}, #{entity.image}, #{entity.createdAt}, + #{entity.createdBy}) + </foreach> + on duplicate key update + service_id = values(service_id) , stage = values(stage) , content = values(content) , image = values(image) , + created_at = values(created_at) , created_by = values(created_by) + </insert> + +</mapper> + diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamMapper.xml new file mode 100644 index 0000000..904b1e0 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamMapper.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.panzhihua.service_community.dao.ComFmsTeamDAO"> + + <resultMap type="com.panzhihua.service_community.entity.ComFmsTeam" id="ComFmsTeamMap"> + <result property="id" column="id" jdbcType="INTEGER"/> + <result property="name" column="name" jdbcType="VARCHAR"/> + <result property="phone" column="phone" jdbcType="VARCHAR"/> + <result property="teamType" column="team_type" jdbcType="INTEGER"/> + <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> + <result property="createdBy" column="created_by" jdbcType="INTEGER"/> + <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/> + <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/> + <result property="communityId" column="community_id" jdbcType="INTEGER"/> + <result property="image" column="image" jdbcType="VARCHAR"/> + </resultMap> + + <!-- 批量插入 --> + <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_team(name, phone, team_type, created_at, created_by, updated_at, updated_by, community_id) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.name}, #{entity.phone}, #{entity.teamType}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy}, #{entity.communityId}) + </foreach> + </insert> + <!-- 批量插入或按主键更新 --> + <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_team(name, phone, team_type, created_at, created_by, updated_at, updated_by, community_id) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.name}, #{entity.phone}, #{entity.teamType}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy}, #{entity.communityId}) + </foreach> + on duplicate key update + name = values(name) , phone = values(phone) , team_type = values(team_type) , created_at = values(created_at) , created_by = values(created_by) , updated_at = values(updated_at) , updated_by = values(updated_by) , community_id = values(community_id) </insert> + <select id="pageFmsTeamApplets" resultType="com.panzhihua.common.model.vos.community.fms.ComFmsTeamVO"> + SELECT id, `name`, phone, team_type, image + FROM com_fms_team + WHERE community_id = #{pageFmsTeamDTO.communityId} + <if test="pageFmsTeamDTO.teamType != null"> + AND team_type = #{pageFmsTeamDTO.teamType} + </if> + <if test="pageFmsTeamDTO.keyword != null and pageFmsTeamDTO.keyword != """> + AND `name` LIKE CONCAT('%',#{pageFmsTeamDTO.keyword},'%') + </if> + ORDER BY created_at DESC + </select> + <select id="listFmsTeamApplets" resultType="com.panzhihua.common.model.vos.community.fms.ComFmsTeamVO"> + SELECT id, `name`, phone, team_type, image + FROM com_fms_team + WHERE community_id = #{pageFmsTeamDTO.communityId} + <if test="pageFmsTeamDTO.teamType != null"> + AND team_type = #{pageFmsTeamDTO.teamType} + </if> + <if test="pageFmsTeamDTO.keyword != null and pageFmsTeamDTO.keyword != """> + AND `name` LIKE CONCAT('%',#{pageFmsTeamDTO.keyword},'%') + </if> + ORDER BY created_at DESC + </select> + +</mapper> + diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamMemberMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamMemberMapper.xml new file mode 100644 index 0000000..0e58a00 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamMemberMapper.xml @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.panzhihua.service_community.dao.ComFmsTeamMemberDAO"> + + <resultMap type="com.panzhihua.service_community.entity.ComFmsTeamMember" id="ComFmsTeamMemberMap"> + <result property="id" column="id" jdbcType="INTEGER"/> + <result property="name" column="name" jdbcType="VARCHAR"/> + <result property="phone" column="phone" jdbcType="VARCHAR"/> + <result property="idCard" column="id_card" jdbcType="VARCHAR"/> + <result property="communityId" column="community_id" jdbcType="INTEGER"/> + <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> + <result property="createdBy" column="created_by" jdbcType="INTEGER"/> + <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/> + <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/> + <result property="cascadeIds" column="cascade_ids" jdbcType="VARCHAR"/> + <result property="gender" column="gender" jdbcType="INTEGER"/> + </resultMap> + + <!-- 批量插入 --> + <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_team_member(name, phone, id_card, community_id, created_at, created_by, updated_at, updated_by, cascade_ids, gender) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.name}, #{entity.phone}, #{entity.idCard}, #{entity.communityId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy}, #{entity.cascadeIds}, #{entity.gender}) + </foreach> + </insert> + <!-- 批量插入或按主键更新 --> + <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_team_member(name, phone, id_card, community_id, created_at, created_by, updated_at, updated_by, cascade_ids, gender) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.name}, #{entity.phone}, #{entity.idCard}, #{entity.communityId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy}, #{entity.cascadeIds}, #{entity.gender}) + </foreach> + on duplicate key update + name = values(name) , phone = values(phone) , id_card = values(id_card) , community_id = values(community_id) , created_at = values(created_at) , created_by = values(created_by) , updated_at = values(updated_at) , updated_by = values(updated_by) , cascade_ids = values(cascade_ids) , gender = values(gender) </insert> + + <select id="pageFmsTeamMember" + resultType="com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberVO"> + SELECT t2.id, t2.`name`, t2.phone, t2.id_card, t2.gender, t2.cascade_ids, t3.team_type, t4.`name` AS teamTypeName, t3.`name` AS teamName + FROM com_fms_team_member_relation t1 + INNER JOIN com_fms_team_member t2 ON t1.member_id = t2.id + LEFT JOIN com_fms_team t3 ON t1.team_id = t3.id + LEFT JOIN com_fms_team_type t4 ON t3.team_type = t4.id + WHERE t2.community_id = #{pageTeamMemberDTO.communityId} + <if test="pageTeamMemberDTO.teamType != null"> + AND t3.team_type = #{pageTeamMemberDTO.teamType} + </if> + <if test="pageTeamMemberDTO.teamId != null"> + AND t1.team_id = #{pageTeamMemberDTO.teamId} + </if> + <if test="pageTeamMemberDTO.gender != null"> + AND t2.gender = #{pageTeamMemberDTO.gender} + </if> + <if test="pageTeamMemberDTO.keyword != null and pageTeamMemberDTO.keyword != """> + AND (t3.`name` LIKE CONCAT('%',#{pageTeamMemberDTO.keyword},'%') + OR t2.`name` LIKE CONCAT('%',#{pageTeamMemberDTO.keyword},'%') + OR t2.phone LIKE CONCAT('%',#{pageTeamMemberDTO.keyword},'%')) + </if> + ORDER BY t2.created_at DESC + </select> + <select id="countMember" resultType="java.lang.Integer"> + SELECT COUNT(id) FROM com_fms_team_member + WHERE community_id = #{communityId} AND (phone = #{phone} + <if test="idCard != null and idCard != """> + OR id_card = #{idCard} + </if> + ) + </select> + <select id="statisticsFmsTeamMember" + resultType="com.panzhihua.common.model.vos.community.fms.TeamMemberTopStatisticsVO"> + SELECT + (SELECT COUNT(id) FROM com_fms_team where community_id = #{communityId}) AS teamCount, + (SELECT COUNT(id) FROM com_fms_team_member where community_id = #{communityId}) AS memberCount + </select> + <select id="exportTeamMember" + resultType="com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberExportExcelVO"> + SELECT t4.`name` AS teamTypeName, t3.`name` AS teamName, t2.`name` AS teamMember, t2.id_card, t2.phone, + CASE + WHEN t2.gender = 1 THEN + '男' + WHEN t2.gender = 2 THEN + '女' + ELSE '未知' + END gender + FROM com_fms_team_member_relation t1 + INNER JOIN com_fms_team_member t2 ON t1.member_id = t2.id + LEFT JOIN com_fms_team t3 ON t1.team_id = t3.id + LEFT JOIN com_fms_team_type t4 ON t3.team_type = t4.id + WHERE t2.community_id = #{pageTeamMemberDTO.communityId} + <if test="pageTeamMemberDTO.teamType != null"> + AND t3.team_type = #{pageTeamMemberDTO.teamType} + </if> + <if test="pageTeamMemberDTO.teamId != null"> + AND t1.team_id = #{pageTeamMemberDTO.teamId} + </if> + <if test="pageTeamMemberDTO.gender != null"> + AND t2.gender = #{pageTeamMemberDTO.gender} + </if> + <if test="pageTeamMemberDTO.keyword != null and pageTeamMemberDTO.keyword != """> + AND (t3.`name` LIKE CONCAT('%',#{pageTeamMemberDTO.keyword},'%') + OR t2.`name` LIKE CONCAT('%',#{pageTeamMemberDTO.keyword},'%') + OR t2.phone LIKE CONCAT('%',#{pageTeamMemberDTO.keyword},'%')) + </if> + ORDER BY t2.created_at DESC + </select> + <select id="selectListByCommunityId" + resultType="com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberVO"> + SELECT t2.id, t1.team_id, t2.`name` + FROM com_fms_team_member_relation t1 + INNER JOIN com_fms_team_member t2 ON t1.member_id = t2.id + WHERE t2.community_id = #{communityId} + </select> + <select id="selectVOListByTeamId" + resultType="com.panzhihua.common.model.vos.community.fms.ComFmsTeamMemberVO"> + SELECT id, t2.`name`, t2.gender + FROM com_fms_team_member_relation t1 + INNER JOIN com_fms_team_member t2 ON t1.member_id = t2.id + WHERE t1.team_id = #{teamId} + </select> + +</mapper> + diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamMemberRelationMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamMemberRelationMapper.xml new file mode 100644 index 0000000..fcbcc78 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamMemberRelationMapper.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.panzhihua.service_community.dao.ComFmsTeamMemberRelationDAO"> + + <resultMap type="com.panzhihua.service_community.entity.ComFmsTeamMemberRelation" id="ComFmsTeamMemberRelationMap"> + <result property="teamId" column="team_id" jdbcType="INTEGER"/> + <result property="memberId" column="member_id" jdbcType="INTEGER"/> + </resultMap> + + <!-- 批量插入 --> + <insert id="insertBatch" keyProperty="teamId" useGeneratedKeys="true"> + insert into smart_life.com_fms_team_member_relation(team_id, member_id) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.teamId}, #{entity.memberId}) + </foreach> + </insert> + +</mapper> + diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamTypeMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamTypeMapper.xml new file mode 100644 index 0000000..87e3b94 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComFmsTeamTypeMapper.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.panzhihua.service_community.dao.ComFmsTeamTypeDAO"> + + <resultMap type="com.panzhihua.service_community.entity.ComFmsTeamType" id="ComFmsTeamTypeMap"> + <result property="id" column="id" jdbcType="INTEGER"/> + <result property="name" column="name" jdbcType="VARCHAR"/> + <result property="communityId" column="community_id" jdbcType="INTEGER"/> + <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> + <result property="createdBy" column="created_by" jdbcType="INTEGER"/> + <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/> + <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/> + </resultMap> + + <!-- 批量插入 --> + <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_team_type(name, community_id, created_at, created_by, updated_at, updated_by) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.name}, #{entity.communityId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, + #{entity.updatedBy}) + </foreach> + </insert> + <!-- 批量插入或按主键更新 --> + <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> + insert into smart_life.com_fms_team_type(name, community_id, created_at, created_by, updated_at, updated_by) + values + <foreach collection="entities" item="entity" separator=","> + (#{entity.name}, #{entity.communityId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, + #{entity.updatedBy}) + </foreach> + on duplicate key update + name = values(name) , community_id = values(community_id) , created_at = values(created_at) , created_by = + values(created_by) , updated_at = values(updated_at) , updated_by = values(updated_by) + </insert> + +</mapper> + diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/EventMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/EventMapper.xml new file mode 100644 index 0000000..26adc6b --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/EventMapper.xml @@ -0,0 +1,1509 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > + + +<mapper namespace="com.panzhihua.service_community.dao.EventMapper"> + + <resultMap id="baseResult" type="com.panzhihua.service_community.model.dos.EventDO"> + <result property="id" column="id"/> + <result property="orderSn" column="order_sn"/> + <result property="eventCategory" column="event_category"/> + <result property="gridMemberStreet" column="grid_member_street"/> + <result property="gridMemberCommunity" column="grid_member_community"/> + <result property="gridId" column="grid_id"/> + <result property="gridMemberId" column="grid_member_id"/> + <result property="gridMemberName" column="grid_member_name"/> + <result property="gridMemberTelephone" column="grid_member_telephone"/> + <result property="eventTitle" column="event_title"/> + <result property="propagandaType" column="propaganda_type"/> + <result property="propagandaTime" column="propaganda_time"/> + <result property="eventType" column="event_type"/> + <result property="eventDes" column="event_des"/> + <result property="propagandaObject" column="propaganda_object"/> + <result property="propagandaNum" column="propaganda_num"/> + <result property="communityProcess" column="community_process"/> + <result property="happenTime" column="happen_time"/> + <result property="happentAddress" column="happent_address"/> + <result property="happenAddress" column="happen_address"/> + <result property="happentLatLng" column="happent_lat_lng"/> + <result property="eventStatus" column="event_status"/> + <result property="eventProcessStatus" column="event_process_status"/> + <result property="processType" column="process_type"/> + <result property="processUserId" column="process_user_id"/> + <result property="processUserName" column="process_user_name"/> + <result property="processDate" column="process_date"/> + <result property="processDesc" column="process_desc"/> + <result property="eventResource" column="event_resource"/> + <result property="dangerLevel" column="danger_level"/> + <result property="redCard" column="red_card"/> + <result property="yellowCard" column="yellow_card"/> + <result property="invalid" column="invalid"/> + <result property="major" column="major"/> + <result property="deathsNumber" column="deaths_number"/> + <result property="injuriesNumber" column="injuries_number"/> + <result property="difficult" column="difficult"/> + <result property="urgent" column="urgent"/> + <result property="urgentDell" column="urgent_dell"/> + <result property="submitDate" column="submit_date"/> + <result property="createBy" column="create_by"/> + <result property="createAt" column="create_at"/> + <result property="updateBy" column="update_by"/> + <result property="updateAt" column="update_at"/> + <result property="eventClazz" column="event_clazz"/> + <result property="eventDealStatus" column="event_deal_status"/> + </resultMap> + + <sql id="columns"> + <![CDATA[ + id,order_sn,event_category,grid_member_street,happen_address,grid_member_community,event_clazz,grid_id,grid_member_id,grid_member_name,grid_member_telephone, + event_title,propaganda_type,propaganda_time,event_type,event_des,propaganda_object,propaganda_num,community_process,happen_time,happent_address,happent_lat_lng, + event_status,event_process_status,process_type,process_user_id,process_user_name,process_date,process_desc,event_resource,danger_level,red_card,yellow_card,invalid, + major,deaths_number,injuries_number,difficult,urgent,urgent_dell,submit_date,create_by,create_at,update_by,update_at,event_deal_status + ]]> + </sql> + + + <select id="findByPage" resultType="com.panzhihua.common.model.vos.grid.EventVO" + parameterType="com.panzhihua.common.model.dtos.grid.PageEventDTO"> + SELECT <include refid="columns" /> + FROM event + <where> + event_status != 3 AND event_category = 1 + <if test="pageEventDTO.eventDealStatus!=null"> + AND event_deal_status = #{pageEventDTO.eventDealStatus} + </if> + <if test="pageEventDTO.isAll!=null and pageEventDTO.isAll == 1"> + AND event_deal_status in (1,2,4) + </if> + <if test="pageEventDTO.revokeType!=null"> + AND ( revoke_type = #{pageEventDTO.revokeType} OR revoke_type is null ) + </if> + <if test="pageEventDTO.id!=null"> + AND id = #{pageEventDTO.id} + </if> + <if test="pageEventDTO.orderSn!=null"> + AND order_sn = #{pageEventDTO.orderSn} + </if> + <if test="pageEventDTO.eventCategory!=null"> + AND event_category = #{pageEventDTO.eventCategory} + </if> + <if test="pageEventDTO.gridMemberStreet!=null"> + AND grid_member_street = #{pageEventDTO.gridMemberStreet} + </if> + <if test="pageEventDTO.gridMemberCommunity!=null"> + AND grid_member_community = #{pageEventDTO.gridMemberCommunity} + </if> + <if test="pageEventDTO.gridId!=null"> + AND grid_id = #{pageEventDTO.gridId} + </if> + <if test="pageEventDTO.gridMemberId!=null"> + AND grid_member_id = #{pageEventDTO.gridMemberId} + </if> + <if test="pageEventDTO.gridMemberName!=null"> + AND grid_member_name = #{pageEventDTO.gridMemberName} + </if> + <if test="pageEventDTO.gridMemberTelephone!=null"> + AND grid_member_telephone = #{pageEventDTO.gridMemberTelephone} + </if> + <if test="pageEventDTO.eventTitle!=null"> + AND event_title = #{pageEventDTO.eventTitle} + </if> + <if test="pageEventDTO.propagandaType!=null"> + AND propaganda_type = #{pageEventDTO.propagandaType} + </if> + <if test="pageEventDTO.propagandaTimeBegin!=null"> + AND propaganda_time <![CDATA[>=]]> #{pageEventDTO.propagandaTimeBegin} + </if> + <if test="pageEventDTO.propagandaTimeEnd!=null"> + AND propaganda_time <![CDATA[<=]]> #{pageEventDTO.propagandaTimeEnd} + </if> + <if test="pageEventDTO.eventType!=null"> + AND event_type = #{pageEventDTO.eventType} + </if> + <if test="pageEventDTO.eventDes!=null"> + AND event_des = #{pageEventDTO.eventDes} + </if> + <if test="pageEventDTO.eventClazz!=null"> + AND event_clazz like concat(#{pageEventDTO.eventClazz},'%') + </if> + <if test="pageEventDTO.propagandaObject!=null"> + AND propaganda_object = #{pageEventDTO.propagandaObject} + </if> + <if test="pageEventDTO.propagandaNum!=null"> + AND propaganda_num = #{pageEventDTO.propagandaNum} + </if> + <if test="pageEventDTO.communityProcess!=null"> + AND community_process = #{pageEventDTO.communityProcess} + </if> + <if test="pageEventDTO.happenTimeBegin!=null"> + AND happen_time <![CDATA[>=]]> #{pageEventDTO.happenTimeBegin} + </if> + <if test="pageEventDTO.happenTimeEnd!=null"> + AND happen_time <![CDATA[<=]]> #{pageEventDTO.happenTimeEnd} + </if> + <if test="pageEventDTO.happentAddress!=null"> + AND happent_address = #{pageEventDTO.happentAddress} + </if> + <if test="pageEventDTO.happentLatLng!=null"> + AND happent_lat_lng = #{pageEventDTO.happentLatLng} + </if> + <if test="pageEventDTO.eventStatus!=null"> + AND event_status = #{pageEventDTO.eventStatus} + </if> + <if test="pageEventDTO.eventProcessStatus!=null"> + AND event_process_status = #{pageEventDTO.eventProcessStatus} + </if> + <if test="pageEventDTO.processType!=null"> + AND process_type = #{pageEventDTO.processType} + </if> + <if test="pageEventDTO.processUserId!=null"> + AND process_user_id = #{pageEventDTO.processUserId} + </if> + <if test="pageEventDTO.processUserName!=null"> + AND process_user_name = #{pageEventDTO.processUserName} + </if> + <if test="pageEventDTO.processDateBegin!=null"> + AND process_date <![CDATA[>=]]> #{pageEventDTO.processDateBegin} + </if> + <if test="pageEventDTO.processDateEnd!=null"> + AND process_date <![CDATA[<=]]> #{pageEventDTO.processDateEnd} + </if> + <if test="pageEventDTO.processDesc!=null"> + AND process_desc = #{pageEventDTO.processDesc} + </if> + <if test="pageEventDTO.eventResource!=null"> + AND event_resource = #{pageEventDTO.eventResource} + </if> + <if test="pageEventDTO.dangerLevel!=null"> + AND danger_level = #{pageEventDTO.dangerLevel} + </if> + <if test="pageEventDTO.redCard!=null"> + AND red_card = #{pageEventDTO.redCard} + </if> + <if test="pageEventDTO.yellowCard!=null"> + AND yellow_card = #{pageEventDTO.yellowCard} + </if> + <if test="pageEventDTO.invalid!=null"> + AND invalid = #{pageEventDTO.invalid} + </if> + <if test="pageEventDTO.major!=null"> + AND major = #{pageEventDTO.major} + </if> + <if test="pageEventDTO.deathsNumber!=null"> + AND deaths_number = #{pageEventDTO.deathsNumber} + </if> + <if test="pageEventDTO.injuriesNumber!=null"> + AND injuries_number = #{pageEventDTO.injuriesNumber} + </if> + <if test="pageEventDTO.difficult!=null"> + AND difficult = #{pageEventDTO.difficult} + </if> + <if test="pageEventDTO.urgent!=null"> + AND urgent = #{pageEventDTO.urgent} + </if> + <if test="pageEventDTO.urgentDell!=null"> + AND urgent_dell = #{pageEventDTO.urgentDell} + </if> + <if test="pageEventDTO.submitDateBegin!=null"> + AND submit_date <![CDATA[>=]]> #{pageEventDTO.submitDateBegin} + </if> + <if test="pageEventDTO.submitDateEnd!=null"> + AND submit_date <![CDATA[<=]]> #{pageEventDTO.submitDateEnd} + </if> + <if test="pageEventDTO.createBy!=null"> + AND create_by = #{pageEventDTO.createBy} + </if> + <if test="pageEventDTO.createAtBegin!=null"> + AND create_at <![CDATA[>=]]> #{pageEventDTO.createAtBegin} + </if> + <if test="pageEventDTO.createAtEnd!=null"> + AND create_at <![CDATA[<=]]> #{pageEventDTO.createAtEnd} + </if> + <if test="pageEventDTO.updateBy!=null"> + AND update_by = #{pageEventDTO.updateBy} + </if> + <if test="pageEventDTO.updateAtBegin!=null"> + AND update_at <![CDATA[>=]]> #{pageEventDTO.updateAtBegin} + </if> + <if test="pageEventDTO.updateAtEnd!=null"> + AND update_at <![CDATA[<=]]> #{pageEventDTO.updateAtEnd} + </if> + </where> + order by event_deal_status asc,create_at desc + </select> + <select id="findPublicityByPage" resultType="com.panzhihua.common.model.vos.grid.EventVO" + parameterType="com.panzhihua.common.model.dtos.grid.PagePublicityEventDTO"> + SELECT + e.id,e.order_sn,e.event_category,e.grid_member_street,e.happen_address,e.grid_member_community,e.event_clazz,e.grid_id,e.grid_member_id,e.grid_member_name,e.grid_member_telephone, + e.event_title,e.propaganda_type,e.propaganda_time,e.event_type,e.event_des,e.propaganda_object,e.propaganda_num,e.community_process,e.happen_time,e.happent_address,e.happent_lat_lng, + e.event_status,e.event_process_status,e.process_type,e.process_user_id,e.process_user_name,e.process_date,e.process_desc,e.event_resource,e.danger_level,e.red_card,e.yellow_card,e.invalid, + e.major,e.deaths_number,e.injuries_number,e.difficult,e.urgent,e.urgent_dell,e.submit_date,e.create_by,e.create_at,e.update_by,e.update_at,e.event_deal_status + FROM + event e left join event_grid_data egd on e.grid_id = egd.id + <where> + e.event_status != 3 AND e.event_category = 2 + <if test="pagePublicityEventDTO.communityId!=null"> + AND egd.grid_community_id = ${pagePublicityEventDTO.communityId} + </if> + + <if test="pagePublicityEventDTO.revokeType!=null"> + AND ( e.revoke_type = #{pagePublicityEventDTO.revokeType} OR e.revoke_type is null ) + </if> + <if test="pagePublicityEventDTO.eventDealStatus!=null"> + AND e.event_deal_status = #{pagePublicityEventDTO.eventDealStatus} + </if> + <if test="pagePublicityEventDTO.id!=null"> + AND e.id = #{pagePublicityEventDTO.id} + </if> + <if test="pagePublicityEventDTO.orderSn!=null"> + AND e.order_sn = #{pagePublicityEventDTO.orderSn} + </if> + <if test="pagePublicityEventDTO.eventCategory!=null"> + AND e.event_category = #{pagePublicityEventDTO.eventCategory} + </if> + <if test="pagePublicityEventDTO.gridMemberStreet!=null"> + AND e.grid_member_street = #{pagePublicityEventDTO.gridMemberStreet} + </if> + <if test="pagePublicityEventDTO.gridMemberCommunity!=null"> + AND e.grid_member_community = #{pagePublicityEventDTO.gridMemberCommunity} + </if> + <if test="pagePublicityEventDTO.gridId!=null"> + AND e.grid_id = #{pagePublicityEventDTO.gridId} + </if> + <if test="pagePublicityEventDTO.gridMemberId!=null"> + AND e.grid_member_id = #{pagePublicityEventDTO.gridMemberId} + </if> + <if test="pagePublicityEventDTO.gridMemberName!=null"> + AND e.grid_member_name = #{pagePublicityEventDTO.gridMemberName} + </if> + <if test="pagePublicityEventDTO.gridMemberTelephone!=null"> + AND e.grid_member_telephone = #{pagePublicityEventDTO.gridMemberTelephone} + </if> + <if test="pagePublicityEventDTO.eventTitle!=null"> + AND e.event_title = #{pagePublicityEventDTO.eventTitle} + </if> + <if test="pagePublicityEventDTO.propagandaType!=null"> + AND e.propaganda_type = #{pagePublicityEventDTO.propagandaType} + </if> + <if test="pagePublicityEventDTO.propagandaTimeBegin!=null"> + AND e.propaganda_time <![CDATA[>=]]> #{pagePublicityEventDTO.propagandaTimeBegin} + </if> + <if test="pagePublicityEventDTO.propagandaTimeEnd!=null"> + AND e.propaganda_time <![CDATA[<=]]> #{pagePublicityEventDTO.propagandaTimeEnd} + </if> + <if test="pagePublicityEventDTO.eventDes!=null"> + AND e.event_des = #{pagePublicityEventDTO.eventDes} + </if> + <if test="pagePublicityEventDTO.propagandaObject!=null"> + AND e.propaganda_object = #{pagePublicityEventDTO.propagandaObject} + </if> + <if test="pagePublicityEventDTO.propagandaNum!=null"> + AND e.propaganda_num = #{pagePublicityEventDTO.propagandaNum} + </if> + <if test="pagePublicityEventDTO.communityProcess!=null"> + AND e.community_process = #{pagePublicityEventDTO.communityProcess} + </if> + <if test="pagePublicityEventDTO.happenTimeBegin!=null"> + AND e.happen_time <![CDATA[>=]]> #{pagePublicityEventDTO.happenTimeBegin} + </if> + <if test="pagePublicityEventDTO.happenTimeEnd!=null"> + AND e.happen_time <![CDATA[<=]]> #{pagePublicityEventDTO.happenTimeEnd} + </if> + <if test="pagePublicityEventDTO.happentAddress!=null"> + AND e.happent_address = #{pagePublicityEventDTO.happentAddress} + </if> + <if test="pagePublicityEventDTO.happentLatLng!=null"> + AND e.happent_lat_lng = #{pagePublicityEventDTO.happentLatLng} + </if> + <if test="pagePublicityEventDTO.eventStatus!=null"> + AND e.event_status = #{pagePublicityEventDTO.eventStatus} + </if> + <if test="pagePublicityEventDTO.eventProcessStatus!=null"> + AND e.event_process_status = #{pagePublicityEventDTO.eventProcessStatus} + </if> + <if test="pagePublicityEventDTO.processType!=null"> + AND e.process_type = #{pagePublicityEventDTO.processType} + </if> + <if test="pagePublicityEventDTO.processUserId!=null"> + AND e.process_user_id = #{pagePublicityEventDTO.processUserId} + </if> + <if test="pagePublicityEventDTO.processUserName!=null"> + AND e.process_user_name = #{pagePublicityEventDTO.processUserName} + </if> + <if test="pagePublicityEventDTO.processDateBegin!=null"> + AND e.process_date <![CDATA[>=]]> #{pagePublicityEventDTO.processDateBegin} + </if> + <if test="pagePublicityEventDTO.processDateEnd!=null"> + AND e.process_date <![CDATA[<=]]> #{pagePublicityEventDTO.processDateEnd} + </if> + <if test="pagePublicityEventDTO.processDesc!=null"> + AND e.process_desc = #{pagePublicityEventDTO.processDesc} + </if> + <if test="pagePublicityEventDTO.eventResource!=null"> + AND e.event_resource = #{pagePublicityEventDTO.eventResource} + </if> + <if test="pagePublicityEventDTO.dangerLevel!=null"> + AND e.danger_level = #{pagePublicityEventDTO.dangerLevel} + </if> + <if test="pagePublicityEventDTO.redCard!=null"> + AND e.red_card = #{pagePublicityEventDTO.redCard} + </if> + <if test="pagePublicityEventDTO.yellowCard!=null"> + AND e.yellow_card = #{pagePublicityEventDTO.yellowCard} + </if> + <if test="pagePublicityEventDTO.invalid!=null"> + AND e.invalid = #{pagePublicityEventDTO.invalid} + </if> + <if test="pagePublicityEventDTO.major!=null"> + AND e.major = #{pagePublicityEventDTO.major} + </if> + <if test="pagePublicityEventDTO.deathsNumber!=null"> + AND e.deaths_number = #{pagePublicityEventDTO.deathsNumber} + </if> + <if test="pagePublicityEventDTO.injuriesNumber!=null"> + AND e.injuries_number = #{pagePublicityEventDTO.injuriesNumber} + </if> + <if test="pagePublicityEventDTO.difficult!=null"> + AND e.difficult = #{pagePublicityEventDTO.difficult} + </if> + <if test="pagePublicityEventDTO.urgent!=null"> + AND e.urgent = #{pagePublicityEventDTO.urgent} + </if> + <if test="pagePublicityEventDTO.urgentDell!=null"> + AND e.urgent_dell = #{pagePublicityEventDTO.urgentDell} + </if> + <if test="pagePublicityEventDTO.submitDateBegin!=null"> + AND e.submit_date <![CDATA[>=]]> #{pagePublicityEventDTO.submitDateBegin} + </if> + <if test="pagePublicityEventDTO.submitDateEnd!=null"> + AND e.submit_date <![CDATA[<=]]> #{pagePublicityEventDTO.submitDateEnd} + </if> + <if test="pagePublicityEventDTO.createBy!=null"> + AND e.create_by = #{pagePublicityEventDTO.createBy} + </if> + <if test="pagePublicityEventDTO.createAtBegin!=null"> + AND e.create_at <![CDATA[>=]]> #{pagePublicityEventDTO.createAtBegin} + </if> + <if test="pagePublicityEventDTO.createAtEnd!=null"> + AND e.create_at <![CDATA[<=]]> #{pagePublicityEventDTO.createAtEnd} + </if> + <if test="pagePublicityEventDTO.updateBy!=null"> + AND e.update_by = #{pagePublicityEventDTO.updateBy} + </if> + <if test="pagePublicityEventDTO.updateAtBegin!=null"> + AND e.update_at <![CDATA[>=]]> #{pagePublicityEventDTO.updateAtBegin} + </if> + <if test="pagePublicityEventDTO.updateAtEnd!=null"> + AND e.update_at <![CDATA[<=]]> #{pagePublicityEventDTO.updateAtEnd} + </if> + </where> + <if test="pagePublicityEventDTO.sortColumns!=null"> + ORDER BY e.${pagePublicityEventDTO.sortColumns} ${pagePublicityEventDTO.sortType} + </if> + </select> + + <select id="getEventByGridId" resultType="com.panzhihua.common.model.vos.grid.ComMapGridEventVO"> + SELECT + id, + event_type AS type, + event_des AS eventTitle, + happent_address AS happentAddress, + happen_address AS happenAddress, + happent_lat_lng AS happentLatLng + FROM + `event` + WHERE + ( event_category = 1 OR event_category = 2 ) + AND event_process_status = 1 + AND event_status = 2 + AND grid_id = #{gridId} + AND process_type = 1 UNION ALL + SELECT + id, + IFNULL( NULL, 7 ) AS type, + event_des AS eventTitle, + happent_address AS happentAddress, + happen_address AS happenAddress, + happent_lat_lng AS happentLatLng + FROM + event_visiting_tasks + WHERE + event_status = 1 + AND dell_type = 1 + AND grid_id = #{gridId} + </select> + + <select id="getGridMemberImageUrl" resultType="Map"> + select image_url,nick_name from sys_user where user_id = #{gridMemberId} + </select> + <select id="findToManageByPage" resultType="com.panzhihua.common.model.vos.grid.EventVO" + parameterType="com.panzhihua.common.model.dtos.grid.PageEventManageDTO"> + SELECT + e.id,e.order_sn,e.event_category,e.grid_member_street,e.happen_address,e.grid_member_community,e.event_clazz,e.grid_id,e.grid_member_id,e.grid_member_name,e.grid_member_telephone, + e.event_title,e.propaganda_type,e.propaganda_time,e.event_type,e.event_des,e.propaganda_object,e.propaganda_num,e.community_process,e.happen_time,e.happent_address,e.happent_lat_lng, + e.event_status,e.event_process_status,e.process_type,e.process_user_id,e.process_user_name,e.process_date,e.process_desc,e.event_resource,e.danger_level,e.red_card,e.yellow_card,e.invalid, + e.major,e.deaths_number,e.injuries_number,e.difficult,e.urgent,e.urgent_dell,e.submit_date,e.create_by,e.create_at,e.update_by,e.update_at,e.event_deal_status,egd.grid_name + FROM + event e left join event_grid_data egd on e.grid_id = egd.id + <where> + e.event_status != 3 AND e.event_category = 1 + <if test="pageEventManageDTO.communityId!=null"> + AND egd.grid_community_id = ${pageEventManageDTO.communityId} + </if> + <if test='pageEventManageDTO.keyWord != null and pageEventManageDTO.keyWord != ""'> + AND ( + e.grid_member_name like concat('%', #{pageEventManageDTO.keyWord},'%') OR + e.event_title like concat('%', #{pageEventManageDTO.keyWord},'%') OR + e.happen_address like concat('%', #{pageEventManageDTO.keyWord},'%') OR + e.order_sn like concat('%', #{pageEventManageDTO.keyWord},'%') OR + e.event_clazz like concat('%', #{pageEventManageDTO.keyWord},'%') OR + e.event_des like concat('%', #{pageEventManageDTO.keyWord},'%') + ) + </if> + <if test="pageEventManageDTO.revokeType!=null"> + AND ( e.revoke_type = #{pageEventManageDTO.revokeType} OR e.revoke_type is null ) + </if> + <if test="pageEventManageDTO.eventDealStatus!=null"> + AND e.event_deal_status = #{pageEventManageDTO.eventDealStatus} + </if> + <if test="pageEventManageDTO.communityProcess!=null"> + AND e.community_process = #{pageEventManageDTO.communityProcess} + </if> + <if test="pageEventManageDTO.eventType!=null"> + AND e.event_type = #{pageEventManageDTO.eventType} + </if> + <if test="pageEventManageDTO.dangerLevel!=null"> + AND e.danger_level = #{pageEventManageDTO.dangerLevel} + </if> + <if test="pageEventManageDTO.redCard!=null"> + AND e.red_card = #{pageEventManageDTO.redCard} + </if> + <if test="pageEventManageDTO.yellowCard!=null"> + AND e.yellow_card = #{pageEventManageDTO.yellowCard} + </if> + <if test="pageEventManageDTO.eventClazz != null and pageEventManageDTO.eventClazz != """> + AND e.event_clazz like concat('%',#{pageEventDTO.eventClazz},'%') + </if> + <if test="pageEventManageDTO.urgent!=null"> + AND e.urgent = #{pageEventManageDTO.urgent} + </if> + <if test="pageEventManageDTO.major!=null"> + AND e.major = #{pageEventManageDTO.major} + </if> + <if test="pageEventManageDTO.invalid!=null"> + AND e.invalid = #{pageEventManageDTO.invalid} + </if> + </where> + <if test="pageEventManageDTO.sortColumns!=null"> + ORDER BY e.${pageEventManageDTO.sortColumns} ${pageEventManageDTO.sortType} + </if> + </select> + + <select id="findCommunityPublicityByPage" resultType="com.panzhihua.common.model.vos.grid.EventVO" + parameterType="com.panzhihua.common.model.dtos.grid.PagePublicityEventCommunityDTO"> + SELECT + e.id,e.order_sn,e.event_category,e.grid_member_street,e.happen_address,e.grid_member_community,e.event_clazz,e.grid_id,e.grid_member_id,e.grid_member_name,e.grid_member_telephone, + e.event_title,e.propaganda_type,e.propaganda_time,e.event_type,e.event_des,e.propaganda_object,e.propaganda_num,e.community_process,e.happen_time,e.happent_address,e.happent_lat_lng, + e.event_status,e.event_process_status,e.process_type,e.process_user_id,e.process_user_name,e.process_date,e.process_desc,e.event_resource,e.danger_level,e.red_card,e.yellow_card,e.invalid, + e.major,e.deaths_number,e.injuries_number,e.difficult,e.urgent,e.urgent_dell,e.submit_date,e.create_by,e.create_at,e.update_by,e.update_at,e.event_deal_status, egd.grid_name + FROM + event e left join event_grid_data egd on e.grid_id = egd.id + <where> + e.event_status != 3 AND e.event_category = 2 + <if test='pagePublicityEventCommunityDTO.keyWord != null and pagePublicityEventCommunityDTO.keyWord != ""'> + AND ( + e.grid_member_name like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR + e.event_title like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR + e.happen_address like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR + e.order_sn like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR + e.propaganda_type like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR + egd.grid_name like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') + ) + </if> + <if test="pagePublicityEventCommunityDTO.revokeType!=null"> + AND ( e.revoke_type = #{pagePublicityEventCommunityDTO.revokeType} OR e.revoke_type is null ) + </if> + <if test="pagePublicityEventCommunityDTO.communityId!=null"> + AND egd.grid_community_id = ${pagePublicityEventCommunityDTO.communityId} + </if> + <if test="pagePublicityEventCommunityDTO.eventDealStatus!=null"> + AND e.event_deal_status = #{pagePublicityEventCommunityDTO.eventDealStatus} + </if> + </where> + <if test="pagePublicityEventCommunityDTO.sortColumns!=null"> + ORDER BY e.${pagePublicityEventCommunityDTO.sortColumns} ${pagePublicityEventCommunityDTO.sortType} + </if> + </select> + <select id="eventStatistics" resultType="com.panzhihua.common.model.vos.grid.EventStatisticsAllAdminVO"> + SELECT + count( e.id ) AS eventTotal,( + SELECT + count( e.id ) + FROM + `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE + e.event_status = 2 + AND e.event_process_status = 2 + ) AS handleEventTotal, + ( + SELECT + count( e.id ) + FROM + `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE + e.event_category = 2 + AND e.event_status = 2 + ) AS propagandaEducationTotal, + ( SELECT count( id ) FROM com_act_easy_photo WHERE handle_status = 2 ) AS easyPhotoTotal + FROM + `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE + e.event_status = 2 + </select> + + <select id="getEventCountByGridIds" resultType="Integer"> + select count(id) from event where grid_id in + <foreach item="item" collection="ids" separator="," open="(" close=")" index=""> + #{item} + </foreach> + </select> + + <select id="getGridEventStatisticsByApp" resultType="com.panzhihua.common.model.vos.grid.GridEventStatisticsVO"> + SELECT + count( id ) AS todayNum, + ( + SELECT + count( id ) + FROM + `event` + WHERE + event_category = 1 + AND event_process_status = 2 + AND process_date BETWEEN DATE_FORMAT( DATE_ADD( curdate(), INTERVAL - DAY ( curdate())+ 1 DAY ), '%Y-%m-%d %H:%i:%s' ) + AND NOW() + <if test="gridId!=null"> + AND grid_id = #{gridId} + </if> + ) AS monthNum, + ( + SELECT + count( id ) + FROM + `event` + WHERE + event_category = 2 + AND event_status = 2 + AND process_date BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' ) + AND NOW() + <if test="gridId!=null"> + AND grid_id = #{gridId} + </if> + ) AS todayEducationNum, + ( SELECT count( id ) FROM `event` WHERE event_category = 2 AND event_status = 2 + <if test="gridId!=null"> + AND grid_id = #{gridId} + </if>) AS educationNum, + ( + SELECT + count( cmph.id ) + FROM + com_mng_population_house AS cmph + LEFT JOIN event_grid_data AS egd ON egd.grid_community_id = cmph.community_id + WHERE + <if test="gridId!=null"> + egd.id = #{gridId} + </if> + ) AS houseTotal, + ( + SELECT + count( id ) + FROM + event_visiting_tasks + WHERE + event_status = 2 AND submit_date BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' ) + AND DATE_SUB( DATE_ADD(CURDATE(), INTERVAL 1 DAY),INTERVAL 1 SECOND) + <if test="gridId!=null"> + AND grid_id = #{gridId} + </if> + ) as zfTodayNum, + ( + SELECT + count( id ) + FROM + event_visiting_tasks + WHERE + event_status = 2 AND submit_date BETWEEN DATE_FORMAT( DATE_ADD( curdate(), INTERVAL - DAY ( curdate())+ 1 DAY ), '%Y-%m-%d %H:%i:%s' ) + AND NOW() + <if test="gridId!=null"> + AND grid_id = #{gridId} + </if> + ) as zfMonthNum,( + SELECT + count( caep.id ) + FROM + com_act_easy_photo as caep + left join event_grid_data as egd on egd.grid_community_id = caep.community_id + WHERE + handle_status = 2 + AND feedback_at BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' ) + AND DATE_SUB(DATE_ADD( CURDATE(), INTERVAL 1 DAY ),INTERVAL 1 SECOND) + <if test="gridId!=null"> + AND egd.id = #{gridId} + </if> + ) as sspTodayNum, + ( + SELECT + count( caep.id ) + FROM + com_act_easy_photo as caep + left join event_grid_data as egd on egd.grid_community_id = caep.community_id + WHERE + handle_status = 2 + AND feedback_at BETWEEN DATE_FORMAT( DATE_ADD( curdate(), INTERVAL - DAY ( curdate())+ 1 DAY ), '%Y-%m-%d %H:%i:%s' ) AND NOW() + <if test="gridId!=null"> + AND egd.id = #{gridId} + </if> + ) as sspMonthNum + FROM + `event` + WHERE + event_category = 1 + AND event_process_status = 2 + AND process_date BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' ) + AND NOW() + <if test="gridId!=null"> + AND grid_id = #{gridId} + </if> + </select> + + <select id="getGridEventDetailStatisticsByApp" parameterType="com.panzhihua.common.model.dtos.grid.GridEventStatisticsDTO" + resultType="com.panzhihua.common.model.vos.grid.GridEventStatisticsDetailVO"> + SELECT + count( e.id ) AS eventTFTotal, + ( + SELECT + count( id ) + FROM + `event` + WHERE + event_category = 1 + AND event_type = 5 + AND event_process_status IN ( 1, 3 ) + AND event_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS noEventTFTotal, + ( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 3 AND event_process_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS eventMDTotal, + ( + SELECT + count( id ) + FROM + `event` + WHERE + event_category = 1 + AND event_type = 3 + AND event_process_status IN ( 1, 3 ) + AND event_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS noEventMDTotal, + ( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 1 AND event_process_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS eventZATotal, + ( + SELECT + count( id ) + FROM + `event` + WHERE + event_category = 1 + AND event_type = 1 + AND event_process_status IN ( 1, 3 ) + AND event_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS noEventZATotal, + ( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 4 AND event_process_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS eventBWDTotal, + ( + SELECT + count( id ) + FROM + `event` + WHERE + event_category = 1 + AND event_type = 4 + AND event_process_status IN ( 1, 3 ) + AND event_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS noEventBWDTotal, + ( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 6 AND event_process_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS eventTSTotal, + ( + SELECT + count( id ) + FROM + `event` + WHERE + event_category = 1 + AND event_type = 6 + AND event_process_status IN ( 1, 3 ) + AND event_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS noEventTSTotal, + ( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 2 AND event_process_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS eventGGTotal, + ( + SELECT + count( id ) + FROM + `event` + WHERE + event_category = 1 + AND event_type = 2 + AND event_process_status IN ( 1, 3 ) + AND event_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS noEventGGTotal, + ( SELECT count( id ) FROM `event` WHERE event_category = 2 AND event_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS eventXCTotal, + ( SELECT count( id ) FROM event_visiting_tasks WHERE event_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND submit_date <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND submit_date <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS eventZFTotal, + ( + SELECT + count( id ) + FROM + event_visiting_tasks + WHERE + event_status IN ( 1, 3 ) + <if test="statisticsDTO.gridId!=null"> + AND grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS noEventZFTotal, + ( SELECT count( id ) FROM com_act_easy_photo WHERE handle_status = 2 AND community_id = egd.grid_community_id + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS eventSSPTotal, + ( SELECT count( id ) FROM com_act_easy_photo WHERE handle_status = 1 AND community_id = egd.grid_community_id + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + ) AS noEventSSPTotal + FROM + `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE + e.event_category = 1 + AND e.event_type = 5 + AND e.event_process_status = 2 + <if test="statisticsDTO.gridId!=null"> + AND e.grid_id = #{statisticsDTO.gridId} + </if> + <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> + AND e.create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} + </if> + <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> + AND e.create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} + </if> + </select> + + <select id="getUserBaseInfo" parameterType="java.lang.Long" resultType="java.util.Map"> + select nick_name,image_url from sys_user where user_id = #{gridMemberId} + </select> + + <select id="getScreenEventList" parameterType="com.panzhihua.common.model.dtos.community.bigscreen.event.ScreenEventListDTO" + resultType="com.panzhihua.common.model.vos.community.screen.event.EventListVO"> + SELECT + e.id, + e.grid_member_id, + su.image_url, + su.nick_name AS userName, + e.happen_time as createAt, + e.urgent, + e.danger_level, + e.major, + e.process_desc, + e.event_des, + e.event_category, + e.event_type, + e.event_clazz, + e.happen_address, + e.happent_lat_lng, + e.happent_address, + e.event_deal_status, + egd.grid_name + FROM + `event` AS e + LEFT JOIN sys_user AS su ON su.user_id = e.grid_member_id + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + <where> + and event_status = 2 + <if test='eventListDTO.communityId != null'> + and egd.grid_community_id = ${eventListDTO.communityId} + </if> + + <if test='eventListDTO.startTime != null and eventListDTO.startTime != ""'> + and e.create_at <![CDATA[>=]]> #{eventListDTO.startTime} + </if> + + <if test='eventListDTO.endTime != null and eventListDTO.endTime != ""'> + and e.create_at <![CDATA[<=]]> #{eventListDTO.endTime} + </if> + + <if test='eventListDTO.gridIds != null and eventListDTO.gridIds.size > 0'> + and e.grid_id in + <foreach collection='eventListDTO.gridIds' item='id' index='index' open='(' close=')' separator=',' > + #{id} + </foreach> + </if> + + <if test='eventListDTO.eventCategory != null'> + and e.event_category = #{eventListDTO.eventCategory} + </if> + + <if test='eventListDTO.eventTypes != null and eventListDTO.eventTypes.size > 0'> + and e.event_type in + <foreach collection='eventListDTO.eventTypes' item='id' index='index' open='(' close=')' separator=',' > + #{id} + </foreach> + </if> + + <if test='eventListDTO.eventDealStatus != null'> + and e.event_deal_status = #{eventListDTO.eventDealStatus} + </if> + + <if test='eventListDTO.urgent != null and eventListDTO.urgent != ""'> + and e.urgent = #{eventListDTO.urgent} + </if> + + <if test='eventListDTO.major != null and eventListDTO.major != ""'> + and e.major = #{eventListDTO.major} + </if> + </where> + order by e.create_at desc + </select> + + <select id="specialPopulationList" resultType="com.panzhihua.common.model.vos.grid.EventSpecialPopulationVO" + parameterType="com.panzhihua.common.model.dtos.grid.PageEventSpecialPopulationDTO"> + SELECT + cmp.id, + cmp.`name`, + cmp.card_no as idCard, + cmpct.label, + cmp.sex, + cmp.phone, + cmp.address, + cmp.political_outlook + FROM + com_mng_population AS cmp + left join com_mng_population_community_tags AS cmpct on cmp.id = cmpct.population_id + <where> + and cmpct.label IS NOT NULL + <if test='specialPopulationDTO.communityId != null'> + and cmpct.community_id = ${specialPopulationDTO.communityId} + </if> + <if test="specialPopulationDTO.keyWord!=null and specialPopulationDTO.keyWord!= """> + AND (cmp.name like concat(#{specialPopulationDTO.keyWord},'%') or cmp.card_no_str like concat(#{specialPopulationDTO.keyWord},'%')) + </if> + </where> + ORDER BY + cmp.create_at DESC + </select> + + <select id="countByCommunityId" resultType="Map"> + SELECT + count( e.id ) AS resolvedNum, + ( + SELECT + count( e1.id ) + FROM + `event` AS e1 + LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id + WHERE + egd1.grid_community_id = ${communityId} + AND e1.event_category = 1 + AND e1.event_process_status = 1 + AND e1.event_status = 2 + AND e1.event_deal_status = 1 + ) AS pendingNum, + ( + SELECT + count( e2.id ) + FROM + `event` AS e2 + LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id + WHERE + egd2.grid_community_id = ${communityId} + AND e2.event_category = 2 + AND e2.event_status = 2 + ) AS propagandaNum, + ( + SELECT + count( e3.id ) + FROM + `event` AS e3 + LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id + WHERE + e3.event_status = 2 + AND e3.create_at LIKE CONCAT(#{nowDate},'%')) as currentNum, + (select count(id) from com_act_easy_photo where community_id = ${communityId} and del_tag = 0 and create_at LIKE CONCAT(#{nowDate},'%')) as sspCurrentNum + + FROM + `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE + egd.grid_community_id = ${communityId} + AND e.event_category = 1 + AND e.event_process_status = 2 + AND e.event_deal_status = 4 + </select> + + <select id="countByAvgCommunityId" resultType="com.panzhihua.common.model.vos.screen.DateScreenVO"> + SELECT + e.create_at AS startTime,( + SELECT + e1.create_at + FROM + `event` AS e1 + LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id + WHERE + egd1.grid_community_id = ${communityId} + AND e1.event_process_status = 2 + ORDER BY + e1.create_at DESC + LIMIT 1 + ) AS endTime + FROM + `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE + egd.grid_community_id = ${communityId} + AND e.event_process_status = 2 + ORDER BY + e.create_at ASC + LIMIT 1 + </select> + + <select id="getWorkScreenEventList" resultType="com.panzhihua.common.model.vos.screen.EventDetailWorkVO"> + SELECT + e.id, + su.nick_name AS userName, + su.image_url, + e.create_at, + e.event_type, + e.event_process_status, + e.event_deal_status, + e.major, + e.red_card, + e.yellow_card, + e.urgent, + e.danger_level, + e.event_des, + e.happen_address, + e.happent_address, + e.happent_lat_lng + FROM + `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + LEFT JOIN sys_user AS su ON su.user_id = e.grid_member_id + WHERE + egd.grid_community_id = ${communityId} + AND e.event_status = 2 + AND e.event_deal_status in (1,2,3,4,6,8) + ORDER BY + e.create_at DESC + LIMIT 10 + </select> + + <select id="countByTime" resultType="com.panzhihua.common.model.vos.screen.EventWorkVO"> + SELECT + ( + SELECT + COUNT( e.id ) + FROM + `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE + egd.grid_community_id = ${communityId} and e.event_status = 2 AND e.create_at <![CDATA[<=]]> #{end}) AS eventTotal, + (select count(id) from com_act_easy_photo where community_id = ${communityId} and del_tag = 0 and create_at <![CDATA[<=]]> #{end}) as sspTotal, + (select count(id) from com_act_easy_photo where community_id = ${communityId} and del_tag = 0 and #{start} <![CDATA[<=]]> create_at AND create_at <![CDATA[<=]]> #{end}) as sspAdd, + (select count(id) from com_act_easy_photo where community_id = ${communityId} and handle_status = 2 and del_tag = 0 and #{start} <![CDATA[<=]]> create_at AND create_at <![CDATA[<=]]> #{end}) as sspSolve, + ( + SELECT + COUNT( e1.id ) + FROM + `event` AS e1 + LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id + WHERE + egd1.grid_community_id = ${communityId} and e1.event_status = 2 AND #{start} <![CDATA[<=]]> e1.create_at AND e1.create_at <![CDATA[<=]]> #{end}) AS eventAdd, + ( + SELECT + COUNT( e2.id ) + FROM + `event` AS e2 + LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id + WHERE + egd2.grid_community_id = ${communityId} and e2.event_process_status = 2 AND #{start} <![CDATA[<=]]> e2.create_at AND e2.create_at <![CDATA[<=]]> #{end}) AS eventSolve + FROM + DUAL + </select> + + <select id="getComplete" resultType="com.panzhihua.common.model.vos.screen.EventTypeWorkVO"> + SELECT + count( e.id ) AS zaTotal,( + SELECT + count( e1.id ) + FROM + `event` AS e1 + LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id + WHERE + e1.event_category = 1 + AND e1.event_process_status = 2 + AND e1.event_type = 2 + AND egd1.grid_community_id = ${communityId} + ) AS ggTotal,( + SELECT + count( e2.id ) + FROM + `event` AS e2 + LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id + WHERE + e2.event_category = 1 + AND e2.event_process_status = 2 + AND e2.event_type = 3 + AND egd2.grid_community_id = ${communityId} + ) AS mdTotal,( + SELECT + count( e3.id ) + FROM + `event` AS e3 + LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id + WHERE + e3.event_category = 1 + AND e3.event_process_status = 2 + AND e3.event_type = 4 + AND egd3.grid_community_id = ${communityId} + ) AS bwdTotal,( + SELECT + count( e4.id ) + FROM + `event` AS e4 + LEFT JOIN event_grid_data AS egd4 ON egd4.id = e4.grid_id + WHERE + e4.event_category = 1 + AND e4.event_process_status = 2 + AND e4.event_type = 5 + AND egd4.grid_community_id = ${communityId} + ) AS tfTotal,( + SELECT + count( e5.id ) + FROM + `event` AS e5 + LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id + WHERE + e5.event_category = 1 + AND e5.event_process_status = 2 + AND e5.event_type = 6 + AND egd5.grid_community_id = ${communityId} + ) AS tsTotal, + (select count(id) from com_act_easy_photo as caep where community_id = ${communityId} and del_tag = 0 and status = 4) as sspTotal + FROM + `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE + e.event_category = 1 + AND e.event_process_status = 2 + AND e.event_type = 1 + AND egd.grid_community_id = ${communityId} + </select> + + <select id="getNoComplete" resultType="com.panzhihua.common.model.vos.screen.EventTypeWorkVO"> + SELECT + count( e.id ) AS zaTotal,( + SELECT + count( e1.id ) + FROM + `event` AS e1 + LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id + WHERE + e1.event_category = 1 + AND e1.event_process_status = 1 + AND e1.event_status = 2 + AND e1.event_type = 2 + AND egd1.grid_community_id = ${communityId} + ) AS ggTotal,( + SELECT + count( e2.id ) + FROM + `event` AS e2 + LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id + WHERE + e2.event_category = 1 + AND e2.event_process_status = 1 + AND e2.event_status = 2 + AND e2.event_type = 3 + AND egd2.grid_community_id = ${communityId} + ) AS mdTotal,( + SELECT + count( e3.id ) + FROM + `event` AS e3 + LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id + WHERE + e3.event_category = 1 + AND e3.event_process_status = 1 + AND e3.event_status = 2 + AND e3.event_type = 4 + AND egd3.grid_community_id = ${communityId} + ) AS bwdTotal,( + SELECT + count( e4.id ) + FROM + `event` AS e4 + LEFT JOIN event_grid_data AS egd4 ON egd4.id = e4.grid_id + WHERE + e4.event_category = 1 + AND e4.event_process_status = 1 + AND e4.event_status = 2 + AND e4.event_type = 5 + AND egd4.grid_community_id = ${communityId} + ) AS tfTotal,( + SELECT + count( e5.id ) + FROM + `event` AS e5 + LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id + WHERE + e5.event_category = 1 + AND e5.event_process_status = 1 + AND e5.event_status = 2 + AND e5.event_type = 6 + AND egd5.grid_community_id = ${communityId} + ) AS tsTotal, + (select count(id) from com_act_easy_photo as caep where community_id = ${communityId} and del_tag = 0 and status in (1,2)) as sspTotal + FROM + `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE + e.event_category = 1 + AND e.event_process_status = 1 + AND e.event_status = 2 + AND e.event_type = 1 + AND egd.grid_community_id = ${communityId} + </select> + + <select id="getSSPEventTotal" resultType="Map"> + SELECT + count( id ) as noEventSSPTotal, + ( SELECT count( id ) FROM com_act_easy_photo WHERE handle_status = 2 and del_tag = 0 AND community_id = ${communityId} ) AS eventSSPTotal + FROM + com_act_easy_photo + WHERE + handle_status = 1 and del_tag = 0 + AND community_id = ${communityId} + </select> + + <select id="getEventListByCommunityId" parameterType="Long" + resultType="com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO"> + SELECT + e.id, + e.event_type AS type, + e.happent_lat_lng AS latLng, + e.event_deal_status as status + FROM + `event` AS e + left join event_grid_data as egd on egd.id = e.grid_id + WHERE + e.event_category = 1 + AND e.event_status = 2 + AND egd.grid_community_id = ${communityId} + AND e.event_deal_status IN (1,2,3,4) + union all + select id,7 as type,lng_lat as latLng,handle_status as status from com_act_easy_photo as caep where community_id = ${communityId} and lng_lat is not null + </select> + + <select id="getCivilScreenVillageList" parameterType="Long" resultType="com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO"> + SELECT `NAME`, user_sum, lng, lat, village_images, village_id FROM com_mng_village AS cmv WHERE community_id = ${communityId} + </select> + + <select id="getVillagePopulationTotal" parameterType="Long" resultType="com.panzhihua.common.model.vos.screen.ScreenDrawEventPopulationTotalVO"> + SELECT + count( id ) as populationTotal, + (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 1) as localTotal, + (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 2) as outTotal, + (select count(cmp.id) from com_mng_population_community_tags as cmpct left join com_mng_population as cmp on cmpct.population_id = cmp.id where cmp.village_id = #{villageId} and cmpct.label is not null) as specialTotal, + (select count(id) from com_mng_building where village_id = #{villageId}) as buildTotal + FROM + com_mng_population AS cmp + WHERE + village_id = #{villageId} + </select> + + <select id="getMemberBuildName" resultType="Map"> + SELECT + cmb.`name`,egmbr.village_id + FROM + event_grid_member_building_relation AS egmbr + LEFT JOIN com_mng_building AS cmb ON cmb.id = egmbr.building_id + WHERE + egmbr.grid_member_id = #{userId} + </select> + + <select id="getPopulationByLabelCount" resultType="Integer"> + select count(cmpct.id) from com_mng_population_community_tags AS cmpct + left join com_mng_population AS cmp on cmp.id = cmpct.population_id + where cmtct.label is not null and cmp.village_id = #{villageId} and floor = #{floor} + </select> + <select id="selectComprehensiveGovernanceStatics" + resultType="com.panzhihua.common.model.vos.community.screen.event.EventComprehensiveGovernanceStatisticsVO"> + SELECT + (SELECT COUNT( e.id ) FROM `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + LEFT JOIN com_act AS a ON egd.grid_community_id = a.community_id + WHERE e.event_category = 1 AND e.event_type = 5 AND e.event_deal_status = 4 AND a.area_code = 510423) AS eventTFTotal, + + (SELECT COUNT( e1.id ) FROM `event` AS e1 + LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id + LEFT JOIN com_act AS a1 ON egd1.grid_community_id = a1.community_id + WHERE event_category = 1 AND event_type = 1 AND e1.event_deal_status = 4 AND a1.area_code = 510423) AS eventZATotal, + + (SELECT COUNT( e2.id ) FROM `event` AS e2 + LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id + LEFT JOIN com_act AS a2 ON egd2.grid_community_id = a2.community_id + WHERE event_category = 1 AND event_type = 3 AND e2.event_deal_status = 4 AND a2.area_code = 510423) AS eventMDTotal, + + (SELECT COUNT( e3.id ) FROM `event` AS e3 + LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id + LEFT JOIN com_act AS a3 ON egd3.grid_community_id = a3.community_id + WHERE event_category = 1 AND event_type = 6 AND e3.event_deal_status = 4 AND a3.area_code = 510423) AS eventTSTotal, + + (SELECT COUNT( e5.id ) FROM `event` AS e5 + LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id + LEFT JOIN com_act AS a5 ON egd5.grid_community_id = a5.community_id + WHERE event_category = 1 AND event_type = 2 AND e5.event_deal_status = 4 AND a5.area_code = 510423) AS eventMSTotal, + + (SELECT COUNT(p.id) FROM com_act_easy_photo p + LEFT JOIN com_act AS a ON p.community_id = a.community_id + WHERE p.`status` = 4 AND p.del_tag = 0 AND a.area_code = 510423) AS eventSSPTotal + </select> + <select id="getGridsGovernanceEventList" + resultType="com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO"> + SELECT event_type AS type, IFNULL( NULL, 1 ) AS eventType, e.id AS eventId, happent_lat_lng AS latLng, event_des AS content, + (SELECT url FROM event_resource WHERE ref_id = e.id AND classification = 1 AND `type` = 1 LIMIT 1) AS cover, e.create_at, + CASE + WHEN event_deal_status = 4 THEN 1 + ELSE 2 END `status` + FROM `event` AS e + LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id + WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = ${communityId} + UNION ALL SELECT + CASE + WHEN classify_id = 4 THEN 1 + WHEN classify_id = 6 THEN 2 + WHEN classify_id = 5 THEN 3 + WHEN classify_id = 7 THEN 5 + WHEN classify_id = 3 THEN 6 + WHEN classify_id = 8 THEN 9 + WHEN classify_id = 1 THEN 10 + END type, IFNULL( NULL, 2 ) AS eventType, id AS eventId, lng_lat AS latLng, detail AS content, substring_index(photo_path_list, ',', 1) AS cover, create_at, + CASE + WHEN `status` = 4 THEN 1 + ELSE 2 END `status` + FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) + </select> + <select id="getVillagePopulationTotalNew" + resultType="com.panzhihua.common.model.vos.screen.ScreenDrawEventPopulationTotalVO"> + SELECT + (SELECT count(id) FROM com_mng_population WHERE village_id = #{villageId}) as populationTotal, + (SELECT count(id) from com_mng_building where village_id = #{villageId}) as buildTotal, + (SELECT count(id) FROM com_mng_population_house WHERE village_id = #{villageId}) as houseTotal, + (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 1) as localTotal, + (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 2) as outTotal, + (SELECT COUNT(t1.id) FROM com_disability_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}) as disabilityTotal, + (SELECT COUNT(t1.id) FROM com_low_security_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}) as lowSecurityTotal, + (SELECT COUNT(id) FROM com_mng_population WHERE village_id = #{villageId} AND TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) > 80) as elderTotal, + (SELECT COUNT(t1.id) FROM com_mng_population t1 LEFT JOIN com_mng_population_community_tags t2 ON t1.id = t2.population_id WHERE t1.village_id = #{villageId} AND t2.label LIKE '%特殊情况%') as specialSituationTotal, + (SELECT COUNT(id) FROM + (SELECT t1.id FROM com_drug_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId} + UNION ALL + SELECT t1.id FROM com_correct_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId} + UNION ALL + SELECT t1.id FROM com_cult_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId} + UNION ALL + SELECT t1.id FROM com_rehabilitation_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId} + UNION ALL + SELECT t1.id FROM com_key_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId} + UNION ALL + SELECT t1.id FROM com_major_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId} + ) temp) as otherTotal, + (SELECT COUNT(t1.id) FROM com_mng_population t1 LEFT JOIN com_mng_population_community_tags t2 ON t1.id = t2.population_id WHERE t1.village_id = #{villageId} AND t2.label LIKE '%特扶家庭%') as specialHelpTotal, + (SELECT COUNT(t1.id) FROM com_veterans_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}) as veteransTotal, + (SELECT COUNT(id) FROM com_mng_population WHERE village_id = #{villageId} AND TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) > 60) as oldTotal, + (SELECT COUNT(t1.id) FROM com_pension_auth_pensioners t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}) as pensionTotal, + (SELECT COUNT(id) FROM renting_hourse_register WHERE village_id = #{villageId} AND auth_status = 2) as rentingHouseTotal, + (SELECT COUNT(id) FROM com_mng_population t1 LEFT JOIN sys_user t2 ON t1.card_no_str = t2.id_card WHERE t1.village_id = #{villageId} AND t2.is_volunteer = 1) as volunteerTotal, + (SELECT ROUND(AVG(TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()))) FROM com_mng_population) as averageAge + </select> + <select id="selectStatisticsForAge" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> + SELECT filed, SUM(num) AS num FROM ( + SELECT filed, COUNT(filed) AS num FROM ( + SELECT + CASE + WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 0 AND 18 THEN '0-18岁' + WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 19 AND 30 THEN '19-30岁' + WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 31 AND 40 THEN '31-40岁' + WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 41 AND 50 THEN '41-50岁' + WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 51 AND 60 THEN '51-60岁' + WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 61 AND 79 THEN '61-79岁' + WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 80 AND 89 THEN '80-89岁' + WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) > 89 THEN '89岁以上' + END filed + FROM com_mng_population WHERE village_id IN + <foreach collection="villageIds" index="index" item="item" open="(" separator="," close=")"> + #{item} + </foreach> + ) temp WHERE filed is not null GROUP BY filed + UNION ALL + (SELECT '0-18岁' AS filed, 0 AS num) + UNION ALL + (SELECT '19-30岁' AS filed, 0 AS num) + UNION ALL + (SELECT '31-40岁' AS filed, 0 AS num) + UNION ALL + (SELECT '41-50岁' AS filed, 0 AS num) + UNION ALL + (SELECT '51-60岁' AS filed, 0 AS num) + UNION ALL + (SELECT '61-79岁' AS filed, 0 AS num) + UNION ALL + (SELECT '80-89岁' AS filed, 0 AS num) + UNION ALL + (SELECT '89岁以上' AS filed, 0 AS num) + ) t GROUP BY filed + </select> + +</mapper> diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventMapper.java b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventMapper.java index 5092ac2..a52a5e8 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventMapper.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventMapper.java @@ -178,4 +178,11 @@ ScreenDrawEventPopulationTotalVO getVillagePopulationTotalNew(@Param("villageId") Long villageId); List<StatisticsCommVO> selectStatisticsForAge(@Param("villageIds") List<Long> villageIds); + + /** + * 根据id获取事件数据 + * @param id + * @return + */ + EventDetailsVO getById(@Param("id") Long id); } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java index 07e7905..e7d55dd 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java @@ -171,11 +171,9 @@ */ @Override public R<EventDetailsVO> eventDetails(Long id) { - EventDO eventDO = eventMapper.selectById(id); - if (eventDO != null) { - EventDetailsVO eventDetailsVO = new EventDetailsVO(); - BeanUtils.copyProperties(eventDO, eventDetailsVO); - EventGridDataDO eventGridDataDO = eventGridDataMapper.selectById(eventDO.getGridId()); + EventDetailsVO eventDetailsVO = eventMapper.getById(id); + if (eventDetailsVO != null) { + EventGridDataDO eventGridDataDO = eventGridDataMapper.selectById(eventDetailsVO.getGridId()); if (eventGridDataDO != null) { eventDetailsVO.setGridName(eventGridDataDO.getGridName()); eventDetailsVO.setCommunityId(eventGridDataDO.getGridCommunityId()); @@ -253,17 +251,17 @@ eventDetailsVO.setTrans(eventTransferRecordVOS); // 查询网格员头像,姓名 - Map<String, Object> gridMember = eventMapper.getUserBaseInfo(eventDO.getGridMemberId()); + Map<String, Object> gridMember = eventMapper.getUserBaseInfo(eventDetailsVO.getGridMemberId()); if (!CollectionUtils.isEmpty(gridMember)) { eventDetailsVO.setGridMemberName( gridMember.get("nick_name") == null ? "" : gridMember.get("nick_name").toString()); eventDetailsVO.setGridMemberImageUrl( gridMember.get("image_url") == null ? "" : gridMember.get("image_url").toString()); } - if (Objects.equals(eventDO.getGridMemberId(), eventDO.getCreateBy())) { + if (Objects.equals(eventDetailsVO.getGridMemberId(), eventDetailsVO.getCreateBy())) { eventDetailsVO.setCreator(eventDetailsVO.getGridMemberName()); } else { - Map<String, Object> createUser = eventMapper.getUserBaseInfo(eventDO.getCreateBy()); + Map<String, Object> createUser = eventMapper.getUserBaseInfo(eventDetailsVO.getCreateBy()); eventDetailsVO .setCreator(createUser.get("nick_name") == null ? "" : createUser.get("nick_name").toString()); } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml index dec708f..3be4ffa 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml @@ -1505,5 +1505,21 @@ (SELECT '89岁以上' AS filed, 0 AS num) ) t GROUP BY filed </select> + <select id="getById" resultType="com.panzhihua.common.model.vos.grid.EventDetailsVO"> + SELECT t1.*, + CASE + t1.revoke_type + WHEN 1 THEN + t2.`name` + WHEN 2 THEN + t3.`name` + ELSE + NULL + END AS `revoke` + FROM event t1 + LEFT JOIN sys_user t2 ON t1.revoke_id = t2.user_id + LEFT JOIN com_act t3 ON t1.revoke_id = t3.community_id + WHERE t1.id = #{id} + </select> </mapper> diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java index f3f3b1c..502b163 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java @@ -234,4 +234,12 @@ */ int countSocialOrg(Long userId); + + /** + * 查看是否是微团队成员 + * @param phone + * @param userCommunityId + * @return + */ + int countFmsMember(@Param("phone") String phone, @Param("communityId") Long userCommunityId); } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java index a440002..da273b5 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java @@ -377,6 +377,7 @@ loginUserInfoVO.setIsCommunityWorker(2); loginUserInfoVO.setIsPropertyWorker(2); loginUserInfoVO.setIsSocialWorker(2); + loginUserInfoVO.setIsFmsMember(2); // 志愿者状态 String phone = sysUserDO.getPhone(); Long userCommunityId = sysUserDO.getCommunityId(); @@ -410,6 +411,11 @@ int countPropertyWorker = userDao.countPropertyWorker(Long.parseLong(userId), userCommunityId); if (countPropertyWorker > 0) { loginUserInfoVO.setIsPropertyWorker(1); + } + //是否微团队成员 + int countFmsMember = userDao.countFmsMember(phone, userCommunityId); + if (countFmsMember > 0) { + loginUserInfoVO.setIsFmsMember(1); } // 是否是"管理员"或者 本社区 "社区团队"、"党委成员" Integer countTeam = userDao.selectCountTeam(phone, userCommunityId); @@ -713,6 +719,9 @@ //是否是社区物业人员 int countPropertyWorker = userDao.countPropertyWorker(userId, loginUserInfoVO.getCommunityId()); loginUserInfoVO.setIsPropertyWorker(countPropertyWorker > 0 ? 1 : 0); + //是否微团队成员 + int countFmsMember = userDao.countFmsMember(loginUserInfoVO.getPhone(), loginUserInfoVO.getCommunityId()); + loginUserInfoVO.setIsFmsMember(countFmsMember > 0 ? 1 : 0); loginUserInfoVO.setIdCard(SensitiveUtil.desensitizedIdNumber(loginUserInfoVO.getIdCard())); loginUserInfoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(loginUserInfoVO.getPhone())); //判断账号类型 diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml index 039477f..7b59017 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml @@ -541,4 +541,9 @@ select count(id) from com_act_social_org where user_id = #{userId} </select> + <select id="countFmsMember" resultType="integer"> + SELECT COUNT(id) FROM com_fms_team_member + WHERE phone = #{phone} AND community_id = #{communityId} + </select> + </mapper> diff --git a/springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/CommunityJobHandler.java b/springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/CommunityJobHandler.java index 160ccc1..b4855de 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/CommunityJobHandler.java +++ b/springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/CommunityJobHandler.java @@ -300,4 +300,15 @@ log.info("执行结果【{}】", r.toString()); return ReturnT.SUCCESS; } + + /** + * 定时任务针对服务结束后3天还未评价的用户默认好评 + */ + @XxlJob("timedTaskFmsServiceDefaultPraiseJobHandler") + public ReturnT<String> timedTaskFmsServiceDefaultPraiseJobHandler(String param) throws Exception { + log.info("定时任务针对服务结束后3天还未评价的用户默认好评"); + R r = communityService.timedTaskFmsServiceDefaultPraise(); + log.info("执行结果【{}】", r.toString()); + return ReturnT.SUCCESS; + } } diff --git a/springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java b/springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java index 42a1054..ebe9ed4 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java +++ b/springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java @@ -293,6 +293,14 @@ noLoginUrl.add("/api/shopbackstage/microcommercialstreet/game/get"); noLoginUrl.add("/api/shopbackstage/microcommercialstreet/info/get"); noLoginUrl.add("/api/shopbackstage/microcommercialstreet/merchant/pageH5"); + noLoginUrl.add("/api/applets/fms/teamType/list"); + noLoginUrl.add("/api/applets/fms/team/page"); + noLoginUrl.add("/api/applets/fms/classroom/page"); + noLoginUrl.add("/api/applets/fms/classroom/detail"); + noLoginUrl.add("/api/applets/fms/event/page"); + noLoginUrl.add("/api/applets/fms/event/detail"); + noLoginUrl.add("/api/applets/fms/service/page"); + noLoginUrl.add("/api/applets/fms/service/detail"); if (noLoginUrl.contains(requestURI)) { List<SimpleGrantedAuthority> authorities = new ArrayList<>(); authorities.add(new SimpleGrantedAuthority(SecurityConstants.ROLE_APPLETS)); diff --git a/springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/resources/bootstrap.yml b/springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/resources/bootstrap.yml index 300ecf7..63bf779 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/resources/bootstrap.yml +++ b/springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/resources/bootstrap.yml @@ -85,6 +85,7 @@ - POST:/api/applets/user/pageeasyphoto - POST:/api/applets/neighbor/user/page - GET:/api/applets/user/listfamily + - POST:/api/applets/fms/service/apply management: -- Gitblit v1.7.1