| | |
| | | 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.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) |
| | |
| | | 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) { |
| | |
| | | @Resource |
| | | private WxH5Properties wxH5Properties; |
| | | |
| | | @Resource |
| | | private WxMaRHProperties wxMaRHProperties; |
| | | |
| | | public WxMaService getMaService() { |
| | | WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl(); |
| | | config.setAppid(properties.getAppid()); |
| | |
| | | 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; |
| | | } |
| | |
| | | @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 = 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); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "分页查询后台用户", response = AdministratorsUserVO.class) |
| | | @PostMapping("pageuser") |
| | | public R pageUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) { |
| | | administratorsUserVO.setCommunityId(0l); |
| | | administratorsUserVO.setAreaCode(this.getAreaCode()); |
| | | return userService.pageUserBackstage(administratorsUserVO); |
| | | } |
| | | |
| | |
| | | |
| | | 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); |
| | | } |
| | | |
| | |
| | | |
| | | 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 小区id |
| | | */ |
| | | public String getAreaCode() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | ComActVO comActVO = loginUserInfo.getComActVO(); |
| | | if (comActVO==null) { |
| | | return "510423"; |
| | | } |
| | | else { |
| | | return comActVO.getAreaCode(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取登录token |
| | |
| | | @ApiModelProperty("社区用户量统计类型(1.累计用户 2.本月新增)") |
| | | private Integer type; |
| | | |
| | | private String areaCode; |
| | | /** |
| | | * 社区用户量统计类型(1.累计用户 2.本月新增) |
| | | */ |
| | |
| | | @ApiModelProperty("查看人(1.全部 2.只看我的)") |
| | | private Integer selectPerson; |
| | | |
| | | @ApiModelProperty("区域编码") |
| | | 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; |
| | | } |
| | |
| | | @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; |
| | | } |
| | |
| | | |
| | | @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 communityId; |
| | | |
| | | private String areaCode; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "距离(千米)", required = true) |
| | | private Integer distance; |
| | | |
| | | 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("纬度") |
| | | private String lat; |
| | | |
| | | private String areaCode; |
| | | |
| | | private List<ComActWorkGuideMaterialVO> materials = Lists.newArrayList(); |
| | | } |
| | |
| | | @ApiModelProperty("头像") |
| | | private String imageUrl; |
| | | |
| | | private String areaCode; |
| | | |
| | | } |
| | |
| | | * @return 社区集合 按照创建顺序倒序排列 |
| | | */ |
| | | @PostMapping("listcommunityall") |
| | | R listCommunityAll(); |
| | | R listCommunityAll(@RequestParam("areaCode")String areaCode); |
| | | |
| | | /** |
| | | * 首页广告banner |
| | |
| | | * @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); |
| | | |
| | | /** |
| | | * 根据经纬度以及距离搜索附近社区列表 |
| | |
| | | * @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获取用户信息 |
| | |
| | | @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) |
| | |
| | | Long communityId = this.getCommunityId(); |
| | | pageReserveDTO.setCommunityId(communityId); |
| | | } |
| | | pageReserveDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageReserveAdmin(pageReserveDTO); |
| | | } |
| | | |
| | |
| | | @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); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "查询西区社区列表") |
| | | @GetMapping("community/westList") |
| | | public R getWestCommunityLists() { |
| | | return communityService.getWestCommunityLists(); |
| | | return communityService.getWestCommunityLists(this.getAreaCode()); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍详情", response = ComActEasyPhotoVO.class) |
| | |
| | | @ApiOperation(value = "社区下拉列表", response = ComActVO.class) |
| | | @GetMapping("/community") |
| | | public R listCommunity() { |
| | | return communityService.listCommunityAll(); |
| | | return communityService.listCommunityAll(this.getAreaCode()); |
| | | } |
| | | |
| | | @Deprecated |
| | |
| | | * @return 社区集合 按照创建顺序倒序排列 |
| | | */ |
| | | @PostMapping("listcommunityall") |
| | | public R listCommunityAll() { |
| | | return comActService.listCommunityAll(); |
| | | public R listCommunityAll(@RequestParam("areaCode") String areaCode) { |
| | | return comActService.listCommunityAll(areaCode); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @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); |
| | | } |
| | | |
| | | /** |
| | |
| | | + "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); |
| | |
| | | + " <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>") |
| | |
| | | |
| | | @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" |
| | |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | private String areaCode; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActEasyPhotoClassifyDO{" + "id=" + id + ", name=" + name + ", status=" + status + ", weight=" |
| | |
| | | @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 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); |
| | | |
| | | /** |
| | | * 根据经纬度以及距离搜索附近社区列表 |
| | |
| | | * @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)); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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)); |
| | |
| | | <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> |
| | |
| | | <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 |
| | |
| | | <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},'%') |
| | |
| | | <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.name} |
| | | </if> |
| | | ORDER BY weight DESC |
| | | </select> |
| | | <select id="selectServiceScopeByMerchantId" resultType="java.lang.String"> |
| | |
| | | |
| | | @Override |
| | | public R<ComActVO> actList() { |
| | | return communityService.listCommunityAll(); |
| | | return communityService.listCommunityAll(null); |
| | | } |
| | | |
| | | @Override |
| | |
| | | * @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); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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); |
| | | |
| | | /** |
| | | * 查看是否是社区物业人员 |
| | |
| | | * |
| | | * @return 展示数据 |
| | | */ |
| | | R dataKanban(); |
| | | R dataKanban(String areaCode); |
| | | |
| | | /** |
| | | * 社区管理后台数据看板 |
| | |
| | | * 运营后台-用户数据统计汇总 |
| | | * @return 用户数据统计汇总 |
| | | */ |
| | | R communityStatistics(); |
| | | R communityStatistics(String areaCode); |
| | | |
| | | R communityStatisticsExport(); |
| | | R communityStatisticsExport(String areaCode); |
| | | |
| | | /** |
| | | * 通过UnionId获取用户信息 |
| | |
| | | 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); |
| | | } |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | | if (!ObjectUtils.isEmpty(phone)) { |
| | |
| | | * @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)); |
| | | } |
| | | |
| | | /** |
| | |
| | | <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 |