Merge branch 'yibin' into test
| | |
| | | comSwPatrolRecordPageDTO.setPatrolPerson(String.valueOf(this.getLoginUserInfo().getPhone())); |
| | | } |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | comSwPatrolRecordPageDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pagePatrolRecord(comSwPatrolRecordPageDTO); |
| | | } |
| | | |
| | |
| | | public R pageDangerReport(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | comSwPatrolRecordPageDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageDangerReport(comSwPatrolRecordPageDTO); |
| | | } |
| | | |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.panzhihua.applets.config.MinioUtil; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.apache.commons.lang3.RandomUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | @RestController |
| | | @RequestMapping("/common/") |
| | | @Api(tags = {"公共接口"}) |
| | | public class CommonApi { |
| | | public class CommonApi extends BaseController { |
| | | /** |
| | | * 允许的图片文件后缀 |
| | | */ |
| | |
| | | @PostMapping(value = "uploadimage", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImage(@RequestParam MultipartFile file, HttpServletRequest request) throws IOException { |
| | | // 微信图片内容校验 |
| | | WxMaSecCheckService wxMaSecCheckService = wxMaConfiguration.getMaService().getSecCheckService(); |
| | | WxMaSecCheckService wxMaSecCheckService = wxMaConfiguration.getMaService(this.getAppId()).getSecCheckService(); |
| | | String property = System.getProperty("user.dir"); |
| | | |
| | | String fileExtension = ".jpg"; |
| | |
| | | } |
| | | comActDynVO.setIsTopping(null); |
| | | comActDynVO.setStatus(1); |
| | | comActDynVO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageDynamic(comActDynVO); |
| | | } |
| | | |
| | |
| | | comActActivityVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | comActActivityVO.setIsApplets(1); |
| | | comActActivityVO.setAreaCode(this.getAreaCode()); |
| | | Integer status = comActActivityVO.getStatus(); |
| | | if (null != status && status.intValue() == 4) { |
| | | comActActivityVO.setIsIng(1); |
| | |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | comMngVolunteerMngVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | }else{ |
| | | comMngVolunteerMngVO.setCommunityId(pageVolunteerDTO.getCommunityId()); |
| | | } |
| | | // Long communityId = this.getCommunityId(); |
| | | |
| | | // comMngVolunteerMngVO.setCommunityId(communityId); |
| | | comMngVolunteerMngVO.setPageNum(pageVolunteerDTO.getPageNum()); |
| | | comMngVolunteerMngVO.setPageSize(pageVolunteerDTO.getPageSize()); |
| | | return communityService.pageVolunteer(comMngVolunteerMngVO); |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO; |
| | |
| | | @RestController |
| | | @RequestMapping("/switch/") |
| | | @Api(tags = {"切换社区模块"}) |
| | | public class CommunitySwitchApi { |
| | | public class CommunitySwitchApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | |
| | | @ApiOperation(value = "查询所有社区", response = StreetAllAppletsVO.class) |
| | | @GetMapping("/list/noToken") |
| | | public R list() { |
| | | return communityService.communitySwitchList(); |
| | | return communityService.communitySwitchList(this.getAreaCode()); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据名字搜索社区", response = CommunitySwitchAllAppletsVO.class) |
| | | @GetMapping("/search/noToken") |
| | | public R search(@RequestParam(value = "name") String name) { |
| | | return communityService.communitySwitchSearchList(name); |
| | | return communityService.communitySwitchSearchList(name,this.getAreaCode()); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据距离搜索社区", response = CommunitySwitchAllAppletsVO.class) |
| | | @PostMapping("/distance/noToken") |
| | | public R searchDistance(@RequestBody SearchCommunityDTO communityDTO) { |
| | | communityDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.communitySwitchSearchDistanceList(communityDTO); |
| | | } |
| | | |
| | |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | addIdentityAuthDTO.setSubmitUserId(loginUserInfo.getUserId()); |
| | | addIdentityAuthDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | addIdentityAuthDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.addIdentityAuth(addIdentityAuthDTO); |
| | | } |
| | | |
| | |
| | | return R.fail("缺少登录参数"); |
| | | } |
| | | log.info(code); |
| | | WxMaService maService = wxMaConfiguration.getMaService(); |
| | | WxMaService maService = wxMaConfiguration.getMaService(loginRequest.getAppid()); |
| | | WxMaJscode2SessionResult sessionInfo = null; |
| | | try { |
| | | sessionInfo = maService.getUserService().getSessionInfo(code); |
| | |
| | | return r1; |
| | | } |
| | | |
| | | @ApiOperation(value = "仁和区登录", response = LoginReturnVO.class) |
| | | @PostMapping("/renHe/login") |
| | | public R renHeLogin(@RequestBody LoginRequest loginRequest) { |
| | | String code = loginRequest.getCode(); |
| | | if (ObjectUtils.isEmpty(code)) { |
| | | return R.fail("缺少登录参数"); |
| | | } |
| | | log.info(code); |
| | | WxMaService maService = wxMaConfiguration.getMaRhService(); |
| | | WxMaJscode2SessionResult sessionInfo = null; |
| | | try { |
| | | sessionInfo = maService.getUserService().getSessionInfo(code); |
| | | } catch (Exception e) { |
| | | log.error("微信登录失败【{}】", e.getMessage()); |
| | | if (code.equals("22")) { |
| | | sessionInfo = new WxMaJscode2SessionResult(); |
| | | sessionInfo.setOpenid("88888888"); |
| | | sessionInfo.setSessionKey("9999999"); |
| | | } else { |
| | | return R.fail("微信登录失败"); |
| | | } |
| | | } |
| | | log.info("微信登录成功【{}】", JSONObject.toJSONString(sessionInfo)); |
| | | log.info("loginRequest参数【{}】", JSONObject.toJSONString(loginRequest)); |
| | | String openid = sessionInfo.getOpenid(); |
| | | String sessionKey = sessionInfo.getSessionKey(); |
| | | String unionid = sessionInfo.getUnionid(); |
| | | if (ObjectUtils.isEmpty(unionid)) { |
| | | unionid = "无"; |
| | | } |
| | | userService.addOrUpdate(openid, sessionKey, unionid); |
| | | return tokenService.loginApplets(openid); |
| | | } |
| | | |
| | | @ApiOperation(value = "维护用户基本信息(昵称、性别、头像)") |
| | | @PostMapping("updateUserWeiXinInfo") |
| | | public R updateUserWeiXinInfo(@RequestBody LoginRequest loginRequest) { |
| | |
| | | if (empty || empty1) { |
| | | return R.fail("微信用户参数不全"); |
| | | } |
| | | WxMaService maService = wxMaConfiguration.getMaService(); |
| | | WxMaService maService = wxMaConfiguration.getMaService(this.getAppId()); |
| | | Long userId = this.getUserId(); |
| | | R<LoginUserInfoVO> r = userService.getUserInfoByUserId(userId + ""); |
| | | LoginUserInfoVO loginUserInfoVO = r.getData(); |
| | |
| | | return R.fail("缺少登录参数"); |
| | | } |
| | | log.info(code); |
| | | WxMaService maService = wxMaConfiguration.getMaService(); |
| | | WxMaService maService = wxMaConfiguration.getMaService(this.getAppId()); |
| | | WxMaJscode2SessionResult sessionInfo = null; |
| | | try { |
| | | sessionInfo = maService.getUserService().getSessionInfo(code); |
| | |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | List<ComActActivityVO> comActActivityVOS = new ArrayList<>(); |
| | | R r = communityService.listActivity(userId, status); |
| | | if (R.isOk(r)) { |
| | | if (R.isOk(r)&&r.getData()!=null) { |
| | | comActActivityVOS = (List<ComActActivityVO>)r.getData(); |
| | | } |
| | | R r1 = partyBuildingService.listActivity(userId, communityId, status); |
| | | if (R.isOk(r1)) { |
| | | if (R.isOk(r1)&&r1.getData()!=null) { |
| | | List<ComActActivityVO> data = (List<ComActActivityVO>)r1.getData(); |
| | | comActActivityVOS.addAll(data); |
| | | } |
| | |
| | | @ApiOperation(value = "办事指南_分页", response = ComActWorkGuideVO.class) |
| | | @PostMapping("pageworkguide") |
| | | public R detailWorkGuide(@RequestBody PageActWorkGuideDTO pageActWorkGuideDTO) { |
| | | pageActWorkGuideDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageWorkGuide(pageActWorkGuideDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "办事指南列表-按分类查询", response = ComActWorkGuideAppletsVO.class) |
| | | @PostMapping("list") |
| | | public R listWorkGuide(@RequestBody PageActWorkGuideDTO pageActWorkGuideDTO) { |
| | | pageActWorkGuideDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.listWorkGuide(pageActWorkGuideDTO); |
| | | } |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.user.SysAppConfigVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaService; |
| | |
| | | @Resource |
| | | private WxH5Properties wxH5Properties; |
| | | |
| | | public WxMaService getMaService() { |
| | | @Resource |
| | | private WxMaRHProperties wxMaRHProperties; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | public WxMaService getMaService(String appid) { |
| | | WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl(); |
| | | if(StringUtils.isNotEmpty(appid)){ |
| | | R<SysAppConfigVO> r=userService.selectByAppid(appid); |
| | | if(R.isOk(r)){ |
| | | SysAppConfigVO sysAppConfigVO= r.getData(); |
| | | config.setAppid(sysAppConfigVO.getAppId()); |
| | | config.setSecret(sysAppConfigVO.getSecret()); |
| | | config.setMsgDataFormat(properties.getMsgDataFormat()); |
| | | } |
| | | } |
| | | else{ |
| | | config.setAppid(properties.getAppid()); |
| | | config.setSecret(properties.getSecret()); |
| | | config.setMsgDataFormat(properties.getMsgDataFormat()); |
| | | } |
| | | WxMaService wxMaService = new WxMaServiceImpl(); |
| | | wxMaService.setWxMaConfig(config); |
| | | return wxMaService; |
| | |
| | | wxMaService.setWxMaConfig(config); |
| | | return wxMaService; |
| | | } |
| | | |
| | | public WxMaService getMaRhService() { |
| | | WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl(); |
| | | config.setAppid(wxMaRHProperties.getAppid()); |
| | | config.setSecret(wxMaRHProperties.getSecret()); |
| | | config.setMsgDataFormat(wxMaRHProperties.getMsgDataFormat()); |
| | | WxMaService wxMaService = new WxMaServiceImpl(); |
| | | wxMaService.setWxMaConfig(config); |
| | | return wxMaService; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets.config; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 微信配置 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-23 14:52 |
| | | **/ |
| | | @Data |
| | | @Component |
| | | @ConfigurationProperties(prefix = "wx.rh") |
| | | public class WxMaRHProperties { |
| | | |
| | | /** |
| | | * 设置微信小程序的appid |
| | | */ |
| | | private String appid; |
| | | |
| | | /** |
| | | * 设置微信小程序的Secret |
| | | */ |
| | | private String secret; |
| | | |
| | | /** |
| | | * 设置微信小程序消息服务器配置的token |
| | | */ |
| | | private String token; |
| | | |
| | | /** |
| | | * 设置微信小程序消息服务器配置的EncodingAESKey |
| | | */ |
| | | private String aesKey; |
| | | |
| | | /** |
| | | * 消息格式,XML或者JSON |
| | | */ |
| | | private String msgDataFormat; |
| | | |
| | | /** |
| | | * 商户号 |
| | | */ |
| | | private String mchId; |
| | | |
| | | /** |
| | | * 微信支付密钥 |
| | | */ |
| | | private String payKey; |
| | | |
| | | /** |
| | | * 微信支付回调地址 |
| | | */ |
| | | private String notifyUrl; |
| | | } |
| | |
| | | @ApiModelProperty(name = "userInfo", value = "用户基本信息") |
| | | WxMaUserInfo userInfo; |
| | | |
| | | @ApiModelProperty("appid") |
| | | String appid; |
| | | } |
| | |
| | | private WxMaConfiguration wxMaConfiguration; |
| | | |
| | | public boolean checkMessage(String msg) { |
| | | WxMaSecCheckService wxMaSecCheckService = wxMaConfiguration.getMaService().getSecCheckService(); |
| | | WxMaSecCheckService wxMaSecCheckService = wxMaConfiguration.getMaService("").getSecCheckService(); |
| | | try { |
| | | boolean b = wxMaSecCheckService.checkMessage(msg); |
| | | return b; |
| | |
| | | operlog.setOperTime(new Date()); // 创建时间 |
| | | operlog.setAccount(loginUserInfoVO.getAccount()); |
| | | Long communityId = loginUserInfoVO.getCommunityId(); |
| | | operlog.setAreaCode(communityId==0 ? "510423" : loginUserInfoVO.getAreaCode()); |
| | | operlog.setCommunityId(null == communityId ? 0 : communityId); |
| | | userService.addOperLog(operlog); |
| | | } catch (Exception e) { |
| | |
| | | @ApiOperation(value = "分页查询社区", response = ComActVO.class) |
| | | @PostMapping("pagecommunity") |
| | | public R pageCommunity(@RequestBody PageComActDTO pageComActDTO) { |
| | | pageComActDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageCommunity(pageComActDTO); |
| | | } |
| | | |
| | |
| | | @PostMapping("/service-category/add") |
| | | public R addServiceCategory(@RequestBody @Validated(AddGroup.class) ConvenientServiceCategoryDTO convenientServiceCategoryDTO) { |
| | | convenientServiceCategoryDTO.setCreatedBy(this.getUserId()); |
| | | convenientServiceCategoryDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.addServiceCategory(convenientServiceCategoryDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "分页查询便民服务分类", response = ConvenientServiceCategoryVO.class) |
| | | @PostMapping("/service-category/page") |
| | | public R pageServiceCategory(@RequestBody PageConvenientServiceCategoryDTO pageConvenientServiceCategoryDTO) { |
| | | pageConvenientServiceCategoryDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageServiceCategory(pageConvenientServiceCategoryDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "分页查询便民服务商家", response = ConvenientMerchantVO.class) |
| | | @PostMapping("/merchant/page") |
| | | public R pageMerchant(@RequestBody PageConvenientMerchantDTO pageConvenientMerchantDTO) { |
| | | pageConvenientMerchantDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageMerchant(pageConvenientMerchantDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "社区下拉列表", response = ComActVO.class) |
| | | @GetMapping("/community") |
| | | public R listCommunity() { |
| | | return communityService.listCommunityAll(); |
| | | return communityService.listCommunityAll(this.getAreaCode()); |
| | | } |
| | | |
| | | @ApiOperation(value = "所有服务分类", response = ConvenientServiceCategoryVO.class) |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoClassifyDTO; |
| | |
| | | @Api(tags = {"随手拍分类"}) |
| | | @RestController |
| | | @RequestMapping("/classify") |
| | | public class EasyPhotoClassifyApi { |
| | | public class EasyPhotoClassifyApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | |
| | | @ApiOperation(value = "随手拍分类-新增") |
| | | @PostMapping("/add") |
| | | public R addPhotoClassify(@RequestBody AddEasyPhotoClassifyDTO addPhotoClassify) { |
| | | addPhotoClassify.setAreaCode(this.getAreaCode()); |
| | | return communityService.addPhotoClassify(addPhotoClassify); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "随手拍分类-分页") |
| | | @PostMapping("/page") |
| | | public R pagePhotoClassify(@RequestBody AddEasyPhotoClassifyDTO addPhotoClassify) { |
| | | addPhotoClassify.setAreaCode(this.getAreaCode()); |
| | | return communityService.pagePhotoClassify(addPhotoClassify); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "房屋租售-分页查询", response = ComOpsHouseVO.class) |
| | | @PostMapping("pagehouse") |
| | | public R pageHouse(@RequestBody PageComOpsHouseDTO pageComOpsHouseDTO) { |
| | | pageComOpsHouseDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageOpsHouse(pageComOpsHouseDTO); |
| | | } |
| | | |
| | |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.panzhihua.applets_backstage.config.SFTPConfig; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.excel.CustomSheetWriteHandler; |
| | | import com.panzhihua.common.model.dtos.DataKanBansDto; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | |
| | | @Api(tags = {"首页接口"}) |
| | | @RestController |
| | | @RequestMapping("/index/") |
| | | public class IndexApi { |
| | | public class IndexApi extends BaseController { |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | |
| | | @ApiOperation(value = "数据看板", response = IndexDataKanbanVO.class) |
| | | @GetMapping("datakanban") |
| | | public R dataKanban() { |
| | | return userService.dataKanban(); |
| | | return userService.dataKanban(this.getAreaCode()); |
| | | } |
| | | |
| | | @ApiOperation(value = "数据看板", response = IndexDataKanbanVO.class) |
| | | @PostMapping("datakanbans") |
| | | public R dataKanBans(@RequestBody DataKanBansDto dataKanBansDto) { |
| | | dataKanBansDto.setAreaCode(this.getAreaCode()); |
| | | return userService.dataKanBans(dataKanBansDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区通统计数据汇总", response = IndexUserStatisticsVo.class) |
| | | @GetMapping("statistics") |
| | | public R communityStatistics() { |
| | | return userService.communityStatistics(); |
| | | return userService.communityStatistics(this.getAreaCode()); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区通统计数据导出") |
| | |
| | | String url = sftpConfig.getExcelUrl(); |
| | | String name = "社区通用户统计导出数据.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | R r = userService.communityStatisticsExport(); |
| | | R r = userService.communityStatisticsExport(this.getAreaCode()); |
| | | if (R.isOk(r)) { |
| | | List<IndexUserStreetExcelExportVo> resultList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), IndexUserStreetExcelExportVo.class); |
| | | try { |
| | |
| | | @ApiOperation(value = "分页查询街道", response = PageComStreetDTO.class) |
| | | @PostMapping("pagestreet") |
| | | public R pageStreet(@RequestBody PageComStreetDTO pageComStreetDTO) { |
| | | pageComStreetDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageStreet(pageComStreetDTO); |
| | | } |
| | | |
| | |
| | | @PostMapping("addstreet") |
| | | public R pageStreet(@RequestBody ComStreetVO comStreetVO) { |
| | | R r = communityService.addStreet(comStreetVO); |
| | | if (R.isOk(r)) { |
| | | AdministratorsUserVO administratorsUserVO = new AdministratorsUserVO(); |
| | | administratorsUserVO.setAccount(comStreetVO.getAccount()); |
| | | administratorsUserVO.setPassword(comStreetVO.getPassword()); |
| | | administratorsUserVO.setType(4); |
| | | administratorsUserVO.setAreaId(null); |
| | | administratorsUserVO.setStatus(1); |
| | | administratorsUserVO.setRoleId(999999999l); |
| | | administratorsUserVO.setUserId(this.getUserId()); |
| | | userService.addUserBackstage(administratorsUserVO); |
| | | } |
| | | // if (R.isOk(r)) { |
| | | // AdministratorsUserVO administratorsUserVO = new AdministratorsUserVO(); |
| | | // administratorsUserVO.setAccount(comStreetVO.getAccount()); |
| | | // administratorsUserVO.setPassword(comStreetVO.getPassword()); |
| | | // administratorsUserVO.setType(4); |
| | | // administratorsUserVO.setAreaId(null); |
| | | // administratorsUserVO.setStatus(1); |
| | | // administratorsUserVO.setRoleId(999999999l); |
| | | // administratorsUserVO.setUserId(this.getUserId()); |
| | | // administratorsUserVO.setCommunityId(this.getCommunityId()); |
| | | // userService.addUserBackstage(administratorsUserVO); |
| | | // } |
| | | return r; |
| | | } |
| | | |
| | |
| | | @GetMapping("listrolebackstage") |
| | | public R listRoleBackstage(@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize) { |
| | | Long communityId = 0L; |
| | | return userService.listRoleBackstage(communityId,pageNum,pageSize); |
| | | return userService.listRoleBackstage(communityId,pageNum,pageSize,this.getAreaCode()); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询后台用户", response = AdministratorsUserVO.class) |
| | | @PostMapping("pageuser") |
| | | public R pageUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) { |
| | | administratorsUserVO.setCommunityId(0l); |
| | | administratorsUserVO.setAreaCode(this.getAreaCode()); |
| | | return userService.pageUserBackstage(administratorsUserVO); |
| | | } |
| | | |
| | |
| | | roleVO.setCommunityId(communityId); |
| | | roleVO.setCreateBy(userId); |
| | | roleVO.setStatus(0); |
| | | roleVO.setAreaCode(this.getAreaCode()); |
| | | HanyuPinyinHelper hanyuPinyinHelper = new HanyuPinyinHelper(); |
| | | roleVO.setRoleKey(hanyuPinyinHelper.toHanyuPinyin(roleName)); |
| | | R r = userService.addRoleBackstage(roleVO); |
| | |
| | | @PostMapping("pageoperlog") |
| | | public R pageOperLog(@RequestBody SysOperLogVO sysOperLogVO) { |
| | | sysOperLogVO.setCommunityId(0l); |
| | | sysOperLogVO.setAreaCode(this.getAreaCode()); |
| | | return userService.pageOperLog(sysOperLogVO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "分页查询用户意见反馈", response = SysUserFeedbackVO.class) |
| | | @PostMapping("pagefeedback") |
| | | public R pageFeedback(@RequestBody @Validated(PageGroup.class) PageFeedBackDTO pageFeedBackDTO) { |
| | | pageFeedBackDTO.setAreaCode(this.getAreaCode()); |
| | | return userService.pageFeedback(pageFeedBackDTO); |
| | | } |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RestController |
| | | @RequestMapping("/usermanagement/") |
| | | @Api(tags = {"居民用户管理"}) |
| | | public class UserManagementApi { |
| | | public class UserManagementApi extends BaseController { |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | |
| | | @PostMapping("pageuser") |
| | | public R pageUserAppletsBackstage( |
| | | @RequestBody @Validated(PageGroup.class) PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO) { |
| | | pageUserAppletsBackstageDTO.setAreaCode(this.getAreaCode()); |
| | | return userService.pageUserAppletsBackstage(pageUserAppletsBackstageDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "社区下拉列表", response = ComActVO.class) |
| | | @GetMapping("listcommunity") |
| | | public R listCommunity() { |
| | | return communityService.listCommunityAll(); |
| | | return communityService.listCommunityAll(this.getAreaCode()); |
| | | } |
| | | } |
| | |
| | | @ApiOperation(value = "疫苗分类列表", response = VaccinesByAppVO.class) |
| | | @PostMapping("list") |
| | | public R getVaccinesListByAdmin(@RequestBody VaccinesByAdminDTO vaccinesByAdminDTO) { |
| | | vaccinesByAdminDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.getVaccinesListByAdmin(vaccinesByAdminDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "添加疫苗信息") |
| | | @PostMapping("add") |
| | | public R addVaccinesByAdmin(@RequestBody VaccinesByAdminDTO vaccinesByAdminDTO) { |
| | | vaccinesByAdminDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.addVaccinesByAdmin(vaccinesByAdminDTO); |
| | | } |
| | | |
| | |
| | | @PostMapping("addworkguide") |
| | | public R addStreet(@RequestBody @Validated(AddGroup.class) ComActWorkGuideVO workGuideVO) { |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | workGuideVO.setAreaCode(this.getAreaCode()); |
| | | return communityService.addWorkGuide(workGuideVO, loginUserInfo.getUserId()); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "办事指南_分页", response = ComActWorkGuideVO.class) |
| | | @PostMapping("pageworkguide") |
| | | public R detailWorkGuide(@RequestBody PageActWorkGuideDTO pageActWorkGuideDTO) { |
| | | pageActWorkGuideDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageWorkGuide(pageActWorkGuideDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "办事指南分类_分页查询", response = ComActWorkGuideClassifyVO.class) |
| | | @PostMapping("classify/apage") |
| | | public R pageWorkGuideClassify(@RequestBody ComActWorkGuideClassifyVO comActWorkGuideClassifyVO) { |
| | | comActWorkGuideClassifyVO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageWorkGuideClassify(comActWorkGuideClassifyVO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "办事指南分类_新增或修改") |
| | | @PostMapping("classify/add") |
| | | public R addWorkGuideClassify(@RequestBody ComActWorkGuideClassifyVO comActWorkGuideClassifyVO) { |
| | | comActWorkGuideClassifyVO.setAreaCode(this.getAreaCode()); |
| | | return communityService.addWorkGuideClassify(comActWorkGuideClassifyVO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "办事指南分类_列表查询") |
| | | @GetMapping("classify/getList") |
| | | public R getWorkGuideClassifyList() { |
| | | return communityService.getWorkGuideClassifyList(); |
| | | return communityService.getWorkGuideClassifyList(this.getAreaCode()); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | |
| | | } |
| | | return areaId; |
| | | } |
| | | /** |
| | | * 获取登录对象所在区域编码 |
| | | * |
| | | * @return |
| | | */ |
| | | public String getAreaCode() { |
| | | String appid = this.getRequest().getHeader("appid"); |
| | | if(StringUtils.isNotEmpty(appid)){ |
| | | if(appid.equals("wx08932ba29546ff82")){ |
| | | return "510411"; |
| | | } |
| | | else if(appid.equals("wx50d8c395af50481b")){ |
| | | return "510402"; |
| | | } |
| | | else { |
| | | return "510423"; |
| | | } |
| | | } |
| | | else { |
| | | LoginUserInfoVO loginUserInfoVO=this.getLoginUserInfo(); |
| | | ComActVO comActVO=loginUserInfoVO.getComActVO(); |
| | | if(comActVO!=null){ |
| | | return comActVO.getAreaCode(); |
| | | } |
| | | return "510423"; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取登录token |
| | |
| | | return header; |
| | | } |
| | | |
| | | public String getAppId(){ |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | return loginUserInfo.getAppId(); |
| | | } |
| | | |
| | | public String getAppSecret(){ |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | return loginUserInfo.getAppSecret(); |
| | | } |
| | | /** |
| | | * 获取登录对象所有信息 |
| | | * |
| | |
| | | @ApiModelProperty("社区用户量统计类型(1.累计用户 2.本月新增)") |
| | | private Integer type; |
| | | |
| | | private String areaCode; |
| | | /** |
| | | * 社区用户量统计类型(1.累计用户 2.本月新增) |
| | | */ |
| | |
| | | @ApiModelProperty(value = "字符串类型查询参数", example = "10") |
| | | private String param2; |
| | | |
| | | @ApiModelProperty(value = "数字类型查询参数", example = "10") |
| | | private Integer param3; |
| | | |
| | | @ApiModelProperty(value = "单个社区id") |
| | | private Long communityId; |
| | | |
| | |
| | | |
| | | @ApiModelProperty("认证期数") |
| | | private String authPeriod; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | private String areaCode; |
| | | |
| | | private List<ComActWorkGuideMaterialVO> materials = Lists.newArrayList(); |
| | | } |
| | |
| | | @ApiModelProperty("查看人(1.全部 2.只看我的)") |
| | | private Integer selectPerson; |
| | | |
| | | @ApiModelProperty("区域编码") |
| | | private String areaCode; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "用户ID", hidden = true, example = "") |
| | | private Long userId; |
| | | |
| | | private String areaCode; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "操作人", hidden = true) |
| | | private Long userId; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | @ApiModelProperty(value = "联系方式") |
| | | private String mobile; |
| | | |
| | | private String areaCode; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize; |
| | | |
| | | @ApiModelProperty("areaCode") |
| | | private String areaCode; |
| | | } |
| | |
| | | @Min(value = 1, groups = {PageGroup.class}, message = "每页记录数不能为空") |
| | | private Long pageSize; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | } |
| | |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty("咨询电话") |
| | | @Pattern(groups = {AddGroup.class}, 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("商家地址") |
| | |
| | | @ApiModelProperty(value = "更新人", hidden = true) |
| | | private Long updatedBy; |
| | | |
| | | private String areaCode; |
| | | |
| | | public String getPeriod() { |
| | | return period.name(); |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "更新人", hidden = true) |
| | | private Long updatedBy; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | @NotNull(message = "分页参数不能为空") |
| | | @Min(value = 1) |
| | | private Long pageSize; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | @ApiModelProperty(value = "分页当前记录数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | private String areaCode; |
| | | |
| | | /** |
| | | * 预约状态(1.同意 2.拒绝) |
| | | */ |
| | |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "距离(千米)", required = true) |
| | | private Integer distance; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | private String name; |
| | | @ApiModelProperty(value = "手机号", example = "") |
| | | private String phone; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | @NotNull(groups = {PutGroup.class}, message = "用户主键不能为空") |
| | | @Min(value = 1, groups = {PutGroup.class}, message = "用户主键不能为空") |
| | | private Long userId; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("疫苗描述") |
| | | private String describe; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("是否物业工作人员 1.是 2.否") |
| | | private Integer isPropertyWorker; |
| | | |
| | | @ApiModelProperty("appid") |
| | | private String appId; |
| | | @ApiModelProperty("appSecret") |
| | | private String appSecret; |
| | | @ApiModelProperty("areaCode") |
| | | private String areaCode; |
| | | } |
| | |
| | | @ApiModelProperty("活动类型") |
| | | @NotBlank(groups = AddGroup.class, message = "活动类型不能为空") |
| | | private String activityType; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("跳转状态") |
| | | private Integer jumpType; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | private String areaCode; |
| | | |
| | | private List<ComActWorkGuideMaterialVO> materials = Lists.newArrayList(); |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | private List<String> nextIds; |
| | | |
| | | private Long communityId; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | private Integer y; |
| | | @ApiModelProperty("累计数") |
| | | private Integer countY; |
| | | |
| | | private String year; |
| | | } |
| | |
| | | private Integer homeCount; |
| | | @ApiModelProperty("总量") |
| | | private Integer count; |
| | | |
| | | private String year; |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import java.util.List; |
| | | |
| | | 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.EventGridIncidentStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.event.EventGridStatisticsVO; |
| | | import com.panzhihua.common.model.vos.screen.ScreenDrawEventPopulationTotalVO; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: GridsGovernanceStatisticsVO |
| | |
| | | |
| | | @ApiModelProperty("小区列表数据") |
| | | private List<CivilVillageStatisticsVO> villageStatisticsList; |
| | | |
| | | @ApiModelProperty("社区事件数据") |
| | | private List<EventGridIncidentStatisticsVO> gridIncidentList; |
| | | |
| | | @ApiModelProperty("人口统计") |
| | | private ScreenDrawEventPopulationTotalVO drawEventPopulationTotalVO; |
| | |
| | | package com.panzhihua.common.model.vos.community.screen.event; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | |
| | |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("事件创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | } |
| | |
| | | @ApiModel("大屏首页实有人口年龄段数据统计返回参数") |
| | | public class IndexPopulationAgeStatisticsVO { |
| | | |
| | | @ApiModelProperty("年龄段(1、0-16 2、16-27 3、27-35 4、35-45 5、45-55 6、55以上)") |
| | | @ApiModelProperty("年龄段(1、0-18 2、19-30 3、31-40 4、41-50 5、51-59 7、60-79 8.80-89 6.89以上)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("数量") |
| | |
| | | @ApiModelProperty("头像") |
| | | private String imageUrl; |
| | | |
| | | private String areaCode; |
| | | |
| | | } |
| | |
| | | private String roleName; |
| | | @ApiModelProperty(value = "所在社区", hidden = true) |
| | | private Long communityId; |
| | | private String areaCode; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | |
| | | private String areaCode; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.user; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | |
| | | /** |
| | | * (SysAppConfig)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 10:10:15 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class SysAppConfigVO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -90981038076389842L; |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * appid |
| | | */ |
| | | @ApiModelProperty(value = "appid") |
| | | private String appId; |
| | | |
| | | /** |
| | | * secret |
| | | */ |
| | | @ApiModelProperty(value = "secret") |
| | | private String secret; |
| | | |
| | | /** |
| | | * 小程序名字 |
| | | */ |
| | | @ApiModelProperty(value = "小程序名字") |
| | | private String name; |
| | | |
| | | private String areaCode; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("每页记录数") |
| | | private Long pageSize; |
| | | |
| | | private String areaCode; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.user; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | |
| | | /** |
| | | * (SysTemplateConfig)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 14:29:55 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class SysTemplateConfigVO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -29178409799302189L; |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 模板id |
| | | */ |
| | | @ApiModelProperty(value = "模板id") |
| | | private String templateId; |
| | | |
| | | /** |
| | | * 模板类型 1活动变更 2留言回复 3活动取消 4审核状态 5认证审核 6调研问卷 7奖励发放 8报名成功 9活动即将开始 10预约提醒 |
| | | */ |
| | | @ApiModelProperty(value = "模板类型 1活动变更 2留言回复 3活动取消 4审核状态 5认证审核 6调研问卷 7奖励发放 8报名成功 9活动即将开始 10预约提醒 ") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 区域编码 |
| | | */ |
| | | @ApiModelProperty(value = "区域编码") |
| | | private String areaCode; |
| | | |
| | | } |
| | |
| | | * @return 社区集合 按照创建顺序倒序排列 |
| | | */ |
| | | @PostMapping("listcommunityall") |
| | | R listCommunityAll(); |
| | | R listCommunityAll(@RequestParam("areaCode")String areaCode); |
| | | |
| | | /** |
| | | * 首页广告banner |
| | |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @GetMapping("/workGuide/classify/getList") |
| | | R getWorkGuideClassifyList(); |
| | | R getWorkGuideClassifyList(@RequestParam("areaCode")String areaCode); |
| | | |
| | | /** |
| | | * 分页查询邻里圈 |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/eventgrid/community/westList") |
| | | R getWestCommunityLists(); |
| | | R getWestCommunityLists(String areaCode); |
| | | |
| | | /** |
| | | * 综治app-小区列表 |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/switch/community/all/list") |
| | | R communitySwitchList(); |
| | | R communitySwitchList(@RequestParam("areaCode") String areaCode); |
| | | |
| | | /** |
| | | * 根据名字查询所有社区列表 |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/switch/community/search/list") |
| | | R communitySwitchSearchList(@RequestParam(value = "name") String name); |
| | | R communitySwitchSearchList(@RequestParam(value = "name") String name,@RequestParam(value = "areaCode") String areaCode); |
| | | |
| | | /** |
| | | * 根据经纬度以及距离搜索附近社区列表 |
| | |
| | | R indexVolunteerActList(@RequestBody PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 清网治格-根据事件分类获取近1月的社区事件数据 |
| | | * @param type |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/screen/event/list") |
| | | R getEventList(@RequestParam(value = "type") Integer type, @RequestParam(value = "communityId") Long communityId); |
| | | |
| | | /** |
| | | * 清网治格-社区事件数据分页 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/screen/event/page") |
| | | R pageEventList(@RequestBody PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 新增数字商业街商家 |
| | | * @param mcsMerchantDTO |
| | | * @return |
| | |
| | | * @return 角色集合 |
| | | */ |
| | | @PostMapping("/role/listrolebackstage") |
| | | R listRoleBackstage(@RequestParam("communityId") Long communityId,@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize); |
| | | R listRoleBackstage(@RequestParam("communityId") Long communityId,@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize,@RequestParam("areaCode")String areaCode); |
| | | |
| | | /** |
| | | * 分页查询后台用户 |
| | |
| | | * @return 运营后台数据看板 |
| | | */ |
| | | @PostMapping("datakanban") |
| | | R dataKanban(); |
| | | R dataKanban(@RequestParam("areaCode")String areaCode); |
| | | |
| | | /** |
| | | * 用户菜单获取 |
| | |
| | | * @return 用户数据统计汇总 |
| | | */ |
| | | @GetMapping("community/statistics") |
| | | R communityStatistics(); |
| | | R communityStatistics(@RequestParam("areaCode") String areaCode); |
| | | |
| | | /** |
| | | * 运营后台-用户数据统计导出 |
| | | * @return 用户数据 |
| | | */ |
| | | @GetMapping("community/statistics/export") |
| | | R communityStatisticsExport(); |
| | | R communityStatisticsExport(@RequestParam("areaCode") String areaCode); |
| | | |
| | | /** |
| | | * 通过UnionId获取用户信息 |
| | |
| | | R getUserInfoByUnionId(@RequestParam("unionId") String unionId); |
| | | |
| | | /** |
| | | * 小程序id获取相关信息 |
| | | * @param appId |
| | | * @return |
| | | */ |
| | | @GetMapping("/sysAppConfig/selectByAppid") |
| | | R<SysAppConfigVO> selectByAppid(@RequestParam("appId")String appId); |
| | | |
| | | /** |
| | | * 通过区域编码 类型获取动态模板id |
| | | * @param areaCode |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @GetMapping("/sysTemplateConfig/selectTemplate") |
| | | R<SysTemplateConfigVO> selectTemplate(@RequestParam("areaCode")String areaCode,@RequestParam("type")Integer type); |
| | | |
| | | /** |
| | | * 微商业街新增商家账号 |
| | | * @param mcsMerchantDTO |
| | | * @return 商家用户id |
| | |
| | | * 备注说明 |
| | | */ |
| | | public static void sendSubscribeJLDZ(String openId, String accessToken, String name, BigDecimal amount, |
| | | String remark) { |
| | | String remark,String templateId) { |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id(WxSubscribeConstants.JLFF_ID); |
| | | subscribeDTO.setTemplate_id(templateId); |
| | | List<TemplateParam> paras = new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("thing1", name));// 活动名称 |
| | | paras.add(new TemplateParam("amount3", amount.toString()));// 奖励金额 |
| | |
| | | * 审核结果 |
| | | */ |
| | | public static void sendSubscribeRZSH(String openId, String accessToken, String name, String applyTime, |
| | | String result) { |
| | | String result,String templateId) { |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id(WxSubscribeConstants.EZSH_ID); |
| | | subscribeDTO.setTemplate_id(templateId); |
| | | List<TemplateParam> paras = new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("thing2", name));// 认证内容 |
| | | paras.add(new TemplateParam("phrase1", result));// 审核结果 |
| | |
| | | * 审核时间 |
| | | */ |
| | | public static void sendSubscribeSHZT(String openId, String accessToken, String name, String applyTime, |
| | | String result) { |
| | | String result,String templateId) { |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id(WxSubscribeConstants.SHZT_ID); |
| | | subscribeDTO.setTemplate_id(templateId); |
| | | List<TemplateParam> paras = new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("thing1", name));// 审核项目 |
| | | paras.add(new TemplateParam("phrase2", result));// 审核状态 |
| | |
| | | * @param time |
| | | * 活动时间 |
| | | */ |
| | | public static void sendSubscribeHDQX(String openId, String accessToken, String name, String time) { |
| | | public static void sendSubscribeHDQX(String openId, String accessToken, String name, String time,String templateId) { |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id(WxSubscribeConstants.HDQX_ID); |
| | | subscribeDTO.setTemplate_id(templateId); |
| | | List<TemplateParam> paras = new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("thing1", name));// 活动标题 |
| | | paras.add(new TemplateParam("date2", time));// 活动时间 |
| | |
| | | * @param content |
| | | * 回复内容 |
| | | */ |
| | | public static void sendSubscribeLYHF(String openId, String accessToken, String name, String time, String content) { |
| | | public static void sendSubscribeLYHF(String openId, String accessToken, String name, String time, String content,String templateId) { |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id(WxSubscribeConstants.LYHF_ID); |
| | | subscribeDTO.setTemplate_id(templateId); |
| | | List<TemplateParam> paras = new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("thing3", content));// 回复内容 |
| | | paras.add(new TemplateParam("name1", name));// 回复者 |
| | |
| | | * 活动地点 |
| | | */ |
| | | public static void sendSubscribeHDBG(String openId, String accessToken, String name, String changeTime, |
| | | String changeAddress, String time, String address) { |
| | | String changeAddress, String time, String address,String templateId) { |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id(WxSubscribeConstants.HDBG_ID); |
| | | subscribeDTO.setTemplate_id(templateId); |
| | | List<TemplateParam> paras = new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("thing1", name));// 活动名称 |
| | | paras.add(new TemplateParam("time2", changeTime));// 活动时间变更 |
| | |
| | | * 活动参加人数 |
| | | */ |
| | | public static void sendSubscribeHDJJKS(String openId, String accessToken, String name, String time, String address, |
| | | String num) { |
| | | String num,String templateId) { |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id(WxSubscribeConstants.HDJJKS_ID); |
| | | subscribeDTO.setTemplate_id(templateId); |
| | | List<TemplateParam> paras = new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("thing1", name));// 活动名称 |
| | | paras.add(new TemplateParam("date2", time));// 活动时间 |
| | |
| | | * @param name 预约人 |
| | | * @param time 预约时间 |
| | | */ |
| | | public static void sendSubscribeYYTX(String openId, String accessToken, String result, String title, String name,String time){ |
| | | public static void sendSubscribeYYTX(String openId, String accessToken, String result, String title, String name,String time,String templateId){ |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id(WxSubscribeConstants.YYTX_ID); |
| | | subscribeDTO.setTemplate_id(templateId); |
| | | List<TemplateParam> paras=new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("phrase8",result));//预约结果 |
| | | paras.add(new TemplateParam("thing23",title));//预约主题 |
| | |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.Map; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import org.apache.commons.fileupload.FileItem; |
| | | import org.apache.commons.fileupload.FileItemFactory; |
| | | import org.apache.commons.fileupload.disk.DiskFileItemFactory; |
| | |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class WxXCXTempSend { |
| | | public class WxXCXTempSend extends BaseController { |
| | | |
| | | public static final String APP_ID = "wx0cef797390444b75"; |
| | | private static final String APP_SECRET = "c7ea9aaa7e391a487e8a5b9ba61045d1"; |
| | |
| | | try { |
| | | // 此处APP_ID APP_SECRET 在微信小程序后端可见 |
| | | // String accessTokenUrl = String.format(TEMP_URL, APP_ID, APP_SECRET); |
| | | String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=" + APP_ID + "&secret=" + APP_SECRET; |
| | | String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=" + getAppId() + "&secret=" + getAppSecret(); |
| | | String result = HttpClientUtil.httpGet(accessTokenUrl, null, null); |
| | | Map<String, Object> resultMap = JSON.parseObject(result, Map.class); |
| | | if (resultMap.containsKey("access_token")) { |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenResidentActStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenVolunteerActStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | @ApiOperation(value = "查询所有社区", response = StreetAllAppletsVO.class) |
| | | @GetMapping("/list/act") |
| | | public R list() { |
| | | return communityService.communitySwitchList(); |
| | | return communityService.communitySwitchList(this.getAreaCode()); |
| | | } |
| | | |
| | | @ApiOperation(value = "清网治格-根据事件分类获取近1月的社区事件数据", response = EventGridIncidentStatisticsVO.class) |
| | | @ApiImplicitParam(name = "type", value = "事件状态(1治安防控、2民生服务、3矛盾劝解、4不稳定因素、5突发事件报告、6特殊人群服务、9防灾减灾、10其他", required = true) |
| | | @GetMapping("/event/list") |
| | | public R getEventList(@RequestParam(value = "type") Integer type) { |
| | | return communityService.getEventList(type, this.getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "清网治格-社区事件数据分页", response = EventGridIncidentStatisticsVO.class) |
| | | @PostMapping("/event/page") |
| | | public R pageEventList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | if (isNull(pageBaseDTO.getCommunityId())) { |
| | | pageBaseDTO.setCommunityId(this.getCommunityId()); |
| | | } |
| | | return communityService.pageEventList(pageBaseDTO); |
| | | } |
| | | } |
| | |
| | | Long communityId = this.getCommunityId(); |
| | | pageReserveDTO.setCommunityId(communityId); |
| | | } |
| | | pageReserveDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageReserveAdmin(pageReserveDTO); |
| | | } |
| | | |
| | |
| | | return R.fail("请先登录"); |
| | | } |
| | | makeHandleDTO.setUserId(loginUserInfo.getUserId()); |
| | | makeHandleDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.makeHandleAdmin(makeHandleDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "查询西区社区列表") |
| | | @GetMapping("/westList/noToken") |
| | | public R getWestCommunityLists() { |
| | | return communityService.getWestCommunityLists(); |
| | | return communityService.getWestCommunityLists(null); |
| | | } |
| | | } |
| | |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | } |
| | | if(StringUtils.isNotEmpty(this.getAreaCode())){ |
| | | comSwPatrolRecordPageDTO.setAreaCode(this.getAreaCode()); |
| | | } |
| | | return communityService.pageSafetyWorkRecord(comSwPatrolRecordPageDTO); |
| | | } |
| | | |
| | |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | } |
| | | comSwPatrolRecordPageDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageDangerReport(comSwPatrolRecordPageDTO); |
| | | } |
| | | |
| | |
| | | import javax.validation.Valid; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActActivityTypeVO; |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.ObjectUtils; |
| | |
| | | if (R.isOk(r2)) { |
| | | log.info("新增取消社区活动通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | } |
| | | |
| | | R<SysTemplateConfigVO> r4=userService.selectTemplate(this.getAreaCode(),3); |
| | | // 取消社区活动推送订阅消息给用户 |
| | | WxUtil.sendSubscribeHDQX(activitySignVO1.getOpenid(), accessToken, |
| | | comActActivityVO.getActivityName(), |
| | | DateUtils.format(comActActivityVO.getBeginAt(), DateUtils.ymdhms_format)); |
| | | DateUtils.format(comActActivityVO.getBeginAt(), DateUtils.ymdhms_format),r4.getData().getTemplateId()); |
| | | }); |
| | | } catch (Exception e) { |
| | | log.error("新增取消社区活动通知失败,错误原因:" + e.getMessage()); |
| | |
| | | @ApiOperation(value = "查询西区社区列表") |
| | | @GetMapping("community/westList") |
| | | public R getWestCommunityLists() { |
| | | return communityService.getWestCommunityLists(); |
| | | return communityService.getWestCommunityLists(this.getAreaCode()); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍详情", response = ComActEasyPhotoVO.class) |
| | |
| | | result = result.substring(0, 4); |
| | | result += "…"; |
| | | } |
| | | R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(this.getAreaCode(),4); |
| | | WxUtil.sendSubscribeSHZT(openid, util.getAppAccessToken(), "微心愿", |
| | | DateUtils.format(comActMicroWishVO1.getExamineAt(), DateUtils.ymdhms_format), |
| | | result); |
| | | result,sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | if (R.isOk(userResult)) { |
| | | String openid = userResult.getData().toString(); |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(this.getAreaCode(),4); |
| | | try { |
| | | WxUtil.sendSubscribeSHZT(openid, util.getAppAccessToken(), "微心愿", |
| | | DateUtils.format(comActMicroWishVO1.getExamineAt(), DateUtils.ymdhms_format), |
| | | "审核通过"); |
| | | "审核通过",sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | if(comActEasyPhotoVO.getHandlerId() == null){ |
| | | comActEasyPhotoVO.setHandlerId(userId); |
| | | } |
| | | R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(this.getAreaCode(),4); |
| | | R r = communityService.putEasypHotoStatus(comActEasyPhotoVO); |
| | | if (R.isOk(r)) { |
| | | R r1 = communityService.detailEasyPhoto(id, userId); |
| | |
| | | result += "…"; |
| | | } |
| | | WxUtil.sendSubscribeSHZT(openid, util.getAppAccessToken(), "随手拍", |
| | | DateUtils.format(comActEasyPhotoVO1.getExamineAt(), DateUtils.ymdhms_format), result); |
| | | DateUtils.format(comActEasyPhotoVO1.getExamineAt(), DateUtils.ymdhms_format), result,sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | WxUtil.sendSubscribeSHZT(openid, util.getAppAccessToken(), "随手拍", |
| | | DateUtils.format(comActEasyPhotoVO1.getExamineAt(), DateUtils.ymdhms_format), "审核通过"); |
| | | DateUtils.format(comActEasyPhotoVO1.getExamineAt(), DateUtils.ymdhms_format), "审核通过",sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | @PostMapping("grantReward") |
| | | public R grantReward(@Valid @RequestBody GrantRewardDTO grantRewardDTO) { |
| | | grantRewardDTO.setUserId(this.getUserId()); |
| | | grantRewardDTO.setAreaCode(this.getAreaCode()); |
| | | if (grantRewardDTO.getAmount() == null || grantRewardDTO.getAmount().compareTo(BigDecimal.ZERO) < -1) { |
| | | return R.fail("您输入的发放金额有误"); |
| | | } |
| | |
| | | @ApiOperation(value = "社区下拉列表", response = ComActVO.class) |
| | | @GetMapping("/community") |
| | | public R listCommunity() { |
| | | return communityService.listCommunityAll(); |
| | | return communityService.listCommunityAll(this.getAreaCode()); |
| | | } |
| | | |
| | | @Deprecated |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | |
| | | if (R.isOk(userResult)) { |
| | | String openid = userResult.getData().toString(); |
| | | R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(this.getAreaCode(),5); |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | WxUtil.sendSubscribeRZSH(openid, util.getAppAccessToken(), "志愿者认证", |
| | | DateUtils.format(comMngVolunteerMngVO1.getCreateAt(), DateUtils.ymdhms_format), "审核通过"); |
| | | DateUtils.format(comMngVolunteerMngVO1.getCreateAt(), DateUtils.ymdhms_format), "审核通过",sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | |
| | | if (R.isOk(userResult)) { |
| | | String openid = userResult.getData().toString(); |
| | | R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(this.getAreaCode(),5); |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | WxUtil.sendSubscribeRZSH(openid, util.getAppAccessToken(), "志愿者认证", |
| | | DateUtils.format(comMngVolunteerMngVO1.getCreateAt(), DateUtils.ymdhms_format), |
| | | "审核驳回,驳回原因:" + comMngVolunteerMngVO1.getRejectReson()); |
| | | "审核驳回,驳回原因:" + comMngVolunteerMngVO1.getRejectReson(),sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import com.panzhihua.community_backstage.config.MinioUtil; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | R r1 = userService.getUserOpenId(userId); |
| | | if (R.isOk(r1)) { |
| | | String openid = r1.getData().toString(); |
| | | R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(this.getAreaCode(),5); |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | WxUtil.sendSubscribeRZSH(openid, util.getAppAccessToken(), "党员认证", |
| | | DateUtils.format(vo1.getCreateAt(), DateUtils.ymdhms_format), "审核通过"); |
| | | DateUtils.format(vo1.getCreateAt(), DateUtils.ymdhms_format), "审核通过",sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | R r2 = userService.getUserOpenId(userId); |
| | | if (R.isOk(r2)) { |
| | | String openid = r2.getData().toString(); |
| | | R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(this.getAreaCode(),5); |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | WxUtil.sendSubscribeRZSH(openid, util.getAppAccessToken(), "党员认证", |
| | | DateUtils.format(vo1.getCreateAt(), DateUtils.ymdhms_format), |
| | | "审核驳回,驳回原因:" + partyBuildingMemberVO.getRefuseReason()); |
| | | "审核驳回,驳回原因:" + partyBuildingMemberVO.getRefuseReason(),sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | R addFeedback(@Validated @RequestBody EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO) { |
| | | ClazzUtils.setIfStringIsEmpty(eldersAuthFeedbackAddDTO); |
| | | eldersAuthFeedbackAddDTO.setUserId(getUserId()); |
| | | eldersAuthFeedbackAddDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.addFeedback(eldersAuthFeedbackAddDTO); |
| | | } |
| | | |
| | |
| | | @PostMapping("/authRecords/examine") |
| | | public R examineElderAuthRecords(@RequestBody ComElderAuthRecordVO comElderAuthRecordVO) { |
| | | comElderAuthRecordVO.setApproverId(this.getUserId()); |
| | | comElderAuthRecordVO.setAreaCode(this.getAreaCode()); |
| | | return communityService.examineElderAuthRecords(comElderAuthRecordVO); |
| | | } |
| | | |
| | |
| | | @PostMapping("/pensionAuthRecords/examine") |
| | | public R examinePensionAuthRecords(@RequestBody ComPensionAuthRecordVO comPensionAuthRecordVO) { |
| | | comPensionAuthRecordVO.setApproverId(this.getUserId()); |
| | | comPensionAuthRecordVO.setAreaCode(this.getAreaCode()); |
| | | return communityService.examinePensionAuthRecords(comPensionAuthRecordVO); |
| | | } |
| | | |
| | |
| | | R addPensionAuthRecordVO(@RequestBody ComElderAuthRecordVO comElderAuthRecordVO){ |
| | | comElderAuthRecordVO.setSubmitUserId(this.getUserId()); |
| | | comElderAuthRecordVO.setCommunityId(this.getCommunityId()); |
| | | comElderAuthRecordVO.setAreaCode(this.getAreaCode()); |
| | | return communityService.addPensionAuthRecordVO(comElderAuthRecordVO); |
| | | } |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | return R.fail("房屋租售id主键不能为空"); |
| | | } |
| | | R r = communityService.putOpsHouse(comOpsHouseVO); |
| | | |
| | | R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(this.getAreaCode(),4); |
| | | Date nowDate = new Date(); |
| | | //查询用户openid |
| | | R userResult = null; |
| | |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | WxUtil.sendSubscribeSHZT(openid, util.getAppAccessToken(), "房屋租售", |
| | | DateUtils.format(nowDate, DateUtils.ymdhms_format), "审核通过"); |
| | | DateUtils.format(nowDate, DateUtils.ymdhms_format), "审核通过",sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | result += "…"; |
| | | } |
| | | WxUtil.sendSubscribeSHZT(openid, util.getAppAccessToken(), "房屋租售", |
| | | DateUtils.format(nowDate, DateUtils.ymdhms_format), result); |
| | | DateUtils.format(nowDate, DateUtils.ymdhms_format), result,sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | @GetMapping("listrolebackstage") |
| | | public R listRoleBackstage(@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize) { |
| | | Long communityId = this.getCommunityId(); |
| | | return userService.listRoleBackstage(communityId,pageNum,pageSize); |
| | | return userService.listRoleBackstage(communityId,pageNum,pageSize,""); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询后台用户", response = AdministratorsUserVO.class) |
| | |
| | | public R indexVolunteerActList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | return bigScreenStatisticsService.indexVolunteerActList(pageBaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 清网治格-根据事件分类获取近1月的社区事件数据 |
| | | * @param type |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/event/list") |
| | | public R getEventList(@RequestParam(value = "type") Integer type, @RequestParam(value = "communityId") Long communityId) { |
| | | return bigScreenStatisticsService.getEventList(type, communityId); |
| | | } |
| | | |
| | | /** |
| | | * 清网治格-社区事件数据分页 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/event/page") |
| | | public R pageEventList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | return bigScreenStatisticsService.pageEventList(pageBaseDTO); |
| | | } |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActActivityTypeVO; |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import com.panzhihua.service_community.dao.ComActActEvaluateDAO; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.*; |
| | |
| | | * @return 社区集合 按照创建顺序倒序排列 |
| | | */ |
| | | @PostMapping("listcommunityall") |
| | | public R listCommunityAll() { |
| | | return comActService.listCommunityAll(); |
| | | public R listCommunityAll(@RequestParam("areaCode") String areaCode) { |
| | | return comActService.listCommunityAll(areaCode); |
| | | } |
| | | |
| | | /** |
| | |
| | | String openid = map.get("openid"); |
| | | try { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(eldersAuthFeedbackAddDTO.getAreaCode(),5); |
| | | String accessToken = util.getAppAccessToken(); |
| | | WxUtil.sendSubscribeRZSH(openid, accessToken, "高龄认证", |
| | | DateUtils.format(eldersAuthDO.getCreateAt(), DateUtils.ymdhms_format), |
| | | eldersAuthFeedbackAddDTO.getFeedBack()); |
| | | eldersAuthFeedbackAddDTO.getFeedBack(),sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("推送审核状态订阅消息失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/eventgrid/community/westList") |
| | | public R getWestCommunityLists() { |
| | | return comActService.getWestCommunityLists(); |
| | | public R getWestCommunityLists(String areaCode) { |
| | | return comActService.getWestCommunityLists(areaCode); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/community/all/list") |
| | | public R getCommunityAllList() { |
| | | return comActService.getCommunityAllList(); |
| | | public R getCommunityAllList(@RequestParam("areaCode") String areaCode) { |
| | | return comActService.getCommunityAllList(areaCode); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/community/search/list") |
| | | public R communitySwitchSearchList(@RequestParam(value = "name") String name) { |
| | | return comActService.communitySwitchSearchList(name); |
| | | public R communitySwitchSearchList(@RequestParam(value = "name") String name,@RequestParam(value = "areaCode") String areaCode) { |
| | | return comActService.communitySwitchSearchList(name,areaCode); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R delectStreat(@RequestBody List<Long> Ids) { |
| | | R r = comStreetService.delectStreat(Ids); |
| | | return R.ok(r); |
| | | return r; |
| | | } |
| | | |
| | | } |
| | |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @GetMapping("workGuide/classify/getList") |
| | | public R getWorkGuideClassifyList() { |
| | | return comActWorkGuideClassifyService.getWorkGuideClassifyList(); |
| | | public R getWorkGuideClassifyList(@RequestParam("areaCode")String areaCode) { |
| | | return comActWorkGuideClassifyService.getWorkGuideClassifyList(areaCode); |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | //package com.panzhihua.service_community.config; |
| | | // |
| | | //import java.lang.reflect.Method; |
| | | //import java.util.Arrays; |
| | | //import java.util.List; |
| | | //import java.util.Map; |
| | | //import java.util.stream.Collectors; |
| | | //import java.util.stream.IntStream; |
| | | // |
| | | //import javax.servlet.http.HttpServletRequest; |
| | | //import javax.servlet.http.HttpServletResponse; |
| | | // |
| | | //import org.aspectj.lang.ProceedingJoinPoint; |
| | | //import org.aspectj.lang.annotation.Around; |
| | | //import org.aspectj.lang.annotation.Aspect; |
| | | //import org.aspectj.lang.annotation.Pointcut; |
| | | //import org.aspectj.lang.reflect.MethodSignature; |
| | | //import org.slf4j.Logger; |
| | | //import org.slf4j.LoggerFactory; |
| | | //import org.springframework.core.LocalVariableTableParameterNameDiscoverer; |
| | | //import org.springframework.stereotype.Component; |
| | | //import org.springframework.util.ObjectUtils; |
| | | // |
| | | //import com.alibaba.fastjson.JSONObject; |
| | | //import com.panzhihua.common.model.vos.R; |
| | | //import com.panzhihua.common.utlis.DateUtils; |
| | | // |
| | | //import lombok.extern.slf4j.Slf4j; |
| | | // |
| | | ///** |
| | | // * 应用模块名称 |
| | | // * <p> |
| | | // * 代码描述 |
| | | // * <p> |
| | | // * 拦截controller,输出入参、响应内容和响应时间 Copyright: Copyright (C) 2021 XXX, Inc. All rights reserved. |
| | | // * <p> |
| | | // * Company: 成都呐喊信息技术有限公司 |
| | | // * <p> |
| | | // * |
| | | // * @author manailin |
| | | // * @since 2021/8/24 15:30 |
| | | // */ |
| | | //@Slf4j |
| | | //@Aspect |
| | | //@Component |
| | | //public class ParamOutAspect { |
| | | // |
| | | // /** |
| | | // * 记录特定日志的声明 |
| | | // */ |
| | | // private final Logger slowClassAndMethodLog = LoggerFactory.getLogger("slowClassAndMethodLog"); |
| | | // /** |
| | | // * 设定方法的执行时间限制毫秒数 |
| | | // */ |
| | | // private long maxReduceTime = 100; |
| | | // |
| | | // @Pointcut("execution(* com.panzhihua.service_community.api..*.*(..)) || execution (public * com.panzhihua.service_community.service..* (..))") |
| | | // public void aspect() {} |
| | | // |
| | | // /** |
| | | // * [方法描述] 环绕通知,拦截controller,输出请求参数、响应内容和响应时间 |
| | | // * |
| | | // * @param joinPoint |
| | | // * @return java.lang.Object |
| | | // * @author manailin |
| | | // * @date 2021/8/24 17:04 |
| | | // */ |
| | | // @Around("aspect()") |
| | | // public Object processLog(ProceedingJoinPoint joinPoint) { |
| | | // log.info("进入方法性能检查方法"); |
| | | // Method method = ((MethodSignature)joinPoint.getSignature()).getMethod(); |
| | | // String className = method.getDeclaringClass().getName(); |
| | | // // 获取方法名称 |
| | | // String methodName = method.getName(); |
| | | // // 获取参数名称 |
| | | // LocalVariableTableParameterNameDiscoverer paramNames = new LocalVariableTableParameterNameDiscoverer(); |
| | | // String[] params = paramNames.getParameterNames(method); |
| | | // // 获取参数 |
| | | // Object[] args = joinPoint.getArgs(); |
| | | // // 过滤掉request和response,不能序列化 |
| | | // List<Object> filteredArgs = Arrays.stream(args) |
| | | // .filter(arg -> (!(arg instanceof HttpServletRequest) && !(arg instanceof HttpServletResponse))) |
| | | // .collect(Collectors.toList()); |
| | | // JSONObject rqsJson = new JSONObject(); |
| | | // rqsJson.put("rqsMethod", methodName); |
| | | // rqsJson.put("rqsTime", DateUtils.getCurrentDateStr_MS()); |
| | | // if (ObjectUtils.isEmpty(filteredArgs)) { |
| | | // rqsJson.put("rqsParams", null); |
| | | // } else { |
| | | // // 拼接请求参数 |
| | | // Map<String, Object> rqsParams = IntStream.range(0, filteredArgs.size()).boxed() |
| | | // .collect(Collectors.toMap(j -> params[j], j -> filteredArgs.get(j))); |
| | | // rqsJson.put("rqsParams", rqsParams); |
| | | // } |
| | | // log.info(className + ":" + methodName + "请求信息为:" + rqsJson.toJSONString()); |
| | | // Object resObj = null; |
| | | // long startTime = System.currentTimeMillis(); |
| | | // try { |
| | | // // 执行原方法 |
| | | // resObj = joinPoint.proceed(args); |
| | | // } catch (Throwable e) { |
| | | // log.error(className + ":" + methodName + "方法执行异常!", e); |
| | | // // throw new ServiceException(methodName + "方法执行异常!"); |
| | | // } |
| | | // long endTime = System.currentTimeMillis(); |
| | | // if (resObj != null) { |
| | | // if (resObj instanceof R) { |
| | | // // 输出响应信息 |
| | | // R resJson = (R)resObj; |
| | | // // 打印耗时的信息 |
| | | // this.printExecTime(className , methodName,rqsJson,resJson, startTime, endTime); |
| | | // return resJson; |
| | | // } else { |
| | | // return resObj; |
| | | // } |
| | | // } else { |
| | | // return R.ok(); |
| | | // } |
| | | // } |
| | | // |
| | | // /** |
| | | // * [方法描述] 打印方法执行耗时的信息,如果超过了一定的时间,才打印 |
| | | // * |
| | | // * @param methodName |
| | | // * 执行方法名 |
| | | // * @param startTime |
| | | // * 执行开始时间 |
| | | // * @param endTime |
| | | // * 执行结束时间 |
| | | // * @author manailin |
| | | // * @date 2021/8/24 17:05 |
| | | // */ |
| | | // private void printExecTime(String className,String methodName, JSONObject rqsJson,R resJson, long startTime, long endTime) { |
| | | // long diffTime = endTime - startTime; |
| | | // if (diffTime > maxReduceTime) { |
| | | // slowClassAndMethodLog.info(className+":"+methodName + " 方法执行耗时:" + diffTime + " ms"); |
| | | // slowClassAndMethodLog.info(methodName + " 请求参数:" +rqsJson.toJSONString()); |
| | | // slowClassAndMethodLog.info(className + " 响应信息:" + JSONObject.toJSONString(resJson)); |
| | | // } |
| | | // // TODO 可以集成redis,将每个controller的执行时间追加到redis中,再用定时每周一次同步到库中 |
| | | // } |
| | | // |
| | | //} |
| | |
| | | |
| | | "<if test='comActActivityVO.choice == 0 '>" + "AND a.community_id = ${comActActivityVO.communityId} " + " </if> " |
| | | + |
| | | "<if test='comActActivityVO.areaCode !=null '>" + "AND ca.area_code = ${comActActivityVO.areaCode} " + " </if> " |
| | | + |
| | | |
| | | "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName.trim() != ""'>" |
| | | + " and a.activity_name like concat(#{comActActivityVO.activityName},'%') " + " </if> " |
| | |
| | | + "left join com_street as cs on cs.street_id = ca.street_id\n" + "where ca.community_id = ${communityId}") |
| | | ComPopulationActVO getPopulationActById(@Param("communityId") Long communityId); |
| | | |
| | | @Select("select `name`,street_id from com_street where area_code = '510423'") |
| | | List<StreetAllAppletsVO> getStreetList(); |
| | | @Select("select `name`,street_id from com_street where area_code = #{areaCode}") |
| | | List<StreetAllAppletsVO> getStreetList(String areaCode); |
| | | |
| | | @Select("select ca.`name`,ca.street_id,ca.community_id,cs.`name` as streetName from com_act as ca left join com_street as cs on cs.street_id = ca.street_id where ca.state = 0 and ca.street_id = #{streetId}") |
| | | List<CommunitySwitchAllAppletsVO> getCommunityListByStreetId(@Param("streetId") Long streetId); |
| | |
| | | @Select("select ca.`name`,ca.street_id,ca.community_id,cs.`name` as streetName " + |
| | | "from com_act as ca " + |
| | | "left join com_street as cs on cs.street_id = ca.street_id " + |
| | | "where ca.state = 0 and ca.name like '%%' and cs.area_code = '510423'") |
| | | List<CommunitySwitchAllAppletsVO> getCommunityListByName(@Param("name") String name); |
| | | "where ca.state = 0 and ca.name like '%%' and cs.area_code = #{areaCode}") |
| | | List<CommunitySwitchAllAppletsVO> getCommunityListByName(@Param("name") String name,@Param("areaCode") String areaCode); |
| | | |
| | | @Select("SELECT c.community_id, c.`name`, c.street_id, cs.`name` as streetName," + |
| | | "round( ST_Distance_Sphere ( Point ( #{communityDTO.longitude}, #{communityDTO.latitude} ), Point ( c.lng, c.lat ) )/ 1000, 2 ) AS distance " + |
| | | "FROM com_act c left join com_street as cs on cs.street_id = c.street_id " + |
| | | "where cs.area_code = '510423' " + |
| | | "where cs.area_code = #{areaCode} " + |
| | | "HAVING distance >= 0 and distance <= #{communityDTO.distance} ORDER BY distance ASC") |
| | | List<CommunitySwitchAllAppletsVO> getCommunityListByNearby(@Param("communityDTO") SearchCommunityDTO communityDTO); |
| | | |
| | | @Select("select community_id,name,lng,lat from com_act where state = 0 and area_code = '510423' ") |
| | | List<EventGridCommunityAdminVO> getWestCommunityLists(); |
| | | @Select("select community_id,name,lng,lat from com_act where state = 0 <if test='areaCode !=null'> and area_code = #{areaCode} </if> ") |
| | | List<EventGridCommunityAdminVO> getWestCommunityLists(@Param("areaCode") String areCode); |
| | | |
| | | @Select("select account,plaintext_password as password from com_act where community_id = ${communityId}") |
| | | ComActPasswordVo getCommunityPassword(@Param("communityId") Long communityId); |
| | |
| | | + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " |
| | | + "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + "WHERE 1=1 " |
| | | + "<if test='comActDynVO.choice == 0 '>" + "and d.community_id = ${comActDynVO.communityId} " + " </if> " |
| | | + "<if test='comActDynVO.areaCode !=null '>" + "and ca.area_code = ${comActDynVO.areaCode} " + " </if> " |
| | | + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" |
| | | + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " |
| | | + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " |
| | |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<ComActEasyPhotoVO> selectStatisticsList(@Param("communityId") Long communityId); |
| | | List<StatisticsCommVO> selectStatisticsList(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 获取居民自治统计数据 |
| | |
| | | * @param date |
| | | * @return |
| | | */ |
| | | BigScreenStaticsReserveMonth biggestScreenMonth(@Param("communityId")Long communityId,@Param("date")String date); |
| | | BigScreenStaticsReserveMonth biggestScreenMonth(@Param("communityId")Long communityId,@Param("date")String date,@Param("year")String year); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageActWorkGuideDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideAppletsVO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideClassifyVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVO; |
| | |
| | | * 查询办事指南分类列表 |
| | | * @return 办事指南分类列表 |
| | | */ |
| | | List<ComActWorkGuideAppletsVO> listWorkGuideClassify(); |
| | | List<ComActWorkGuideAppletsVO> listWorkGuideClassify(String areaCode); |
| | | |
| | | } |
| | |
| | | + " <where>" |
| | | + "<if test='pageActWorkGuideDTO.classify != null'>" |
| | | + "and classify = #{pageActWorkGuideDTO.classify} " + " </if> " |
| | | + "<if test='pageActWorkGuideDTO.areaCode != null'>" |
| | | + "and area_code = #{pageActWorkGuideDTO.areaCode} " + " </if> " |
| | | + "<if test='pageActWorkGuideDTO.title != null and pageActWorkGuideDTO.title.trim() != ""'>" |
| | | + "and title like concat('%',#{pageActWorkGuideDTO.title},'%')" + " </if> " + " </where>" + "order by update_at desc" |
| | | + "</script>") |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.community.CascadeHouseDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | |
| | | Long countUsedCommunityPopulation(@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT " + "(SELECT COUNT(aa.age) FROM " |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = ${communityId}) as aa where aa.age<= 16) as age16," |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = ${communityId}) as aa where aa.age<= 18) as age16," |
| | | + "(SELECT COUNT(aa.age) FROM " |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = #{communityId}) AS aa WHERE aa.age > 16 and aa.age<= 27) AS age27," |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = #{communityId}) AS aa WHERE aa.age > 19 and aa.age<= 30) AS age27," |
| | | + "(SELECT COUNT(aa.age) FROM " |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 27 and aa.age<= 35) AS age35," |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 31 and aa.age<= 40) AS age35," |
| | | + "(SELECT COUNT(aa.age) FROM " |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 35 and aa.age<= 45) AS age45," |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 41 and aa.age<= 50) AS age45," |
| | | + "(SELECT COUNT(aa.age) FROM " |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 45 and aa.age<= 55) AS age55," |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 51 and aa.age<= 59) AS age55," |
| | | + "(SELECT COUNT(aa.age) FROM " |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 55) AS age55over") |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age >= 60 and aa.age<= 79) AS age65," |
| | | + "(SELECT COUNT(aa.age) FROM " |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age >= 80 and aa.age<= 89) AS age75," |
| | | + "(SELECT COUNT(aa.age) FROM " |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 89) AS age55over") |
| | | Map<String, Long> indexCountByAge(@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT " + " id, " + " su.nick_name AS userName, " + " su.image_url, " + " caep.create_at, " |
| | |
| | | IndexDynamic indexDynamic(Long communityId); |
| | | |
| | | /** |
| | | * 大屏事件数据 |
| | | * 大屏30天內事件数据 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<EventGridIncidentStatisticsVO> getGridsGovernanceEventList(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 分页查询事件数据 |
| | | * @param page |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | IPage<EventGridIncidentStatisticsVO> pageEventList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 大屏事件详情新处理方式 |
| | | * @param eventId |
| | | * @return |
| | | */ |
| | | EventNewStatisticsVO getEventScreenSSPDateilNew(@Param("eventId") Long eventId); |
| | | } |
| | |
| | | |
| | | @Select("<script> " + "select * from com_mng_vaccines" + " <where>" |
| | | + "<if test='vaccinesByAdminDTO.name != null and vaccinesByAdminDTO.name != ""'>" |
| | | + "`name` like concat('%',#{vaccinesByAdminDTO.name},'%') " + " </if> " + " </where>" |
| | | + "`name` like concat('%',#{vaccinesByAdminDTO.name},'%') " + " </if> " |
| | | + "<if test='vaccinesByAdminDTO.areaCode != null and vaccinesByAdminDTO.areaCode != ""'>" |
| | | + "`area_code` = #{vaccinesByAdminDTO.areaCode} " + " </if> " |
| | | + " </where>" |
| | | + " order by create_at desc" + " </script>") |
| | | IPage<VaccinesByAppVO> getVaccinesByName(Page page, |
| | | @Param("vaccinesByAdminDTO") VaccinesByAdminDTO vaccinesByAdminDTO); |
| | |
| | | |
| | | @Select("<script> " + "SELECT d.*,\n" + "u.name userName,u.type as userType\n" + "FROM\n" + "com_ops_house d\n" |
| | | + " LEFT JOIN sys_user u ON d.user_id = u.user_id\n" |
| | | + " LEFT JOIN com_act ca ON d.community_id = ca.community_id\n" |
| | | + " LEFT JOIN com_mng_struct_area sa ON d.house_community_id = sa.id \n" + "where 1=1 " |
| | | + "<if test='pageComOpsHouseDTO.communityId != null '>" |
| | | + "AND ( d.community_id = ${pageComOpsHouseDTO.communityId} or sa.community_id = ${pageComOpsHouseDTO.communityId} )\n" |
| | | + " </if> " |
| | | + "<if test='pageComOpsHouseDTO.areaCode != null '>" |
| | | + "AND ca.area_code = #{pageComOpsHouseDTO.areaCode}" |
| | | + " </if> " + |
| | | |
| | | "<if test='pageComOpsHouseDTO.userId != null '>" + "AND d.user_id=#{pageComOpsHouseDTO.userId} \n" + " </if> " |
| | | + "<if test='pageComOpsHouseDTO.orient != null '>" + "AND d.orient=#{pageComOpsHouseDTO.orient} \n" + " </if> " |
| | | + "<if test='pageComOpsHouseDTO.houseType != null '>" + "AND d.house_type=#{pageComOpsHouseDTO.houseType} \n" |
| | |
| | | * @param date |
| | | * @return |
| | | */ |
| | | BigScreenActivityLine selectActivityCountMonth(@Param("communityId")Long communityId, @Param("date")String date); |
| | | BigScreenActivityLine selectActivityCountMonth(@Param("communityId")Long communityId, @Param("date")String date,@Param("year")String year); |
| | | |
| | | /** |
| | | * 查询党员积分前3 |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.SysTemplateConfig; |
| | | |
| | | /** |
| | | * (SysTemplateConfig)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 14:46:03 |
| | | */ |
| | | @Mapper |
| | | public interface SysTemplateConfigDao extends BaseMapper<SysTemplateConfig> { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * (SysTemplateConfig)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 14:46:03 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class SysTemplateConfig implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 159008627741278306L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 模板id |
| | | */ |
| | | @ApiModelProperty(value = "模板id") |
| | | private String templateId; |
| | | |
| | | /** |
| | | * 模板类型 1活动变更 2留言回复 3活动取消 4审核状态 5认证审核 6调研问卷 7奖励发放 8报名成功 9活动即将开始 10预约提醒 |
| | | */ |
| | | @ApiModelProperty(value = "模板类型 1活动变更 2留言回复 3活动取消 4审核状态 5认证审核 6调研问卷 7奖励发放 8报名成功 9活动即将开始 10预约提醒 ") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 区域编码 |
| | | */ |
| | | @ApiModelProperty(value = "区域编码") |
| | | private String areaCode; |
| | | |
| | | } |
| | |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | private String areaCode; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActEasyPhotoClassifyDO{" + "id=" + id + ", name=" + name + ", status=" + status + ", weight=" |
| | |
| | | * 系统预置:1-是 0-否 |
| | | */ |
| | | private Integer sysFlag; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | @TableField("`lat`") |
| | | private String lat; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | |
| | | private String areaCode; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComMngVaccinesDO{" + "id=" + id + ", name=" + name + ", describe=" + describe + ", status=" + status |
| | |
| | | * 更新人 |
| | | */ |
| | | private Long updatedBy; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | * 更新人 |
| | | */ |
| | | private Long updatedBy; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | R indexVolunteerActList(PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 清网治格-根据事件分类获取近1月的社区事件数据 |
| | | * @param type |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R getEventList(Integer type, Long communityId); |
| | | |
| | | /** |
| | | * 清网治格-社区事件数据分页 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | R pageEventList(PageBaseDTO pageBaseDTO); |
| | | } |
| | |
| | | * |
| | | * @return 社区集合 按照创建顺序倒序排列 |
| | | */ |
| | | R listCommunityAll(); |
| | | R listCommunityAll(String areaCode); |
| | | |
| | | /** |
| | | * 删除社区 |
| | |
| | | * |
| | | * @return 社区列表 |
| | | */ |
| | | R getWestCommunityLists(); |
| | | R getWestCommunityLists(String areaCode); |
| | | |
| | | /** |
| | | * 查询社区所有列表 |
| | | * |
| | | * @return 社区列表 |
| | | */ |
| | | R getCommunityAllList(); |
| | | R getCommunityAllList(String areaCode); |
| | | |
| | | /** |
| | | * 根据名字查询所有社区列表 |
| | |
| | | * 社区名字 |
| | | * @return 社区列表 |
| | | */ |
| | | R communitySwitchSearchList(String name); |
| | | R communitySwitchSearchList(String name,String areaCode); |
| | | |
| | | /** |
| | | * 根据经纬度以及距离搜索附近社区列表 |
| | |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | R getWorkGuideClassifyList(); |
| | | R getWorkGuideClassifyList(String areaCode); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComPbMemberDAO; |
| | |
| | | |
| | | @Override |
| | | public R partyActivityLine(Long communityId) { |
| | | List<BigScreenActivityLine> bigScreenActivityLines=this.getPoints(); |
| | | List<BigScreenActivityLine> bigScreenActivityLines=this.getPastMonth(); |
| | | bigScreenActivityLines.forEach(bigScreenActivityLine -> { |
| | | BigScreenActivityLine bigScreenActivityLine1=comPbMemberDAO.selectActivityCountMonth(communityId,bigScreenActivityLine.getX()); |
| | | BigScreenActivityLine bigScreenActivityLine1=comPbMemberDAO.selectActivityCountMonth(communityId,bigScreenActivityLine.getX(),bigScreenActivityLine.getYear()); |
| | | bigScreenActivityLine.setY(bigScreenActivityLine1.getY()); |
| | | bigScreenActivityLine.setCountY(bigScreenActivityLine1.getCountY()); |
| | | bigScreenActivityLine.setX(bigScreenActivityLine.getYear().substring(2,4)+"-"+bigScreenActivityLine.getX()); |
| | | }); |
| | | return R.ok(bigScreenActivityLines); |
| | | } |
| | |
| | | return bigScreenActivityLines; |
| | | } |
| | | |
| | | public List<BigScreenActivityLine> getPastMonth(){ |
| | | List<BigScreenActivityLine> bigScreenActivityLines=new ArrayList<>(); |
| | | for(int i=11;i>=0;i--){ |
| | | BigScreenActivityLine bigScreenActivityLine=new BigScreenActivityLine(); |
| | | String date=DateUtils.getDateFormatString(DateUtils.addMonth(new Date(),-i),"MM"); |
| | | String year=DateUtils.getDateFormatString(DateUtils.addMonth(new Date(),-i),"yyyy"); |
| | | bigScreenActivityLine.setX(date); |
| | | bigScreenActivityLine.setYear(year); |
| | | bigScreenActivityLines.add(bigScreenActivityLine); |
| | | } |
| | | return bigScreenActivityLines; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenResidentActStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenVolunteerActStatisticsInfo; |
| | | import com.panzhihua.service_community.dao.ComActActivityDAO; |
| | | import com.panzhihua.service_community.dao.ComActCommitteeDao; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenMicroWishStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenNeighborStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenQuestionnaireStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenResidentActStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenVolunteerActStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.GridsGovernanceStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.ResidentAutonomyStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.event.EventGridStatisticsVO; |
| | | import com.panzhihua.service_community.dao.ComActActivityDAO; |
| | | import com.panzhihua.service_community.dao.ComActCommitteeDao; |
| | | import com.panzhihua.service_community.dao.ComActDiscussDAO; |
| | | import com.panzhihua.service_community.dao.ComActDynDAO; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoDAO; |
| | |
| | | if (isNull(statisticsVO)) { |
| | | statisticsVO = new ResidentAutonomyStatisticsVO(); |
| | | } |
| | | List<ComActEasyPhotoVO> easyPhotoVOList = comActEasyPhotoDAO.selectStatisticsList(communityId); |
| | | List<StatisticsCommVO> easyPhotoHistogram = comActEasyPhotoDAO.selectStatisticsList(communityId); |
| | | //随手拍总数 |
| | | Integer easyPhotoTotalCount = 0; |
| | | //随手拍柱状统计 |
| | | List<StatisticsCommVO> easyPhotoHistogram = new ArrayList<>(); |
| | | if (Objects.nonNull(easyPhotoVOList) && !easyPhotoVOList.isEmpty()) { |
| | | Map<String, List<ComActEasyPhotoVO>> easyPhotoVOMap = easyPhotoVOList.stream().collect(Collectors.groupingBy(ComActEasyPhotoVO::getClassifyName)); |
| | | for (Map.Entry<String, List<ComActEasyPhotoVO>> entry : easyPhotoVOMap.entrySet()) { |
| | | StatisticsCommVO commVO = new StatisticsCommVO(); |
| | | commVO.setFiled(entry.getKey()); |
| | | commVO.setNum(entry.getValue().size()); |
| | | easyPhotoHistogram.add(commVO); |
| | | } |
| | | easyPhotoTotalCount = easyPhotoVOList.size(); |
| | | if (Objects.nonNull(easyPhotoHistogram) && !easyPhotoHistogram.isEmpty()) { |
| | | easyPhotoTotalCount = easyPhotoHistogram.stream().map(StatisticsCommVO::getNum).mapToInt(Integer::intValue).sum(); |
| | | } |
| | | statisticsVO.setEasyPhotoTotalCount(easyPhotoTotalCount); |
| | | statisticsVO.setEasyPhotoHistogram(easyPhotoHistogram); |
| | |
| | | statisticsVO.setNeighborContents(neighborContents); |
| | | |
| | | //报事报修新增折线数据 |
| | | Date nowDate = new Date(); |
| | | List<StatisticsCommVO> repairAddPolylineData = comPropertyDao.getRepairPolylineDate(communityId); |
| | | int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); |
| | | for (int i = 1; i <= currentMon; i++) { |
| | | String temp; |
| | | if (i > 9) { |
| | | temp = "" + i; |
| | | } else { |
| | | temp = "0" + i; |
| | | } |
| | | boolean isExist = repairAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && |
| | | e.getFiled().endsWith(temp)); |
| | | if (!isExist) { |
| | | StatisticsCommVO other = new StatisticsCommVO(); |
| | | other.setFiled(temp); |
| | | other.setNum(0); |
| | | repairAddPolylineData.add(other); |
| | | } |
| | | } |
| | | repairAddPolylineData = repairAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) |
| | | .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); |
| | | statisticsVO.setRepairAddPolylineData(repairAddPolylineData); |
| | | //报事报修累计折线数据 |
| | | List<StatisticsCommVO> repairTotalPolylineData = new ArrayList<>(); |
| | | String year = new SimpleDateFormat("yyyy").format(nowDate); |
| | | repairAddPolylineData.forEach(e -> { |
| | | StatisticsCommVO temp = comPropertyDao.getRepairTotalPolylineDate(communityId, year + e.getFiled()); |
| | | StatisticsCommVO temp = comPropertyDao.getRepairTotalPolylineDate(communityId, e.getFiled()); |
| | | temp.setFiled(e.getFiled()); |
| | | repairTotalPolylineData.add(temp); |
| | | }); |
| | |
| | | List<StatisticsCommVO> residentActHistogram = comActActivityDAO.selectResidentActHistogramData(communityId, true); |
| | | //居民活动新增数据 |
| | | List<StatisticsCommVO> actAddPolylineData = comActActivityDAO.getActAddPolylineData(communityId, true); |
| | | for (int i = 1; i <= currentMon; i++) { |
| | | String temp; |
| | | if (i > 9) { |
| | | temp = "" + i; |
| | | } else { |
| | | temp = "0" + i; |
| | | } |
| | | boolean isExist = actAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && |
| | | e.getFiled().endsWith(temp)); |
| | | if (!isExist) { |
| | | StatisticsCommVO other = new StatisticsCommVO(); |
| | | other.setFiled(temp); |
| | | other.setNum(0); |
| | | actAddPolylineData.add(other); |
| | | } |
| | | } |
| | | actAddPolylineData = actAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) |
| | | .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); |
| | | //居民活动发布总数 |
| | | int residentActTotalCount = 0; |
| | | if (!residentActHistogram.isEmpty()) { |
| | | residentActTotalCount = residentActHistogram.stream().map(StatisticsCommVO::getNum).mapToInt(Integer::intValue).sum(); |
| | | } |
| | | statisticsVO.setResidentActTotalCount(residentActTotalCount); |
| | | // statisticsVO.setResidentActHistogram(residentActHistogram); |
| | | statisticsVO.setResidentActHistogram(actAddPolylineData); |
| | | //业主委员会党员占比 |
| | | List<StatisticsCommVO> committeePartyPercent = comActCommitteeDao.selectCommitteePartyPercent(communityId); |
| | |
| | | }); |
| | | } |
| | | statisticsVO.setVillageStatisticsList(villageStatisticsList); |
| | | // 查询社区事件列表 |
| | | List<EventGridIncidentStatisticsVO> gridIncidentList = comMngPopulationDAO.getGridsGovernanceEventList(communityId); |
| | | statisticsVO.setGridIncidentList(gridIncidentList); |
| | | //事件分析新增折线数据 |
| | | Date nowDate = new Date(); |
| | | List<StatisticsCommVO> eventAddPolylineData = comPropertyDao.getEventAddPolylineData(communityId); |
| | | int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); |
| | | for (int i = 1; i <= currentMon; i++) { |
| | | String temp; |
| | | if (i > 9) { |
| | | temp = "" + i; |
| | | } else { |
| | | temp = "0" + i; |
| | | } |
| | | boolean isExist = eventAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && |
| | | e.getFiled().endsWith(temp)); |
| | | if (!isExist) { |
| | | StatisticsCommVO other = new StatisticsCommVO(); |
| | | other.setFiled(temp); |
| | | other.setNum(0); |
| | | eventAddPolylineData.add(other); |
| | | } |
| | | } |
| | | eventAddPolylineData = eventAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) |
| | | .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); |
| | | statisticsVO.setEventAddPolylineData(eventAddPolylineData); |
| | | //事件分析累计折线数据 |
| | | List<StatisticsCommVO> eventTotalPolylineData = new ArrayList<>(); |
| | | String year = new SimpleDateFormat("yyyy").format(nowDate); |
| | | eventAddPolylineData.forEach(e -> { |
| | | StatisticsCommVO temp = comPropertyDao.getEventTotalPolylineDate(communityId, year + e.getFiled()); |
| | | StatisticsCommVO temp = comPropertyDao.getEventTotalPolylineDate(communityId, e.getFiled()); |
| | | temp.setFiled(e.getFiled()); |
| | | eventTotalPolylineData.add(temp); |
| | | }); |
| | |
| | | //微心愿新增折线数据 |
| | | Date nowDate = new Date(); |
| | | List<StatisticsCommVO> microWishAddPolylineData = comActMicroWishDAO.getMicroWishAddPolylineData(communityId); |
| | | int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); |
| | | for (int i = 1; i <= currentMon; i++) { |
| | | String temp; |
| | | if (i > 9) { |
| | | temp = "" + i; |
| | | } else { |
| | | temp = "0" + i; |
| | | } |
| | | boolean isExist = microWishAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && |
| | | e.getFiled().endsWith(temp)); |
| | | if (!isExist) { |
| | | StatisticsCommVO other = new StatisticsCommVO(); |
| | | other.setFiled(temp); |
| | | other.setNum(0); |
| | | microWishAddPolylineData.add(other); |
| | | } |
| | | } |
| | | microWishAddPolylineData = microWishAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) |
| | | .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); |
| | | statisticsInfo.setMicroWishAddPolylineData(microWishAddPolylineData); |
| | | //微心愿累计折线数据 |
| | | List<StatisticsCommVO> microWishTotalPolylineData = new ArrayList<>(); |
| | | String year = new SimpleDateFormat("yyyy").format(nowDate); |
| | | microWishAddPolylineData.forEach(e -> { |
| | | StatisticsCommVO temp = comActMicroWishDAO.getMicroWishTotalPolylineDate(communityId, year + e.getFiled()); |
| | | StatisticsCommVO temp = comActMicroWishDAO.getMicroWishTotalPolylineDate(communityId, e.getFiled()); |
| | | temp.setFiled(e.getFiled()); |
| | | microWishTotalPolylineData.add(temp); |
| | | }); |
| | |
| | | //随手拍新增折线数据 |
| | | Date nowDate = new Date(); |
| | | List<StatisticsCommVO> easyPhotoAddPolylineData = comActEasyPhotoDAO.getEasyPhotoAddPolylineData(communityId); |
| | | int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); |
| | | for (int i = 1; i <= currentMon; i++) { |
| | | String temp; |
| | | if (i > 9) { |
| | | temp = "" + i; |
| | | } else { |
| | | temp = "0" + i; |
| | | } |
| | | boolean isExist = easyPhotoAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && |
| | | e.getFiled().endsWith(temp)); |
| | | if (!isExist) { |
| | | StatisticsCommVO other = new StatisticsCommVO(); |
| | | other.setFiled(temp); |
| | | other.setNum(0); |
| | | easyPhotoAddPolylineData.add(other); |
| | | } |
| | | } |
| | | easyPhotoAddPolylineData = easyPhotoAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) |
| | | .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); |
| | | statisticsInfo.setEasyPhotoAddPolylineData(easyPhotoAddPolylineData); |
| | | //随手拍累计折线数据 |
| | | List<StatisticsCommVO> easyPhotoTotalPolylineData = new ArrayList<>(); |
| | | String year = new SimpleDateFormat("yyyy").format(nowDate); |
| | | easyPhotoAddPolylineData.forEach(e -> { |
| | | StatisticsCommVO temp = comActEasyPhotoDAO.getEasyPhotoTotalPolylineDate(communityId, year + e.getFiled()); |
| | | StatisticsCommVO temp = comActEasyPhotoDAO.getEasyPhotoTotalPolylineDate(communityId, e.getFiled()); |
| | | temp.setFiled(e.getFiled()); |
| | | easyPhotoTotalPolylineData.add(temp); |
| | | }); |
| | |
| | | public R indexQuestionnaire(Long communityId) { |
| | | BigScreenQuestionnaireStatisticsInfo statisticsInfo = comActQuestnaireDAO.getIndexQuestionnaireBaseData(communityId); |
| | | //社区问卷新增折线数据 |
| | | Date nowDate = new Date(); |
| | | List<StatisticsCommVO> questionnaireAddPolylineData = comActQuestnaireDAO.getQuestionnaireAddPolylineData(communityId); |
| | | int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); |
| | | for (int i = 1; i <= currentMon; i++) { |
| | | String temp; |
| | | if (i > 9) { |
| | | temp = "" + i; |
| | | } else { |
| | | temp = "0" + i; |
| | | } |
| | | boolean isExist = questionnaireAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && |
| | | e.getFiled().endsWith(temp)); |
| | | if (!isExist) { |
| | | StatisticsCommVO other = new StatisticsCommVO(); |
| | | other.setFiled(temp); |
| | | other.setNum(0); |
| | | questionnaireAddPolylineData.add(other); |
| | | } |
| | | } |
| | | questionnaireAddPolylineData = questionnaireAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) |
| | | .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); |
| | | statisticsInfo.setQuestionnaireAddPolylineData(questionnaireAddPolylineData); |
| | | //社区问卷累计折线数据 |
| | | List<StatisticsCommVO> questionnaireTotalPolylineData = new ArrayList<>(); |
| | | String year = new SimpleDateFormat("yyyy").format(nowDate); |
| | | questionnaireAddPolylineData.forEach(e -> { |
| | | StatisticsCommVO temp = comActQuestnaireDAO.getQuestionnaireTotalPolylineDate(communityId, year + e.getFiled()); |
| | | StatisticsCommVO temp = comActQuestnaireDAO.getQuestionnaireTotalPolylineDate(communityId, e.getFiled()); |
| | | temp.setFiled(e.getFiled()); |
| | | questionnaireTotalPolylineData.add(temp); |
| | | }); |
| | |
| | | statisticsInfo.setDynNum(dynCircleData.stream().map(StatisticsCommVO::getNum).mapToInt(Integer::intValue).sum()); |
| | | } |
| | | //社区动态新增折线数据 |
| | | Date nowDate = new Date(); |
| | | List<StatisticsCommVO> dynAddPolylineData = comActDynDAO.getDynAddPolylineData(communityId); |
| | | int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); |
| | | for (int i = 1; i <= currentMon; i++) { |
| | | String temp; |
| | | if (i > 9) { |
| | | temp = "" + i; |
| | | } else { |
| | | temp = "0" + i; |
| | | } |
| | | boolean isExist = dynAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && |
| | | e.getFiled().endsWith(temp)); |
| | | if (!isExist) { |
| | | StatisticsCommVO other = new StatisticsCommVO(); |
| | | other.setFiled(temp); |
| | | other.setNum(0); |
| | | dynAddPolylineData.add(other); |
| | | } |
| | | } |
| | | dynAddPolylineData = dynAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) |
| | | .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); |
| | | statisticsInfo.setDynAddPolylineData(dynAddPolylineData); |
| | | //社区动态累计折线数据 |
| | | List<StatisticsCommVO> dynTotalPolylineData = new ArrayList<>(); |
| | | String year = new SimpleDateFormat("yyyy").format(nowDate); |
| | | dynAddPolylineData.forEach(e -> { |
| | | StatisticsCommVO temp = comActDynDAO.getDynTotalPolylineDate(communityId, year + e.getFiled()); |
| | | StatisticsCommVO temp = comActDynDAO.getDynTotalPolylineDate(communityId, e.getFiled()); |
| | | temp.setFiled(e.getFiled()); |
| | | dynTotalPolylineData.add(temp); |
| | | }); |
| | |
| | | statisticsInfo.setPublishTopicNum(neighborCircleData.stream().filter(e -> !"无话题".equals(e.getFiled())).collect(Collectors.toList()).size()); |
| | | } |
| | | //邻里圈新增折线数据 |
| | | Date nowDate = new Date(); |
| | | List<StatisticsCommVO> neighborAddPolylineData = comActNeighborCircleDAO.getNeighborAddPolylineData(communityId); |
| | | int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); |
| | | for (int i = 1; i <= currentMon; i++) { |
| | | String temp; |
| | | if (i > 9) { |
| | | temp = "" + i; |
| | | } else { |
| | | temp = "0" + i; |
| | | } |
| | | boolean isExist = neighborAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && |
| | | e.getFiled().endsWith(temp)); |
| | | if (!isExist) { |
| | | StatisticsCommVO other = new StatisticsCommVO(); |
| | | other.setFiled(temp); |
| | | other.setNum(0); |
| | | neighborAddPolylineData.add(other); |
| | | } |
| | | } |
| | | neighborAddPolylineData = neighborAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) |
| | | .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); |
| | | statisticsInfo.setNeighborAddPolylineData(neighborAddPolylineData); |
| | | //邻里圈累计折线数据 |
| | | List<StatisticsCommVO> neighborTotalPolylineData = new ArrayList<>(); |
| | | String year = new SimpleDateFormat("yyyy").format(nowDate); |
| | | neighborAddPolylineData.forEach(e -> { |
| | | StatisticsCommVO temp = comActNeighborCircleDAO.getNeighborTotalPolylineDate(communityId, year + e.getFiled()); |
| | | StatisticsCommVO temp = comActNeighborCircleDAO.getNeighborTotalPolylineDate(communityId, e.getFiled()); |
| | | temp.setFiled(e.getFiled()); |
| | | neighborTotalPolylineData.add(temp); |
| | | }); |
| | |
| | | statisticsInfo.setServiceTypeNum(serviceTypeCircleData.size()); |
| | | } |
| | | //服务次数(目前暂时使用浏览量)新增折线数据 |
| | | Date nowDate = new Date(); |
| | | List<StatisticsCommVO> serviceTimesAddPolylineData = convenientMerchantDAO.getServiceTimesAddPolylineData(communityId); |
| | | int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); |
| | | for (int i = 1; i <= currentMon; i++) { |
| | | String temp; |
| | | if (i > 9) { |
| | | temp = "" + i; |
| | | } else { |
| | | temp = "0" + i; |
| | | } |
| | | boolean isExist = serviceTimesAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && |
| | | e.getFiled().endsWith(temp)); |
| | | if (!isExist) { |
| | | StatisticsCommVO other = new StatisticsCommVO(); |
| | | other.setFiled(temp); |
| | | other.setNum(0); |
| | | serviceTimesAddPolylineData.add(other); |
| | | } |
| | | } |
| | | serviceTimesAddPolylineData = serviceTimesAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) |
| | | .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); |
| | | statisticsInfo.setServiceTimesAddPolylineData(serviceTimesAddPolylineData); |
| | | //服务次数(目前暂时使用浏览量)累计折线数据 |
| | | List<StatisticsCommVO> serviceTimesTotalPolylineData = new ArrayList<>(); |
| | | String year = new SimpleDateFormat("yyyy").format(nowDate); |
| | | serviceTimesAddPolylineData.forEach(e -> { |
| | | StatisticsCommVO temp = convenientMerchantDAO.getServiceTimesTotalPolylineDate(communityId, year + e.getFiled()); |
| | | StatisticsCommVO temp = convenientMerchantDAO.getServiceTimesTotalPolylineDate(communityId, e.getFiled()); |
| | | temp.setFiled(e.getFiled()); |
| | | serviceTimesTotalPolylineData.add(temp); |
| | | }); |
| | |
| | | } |
| | | statisticsInfo.setPublishNum(publishNum); |
| | | //居民活动新增折线数据 |
| | | Date nowDate = new Date(); |
| | | List<StatisticsCommVO> actAddPolylineData = comActActivityDAO.getActAddPolylineData(communityId, true); |
| | | int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); |
| | | for (int i = 1; i <= currentMon; i++) { |
| | | String temp; |
| | | if (i > 9) { |
| | | temp = "" + i; |
| | | } else { |
| | | temp = "0" + i; |
| | | } |
| | | boolean isExist = actAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && |
| | | e.getFiled().endsWith(temp)); |
| | | if (!isExist) { |
| | | StatisticsCommVO other = new StatisticsCommVO(); |
| | | other.setFiled(temp); |
| | | other.setNum(0); |
| | | actAddPolylineData.add(other); |
| | | } |
| | | } |
| | | actAddPolylineData = actAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) |
| | | .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); |
| | | statisticsInfo.setActAddPolylineData(actAddPolylineData); |
| | | //居民活动累计折线数据 |
| | | List<StatisticsCommVO> actTotalPolylineData = new ArrayList<>(); |
| | | String year = new SimpleDateFormat("yyyy").format(nowDate); |
| | | actAddPolylineData.forEach(e -> { |
| | | StatisticsCommVO temp = comActActivityDAO.getActTotalPolylineData(communityId, true, year + e.getFiled()); |
| | | StatisticsCommVO temp = comActActivityDAO.getActTotalPolylineData(communityId, true, e.getFiled()); |
| | | temp.setFiled(e.getFiled()); |
| | | actTotalPolylineData.add(temp); |
| | | }); |
| | |
| | | } |
| | | statisticsInfo.setPublishNum(publishNum); |
| | | //志愿者活动新增折线数据 |
| | | Date nowDate = new Date(); |
| | | List<StatisticsCommVO> actAddPolylineData = comActActivityDAO.getActAddPolylineData(communityId, false); |
| | | int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); |
| | | for (int i = 1; i <= currentMon; i++) { |
| | | String temp; |
| | | if (i > 9) { |
| | | temp = "" + i; |
| | | } else { |
| | | temp = "0" + i; |
| | | } |
| | | boolean isExist = actAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && |
| | | e.getFiled().endsWith(temp)); |
| | | if (!isExist) { |
| | | StatisticsCommVO other = new StatisticsCommVO(); |
| | | other.setFiled(temp); |
| | | other.setNum(0); |
| | | actAddPolylineData.add(other); |
| | | } |
| | | } |
| | | actAddPolylineData = actAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) |
| | | .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); |
| | | statisticsInfo.setActAddPolylineData(actAddPolylineData); |
| | | //志愿者活动累计折线数据 |
| | | List<StatisticsCommVO> actTotalPolylineData = new ArrayList<>(); |
| | | String year = new SimpleDateFormat("yyyy").format(nowDate); |
| | | actAddPolylineData.forEach(e -> { |
| | | StatisticsCommVO temp = comActActivityDAO.getActTotalPolylineData(communityId, false, year + e.getFiled()); |
| | | StatisticsCommVO temp = comActActivityDAO.getActTotalPolylineData(communityId, false, e.getFiled()); |
| | | temp.setFiled(e.getFiled()); |
| | | actTotalPolylineData.add(temp); |
| | | }); |
| | |
| | | return R.ok(comActActivityDAO.indexActList(page, pageBaseDTO, false)); |
| | | } |
| | | |
| | | /** |
| | | * 清网治格-根据事件分类获取近1月的社区事件数据 |
| | | * @param type |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getEventList(Integer type, Long communityId) { |
| | | // 查询社区事件列表 |
| | | List<EventGridIncidentStatisticsVO> gridIncidentList = comMngPopulationDAO.getGridsGovernanceEventList(communityId); |
| | | List<EventGridIncidentStatisticsVO> returnGridIncidentList = new ArrayList<>(); |
| | | if (!gridIncidentList.isEmpty()) { |
| | | gridIncidentList.forEach(e -> { |
| | | if (e.getEventType().equals(2)) { |
| | | String[] lngLatString = e.getLatLng().split(","); |
| | | e.setLatLng(lngLatString[1] + "," + lngLatString[0]); |
| | | } |
| | | }); |
| | | returnGridIncidentList = gridIncidentList.stream().filter(e -> type.equals(e.getType())).collect(Collectors.toList()); |
| | | } |
| | | return R.ok(returnGridIncidentList); |
| | | } |
| | | |
| | | /** |
| | | * 清网治格-社区事件数据分页 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pageEventList(PageBaseDTO pageBaseDTO) { |
| | | Page page = retrievePage(pageBaseDTO); |
| | | IPage<EventGridIncidentStatisticsVO> iPage = comMngPopulationDAO.pageEventList(page, pageBaseDTO); |
| | | List<EventGridIncidentStatisticsVO> gridIncidentList = iPage.getRecords(); |
| | | if (!gridIncidentList.isEmpty()) { |
| | | gridIncidentList.forEach(e -> { |
| | | if (e.getEventType().equals(2)) { |
| | | String[] lngLatString = e.getLatLng().split(","); |
| | | e.setLatLng(lngLatString[1] + "," + lngLatString[0]); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | private Page retrievePage(PageBaseDTO pageBaseDTO) { |
| | | Long pageNum = pageBaseDTO.getPageNum(); |
| | | Long size = pageBaseDTO.getPageSize(); |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.service_community.dao.ComActActEvaluateDAO; |
| | | import com.panzhihua.service_community.dao.ComActActPictureDAO; |
| | | import com.panzhihua.service_community.dao.ComActActRegistDAO; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | | import com.panzhihua.service_community.dao.ComActActivityCodeDao; |
| | | import com.panzhihua.service_community.dao.ComActActivityDAO; |
| | | import com.panzhihua.service_community.dao.ComBpActivityDAO; |
| | | import com.panzhihua.service_community.entity.ComActActivityCode; |
| | | import com.panzhihua.service_community.model.dos.ComActActEvaluateDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActPictureDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActRegistDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActSignDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActivityDO; |
| | | import com.panzhihua.service_community.service.ComActActivityCodeService; |
| | | import com.panzhihua.service_community.service.ComActActivityService; |
| | | import com.panzhihua.service_community.service.ComActIntegralUserTradeService; |
| | |
| | | private ComActIntegralUserTradeService comActIntegralUserTradeService; |
| | | @Resource |
| | | private ComActActivityCodeService comActActivityCodeService; |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | |
| | | /** |
| | | * 新增社区活动 |
| | |
| | | try { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | String accessToken = util.getAppAccessToken(); |
| | | |
| | | ComActDO comActDO=comActDAO.selectById(comActActivityDO.getCommunityId()); |
| | | R<SysTemplateConfigVO> r=userService.selectTemplate(comActDO.getAreaCode(),1); |
| | | activitySignVOS.forEach(activitySignVO1 -> { |
| | | // 变更社区活动推送订阅消息给用户 |
| | | WxUtil.sendSubscribeHDBG(activitySignVO1.getOpenid(), accessToken, |
| | |
| | | comActActivityDO.getActivityAddr(), |
| | | com.panzhihua.common.utlis.DateUtils.format(comActActivityVO.getBeginAt(), |
| | | com.panzhihua.common.utlis.DateUtils.ymdhms_format), |
| | | comActActivityVO.getActivityAddr()); |
| | | comActActivityVO.getActivityAddr(),r.getData().getTemplateId()); |
| | | }); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | |
| | | public R listActivity(Long userId, Integer status) { |
| | | List<ActivitySignVO> activitySignVOList = comActActSignDAO.selectList(userId); |
| | | if (ObjectUtils.isEmpty(activitySignVOList)) { |
| | | return R.fail(); |
| | | return R.ok(); |
| | | } |
| | | List<Long> longs = activitySignVOList.stream().map(activitySignVO -> activitySignVO.getActivityId()) |
| | | .collect(Collectors.toList()); |
| | |
| | | try { |
| | | String accessToken = util.getAppAccessToken(); |
| | | actActivityList.forEach(actActivity -> { |
| | | ComActDO comActDO=comActDAO.selectById(actActivity.getCommunityId()); |
| | | R<SysTemplateConfigVO> r=userService.selectTemplate(comActDO.getAreaCode(),9); |
| | | // 查询报名活动人员列表 |
| | | List<ComActActSignDO> actSignList = comActActSignDAO.selectList(new QueryWrapper<ComActActSignDO>() |
| | | .lambda().eq(ComActActSignDO::getActivityId, actActivity.getId())); |
| | |
| | | // 查询用户openId |
| | | Map<String, String> map = comActActSignDAO.getUserOpenId(actSign.getUserId()); |
| | | if (map != null) { |
| | | |
| | | String openid = map.get("openid"); |
| | | // 推送消息 |
| | | WxUtil.sendSubscribeHDJJKS(openid, accessToken, actActivity.getActivityName(), |
| | | com.panzhihua.common.utlis.DateUtils.format(actActivity.getBeginAt(), |
| | | com.panzhihua.common.utlis.DateUtils.ymdhms_format), |
| | | actActivity.getActivityAddr(), actSignList.size() + ""); |
| | | actActivity.getActivityAddr(), actSignList.size() + "",r.getData().getTemplateId()); |
| | | } |
| | | |
| | | }); |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.BannerVO; |
| | | import com.panzhihua.service_community.entity.SysTemplateConfig; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | private ComActReserveMapper comActReserveMapper; |
| | | @Resource |
| | | private ComActActivityDAO comActActivityDAO; |
| | | |
| | | @Resource |
| | | private SysTemplateConfigDao sysTemplateConfigDao; |
| | | /** |
| | | * 分页查询随手拍 |
| | | * |
| | |
| | | Map<String, String> map = comActActSignDAO.getUserOpenId(easyPhotoDO.getSponsorId()); |
| | | if (map != null) { |
| | | String openid = map.get("openid"); |
| | | SysTemplateConfig sysTemplateConfig=sysTemplateConfigDao.selectOne(new QueryWrapper<SysTemplateConfig>().lambda().eq(SysTemplateConfig::getAreaCode, grantRewardDTO.getAreaCode()).eq(SysTemplateConfig::getType,7)); |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | WxUtil.sendSubscribeJLDZ(openid, util.getAppAccessToken(), "随手拍有奖活动", |
| | | grantRewardDTO.getAmount(), activityType); |
| | | grantRewardDTO.getAmount(), activityType,sysTemplateConfig.getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | |
| | | private ComActMessageBackDAO comActMessageBackDAO; |
| | | @Resource |
| | | private ComActActSignDAO comActActSignDAO; |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @Override |
| | | public R addMessage(ComActMessageVO comActMessageVO) { |
| | |
| | | if (map != null) { |
| | | String openid = map.get("openid"); |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | ComActDO comActDO=comActDAO.selectById(comActMessageBackVO.getCommunityId()); |
| | | R<SysTemplateConfigVO> r=userService.selectTemplate(comActDO.getAreaCode(),2); |
| | | try { |
| | | WxUtil.sendSubscribeLYHF(openid, util.getAppAccessToken(), comActMessageBackVO.getUserName(), |
| | | DateUtils.format(new Date(), DateUtils.ymdhms_format), comActMessageBackVO.getMsgContent()); |
| | | DateUtils.format(new Date(), DateUtils.ymdhms_format), comActMessageBackVO.getMsgContent(),r.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | bigScreenStaticsReserve.setGasPercent(BigDecimal.valueOf(bigScreenStaticsReserve.getGasCount()*100d/ bigScreenStaticsReserve.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | List<BigScreenStaticsReserveMonth> bigScreenStaticsReserveMonthList=this.getPoints(); |
| | | bigScreenStaticsReserveMonthList.forEach(bigScreenStaticsReserveMonth -> { |
| | | BigScreenStaticsReserveMonth bigScreenStaticsReserveMonth1=comActReserveRecordMapper.biggestScreenMonth(communityId,bigScreenStaticsReserveMonth.getX()); |
| | | BigScreenStaticsReserveMonth bigScreenStaticsReserveMonth1=comActReserveRecordMapper.biggestScreenMonth(communityId,bigScreenStaticsReserveMonth.getX(), bigScreenStaticsReserveMonth.getYear()); |
| | | bigScreenStaticsReserveMonth.setCount(bigScreenStaticsReserveMonth1.getCount()); |
| | | bigScreenStaticsReserveMonth.setReserveCount(bigScreenStaticsReserveMonth1.getReserveCount()); |
| | | bigScreenStaticsReserveMonth.setFireCount(bigScreenStaticsReserveMonth1.getFireCount()); |
| | |
| | | aDate=i+""; |
| | | } |
| | | BigScreenStaticsReserveMonth bigScreenStaticsReserveMonth=new BigScreenStaticsReserveMonth(); |
| | | bigScreenStaticsReserveMonth.setYear("2021"); |
| | | bigScreenStaticsReserveMonth.setX(aDate); |
| | | bigScreenStaticsReserveMonths.add(bigScreenStaticsReserveMonth); |
| | | } |
| | |
| | | } |
| | | BigScreenStaticsReserveMonth bigScreenStaticsReserveMonth=new BigScreenStaticsReserveMonth(); |
| | | bigScreenStaticsReserveMonth.setX(aDate); |
| | | bigScreenStaticsReserveMonth.setYear(nowYear); |
| | | bigScreenStaticsReserveMonths.add(bigScreenStaticsReserveMonth); |
| | | } |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | |
| | | private ComActReserveOperationRecordService comActReserveOperationRecordService; |
| | | @Resource |
| | | private ComActActSignDAO comActActSignDAO; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | private final static String CANCEL="用户取消"; |
| | | @Override |
| | |
| | | ComActReserveDO reserveDO = comActReserveMapper.selectById(reserveRecordDO.getReserveId()); |
| | | // 预约以后给用户推送消息 |
| | | Map<String, String> map = comActActSignDAO.getUserOpenId(reserveRecordDO.getUserId()); |
| | | |
| | | R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(makeHandleDTO.getAreaCode(),10); |
| | | //判断处理是否通过 |
| | | if(makeHandleDTO.getIsOk().equals(MakeHandleAdminDTO.isOk.yes)){ |
| | | reserveRecordDO.setStatus(ComActReserveRecordDO.status.cg); |
| | |
| | | String openid = map.get("openid"); |
| | | try { |
| | | WxUtil.sendSubscribeYYTX(openid, util.getAppAccessToken(), "预约成功", |
| | | reserveDO.getTitle(), reserveRecordDO.getName(), makeHandleDTO.getMakeTime()); |
| | | reserveDO.getTitle(), reserveRecordDO.getName(), makeHandleDTO.getMakeTime(),sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | String openid = map.get("openid"); |
| | | try { |
| | | WxUtil.sendSubscribeYYTX(openid, util.getAppAccessToken(), "预约失败", |
| | | reserveDO.getTitle(), reserveRecordDO.getName(), DateUtils.format(reserveRecordDO.getReserveTime(),DateUtils.ymdhms_format)); |
| | | reserveDO.getTitle(), reserveRecordDO.getName(), DateUtils.format(reserveRecordDO.getReserveTime(),DateUtils.ymdhms_format),sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | * @return 社区集合 按照创建顺序倒序排列 |
| | | */ |
| | | @Override |
| | | public R listCommunityAll() { |
| | | public R listCommunityAll(String areaCode) { |
| | | List<ComActDO> comActDOS = comActDAO.selectList(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getState, 0) |
| | | .eq(ComActDO::getCityCode, "510400").orderByDesc(ComActDO::getCreateAt)); |
| | | .eq(ComActDO::getAreaCode, areaCode).orderByDesc(ComActDO::getCreateAt)); |
| | | List<ComActVO> comActVOS = new ArrayList<>(); |
| | | if (!ObjectUtils.isEmpty(comActDOS)) { |
| | | comActDOS.forEach(comActDO -> { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R getWestCommunityLists() { |
| | | return R.ok(this.comActDAO.getWestCommunityLists()); |
| | | public R getWestCommunityLists(String areaCode) { |
| | | return R.ok(this.comActDAO.getWestCommunityLists(areaCode)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @Override |
| | | public R getCommunityAllList() { |
| | | public R getCommunityAllList(String areaCode) { |
| | | // 查询街道列表 |
| | | List<StreetAllAppletsVO> streetList = this.comActDAO.getStreetList(); |
| | | List<StreetAllAppletsVO> streetList = this.comActDAO.getStreetList(areaCode); |
| | | streetList.forEach(street -> { |
| | | // 查询街道下社区列表 |
| | | List<CommunitySwitchAllAppletsVO> communityList = |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @Override |
| | | public R communitySwitchSearchList(String name) { |
| | | return R.ok(this.comActDAO.getCommunityListByName(name)); |
| | | public R communitySwitchSearchList(String name,String areaCode) { |
| | | return R.ok(this.comActDAO.getCommunityListByName(name,areaCode)); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.service_community.entity.SysTemplateConfig; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private ComActEasyPhotoRewardMapper comActEasyPhotoRewardMapper; |
| | | @Resource |
| | | private ComActActSignDAO comActActSignDAO; |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private SysTemplateConfigDao sysTemplateConfigDao; |
| | | |
| | | /** |
| | | * 查询用户钱包信息 |
| | |
| | | Map<String, String> map = comActActSignDAO.getUserOpenId(easyPhotoDO.getSponsorId()); |
| | | if (map != null) { |
| | | String openid = map.get("openid"); |
| | | ComActDO comActDO=comActDAO.selectById(easyPhotoDO.getCommunityId()); |
| | | SysTemplateConfig sysTemplateConfig=sysTemplateConfigDao.selectOne(new QueryWrapper<SysTemplateConfig>().lambda().eq(SysTemplateConfig::getAreaCode, comActDO.getAreaCode()).eq(SysTemplateConfig::getType,7)); |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | WxUtil.sendSubscribeJLDZ(openid, util.getAppAccessToken(), "随手拍有奖活动", |
| | | amount.setScale(2, RoundingMode.HALF_UP), activityTypeName); |
| | | amount.setScale(2, RoundingMode.HALF_UP), activityTypeName,sysTemplateConfig.getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R getWorkGuideClassifyList() { |
| | | List<ComActWorkGuideClassifyDO> comActWorkGuideClassifyDOS = comActWorkGuideClassifyDAO.selectList(null); |
| | | public R getWorkGuideClassifyList(String areaCode) { |
| | | List<ComActWorkGuideClassifyDO> comActWorkGuideClassifyDOS = comActWorkGuideClassifyDAO.selectList(new QueryWrapper<ComActWorkGuideClassifyDO>().lambda().eq(ComActWorkGuideClassifyDO::getAreaCode,areaCode)); |
| | | List<ComActWorkGuideClassifyVO> comActWorkGuideClassifyVOList = new ArrayList<>(); |
| | | if (comActWorkGuideClassifyDOS != null && comActWorkGuideClassifyDOS.size() > 0) { |
| | | comActWorkGuideClassifyDOS.forEach(comActWorkGuideClassifyDO -> { |
| | |
| | | //结果数据集合 |
| | | List<ComActWorkGuideAppletsVO> resultList = new ArrayList<>(); |
| | | |
| | | List<ComActWorkGuideAppletsVO> workGuideClassifyList = comActWorkGuideClassifyDAO.listWorkGuideClassify(); |
| | | List<ComActWorkGuideAppletsVO> workGuideClassifyList = comActWorkGuideClassifyDAO.listWorkGuideClassify(pageActWorkGuideDTO.getAreaCode()); |
| | | //通过办事指南分类查询分类下办事指南 |
| | | workGuideClassifyList.forEach(workGuideClassify -> { |
| | | List<ComActWorkGuideDetailAppletsVO> workGuideList = this.baseMapper.getWorkGuideListByClassifyId(workGuideClassify.getId(),10L); |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ComElderAuthElderliesService; |
| | |
| | | private ComPensionAuthPensionerDAO comPensionAuthPensionerDAO; |
| | | @Resource |
| | | private ComElderAuthElderliesService comElderAuthElderliesService; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @Override |
| | | public R pageElderAuthRecords(PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | |
| | | comElderAuthRecordsDO.setApprovalDate(nowDate); |
| | | if (comElderAuthRecordVO.getApprovalStatus().equals(ComElderAuthRecordsDO.approvalStatus.tg)) { |
| | | comElderAuthRecordsDO.setAuthStatus(ComElderAuthRecordsDO.authStatus.yrz); |
| | | sendAuthSubscribe(comElderAuthRecordsDO.getSubmitUserId(), "高龄认证", "认证成功!"); |
| | | sendAuthSubscribe(comElderAuthRecordsDO.getSubmitUserId(), "高龄认证", "认证成功!",comElderAuthRecordVO.getAreaCode()); |
| | | |
| | | authElderliesDO.setAddress(comElderAuthRecordVO.getAddress()); |
| | | comElderAuthElderliesDAO.updateById(authElderliesDO); |
| | | } else { |
| | | sendAuthSubscribe(comElderAuthRecordsDO.getSubmitUserId(), "高龄认证", comElderAuthRecordVO.getRejectReason()); |
| | | sendAuthSubscribe(comElderAuthRecordsDO.getSubmitUserId(), "高龄认证", comElderAuthRecordVO.getRejectReason(),comElderAuthRecordVO.getAreaCode()); |
| | | } |
| | | // comElderAuthRecordsDO.setApprovalDate(new Date()); |
| | | int nub = comElderAuthRecordsDAO.updateById(comElderAuthRecordsDO); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | private void sendAuthSubscribe(Long userId, String name, String result) { |
| | | private void sendAuthSubscribe(Long userId, String name, String result,String areaCode) { |
| | | //发送订阅通知 |
| | | Map<String, String> map = comActActSignDAO.getUserOpenId(userId); |
| | | if (map != null) { |
| | |
| | | try { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | String accessToken = util.getAppAccessToken(); |
| | | R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(areaCode,5); |
| | | WxUtil.sendSubscribeRZSH(openid, accessToken, name, |
| | | DateUtils.format(new Date(), DateUtils.ymdhms_format), |
| | | result); |
| | | result,sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("推送审核状态订阅消息失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | return R.fail("认证失败,请重新尝试"); |
| | | } |
| | | if (addIdentityAuthDTO.getAuthMethod().intValue() == FACE_AUTH.getMethod()) { |
| | | sendAuthSubscribe(addIdentityAuthDTO.getSubmitUserId(), "高龄认证", "认证成功!"); |
| | | sendAuthSubscribe(addIdentityAuthDTO.getSubmitUserId(), "高龄认证", "认证成功!",addIdentityAuthDTO.getAreaCode()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | IndexPopulationAgeStatisticsVO ageStatisticsVO4 = new IndexPopulationAgeStatisticsVO(); |
| | | IndexPopulationAgeStatisticsVO ageStatisticsVO5 = new IndexPopulationAgeStatisticsVO(); |
| | | IndexPopulationAgeStatisticsVO ageStatisticsVO6 = new IndexPopulationAgeStatisticsVO(); |
| | | IndexPopulationAgeStatisticsVO ageStatisticsVO7 = new IndexPopulationAgeStatisticsVO(); |
| | | IndexPopulationAgeStatisticsVO ageStatisticsVO8 = new IndexPopulationAgeStatisticsVO(); |
| | | ageStatisticsVO1.setType(1); |
| | | ageStatisticsVO2.setType(2); |
| | | ageStatisticsVO3.setType(3); |
| | | ageStatisticsVO4.setType(4); |
| | | ageStatisticsVO5.setType(5); |
| | | ageStatisticsVO6.setType(6); |
| | | |
| | | ageStatisticsVO7.setType(7); |
| | | ageStatisticsVO8.setType(8); |
| | | if (ageMap.isEmpty()) { |
| | | ageStatisticsVO1.setSum(0); |
| | | ageStatisticsVO2.setSum(0); |
| | |
| | | ageStatisticsVO4.setSum(0); |
| | | ageStatisticsVO5.setSum(0); |
| | | ageStatisticsVO6.setSum(0); |
| | | ageStatisticsVO7.setSum(0); |
| | | ageStatisticsVO8.setSum(0); |
| | | } else { |
| | | int count=ageMap.get("age16").intValue()+ageMap.get("age27").intValue()+ageMap.get("age35").intValue() |
| | | +ageMap.get("age45").intValue()+ageMap.get("age55").intValue()+ageMap.get("age55over").intValue(); |
| | | +ageMap.get("age45").intValue()+ageMap.get("age55").intValue()+ageMap.get("age55over").intValue()+ageMap.get("age65").intValue()+ageMap.get("age75").intValue(); |
| | | ageStatisticsVO1.setSum(ageMap.get("age16").intValue()); |
| | | ageStatisticsVO1.setPercent(BigDecimal.valueOf(ageMap.get("age16").intValue()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | ageStatisticsVO2.setSum(ageMap.get("age27").intValue()); |
| | |
| | | ageStatisticsVO5.setPercent(BigDecimal.valueOf(ageMap.get("age55").intValue()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | ageStatisticsVO6.setSum(ageMap.get("age55over").intValue()); |
| | | ageStatisticsVO6.setPercent(BigDecimal.valueOf(ageMap.get("age55over").intValue()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | ageStatisticsVO7.setSum(ageMap.get("age65").intValue()); |
| | | ageStatisticsVO7.setPercent(BigDecimal.valueOf(ageMap.get("age65").intValue()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | ageStatisticsVO8.setSum(ageMap.get("age75").intValue()); |
| | | ageStatisticsVO8.setPercent(BigDecimal.valueOf(ageMap.get("age75").intValue()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | } |
| | | |
| | | agePopulationList.add(ageStatisticsVO1); |
| | |
| | | agePopulationList.add(ageStatisticsVO4); |
| | | agePopulationList.add(ageStatisticsVO5); |
| | | agePopulationList.add(ageStatisticsVO6); |
| | | agePopulationList.add(ageStatisticsVO7); |
| | | agePopulationList.add(ageStatisticsVO8); |
| | | return agePopulationList; |
| | | } |
| | | |
| | |
| | | public R getScreenEventDetail(BigScreenEventDetailDTO eventDetailDTO) { |
| | | EventNewStatisticsVO statisticsVO = new EventNewStatisticsVO(); |
| | | Integer eventType = eventDetailDTO.getEventType(); |
| | | if (eventDetailDTO.getType().equals(7) || (nonNull(eventType) && eventType.equals(2))) {// 随手拍详情 |
| | | boolean isNewReq = nonNull(eventType) && eventType.equals(2); |
| | | if (eventDetailDTO.getType().equals(7) || isNewReq) {// 随手拍详情 |
| | | if (isNewReq) { |
| | | statisticsVO = this.baseMapper.getEventScreenSSPDateilNew(eventDetailDTO.getEventId()); |
| | | } else { |
| | | statisticsVO = this.baseMapper.getEventScreenSSPDateil(eventDetailDTO.getEventId()); |
| | | } |
| | | if (statisticsVO != null && StringUtils.isNotEmpty(statisticsVO.getPhotoPathList())) { |
| | | statisticsVO.setDangerLevel("0"); |
| | | statisticsVO.setMajor(false); |
| | |
| | | if (!userTagList.isEmpty()) { |
| | | userTagList.forEach(userTag -> { |
| | | if (userTag != null) { |
| | | if(userTag.getTagName().equals("高龄老人")||userTag.getTagName().equals("残疾人")||userTag.getTagName().equals("低保户")||userTag.getTagName().equals("退役军人")||userTag.getTagName().equals("养老金人员")||userTag.getTagName().equals("低收入")){ |
| | | if(userTag.getTagName().equals("高龄老人")||userTag.getTagName().equals("残疾人")||userTag.getTagName().equals("低保户")||userTag.getTagName().equals("退役军人")||userTag.getTagName().equals("养老金人员")||userTag.getTagName().equals("低收入人群")){ |
| | | IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); |
| | | specialStatisticsVO.setTitle(userTag.getTagName()); |
| | | Integer count =0; |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ComPensionAuthPensionerService; |
| | |
| | | private ComPensionAuthPensionerService comPensionAuthPensionerService; |
| | | @Resource |
| | | private ComElderAuthElderliesDAO comElderAuthElderliesDAO; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @Override |
| | | public R pagePensionAuthRecords(PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | |
| | | BeanUtils.copyProperties(comPensionAuthRecordVO, comPensionAuthRecordDO); |
| | | if (comPensionAuthRecordVO.getApprovalStatus().equals(PASS_THROUGH.getStatus())) { |
| | | comPensionAuthRecordDO.setAuthStatus(CERTIFIED.getStatus()); |
| | | sendAuthSubscribe(comPensionAuthRecordDO.getSubmitUserId(), "养老认证", "认证成功!"); |
| | | sendAuthSubscribe(comPensionAuthRecordDO.getSubmitUserId(), "养老认证", "认证成功!", comPensionAuthRecordVO.getAreaCode()); |
| | | |
| | | authPensionerDO.setAddress(comPensionAuthRecordVO.getAddress()); |
| | | comPensionAuthPensionerDAO.updateById(authPensionerDO); |
| | | } else { |
| | | sendAuthSubscribe(comPensionAuthRecordDO.getSubmitUserId(), "养老认证", comPensionAuthRecordVO.getRejectReason()); |
| | | sendAuthSubscribe(comPensionAuthRecordDO.getSubmitUserId(), "养老认证", comPensionAuthRecordVO.getRejectReason(),comPensionAuthRecordVO.getAreaCode()); |
| | | } |
| | | comPensionAuthRecordDO.setApprovalDate(new Date()); |
| | | int nub = comPensionAuthRecordDAO.updateById(comPensionAuthRecordDO); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | private void sendAuthSubscribe(Long userId, String name, String result) { |
| | | private void sendAuthSubscribe(Long userId, String name, String result,String areaCode) { |
| | | //发送订阅通知 |
| | | Map<String, String> map = comActActSignDAO.getUserOpenId(userId); |
| | | if (map != null) { |
| | |
| | | try { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | String accessToken = util.getAppAccessToken(); |
| | | R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(areaCode,5); |
| | | WxUtil.sendSubscribeRZSH(openid, accessToken, name, |
| | | DateUtils.format(new Date(), DateUtils.ymdhms_format), |
| | | result); |
| | | result,sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("推送审核状态订阅消息失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | return R.fail("认证失败,请重新尝试"); |
| | | } |
| | | if (addIdentityAuthDTO.getAuthMethod().intValue() == FACE_AUTH.getMethod()) { |
| | | sendAuthSubscribe(comPensionAuthRecordDO.getSubmitUserId(), "养老认证", "认证成功!"); |
| | | sendAuthSubscribe(comPensionAuthRecordDO.getSubmitUserId(), "养老认证", "认证成功!", addIdentityAuthDTO.getAreaCode()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | if (pageComStreetDTO.getName() != null) { |
| | | userLambdaQueryWrapper.like(ComStreetDO::getName, pageComStreetDTO.getName()); |
| | | } |
| | | if (pageComStreetDTO.getAreaCode() != null) { |
| | | userLambdaQueryWrapper.like(ComStreetDO::getAreaCode, pageComStreetDTO.getAreaCode()); |
| | | } |
| | | Page userPage = new Page(pageNum, pageSize); |
| | | IPage<ComStreetDO> doPager = |
| | | comStreetDAO.selectPage(userPage, userLambdaQueryWrapper.orderByDesc(ComStreetDO::getCreateAt)); |
| | |
| | | private List<DynamicWorkVO> listHalfYearByDyn() { |
| | | List<DynamicWorkVO> dateList = new ArrayList<>(); |
| | | Date now = new Date(); |
| | | for (int i = 6; i >= 1; i--) { |
| | | for (int i = 5; i >= 0; i--) { |
| | | Date date = DateUtils.getDateM(now, -i); |
| | | DateTime endDay = DateUtil.endOfMonth(date); |
| | | |
| | | int m = DateUtil.month(endDay); |
| | | m++; |
| | | if (m == 12) { |
| | | m = 0; |
| | | } |
| | | int day = DateUtil.dayOfMonth(endDay); |
| | | int half = day / 2; |
| | | String month = DateUtil.format(date, moth_format_str); |
| | |
| | | return dateList; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | <configuration debug="false"> |
| | | <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径--> |
| | | <springProfile name="dev"> |
| | | <property name="LOG_HOME" value="F:/log" /> |
| | | <property name="LOG_HOME" value="F:\log"/> |
| | | </springProfile> |
| | | <springProfile name="test"> |
| | | <property name="LOG_HOME" value="/mnt/data/gocd/log" /> |
| | |
| | | <appender-ref ref="STDOUT" /> |
| | | <appender-ref ref="FILE" /> |
| | | </root> |
| | | |
| | | <!--慢接口和方法日志记录到不同的文件--> |
| | | <appender name="slowClassAndMethodAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <File>${LOG_HOME}/slow_service_community.log</File> |
| | | <append>true</append> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>INFO</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${LOG_HOME}/slow_service_community.%d.%i.log</fileNamePattern> |
| | | <maxHistory>10</maxHistory> |
| | | <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
| | | <maxFileSize>10MB</maxFileSize> |
| | | </timeBasedFileNamingAndTriggeringPolicy> |
| | | </rollingPolicy> |
| | | <encoder> |
| | | <pattern>%d{yyyy/MM/dd HH:mm:ss.SSS} %-5level [%thread] [%c{0}:%L] : %msg%n</pattern> |
| | | <charset>UTF-8</charset> |
| | | </encoder> |
| | | </appender> |
| | | |
| | | <!--这是我们定义的慢接口和方法日志传入的名称--> |
| | | <logger name="slowClassAndMethodLog" additivity="false" level="INFO"> |
| | | <appender-ref ref="slowClassAndMethodAppender"/> |
| | | </logger> |
| | | </configuration> |
| | |
| | | ) temp2 |
| | | </select> |
| | | <select id="getActAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT DATE_FORMAT( publish_at, '%m' ) AS filed, COUNT(id) AS num |
| | | SELECT filed, SUM(num) AS num FROM ( |
| | | SELECT DATE_FORMAT( publish_at, '%Y-%m' ) AS filed, COUNT(id) AS num |
| | | FROM com_act_activity |
| | | WHERE community_id = ${communityId} |
| | | <if test="isResidentAct"> |
| | |
| | | <if test="!isResidentAct"> |
| | | AND volunteer_max != 0 |
| | | </if> |
| | | AND DATE_FORMAT( publish_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed |
| | | AND DATE_FORMAT( publish_at, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | UNION ALL SELECT * FROM |
| | | ( |
| | | SELECT DATE_FORMAT(curdate(),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 1 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 2 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 3 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 4 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 5 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 6 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 7 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 8 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 9 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 10 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 11 month),'%Y-%m') AS filed, 0 AS num |
| | | ) temT |
| | | ) temp GROUP BY filed ORDER BY filed ASC |
| | | </select> |
| | | <select id="getActTotalPolylineData" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | |
| | | <if test="!isResidentAct"> |
| | | AND volunteer_max != 0 |
| | | </if> |
| | | AND DATE_FORMAT( publish_at, '%Y%m' ) <= #{date} |
| | | AND DATE_FORMAT( publish_at, '%Y-%m' ) <= #{date} |
| | | </select> |
| | | <select id="indexActList" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT id, `status`, activity_type, activity_name, cover |
| | |
| | | WHERE t1.community_id = ${communityId} AND t1.`status` = 1) temp2 |
| | | </select> |
| | | <select id="getDynAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num |
| | | SELECT filed, SUM(num) AS num FROM ( |
| | | SELECT DATE_FORMAT( create_at, '%Y-%m' ) AS filed, COUNT(id) AS num |
| | | FROM com_act_dyn |
| | | WHERE community_id = ${communityId} AND `status` = 1 |
| | | AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed |
| | | AND DATE_FORMAT( create_at, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | UNION ALL SELECT * FROM |
| | | ( |
| | | SELECT DATE_FORMAT(curdate(),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 1 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 2 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 3 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 4 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 5 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 6 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 7 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 8 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 9 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 10 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 11 month),'%Y-%m') AS filed, 0 AS num |
| | | ) temT |
| | | ) temp GROUP BY filed ORDER BY filed ASC |
| | | </select> |
| | | <select id="getDynTotalPolylineDate" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT COUNT(id) AS num FROM com_act_dyn |
| | | WHERE community_id = ${communityId} AND `status` = 1 AND DATE_FORMAT( create_at, '%Y%m' ) <= #{date} |
| | | WHERE community_id = ${communityId} AND `status` = 1 AND DATE_FORMAT( create_at, '%Y-%m' ) <= #{date} |
| | | </select> |
| | | <select id="indexDynList" resultType="com.panzhihua.common.model.vos.community.ComActDynVO"> |
| | | SELECT t1.id, t1.title, t1.cover, t2.`name` AS typeName |
| | |
| | | <if test="photoClassifyDTO.name != null and photoClassifyDTO.name != """> |
| | | and `name` like concat (#{photoClassifyDTO.name},'%') |
| | | </if> |
| | | <if test="photoClassifyDTO.areaCode != null and photoClassifyDTO.areaCode != """> |
| | | and area_code = #{photoClassifyDTO.areaCode} |
| | | </if> |
| | | </where> |
| | | order by create_at desc |
| | | </select> |
| | |
| | | select id,logo as cover,release_at as show_time,7 as type,"" as jump_url,"" as jump_type from com_act_easy_photo_activity where status =2 and community_id = ${communityId} |
| | | order by show_time desc limit 30 |
| | | </select> |
| | | <select id="selectStatisticsList" resultType="com.panzhihua.common.model.vos.community.ComActEasyPhotoVO"> |
| | | SELECT t1.id, IF(`name` IS NULL,'其他',`name`) AS classifyName |
| | | FROM com_act_easy_photo t1 |
| | | LEFT JOIN com_act_easy_photo_classify t2 ON t1.classify_id = t2.id |
| | | WHERE t1.community_id = ${communityId} AND t1.`status` IN (1,2,4) AND del_tag = 0 |
| | | <select id="selectStatisticsList" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT t1.`name` AS filed, COUNT(t2.id) AS num |
| | | FROM com_act_easy_photo_classify t1 |
| | | LEFT JOIN (SELECT * FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0) t2 ON t1.id = t2.classify_id |
| | | WHERE t1.`status` = 1 GROUP BY filed |
| | | </select> |
| | | <select id="selectResidentAutonomyStatistics" |
| | | resultType="com.panzhihua.common.model.vos.community.bigscreen.ResidentAutonomyStatisticsVO"> |
| | |
| | | </select> |
| | | <select id="getEasyPhotoAddPolylineData" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num |
| | | SELECT filed, SUM(num) AS num FROM ( |
| | | SELECT DATE_FORMAT( create_at, '%Y-%m' ) AS filed, COUNT(id) AS num |
| | | FROM com_act_easy_photo |
| | | WHERE community_id = ${communityId} AND del_tag = 0 |
| | | AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed |
| | | AND DATE_FORMAT( create_at, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | UNION ALL SELECT * FROM |
| | | ( |
| | | SELECT DATE_FORMAT(curdate(),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 1 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 2 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 3 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 4 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 5 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 6 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 7 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 8 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 9 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 10 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 11 month),'%Y-%m') AS filed, 0 AS num |
| | | ) temT |
| | | ) temp GROUP BY filed ORDER BY filed ASC |
| | | </select> |
| | | <select id="getEasyPhotoTotalPolylineDate" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT COUNT(id) AS num FROM com_act_easy_photo |
| | | WHERE community_id = ${communityId} AND del_tag = 0 |
| | | AND DATE_FORMAT( create_at, '%Y%m' ) <= #{date} |
| | | AND DATE_FORMAT( create_at, '%Y-%m' ) <= #{date} |
| | | </select> |
| | | <select id="indexEasyPhotoList" resultType="com.panzhihua.common.model.vos.community.ComActEasyPhotoVO"> |
| | | SELECT t1.id, t1.detail, t1.photo_path_list, t1.`status`, t2.`name` AS classifyName |
| | |
| | | </select> |
| | | <select id="getMicroWishAddPolylineData" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num FROM com_act_micro_wish |
| | | WHERE community_id = ${communityId} AND `status` NOT IN(1,4) AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed |
| | | SELECT filed, SUM(num) AS num FROM ( |
| | | SELECT DATE_FORMAT( create_at, '%Y-%m' ) AS filed, COUNT(id) AS num FROM com_act_micro_wish |
| | | WHERE community_id = ${communityId} AND `status` NOT IN(1,4) AND DATE_FORMAT( create_at, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | UNION ALL SELECT * FROM |
| | | ( |
| | | SELECT DATE_FORMAT(curdate(),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 1 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 2 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 3 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 4 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 5 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 6 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 7 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 8 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 9 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 10 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 11 month),'%Y-%m') AS filed, 0 AS num |
| | | ) temT |
| | | ) temp GROUP BY filed ORDER BY filed ASC |
| | | </select> |
| | | <select id="getMicroWishTotalPolylineDate" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT COUNT(id) AS num FROM com_act_micro_wish |
| | | WHERE community_id = ${communityId} AND `status` NOT IN(1,4) AND DATE_FORMAT( create_at, '%Y%m' ) <= #{date} |
| | | WHERE community_id = ${communityId} AND `status` NOT IN(1,4) AND DATE_FORMAT( create_at, '%Y-%m' ) <= #{date} |
| | | </select> |
| | | <select id="selectScreenDisplayList" |
| | | resultType="com.panzhihua.common.model.vos.community.ComActMicroWishVO"> |
| | |
| | | </select> |
| | | <select id="getNeighborAddPolylineData" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT DATE_FORMAT( t1.create_at, '%m' ) AS filed, COUNT(t1.id) AS num |
| | | SELECT filed, SUM(num) AS num FROM ( |
| | | SELECT DATE_FORMAT( t1.create_at, '%Y-%m' ) AS filed, COUNT(t1.id) AS num |
| | | FROM com_act_neighbor_circle t1 |
| | | LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id |
| | | WHERE t1.community_id = ${communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL) |
| | | AND DATE_FORMAT( t1.create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed |
| | | AND DATE_FORMAT( t1.create_at, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | UNION ALL SELECT * FROM |
| | | ( |
| | | SELECT DATE_FORMAT(curdate(),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 1 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 2 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 3 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 4 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 5 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 6 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 7 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 8 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 9 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 10 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 11 month),'%Y-%m') AS filed, 0 AS num |
| | | ) temT |
| | | ) temp GROUP BY filed ORDER BY filed ASC |
| | | </select> |
| | | <select id="getNeighborTotalPolylineDate" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT COUNT(t1.id) AS num FROM com_act_neighbor_circle t1 |
| | | LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id |
| | | WHERE t1.community_id = ${communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL) AND DATE_FORMAT( t1.create_at, '%Y%m' ) <= #{date} |
| | | WHERE t1.community_id = ${communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL) AND DATE_FORMAT( t1.create_at, '%Y-%m' ) <= #{date} |
| | | </select> |
| | | <select id="indexNeighborList" |
| | | resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO"> |
| | |
| | | </select> |
| | | <select id="getQuestionnaireAddPolylineData" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num |
| | | SELECT filed, SUM(num) AS num FROM ( |
| | | SELECT DATE_FORMAT( create_at, '%Y-%m' ) AS filed, COUNT(id) AS num |
| | | FROM com_act_questnaire |
| | | WHERE community_id = ${communityId} AND state IN (2,3) |
| | | AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed |
| | | AND DATE_FORMAT( create_at, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | UNION ALL SELECT * FROM |
| | | ( |
| | | SELECT DATE_FORMAT(curdate(),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 1 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 2 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 3 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 4 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 5 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 6 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 7 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 8 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 9 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 10 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 11 month),'%Y-%m') AS filed, 0 AS num |
| | | ) temT |
| | | ) temp GROUP BY filed ORDER BY filed ASC |
| | | </select> |
| | | <select id="getQuestionnaireTotalPolylineDate" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT COUNT(id) AS num FROM com_act_questnaire |
| | | WHERE community_id = ${communityId} AND state IN (2,3) AND DATE_FORMAT( create_at, '%Y%m' ) <= #{date} |
| | | WHERE community_id = ${communityId} AND state IN (2,3) AND DATE_FORMAT( create_at, '%Y-%m' ) <= #{date} |
| | | </select> |
| | | <select id="selectQuestionnaireDisplayList" |
| | | resultType="com.panzhihua.common.model.vos.community.ComActQuestnaireVO"> |
| | |
| | | <if test="pageReserveDTO.communityId != null and pageReserveDTO.communityId !=0"> |
| | | and t.community_id = ${pageReserveDTO.communityId} |
| | | </if> |
| | | <if test="pageReserveDTO.communityId ==0"> |
| | | and t1.area_code = '510423' |
| | | <if test="pageReserveDTO.areaCode !=null"> |
| | | and t1.area_code = #{pageReserveDTO.areaCode} |
| | | </if> |
| | | <if test="pageReserveDTO.type != null and pageReserveDTO.type.size > 0"> |
| | | and t.`type` in |
| | |
| | | </select> |
| | | |
| | | <select id="biggestScreenMonth" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenStaticsReserveMonth"> |
| | | select (select count(*) from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' or t1.title like '%返攀%' or t1.title like '%来攀%' or t1.title like '%燃气%' or t1.title like '%防火%') and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT( CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at ) count, |
| | | (select count(*) from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%燃气%' ) and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT( CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) gasCount, |
| | | (select count(*) from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%防火%' ) and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT( CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) fireCount, |
| | | (select count(*) from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' ) and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT( CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) homeCount, |
| | | (select count(*) from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%返攀%' or t1.title like '%来攀%' ) and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT( CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) reserveCount |
| | | select (select count(*) from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' or t1.title like '%返攀%' or t1.title like '%来攀%' or t1.title like '%燃气%' or t1.title like '%防火%') and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at ) count, |
| | | (select count(*) from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%燃气%' ) and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) gasCount, |
| | | (select count(*) from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%防火%' ) and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) fireCount, |
| | | (select count(*) from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' ) and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) homeCount, |
| | | (select count(*) from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%返攀%' or t1.title like '%来攀%' ) and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) reserveCount |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="comActWorkGuideClassifyVO.classifyName != null and comActWorkGuideClassifyVO.classifyName !=''"> |
| | | AND classify_name like concat ('%', #{comActWorkGuideClassifyVO.classifyName}, '%') |
| | | </if> |
| | | <if test="comActWorkGuideClassifyVO.areaCode != null and comActWorkGuideClassifyVO.areaCode !=''"> |
| | | AND area_code = #{comActWorkGuideClassifyVO.areaCode} |
| | | </if> |
| | | </where> |
| | | order by create_at desc |
| | | </select> |
| | |
| | | SELECT cawgc.id, cawgc.classify_name, cawgc.picture_url,( SELECT count( id ) FROM com_act_work_guide WHERE classify = cawgc.id ) AS `count` |
| | | FROM |
| | | com_act_work_guide_classify AS cawgc |
| | | <where> |
| | | <if test="areaCode!=null"> |
| | | and cawgc.area_code = #{area_code} |
| | | </if> |
| | | </where> |
| | | order by `count` asc |
| | | </select> |
| | | |
| | |
| | | IFNULL(( SELECT count( id ) FROM com_act_activity WHERE community_id = ${communityId} AND volunteer_max = 0),0) AS residentActivity, |
| | | IFNULL(( SELECT count( id ) FROM com_act_activity WHERE community_id = ${communityId} AND volunteer_max != 0),0) AS volunteerActivity, |
| | | IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE status in (1,2,4) and del_tag = 0 AND community_id = ${communityId} ),0) AS easyPhoto, |
| | | IFNULL(( SELECT count( id ) FROM com_pb_activity WHERE STATUS = 5 AND community_id = ${communityId} ),0) AS partyActivity, |
| | | IFNULL(( SELECT count( id ) FROM com_pb_activity WHERE community_id = ${communityId} ),0) AS partyActivity, |
| | | IFNULL(( SELECT count( id ) FROM com_act_questnaire WHERE community_id = ${communityId} and is_hide=0 ),0) AS questionnaire, |
| | | IFNULL(( SELECT count( id ) FROM com_act_dyn WHERE community_id = ${communityId} AND STATUS = 1 ),0) AS dynamic, |
| | | IFNULL(( SELECT count( id ) FROM com_convenient_merchants WHERE ( community_id = ${communityId} OR community_id = 0) AND is_del = 0 ),0) AS convenient, |
| | |
| | | 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} |
| | | 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} AND TO_DAYS(NOW()) - TO_DAYS(e.create_at) <= 30 |
| | | UNION ALL SELECT |
| | | CASE |
| | | WHEN classify_id = 4 THEN 1 |
| | |
| | | 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 handle_status = 2 THEN 1 |
| | | 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) |
| | | 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) AND TO_DAYS(NOW()) - TO_DAYS(create_at) <= 30 |
| | | </select> |
| | | <select id="pageEventList" |
| | | 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 = ${pageBaseDTO.communityId} |
| | | <if test="pageBaseDTO.param3 != null and pageBaseDTO.param3 == 1"> |
| | | AND event_deal_status = 4 |
| | | </if> |
| | | <if test="pageBaseDTO.param3 != null and pageBaseDTO.param3 == 2"> |
| | | AND event_deal_status != 4 |
| | | </if> |
| | | ) |
| | | 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 = ${pageBaseDTO.communityId} AND `status` IN (1,2,4) |
| | | AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) |
| | | <if test="pageBaseDTO.param3 != null and pageBaseDTO.param3 == 1"> |
| | | AND `status` = 4 |
| | | </if> |
| | | <if test="pageBaseDTO.param3 != null and pageBaseDTO.param3 == 2"> |
| | | AND `status` != 4 |
| | | </if> |
| | | ) ORDER BY create_at DESC |
| | | </select> |
| | | <select id="getEventScreenSSPDateilNew" |
| | | resultType="com.panzhihua.common.model.vos.community.screen.event.EventNewStatisticsVO"> |
| | | SELECT id, su.nick_name AS userName, su.image_url, caep.create_at, caep.detail AS eventDes, |
| | | caep.happen_addr AS happenAddress, caep.lng_lat AS happentLatLng, caep.photo_path_list, |
| | | 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 eventType, caep.status AS eventDealStatus |
| | | FROM com_act_easy_photo AS caep |
| | | LEFT JOIN sys_user AS su ON su.user_id = caep.sponsor_id |
| | | WHERE id = #{eventId} |
| | | </select> |
| | | <select id="getPopulationTotalByAdmin" |
| | | resultType="com.panzhihua.common.model.vos.community.ComMngPopulationTotalVO"> |
| | |
| | | </select> |
| | | |
| | | <select id="selectActivityCountMonth" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine"> |
| | | select ( select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and release_time >= DATE_FORMAT( CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) y, |
| | | (select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) countY |
| | | select ( select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and release_time >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) y, |
| | | (select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) countY |
| | | </select> |
| | | |
| | | <select id="selectActivityTop" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityTop"> |
| | |
| | | </select> |
| | | |
| | | <select id="bigScreenServiceUser" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceUser"> |
| | | select t.name AS villageName, IF(t1.num IS NULL,0,t1.num) |
| | | select t.name AS villageName, IF(t1.num IS NULL,0,t1.num) as num |
| | | from com_mng_village t left join ( |
| | | select count(*) num,village_id |
| | | from com_mng_population |
| | |
| | | order by t.create_time desc |
| | | </select> |
| | | <select id="getRepairPolylineDate" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT DATE_FORMAT( p1.create_time, '%m' ) AS filed, COUNT(1) AS num FROM com_property_repair p1 |
| | | SELECT filed, SUM(num) AS num FROM ( |
| | | SELECT DATE_FORMAT( p1.create_time, '%Y-%m' ) AS filed, COUNT(1) AS num FROM com_property_repair p1 |
| | | LEFT JOIN com_property p2 ON p1.property_id = p2.id |
| | | WHERE p2.community_id = ${communityId} AND DATE_FORMAT( p1.create_time, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed |
| | | WHERE p2.community_id = ${communityId} AND DATE_FORMAT( p1.create_time, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | UNION ALL SELECT * FROM |
| | | ( |
| | | SELECT DATE_FORMAT(curdate(),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 1 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 2 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 3 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 4 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 5 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 6 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 7 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 8 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 9 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 10 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 11 month),'%Y-%m') AS filed, 0 AS num |
| | | ) temT |
| | | ) temp GROUP BY filed ORDER BY filed ASC |
| | | </select> |
| | | <select id="getRepairTotalPolylineDate" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT COUNT(1) AS num FROM com_property_repair p1 |
| | | LEFT JOIN com_property p2 ON p1.property_id = p2.id |
| | | WHERE p2.community_id = ${communityId} AND DATE_FORMAT( p1.create_time, '%Y%m' ) <= #{date} |
| | | WHERE p2.community_id = ${communityId} AND DATE_FORMAT( p1.create_time, '%Y-%m' ) <= #{date} |
| | | </select> |
| | | <select id="getEventAddPolylineData" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT filed, SUM(num) AS num FROM ( |
| | | SELECT DATE_FORMAT( e.create_at, '%m' ) AS filed, COUNT(e.id) AS num |
| | | SELECT DATE_FORMAT( e.create_at, '%Y-%m' ) AS filed, COUNT(e.id) AS num |
| | | 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} |
| | | AND DATE_FORMAT( e.create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed |
| | | AND DATE_FORMAT( e.create_at, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | UNION ALL SELECT |
| | | DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num |
| | | 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) AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed |
| | | ) temp GROUP BY filed |
| | | DATE_FORMAT( create_at, '%Y-%m' ) AS filed, COUNT(id) AS num |
| | | 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) |
| | | AND DATE_FORMAT( create_at, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | UNION ALL SELECT * FROM |
| | | ( |
| | | SELECT DATE_FORMAT(curdate(),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 1 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 2 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 3 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 4 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 5 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 6 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 7 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 8 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 9 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 10 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 11 month),'%Y-%m') AS filed, 0 AS num |
| | | ) temT |
| | | ) temp GROUP BY filed ORDER BY filed ASC |
| | | </select> |
| | | <select id="getEventTotalPolylineDate" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | |
| | | 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} |
| | | AND DATE_FORMAT( e.create_at, '%Y%m' ) <= #{date} |
| | | AND DATE_FORMAT( e.create_at, '%Y-%m' ) <= #{date} |
| | | UNION ALL SELECT |
| | | COUNT(id) AS num |
| | | 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) AND DATE_FORMAT( create_at, '%Y%m' ) <= #{date} |
| | | 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) AND DATE_FORMAT( create_at, '%Y-%m' ) <= #{date} |
| | | ) temp |
| | | </select> |
| | | |
| | |
| | | <if test='comSwPatrolRecordDTO.communityId != null and comSwPatrolRecordDTO.communityId != 0'> |
| | | AND cspr.community_id = ${comSwPatrolRecordDTO.communityId} |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.communityId == 0'> |
| | | AND t.area_code = '510423' |
| | | <if test='comSwPatrolRecordDTO.areaCode !=null'> |
| | | AND t.area_code = #{comSwPatrolRecordDTO.areaCode} |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.patrolPerson != null and comSwPatrolRecordDTO.patrolPerson != ""'> |
| | | AND cspr.person_name LIKE concat('%',#{comSwPatrolRecordDTO.patrolPerson},'%') |
| | |
| | | <if test='comSwPatrolRecordDTO.communityId != null and comSwPatrolRecordDTO.communityId != 0'> |
| | | AND cspr.community_id = ${comSwPatrolRecordDTO.communityId} |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.communityId == 0'> |
| | | AND t.area_code = '510423' |
| | | <if test='comSwPatrolRecordDTO.areaCode !=null'> |
| | | AND t.area_code = #{comSwPatrolRecordDTO.areaCode} |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.patrolPerson != null and comSwPatrolRecordDTO.patrolPerson != ""'> |
| | | AND cspr.person_name LIKE concat('%',#{comSwPatrolRecordDTO.patrolPerson},'%') |
| | |
| | | <if test='comSwPatrolRecordDTO.communityId != null and comSwPatrolRecordDTO.communityId != 0'> |
| | | AND cspr.community_id = ${comSwPatrolRecordDTO.communityId} |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.communityId == 0'> |
| | | AND t.area_code = '510423' |
| | | <if test='comSwPatrolRecordDTO.areaCode != null'> |
| | | AND t.area_code = #{comSwPatrolRecordDTO.areaCode} |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.patrolPerson != null and comSwPatrolRecordDTO.patrolPerson != ""'> |
| | | AND cspr.person_name LIKE concat('%',#{comSwPatrolRecordDTO.patrolPerson},'%') |
| | |
| | | SELECT ccm.*, su.account, su.status AS accountStatus, GROUP_CONCAT(ccss.service_name) AS serviceScope |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN sys_user su ON ccm.user_id = su.user_id |
| | | LEFT JOIN com_act ca on ccm.community_id = ca.community_id |
| | | LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id |
| | | WHERE ccm.is_del = 0 |
| | | <if test="pageConvenientMerchantDTO.serviceId != null and pageConvenientMerchantDTO.serviceId != 0"> |
| | |
| | | </if> |
| | | <if test="pageConvenientMerchantDTO.communityId != null and pageConvenientMerchantDTO.communityId != 0"> |
| | | AND ccm.community_id = ${pageConvenientMerchantDTO.communityId} |
| | | </if> |
| | | <if test="pageConvenientMerchantDTO.areaCode != null and pageConvenientMerchantDTO.areaCode != ''"> |
| | | AND ca.area_code = ${pageConvenientMerchantDTO.areaCode} |
| | | </if> |
| | | <if test="pageConvenientMerchantDTO.businessStatus != null"> |
| | | AND ccm.business_status = #{pageConvenientMerchantDTO.businessStatus} |
| | |
| | | </select> |
| | | <select id="getServiceTimesAddPolylineData" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT DATE_FORMAT( t1.statistic_date, '%m' ) AS filed, SUM(t1.consultation_volume) AS num |
| | | SELECT filed, SUM(num) AS num FROM ( |
| | | SELECT DATE_FORMAT( t1.statistic_date, '%Y-%m' ) AS filed, SUM(t1.consultation_volume) AS num |
| | | FROM com_convenient_consultation_statistics t1 |
| | | LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id |
| | | WHERE (t2.community_id = ${communityId} OR t2.community_id = 0) AND DATE_FORMAT( t1.statistic_date, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed |
| | | WHERE (t2.community_id = ${communityId} OR t2.community_id = 0) AND DATE_FORMAT( t1.statistic_date, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | UNION ALL SELECT * FROM |
| | | ( |
| | | SELECT DATE_FORMAT(curdate(),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 1 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 2 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 3 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 4 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 5 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 6 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 7 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 8 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 9 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 10 month),'%Y-%m') AS filed, 0 AS num union |
| | | SELECT DATE_FORMAT(date_sub(curdate(), interval 11 month),'%Y-%m') AS filed, 0 AS num |
| | | ) temT |
| | | ) temp GROUP BY filed ORDER BY filed ASC |
| | | </select> |
| | | <select id="getServiceTimesTotalPolylineDate" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT IF(SUM(t1.consultation_volume) IS NULL,0,SUM(t1.consultation_volume)) AS num |
| | | FROM com_convenient_consultation_statistics t1 |
| | | LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id |
| | | WHERE (t2.community_id = ${communityId} OR t2.community_id = 0) AND DATE_FORMAT( t1.statistic_date, '%Y%m' ) <= #{date} |
| | | WHERE (t2.community_id = ${communityId} OR t2.community_id = 0) AND DATE_FORMAT( t1.statistic_date, '%Y-%m' ) <= #{date} |
| | | </select> |
| | | <select id="indexMerchantList" |
| | | resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | |
| | | <if test="pageConvenientServiceCategoryDTO.name != null and pageConvenientServiceCategoryDTO.name.trim() != """> |
| | | AND `name` LIKE concat('%', #{pageConvenientServiceCategoryDTO.name}, '%' ) |
| | | </if> |
| | | <if test="pageConvenientServiceCategoryDTO.areaCode != null and pageConvenientServiceCategoryDTO.areaCode.trim() != """> |
| | | AND area_code = #{pageConvenientServiceCategoryDTO.areaCode} |
| | | </if> |
| | | ORDER BY weight DESC |
| | | </select> |
| | | <select id="selectServiceScopeByMerchantId" resultType="java.lang.String"> |
New file |
| | |
| | | <?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.SysTemplateConfigDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.SysTemplateConfig" id="SysTemplateConfigBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="templateId" column="template_id"/> |
| | | <result property="type" column="type"/> |
| | | <result property="areaCode" column="area_code"/> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | @Override |
| | | public R<ComActVO> actList() { |
| | | return communityService.listCommunityAll(); |
| | | return communityService.listCommunityAll(null); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | }); |
| | | } |
| | | statisticsVO.setGridIncidentList(eventResultList); |
| | | // 查询所有小区 |
| | | List<CivilVillageStatisticsVO> villageStatisticsList = |
| | | this.baseMapper.getCivilScreenVillageList(eventListDTO.getCommunityId()); |
| | |
| | | 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 handle_status = 2 THEN 1 |
| | | 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> |
| | |
| | | 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(DISTINCT CONCAT(road,door_no,floor,unit_no,house_no)) FROM com_mng_population WHERE village_id = #{villageId}) as houseTotal, |
| | | (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, |
| | |
| | | <foreach collection="villageIds" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | ) temp GROUP BY filed |
| | | ) temp WHERE filed is not null GROUP BY filed |
| | | UNION ALL |
| | | (SELECT '0-18岁' AS filed, 0 AS num) |
| | | UNION ALL |
| | |
| | | * @return 角色集合 |
| | | */ |
| | | @PostMapping("listrolebackstage") |
| | | public R listRoleBackstage(@RequestParam("communityId") Long communityId,@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize) { |
| | | return roleService.listRoleBackstage(communityId,pageNum,pageSize); |
| | | public R listRoleBackstage(@RequestParam("communityId") Long communityId,@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize,@RequestParam("areaCode")String areaCode) { |
| | | return roleService.listRoleBackstage(communityId,pageNum,pageSize,areaCode); |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | package com.panzhihua.service_user.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.user.SysAppConfigVO; |
| | | import com.panzhihua.service_user.entity.SysAppConfig; |
| | | import com.panzhihua.service_user.service.SysAppConfigService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (SysAppConfig)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 10:10:19 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("sysAppConfig") |
| | | public class SysAppConfigApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private SysAppConfigService sysAppConfigService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.sysAppConfigService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return R.ok(this.sysAppConfigService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param sysAppConfig 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody SysAppConfig sysAppConfig) { |
| | | return R.ok(this.sysAppConfigService.save(sysAppConfig)); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param sysAppConfig 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody SysAppConfig sysAppConfig) { |
| | | return R.ok(this.sysAppConfigService.updateById(sysAppConfig)); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return R.ok(this.sysAppConfigService.removeById(id)); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/selectByAppid") |
| | | public R<SysAppConfigVO> selectByAppid(@RequestParam("appId")String appId){ |
| | | SysAppConfig sysAppConfig=this.sysAppConfigService.getOne(new QueryWrapper<SysAppConfig>().lambda().eq(SysAppConfig::getAppId,appId)); |
| | | if(sysAppConfig!=null){ |
| | | SysAppConfigVO sysAppConfigVO=new SysAppConfigVO(); |
| | | BeanUtils.copyProperties(sysAppConfig,sysAppConfigVO); |
| | | return R.ok(sysAppConfigVO); |
| | | } |
| | | |
| | | return R.fail(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_user.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import com.panzhihua.service_user.entity.SysTemplateConfig; |
| | | import com.panzhihua.service_user.service.SysTemplateConfigService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (SysTemplateConfig)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 14:29:57 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("sysTemplateConfig") |
| | | public class SysTemplateConfigApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private SysTemplateConfigService sysTemplateConfigService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.sysTemplateConfigService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Serializable id) { |
| | | return R.ok(this.sysTemplateConfigService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param sysTemplateConfig 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody SysTemplateConfig sysTemplateConfig) { |
| | | return R.ok(this.sysTemplateConfigService.save(sysTemplateConfig)); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param sysTemplateConfig 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody SysTemplateConfig sysTemplateConfig) { |
| | | return R.ok(this.sysTemplateConfigService.updateById(sysTemplateConfig)); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return R.ok(this.sysTemplateConfigService.removeById(id)); |
| | | } |
| | | |
| | | @GetMapping("/selectTemplate") |
| | | public R<SysTemplateConfigVO> selectTemplate(@RequestParam("areaCode")String areaCode,@RequestParam("type")Integer type){ |
| | | SysTemplateConfig sysTemplateConfig=this.sysTemplateConfigService.getOne(new QueryWrapper<SysTemplateConfig>().lambda().eq(SysTemplateConfig::getAreaCode,areaCode).eq(SysTemplateConfig::getType,type)); |
| | | if(sysTemplateConfig!=null){ |
| | | SysTemplateConfigVO sysTemplateConfigVO=new SysTemplateConfigVO(); |
| | | BeanUtils.copyProperties(sysTemplateConfig,sysTemplateConfigVO); |
| | | return R.ok(sysTemplateConfigVO); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | } |
| | |
| | | * @return 运营后台数据看板 |
| | | */ |
| | | @PostMapping("datakanban") |
| | | public R dataKanban() { |
| | | return userService.dataKanban(); |
| | | public R dataKanban(@RequestParam("areaCode")String areaCode) { |
| | | return userService.dataKanban(areaCode); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 用户数据统计汇总 |
| | | */ |
| | | @GetMapping("community/statistics") |
| | | public R communityStatistics() { |
| | | return userService.communityStatistics(); |
| | | public R communityStatistics(@RequestParam("areaCode") String areaCode) { |
| | | return userService.communityStatistics(areaCode); |
| | | } |
| | | |
| | | @GetMapping("community/statistics/export") |
| | | public R communityStatisticsExport() { |
| | | return userService.communityStatisticsExport(); |
| | | public R communityStatisticsExport(@RequestParam("areaCode") String areaCode) { |
| | | return userService.communityStatisticsExport(areaCode); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R bindOrAddMcsUser(@RequestBody BindUserPhoneDTO bindUserPhoneDTO) { |
| | | return userService.bindOrAddMcsUser(bindUserPhoneDTO); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_user.config; |
| | | |
| | | import java.lang.reflect.Method; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.IntStream; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.annotation.Around; |
| | | import org.aspectj.lang.annotation.Pointcut; |
| | | import org.aspectj.lang.reflect.MethodSignature; |
| | | import org.springframework.core.LocalVariableTableParameterNameDiscoverer; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * 应用模块名称 |
| | | * <p> |
| | | * 代码描述 |
| | | * <p> |
| | | * 拦截controller,输出入参、响应内容和响应时间 Copyright: Copyright (C) 2021 XXX, Inc. All rights reserved. |
| | | * <p> |
| | | * Company: 成都呐喊信息技术有限公司 |
| | | * <p> |
| | | * |
| | | * @author manailin |
| | | * @since 2021/8/24 15:30 |
| | | */ |
| | | @Slf4j |
| | | // @Aspect |
| | | // @Component |
| | | public class ParamOutAspect { |
| | | |
| | | /** |
| | | * 设定方法的执行时间限制毫秒数 |
| | | */ |
| | | private long maxReduceTime = 2000; |
| | | |
| | | @Pointcut("execution (public * com.panzhihua.service_user.api..* (..))||execution (public * com.panzhihua.service_user.service..* (..))") |
| | | public void aspect() {} |
| | | |
| | | /** |
| | | * [方法描述] 环绕通知,拦截controller,输出请求参数、响应内容和响应时间 |
| | | * |
| | | * @param joinPoint aspect() |
| | | * @return java.lang.Object |
| | | * @author manailin |
| | | * @date 2021/8/24 17:04 |
| | | */ |
| | | @Around("aspect()") |
| | | public Object processLog(ProceedingJoinPoint joinPoint) { |
| | | log.info("进入方法性能检查方法"); |
| | | Method method = ((MethodSignature)joinPoint.getSignature()).getMethod(); |
| | | String className = joinPoint.getSignature().getDeclaringTypeName(); |
| | | // 获取方法名称 |
| | | String methodName = method.getName(); |
| | | // 获取参数名称 |
| | | LocalVariableTableParameterNameDiscoverer paramNames = new LocalVariableTableParameterNameDiscoverer(); |
| | | String[] params = paramNames.getParameterNames(method); |
| | | // 获取参数 |
| | | Object[] args = joinPoint.getArgs(); |
| | | // 过滤掉request和response,不能序列化 |
| | | List<Object> filteredArgs = Arrays.stream(args) |
| | | .filter(arg -> (!(arg instanceof HttpServletRequest) && !(arg instanceof HttpServletResponse))) |
| | | .collect(Collectors.toList()); |
| | | JSONObject rqsJson = new JSONObject(); |
| | | rqsJson.put("rqsMethod", methodName); |
| | | rqsJson.put("rqsTime", DateUtils.getCurrentDateStr_MS()); |
| | | if (ObjectUtils.isEmpty(filteredArgs)) { |
| | | rqsJson.put("rqsParams", null); |
| | | } else { |
| | | // 拼接请求参数 |
| | | Map<String, Object> rqsParams = IntStream.range(0, filteredArgs.size()).boxed() |
| | | .collect(Collectors.toMap(j -> params[j], j -> filteredArgs.get(j))); |
| | | rqsJson.put("rqsParams", rqsParams); |
| | | } |
| | | log.info(className + ":" + methodName + "请求信息为:" + rqsJson.toJSONString()); |
| | | Object resObj = null; |
| | | long startTime = System.currentTimeMillis(); |
| | | try { |
| | | // 执行原方法 |
| | | resObj = joinPoint.proceed(); |
| | | } catch (Throwable e) { |
| | | log.error(className + ":" + methodName + "方法执行异常!", e); |
| | | } |
| | | long endTime = System.currentTimeMillis(); |
| | | // 打印耗时的信息 |
| | | this.printExecTime(className + ":" + methodName, startTime, endTime); |
| | | if (resObj != null) { |
| | | // 打印返回消息 |
| | | log.info(className + ":" + methodName + "响应信息为:" + JSONObject.toJSON(resObj)); |
| | | return resObj; |
| | | } else { |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * [方法描述] 打印方法执行耗时的信息,如果超过了一定的时间,才打印 |
| | | * |
| | | * @param classAndMethodName |
| | | * 执行方法名 |
| | | * @param startTime |
| | | * 执行开始时间 |
| | | * @param endTime |
| | | * 执行结束时间 |
| | | * @author manailin |
| | | * @date 2021/8/24 17:05 |
| | | */ |
| | | private void printExecTime(String classAndMethodName, long startTime, long endTime) { |
| | | long diffTime = endTime - startTime; |
| | | if (diffTime > maxReduceTime) { |
| | | log.info(classAndMethodName + " 方法执行耗时:" + diffTime + " ms"); |
| | | } |
| | | // TODO 可以集成redis,将每个controller的执行时间追加到redis中,再用定时每周一次同步到库中 |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_user.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_user.entity.SysAppConfig; |
| | | |
| | | /** |
| | | * (SysAppConfig)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 10:10:18 |
| | | */ |
| | | @Mapper |
| | | public interface SysAppConfigDao extends BaseMapper<SysAppConfig> { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_user.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_user.entity.SysTemplateConfig; |
| | | |
| | | /** |
| | | * (SysTemplateConfig)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 14:29:55 |
| | | */ |
| | | @Mapper |
| | | public interface SysTemplateConfigDao extends BaseMapper<SysTemplateConfig> { |
| | | |
| | | } |
| | |
| | | IPage<SysUserNoticeVO> pageNotice(Page page, @Param("pageDTO") PageDTO pageDTO); |
| | | |
| | | |
| | | IndexDataKanbanVO selectIndexDataKanban(); |
| | | IndexDataKanbanVO selectIndexDataKanban(@Param("areaCode") String areaCode); |
| | | |
| | | |
| | | List<DataKanbanDTO> selectCommunityUserOrder(); |
| | | List<DataKanbanDTO> selectCommunityUserOrder(@Param("areaCode")String areaCode); |
| | | |
| | | List<DataKanbanDTO> selectCommunityUserOrderMonth(); |
| | | List<DataKanbanDTO> selectCommunityUserOrderMonth(@Param("areaCode")String areaCode); |
| | | |
| | | |
| | | DataKanbanDTO selectCommunityActiveUserOrder(Date date1); |
| | | |
| | | DataKanbanDTO selectCommunityAddUserOrder(Date date1); |
| | | DataKanbanDTO selectCommunityAddUserOrder(@Param("areaCode")String areaCode,@Param("date1")Date date1); |
| | | |
| | | |
| | | IndexDataVO indexDataCommunityBackstage(Long communityId); |
| | |
| | | * 查询西区所有街道列表以及统计人数 |
| | | * @return 西区所有街道列表以及统计人数 |
| | | */ |
| | | List<IndexUserStreetVo> getUserStreetList(); |
| | | List<IndexUserStreetVo> getUserStreetList(@Param("areaCode") String areaCode); |
| | | |
| | | /** |
| | | * 查询街道下社区列表以及统计人数 |
| | |
| | | * 查询街道下社区注册人数统计数据导出 |
| | | * @return 社区注册人数统计数据导出 |
| | | */ |
| | | List<IndexUserStreetExcelExportVo> getUserCommunityExcelExport(); |
| | | List<IndexUserStreetExcelExportVo> getUserCommunityExcelExport(String areaCode); |
| | | |
| | | /** |
| | | * 查看是否是社区物业人员 |
New file |
| | |
| | | package com.panzhihua.service_user.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * (SysAppConfig)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 10:10:15 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class SysAppConfig implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -90981038076389842L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * appid |
| | | */ |
| | | @ApiModelProperty(value = "appid") |
| | | private String appId; |
| | | |
| | | /** |
| | | * secret |
| | | */ |
| | | @ApiModelProperty(value = "secret") |
| | | private String secret; |
| | | |
| | | /** |
| | | * 小程序名字 |
| | | */ |
| | | @ApiModelProperty(value = "小程序名字") |
| | | private String name; |
| | | |
| | | private String areaCode; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_user.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * (SysTemplateConfig)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 14:29:55 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class SysTemplateConfig implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -29178409799302189L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 模板id |
| | | */ |
| | | @ApiModelProperty(value = "模板id") |
| | | private String templateId; |
| | | |
| | | /** |
| | | * 模板类型 1活动变更 2留言回复 3活动取消 4审核状态 5认证审核 6调研问卷 7奖励发放 8报名成功 9活动即将开始 10预约提醒 |
| | | */ |
| | | @ApiModelProperty(value = "模板类型 1活动变更 2留言回复 3活动取消 4审核状态 5认证审核 6调研问卷 7奖励发放 8报名成功 9活动即将开始 10预约提醒 ") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 区域编码 |
| | | */ |
| | | @ApiModelProperty(value = "区域编码") |
| | | private String areaCode; |
| | | } |
| | |
| | | * 操作账户 |
| | | */ |
| | | private String account; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | */ |
| | | private Long communityId; |
| | | |
| | | private String areaCode; |
| | | |
| | | } |
| | |
| | | * 对应社区 0 表示运营后台 |
| | | * @return 角色集合 |
| | | */ |
| | | R listRoleBackstage(Long communityId,Integer pageNum,Integer pageSize); |
| | | R listRoleBackstage(Long communityId,Integer pageNum,Integer pageSize,String areaCode); |
| | | |
| | | /** |
| | | * 新增角色 |
New file |
| | |
| | | package com.panzhihua.service_user.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_user.entity.SysAppConfig; |
| | | |
| | | /** |
| | | * (SysAppConfig)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 10:10:18 |
| | | */ |
| | | public interface SysAppConfigService extends IService<SysAppConfig> { |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageList(CommonPage commonPage); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_user.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_user.entity.SysTemplateConfig; |
| | | |
| | | /** |
| | | * (SysTemplateConfig)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 14:29:56 |
| | | */ |
| | | public interface SysTemplateConfigService extends IService<SysTemplateConfig> { |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageList(CommonPage commonPage); |
| | | } |
| | |
| | | * |
| | | * @return 展示数据 |
| | | */ |
| | | R dataKanban(); |
| | | R dataKanban(String areaCode); |
| | | |
| | | /** |
| | | * 社区管理后台数据看板 |
| | |
| | | * 运营后台-用户数据统计汇总 |
| | | * @return 用户数据统计汇总 |
| | | */ |
| | | R communityStatistics(); |
| | | R communityStatistics(String areaCode); |
| | | |
| | | R communityStatisticsExport(); |
| | | R communityStatisticsExport(String areaCode); |
| | | |
| | | /** |
| | | * 通过UnionId获取用户信息 |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | * @return 角色集合 |
| | | */ |
| | | @Override |
| | | public R listRoleBackstage(Long communityId,Integer pageNum,Integer pageSize) { |
| | | IPage<SysRoleDO> sysRoleDOIPage=this.roleDAO.selectPage(new Page<>(pageNum,pageSize),new QueryWrapper<SysRoleDO>().lambda().eq(SysRoleDO::getCommunityId, communityId).orderByDesc(SysRoleDO::getCreateAt)); |
| | | public R listRoleBackstage(Long communityId,Integer pageNum,Integer pageSize,String areaCode) { |
| | | LambdaQueryWrapper<SysRoleDO> queryWrapper=new QueryWrapper<SysRoleDO>().lambda().eq(SysRoleDO::getCommunityId, communityId); |
| | | if(com.panzhihua.common.utlis.StringUtils.isNotEmpty(areaCode)){ |
| | | queryWrapper.eq(SysRoleDO::getAreaCode,areaCode); |
| | | } |
| | | queryWrapper.orderByDesc(SysRoleDO::getCreateAt); |
| | | IPage<SysRoleDO> sysRoleDOIPage=this.roleDAO.selectPage(new Page<>(pageNum,pageSize),queryWrapper); |
| | | if (ObjectUtils.isEmpty(sysRoleDOIPage.getRecords())) { |
| | | return R.fail("角色列表为空"); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_user.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_user.entity.SysAppConfig; |
| | | import com.panzhihua.service_user.dao.SysAppConfigDao; |
| | | import com.panzhihua.service_user.service.SysAppConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * (SysAppConfig)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 10:10:18 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class SysAppConfigServiceImpl extends ServiceImpl<SysAppConfigDao, SysAppConfig> implements SysAppConfigService { |
| | | |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_user.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_user.entity.SysTemplateConfig; |
| | | import com.panzhihua.service_user.dao.SysTemplateConfigDao; |
| | | import com.panzhihua.service_user.service.SysTemplateConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * (SysTemplateConfig)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-13 14:29:56 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class SysTemplateConfigServiceImpl extends ServiceImpl<SysTemplateConfigDao, SysTemplateConfig> implements SysTemplateConfigService { |
| | | |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return null; |
| | | } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.BindUserPhoneDTO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsLoginUserInfoVO; |
| | | import com.panzhihua.service_user.dao.*; |
| | | import com.panzhihua.service_user.entity.SysAppConfig; |
| | | import com.panzhihua.service_user.entity.SysTemplateConfig; |
| | | import org.apache.commons.lang.time.DateFormatUtils; |
| | | import org.apache.commons.lang.time.DateUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.service_user.dao.ComActFourMemberDao; |
| | | import com.panzhihua.service_user.dao.ComMngFamilyInfoDAO; |
| | | import com.panzhihua.service_user.dao.ComMngUserTagDAO; |
| | | import com.panzhihua.service_user.dao.EventGridMemberBuildingRelationMapper; |
| | | import com.panzhihua.service_user.dao.LcCompareMemberCodeMapper; |
| | | import com.panzhihua.service_user.dao.RoleDAO; |
| | | import com.panzhihua.service_user.dao.SysMenuDAO; |
| | | import com.panzhihua.service_user.dao.SysOperLogDAO; |
| | | import com.panzhihua.service_user.dao.SysRoleMenuDAO; |
| | | import com.panzhihua.service_user.dao.SysUserAgreementDAO; |
| | | import com.panzhihua.service_user.dao.SysUserFeedbackDAO; |
| | | import com.panzhihua.service_user.dao.SysUserInputDAO; |
| | | import com.panzhihua.service_user.dao.SysUserNoticeDAO; |
| | | import com.panzhihua.service_user.dao.SysUserRoleDAO; |
| | | import com.panzhihua.service_user.dao.UserDao; |
| | | import com.panzhihua.service_user.model.dos.ComActFourMember; |
| | | import com.panzhihua.service_user.model.dos.ComMngFamilyInfoDO; |
| | | import com.panzhihua.service_user.model.dos.ComMngUserTagDO; |
| | |
| | | private LcCompareMemberCodeMapper lcCompareMemberCodeMapper; |
| | | @Resource |
| | | private ComActFourMemberDao comActFourMemberDao; |
| | | @Resource |
| | | private SysAppConfigDao sysAppConfigDao; |
| | | @Resource |
| | | private SysTemplateConfigDao sysTemplateConfigDao; |
| | | // @Resource |
| | | // private GridService gridService; |
| | | |
| | |
| | | loginUserInfoVO.setType(sysUserDO.getType()); |
| | | loginUserInfoVO.setIsRealNamed(sysUserDO.getIdCard() != null);// 暂时 身份证判断实名制 |
| | | if(sysUserDO.getCommunityId()!=null){ |
| | | ComActVO comActVO = userDao.selectCommunity(sysUserDO.getCommunityId()); |
| | | loginUserInfoVO.setCommunityId(sysUserDO.getCommunityId()); |
| | | if(comActVO!=null){ |
| | | loginUserInfoVO.setComActVO(comActVO); |
| | | SysAppConfig sysAppConfig=sysAppConfigDao.selectOne(new QueryWrapper<SysAppConfig>().lambda().eq(SysAppConfig::getAreaCode,comActVO.getAreaCode())); |
| | | if(sysAppConfig!=null){ |
| | | loginUserInfoVO.setAppId(sysAppConfig.getAppId()); |
| | | loginUserInfoVO.setAppSecret(sysAppConfig.getSecret()); |
| | | } |
| | | } |
| | | } |
| | | List<SysRoleDO> roleDOList = roleDAO.selectByUserId(sysUserDO.getUserId()); |
| | | Set<String> set = new HashSet<>(); |
| | |
| | | ComActVO comActVO = userDao.selectCommunity(userCommunityId); |
| | | if (comActVO != null) { |
| | | loginUserInfoVO.setCommunityName(comActVO.getName()); |
| | | loginUserInfoVO.setComActVO(comActVO); |
| | | loginUserInfoVO.setAreaCode(comActVO.getAreaCode()); |
| | | SysAppConfig sysAppConfig=sysAppConfigDao.selectOne(new QueryWrapper<SysAppConfig>().lambda().eq(SysAppConfig::getAreaCode,comActVO.getAreaCode())); |
| | | if(sysAppConfig!=null){ |
| | | loginUserInfoVO.setAppId(sysAppConfig.getAppId()); |
| | | loginUserInfoVO.setAppSecret(sysAppConfig.getSecret()); |
| | | } |
| | | } |
| | | } |
| | | if (!ObjectUtils.isEmpty(phone)) { |
| | |
| | | ComActVO comActVO = userDao.selectCommunity(loginUserInfoVO.getCommunityId()); |
| | | if (!ObjectUtils.isEmpty(comActVO)) { |
| | | loginUserInfoVO.setCommunityName(comActVO.getName()); |
| | | loginUserInfoVO.setAreaCode(comActVO.getAreaCode()); |
| | | } |
| | | else{ |
| | | loginUserInfoVO.setAreaCode("510423"); |
| | | } |
| | | //是否是社区物业人员 |
| | | int countPropertyWorker = userDao.countPropertyWorker(userId, loginUserInfoVO.getCommunityId()); |
| | |
| | | try { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | String accessToken = util.getAppAccessToken(); |
| | | SysTemplateConfig sysTemplateConfig=sysTemplateConfigDao.selectOne(new QueryWrapper<SysTemplateConfig>().lambda().eq(SysTemplateConfig::getAreaCode, loginUserInfoVO.getComActVO()).eq(SysTemplateConfig::getType,5)); |
| | | // 用户实名认证推送消息 |
| | | WxUtil.sendSubscribeRZSH(user.getOpenid(), accessToken, "实名认证", |
| | | com.panzhihua.common.utlis.DateUtils.getCurrentDateStr(), "认证成功"); |
| | | com.panzhihua.common.utlis.DateUtils.getCurrentDateStr(), "认证成功",sysTemplateConfig.getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("推送用户订阅消息失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | |
| | | // 获取所有权限id |
| | | List<SysMenuDO> menuDOList = sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda() |
| | | .eq(SysMenuDO::getCommunityId, 2L).orderByAsc(SysMenuDO::getOrderNum)); |
| | | .eq(SysMenuDO::getCommunityId, 2L).eq(SysMenuDO::getVisible,0).orderByAsc(SysMenuDO::getOrderNum)); |
| | | if (!menuDOList.isEmpty()) { |
| | | menuIds = menuDOList.stream().map(sysMenuDO -> sysMenuDO.getMenuId()).collect(Collectors.toList()); |
| | | |
| | |
| | | * @return 展示数据 |
| | | */ |
| | | @Override |
| | | public R dataKanban() { |
| | | IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(); |
| | | List<DataKanbanDTO> dataKanbanDTOS = userDao.selectCommunityUserOrder(); |
| | | public R dataKanban(String areaCode) { |
| | | IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(areaCode); |
| | | List<DataKanbanDTO> dataKanbanDTOS = userDao.selectCommunityUserOrder(areaCode); |
| | | |
| | | List<String> communityUserX = new ArrayList<>(); |
| | | List<Integer> communityUserY = new ArrayList<>(); |
| | |
| | | */ |
| | | @Override |
| | | public R dataKanBans(DataKanBansDto dataKanBansDto){ |
| | | IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(); |
| | | IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(dataKanBansDto.getAreaCode()); |
| | | List<String> communityUserX = new ArrayList<>(); |
| | | List<Integer> communityUserY = new ArrayList<>(); |
| | | |
| | |
| | | |
| | | List<DataKanbanDTO> dataKanbanDTOS = null; |
| | | if(dataKanBansDto.getType() != null && dataKanBansDto.getType().equals(DataKanBansDto.type.by)){ |
| | | dataKanbanDTOS = userDao.selectCommunityUserOrderMonth(); |
| | | dataKanbanDTOS = userDao.selectCommunityUserOrderMonth(dataKanBansDto.getAreaCode()); |
| | | }else{ |
| | | dataKanbanDTOS = userDao.selectCommunityUserOrder(); |
| | | dataKanbanDTOS = userDao.selectCommunityUserOrder(dataKanBansDto.getAreaCode()); |
| | | } |
| | | if (!ObjectUtils.isEmpty(dataKanbanDTOS)) { |
| | | dataKanbanDTOS.forEach(dataKanbanDTO -> { |
| | |
| | | List<Date> serverndays = com.panzhihua.common.utlis.DateUtils.getOldDays(); |
| | | serverndays.forEach(date -> { |
| | | // 查询社区活动数量 |
| | | DataKanbanDTO dataKanbanDTO = userDao.selectCommunityAddUserOrder(date); |
| | | DataKanbanDTO dataKanbanDTO = userDao.selectCommunityAddUserOrder(dataKanBansDto.getAreaCode(),date); |
| | | communityActiveUserX.add(DateFormatUtils.format(date, "MM-dd")); |
| | | communityActiveUserY.add(dataKanbanDTO.getNum()); |
| | | communityActiveUserZ.add(dataKanbanDTO.getDayNum()); |
| | |
| | | * @return 用户数据统计汇总 |
| | | */ |
| | | @Override |
| | | public R communityStatistics(){ |
| | | public R communityStatistics(String areaCode){ |
| | | //返回结果数据 |
| | | IndexUserStatisticsVo userStatisticsVo = new IndexUserStatisticsVo(); |
| | | //查询所有街道 |
| | | List<IndexUserStreetVo> streetList = userDao.getUserStreetList(); |
| | | List<IndexUserStreetVo> streetList = userDao.getUserStreetList(areaCode); |
| | | streetList.forEach(street -> { |
| | | List<IndexUserCommunityVo> communityList = userDao.getUserCommunityList(street.getStreetId()); |
| | | street.setCommunityList(communityList); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R communityStatisticsExport(){ |
| | | return R.ok(userDao.getUserCommunityExcelExport()); |
| | | public R communityStatisticsExport(String areaCode){ |
| | | return R.ok(userDao.getUserCommunityExcelExport(areaCode)); |
| | | } |
| | | |
| | | /** |
| | |
| | | <appender-ref ref="STDOUT" /> |
| | | <appender-ref ref="FILE" /> |
| | | </root> |
| | | |
| | | <!--慢接口和方法日志记录到不同的文件--> |
| | | <appender name="slowClassAndMethodAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <File>${LOG_HOME}/slow_service_user.log</File> |
| | | <append>true</append> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>INFO</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${LOG_HOME}/slow_service_user.%d.%i.log</fileNamePattern> |
| | | <maxHistory>10</maxHistory> |
| | | <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
| | | <maxFileSize>10MB</maxFileSize> |
| | | </timeBasedFileNamingAndTriggeringPolicy> |
| | | </rollingPolicy> |
| | | <encoder> |
| | | <pattern>%d{yyyy/MM/dd HH:mm:ss.SSS} %-5level [%thread] [%c{0}:%L] : %msg%n</pattern> |
| | | <charset>UTF-8</charset> |
| | | </encoder> |
| | | </appender> |
| | | |
| | | <!--这是我们定义的慢接口和方法日志传入的名称--> |
| | | <logger name="slowClassAndMethodLog" additivity="false" level="INFO"> |
| | | <appender-ref ref="slowClassAndMethodAppender"/> |
| | | </logger> |
| | | </configuration> |
New file |
| | |
| | | <?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_user.dao.SysAppConfigDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_user.entity.SysAppConfig" id="SysAppConfigBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="appId" column="app_id"/> |
| | | <result property="secret" column="secret"/> |
| | | <result property="name" column="name"/> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | |
| | | <select id="pageOperLog" resultType="com.panzhihua.common.model.vos.user.SysOperLogVO"> |
| | | select * from sys_oper_log where community_id = #{sysOperLogVO.communityId} order by oper_time desc |
| | | select * from sys_oper_log where community_id = #{sysOperLogVO.communityId} <if test="sysOperLogVO.areaCode !=null"> and area_code = #{sysOperLogVO.areaCode} </if> order by oper_time desc |
| | | </select> |
| | | |
| | | |
New file |
| | |
| | | <?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_user.dao.SysTemplateConfigDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_user.entity.SysTemplateConfig" id="SysTemplateConfigBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="templateId" column="template_id"/> |
| | | <result property="type" column="type"/> |
| | | <result property="areaCode" column="area_code"/> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <if test='pageFeedBackDTO.nickName != null and pageFeedBackDTO.nickName.trim() != ""'> |
| | | and u.nick_name like concat('%',#{pageFeedBackDTO.nickName},'%') |
| | | </if> |
| | | <if test='pageFeedBackDTO.areaCode != null and pageFeedBackDTO.areaCode.trim() != ""'> |
| | | and c.area_code = #{pageFeedBackDTO.areaCode} |
| | | </if> |
| | | </where> |
| | | order by f.create_at desc |
| | | |
| | |
| | | <if test='pageUserAppletsBackstageDTO.communityId != null and pageUserAppletsBackstageDTO.communityId != 0'>and |
| | | u.community_id = #{pageUserAppletsBackstageDTO.communityId} |
| | | </if> |
| | | <if test='pageUserAppletsBackstageDTO.areaCode != null'>and |
| | | a.area_code = #{pageUserAppletsBackstageDTO.areaCode} |
| | | </if> |
| | | <if test='pageUserAppletsBackstageDTO.status != null and pageUserAppletsBackstageDTO.status != 0'>and |
| | | u.status=#{pageUserAppletsBackstageDTO.status} |
| | | </if> |
| | |
| | | COUNT(user_id)allUser, |
| | | COUNT(case WHEN DATE_FORMAT(t.create_at,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') then user_id else null end )addUser, |
| | | COUNT(case WHEN DATE_FORMAT(last_login_time,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') then user_id else null end )activeDayUser, |
| | | (SELECT count(user_id) FROM sys_user t left join com_act t1 on t.community_id = t1.community_id WHERE type = 1 and t1.area_code = '510423' AND last_login_time > date_sub(SYSDATE(), INTERVAL 7 DAY))activeWeekUser |
| | | (SELECT count(user_id) FROM sys_user t left join com_act t1 on t.community_id = t1.community_id WHERE type = 1 and t1.area_code = #{areaCode} AND last_login_time > date_sub(SYSDATE(), INTERVAL 7 DAY))activeWeekUser |
| | | FROM |
| | | sys_user t LEFT JOIN com_act t1 on t.community_id = t1.community_id |
| | | where t.type=1 and t.community_id is not null and t1.area_code ='510423' |
| | | where t.type=1 and t.community_id is not null and t1.area_code = #{areaCode} |
| | | </select> |
| | | |
| | | <select id="selectCommunityUserOrder" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |
| | |
| | | AND last_login_time > DATE_FORMAT( date_sub( SYSDATE(), INTERVAL 0 DAY ), '%Y-%m-%d 00:00:00')) as dayNum |
| | | FROM |
| | | com_act a |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 where a.area_code = '510423' |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 where a.area_code = #{areaCode} |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | </select> |
| | | |
| | |
| | | FROM |
| | | com_act a |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id |
| | | and u.type=1 and u.create_at >= DATE_ADD(curdate(),interval -day(curdate())+1 day) where a.area_code = '510423' |
| | | and u.type=1 and u.create_at >= DATE_ADD(curdate(),interval -day(curdate())+1 day) where a.area_code = #{areaCode} |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | </select> |
| | | |
| | |
| | | sys_user u |
| | | JOIN sys_user_role r ON u.user_id = r.user_id |
| | | JOIN sys_role e ON r.role_id = e.role_id |
| | | left join com_act ca on u.community_id = ca.community_id |
| | | <if test='administratorsUserVO.roleId != null and administratorsUserVO.roleId!=0'>and |
| | | e.role_id=#{administratorsUserVO.roleId} |
| | | </if> |
| | |
| | | </if> |
| | | <if test='administratorsUserVO.phone != null and administratorsUserVO.phone.trim() != ""'>AND |
| | | u.phone like concat(#{administratorsUserVO.phone},'%') |
| | | </if> |
| | | <if test='administratorsUserVO.areaCode != null '> |
| | | AND ca.area_code = #{administratorsUserVO.areaCode} |
| | | </if> |
| | | <if test='administratorsUserVO.account != null and administratorsUserVO.account.trim() != ""'>AND |
| | | u.account like concat(#{administratorsUserVO.account},'%') |
| | |
| | | |
| | | <select id="selectCommunityAddUserOrder" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |
| | | select count(user_id) as num, |
| | | (SELECT count( user_id ) FROM sys_user t LEFT JOIN com_act t1 on t.community_id=t1.community_id WHERE t.type = 1 and t1.area_code = '510423' |
| | | (SELECT count( user_id ) FROM sys_user t LEFT JOIN com_act t1 on t.community_id=t1.community_id WHERE t.type = 1 and t1.area_code = #{areaCode} |
| | | AND last_login_time <![CDATA[ >= ]]> DATE_FORMAT( #{date1}, '%Y-%m-%d 00:00:00') |
| | | AND last_login_time <![CDATA[ <= ]]> DATE_FORMAT( #{date1}, '%Y-%m-%d 23:59:59')) as dayNum from sys_user as su LEFT JOIN com_act t1 on su.community_id = t1.community_id |
| | | where su.create_at <![CDATA[ >= ]]> DATE_SUB(DATE_FORMAT(#{date1},'%Y-%m-%d 00:00:00'),INTERVAL 0 DAY) |
| | | and su.create_at <![CDATA[ <= ]]> DATE_SUB(DATE_FORMAT(#{date1},'%Y-%m-%d 23:59:59'),INTERVAL 0 DAY) |
| | | and su.type = 1 and t1.area_code='510423' |
| | | and su.type = 1 and t1.area_code=#{areaCode} |
| | | </select> |
| | | |
| | | <update id="gridMemberEditStatus"> |
| | |
| | | </update> |
| | | |
| | | <select id="selectCommunity" resultType="com.panzhihua.common.model.vos.community.ComActVO"> |
| | | select name from com_act where community_id = #{communityId} |
| | | select * from com_act where community_id = #{communityId} |
| | | </select> |
| | | |
| | | <delete id="delLcMember"> |
| | |
| | | AND ca.street_id = cs.street_id |
| | | ) AS userNum |
| | | FROM |
| | | `com_street` AS cs where area_code='510423' |
| | | `com_street` AS cs where area_code=#{areaCode} |
| | | order by userNum desc |
| | | </select> |
| | | |
| | |
| | | LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id |
| | | WHERE |
| | | su.type = 1 |
| | | AND su.community_id IS NOT NULL and ca.area_code = '510423' |
| | | AND su.community_id IS NOT NULL and ca.area_code = #{areaCode} |
| | | GROUP BY |
| | | ca.community_id |
| | | ORDER BY |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.panzhihua.common.model.vos.user.SysAppConfigVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | |
| | | <configuration debug="false"> |
| | | <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径--> |
| | | <springProfile name="dev"> |
| | | <property name="LOG_HOME" value="F:/log" /> |
| | | <property name="LOG_HOME" value="F:\log"/> |
| | | </springProfile> |
| | | <springProfile name="test"> |
| | | <property name="LOG_HOME" value="/mnt/data/gocd/log" /> |