Merge remote-tracking branch 'origin/master'
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.QRActivityCodeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 签到二维码表(ComActActivityCode)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-15 15:23:10 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"活动二维码"}) |
| | | @RestController |
| | | @RequestMapping("comActActivityCode") |
| | | public class ComActActivityCodeApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 查看二维码 |
| | | * @param qrCodeVO |
| | | * @return |
| | | */ |
| | | @ApiOperation("查看二维码") |
| | | @PostMapping("/getQRCode") |
| | | public R getQRCode(@RequestBody QRActivityCodeVO qrCodeVO){ |
| | | return this.communityService.getQRCode(qrCodeVO); |
| | | } |
| | | |
| | | /** |
| | | * 重置二维码 |
| | | * @param qrCodeVO |
| | | * @return |
| | | */ |
| | | @ApiOperation("重置二维码") |
| | | @PostMapping("/resetQRCode") |
| | | public R resetQRCode(@RequestBody QRActivityCodeVO qrCodeVO){ |
| | | return this.communityService.resetQRCode(qrCodeVO); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.ComMngCarAppletDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageVolunteerDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.partybuilding.PartyBuildingService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PageGroup; |
| | | |
| | | import io.swagger.annotations.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private PartyBuildingService partyBuildingService; |
| | | |
| | | @ApiOperation(value = "分页查询小区", response = ComMngStructAreaVO.class) |
| | | @PostMapping("pagearea") |
| | |
| | | return communityService.activityEvaluate(comActActEvaluateVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "我的评价", response = MyActivityEvaluateVO.class) |
| | | @GetMapping("activity/my-evaluate") |
| | | public R listMyActivityEvaluate(@RequestParam("activityId") Long activityId) { |
| | | return communityService.listMyActivityEvaluate(getUserId(), activityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "报名/取消报名社区活动") |
| | | @PutMapping("signactivity") |
| | | public R signActivity(@RequestBody @Validated(AddGroup.class) SignactivityVO signactivityVO) { |
| | | Long userId = this.getUserId(); |
| | | Long activityId = signactivityVO.getActivityId(); |
| | | Integer isVolunteer = signactivityVO.getIsVolunteer(); |
| | | signactivityVO.setUserId(userId); |
| | | R r = communityService.signActivity(signactivityVO); |
| | | if (R.isOk(r) && signactivityVO.getType().intValue() == 1) { |
| | | R r2 = communityService.detailActivity(activityId, userId,null,null); |
| | | ComActActivityVO comActActivityVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(r2.getData()), ComActActivityVO.class); |
| | | Integer isVolunteer = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), Integer.class); |
| | | SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); |
| | | sysUserNoticeVO.setUserId(userId); |
| | | sysUserNoticeVO.setType(1); |
| | |
| | | return communityService.listActivitySigns(activitySignVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "活动报名签到情况", response = ActivitySignInRecordVO.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "社区活动主键", required = true), |
| | | @ApiImplicitParam(name = "type", value = "活动类型,1.居民/志愿者活动 2.党员活动", required = true) |
| | | }) |
| | | @GetMapping("activity/sign-in/list") |
| | | public R listSignInRecord(@RequestParam("id") Long id, @RequestParam("type") Integer type) { |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | if (loginUserInfo.getIsCommunityWorker().intValue() != 1) { |
| | | return R.fail("非社区工作人员"); |
| | | } |
| | | if (type.intValue() == 1) { |
| | | return communityService.listSignInRecord(id); |
| | | } |
| | | return R.fail("type不存在"); |
| | | } |
| | | |
| | | @ApiOperation(value = "活动签到记录", response = ComActActRegistVO.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "活动主键", required = true), |
| | | @ApiImplicitParam(name = "type", value = "活动类型,1.居民/志愿者活动 2.党员活动", required = true), |
| | | @ApiImplicitParam(name = "userId", value = "用户id", required = true) |
| | | }) |
| | | @GetMapping("activity/regist/list") |
| | | public R listRegistRecord(@RequestParam("id") Long id, |
| | | @RequestParam("type") Integer type, |
| | | @RequestParam("userId") Long userId) { |
| | | if (type.intValue() == 1) { |
| | | return communityService.listRegistRecord(id, userId); |
| | | } |
| | | return R.fail("type不存在"); |
| | | } |
| | | |
| | | // @ApiOperation(value = "新增社区动态浏览记录") |
| | | // @PostMapping("dynamicuser") |
| | | // public R addDynamicUser(@RequestBody ComActDynVO comActDynVO){ |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "我的活动", response = ComActActivityVO.class) |
| | | @ApiImplicitParam(name = "status", value = "活动状态(4 进行中 5 已结束 6 已取消)", required = false) |
| | | @GetMapping("listactivity") |
| | | public R listActivity() { |
| | | public R listActivity(@RequestParam(value = "status", required = false) Integer status) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | List<ComActActivityVO> comActActivityVOS = new ArrayList<>(); |
| | | R r = communityService.listActivity(userId); |
| | | R r = communityService.listActivity(userId, status); |
| | | if (R.isOk(r)) { |
| | | comActActivityVOS = (List<ComActActivityVO>)r.getData(); |
| | | } |
| | | R r1 = partyBuildingService.listActivity(userId, communityId); |
| | | R r1 = partyBuildingService.listActivity(userId, communityId, status); |
| | | if (R.isOk(r1)) { |
| | | List<ComActActivityVO> data = (List<ComActActivityVO>)r1.getData(); |
| | | comActActivityVOS.addAll(data); |
| | |
| | | LoginReturnVO loginReturnVO = loginService.loginMerchantBackStage(account, password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | /** |
| | | * 西区大屏登录 |
| | | * @param account 账号 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginXQDP") |
| | | public R loginXQDP(@RequestParam("account") String account, @RequestParam("password") String password) { |
| | | LoginReturnVO loginReturnVO = loginService.loginXQDP(account, password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | } |
| | |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginMerchantBackStage(String account, String password); |
| | | |
| | | /** |
| | | * 西区大屏登录 |
| | | * @param account 账号 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginXQDP(String account, String password); |
| | | } |
| | |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | loginReturnVO.setCommunityId(loginUser.getCommunityId()); |
| | | return loginReturnVO; |
| | | } |
| | | |
| | |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return loginReturnVO; |
| | | } |
| | | |
| | | /** |
| | | * 西区大屏登录 |
| | | * @param account 账号 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @Override |
| | | public LoginReturnVO loginXQDP(String account, String password){ |
| | | Authentication authentication = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account + "_15", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO)authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return loginReturnVO; |
| | | } |
| | | } |
| | |
| | | <orderEntry type="library" name="Maven: org.javassist:javassist:3.20.0-GA" level="project" /> |
| | | <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: cn.afterturn:easypoi-annotation:4.1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.zxing:core:3.1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.zxing:javase:3.1.0" level="project" /> |
| | | </component> |
| | | </module> |
| | |
| | | * 接口未实现 |
| | | */ |
| | | public static final int NOT_IMPLEMENTED = 501; |
| | | |
| | | /** |
| | | * 暂不支持 |
| | | */ |
| | | public static final int NOT_ACCEPTABLE = 406; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | /** |
| | | * @title: PresetPictureType |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 预设图片类型 |
| | | * @author: hans |
| | | * @date: 2021/11/23 17:31 |
| | | */ |
| | | public class PresetPictureType { |
| | | /** |
| | | * 物业宣传 |
| | | */ |
| | | public static Integer PROPERTY_PUBLICITY = 1; |
| | | } |
| | |
| | | vo.setVillageName(oneData.get(1)); |
| | | if (StringUtils.isEmpty(oneData.get(2))) { |
| | | ComMngPopulationImportErrorVO importErrorVO = setError(oneData); |
| | | importErrorVO.setErrorMsg("门牌号不能为空"); |
| | | importErrorVO.setErrorMsg("街路巷号不能为空"); |
| | | populationImportErrorVOList.add(importErrorVO); |
| | | continue; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageBaseDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页基础数据DTO |
| | | * @author: hans |
| | | * @date: 2021/12/21 14:22 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "分页基础数据DTO") |
| | | public class PageBaseDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize; |
| | | |
| | | @ApiModelProperty(value = "查询参数id", example = "10") |
| | | private Long paramId; |
| | | |
| | | @ApiModelProperty(value = "社区id", hidden = true) |
| | | private Long communityId; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "事件状态(1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群上报、7随手拍处理)", required = true) |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("事件类型(1、网格事件 2、随手拍事件)") |
| | | private Integer eventType; |
| | | } |
| | |
| | | @ApiModelProperty("业务id") |
| | | private Long serviceId; |
| | | |
| | | @ApiModelProperty("积分任务类型(1.发布随手拍 2.发布微心愿 3.参与议事投票 4.参与志愿者活动 5.参与社区活动 6.参与党员活动 7.参与调查问卷)") |
| | | @ApiModelProperty("积分任务类型(1.发布随手拍 2.发布微心愿 3.参与议事投票 4.参加居民活动 5.参加志愿者活动 6.参与党员活动 7.参与调查问卷 8.取消活动 )") |
| | | private Integer integralType; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | |
| | | @ApiModelProperty(value = "是否是评论(1.是 2.否)") |
| | | private Integer isComment; |
| | | |
| | | @ApiModelProperty(value = "签到类型 1居民 志愿者签到 2党员签到") |
| | | private Integer activityType; |
| | | |
| | | @ApiModelProperty(value = "是否是志愿者 0 不是 1 是") |
| | | private Integer isVolunteer; |
| | | |
| | | public AddComActIntegralUserDTO(Long serviceId, Integer integralType, Long communityId, Long userId) { |
| | | this.serviceId = serviceId; |
| | | this.integralType = integralType; |
| | |
| | | public AddComActIntegralUserDTO() {} |
| | | |
| | | /** |
| | | * 积分任务类型(1.发布随手拍 2.发布微心愿 3.参与议事投票 4.参与志愿者活动 5.参与社区活动 6.参与党员活动 7.参与调查问卷) |
| | | * 积分任务类型(1.发布随手拍 2.发布微心愿 3.参与议事投票 4.参加居民活动 5.参加志愿者活动 6.参与党员活动 7.参与调查问卷 8.取消活动 ) |
| | | */ |
| | | public interface integralType { |
| | | int fbssp = 1; |
| | | int fbwxy = 2; |
| | | int cyystp = 3; |
| | | int cyzyzhd = 4; |
| | | int cysqhd = 5; |
| | | int cyjmhd = 4; |
| | | int cyzyzhd = 5; |
| | | int cydyhd = 6; |
| | | int cydcwj = 7; |
| | | int qxhd = 8; |
| | | } |
| | | } |
| | |
| | | private String handlePhotoList; |
| | | |
| | | @Max(127) |
| | | @ApiModelProperty(value = "是否公示(0.否 1.是)", hidden = false, example = "1") |
| | | @ApiModelProperty(value = "是否公示(1.是 2.否)", hidden = false, example = "1") |
| | | private Integer isPublicity; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | |
| | | @ApiModelProperty(value = "小区地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "网格id") |
| | | private Long gridId; |
| | | |
| | | public String getSortColumns() { |
| | | // String dbColumn = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, sortAttr); |
| | | return sortAttr; |
| | |
| | | @ApiModelProperty(value = "特殊人员标签") |
| | | private String label; |
| | | |
| | | @ApiModelProperty(value = "网格id") |
| | | private Long gridId; |
| | | |
| | | private Integer outOrLocal; |
| | | |
| | | /** |
| | |
| | | private String token; |
| | | @ApiModelProperty("刷新token有效期长") |
| | | private String refreshToken; |
| | | @ApiModelProperty("communityId") |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ActivitySignInRecordVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 活动报名签到记录 |
| | | * @author: hans |
| | | * @date: 2021/10/19 9:22 |
| | | */ |
| | | @Data |
| | | @ApiModel("活动报名签到记录") |
| | | public class ActivitySignInRecordVO { |
| | | |
| | | @ApiModelProperty("活动类型,1.居民/志愿者活动 2.党员活动") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("活动主键") |
| | | private Long activityId; |
| | | |
| | | @ApiModelProperty("真实名字") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("报名时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("参与次数") |
| | | private Integer times; |
| | | |
| | | @ApiModelProperty("活动限制次数") |
| | | private Integer limit; |
| | | } |
| | |
| | | private Long pageNum = 1L; |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | /** |
| | | * 报名状态 0 已取消 1已报名 |
| | | */ |
| | | @ApiModelProperty("报名状态 0 已取消 1已报名") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 取消原因 |
| | | */ |
| | | @ApiModelProperty("取消原因") |
| | | private String reason; |
| | | |
| | | /** |
| | | * 参与次数 |
| | | */ |
| | | @ApiModelProperty("参与次数") |
| | | private Integer times; |
| | | |
| | | /** |
| | | * 获取奖励 |
| | | */ |
| | | @ApiModelProperty("获取奖励") |
| | | private Integer award; |
| | | |
| | | /** |
| | | * 活动限制次数 |
| | | */ |
| | | @ApiModelProperty("活动限制次数") |
| | | private Integer limit; |
| | | } |
| | |
| | | @ExcelProperty(value = "评价时间", index = 0) |
| | | private Date createAt; |
| | | |
| | | @ExcelProperty(value = "评价星级", index = 4) |
| | | @ExcelProperty(value = "评分星级", index = 4) |
| | | private String starLevel; |
| | | |
| | | @ExcelProperty(value = "评价详情", index = 5) |
| | |
| | | @ApiModel("社区活动签到表") |
| | | public class ComActActRegistExcelVO { |
| | | |
| | | @ExcelProperty(value = "姓名", index = 1) |
| | | @ExcelProperty(value = "姓名", index = 3) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "身份", index = 2) |
| | | @ExcelProperty(value = "身份", index = 4) |
| | | private String identity; |
| | | |
| | | @ExcelProperty(value = "电话", index = 4) |
| | | @ExcelProperty(value = "电话", index = 6) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "签到时间(未签到就是报名时间)", index = 0) |
| | | @ExcelProperty(value = "签到时间", index = 0) |
| | | private Date createAt; |
| | | |
| | | @ExcelProperty(value = "人群标签", index = 3) |
| | | @ExcelProperty(value = "人群标签", index = 5) |
| | | private String tags; |
| | | |
| | | @ExcelProperty(value = "签到地点", index = 1) |
| | | private String position; |
| | | |
| | | @ExcelProperty(value = "签到次数", index = 2) |
| | | private Integer times; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "签到位置") |
| | | private String position; |
| | | |
| | | @ApiModelProperty(value = "签到次数") |
| | | private Integer times; |
| | | |
| | | @ApiModelProperty(value = "二维码id") |
| | | private Integer codeId; |
| | | |
| | | @ApiModelProperty(value = "本次签到获取的积分奖励") |
| | | private Integer award; |
| | | |
| | | @ApiModelProperty(value = "活动类型 1居民,志愿者 2党员") |
| | | private Integer activityType; |
| | | |
| | | @ApiModelProperty("签到开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty("签到结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | @ExcelProperty(value = "报名时间", index = 0) |
| | | private Date createAt; |
| | | |
| | | @ExcelProperty(value = "人群标签", index = 3) |
| | | @ExcelProperty(value = "人员标签", index = 3) |
| | | private String tags; |
| | | |
| | | @ExcelProperty(value = "报名状态",index = 5) |
| | | private String status; |
| | | |
| | | @ExcelProperty(value = "取消原因", index = 6) |
| | | private String reason; |
| | | |
| | | @ExcelProperty(value = "参与情况", index = 7) |
| | | private String condition; |
| | | |
| | | @ExcelProperty(value = "获得奖励", index = 8) |
| | | private String award; |
| | | @ExcelIgnore |
| | | private Integer times; |
| | | @ExcelIgnore |
| | | private Integer limit; |
| | | |
| | | public void generateCondition() { |
| | | if(this.times!=null&&this.limit!=null){ |
| | | this.condition = "("+times+"/"+ (limit.equals(-1) ? "无限" : limit) +")"; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ComActActivityTypeVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 活动分类vo |
| | | * @author: hans |
| | | * @date: 2021/10/21 11:11 |
| | | */ |
| | | @Data |
| | | @ApiModel("活动分类vo") |
| | | public class ComActActivityTypeVO { |
| | | |
| | | @ApiModelProperty("自增id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("类型名称") |
| | | @NotBlank(groups = AddGroup.class, message = "类型名称不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("活动类型(1.志愿者 2.居民 3.党员)") |
| | | @NotNull(groups = AddGroup.class, message = "活动类型不能为空") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "社区id", hidden = true) |
| | | private Long communityId; |
| | | } |
| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("活动名称") |
| | | @NotBlank(groups = AddGroup.class, message = "活动名称不可为空") |
| | | private String activityName; |
| | | |
| | | @ApiModelProperty("负责人userID") |
| | |
| | | private String sponsorName; |
| | | |
| | | @ApiModelProperty("活动地址") |
| | | @NotBlank(groups = AddGroup.class, message = "活动地址不可为空") |
| | | private String activityAddr; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | @NotBlank(groups = AddGroup.class, message = "纬度不可为空") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | @NotBlank(groups = AddGroup.class, message = "经度不可为空") |
| | | private String lng; |
| | | |
| | | @ApiModelProperty("活动状态 1 待发布 2 未开始 3 报名中 4 进行中 5 已结束 6 已取消") |
| | |
| | | @ApiModelProperty("发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date publishAt; |
| | | |
| | | @ApiModelProperty("活动结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @NotNull(groups = AddGroup.class, message = "活动结束时间不可为空") |
| | | private Date endAt; |
| | | |
| | | @ApiModelProperty("活动开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @NotNull(groups = AddGroup.class, message = "活动开始时间不可为空") |
| | | private Date beginAt; |
| | | |
| | | @ApiModelProperty("报名开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @NotNull(groups = AddGroup.class, message = "报名开始时间不可为空") |
| | | private Date signUpBegin; |
| | | |
| | | @ApiModelProperty("报名结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @NotNull(groups = AddGroup.class, message = "报名结束时间不可为空") |
| | | private Date signUpEnd; |
| | | |
| | | @ApiModelProperty("参加人群(多个以逗号隔开)") |
| | |
| | | private Integer participantNow; |
| | | |
| | | @ApiModelProperty("活动封面") |
| | | @NotBlank(groups = AddGroup.class, message = "活动封面不可为空") |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("是否有奖品 1 有 0 无") |
| | |
| | | private String contactName; |
| | | |
| | | @ApiModelProperty("联系人电话") |
| | | @NotBlank(groups = AddGroup.class, message = "联系人电话不可为空") |
| | | private String contactPhone; |
| | | |
| | | @ApiModelProperty("是否签到 1 是 0否") |
| | |
| | | private String rewardDesc; |
| | | |
| | | @ApiModelProperty("活动内容") |
| | | @NotBlank(groups = AddGroup.class, message = "活动内容不可为空") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("活动奖品集合") |
| | |
| | | @ApiModelProperty(value = "查询筛选:0-本小区 1-全部") |
| | | private Integer choice; |
| | | |
| | | @ApiModelProperty("签到范围,默认0无限制") |
| | | @NotNull(groups = AddGroup.class, message = "签到范围不可为空") |
| | | private Integer range; |
| | | |
| | | @ApiModelProperty("是否有积分奖励(1.是 2.否)") |
| | | @NotNull(groups = AddGroup.class, message = "是否有积分奖励不可为空") |
| | | private Integer haveIntegralReward; |
| | | |
| | | @ApiModelProperty("积分奖励方式(1.按次奖励 2.记时奖励)") |
| | | private Integer rewardWay; |
| | | |
| | | @ApiModelProperty("参与签到/打卡奖励积分") |
| | | private Integer rewardIntegral; |
| | | |
| | | @ApiModelProperty("参与次数上限,按次奖励需传入,无次数限制-1") |
| | | private Integer limit; |
| | | |
| | | @ApiModelProperty("是否允许取消(1.允许 2.不允许)") |
| | | @NotNull(groups = AddGroup.class, message = "是否允许取消不可为空") |
| | | private Integer canCancel; |
| | | |
| | | @ApiModelProperty("取消活动扣除积分数目") |
| | | @NotNull(groups = AddGroup.class, message = "取消活动扣除积分数目不可为空") |
| | | private Integer cancelDeduct; |
| | | |
| | | @ApiModelProperty("用户已参与次数") |
| | | private Integer times; |
| | | |
| | | @ApiModelProperty("已获取积分") |
| | | private Integer award; |
| | | |
| | | @ApiModelProperty("二维码类型 1居民,志愿者 2党员") |
| | | private Integer codeType; |
| | | |
| | | @ApiModelProperty("活动类型") |
| | | @NotBlank(groups = AddGroup.class, message = "活动类型不能为空") |
| | | private String activityType; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * 社区账号密码返回参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("社区账号密码返回参数") |
| | | public class ComActPasswordVo { |
| | | |
| | | @ApiModelProperty("账号") |
| | | private String account; |
| | | |
| | | @ApiModelProperty("密码") |
| | | private String password; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.List; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ComActPictureLibraryVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 公共预设图库信息 |
| | | * @author: hans |
| | | * @date: 2021/11/23 17:16 |
| | | */ |
| | | @Data |
| | | @ApiModel("公共预设图库信息") |
| | | public class ComActPictureLibraryVO { |
| | | |
| | | @ApiModelProperty("操作内容") |
| | | private List<String> presetPictures; |
| | | } |
| | |
| | | @ApiModelProperty("题目id") |
| | | private Long reserveSubId; |
| | | @ApiModelProperty("填报时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date time; |
| | | @ApiModelProperty("用户昵称") |
| | | private String nickName; |
| | |
| | | @ExcelProperty(value = "小区名称", index = 1) |
| | | private String villageName; |
| | | |
| | | @ExcelProperty(value = "门牌号", index = 2) |
| | | @ExcelProperty(value = "街路巷号", index = 2) |
| | | private String doorNo; |
| | | |
| | | @ExcelProperty(value = "楼栋号/楼栋名称", index = 3) |
| | | @ExcelProperty(value = "楼栋号", index = 3) |
| | | private String name; |
| | | |
| | | // @ExcelProperty(value = "单元数", index = 6) |
| | |
| | | @ExcelProperty(value = "小区名称", index = 1) |
| | | private String villageName; |
| | | |
| | | @ExcelProperty(value = "门牌号", index = 2) |
| | | @ExcelProperty(value = "街路巷号", index = 2) |
| | | private String doorNo; |
| | | |
| | | @ExcelProperty(value = "楼栋号/楼栋名称", index = 3) |
| | | @ExcelProperty(value = "楼栋号", index = 3) |
| | | private String name; |
| | | |
| | | // @ExcelProperty(value = "单元数", index = 6) |
| | |
| | | @ApiModelProperty("养老金人员") |
| | | private Integer pensionTotal; |
| | | |
| | | @ApiModelProperty("楼栋数") |
| | | private Integer buildNum; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.List; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: MyActivityEvaluateVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 我的评价vo |
| | | * @author: hans |
| | | * @date: 2021/10/21 17:14 |
| | | */ |
| | | @Data |
| | | @ApiModel("我的评价vo") |
| | | public class MyActivityEvaluateVO { |
| | | |
| | | @ApiModelProperty("是否展示评价按钮(1.展示 0.不展示)") |
| | | private Integer isDisplay; |
| | | |
| | | @ApiModelProperty("评论详情") |
| | | private List<ComActActEvaluateVO> myEvaluateList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class QRActivityCodeVO { |
| | | @ApiModelProperty("数据主键id") |
| | | private Integer id; |
| | | @ApiModelProperty("二维码类型 1居民,志愿者 2党员") |
| | | private Integer type; |
| | | @ApiModelProperty(value = "二维码id",example = "1") |
| | | private Long codeId; |
| | | } |
| | |
| | | private Long activityId; |
| | | @ApiModelProperty(value = "当前登录用户id", hidden = true) |
| | | private Long userId; |
| | | @ApiModelProperty("取消原因") |
| | | private String reason; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: StatisticsCommVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: |
| | | * @author: hans |
| | | * @date: 2021/12/06 10:51 |
| | | */ |
| | | @Data |
| | | @ApiModel("统计通用信息") |
| | | public class StatisticsCommVO { |
| | | |
| | | @ApiModelProperty(value = "统计日期") |
| | | private String statisticsDate; |
| | | |
| | | @ApiModelProperty(value = "统计项") |
| | | private String filed; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer num; |
| | | |
| | | @ApiModelProperty("统计项占比") |
| | | private BigDecimal percent; |
| | | |
| | | @ApiModelProperty("统计数据列表") |
| | | private List<StatisticsCommVO> statisticsCommVOS; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("基础数据") |
| | | public class BaseInfo { |
| | | @ApiModelProperty("人口数") |
| | | private Integer population; |
| | | @ApiModelProperty("注册用户量") |
| | | private Integer user; |
| | | @ApiModelProperty("入住小区") |
| | | private Integer village; |
| | | @ApiModelProperty("实有房屋") |
| | | private Integer house; |
| | | @ApiModelProperty("实有单位") |
| | | private Integer company; |
| | | @ApiModelProperty("党员数") |
| | | private Integer partyMember; |
| | | @ApiModelProperty("志愿者") |
| | | private Integer volunteer; |
| | | @ApiModelProperty("党组织") |
| | | private Integer partyOrg; |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("大屏党建活动折线图") |
| | | public class BigScreenActivityLine { |
| | | @ApiModelProperty("月份") |
| | | private String x; |
| | | @ApiModelProperty("新增数") |
| | | private Integer y; |
| | | @ApiModelProperty("累计数") |
| | | private Integer countY; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("党员积分排名") |
| | | public class BigScreenActivityTop { |
| | | @ApiModelProperty("姓名") |
| | | private String name; |
| | | @ApiModelProperty("党组织名") |
| | | private String orgName; |
| | | @ApiModelProperty("党员分数") |
| | | private Integer score; |
| | | @ApiModelProperty("头像") |
| | | private String url; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import java.util.List; |
| | | |
| | | 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.EventGridStatisticsVO; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: BigScreenCommunityStatisticsVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 大屏社区服务统计信息 |
| | | * @author: hans |
| | | * @date: 2021/12/10 13:16 |
| | | */ |
| | | @Data |
| | | @ApiModel("大屏社区服务统计信息") |
| | | public class BigScreenCommunityStatisticsVO { |
| | | |
| | | @ApiModelProperty("大屏网格数据") |
| | | private List<EventGridStatisticsVO> gridStatisticsList; |
| | | |
| | | @ApiModelProperty("小区列表数据") |
| | | private List<CivilVillageStatisticsVO> villageStatisticsList; |
| | | |
| | | @ApiModelProperty("商家地图点位数据") |
| | | private List<ConvenientMerchantVO> merchantMapDataList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: BigScreenDynStatisticsInfo |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 社区动态大屏统计数据 |
| | | * @author: hans |
| | | * @date: 2021/12/17 10:19 |
| | | */ |
| | | @Data |
| | | @ApiModel("社区动态大屏统计数据") |
| | | public class BigScreenDynStatisticsInfo { |
| | | |
| | | @ApiModelProperty("社区动态总数") |
| | | private Integer dynNum = 0; |
| | | |
| | | @ApiModelProperty(value = "社区动态饼图数据") |
| | | private List<StatisticsCommVO> dynCircleData; |
| | | |
| | | @ApiModelProperty(value = "社区动态新增折线数据") |
| | | private List<StatisticsCommVO> dynAddPolylineData; |
| | | |
| | | @ApiModelProperty(value = "社区动态累计折线数据") |
| | | private List<StatisticsCommVO> dynTotalPolylineData; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: BigScreenEasyPhotoStatisticsInfo |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 随手拍大屏统计数据 |
| | | * @author: hans |
| | | * @date: 2021/12/16 13:31 |
| | | */ |
| | | @Data |
| | | @ApiModel("随手拍大屏统计数据") |
| | | public class BigScreenEasyPhotoStatisticsInfo { |
| | | |
| | | @ApiModelProperty("随手拍累计解决数量") |
| | | private Integer eventDealTotal = 0; |
| | | |
| | | @ApiModelProperty("突发事件报告解决数") |
| | | private Integer eventTFDeal = 0; |
| | | |
| | | @ApiModelProperty("治安防控事件解决数") |
| | | private Integer eventZADeal = 0; |
| | | |
| | | @ApiModelProperty("矛盾劝解事件解决数") |
| | | private Integer eventMDDeal = 0; |
| | | |
| | | @ApiModelProperty("特殊人群服务事件解决数") |
| | | private Integer eventTSDeal = 0; |
| | | |
| | | @ApiModelProperty("民生服务事件解决数") |
| | | private Integer eventMSDeal = 0; |
| | | |
| | | @ApiModelProperty("防灾减灾事件解决数") |
| | | private Integer eventFJDeal = 0; |
| | | |
| | | @ApiModelProperty("其他事件解决数") |
| | | private Integer otherDeal = 0; |
| | | |
| | | @ApiModelProperty(value = "随手拍新增折线数据") |
| | | private List<StatisticsCommVO> easyPhotoAddPolylineData; |
| | | |
| | | @ApiModelProperty(value = "随手拍累计折线数据") |
| | | private List<StatisticsCommVO> easyPhotoTotalPolylineData; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | public class BigScreenGridStaticsReturn { |
| | | private Integer count; |
| | | private Integer num; |
| | | private BigDecimal percent; |
| | | private String title; |
| | | private List<BigScreenGridStaticsReturn> bigScreenGridStaticsReturnList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: BigScreenMerchantStatisticsInfo |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民商家大屏统计数据 |
| | | * @author: hans |
| | | * @date: 2021/12/17 15:05 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民商家大屏统计数据") |
| | | public class BigScreenMerchantStatisticsInfo { |
| | | |
| | | @ApiModelProperty("资源类型数") |
| | | private Integer resourceTypeNum = 0; |
| | | |
| | | @ApiModelProperty("服务类型数") |
| | | private Integer serviceTypeNum = 0; |
| | | |
| | | @ApiModelProperty("商家数量") |
| | | private Integer merchantNum = 0; |
| | | |
| | | @ApiModelProperty("已提供服务次数") |
| | | private Integer serviceTimes = 0; |
| | | |
| | | @ApiModelProperty(value = "资源类型饼图数据") |
| | | private List<StatisticsCommVO> resourceTypeCircleData; |
| | | |
| | | @ApiModelProperty(value = "服务类型饼图数据") |
| | | private List<StatisticsCommVO> serviceTypeCircleData; |
| | | |
| | | @ApiModelProperty(value = "服务量新增折线数据") |
| | | private List<StatisticsCommVO> serviceTimesAddPolylineData; |
| | | |
| | | @ApiModelProperty(value = "服务量累计折线数据") |
| | | private List<StatisticsCommVO> serviceTimesTotalPolylineData; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: BigScreenMicroWishStatisticsInfo |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 微心愿大屏统计数据 |
| | | * @author: hans |
| | | * @date: 2021/12/15 16:56 |
| | | */ |
| | | @Data |
| | | @ApiModel("微心愿大屏统计数据") |
| | | public class BigScreenMicroWishStatisticsInfo { |
| | | |
| | | @ApiModelProperty("心愿总数量") |
| | | private Integer microWishTotal; |
| | | |
| | | @ApiModelProperty("心愿已实现数量") |
| | | private Integer microWishRealized; |
| | | |
| | | @ApiModelProperty("心愿未实现数量") |
| | | private Integer microWishUnrealized; |
| | | |
| | | @ApiModelProperty(value = "微心愿新增折线数据") |
| | | private List<StatisticsCommVO> microWishAddPolylineData; |
| | | |
| | | @ApiModelProperty(value = "微心愿累计折线数据") |
| | | private List<StatisticsCommVO> microWishTotalPolylineData; |
| | | |
| | | @ApiModelProperty(value = "微心愿展示列表") |
| | | private List<ComActMicroWishVO> microWishDisplayList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: BigScreenNeighborStatisticsInfo |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 邻里圈大屏统计数据 |
| | | * @author: hans |
| | | * @date: 2021/12/17 13:19 |
| | | */ |
| | | @Data |
| | | @ApiModel("邻里圈大屏统计数据") |
| | | public class BigScreenNeighborStatisticsInfo { |
| | | |
| | | @ApiModelProperty("邻里圈发布内容数") |
| | | private Integer publishContentNum = 0; |
| | | |
| | | @ApiModelProperty("邻里圈发布话题数") |
| | | private Integer publishTopicNum = 0; |
| | | |
| | | @ApiModelProperty(value = "邻里圈饼图数据") |
| | | private List<StatisticsCommVO> neighborCircleData; |
| | | |
| | | @ApiModelProperty(value = "邻里圈新增折线数据") |
| | | private List<StatisticsCommVO> neighborAddPolylineData; |
| | | |
| | | @ApiModelProperty(value = "邻里圈累计折线数据") |
| | | private List<StatisticsCommVO> neighborTotalPolylineData; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireVO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: BigScreenQuestionnaireStatisticsInfo |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 社区问卷大屏统计数据 |
| | | * @author: hans |
| | | * @date: 2021/12/16 16:11 |
| | | */ |
| | | @Data |
| | | @ApiModel("社区问卷大屏统计数据") |
| | | public class BigScreenQuestionnaireStatisticsInfo { |
| | | |
| | | @ApiModelProperty("社区问卷发起总数") |
| | | private Integer questionnaireNum = 0; |
| | | |
| | | @ApiModelProperty("社区问卷参与人数") |
| | | private Integer joinNum = 0; |
| | | |
| | | @ApiModelProperty(value = "社区问卷新增折线数据") |
| | | private List<StatisticsCommVO> questionnaireAddPolylineData; |
| | | |
| | | @ApiModelProperty(value = "社区问卷累计折线数据") |
| | | private List<StatisticsCommVO> questionnaireTotalPolylineData; |
| | | |
| | | @ApiModelProperty(value = "社区问卷展示列表") |
| | | private List<ComActQuestnaireVO> questionnaireDisplayList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("服务数据") |
| | | public class BigScreenServiceData { |
| | | @ApiModelProperty("办事指南") |
| | | private Integer guide; |
| | | @ApiModelProperty("通知公告") |
| | | private Integer announcement; |
| | | @ApiModelProperty("高龄认证") |
| | | private Integer eldersAuth; |
| | | @ApiModelProperty("便民商家") |
| | | private Integer convenient; |
| | | @ApiModelProperty("房屋租赁") |
| | | private Integer rentingHouse; |
| | | @ApiModelProperty("一键服务") |
| | | private Integer oneButton; |
| | | @ApiModelProperty("社区工作者") |
| | | private Integer socialWorker = 0; |
| | | @ApiModelProperty("养老认证") |
| | | private Integer pensionAuth; |
| | | @ApiModelProperty("逝世申报") |
| | | private Integer death=0; |
| | | @ApiModelProperty("高龄补贴") |
| | | private Integer eldersAllowance=0; |
| | | @ApiModelProperty("服务咨询") |
| | | private Integer serviceConsultation=0; |
| | | @ApiModelProperty("政策文件") |
| | | private Integer partyDyn; |
| | | @ApiModelProperty("便民设施") |
| | | private Integer equipment=0; |
| | | @ApiModelProperty("物业公司") |
| | | private Integer property; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("服务居民") |
| | | public class BigScreenServiceUser { |
| | | @ApiModelProperty("小区名") |
| | | private String villageName; |
| | | @ApiModelProperty("人数") |
| | | private Integer num; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("安全防控") |
| | | public class BigScreenStaticsReserve { |
| | | @ApiModelProperty("总数") |
| | | private Integer count; |
| | | @ApiModelProperty("防疫管控") |
| | | private Integer epidemicCount; |
| | | @ApiModelProperty("燃气登记") |
| | | private Integer gasCount; |
| | | @ApiModelProperty("防火登记") |
| | | private Integer fireCount; |
| | | @ApiModelProperty("返攀登记") |
| | | private Integer reserveCount; |
| | | @ApiModelProperty("居家隔离登记") |
| | | private Integer homeCount; |
| | | @ApiModelProperty("返攀登记百分比") |
| | | private BigDecimal reservePercent; |
| | | @ApiModelProperty("居家隔离百分比") |
| | | private BigDecimal homePercent; |
| | | @ApiModelProperty("燃气登记百分比") |
| | | private BigDecimal gasPercent; |
| | | @ApiModelProperty("防火登记百分比") |
| | | private BigDecimal firePercent; |
| | | @ApiModelProperty("折线图数据") |
| | | private List<BigScreenStaticsReserveMonth> bigScreenStaticsReserveMonthList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("每月安全防空数据") |
| | | public class BigScreenStaticsReserveMonth { |
| | | @ApiModelProperty("x轴") |
| | | private String x; |
| | | @ApiModelProperty("燃气登记") |
| | | private Integer gasCount; |
| | | @ApiModelProperty("防火登记") |
| | | private Integer fireCount; |
| | | @ApiModelProperty("返攀登记") |
| | | private Integer reserveCount; |
| | | @ApiModelProperty("居家隔离登记") |
| | | private Integer homeCount; |
| | | @ApiModelProperty("总量") |
| | | private Integer count; |
| | | } |
| | |
| | | private Integer activityCount; |
| | | @ApiModelProperty(value = "党建宣传数") |
| | | private Integer dynCount;// 党建动态 |
| | | |
| | | @ApiModelProperty(value = "社区党委") |
| | | private Integer committeeCount; |
| | | @ApiModelProperty("覆盖率") |
| | | private Integer coverPercent=0; |
| | | @ApiModelProperty("单位党组织") |
| | | private Integer orgPartyCount=0; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | 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 |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 清网治格统计信息 |
| | | * @author: hans |
| | | * @date: 2021/12/08 14:38 |
| | | */ |
| | | @Data |
| | | @ApiModel("清网治格统计信息") |
| | | public class BigscreenGridsGovernanceStatisticsVO { |
| | | |
| | | @ApiModelProperty("事件总数") |
| | | private Integer eventTotal = 0; |
| | | |
| | | @ApiModelProperty("突发事件报告总数") |
| | | private Integer eventTFTotal = 0; |
| | | |
| | | @ApiModelProperty("治安防控事件总数") |
| | | private Integer eventZATotal = 0; |
| | | |
| | | @ApiModelProperty("矛盾劝解事件总数") |
| | | private Integer eventMDTotal = 0; |
| | | |
| | | @ApiModelProperty("特殊人群服务事件总数") |
| | | private Integer eventTSTotal = 0; |
| | | |
| | | @ApiModelProperty("民生服务事件总数") |
| | | private Integer eventMSTotal = 0; |
| | | |
| | | @ApiModelProperty("防灾减灾事件总数") |
| | | private Integer eventFJTotal = 0; |
| | | |
| | | @ApiModelProperty("法规宣传事件总数") |
| | | private Integer eventFGTotal = 0; |
| | | |
| | | @ApiModelProperty("安全巡查") |
| | | private Integer safety=0; |
| | | |
| | | @ApiModelProperty("其他事件总数") |
| | | private Integer otherTotal = 0; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | 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 |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 清网治格统计信息 |
| | | * @author: hans |
| | | * @date: 2021/12/08 14:38 |
| | | */ |
| | | @Data |
| | | @ApiModel("清网治格统计信息") |
| | | public class GridsGovernanceStatisticsVO { |
| | | |
| | | @ApiModelProperty("事件总数") |
| | | private Integer eventTotal = 0; |
| | | |
| | | @ApiModelProperty("已处理事件总数") |
| | | private Integer dealTotal = 0; |
| | | |
| | | @ApiModelProperty("待处理事件总数") |
| | | private Integer unDealTotal = 0; |
| | | |
| | | @ApiModelProperty("突发事件报告总数") |
| | | private Integer eventTFTotal = 0; |
| | | |
| | | @ApiModelProperty("治安防控事件总数") |
| | | private Integer eventZATotal = 0; |
| | | |
| | | @ApiModelProperty("矛盾劝解事件总数") |
| | | private Integer eventMDTotal = 0; |
| | | |
| | | @ApiModelProperty("特殊人群服务事件总数") |
| | | private Integer eventTSTotal = 0; |
| | | |
| | | @ApiModelProperty("民生服务事件总数") |
| | | private Integer eventMSTotal = 0; |
| | | |
| | | @ApiModelProperty("防灾减灾事件总数") |
| | | private Integer eventFJTotal = 0; |
| | | |
| | | @ApiModelProperty("其他事件总数") |
| | | private Integer otherTotal = 0; |
| | | |
| | | @ApiModelProperty("突发事件报告完成数") |
| | | private Integer eventTFDeal = 0; |
| | | |
| | | @ApiModelProperty("治安防控事件完成数") |
| | | private Integer eventZADeal = 0; |
| | | |
| | | @ApiModelProperty("矛盾劝解事件完成数") |
| | | private Integer eventMDDeal = 0; |
| | | |
| | | @ApiModelProperty("特殊人群服务事件完成数") |
| | | private Integer eventTSDeal = 0; |
| | | |
| | | @ApiModelProperty("民生服务事件完成数") |
| | | private Integer eventMSDeal = 0; |
| | | |
| | | @ApiModelProperty("防灾减灾事件完成数") |
| | | private Integer eventFJDeal = 0; |
| | | |
| | | @ApiModelProperty("其他事件完成数") |
| | | private Integer otherDeal = 0; |
| | | |
| | | @ApiModelProperty("网格数") |
| | | private Integer gridTotal = 0; |
| | | |
| | | @ApiModelProperty("调解员") |
| | | private Integer gridMemberTotal = 0; |
| | | |
| | | @ApiModelProperty("大屏网格数据") |
| | | private List<EventGridStatisticsVO> gridStatisticsList; |
| | | |
| | | @ApiModelProperty("小区列表数据") |
| | | private List<CivilVillageStatisticsVO> villageStatisticsList; |
| | | |
| | | @ApiModelProperty("社区事件数据") |
| | | private List<EventGridIncidentStatisticsVO> gridIncidentList; |
| | | |
| | | @ApiModelProperty("人口统计") |
| | | private ScreenDrawEventPopulationTotalVO drawEventPopulationTotalVO; |
| | | |
| | | @ApiModelProperty("年龄段统计") |
| | | private List<StatisticsCommVO> ageGroupStatistics; |
| | | |
| | | @ApiModelProperty("事件分析新增折线数据") |
| | | private List<StatisticsCommVO> eventAddPolylineData; |
| | | |
| | | @ApiModelProperty("事件分析累计折线数据") |
| | | private List<StatisticsCommVO> eventTotalPolylineData; |
| | | |
| | | @ApiModelProperty("绘制事件类型统计圆形图") |
| | | private List<StatisticsCommVO> eventTypeCircleDrawData; |
| | | |
| | | public void generateStatisticsData() { |
| | | this.eventTotal = this.eventTFTotal + this.eventZATotal + this.eventMDTotal + |
| | | this.eventTSTotal + this.eventMSTotal + this.eventFJTotal + this.otherTotal; |
| | | this.dealTotal = this.eventTFDeal + this.eventZADeal + this.eventMDDeal + |
| | | this.eventTSDeal + this.eventMSDeal + this.eventFJDeal + this.otherDeal; |
| | | this.unDealTotal = this.eventTotal - this.dealTotal; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("返攀登记数据") |
| | | public class IndexBackReserve { |
| | | @ApiModelProperty("总数") |
| | | private Integer count; |
| | | @ApiModelProperty("标题数量") |
| | | private List<IndexReserveSub> indexReserveSubList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("首页业务模块统计") |
| | | public class IndexDynamic { |
| | | @ApiModelProperty("微心愿") |
| | | private Integer microWish; |
| | | @ApiModelProperty("随手拍") |
| | | private Integer easyPhoto; |
| | | @ApiModelProperty("居民活动") |
| | | private Integer residentActivity=0; |
| | | @ApiModelProperty("志愿服务") |
| | | private Integer volunteerActivity=0; |
| | | @ApiModelProperty("党员活动") |
| | | private Integer partyActivity; |
| | | @ApiModelProperty("社区问卷") |
| | | private Integer questionnaire; |
| | | @ApiModelProperty("社区动态") |
| | | private Integer dynamic; |
| | | @ApiModelProperty("邻里圈") |
| | | private Integer neighbor; |
| | | @ApiModelProperty("便民商家") |
| | | private Integer convenient; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("居家隔离数据") |
| | | public class IndexHomeQuarantine { |
| | | @ApiModelProperty("总数") |
| | | private Integer count; |
| | | @ApiModelProperty("标题数量") |
| | | private List<IndexReserveSub> indexReserveSubList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import com.panzhihua.common.model.vos.community.screen.index.IndexEventGridStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.index.IndexPopulationStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.index.IndexSpecialStatisticsVO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("大屏首页返回数据") |
| | | public class IndexInfo { |
| | | @ApiModelProperty("基础数据") |
| | | private BaseInfo baseInfo; |
| | | @ApiModelProperty("实有人口数据") |
| | | private IndexPopulationStatisticsVO indexPopulationStatisticsVO; |
| | | @ApiModelProperty("特殊人群统计模块数据") |
| | | private List<IndexSpecialStatisticsVO> specialStatisticsVOList; |
| | | @ApiModelProperty("网格化治理模块数据") |
| | | private IndexEventGridStatisticsVO eventGridStatisticsVO; |
| | | @ApiModelProperty("返攀登记居家隔离数据统计") |
| | | private IndexReserve indexReserve; |
| | | @ApiModelProperty("业务统计") |
| | | private IndexDynamic indexDynamic; |
| | | @ApiModelProperty("杨戬要求修改") |
| | | private BigScreenGridStaticsReturn bigScreenGridStaticsReturn; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("返攀登记居家隔离数据") |
| | | public class IndexReserve { |
| | | @ApiModelProperty("返攀登记数据") |
| | | private IndexBackReserve indexBackReserve; |
| | | @ApiModelProperty("居家隔离数据") |
| | | private IndexHomeQuarantine indexHomeQuarantine; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("返攀登记居家隔离数据标题数量") |
| | | public class IndexReserveSub { |
| | | @ApiModelProperty("标题值") |
| | | private Integer key; |
| | | @ApiModelProperty("数量") |
| | | private Integer num; |
| | | @ApiModelProperty("总数") |
| | | private Integer allCount; |
| | | @ApiModelProperty("占比") |
| | | private BigDecimal percent; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ResidentAutonomyStatisticsVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 居民自治统计信息 |
| | | * @author: hans |
| | | * @date: 2021/12/06 14:27 |
| | | */ |
| | | @Data |
| | | @ApiModel("居民自治统计信息") |
| | | public class ResidentAutonomyStatisticsVO { |
| | | |
| | | @ApiModelProperty(value = "随手拍本月总数") |
| | | private Integer easyPhotoCurrentMonCount; |
| | | |
| | | @ApiModelProperty(value = "随手拍总数") |
| | | private Integer easyPhotoTotalCount; |
| | | |
| | | @ApiModelProperty(value = "随手拍分类柱状统计") |
| | | private List<StatisticsCommVO> easyPhotoHistogram; |
| | | |
| | | @ApiModelProperty(value = "微心愿本月总数") |
| | | private Integer microWishCurrentMonCount; |
| | | |
| | | @ApiModelProperty(value = "集心池") |
| | | private Integer aimNum; |
| | | |
| | | @ApiModelProperty(value = "微心愿总数") |
| | | private Integer microWishTotal; |
| | | |
| | | @ApiModelProperty(value = "微心愿待实现&已实现数目及占比") |
| | | private List<StatisticsCommVO> microWishRealizePercent; |
| | | |
| | | @ApiModelProperty(value = "微心愿图片") |
| | | private List<String> microWishImages; |
| | | |
| | | @ApiModelProperty(value = "业主委员会本月总数") |
| | | private Integer committeeCurrentMonCount; |
| | | |
| | | @ApiModelProperty(value = "业主委员会总数") |
| | | private Integer committeeTotal; |
| | | |
| | | @ApiModelProperty(value = "业主委员会小区覆盖率") |
| | | private BigDecimal areaCoverPercent; |
| | | |
| | | @ApiModelProperty(value = "议事投票本月总数") |
| | | private Integer discussCurrentMonCount; |
| | | |
| | | @ApiModelProperty(value = "议事投票总数") |
| | | private Integer discussTotal; |
| | | |
| | | @ApiModelProperty(value = "议事参与人总数") |
| | | private Integer discussCount; |
| | | |
| | | @ApiModelProperty(value = "投票参与人总数") |
| | | private Integer voteCount; |
| | | |
| | | @ApiModelProperty(value = "议事标题") |
| | | private List<String> discussTitles; |
| | | |
| | | @ApiModelProperty(value = "投票标题") |
| | | private List<String> voteTitles; |
| | | |
| | | @ApiModelProperty(value = "议事投票类型占比") |
| | | private List<StatisticsCommVO> discussTypePercent; |
| | | |
| | | @ApiModelProperty(value = "邻里圈本月总数") |
| | | private Integer neighborCurrentMonCount; |
| | | |
| | | @ApiModelProperty(value = "邻里圈总数") |
| | | private Integer neighborTotal; |
| | | |
| | | @ApiModelProperty(value = "邻里圈点赞量") |
| | | private Integer neighborFabulousNum; |
| | | |
| | | @ApiModelProperty(value = "邻里圈分享量") |
| | | private Integer neighborForwardNum; |
| | | |
| | | @ApiModelProperty(value = "邻里圈评论量") |
| | | private Integer neighborCommentNum; |
| | | |
| | | @ApiModelProperty(value = "邻里圈图片") |
| | | private List<String> neighborImages; |
| | | |
| | | @ApiModelProperty(value = "邻里圈文本内容") |
| | | private List<String> neighborContents; |
| | | |
| | | @ApiModelProperty(value = "报事报修本月总数") |
| | | private Integer repairCurrentMonCount; |
| | | |
| | | @ApiModelProperty(value = "报事报修总数") |
| | | private Integer repairTotal; |
| | | |
| | | @ApiModelProperty(value = "报事报修新增折线数据") |
| | | private List<StatisticsCommVO> repairAddPolylineData; |
| | | |
| | | @ApiModelProperty(value = "报事报修累计折线数据") |
| | | private List<StatisticsCommVO> repairTotalPolylineData; |
| | | |
| | | @ApiModelProperty(value = "爱心义仓本月总数") |
| | | private Integer warehouseCurrentMonCount; |
| | | |
| | | @ApiModelProperty(value = "爱心义仓总捐赠数") |
| | | private Integer warehouseTotal; |
| | | |
| | | @ApiModelProperty(value = "爱心义仓剩余物品数") |
| | | private Integer warehouseSurplusTotal; |
| | | |
| | | @ApiModelProperty(value = "爱心义仓已领取物品数") |
| | | private Integer warehouseApplyTotal; |
| | | |
| | | @ApiModelProperty(value = "爱心义仓捐赠记录") |
| | | private List<String> warehouseDonateRecords; |
| | | |
| | | @ApiModelProperty(value = "爱心义仓爱心传递") |
| | | private List<String> warehouseLoveTransfer; |
| | | |
| | | @ApiModelProperty(value = "爱心义仓捐赠物品图片") |
| | | private List<String> warehouseImages; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("西区大屏治理数据") |
| | | public class WestScreenStatics { |
| | | @ApiModelProperty("注册人数") |
| | | private Integer user; |
| | | @ApiModelProperty("党组织") |
| | | private Integer partyOrg; |
| | | @ApiModelProperty("党员") |
| | | private Integer partyMember; |
| | | @ApiModelProperty("志愿者") |
| | | private Integer volunteer; |
| | | @ApiModelProperty("微心愿") |
| | | private Integer microWish; |
| | | @ApiModelProperty("安全巡查") |
| | | private Integer safety; |
| | | @ApiModelProperty("社区活动") |
| | | private Integer activity; |
| | | @ApiModelProperty("疫情防控") |
| | | private Integer reserve; |
| | | @ApiModelProperty("邻里圈") |
| | | private Integer neighbor; |
| | | @ApiModelProperty("一起议") |
| | | private Integer discuss; |
| | | @ApiModelProperty("日活跃") |
| | | private Integer dayUser; |
| | | @ApiModelProperty("累计用户") |
| | | private Integer countUser; |
| | | } |
| | |
| | | @ApiModel("小程序-用户社区积分明细返回参数") |
| | | public class ComActIntegralCommunityTradeVO { |
| | | |
| | | @ApiModelProperty("交易业务类型(1.发布随手拍 2.发布微心愿 3.参与议事投票 4.参与志愿者活动 5.参与社区活动 6.参与党员活动 7.参与调查问卷)") |
| | | @ApiModelProperty("交易业务类型(1.发布随手拍 2.发布微心愿 3.参与议事投票 4.参与志愿者活动 5.参与社区活动 6.参与党员活动 7.参与调查问卷)8活动签到") |
| | | private Integer serviceType; |
| | | |
| | | @ApiModelProperty("交易数量") |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.screen.event; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: EventComprehensiveGovernanceStatisticsVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 西区大数据分析平台-综合治理信息 |
| | | * @author: hans |
| | | * @date: 2021/12/14 9:16 |
| | | */ |
| | | @Data |
| | | @ApiModel("西区大数据分析平台-综合治理信息") |
| | | public class EventComprehensiveGovernanceStatisticsVO { |
| | | |
| | | @ApiModelProperty("综合治理总数") |
| | | private Integer governanceTotal = 0; |
| | | |
| | | @ApiModelProperty("突发事件报告总数") |
| | | private Integer eventTFTotal = 0; |
| | | |
| | | @ApiModelProperty("治安防控总数") |
| | | private Integer eventZATotal = 0; |
| | | |
| | | @ApiModelProperty("矛盾劝解总数") |
| | | private Integer eventMDTotal = 0; |
| | | |
| | | @ApiModelProperty("特殊人群服务总数") |
| | | private Integer eventTSTotal = 0; |
| | | |
| | | @ApiModelProperty("民生服务总数") |
| | | private Integer eventMSTotal = 0; |
| | | |
| | | @ApiModelProperty("居民随手拍总数") |
| | | private Integer eventSSPTotal = 0; |
| | | |
| | | public void generateGovernanceTotal() { |
| | | this.governanceTotal = this.eventTFTotal + this.eventZATotal + this.eventMDTotal + |
| | | this.eventTSTotal + this.eventMSTotal + this.eventSSPTotal; |
| | | } |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("大屏网格下事件统计返回参数") |
| | | public class EventGridIncidentStatisticsVO { |
| | |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long eventId; |
| | | |
| | | @ApiModelProperty("事件状态(1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群上报、7随手拍处理)") |
| | | // 旧版参照@ApiModelProperty("事件状态(1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群上报、7随手拍处理)") |
| | | /** |
| | | * type不代表网格类型 |
| | | */ |
| | | @ApiModelProperty("事件状态(1治安防控、2民生服务、3矛盾劝解、4不稳定因素、5突发事件报告、6特殊人群服务、9防灾减灾、10其他)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("事件类型(1、网格事件 2、随手拍事件)") |
| | | private Integer eventType; |
| | | |
| | | @ApiModelProperty("事件发生经纬度") |
| | | private String latLng; |
| | | |
| | | @ApiModelProperty("处理状态") |
| | | @ApiModelProperty("事件内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("事件封面") |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("处理状态(1.已处理 2.待处理)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("事件创建时间") |
| | | private Date createAt; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.screen.event; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: EventComprehensiveGovernanceStatisticsVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 西区大数据分析平台-综合治理信息 |
| | | * @author: lyq |
| | | * @date: 2021/12/14 10:53 |
| | | */ |
| | | @Data |
| | | @ApiModel("西区大数据分析平台-一标三实基础信息") |
| | | public class EventPopulationBasicsStatisticsVO { |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("社区名称") |
| | | private String communityName; |
| | | |
| | | @ApiModelProperty("人口数量") |
| | | private Integer populationNum = 0; |
| | | |
| | | @ApiModelProperty("小区数量") |
| | | private Integer villageNum = 0; |
| | | |
| | | @ApiModelProperty("房屋数量") |
| | | private Integer houseNum = 0; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.screen.event; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: EventComprehensiveGovernanceStatisticsVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 西区大数据分析平台-综合治理信息 |
| | | * @author: lyq |
| | | * @date: 2021/12/14 10:53 |
| | | */ |
| | | @Data |
| | | @ApiModel("西区大数据分析平台-一标三实特殊人群信息") |
| | | public class EventPopulationSpecialStatisticsVO { |
| | | |
| | | @ApiModelProperty("残疾人") |
| | | private Integer cjTotal = 0; |
| | | |
| | | @ApiModelProperty("低保户") |
| | | private Integer dbTotal = 0; |
| | | |
| | | @ApiModelProperty("高龄老人") |
| | | private Integer glTotal = 0; |
| | | |
| | | @ApiModelProperty("特殊情况") |
| | | private Integer tsTotal = 0; |
| | | |
| | | @ApiModelProperty("特扶家庭") |
| | | private Integer tfTotal = 0; |
| | | |
| | | @ApiModelProperty("退役军人") |
| | | private Integer tyTotal = 0; |
| | | |
| | | @ApiModelProperty(value = "吸毒人员",hidden = true) |
| | | private Integer xdTotal = 0; |
| | | |
| | | @ApiModelProperty(value = "社区矫正人员",hidden = true) |
| | | private Integer jzTotal = 0; |
| | | |
| | | @ApiModelProperty(value = "邪教人员",hidden = true) |
| | | private Integer xjTotal = 0; |
| | | |
| | | @ApiModelProperty(value = "刑释人员",hidden = true) |
| | | private Integer xsTotal = 0; |
| | | |
| | | @ApiModelProperty(value = "上访人员",hidden = true) |
| | | private Integer sfTotal = 0; |
| | | |
| | | @ApiModelProperty(value = "重精人员",hidden = true) |
| | | private Integer zjTotal = 0; |
| | | |
| | | @ApiModelProperty("老年人(》=60)") |
| | | private Integer lnTotal = 0; |
| | | |
| | | @ApiModelProperty("其他") |
| | | private Integer otherTotal = 0; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.screen.event; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: EventComprehensiveGovernanceStatisticsVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 西区大数据分析平台-综合治理信息 |
| | | * @author: lyq |
| | | * @date: 2021/12/14 10:53 |
| | | */ |
| | | @Data |
| | | @ApiModel("西区大数据分析平台-一标三实信息") |
| | | public class EventPopulationStatisticsVO { |
| | | |
| | | @ApiModelProperty("人口数据") |
| | | private List<EventPopulationBasicsStatisticsVO> basicsList; |
| | | |
| | | @ApiModelProperty("特殊人口数据") |
| | | private EventPopulationSpecialStatisticsVO specialStatisticsVo; |
| | | |
| | | @ApiModelProperty("人口数量") |
| | | private Integer populationNum = 0; |
| | | |
| | | @ApiModelProperty("小区数量") |
| | | private Integer villageNum = 0; |
| | | |
| | | @ApiModelProperty("房屋数量") |
| | | private Integer houseNum = 0; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.screen.event; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: EventComprehensiveGovernanceStatisticsVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 西区大数据分析平台-综合治理信息 |
| | | * @author: lyq |
| | | * @date: 2021/12/14 10:53 |
| | | */ |
| | | @Data |
| | | @ApiModel("西区大数据分析平台-街道列表信息") |
| | | public class EventPopulationStreetVO { |
| | | |
| | | @ApiModelProperty("街道id") |
| | | private Long streetId; |
| | | |
| | | @ApiModelProperty("街道名称") |
| | | private String name; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel("大屏首页网格化治理事件数据统计返回参数") |
| | | public class IndexGridEventStatisticsVO { |
| | | |
| | | @ApiModelProperty("突发事件数量") |
| | | private Integer eventTFTotal; |
| | | |
| | | @ApiModelProperty("突发事件占比") |
| | | private BigDecimal tfPercent; |
| | | @ApiModelProperty("治安隐患事件数量") |
| | | private Integer eventZATotal; |
| | | @ApiModelProperty("治安隐患事件占比") |
| | | private BigDecimal zaPercent; |
| | | |
| | | @ApiModelProperty("矛盾纠纷事件数量") |
| | | private Integer eventMDTotal; |
| | | @ApiModelProperty("矛盾纠纷事件占比") |
| | | private BigDecimal mdPercent; |
| | | |
| | | @ApiModelProperty("特殊人员上报数量") |
| | | private Integer eventTSTotal; |
| | | @ApiModelProperty("特殊人员上报占比") |
| | | private BigDecimal tsPercent; |
| | | |
| | | @ApiModelProperty("不稳定因素事件数量") |
| | | private Integer eventBWDTotal; |
| | | |
| | | @ApiModelProperty("不稳定因素事件占比") |
| | | private BigDecimal bwdPercent; |
| | | @ApiModelProperty("公共服务数量") |
| | | private Integer eventGGTotal; |
| | | |
| | | @ApiModelProperty("公共服务占比") |
| | | private BigDecimal ggPercent; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel("大屏首页实有人口年龄段数据统计返回参数") |
| | | public class IndexPopulationAgeStatisticsVO { |
| | |
| | | @ApiModelProperty("数量") |
| | | private Integer sum = 0; |
| | | |
| | | @ApiModelProperty("占比") |
| | | private BigDecimal percent; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("数量") |
| | | private Integer sum; |
| | | |
| | | @ApiModelProperty("占比") |
| | | private Integer percent; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel("大屏首页特殊人群统计数据返回参数") |
| | | public class IndexSpecialStatisticsVO { |
| | |
| | | @ApiModelProperty("人口数量") |
| | | private Integer sum; |
| | | |
| | | @ApiModelProperty("占比") |
| | | private BigDecimal percent; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "社区id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "社区名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | private String lng; |
| | | |
| | | @ApiModelProperty(value = "维度") |
| | | private String lat; |
| | | } |
| | |
| | | @ApiModelProperty("话题名称") |
| | | private String topicName; |
| | | |
| | | @ApiModelProperty("头像") |
| | | private String imageUrl; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("是否是个人发起 1 是 0 否") |
| | | private Integer isPerson; |
| | | |
| | | @ApiModelProperty("二维码类型 1居民,志愿者 2党员") |
| | | private Integer codeType; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("网格员") |
| | | private Integer WGYTotal = 6; |
| | | |
| | | @ApiModelProperty("总户数") |
| | | private Integer houseTotal = 0; |
| | | |
| | | @ApiModelProperty("残疾人") |
| | | private Integer disabilityTotal = 0; |
| | | |
| | | @ApiModelProperty("低保户") |
| | | private Integer lowSecurityTotal = 0; |
| | | |
| | | @ApiModelProperty("高龄老人") |
| | | private Integer elderTotal = 0; |
| | | |
| | | @ApiModelProperty("特殊情况") |
| | | private Integer specialSituationTotal = 0; |
| | | |
| | | @ApiModelProperty("其他") |
| | | private Integer otherTotal = 0; |
| | | |
| | | @ApiModelProperty("特扶家庭") |
| | | private Integer specialHelpTotal = 0; |
| | | |
| | | @ApiModelProperty("退役军人") |
| | | private Integer veteransTotal = 0; |
| | | |
| | | @ApiModelProperty("老年人") |
| | | private Integer oldTotal = 0; |
| | | |
| | | @ApiModelProperty("养老人员") |
| | | private Integer pensionTotal = 0; |
| | | |
| | | @ApiModelProperty("出租房源") |
| | | private Integer rentingHouseTotal = 0; |
| | | |
| | | @ApiModelProperty("社会工作者") |
| | | private Integer socialWorkerTotal = 0; |
| | | |
| | | @ApiModelProperty("志愿者") |
| | | private Integer volunteerTotal = 0; |
| | | |
| | | @ApiModelProperty("平均年龄") |
| | | private Integer averageAge = 0; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "身份证") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty("头像") |
| | | private String imageUrl; |
| | | |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/loginMerchantBackStage") |
| | | R loginMerchantBackStage(@RequestParam("account") String account, @RequestParam("password") String password); |
| | | |
| | | /** |
| | | * 西区大屏登录 |
| | | * @param account 账号 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginXQDP") |
| | | R loginXQDP(@RequestParam("account") String account, @RequestParam("password") String password); |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | |
| | | import com.panzhihua.common.model.vos.community.BatchhouseVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActRegistVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityTypeVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.ComActAnnouncementVO; |
| | | import com.panzhihua.common.model.vos.community.ComActColumnVO; |
| | |
| | | import com.panzhihua.common.model.vos.community.ComSwRotaExcelVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthElderlyExcelVO; |
| | | import com.panzhihua.common.model.vos.community.QRActivityCodeVO; |
| | | import com.panzhihua.common.model.vos.community.ResetComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.SignactivityVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticAgeGender; |
| | |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @param status |
| | | * @return 活动列表 |
| | | */ |
| | | @PostMapping("listactivity") |
| | | R listActivity(@RequestParam("userId") Long userId); |
| | | R listActivity(@RequestParam("userId") Long userId, @RequestParam(value = "status", required = false) Integer status); |
| | | |
| | | /** |
| | | * 用户确认心愿 |
| | |
| | | R getWestCommunityLists(); |
| | | |
| | | /** |
| | | * 综治app-小区列表 |
| | | * @param villageListAppDTO 请求参数 |
| | | * @return 小区列表 |
| | | */ |
| | | @PostMapping("/village/grid/list/app") |
| | | R getGridVillageListApp(@RequestBody ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | /** |
| | | * 分页查询退役军人列表 |
| | | * |
| | | * @param comExServicemanDTO |
| | |
| | | R addIntegralTradeAdmin(@RequestBody AddComActIntegralUserDTO integralUserDTO); |
| | | |
| | | /** |
| | | * 根据社区活动id查询社区活动报名人员列表 |
| | | * 根据社区活动id查询社区活动报名且未参与人员列表 |
| | | * |
| | | * @param activityId |
| | | * 活动id |
| | | * @return 社区活动报名人员列表 |
| | | * @return 社区活动报名且未参与人员列表 |
| | | */ |
| | | @PostMapping("/integral/act/activity/admin") |
| | | R getTaskActivityPeopleList(@RequestParam("activityId") Long activityId); |
| | |
| | | R applyDonates(@RequestBody ComActWarehouseApplyDTO comActWarehouseApplyDTO); |
| | | |
| | | /** |
| | | * 生成二维码 |
| | | * @param qrCodeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/comActActivityCode/getQRCode") |
| | | public R getQRCode(@RequestBody QRActivityCodeVO qrCodeVO); |
| | | |
| | | /** |
| | | * 重置二维码 |
| | | * @param qrCodeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/comActActivityCode/resetQRCode") |
| | | public R resetQRCode(@RequestBody QRActivityCodeVO qrCodeVO); |
| | | |
| | | /** |
| | | * 实有房屋数据修复定时任务 |
| | | * @return 实有房屋数据修复定时任务 |
| | | */ |
| | |
| | | */ |
| | | @PostMapping("/elders/pensionAuthRecord/add") |
| | | R addPensionAuthRecordVO(@RequestBody ComElderAuthRecordVO comElderAuthRecordVO); |
| | | /** |
| | | * 活动报名签到情况 |
| | | * @param id 活动主键id |
| | | * @return |
| | | */ |
| | | @GetMapping("/activity/sign-in/list") |
| | | R listSignInRecord(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 活动签到记录 |
| | | * @param id 活动主键 |
| | | * @param userId 用户id |
| | | * @return |
| | | */ |
| | | @GetMapping("/activity/regist/list") |
| | | R listRegistRecord(@RequestParam("id") Long id, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 获取活动类型(目前只有志愿者活动需要获取) |
| | | * @param communityId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @GetMapping("/activity/type/list") |
| | | R listActivityType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type); |
| | | |
| | | /** |
| | | * 添加活动类型 |
| | | * @param comActActivityTypeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/activity/type/add") |
| | | R addActivityType(@RequestBody ComActActivityTypeVO comActActivityTypeVO); |
| | | |
| | | /** |
| | | * 我的评价 |
| | | * @param userId |
| | | * @param activityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/activity/my-evaluate") |
| | | R listMyActivityEvaluate(@RequestParam("userId") Long userId, @RequestParam("activityId") Long activityId); |
| | | |
| | | /** |
| | | * 分页查询居家隔离统计 |
| | |
| | | @GetMapping("/rentingHourseRegister/updateAllHouseUnionAppCode") |
| | | @Async |
| | | void updateAllHouseUnionAppCode(); |
| | | |
| | | /** |
| | | * 西区大屏治理数据 |
| | | */ |
| | | @GetMapping("/screen/getWestScreenStatics") |
| | | R westScreenStatics(); |
| | | |
| | | /** |
| | | * 西区大屏一标三实数据 |
| | | * @return 西区大屏一标三实数据 |
| | | */ |
| | | @GetMapping("/screen/getComprehensivePopulationStatics") |
| | | R getComprehensivePopulationStatics(@RequestParam("streetId") Long streetId); |
| | | |
| | | @GetMapping("/screen/getComprehensiveStreetList") |
| | | R getComprehensiveStreetList(); |
| | | |
| | | /** |
| | | * 通过社区id查询社区账号密码 |
| | | * @param communityId 社区id |
| | | * @return 查询社区账号密码 |
| | | */ |
| | | @GetMapping("/screen/getCommunityPassword") |
| | | R getCommunityPassword(@RequestParam("communityId") Long communityId); |
| | | |
| | | @GetMapping("/reserve/bigScreenStaticsReserve") |
| | | R bigScreenStaticsReserve(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 党员活动折线图 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/bigscreen/party/partyActivityLine") |
| | | R partyActivityLine(@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 党员积分前3 |
| | | * @param pageBigScreenStatisticPartyOrg |
| | | * @return |
| | | */ |
| | | @PostMapping("/bigscreen/party/partyActivityTop") |
| | | R partyActivityTop(@RequestBody PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg); |
| | | |
| | | /** |
| | | * 社区服务大屏数据分析接口 |
| | | */ |
| | | @GetMapping("/screen/serviceData") |
| | | R serviceData(@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 服务居民接口 |
| | | */ |
| | | @GetMapping("/screen/serviceUser") |
| | | R serviceUser(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 大数据分析平台-居民自治 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/screen/resident/autonomy") |
| | | R getResidentAutonomy(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 大数据分析平台-清网治格 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/screen/grids/governance") |
| | | R getGridsGovernance(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 大数据分析平台-社区服务 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/screen/community/service") |
| | | R getCommunityServiceStatistics(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 分页获取热度排行商家 |
| | | * @param pagePopularMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/screen/merchant/popular") |
| | | R getScreenPopularMerchants(@RequestBody PagePopularMerchantDTO pagePopularMerchantDTO); |
| | | |
| | | /** |
| | | * 新版大屏首页接口 |
| | | */ |
| | | @GetMapping("/screen/indexInfo") |
| | | R indexInfo(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-微心愿 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/screen/index/microWish") |
| | | R indexMicroWish(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-随手拍 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/screen/index/easyPhoto") |
| | | R indexEasyPhoto(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-随手拍展示列表 |
| | | * @return |
| | | */ |
| | | @PostMapping("/screen/index/easyPhotoList") |
| | | R indexEasyPhotoList(@RequestBody PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 首页二级页面-社区问卷 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/screen/index/questionnaire") |
| | | R indexQuestionnaire(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-社区动态 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/screen/index/dyn") |
| | | R indexDyn(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-社区动态展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/screen/index/dynList") |
| | | R indexDynList(@RequestBody PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 首页二级页面-邻里圈 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/screen/index/neighbor") |
| | | R indexNeighbor(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-邻里圈展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/screen/index/neighborList") |
| | | R indexNeighborList(@RequestBody PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 首页二级页面-便民商家 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/screen/index/merchant") |
| | | R indexMerchant(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-商家展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/screen/index/merchantList") |
| | | R indexMerchantList(@RequestBody PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 首页二级页面-微心愿展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/screen/index/microWishList") |
| | | R indexMicroWishList(@RequestBody PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 首页二级页面-社区问卷展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/screen/index/questionnaireList") |
| | | R indexQuestionnaireList(@RequestBody PageBaseDTO pageBaseDTO); |
| | | } |
| | |
| | | R getCivilDrawList(@RequestBody ScreenDrawEventListDTO eventListDTO); |
| | | |
| | | /** |
| | | * 新版绘制多边形统计数据 |
| | | * @param eventListDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/screen/getCivilDrawListNew") |
| | | R getCivilDrawListNew(@RequestBody ScreenDrawEventListDTO eventListDTO); |
| | | |
| | | /** |
| | | * 大屏-根据小区id查询小区统计人数 |
| | | * |
| | | * @param villageId |
| | |
| | | */ |
| | | @GetMapping("/screen/member/trajectory") |
| | | R getGridsMemberTrajectory(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 西区大数据分析平台-综合治理栏 |
| | | * @return |
| | | */ |
| | | @GetMapping("/screen/comprehensive/governance") |
| | | R getComprehensiveGovernanceStatics(); |
| | | |
| | | /** |
| | | * 大屏-新根据小区id查询小区统计人数 |
| | | * |
| | | * @param villageId |
| | | * 小区id |
| | | * @return 小区统计数据 |
| | | */ |
| | | @GetMapping("/screen/village/statistics-new") |
| | | R civilVillageStatisticsNew(@RequestParam("villageId") Long villageId); |
| | | } |
| | |
| | | * 用户id |
| | | * @param communityId |
| | | * 社区id 同一用户在不同社区都是党员 |
| | | * @param status |
| | | * @return 党建活动列表 |
| | | */ |
| | | @PostMapping("/partybuildIng/listactivity") |
| | | R listActivity(@RequestParam("userId") Long userId, @RequestParam("communityId") Long communityId); |
| | | R listActivity(@RequestParam("userId") Long userId, @RequestParam("communityId") Long communityId, |
| | | @RequestParam(value = "status", required = false) Integer status); |
| | | |
| | | /** |
| | | * 党员活动人员参入列表 |
| | |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.FileUtils; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import javax.xml.bind.DatatypeConverter; |
| | |
| | | resultList.add(userData); |
| | | } |
| | | return resultList; |
| | | } |
| | | |
| | | public static File createTmpFile(InputStream inputStream, String name, String ext, File tmpDirFile) throws IOException { |
| | | File resultFile = File.createTempFile(name, '.' + ext, tmpDirFile); |
| | | resultFile.deleteOnExit(); |
| | | FileUtils.copyToFile(inputStream, resultFile); |
| | | return resultFile; |
| | | } |
| | | |
| | | public static File bytesToFile(byte[] bytes, String fileType) throws IOException { |
| | | return createTmpFile(new ByteArrayInputStream(bytes), |
| | | UUID.randomUUID().toString(), |
| | | fileType, |
| | | Files.createTempDirectory("tempFile").toFile()); |
| | | } |
| | | } |
| | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | return sdf.format(calendar.getTime()) + " 23:59:59"; |
| | | } |
| | | /** |
| | | * 获取当前月最后一天 |
| | | * |
| | | * @return |
| | | */ |
| | | public static Date getLastDayOfMonth() { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | |
| | | calendar.add(Calendar.MONTH, 1); |
| | | |
| | | calendar.set(Calendar.DAY_OF_MONTH, 0); |
| | | // 格式化日期 |
| | | |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前时间(年月日) |
New file |
| | |
| | | package com.panzhihua.common.utlis; |
| | | |
| | | import java.io.FileInputStream; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * FileType 应用模块名称 |
| | | * <p> |
| | | * 代码描述 文件类型判断工具类 |
| | | * <p> |
| | | * Copyright: Copyright (C) 2021 XXX, Inc. All rights reserved. |
| | | * <p> |
| | | * Company: 成都呐喊信息技术有限公司 |
| | | * <p> |
| | | * |
| | | * @author manailin |
| | | * @since 2021/10/8 10:52 |
| | | */ |
| | | @Slf4j |
| | | public class FileType { |
| | | |
| | | private static final String NOT_IMAGE_FILE_TYPE = "0000"; |
| | | |
| | | private static String bytesToHexString(byte[] src) { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (src == null || src.length <= 0) { |
| | | return null; |
| | | } |
| | | for (int i = 0; i < src.length; i++) { |
| | | int v = src[i] & 0xFF; |
| | | String hv = Integer.toHexString(v); |
| | | if (hv.length() < 2) { |
| | | stringBuilder.append(0); |
| | | } |
| | | stringBuilder.append(hv); |
| | | } |
| | | return stringBuilder.toString(); |
| | | } |
| | | |
| | | /** |
| | | * [方法描述] 判断上传的文件是否是规定的文件文件,通过文件头标识确定 |
| | | * |
| | | * @param is |
| | | * @return boolean |
| | | * @author manailin |
| | | * @date 2021/10/28 16:50 |
| | | */ |
| | | public static Boolean checkFileType(FileInputStream is) throws Exception { |
| | | byte[] b = new byte[3]; |
| | | is.read(b, 0, b.length); |
| | | String photo = bytesToHexString(b); |
| | | photo = photo.toUpperCase(); |
| | | String fileHeadCode = TypeDict.checkFileType(photo); |
| | | log.info("上传的文件类型{}", fileHeadCode); |
| | | return !fileHeadCode.equals(NOT_IMAGE_FILE_TYPE); |
| | | } |
| | | |
| | | /** |
| | | * [方法描述] 判断上传的文件是否是图片文件,通过文件头标识确定 |
| | | * |
| | | * @param is |
| | | * @return boolean |
| | | * @author manailin |
| | | * @date 2021/10/28 16:50 |
| | | */ |
| | | public static Boolean checkImageType(FileInputStream is) throws Exception { |
| | | byte[] b = new byte[3]; |
| | | is.read(b, 0, b.length); |
| | | String photo = bytesToHexString(b); |
| | | photo = photo.toUpperCase(); |
| | | String fileHeadCode = TypeDict.checkImageType(photo); |
| | | log.info("上传的文件类型{}", fileHeadCode); |
| | | return !fileHeadCode.equals(NOT_IMAGE_FILE_TYPE); |
| | | } |
| | | /** |
| | | * [方法描述] 方法参照流程 |
| | | * |
| | | * @param args |
| | | */ |
| | | // public static void main(String[] args) throws Exception { |
| | | // FileInputStream is = new FileInputStream("D:\\Pictures\\3.mp4"); |
| | | // byte[] b = new byte[3]; |
| | | // is.read(b, 0, b.length); |
| | | // String photo = bytesToHexString(b); |
| | | // photo = photo.toUpperCase(); |
| | | // System.out.println("头文件是:" + photo); |
| | | // String ooo = TypeDict.checkFileType(photo); |
| | | // System.out.println("后缀名是:" + ooo); |
| | | // } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.utlis; |
| | | |
| | | /** |
| | | * 应用模块名称 |
| | | * <p> |
| | | * 代码描述 |
| | | * <p> |
| | | * Copyright: Copyright (C) 2021 XXX, Inc. All rights reserved. |
| | | * <p> |
| | | * Company: 成都呐喊信息技术有限公司 |
| | | * <p> |
| | | * |
| | | * @author manailin |
| | | * @since 2021/10/8 10:51 |
| | | */ |
| | | public class TypeDict { |
| | | /** |
| | | * 常用文件的文件头如下:(以前六位为准) JPEG (jpg),文件头:FFD8FF PNG (png),文件头:89504E47 GIF (gif),文件头:47494638 TIFF (tif),文件头:49492A00 |
| | | * Windows Bitmap (bmp),文件头:424D CAD (dwg),文件头:41433130 Adobe Photoshop (psd),文件头:38425053 Rich Text Format |
| | | * (rtf),文件头:7B5C727466 XML (xml),文件头:3C3F786D6C HTML (html),文件头:68746D6C3E Email [thorough only] |
| | | * (eml),文件头:44656C69766572792D646174653A Outlook Express (dbx),文件头:CFAD12FEC5FD746F Outlook (pst),文件头:2142444E MS |
| | | * Word/Excel (xls.or.doc),文件头:D0CF11E0 MS Access (mdb),文件头:5374616E64617264204A WordPerfect (wpd),文件头:FF575043 |
| | | * Postscript (eps.or.ps),文件头:252150532D41646F6265 Adobe Acrobat (pdf),文件头:255044462D312E Quicken (qdf),文件头:AC9EBD8F |
| | | * Windows Password (pwl),文件头:E3828596 ZIP Archive (zip),文件头:504B0304 RAR Archive (rar),文件头:52617221 Wave |
| | | * (wav),文件头:57415645 AVI (avi),文件头:41564920 Real Audio (ram),文件头:2E7261FD Real Media (rm),文件头:2E524D46 MPEG |
| | | * (mpg),文件头:000001BA MPEG (mpg),文件头:000001B3 Quicktime (mov),文件头:6D6F6F76 Windows Media (asf),文件头:3026B2758E66CF11 |
| | | * MIDI (mid),文件头:4D546864,文件头:FFF328(满添加mp3),文件头:000000(满添加mp4) |
| | | */ |
| | | public static String checkImageType(String type) { |
| | | |
| | | switch (type) { |
| | | case "FFD8FF": |
| | | return "jpg"; |
| | | case "89504E": |
| | | return "png"; |
| | | case "474946": |
| | | return "gif"; |
| | | default: |
| | | return "0000"; |
| | | } |
| | | } |
| | | |
| | | public static String checkFileType(String fileType) { |
| | | |
| | | switch (fileType) { |
| | | case "FFD8FF": |
| | | return "jpg"; |
| | | case "89504E": |
| | | return "png"; |
| | | case "474946": |
| | | return "gif"; |
| | | case "574156": |
| | | return "wav"; |
| | | case "415649": |
| | | return "avi"; |
| | | case "FFF328": |
| | | return "mp3"; |
| | | case "000000": |
| | | return "mp4"; |
| | | default: |
| | | return "0000"; |
| | | } |
| | | } |
| | | } |
| | |
| | | pagePartyOrganizationVO.setCommunityId(id); |
| | | return partyBuildingService.pagePartyOrganization(pagePartyOrganizationVO); |
| | | } |
| | | |
| | | /** |
| | | * 党员活动折线图 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "党员活动折线图", response = BigScreenActivityLine.class) |
| | | @GetMapping("/partyActivityLine") |
| | | public R partyActivityLine(){ |
| | | return communityService.partyActivityLine(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 党员积分前3 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "党员积分前3", response = BigScreenActivityTop.class) |
| | | @PostMapping("/partyActivityTop") |
| | | public R partyActivityTop(@RequestBody PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg){ |
| | | pageBigScreenStatisticPartyOrg.setCommunityId(this.getCommunityId()); |
| | | return communityService.partyActivityTop(pageBigScreenStatisticPartyOrg); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.HttpConstant; |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyOrg; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.WestScreenStatics; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingComPbDynVO; |
| | | import com.panzhihua.common.service.partybuilding.PartyBuildingService; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.*; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO; |
| | | import com.panzhihua.common.utlis.HttpClientUtil; |
| | | import com.panzhihua.common.utlis.HttpUtils; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | |
| | | private GridService gridService; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private PartyBuildingService partyBuildingService; |
| | | |
| | | @ApiOperation(value = "大屏测试接口") |
| | | @GetMapping("/test/noToken") |
| | |
| | | return gridService.getGridsMemberTrajectory(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 西区大屏治理数据 |
| | | */ |
| | | @ApiOperation(value = "西区大屏治理数据@lyq", response = WestScreenStatics.class) |
| | | @GetMapping("/getWestScreenStatics") |
| | | public R westScreenStatics(){ |
| | | return communityService.westScreenStatics(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "西区大数据分析平台-综合治理栏", response = EventComprehensiveGovernanceStatisticsVO.class) |
| | | @GetMapping("/comprehensive/governance") |
| | | public R getComprehensiveGovernanceStatics() { |
| | | return gridService.getComprehensiveGovernanceStatics(); |
| | | } |
| | | |
| | | @ApiOperation(value = "西区大数据分析平台-一标三实栏", response = EventPopulationStatisticsVO.class) |
| | | @GetMapping("/comprehensive/population") |
| | | public R getComprehensivePopulationStatics(@RequestParam(value = "streetId",required = false,defaultValue = "0") Long streetId) { |
| | | return communityService.getComprehensivePopulationStatics(streetId); |
| | | } |
| | | /** |
| | | * 新版大屏首页接口 |
| | | */ |
| | | @ApiOperation(value = "新版大屏首页接口", response = IndexInfo.class) |
| | | @GetMapping("/indexInfo") |
| | | public R indexInfo(){ |
| | | return communityService.indexInfo(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-微心愿 |
| | | */ |
| | | @ApiOperation(value = "首页二级页面-微心愿", response = BigScreenMicroWishStatisticsInfo.class) |
| | | @GetMapping("/index/microWish") |
| | | public R indexMicroWish() { |
| | | return communityService.indexMicroWish(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-微心愿展示列表 |
| | | */ |
| | | @ApiOperation(value = "首页二级页面-微心愿展示列表", response = ComActMicroWishVO.class) |
| | | @PostMapping("/index/microWishList") |
| | | public R indexMicroWishList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | pageBaseDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.indexMicroWishList(pageBaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-随手拍 |
| | | */ |
| | | @ApiOperation(value = "首页二级页面-随手拍", response = BigScreenEasyPhotoStatisticsInfo.class) |
| | | @GetMapping("/index/easyPhoto") |
| | | public R indexEasyPhoto() { |
| | | return communityService.indexEasyPhoto(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-随手拍展示列表 |
| | | */ |
| | | @ApiOperation(value = "首页二级页面-随手拍展示列表", response = ComActEasyPhotoVO.class) |
| | | @PostMapping("/index/easyPhotoList") |
| | | public R indexEasyPhotoList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | pageBaseDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.indexEasyPhotoList(pageBaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-社区问卷 |
| | | */ |
| | | @ApiOperation(value = "首页二级页面-社区问卷", response = BigScreenQuestionnaireStatisticsInfo.class) |
| | | @GetMapping("/index/questionnaire") |
| | | public R indexQuestionnaire() { |
| | | return communityService.indexQuestionnaire(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-社区问卷展示列表 |
| | | */ |
| | | @ApiOperation(value = "首页二级页面-随手拍展示列表", response = ComActQuestnaireVO.class) |
| | | @PostMapping("/index/questionnaireList") |
| | | public R indexQuestionnaireList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | pageBaseDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.indexQuestionnaireList(pageBaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-社区动态 |
| | | */ |
| | | @ApiOperation(value = "首页二级页面-社区动态", response = BigScreenDynStatisticsInfo.class) |
| | | @GetMapping("/index/dyn") |
| | | public R indexDyn() { |
| | | return communityService.indexDyn(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-社区动态展示列表 |
| | | */ |
| | | @ApiOperation(value = "首页二级页面-社区动态展示列表", response = ComActDynVO.class) |
| | | @PostMapping("/index/dynList") |
| | | public R indexDynList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | pageBaseDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.indexDynList(pageBaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-邻里圈 |
| | | */ |
| | | @ApiOperation(value = "首页二级页面-邻里圈", response = BigScreenNeighborStatisticsInfo.class) |
| | | @GetMapping("/index/neighbor") |
| | | public R indexNeighbor() { |
| | | return communityService.indexNeighbor(this.getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "西区大数据分析平台-西区街道列表", response = EventPopulationStreetVO.class) |
| | | @GetMapping("/comprehensive/street/list") |
| | | public R getComprehensiveStreetList() { |
| | | return communityService.getComprehensiveStreetList(); |
| | | } |
| | | /** |
| | | * 首页二级页面-邻里圈展示列表 |
| | | */ |
| | | @ApiOperation(value = "首页二级页面-邻里圈展示列表", response = ComActNeighborCircleAdminVO.class) |
| | | @PostMapping("/index/neighborList") |
| | | public R indexNeighborList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | pageBaseDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.indexNeighborList(pageBaseDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页获取党建动态", response = BigScreenStatisticPartyOrg.class) |
| | | @PostMapping("/comprehensive/partydyn") |
| | | public R<BigScreenStatisticPartyOrg> partydyn(@RequestBody PartyBuildingComPbDynVO partyBuildingComPbDynVO) { |
| | | partyBuildingComPbDynVO.setType(1); |
| | | return partyBuildingService.pageYnamic(partyBuildingComPbDynVO); |
| | | } |
| | | /** |
| | | * 首页二级页面-便民商家 |
| | | */ |
| | | @ApiOperation(value = "首页二级页面-便民商家", response = BigScreenMerchantStatisticsInfo.class) |
| | | @GetMapping("/index/merchant") |
| | | public R indexMerchant() { |
| | | return communityService.indexMerchant(this.getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页获取社区动态", response = ComActDynVO.class) |
| | | @PostMapping("/comprehensive/pagedynamic") |
| | | public R pageDynamic(@RequestBody ComActDynVO comActDynVO) { |
| | | comActDynVO.setIsTopping(null); |
| | | comActDynVO.setStatus(1); |
| | | return communityService.pageDynamic(comActDynVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "通过社区id查询社区账号密码") |
| | | @PostMapping("/get/community/password") |
| | | public R getCommunityPassword(@RequestParam("communityId") Long communityId) { |
| | | if(communityId == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.getCommunityPassword(communityId); |
| | | } |
| | | /** |
| | | * 首页二级页面-商家展示列表 |
| | | */ |
| | | @ApiOperation(value = "首页二级页面-商家展示列表", response = ConvenientMerchantVO.class) |
| | | @PostMapping("/index/merchantList") |
| | | public R indexMerchantList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | pageBaseDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.indexMerchantList(pageBaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区服务大屏数据分析接口 |
| | | */ |
| | | @ApiOperation(value = "社区服务大屏数据分析接口", response = BigScreenServiceData.class) |
| | | @GetMapping("/serviceData") |
| | | public R serviceData(){ |
| | | return this.communityService.serviceData(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 服务居民接口 |
| | | */ |
| | | @ApiOperation(value = "社区服务大屏服务居民接口", response = BigScreenServiceUser.class) |
| | | @GetMapping("/serviceUser") |
| | | public R serviceUser(){ |
| | | return this.communityService.serviceUser(this.getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "大数据分析平台-居民自治", response = ResidentAutonomyStatisticsVO.class) |
| | | @GetMapping("/resident/autonomy") |
| | | public R getResidentAutonomy() { |
| | | Long communityId = this.getCommunityId(); |
| | | if (communityId == null) { |
| | | return R.fail(401, "请先登录"); |
| | | } |
| | | return communityService.getResidentAutonomy(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "大数据分析平台-清网治格", response = GridsGovernanceStatisticsVO.class) |
| | | @GetMapping("/grids/governance") |
| | | public R getGridsGovernance() { |
| | | Long communityId = this.getCommunityId(); |
| | | if (communityId == null) { |
| | | return R.fail(401, "请先登录"); |
| | | } |
| | | return communityService.getGridsGovernance(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "新版事件大屏画圈展示事件坐标点接口", response = GridsGovernanceStatisticsVO.class) |
| | | @PostMapping("/civil/draw/list-new") |
| | | public R civilDrawListNew(@RequestBody ScreenDrawEventListDTO eventListDTO) { |
| | | Long id = this.getCommunityId(); |
| | | if (id == null) { |
| | | return R.fail(401, "请先登录"); |
| | | } |
| | | eventListDTO.setCommunityId(id); |
| | | return gridService.getCivilDrawListNew(eventListDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新版根据小区id获取小区信息", response = GridsGovernanceStatisticsVO.class) |
| | | @GetMapping("/civil/village/statistics-new") |
| | | public R civilVillageStatisticsNew(@RequestParam("villageId") Long villageId) { |
| | | if (villageId == null) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | return gridService.civilVillageStatisticsNew(villageId); |
| | | } |
| | | |
| | | @ApiOperation(value = "大数据分析平台-社区服务", response = BigScreenCommunityStatisticsVO.class) |
| | | @GetMapping("/community/service") |
| | | public R getCommunityServiceStatistics() { |
| | | Long communityId = this.getCommunityId(); |
| | | if (communityId == null) { |
| | | return R.fail(401, "请先登录"); |
| | | } |
| | | return communityService.getCommunityServiceStatistics(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页获取热度排行商家", response = ConvenientMerchantVO.class) |
| | | @PostMapping("/merchant/popular") |
| | | public R getScreenPopularMerchants(@RequestBody PagePopularMerchantDTO pagePopularMerchantDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | if (communityId == null) { |
| | | return R.fail(401, "请先登录"); |
| | | } |
| | | pagePopularMerchantDTO.setCommunityId(communityId); |
| | | return communityService.getScreenPopularMerchants(pagePopularMerchantDTO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.QRActivityCodeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 签到二维码表(ComActActivityCode)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-15 15:23:10 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"活动二维码"}) |
| | | @RestController |
| | | @RequestMapping("comActActivityCode") |
| | | public class ComActActivityCodeApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 查看二维码 |
| | | * @param qrCodeVO |
| | | * @return |
| | | */ |
| | | @ApiOperation("查看二维码") |
| | | @PostMapping("/getQRCode") |
| | | public R getQRCode(@RequestBody QRActivityCodeVO qrCodeVO){ |
| | | return this.communityService.getQRCode(qrCodeVO); |
| | | } |
| | | |
| | | /** |
| | | * 重置二维码 |
| | | * @param qrCodeVO |
| | | * @return |
| | | */ |
| | | @ApiOperation("重置二维码") |
| | | @PostMapping("/resetQRCode") |
| | | public R resetQRCode(@RequestBody QRActivityCodeVO qrCodeVO){ |
| | | return this.communityService.resetQRCode(qrCodeVO); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActReserveCommitVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.HomeQuarantineRegisterExportVO; |
| | | import com.panzhihua.community_backstage.util.MyAESUtil; |
| | | import org.apache.poi.ss.usermodel.HorizontalAlignment; |
| | | import org.apache.poi.ss.usermodel.VerticalAlignment; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | @RestController |
| | | @RequestMapping("/reserve") |
| | | public class ComActReserveApi extends BaseController { |
| | | private static final String key="nahankeji1234567"; |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.enums.PresetPictureType; |
| | | import com.panzhihua.common.model.dtos.community.ComPropertyPublicityDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComPropertyPublicityDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageVO; |
| | | import com.panzhihua.common.model.vos.community.ComActPictureLibraryVO; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyPublicityVO; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | |
| | | public R listProperty(@RequestParam(value = "villageId", required = false) Long villageId) { |
| | | return communityService.listProperty(villageId, getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取预设图库",response = ComActPictureLibraryVO.class) |
| | | @GetMapping("/picture/library") |
| | | @ApiImplicitParam(name = "publicityType", value = "宣传类型(1.停水通知 2.停电通知 3.停气通知 4.物业公告 5.优秀业主)", required = true) |
| | | public R getPresetPictureLibrary(@RequestParam("publicityType") Integer publicityType) { |
| | | return communityService.getPresetPictureLibrary(PresetPictureType.PROPERTY_PUBLICITY, publicityType); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import java.io.*; |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | import java.io.BufferedWriter; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileOutputStream; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStreamWriter; |
| | | import java.io.Writer; |
| | | import java.math.BigDecimal; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.model.vos.LiveVO; |
| | | import com.panzhihua.common.model.vos.WeatherVO; |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | import freemarker.template.Configuration; |
| | | import freemarker.template.Template; |
| | | import freemarker.template.Version; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityTypeVO; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.controller.BaseController; |
| | |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.AddComActIntegralUserDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.ActivitySignVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActPictureVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActRegistExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActRegistVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActSignExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoClassifyVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ExportEasyPhotoVO; |
| | |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.*; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.QRCodeUtils; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | |
| | | import freemarker.template.Configuration; |
| | | import freemarker.template.Template; |
| | | import freemarker.template.Version; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @ApiOperation(value = "新增社区活动") |
| | | @PostMapping("activity") |
| | | public R addActivity(@RequestBody ComActActivityVO comActActivityVO) { |
| | | public R addActivity(@RequestBody @Validated(AddGroup.class) ComActActivityVO comActActivityVO) { |
| | | if (comActActivityVO.getHaveIntegralReward().intValue() == 1) { |
| | | if (isNull(comActActivityVO.getRewardWay())) { |
| | | return R.fail("奖励方式不能为空"); |
| | | } |
| | | if (isNull(comActActivityVO.getRewardIntegral())) { |
| | | return R.fail("奖励积分不能为空"); |
| | | } |
| | | if (comActActivityVO.getRewardWay().intValue() == 1 && isNull(comActActivityVO.getLimit())) { |
| | | return R.fail("参与次数上限不能为空"); |
| | | } |
| | | } |
| | | if(nonNull(comActActivityVO.getVolunteerMax()) && comActActivityVO.getVolunteerMax().intValue() == 0) { |
| | | return R.fail("志愿者参与上限不能为0"); |
| | | } |
| | | Long communityId = this.getCommunityId(); |
| | | comActActivityVO.setCommunityId(communityId); |
| | | comActActivityVO.setUserId(this.getLoginUserInfo().getUserId()); |
| | |
| | | if (R.isOk(r)) { |
| | | List<ComActActSignExcelVO> excelVOS = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActActSignExcelVO.class); |
| | | excelVOS.forEach(e -> e.generateCondition()); |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComActActSignExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("活动报名名单导出数据").build(); |
| | | excelWriter.write(excelVOS, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | return R.fail("未查询到用户"); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "社区活动签到二维码下载") |
| | | @PostMapping("qrCode/export") |
| | | public R activityRegistQRCodeExport(@RequestParam("activityId") Long activityId){ |
| | |
| | | } |
| | | return communityService.wishHandleListAdmin(loginUserInfo.getCommunityId(),type); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加活动类型") |
| | | @PostMapping("activity/type/add") |
| | | public R addActivityType(@RequestBody @Validated(AddGroup.class) ComActActivityTypeVO comActActivityTypeVO) { |
| | | comActActivityTypeVO.setCommunityId(getCommunityId()); |
| | | return communityService.addActivityType(comActActivityTypeVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取活动类型(目前只有志愿者活动需要获取)", response = ComActActivityTypeVO.class) |
| | | @ApiImplicitParam(name = "type", value = "活动类型(1.志愿者 2.居民 3.党员)", required = true) |
| | | @GetMapping("activity/type/list") |
| | | public R listActivityType(@RequestParam("type") Integer type) { |
| | | return communityService.listActivityType(getCommunityId(), type); |
| | | } |
| | | } |
| | |
| | | if (null == id || 0 == id) { |
| | | return R.fail("动态主键不能为空"); |
| | | } |
| | | Date publishAt = partyCommitteeVO.getPublishAt(); |
| | | if (!ObjectUtils.isEmpty(publishAt)) { |
| | | long time = publishAt.getTime(); |
| | | long l = System.currentTimeMillis(); |
| | | if (l > time) { |
| | | partyCommitteeVO.setStatus(1); |
| | | } else { |
| | | partyCommitteeVO.setStatus(2); |
| | | } |
| | | } |
| | | return partyBuildingService.updateYnamic(partyCommitteeVO); |
| | | } |
| | | |
| | |
| | | return r; |
| | | } |
| | | |
| | | @ApiOperation(value = "西区大屏登录", response = LoginReturnVO.class) |
| | | @PostMapping("xq/login") |
| | | public R xqdpLogin(@RequestBody LoginBody loginBody) { |
| | | String account = loginBody.getAccount(); |
| | | String password = loginBody.getPassword(); |
| | | boolean empty = ObjectUtils.isEmpty(account); |
| | | boolean empty1 = ObjectUtils.isEmpty(password); |
| | | if (empty || empty1) { |
| | | return R.fail("账户密码不能为空"); |
| | | } |
| | | R r = tokenService.loginXQDP(account, password); |
| | | return r; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStaticsReserve; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | |
| | | return communityService.detailDynamic(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "安全防控",response = BigScreenStaticsReserve.class) |
| | | @GetMapping("/reserve") |
| | | public R reserve(){ |
| | | return communityService.bigScreenStaticsReserve(this.getCommunityId()); |
| | | } |
| | | } |
| | |
| | | password: huanghongfa123456 |
| | | # basedir: F:\nahan\config-repo\config-repo |
| | | |
| | | #spring: |
| | | # application: |
| | | # name: config |
| | | # profiles: |
| | | # active: native |
| | | # cloud: |
| | | # config: |
| | | # server: |
| | | # native: |
| | | # search-locations: file:E:\\work\\config\\config-repo |
| | | |
| | | management: |
| | | endpoints: |
| | | web: |
| | |
| | | <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.64" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-config-client:2.2.6.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:2.2.6.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-hystrix:2.2.6.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-client:2.2.6.RELEASE" level="project" /> |
| | |
| | | <orderEntry type="library" name="Maven: com.netflix.netflix-commons:netflix-eventbus:0.3.0" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-infix:0.3.0" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: commons-jxpath:commons-jxpath:1.3" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: joda-time:joda-time:2.3" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:antlr-runtime:3.4" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: antlr:antlr:2.7.7" level="project" /> |
| | |
| | | <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.14" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.tencentcloudapi:tencentcloud-sdk-java:3.1.286" level="project" /> |
| | | <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.squareup.okio:okio:1.12.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.squareup.okhttp:okhttp:2.7.5" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" /> |
| | | <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" /> |
| | |
| | | <orderEntry type="library" name="Maven: ognl:ognl:3.2.6" level="project" /> |
| | | <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: cn.afterturn:easypoi-annotation:4.1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.zxing:core:3.1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.zxing:javase:3.1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.18" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.4" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" /> |
| | |
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.minio:minio:6.0.8" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.http-client:google-http-client-xml:1.37.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.http-client:google-http-client:1.37.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.opencensus:opencensus-api:0.24.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.grpc:grpc-context:1.33.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.opencensus:opencensus-contrib-http-util:0.24.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: xpp3:xpp3:1.1.4c" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.14.4" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: joda-time:joda-time:2.7" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.code.findbugs:annotations:3.0.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: net.jcip:jcip-annotations:1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" /> |
| | | </component> |
| | | </module> |
| | |
| | | public R list(@RequestBody ComMngVillageListAppDTO villageListAppDTO) { |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | villageListAppDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | return communityService.getGridVillageList(villageListAppDTO); |
| | | return communityService.getGridVillageListApp(villageListAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "小区楼栋列表@lyq", response = ComMngVillageBuildingVO.class) |
| | |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | pageEventManageDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | // pageEventManageDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | pageEventManageDTO.setRevokeType(1); |
| | | // pageEventManageDTO.setRevokeType(1); |
| | | return gridService.queryEventToManage(pageEventManageDTO); |
| | | } |
| | | |
| | |
| | | bigscreenPartyactivity(@RequestBody BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO) { |
| | | return bigScreenService.bigscreenPartyactivity(bigScreenStatisticPartyActivityDTO); |
| | | } |
| | | |
| | | /** |
| | | * 党员活动折线图 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/partyActivityLine") |
| | | public R partyActivityLine(@RequestParam("communityId")Long communityId){ |
| | | return bigScreenService.partyActivityLine(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 党员积分前3 |
| | | * @param pageBigScreenStatisticPartyOrg |
| | | * @return |
| | | */ |
| | | @PostMapping("/partyActivityTop") |
| | | public R partyActivityTop(@RequestBody PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg){ |
| | | return bigScreenService.partyActivityTop(pageBigScreenStatisticPartyOrg); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.service_community.service.ComActService; |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | | import com.panzhihua.service_community.service.BigScreenStatisticsService; |
| | | import com.panzhihua.service_community.service.BigScreenService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDTO; |
| | |
| | | |
| | | @Resource |
| | | private ComMngPopulationService comMngPopulationService; |
| | | @Resource |
| | | private ComActService comActService; |
| | | @Resource |
| | | private BigScreenService bigScreenService; |
| | | @Resource |
| | | private BigScreenStatisticsService bigScreenStatisticsService; |
| | | |
| | | /** |
| | | * 首页大屏统计接口 |
| | |
| | | return R.ok(comMngPopulationService.getScreenEventDetail(eventDetailDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 西区大屏治理数据 |
| | | */ |
| | | @GetMapping("/getWestScreenStatics") |
| | | public R westScreenStatics(){ |
| | | return comMngPopulationService.westScreenStatics(); |
| | | } |
| | | |
| | | @GetMapping("/getComprehensivePopulationStatics") |
| | | public R getComprehensivePopulationStatics(@RequestParam("streetId") Long streetId){ |
| | | return comMngPopulationService.getComprehensivePopulationStatics(streetId); |
| | | } |
| | | |
| | | @GetMapping("/getComprehensiveStreetList") |
| | | public R getComprehensiveStreetList(){ |
| | | return comMngPopulationService.getComprehensiveStreetList(); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getCommunityPassword") |
| | | public R getCommunityPassword(@RequestParam("communityId") Long communityId){ |
| | | return comActService.getCommunityPassword(communityId); |
| | | } |
| | | /** |
| | | * 新版大屏首页接口 |
| | | */ |
| | | @GetMapping("/indexInfo") |
| | | public R indexInfo(@RequestParam("communityId") Long communityId){ |
| | | return comMngPopulationService.indexInfo(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-微心愿 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/index/microWish") |
| | | public R indexMicroWish(@RequestParam("communityId") Long communityId) { |
| | | return bigScreenStatisticsService.indexMicroWish(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-随手拍 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/index/easyPhoto") |
| | | public R indexEasyPhoto(@RequestParam("communityId") Long communityId) { |
| | | return bigScreenStatisticsService.indexEasyPhoto(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-随手拍展示列表 |
| | | * @return |
| | | */ |
| | | @PostMapping("/index/easyPhotoList") |
| | | public R indexEasyPhotoList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | return bigScreenStatisticsService.indexEasyPhotoList(pageBaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-社区问卷 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/index/questionnaire") |
| | | public R indexQuestionnaire(@RequestParam("communityId") Long communityId) { |
| | | return bigScreenStatisticsService.indexQuestionnaire(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-社区动态 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/index/dyn") |
| | | public R indexDyn(@RequestParam("communityId") Long communityId) { |
| | | return bigScreenStatisticsService.indexDyn(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-社区动态展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/index/dynList") |
| | | public R indexDynList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | return bigScreenStatisticsService.indexDynList(pageBaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-邻里圈 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/index/neighbor") |
| | | public R indexNeighbor(@RequestParam("communityId") Long communityId) { |
| | | return bigScreenStatisticsService.indexNeighbor(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-邻里圈展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/index/neighborList") |
| | | public R indexNeighborList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | return bigScreenStatisticsService.indexNeighborList(pageBaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-便民商家 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/index/merchant") |
| | | public R indexMerchant(@RequestParam("communityId") Long communityId) { |
| | | return bigScreenStatisticsService.indexMerchant(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-商家展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/index/merchantList") |
| | | public R indexMerchantList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | return bigScreenStatisticsService.indexMerchantList(pageBaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-微心愿展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/index/microWishList") |
| | | public R indexMicroWishList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | return bigScreenStatisticsService.indexMicroWishList(pageBaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-社区问卷展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/index/questionnaireList") |
| | | public R indexQuestionnaireList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | return bigScreenStatisticsService.indexQuestionnaireList(pageBaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区服务大屏数据分析接口 |
| | | */ |
| | | @GetMapping("/serviceData") |
| | | public R serviceData(@RequestParam("communityId")Long communityId){ |
| | | return this.bigScreenService.serviceData(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 服务居民接口 |
| | | */ |
| | | @GetMapping("/serviceUser") |
| | | public R serviceUser(@RequestParam("communityId") Long communityId){ |
| | | return this.bigScreenService.serviceUser(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 大数据分析平台-居民自治 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/resident/autonomy") |
| | | public R getResidentAutonomy(@RequestParam("communityId") Long communityId) { |
| | | return bigScreenStatisticsService.getResidentAutonomy(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 大数据分析平台-清网治格 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/grids/governance") |
| | | public R getGridsGovernance(@RequestParam("communityId") Long communityId) { |
| | | return bigScreenStatisticsService.getGridsGovernance(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 大数据分析平台-社区服务 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/community/service") |
| | | public R getCommunityServiceStatistics(@RequestParam("communityId") Long communityId) { |
| | | return bigScreenStatisticsService.getCommunityServiceStatistics(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 分页获取热度排行商家 |
| | | * @param pagePopularMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/merchant/popular") |
| | | public R getScreenPopularMerchants(@RequestBody PagePopularMerchantDTO pagePopularMerchantDTO) { |
| | | return bigScreenStatisticsService.getScreenPopularMerchants(pagePopularMerchantDTO); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | 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.community.QRActivityCodeVO; |
| | | import com.panzhihua.common.model.vos.community.warehouse.QRCodeVO; |
| | | import com.panzhihua.service_community.entity.ComActActivityCode; |
| | | import com.panzhihua.service_community.service.ComActActivityCodeService; |
| | | import com.panzhihua.service_community.util.QRCodeUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 签到二维码表(ComActActivityCode)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-15 15:23:10 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comActActivityCode") |
| | | public class ComActActivityCodeApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComActActivityCodeService comActActivityCodeService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.comActActivityCodeService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Serializable id) { |
| | | return R.ok(this.comActActivityCodeService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActActivityCode 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActActivityCode comActActivityCode) { |
| | | return R.ok(this.comActActivityCodeService.save(comActActivityCode)); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActActivityCode 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActActivityCode comActActivityCode) { |
| | | return R.ok(this.comActActivityCodeService.updateById(comActActivityCode)); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return R.ok(this.comActActivityCodeService.removeById(id)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 生成二维码 |
| | | * @param qrCodeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/getQRCode") |
| | | public R getQRCode(@RequestBody QRActivityCodeVO qrCodeVO){ |
| | | ComActActivityCode comActActivityCode = comActActivityCodeService.getOne(new QueryWrapper<ComActActivityCode>() |
| | | .lambda().eq(ComActActivityCode::getStatus,1).eq(ComActActivityCode::getActivityId,qrCodeVO.getId()) |
| | | .eq(ComActActivityCode::getType,qrCodeVO.getType())); |
| | | if(comActActivityCode!=null){ |
| | | qrCodeVO.setCodeId(comActActivityCode.getId()); |
| | | return R.ok(QRCodeUtil.getBase64QRCode(JSONObject.toJSONString(qrCodeVO))); |
| | | } |
| | | return R.fail("该活动无有效二维码"); |
| | | } |
| | | |
| | | /** |
| | | * 重置二维码 |
| | | * @param qrCodeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/resetQRCode") |
| | | public R resetQRCode(@RequestBody QRActivityCodeVO qrCodeVO){ |
| | | ComActActivityCode comActActivityCode=comActActivityCodeService.getOne(new QueryWrapper<ComActActivityCode>().lambda().eq(ComActActivityCode::getStatus,1).eq(ComActActivityCode::getActivityId,qrCodeVO.getId()).eq(ComActActivityCode::getType,qrCodeVO.getType())); |
| | | if(comActActivityCode!=null){ |
| | | comActActivityCodeService.update(new UpdateWrapper<ComActActivityCode>().lambda().eq(ComActActivityCode::getActivityId,qrCodeVO.getId()).eq(ComActActivityCode::getType,qrCodeVO.getType()).set(ComActActivityCode::getStatus,0)); |
| | | ComActActivityCode comActActivityCode1=new ComActActivityCode(); |
| | | comActActivityCode1.setActivityId(qrCodeVO.getId().longValue()); |
| | | comActActivityCode1.setCreateTime(new Date()); |
| | | comActActivityCode1.setType(qrCodeVO.getType()); |
| | | comActActivityCode1.setStatus(1); |
| | | comActActivityCodeService.save(comActActivityCode1); |
| | | qrCodeVO.setCodeId(comActActivityCode1.getId()); |
| | | return R.ok(QRCodeUtil.getBase64QRCode(JSONObject.toJSONString(qrCodeVO))); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据社区活动id查询社区活动报名人员列表 |
| | | * 根据社区活动id查询社区活动报名且未参与人员列表 |
| | | * |
| | | * @param activityId |
| | | * 活动id |
| | | * @return 社区活动报名人员列表 |
| | | * @return 社区活动报名且未参与人员列表 |
| | | */ |
| | | @PostMapping("/act/activity/admin") |
| | | public R getTaskActivityPeopleList(@RequestParam("activityId") Long activityId) { |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComActPictureLibraryService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @title: ComActPictureLibraryApi |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 公共图库 |
| | | * @author: hans |
| | | * @date: 2021/11/23 16:54 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/picture/library") |
| | | public class ComActPictureLibraryApi { |
| | | |
| | | @Resource |
| | | private ComActPictureLibraryService comActPictureLibraryService; |
| | | |
| | | @GetMapping("/get") |
| | | @ApiOperation("获取预设图库") |
| | | public R getPresetPictureLibrary(@RequestParam("type") Integer type, @RequestParam("subtype") Integer subtype) { |
| | | return comActPictureLibraryService.getPresetPictureLibrary(type, subtype); |
| | | } |
| | | } |
| | |
| | | public R exportHomeQuarantine(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO) { |
| | | return comActReserveAnswerContentService.exportHomeQuarantine(detailedAdminDTO); |
| | | } |
| | | |
| | | @GetMapping("/bigScreenStaticsReserve") |
| | | public R bigScreenStaticsReserve(@RequestParam("communityId") Long communityId){ |
| | | return comActReserveAnswerContentService.bigScreenStaticsReserve(communityId); |
| | | } |
| | | } |
| | |
| | | return comMngVillageService.getGridVillageList(villageListAppDTO); |
| | | } |
| | | |
| | | @PostMapping("/village/grid/list/app") |
| | | public R getGridPopulationAdminListApp(@RequestBody ComMngVillageListAppDTO villageListAppDTO) { |
| | | return comMngVillageService.getGridVillageList(villageListAppDTO); |
| | | } |
| | | |
| | | /** |
| | | * 综治app-根据小区id查询小区下楼栋列表 |
| | | * |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActActivityTypeVO; |
| | | import com.panzhihua.service_community.dao.ComActActEvaluateDAO; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.*; |
| | |
| | | }); |
| | | } |
| | | comActActivityVO1.setComActActPrizeVOList(comActActPrizeVOList); |
| | | Integer participantMax = comActActivityVO1.getParticipantMax(); |
| | | if (participantMax.intValue() == 0) { |
| | | Integer volunteerMax = comActActivityVO1.getVolunteerMax(); |
| | | if (volunteerMax.intValue() != 0) { |
| | | comActActivityVO1.setType(1); |
| | | } else { |
| | | comActActivityVO1.setType(2); |
| | |
| | | //活动报名名单 |
| | | ActivitySignVO activitySignVO = new ActivitySignVO(); |
| | | activitySignVO.setActivityId(activityId); |
| | | activitySignVO.setStatus(1); |
| | | R r = comActActivityService.listActivitySigns(activitySignVO); |
| | | if (R.isOk(r)) { |
| | | List<ActivitySignVO> activitySignVOS = |
| | |
| | | * @return 活动列表 |
| | | */ |
| | | @PostMapping("listactivity") |
| | | public R listActivity(@RequestParam("userId") Long userId) { |
| | | return comActActivityService.listActivity(userId); |
| | | public R listActivity(@RequestParam("userId") Long userId, |
| | | @RequestParam(value = "status", required = false) Integer status) { |
| | | return comActActivityService.listActivity(userId, status); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R pageMicroWishAdmin(@RequestBody ComActMicroWishVO comActMicroWishVO) { |
| | | return comActMicroWishService.pageMicroWishAdmin(comActMicroWishVO); |
| | | } |
| | | |
| | | /** |
| | | * 活动报名签到情况 |
| | | * @param id 活动主键id |
| | | * @return |
| | | */ |
| | | @GetMapping("activity/sign-in/list") |
| | | public R listSignInRecord(@RequestParam("id") Long id) { |
| | | return comActActivityService.listSignInRecord(id); |
| | | } |
| | | |
| | | /** |
| | | * 活动签到记录 |
| | | * @param id 活动主键 |
| | | * @param userId 用户id |
| | | * @return |
| | | */ |
| | | @GetMapping("activity/regist/list") |
| | | public R listRegistRecord(@RequestParam("id") Long id, @RequestParam("userId") Long userId) { |
| | | return comActActivityService.listRegistRecord(id, userId); |
| | | } |
| | | |
| | | /** |
| | | * 获取活动类型(目前只有志愿者活动需要获取) |
| | | * @param communityId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @GetMapping("activity/type/list") |
| | | public R listActivityType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type) { |
| | | return comActActivityService.listActivityType(communityId, type); |
| | | } |
| | | |
| | | /** |
| | | * 添加活动类型 |
| | | * @param comActActivityTypeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("activity/type/add") |
| | | public R addActivityType(@RequestBody ComActActivityTypeVO comActActivityTypeVO) { |
| | | return comActActivityService.addActivityType(comActActivityTypeVO); |
| | | } |
| | | |
| | | /** |
| | | * 我的评价 |
| | | * @param userId |
| | | * @param activityId 活动id |
| | | * @return |
| | | */ |
| | | @GetMapping("activity/my-evaluate") |
| | | public R listMyActivityEvaluate(@RequestParam("userId") Long userId, @RequestParam("activityId") Long activityId) { |
| | | return comActActEvaluateService.listMyActivityEvaluate(userId, activityId); |
| | | } |
| | | } |
| | |
| | | @Select("<script> " + " SELECT " + " SUM(CASE TYPE WHEN 1 THEN total ELSE 0 END) as 'orgCount', " |
| | | + " SUM(CASE TYPE WHEN 2 THEN total ELSE 0 END) as 'memberCount', " |
| | | + " SUM(CASE TYPE WHEN 3 THEN total ELSE 0 END) as 'activityCount', " |
| | | + " SUM(CASE TYPE WHEN 4 THEN total ELSE 0 END) as 'dynCount' " + " FROM ( " |
| | | + " SUM(CASE TYPE WHEN 4 THEN total ELSE 0 END) as 'dynCount',SUM(CASE TYPE WHEN 5 THEN total ELSE 0 END) as 'committeeCount' " + " FROM ( " |
| | | + " SELECT 1 AS TYPE , COUNT(id) total " + " FROM com_pb_org org " |
| | | + " WHERE org.community_id = #{communityId} AND STATUS=1 " + " UNION ALL " |
| | | + " SELECT 2 AS TYPE , COUNT(id) total " + " FROM com_pb_member " |
| | |
| | | + " SELECT 3 AS TYPE , COUNT(id) total " + " FROM com_pb_activity " |
| | | + " WHERE community_id = #{communityId} AND STATUS IN (2,3,4,5) " + " UNION ALL " |
| | | + " SELECT 4 AS TYPE , COUNT(id) total " + " FROM com_pb_dyn " |
| | | + " WHERE community_id = #{communityId} AND TYPE = 1 " + ") t" + "</script>") |
| | | + " WHERE community_id = #{communityId} AND TYPE = 1 UNION ALL " + |
| | | "select 5 AS TYPE,count(id) total from com_pb_member_role " + |
| | | "where community_id =#{communityId}" + ") t" + "</script>") |
| | | BigScreenStatisticPartyBuild partybuild(@Param("communityId") Long communityId); |
| | | |
| | | @Select("<script> " + " SELECT pm.id, pm.member_id, pm.user_id, pm.name, " + " case " |
| | |
| | | */ |
| | | ComActActEvaluateVO getEvaluateListByUserId(@Param("activityId") Long activityId,@Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 查询某活动的用户评价列表 |
| | | * @param activityId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | List<ComActActEvaluateVO> selectEvaluateList(@Param("activityId") Long activityId, @Param("userId") Long userId); |
| | | } |
| | |
| | | List<ComActActRegistExcelVO> getRegistLists(@Param("comActActRegistVO") ComActActRegistVO comActActRegistVO); |
| | | |
| | | List<ComActActRegistExcelVO> getNoRegistLists(@Param("comActActRegistVO") ComActActRegistVO comActActRegistVO); |
| | | |
| | | /** |
| | | * 活动签到记录 |
| | | * @param id 活动主键 |
| | | * @param userId 用户id |
| | | * @return |
| | | */ |
| | | List<ComActActRegistVO> listRegistRecord(@Param("id") Long id, @Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 获取总积分奖励 |
| | | * @param activityId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | Integer selectTotalAwardWithRegist(@Param("activityId") Long activityId, @Param("userId") Long userId); |
| | | } |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ActivitySignInRecordVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActSignExcelVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | @Mapper |
| | | public interface ComActActSignDAO extends BaseMapper<ComActActSignDO> { |
| | | // 居民 党员 志愿者 1 2 3 |
| | | @Select("<script> " + "SELECT " + "u.user_id id, " + "u.image_url, " + "u.name, " + "u.nick_name, " |
| | | + "case WHEN u.is_partymember = 1 THEN '党员' WHEN a.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity, " |
| | | + "u.phone, " + "u.tags, " + "a.create_at, " + "a.is_volunteer " + "FROM " + "com_act_act_sign a " |
| | | + "JOIN sys_user u ON a.user_id = u.user_id " + "WHERE " + "a.activity_id = #{activitySignVO.activityId} " |
| | | + "<if test='activitySignVO.phone != null and activitySignVO.phone != ""'>" |
| | | + "AND u.phone = #{activitySignVO.phone} " + " </if> " |
| | | + "<if test='activitySignVO.tags != null and activitySignVO.tags != ""'>" |
| | | + "AND u.tags like concat('%',#{activitySignVO.tags},'%') " + " </if> " |
| | | + "<if test='activitySignVO.name != null and activitySignVO.name != ""'>" |
| | | + "AND u.`name` = #{activitySignVO.name} " + " </if> " |
| | | + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==1'>" |
| | | + "AND u.is_partymember = 0 and a.is_volunteer=0 " + " </if> " |
| | | + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==2'>" |
| | | + "AND u.is_partymember = 1 " + " </if> " |
| | | + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==3'>" |
| | | + "AND a.is_volunteer=1 " + " </if> " + "<if test='activitySignVO.type != null and activitySignVO.type != 0'>" |
| | | + "AND a.is_volunteer=#{activitySignVO.type}-1 " + " </if> " + " order by a.create_at desc " + "</script>") |
| | | // @Select("<script> " + "SELECT " + "u.user_id id, " + "u.image_url, " + "u.name, " + "u.nick_name, " |
| | | // + "case WHEN u.is_partymember = 1 THEN '党员' WHEN a.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity, " |
| | | // + "u.phone, " + "u.tags, " + "a.create_at, " + "a.is_volunteer, a.status , a.times ,a.reason,a.award,t.limit " + "FROM " + "com_act_act_sign a " |
| | | // + "JOIN sys_user u ON a.user_id = u.user_id left join com_act_activity t on a.activity_id = t.id" + "WHERE " + "a.activity_id = #{activitySignVO.activityId} " |
| | | // + "<if test='activitySignVO.phone != null and activitySignVO.phone != ""'>" |
| | | // + "AND u.phone = #{activitySignVO.phone} " + " </if> " |
| | | // + "<if test='activitySignVO.status != null'>" |
| | | // + "AND a.status = #{activitySignVO.status} " + " </if> " |
| | | // + "<if test='activitySignVO.tags != null and activitySignVO.tags != ""'>" |
| | | // + "AND u.tags like concat('%',#{activitySignVO.tags},'%') " + " </if> " |
| | | // + "<if test='activitySignVO.name != null and activitySignVO.name != ""'>" |
| | | // + "AND u.`name` = #{activitySignVO.name} " + " </if> " |
| | | // + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==1'>" |
| | | // + "AND u.is_partymember = 0 and a.is_volunteer=0 " + " </if> " |
| | | // + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==2'>" |
| | | // + "AND u.is_partymember = 1 " + " </if> " |
| | | // + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==3'>" |
| | | // + "AND a.is_volunteer=1 " + " </if> " + "<if test='activitySignVO.type != null and activitySignVO.type != 0'>" |
| | | // + "AND a.is_volunteer=#{activitySignVO.type}-1 " + " </if> " + " order by a.create_at desc " + "</script>") |
| | | IPage<ActivitySignVO> listActivitySign(Page page, @Param("activitySignVO") ActivitySignVO activitySignVO); |
| | | |
| | | @Select("<script> " + "SELECT " + "u.user_id id, " + "u.image_url, " + "u.name, " + "u.nick_name, " |
| | | + "case WHEN u.is_partymember = 1 THEN '党员' WHEN a.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity, " |
| | | + "u.phone, " + "u.openid, " + "a.create_at, " + "a.is_volunteer " + "FROM " + "com_act_act_sign a " |
| | | + "JOIN sys_user u ON a.user_id = u.user_id " + "WHERE " + "a.activity_id = #{activitySignVO.activityId} " |
| | | @Select("<script> " + "SELECT " + "u.user_id id, " + "u.image_url, " + "u.name, " + "u.nick_name, u.openid, " |
| | | + "CASE WHEN a.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity, " |
| | | + "u.phone, " + "u.tags, " + "a.create_at, " + "a.is_volunteer, a.status , a.reason, t.limit " + "FROM " + "com_act_act_sign a " |
| | | + "JOIN sys_user u ON a.user_id = u.user_id left join com_act_activity t on a.activity_id = t.id " + "WHERE " + "a.activity_id = #{activitySignVO.activityId} " |
| | | + "<if test='activitySignVO.phone != null and activitySignVO.phone != ""'>" |
| | | + "AND u.phone = #{activitySignVO.phone} " + " </if> " |
| | | + "<if test='activitySignVO.status != null'>" |
| | | + "AND a.status = #{activitySignVO.status} " + " </if> " |
| | | + "<if test='activitySignVO.name != null and activitySignVO.name != ""'>" |
| | | + "AND u.`name` = #{activitySignVO.name} " + " </if> " |
| | | + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==1'>" |
| | |
| | | |
| | | List<ComActActSignExcelVO> getSignLists (@Param("activitySignVO") ActivitySignVO activitySignVO); |
| | | |
| | | @Select("<script> " + "SELECT " + " caas.user_id, " + " su.NAME, " + "CASE " + " WHEN su.is_volunteer = 1 THEN " |
| | | + " '志愿者' ELSE '居民' " + " END identity, " + " su.phone, " + " caas.create_at " + "FROM " |
| | | @Select("<script> " + "SELECT " + " caas.user_id, " + " su.NAME, " + "CASE WHEN caas.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity, " |
| | | + " su.phone, " + " caas.create_at " + "FROM " |
| | | + " com_act_act_sign AS caas " |
| | | + " LEFT JOIN sys_user AS su ON su.user_id = caas.user_id where caas.activity_id = #{activityPeopleListDTO.activityId} " |
| | | + "<if test='activityPeopleListDTO.phone != null and activityPeopleListDTO.phone != ""'>" |
| | |
| | | * @return 需要默认好评的记录列表 |
| | | */ |
| | | List<ComActActSignDO> selectNeedEvaluateSignRecords(@Param("activityIds") List<Long> activityIds); |
| | | |
| | | /** |
| | | * 获取活动报名签到记录 |
| | | * @param id 活动主键id |
| | | * @return |
| | | */ |
| | | List<ActivitySignInRecordVO> listSignInRecord(@Param("id") Long id); |
| | | |
| | | /** |
| | | * 获取用户活动报名记录 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | List<ActivitySignVO> selectList(@Param("userId") Long userId); |
| | | } |
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.ComActActivityCode; |
| | | |
| | | /** |
| | | * 签到二维码表(ComActActivityCode)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-15 15:23:09 |
| | | */ |
| | | @Mapper |
| | | public interface ComActActivityCodeDao extends BaseMapper<ComActActivityCode> { |
| | | |
| | | } |
| | |
| | | import java.util.Map; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActActivityStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityTypeVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " |
| | | + "count(if(s.is_volunteer=0,s.id,null))participant_now, " + "a.participant_max, " + "a.sign_up_begin, " |
| | | + "a.sign_up_end, " + "ca.name as communityName " + "FROM " + "com_act_activity a " |
| | | + "left join sys_user u on a.sponsor_id=u.user_id " + "left join com_act_act_sign s on a.id=s.activity_id " |
| | | + "left join sys_user u on a.sponsor_id=u.user_id " + "left join (select * from com_act_act_sign where `status` = 1) s on a.id=s.activity_id " |
| | | + "left join com_act ca on a.community_id=ca.community_id " + " where 1=1 " + |
| | | |
| | | "<if test='comActActivityVO.choice == 0 '>" + "AND a.community_id=#{comActActivityVO.communityId} " + " </if> " |
| | |
| | | + "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} " |
| | | + " </if> " + "<if test='comActActivityVO.type != null and comActActivityVO.type==1 '>" |
| | | + "AND a.volunteer_max!=0 " + " </if> " |
| | | + "<if test='comActActivityVO.type != null and comActActivityVO.type==2 '>" + "AND a.participant_max!=0 " |
| | | + "<if test='comActActivityVO.type != null and comActActivityVO.type==2 '>" + "AND a.volunteer_max=0 " |
| | | + " </if> " + " group by a.id " + " order by a.status asc,a.publish_at desc " + "</script>") |
| | | IPage<ComActActivityVO> pageActivity(Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO); |
| | | |
| | | @Select("SELECT " + "u.name sponsorName, " + "ca.name communityName, " |
| | | + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " |
| | | + "count(if(s.is_volunteer=0,s.id,null))participant_now, " + "a.* " + "FROM " + "com_act_activity a " |
| | | + "left join sys_user u on a.sponsor_id=u.user_id " + "left join com_act_act_sign s on a.id=s.activity_id " |
| | | + "left join com_act ca on a.community_id=ca.community_id " + "where a.id=#{id} " + " group by a.id ") |
| | | ComActActivityVO inforActivity(Long id); |
| | | // @Select("SELECT " + "u.name sponsorName, " + "ca.name communityName, " |
| | | // + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " |
| | | // + "count(if(s.is_volunteer=0,s.id,null))participant_now, " + "a.* " + "FROM " + "com_act_activity a " |
| | | // + "left join sys_user u on a.sponsor_id=u.user_id " + "left join com_act_act_sign s on a.id=s.activity_id " |
| | | // + "left join com_act ca on a.community_id=ca.community_id " + "where a.id=#{id} " + " group by a.id ") |
| | | |
| | | @Select("SELECT " + "a.* " + "FROM " + "com_act_act_sign s " + "JOIN com_act_activity a ON s.activity_id = a.id " |
| | | /** |
| | | * 活动详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | ComActActivityVO inforActivity(@Param("id") Long id); |
| | | |
| | | @Select("SELECT " + "a.* " + "FROM " + "(select * from com_act_act_sign where `status` = 1) s " + "JOIN com_act_activity a ON s.activity_id = a.id " |
| | | + "WHERE " + "s.user_id = #{comActActivityVO.sponsorId} " + "ORDER BY " + "s.create_at DESC") |
| | | IPage<ComActActivityVO> pageMyActivity(Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO); |
| | | |
| | | @Select("select " + "t.activity_name," + "t.id," + "t.end_at," + "t.begin_at," + "t.cover," + "t.status " |
| | | + "from com_act_act_sign s " |
| | | + "from (select * from com_act_act_sign where `status` = 1) s " |
| | | + "join sys_user u on s.user_id=u.user_id and u.phone=#{phone} and s.is_volunteer=1 " |
| | | + "join com_act_activity t on s.activity_id=t.id and t.status=5") |
| | | List<ComActActivityVO> listActivityByPhone(String phone); |
| | |
| | | @Select("select t.id from ( " + "SELECT " + "a.id, " + "a.activity_name, " |
| | | + "COUNT(case when s.is_volunteer=1 then s.id else null end )volunteernum, " |
| | | + "COUNT(case when s.is_volunteer=0 then s.id else null end)usernum, " + "a.participant_min, " |
| | | + "a.volunteer_min " + "FROM " + "com_act_activity a " + "LEFT JOIN com_act_act_sign s on a.id=s.activity_id " |
| | | + "a.volunteer_min " + "FROM " + "com_act_activity a " + "LEFT JOIN (select * from com_act_act_sign where `status` = 1) s on a.id=s.activity_id " |
| | | + "WHERE " + "a.`status` in(3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),a.sign_up_end)<=0 " |
| | | + "GROUP BY a.id)t WHERE t.usernum<participant_min or t.volunteernum<volunteer_min") |
| | | List<Long> selectTimedTaskActActivity(); |
| | |
| | | @Update("update com_act_activity set `status`=5 where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),end_at)<=0") |
| | | int updateStatusToBeginActiveOrEnd(); |
| | | |
| | | @Select("<script> " + "select t.* from ( " + "SELECT " + "a.id, " + "a.activity_name, " + "u.`name` sponsorName, " |
| | | + "a.activity_addr, " + "a.participant_max, " + "count(if(s.is_volunteer=1,null,s.id))participant_now, " |
| | | + "a.volunteer_max, " + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " + "a.`status`, " |
| | | + "a.publish_at, " + "a.is_qr_code, " + "a.begin_at, " + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM " |
| | | + " com_act_activity a " + " LEFT JOIN sys_user u on a.sponsor_id=u.user_id " |
| | | + " LEFT JOIN com_act_act_sign s on a.id=s.activity_id " + "WHERE " |
| | | + " a.`status` = 1 and a.community_id=#{comActActivityVO.communityId} " |
| | | + "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'>" |
| | | + " and a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) " + " </if> " |
| | | + "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 and comActActivityVO.status !=1'>" |
| | | + "AND a.`status` = 99 " + " </if> " + "<if test='comActActivityVO.beginAt != null '>" |
| | | + "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} " |
| | | + " </if> " + "group by a.id " + " " + " union all " + "select t1.* from ( " + " " + " SELECT " + "a.id, " |
| | | + "a.activity_name, " + "u.`name` sponsorName, " + "a.activity_addr, " + "a.participant_max, " |
| | | + "count(if(s.is_volunteer=1,null,s.id))participant_now, " + "a.volunteer_max, " |
| | | + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " + "a.`status`, " + "a.publish_at, " + "a.is_qr_code, " + "a.begin_at, " |
| | | + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM " + " com_act_activity a " |
| | | + " LEFT JOIN sys_user u on a.sponsor_id=u.user_id " + " LEFT JOIN com_act_act_sign s on a.id=s.activity_id " |
| | | + "WHERE " + " a.`status` != 1 and a.community_id=#{comActActivityVO.communityId} " |
| | | + "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'>" |
| | | + " and a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) " + " </if> " |
| | | + "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 '>" |
| | | + "AND a.`status` = #{comActActivityVO.status} " + " </if> " + "<if test='comActActivityVO.beginAt != null '>" |
| | | + "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} " |
| | | + " </if> " + " group by a.id order by a.publish_at desc)t1 )t" + "</script>") |
| | | IPage<ComActActivityVO> pageActivityCommunityBack(Page page, |
| | | @Param("comActActivityVO") ComActActivityVO comActActivityVO); |
| | | // @Select("<script> " + "select t.* from ( " + "SELECT " + "a.id, " + "a.activity_name, " + "u.`name` sponsorName, " |
| | | // + "a.activity_addr, " + "a.participant_max, " + "count(if(s.is_volunteer=1,null,s.id))participant_now, " |
| | | // + "a.volunteer_max, " + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " + "a.`status`, " |
| | | // + "a.publish_at, " + "a.is_qr_code, " + "a.begin_at, " + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM " |
| | | // + " com_act_activity a " + " LEFT JOIN sys_user u on a.sponsor_id=u.user_id " |
| | | // + " LEFT JOIN com_act_act_sign s on a.id=s.activity_id " + "WHERE " |
| | | // + " a.`status` = 1 and a.community_id=#{comActActivityVO.communityId} " |
| | | // + "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'>" |
| | | // + " and a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) " + " </if> " |
| | | // + "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 and comActActivityVO.status !=1'>" |
| | | // + "AND a.`status` = 99 " + " </if> " + "<if test='comActActivityVO.beginAt != null '>" |
| | | // + "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} " |
| | | // + " </if> " + "group by a.id " + " " + " union all " + "select t1.* from ( " + " " + " SELECT " + "a.id, " |
| | | // + "a.activity_name, " + "u.`name` sponsorName, " + "a.activity_addr, " + "a.participant_max, " |
| | | // + "count(if(s.is_volunteer=1,null,s.id))participant_now, " + "a.volunteer_max, " |
| | | // + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " + "a.`status`, " + "a.publish_at, " + "a.is_qr_code, " + "a.begin_at, " |
| | | // + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM " + " com_act_activity a " |
| | | // + " LEFT JOIN sys_user u on a.sponsor_id=u.user_id " + " LEFT JOIN com_act_act_sign s on a.id=s.activity_id " |
| | | // + "WHERE " + " a.`status` != 1 and a.community_id=#{comActActivityVO.communityId} " |
| | | // + "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'>" |
| | | // + " and a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) " + " </if> " |
| | | // + "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 '>" |
| | | // + "AND a.`status` = #{comActActivityVO.status} " + " </if> " + "<if test='comActActivityVO.beginAt != null '>" |
| | | // + "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} " |
| | | // + " </if> " + " group by a.id order by a.publish_at desc)t1 )t" + "</script>") |
| | | /** |
| | | * 分页查询社区活动 |
| | | * @param page |
| | | * @param comActActivityVO |
| | | * @return |
| | | */ |
| | | IPage<ComActActivityVO> pageActivityCommunityBack(@Param("page") Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO); |
| | | |
| | | @Select("select id from com_act_activity where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),end_at)<=0") |
| | | List<Long> getActivityEndIds(); |
| | |
| | | @Select("SELECT " + " count( caa.id ) as totalNum, " |
| | | + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min = 0 and community_id = #{communityId}) as commonNum, " |
| | | + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min > 0 and community_id = #{communityId}) as volunteerNum, " |
| | | + " (select count(caas.user_id) from com_act_act_sign as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 0 and caa.community_id = #{communityId}) as commonPeopleNum, " |
| | | + " (select count(caas.user_id) from com_act_act_sign as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 1 and caa.community_id = #{communityId}) as volunteerPeopleNum, " |
| | | + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 0 and caa.community_id = #{communityId}) as commonPeopleNum, " |
| | | + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 1 and caa.community_id = #{communityId}) as volunteerPeopleNum, " |
| | | + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and community_id = #{communityId} and create_at between date_sub(curdate() - day(curdate()) +1,interval 1 month) and now()) as currentNum " |
| | | + "FROM " + " com_act_activity AS caa " + "WHERE " |
| | | + " caa.`status` IN (1,2,3,4,5) and community_id = #{communityId}") |
| | |
| | | @Param("actActivityListDTO") ScreenActActivityListDTO actActivityListDTO); |
| | | |
| | | @Select("SELECT " + " count( caas.id ) AS volunteerCount,( " + " SELECT " + " count( caas1.id ) " + " FROM " |
| | | + " com_act_act_sign AS caas1 " + " LEFT JOIN sys_user AS su1 ON su1.user_id = caas1.user_id " + " WHERE " |
| | | + " (select * from com_act_act_sign where `status` = 1) AS caas1 " + " LEFT JOIN sys_user AS su1 ON su1.user_id = caas1.user_id " + " WHERE " |
| | | + " su1.is_volunteer = 0 " + " AND caas1.activity_id = #{activityId} " + " ) AS participantCount " |
| | | + "FROM " + " com_act_act_sign AS caas " + " LEFT JOIN sys_user AS su ON su.user_id = caas.user_id " + "WHERE " |
| | | + "FROM " + " (select * from com_act_act_sign where `status` = 1) AS caas " + " LEFT JOIN sys_user AS su ON su.user_id = caas.user_id " + "WHERE " |
| | | + " su.is_volunteer = 1 " + " AND activity_id = #{activityId} ") |
| | | ActActivityListVO getScreenActActivityPeopleCount(@Param("activityId") Long activityId); |
| | | |
| | |
| | | * @return 活动列表 |
| | | */ |
| | | List<ComActActivityVO> getIndexTopActivityList(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 获取活动类型(目前只有志愿者活动需要获取) |
| | | * @param communityId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | List<ComActActivityTypeVO> listActivityType(@Param("communityId") Long communityId, @Param("type") Integer type); |
| | | |
| | | /** |
| | | * 添加活动类型 |
| | | * @param comActActivityTypeVO |
| | | * @return |
| | | */ |
| | | int addActivityType(@Param("comActActivityTypeVO") ComActActivityTypeVO comActActivityTypeVO); |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActPasswordVo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | void updateAccountPassword(@Param("password") String password, @Param("account") String account, |
| | | @Param("communityId") Long communityId); |
| | | |
| | | @Select("select community_id,`name` from com_act where state = 0") |
| | | @Select("select community_id,`name`,lng,lat from com_act where state = 0") |
| | | List<EventGridCommunityAdminVO> getCommunityLists(); |
| | | |
| | | @Select("select ca.`name`,cmsap.province_name,cmsac.city_name,cmsad.district_name,ca.street_id,ca.community_id,cs.`name` as streetName from com_act as ca \n" |
| | |
| | | "HAVING distance >= 0 and distance <= #{communityDTO.distance} ORDER BY distance ASC") |
| | | List<CommunitySwitchAllAppletsVO> getCommunityListByNearby(@Param("communityDTO") SearchCommunityDTO communityDTO); |
| | | |
| | | @Select("select community_id,name from com_act where state = 0 and area_code = '510423' ") |
| | | @Select("select community_id,name,lng,lat from com_act where state = 0 and area_code = '510423' ") |
| | | List<EventGridCommunityAdminVO> getWestCommunityLists(); |
| | | |
| | | @Select("select account,plaintext_password as password from com_act where community_id = #{communityId}") |
| | | ComActPasswordVo getCommunityPassword(@Param("communityId") Long communityId); |
| | | } |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | + "WHERE " + "d.id =#{id} " + "GROUP BY d.id") |
| | | ComActDiscussVO selectHaveSignAndHaveVote(@Param("id") Long id, @Param("loginUserId") Long loginUserId); |
| | | |
| | | @Select(" SELECT COUNT(id) AS totalNum," |
| | | + "(SELECT COUNT(id) FROM com_act_discuss WHERE community_id = #{communityId} AND create_at between date_sub(curdate() - day(curdate()) +1,interval 1 month) and now())AS currentNum," |
| | | + "(SELECT COUNT(id) FROM com_act_discuss WHERE community_id = #{communityId} AND TYPE = 1)AS imgNum," + "(" |
| | | + "SELECT " + " count(distinct cadc.user_id) " + "FROM " + " com_act_discuss_comment AS cadc " |
| | | + " LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id " |
| | | + " where cad.type = 1 and cad.community_id = #{communityId} " + ")AS imgPeopleNum," + "(" |
| | | + "select count(user_id) from ( " + "SELECT " + " distinct cadc.user_id " + "FROM " |
| | | + " com_act_discuss_comment AS cadc " + " LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id " |
| | | + " where cad.type = 2 and cad.community_id = #{communityId} " + " union all " |
| | | + " SELECT DISTINCT cadou.user_id FROM com_act_discuss_option_user AS cadou LEFT JOIN com_act_discuss_option AS cado ON cado.id = cadou.discuss_option_id left join com_act_discuss as cad on cad.id = cado.discuss_id where cad.community_id = #{communityId}" |
| | | + ") t" + ")AS votePeopleNum " + " FROM com_act_discuss") |
| | | |
| | | Map<String, Long> countByCommunityId(@Param("communityId") Long communityId, @Param("date") String date); |
| | | |
| | | @Select(" SELECT id,discuss_subject AS content,IF(type = 1,'图文','投票') AS typeName FROM com_act_discuss WHERE community_id = #{communityId} ORDER BY create_at DESC LIMIT #{pageSize}") |
| | |
| | | * @return |
| | | */ |
| | | int batchUpdateViewNum(@Param("needDealMap") HashMap<Long, Integer> needDealMap); |
| | | |
| | | /** |
| | | * 居民自治-议事投票类型占比统计 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<StatisticsCommVO> selectTypePercent(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 获取一起议标题 |
| | | * @param type |
| | | * @param communityId |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<String> getTitles(@Param("type") int type, @Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | + " FROM DUAL") |
| | | DynamicWorkVO countByTime(@Param("start") String start, @Param("end") String end, |
| | | @Param("communityId") Long communityId); |
| | | |
| | | List<StatisticsCommVO> getIndexDynBaseData(@Param("communityId") Long communityId); |
| | | |
| | | List<StatisticsCommVO> getDynAddPolylineData(@Param("communityId") Long communityId); |
| | | |
| | | StatisticsCommVO getDynTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); |
| | | |
| | | IPage<ComActDynVO> indexDynList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.ExportEasyPhotoDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenEasyPhotoStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigscreenGridsGovernanceStatisticsVO; |
| | | 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.easyPhoto.BannerVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoCountVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoStatisticsVO; |
| | |
| | | * @return |
| | | */ |
| | | List<BannerVO> banner(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 获取随手拍居民自治统计数据 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<ComActEasyPhotoVO> selectStatisticsList(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 获取居民自治统计数据 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | ResidentAutonomyStatisticsVO selectResidentAutonomyStatistics(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 获取清网治格统计数据 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | GridsGovernanceStatisticsVO selectGridsGovernance(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 首页大屏获取网格统计数据 |
| | | */ |
| | | BigscreenGridsGovernanceStatisticsVO selectBigscreenGridsGovern(@Param("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-随手拍基础数据查询 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | BigScreenEasyPhotoStatisticsInfo selectIndexEasyPhotoBaseData(@Param("communityId") Long communityId); |
| | | |
| | | List<StatisticsCommVO> getEasyPhotoAddPolylineData(@Param("communityId") Long communityId); |
| | | |
| | | StatisticsCommVO getEasyPhotoTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); |
| | | |
| | | /** |
| | | * 首页二级页面-随手拍展示列表 |
| | | * @param page |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | IPage<ComActEasyPhotoVO> indexEasyPhotoList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); |
| | | } |
| | |
| | | @Param("communityRankDTO") ComActIntegralCommunityRankDTO communityRankDTO); |
| | | |
| | | /** |
| | | * 根据社区活动id查询社区活动报名人员列表 |
| | | * 根据社区活动id查询社区活动报名且未参与人员列表 |
| | | * |
| | | * @param activityId |
| | | * 活动id |
| | | * @return 社区活动报名人员列表 |
| | | * @return 社区活动报名且未参与人员列表 |
| | | */ |
| | | List<ComActActivityPeopleVO> getTaskActivityPeopleList(@Param("activityId") Long activityId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenMicroWishStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.screen.work.MicroListVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishDO; |
| | |
| | | List<SysUserVO> getWishHandleListAdmin(@Param("type") Integer type,@Param("communityId") Long communityId); |
| | | |
| | | SysUserVO getUserByUserId(@Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 待实现&已实现数目及占比 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<StatisticsCommVO> selectRealizePercent(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 获取通过的微心愿图片 |
| | | * @param communityId |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<String> getPassedAllImages(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); |
| | | |
| | | /** |
| | | * 首页二级页面-微心愿基础数据查询 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | BigScreenMicroWishStatisticsInfo selectIndexMicroWishBaseData(@Param("communityId") Long communityId); |
| | | |
| | | List<StatisticsCommVO> getMicroWishAddPolylineData(@Param("communityId") Long communityId); |
| | | |
| | | StatisticsCommVO getMicroWishTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); |
| | | |
| | | /** |
| | | * 微心愿大屏展示列表 |
| | | * @param page |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | IPage<ComActMicroWishVO> selectScreenDisplayList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); |
| | | } |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | void addHotNum(@Param("circleId") Long circleId,@Param("hotNum") Long hotNum); |
| | | |
| | | void addTopicHotNum(@Param("circleId") Long circleId,@Param("hotNum") Long hotNum); |
| | | |
| | | /** |
| | | * 获取大屏邻里圈展示图片 |
| | | * @param communityId |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<String> getAllImages(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); |
| | | |
| | | /** |
| | | * 获取大屏邻里圈展示文本内容 |
| | | * @param communityId |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<String> getContents(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); |
| | | |
| | | List<StatisticsCommVO> getIndexNeighborBaseData(@Param("communityId") Long communityId); |
| | | |
| | | List<StatisticsCommVO> getNeighborAddPolylineData(@Param("communityId") Long communityId); |
| | | |
| | | StatisticsCommVO getNeighborTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); |
| | | |
| | | IPage<ComActNeighborCircleAdminVO> indexNeighborList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ComActPictureLibraryDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 图库预设mapper |
| | | * @author: hans |
| | | * @date: 2021/11/23 17:05 |
| | | */ |
| | | @Mapper |
| | | public interface ComActPictureLibraryDAO { |
| | | |
| | | /** |
| | | * 获取预设图库 |
| | | * @param type |
| | | * @param subtype |
| | | * @return |
| | | */ |
| | | List<String> getPresetPictureLibrary(@Param("type") Integer type, @Param("subtype") Integer subtype); |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireVO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenQuestionnaireStatisticsInfo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | @Param("communityId") Long communityId); |
| | | |
| | | void addNoNotice(@Param("questId") Long questId, @Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 首页大屏二级页面-社区问卷基础数据 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | BigScreenQuestionnaireStatisticsInfo getIndexQuestionnaireBaseData(@Param("communityId") Long communityId); |
| | | |
| | | List<StatisticsCommVO> getQuestionnaireAddPolylineData(@Param("communityId") Long communityId); |
| | | |
| | | StatisticsCommVO getQuestionnaireTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); |
| | | |
| | | /** |
| | | * 大屏问卷展示列表 |
| | | * @param page |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | IPage<ComActQuestnaireVO> selectQuestionnaireDisplayList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.reserve.ComActReserveMakeStatisticsDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveAdminDTO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.IndexReserve; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.IndexReserveSub; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveListAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeLeftStatisticsAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeRightStatisticsAdminVO; |
| | |
| | | */ |
| | | List<ComActReserveIndexVo> getReserveIndexList(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 首页大屏返攀登记数据统计总数 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | Integer indexBackReserve(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 首页大屏居家隔离数据统计总数 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | Integer indexHomeQuarantine(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 首页大屏返攀登记数据统计选项 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<IndexReserveSub> indexBackReserveSub(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 首页大屏居家隔离数据统计选项 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<IndexReserveSub> IndexHomeQuarantineSub(@Param("communityId") Long communityId); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.reserve.ComActReserveRegisterStatisticsDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeHandleAdminDTO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStaticsReserve; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStaticsReserveMonth; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | * @return |
| | | */ |
| | | List<ComOperationListVO> queryAll(OperationDetailDTO operationDetailDTO); |
| | | |
| | | /** |
| | | * 大屏数据统计 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | BigScreenStaticsReserve biggestScreen(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 大屏折线图 |
| | | * @param communityId |
| | | * @param date |
| | | * @return |
| | | */ |
| | | BigScreenStaticsReserveMonth biggestScreenMonth(@Param("communityId")Long communityId,@Param("date")String date); |
| | | } |
| | |
| | | @Select("select village_id,alley,house_num,group_at,type,address,update_at from com_mng_village where village_id = #{villageId}") |
| | | ComMngVillageVO getVillageById(@Param("villageId") Long villageId); |
| | | |
| | | @Select("<script> " + "SELECT " + " village_id, " + " `name` AS userName, " + " build_sum, " + " address, " |
| | | @Select("<script> " + "SELECT " + " village_id, " + " `name` AS userName, " + " IFNULL((select count(id) from com_mng_building where village_id = cmv.village_id),0) as buildSum, " + " address, " |
| | | + " create_at as createAt, " + " lng, " + " lat, " |
| | | + " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id ) AS userSum, " |
| | | + " ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmv.village_id ) AS houseNum, " |
| | |
| | | IPage<PageComMngVillageVO> getGridVillageList(Page page, |
| | | @Param("villageListAppDTO") ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | IPage<PageComMngVillageVO> getGridVillageListApp(Page page, |
| | | @Param("villageListAppDTO") ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | @Select("<script> " + "SELECT " + " alley, " + " house_num as doorNum, " + " `name` AS userName, " + " build_sum, " |
| | | + " address, " + " create_at as createAt, " |
| | | + " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id ) AS userSum, " |
| | |
| | | */ |
| | | DonatesStatisticsVO selectDonatesStatistics(@Param("communityId") Long communityId, @Param("currentYear") String currentYear, |
| | | @Param("currentMonth") String currentMonth, @Param("today") String today); |
| | | |
| | | /** |
| | | * 居民自治大屏-捐赠记录 |
| | | * @param communityId |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<String> getWarehouseDonateRecords(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); |
| | | |
| | | /** |
| | | * 居民自治大屏-爱心传递 |
| | | * @param communityId |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<String> getWarehouseLoveTransfer(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); |
| | | |
| | | /** |
| | | * 居民自治大屏-捐赠物品图片 |
| | | * @param communityId |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<String> getWarehouseImages(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.community.integral.admin.ComActActivityPeopleVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingActivityVO; |
| | | import com.panzhihua.service_community.model.dos.ComPbActivityDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党员活动 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 17:59 |
| | | **/ |
| | | @Mapper |
| | | public interface ComBpActivityDAO extends BaseMapper<ComPbActivityDO> { |
| | | // @Select("<script> " + |
| | | // " <where>" + |
| | | // "<if test='nameCn != null and nameCn.trim() != ""'>" + |
| | | // " </if> " + |
| | | // "<if test='nameCn != null and nameCn.trim() != ""'>" + |
| | | // " </if> " + |
| | | // "<if test='nameCn != null and nameCn.trim() != ""'>" + |
| | | // " </if> " + |
| | | // " </where>" + |
| | | // "</script>") |
| | | @Select("<script> " + "SELECT\n" + "a.id,\n" + "a.name,\n" + "a.address,\n" + "a.status,\n" |
| | | + "a.create_at releaseTimeBegin,\n" + "a.activity_time_begin,\n" + "a.activity_time_end,\n" |
| | | + "a.enroll_time_begin,\n" + "a.release_time,\n" + "a.enroll_time_end \n" + "FROM\n" |
| | | + "com_pb_activity_member m\n" + "JOIN com_pb_activity a ON m.activity_id = a.id \n" + "WHERE\n" |
| | | + "m.member_id = #{id} \n" + "<if test='name != null and name.trim() != ""'>" |
| | | + "AND a.`name` like concat (#{name},'%') \n" + " </if> " + "<if test='releaseTimeBegin != null '>" |
| | | + "AND a.create_at BETWEEN #{releaseTimeBegin} \n" + "AND #{releaseTimeEnd} \n" + " </if> " |
| | | + "<if test='activityTimeBegin != null '>" + "AND a.activity_time_begin BETWEEN #{activityTimeBegin} \n" |
| | | + "AND #{activityTimeEnd}" + " </if> " + "</script>") |
| | | List<PartyBuildingActivityVO> listPartyMemberActivities(PartyBuildingActivityVO partyBuildingActivityVO); |
| | | |
| | | @Select("<script> " + "SELECT\n" + "a.id,\n" + "a.name,\n" + "a.address,\n" + "a.status,\n" + "a.release_time,\n" |
| | | + "a.activity_time_begin,\n" + "a.activity_time_end,\n" + "a.enroll_time_begin,\n" + "a.cover,\n" |
| | | + "if(u.type=3 ,'管理员',u.name)createByName,\n" + "a.enroll_time_end \n" + "FROM\n" + "com_pb_activity a\n" |
| | | + "left join sys_user u on a.create_by=u.user_id \n" |
| | | + "where a.community_id=#{partyBuildingActivityVO.communityId}\n" |
| | | + "<if test='partyBuildingActivityVO.name != null and partyBuildingActivityVO.name.trim() != ""'>" |
| | | + "and a.name = #{partyBuildingActivityVO.name} \n" + " </if> " |
| | | + "<if test='partyBuildingActivityVO.isAppliets != null and partyBuildingActivityVO.isAppliets==1'>" |
| | | + " and a.`status` not in(5,6) " + " </if> " |
| | | + "<if test='partyBuildingActivityVO.status != null and partyBuildingActivityVO.status != 0 and partyBuildingActivityVO.isAppliets ==null '>" |
| | | + "AND a.`status` = #{partyBuildingActivityVO.status} \n" + " </if> " |
| | | + "<if test='partyBuildingActivityVO.status != null and partyBuildingActivityVO.status != 0 and partyBuildingActivityVO.isAppliets !=null and partyBuildingActivityVO.isAppliets==1'>" |
| | | + "AND a.`status` in (3,4) \n" + " </if> " + "<if test='partyBuildingActivityVO.releaseTimeBegin != null '>" |
| | | + "AND a.release_time BETWEEN #{partyBuildingActivityVO.releaseTimeBegin} \n" |
| | | + "AND #{partyBuildingActivityVO.releaseTimeEnd} \n" + " </if> " |
| | | + "<if test='partyBuildingActivityVO.activityTimeBegin != null '>" |
| | | + "AND a.activity_time_begin BETWEEN #{partyBuildingActivityVO.activityTimeBegin} \n" |
| | | + "AND #{partyBuildingActivityVO.activityTimeEnd}" + " </if> " + "order by a.create_at desc " + "</script>") |
| | | IPage<PartyBuildingActivityVO> pageActivity(Page page, |
| | | @Param("partyBuildingActivityVO") PartyBuildingActivityVO partyBuildingActivityVO); |
| | | |
| | | @Select("select t.id from (\n" + "SELECT \n" + "a.participation_lowest_num,\n" + "a.name,\n" + "a.id,\n" |
| | | + "COUNT(m.id)num\n" + "FROM\n" + "com_pb_activity a\n" |
| | | + "LEFT JOIN com_pb_activity_member m ON a.id = m.activity_id\n" |
| | | + "WHERE a.`status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),a.enroll_time_end)<=0\n" |
| | | + "GROUP BY a.id)t where t.num<t.participation_lowest_num") |
| | | List<Long> selectTimedTaskPartyBuildingActivity(); |
| | | |
| | | @Select("SELECT \n" + "u.user_id\n" + "FROM\n" + "com_pb_activity_member m\n" |
| | | + "JOIN com_pb_member r on m.member_id=r.id\n" + "join sys_user u on r.id_card=u.id_card and u.type=1 \n" |
| | | + "where m.activity_id=#{activityId}") |
| | | List<Long> selectTimedTaskPartyBuildingActivityUserids(Long activityId); |
| | | |
| | | @Update("<script> " + "update com_pb_activity set `status`=6 WHERE id in \n" |
| | | + "<foreach item=\"item\" collection=\"ids\" separator=\",\" open=\"(\" close=\")\" index=\"\"> \n" |
| | | + "#{item}\n" + "</foreach>\n" + "</script>") |
| | | int updateBatchIds(@Param("ids") List<Long> ids); |
| | | |
| | | @Update("update com_pb_activity set status=2 where `status`=1 and TIMESTAMPDIFF(MINUTE,SYSDATE(),release_time)<=0") |
| | | int updateStatusToNotBegin(); |
| | | |
| | | @Update("update com_pb_activity set status=3 where `status`=2 and TIMESTAMPDIFF(MINUTE,SYSDATE(),enroll_time_begin)<=0") |
| | | int updateStatusToSign(); |
| | | |
| | | @Update("update com_pb_activity set status=5 where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),enroll_time_end)<=0") |
| | | int updateStatusToActiveOrEnd(); |
| | | |
| | | @Select("select id from com_pb_activity where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),enroll_time_end)<=0") |
| | | List<Long> getTaskPbActivityEndIds(); |
| | | |
| | | @Select("select caas.user_id,caas.activity_id,caa.community_id from com_pb_activity_member as caas left join com_pb_activity as caa on caa.id = caas.activity_id where caa.id = #{activityId}") |
| | | List<ComActActivityPeopleVO> getTaskPbActivityPeopleList(@Param("activityId") Long activityId); |
| | | |
| | | @Select("select type,name from sys_user where user_id=#{createBy}") |
| | | LoginUserInfoVO selectUserInfoByUserId(Long createBy); |
| | | |
| | | /** |
| | | * 根据社区id查询社区名称 |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 社区名字 |
| | | */ |
| | | @Select("select name from com_act where community_id=#{communityId}") |
| | | String selectCommunityNameByCommunityId(Long communityId); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.CascadeHouseDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.WestScreenStatics; |
| | | import com.panzhihua.common.model.vos.community.screen.civil.*; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BaseInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.IndexDynamic; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationCommunityTagsDO; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = #{communityId} and cmp.out_or_local = 2) as outTotal " |
| | | + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = #{communityId} and cmpct.label is not null) as specialTotal " |
| | | + ",(select count(DISTINCT `name`) from com_mng_village where community_id = #{communityId}) as villageTotal " |
| | | + ",(select count(id) from com_mng_building where act_id = #{communityId}) as buildNum " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','吸毒人员','%')) as drugTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','社区矫正','%')) as correctTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal " |
| | |
| | | " where cmpct.community_id = #{communityId}") |
| | | IndexBasicsStatisticsVO getScreenIndexByBasics(@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT " + " IFNULL( NULL, 1 ) AS type, " + " count( cmpct.id ) AS sum " + "FROM " |
| | | + " com_mng_population_community_tags as cmpct " |
| | | + " left join com_mng_population as cmp on cmpct.population_id = cmp.id " + "WHERE " + " cmp.sex = 1 " |
| | | + " AND cmpct.community_id = #{communityId} UNION ALL " + "SELECT " + " IFNULL( NULL, 2 ) AS type, " |
| | | + " count( cmpct.id ) AS sum " + "FROM " + " com_mng_population_community_tags as cmpct " |
| | | + " left join com_mng_population as cmp on cmpct.population_id = cmp.id " + "WHERE " + " cmp.sex = 2 " |
| | | + " AND cmpct.community_id = #{communityId}") |
| | | @Select("SELECT cmp.sex as type, count( cmpct.id ) AS sum, count( cmpct.id )*100/(select count(*) from com_mng_population_community_tags as cmpct \n" + |
| | | " left join com_mng_population as cmp on cmpct.population_id = cmp.id WHERE cmpct.community_id = #{communityId} ) as percent FROM \n" + |
| | | " com_mng_population_community_tags as cmpct \n" + |
| | | " left join com_mng_population as cmp on cmpct.population_id = cmp.id WHERE cmp.sex is not null and cmpct.community_id = #{communityId} GROUP BY cmp.sex") |
| | | List<IndexPopulationSexStatisticsVO> getScreenIndexByPopulationSex(@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT " + " e.happen_time as createAt, " + " e.event_des, " + " e.event_deal_status " + "FROM " |
| | |
| | | @Select("SELECT " + " count( id ) " + "FROM " + " com_mng_population_community_tags " + "WHERE " |
| | | + " community_id = #{communityId} and label like concat('%',#{label},'%')") |
| | | Integer getSpecialStatisticsByLabel(@Param("label") String label,@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT " + " count( id ) " + "FROM " + " com_mng_population_community_tags " + "WHERE " |
| | | + " community_id = #{communityId} ") |
| | | Integer getSpecialStatistics(@Param("communityId") Long communityId); |
| | | |
| | | @Select("<script> " + "SELECT " + " count( egd.id ) AS gridTotal, " |
| | | + " ( select count(egmr.id) from event_grid_member_relation as egmr" |
| | |
| | | CivilGridStatisticsVO getCivilGrid(@Param("communityId") Long communityId); |
| | | |
| | | CivilConvenienceStatisticsVO getCivilConvenience(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 西区治理数据统计 |
| | | * @return |
| | | */ |
| | | WestScreenStatics westScreenStatics(); |
| | | |
| | | List<EventPopulationBasicsStatisticsVO> getBasicsList(@Param("streetId") Long streetId); |
| | | |
| | | EventPopulationSpecialStatisticsVO getPopulationSpecial(@Param("streetId") Long streetId); |
| | | |
| | | List<String> getPopulationListCardNo(@Param("streetId") Long streetId); |
| | | |
| | | Integer getPopulationAge(@Param("streetId") Long streetId, @Param("age") Integer age); |
| | | |
| | | List<EventPopulationStreetVO> getComprehensiveStreetList(); |
| | | |
| | | /** |
| | | * 基础数据统计 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | BaseInfo baseInfo(Long communityId); |
| | | |
| | | /** |
| | | * 业务数据统计 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | IndexDynamic indexDynamic(Long communityId); |
| | | |
| | | /** |
| | | * 大屏事件数据 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<EventGridIncidentStatisticsVO> getGridsGovernanceEventList(@Param("communityId") Long communityId); |
| | | } |
| | |
| | | List<PopulationListVO> getGridVillageBuildingPopulationList(@Param("houseId") Long houseId, |
| | | @Param("relation") Integer relation, @Param("relationId") Integer relationId); |
| | | |
| | | @Select("select id as houseId,floor from com_mng_population_house where village_id = #{villageId} order by create_at asc") |
| | | @Select("select id as houseId,floor from com_mng_population_house where village_id = #{villageId} and floor is not null group by floor order by create_at asc") |
| | | List<ComMngSubordinateVO> getHouseLevelByFloors(@Param("villageId") Long villageId); |
| | | |
| | | @Select("select id as houseId,unit_no from com_mng_population_house where village_id = #{villageId} and floor = #{floor} order by create_at asc") |
| | | @Select("select id as houseId,unit_no from com_mng_population_house where village_id = #{villageId} and floor = #{floor} and unit_no is not null group by unit_no order by create_at asc") |
| | | List<ComMngSubordinateVO> getHouseLevelByUnitNos(@Param("villageId") Long villageId, @Param("floor") String floor); |
| | | |
| | | @Select("select id as houseId,house_no from com_mng_population_house where village_id = #{villageId} and floor = #{floor} and unit_no = #{unitNo} order by create_at asc") |
| | | @Select("select id as houseId,house_no from com_mng_population_house where village_id = #{villageId} and floor = #{floor} and unit_no = #{unitNo} and house_no is not null group by house_no order by create_at asc") |
| | | List<ComMngSubordinateVO> getHouseLevelByHouseNos(@Param("villageId") Long villageId, @Param("floor") String floor, |
| | | @Param("unitNo") String unitNo); |
| | | |
| | |
| | | @Select("update com_mng_population_house_user set relation_id = null where id = #{id}") |
| | | Integer delBuildingHousePopulationRelationId(@Param("id") Long id); |
| | | |
| | | @Select("SELECT " + " cmv.`name` AS villageName, " + " cmph.id, " + " cmv.address, " + " cmph.floor, " |
| | | @Select("SELECT " + " cmv.`name` AS villageName, " + " cmph.id, " + " cmv.address, " + " cmph.floor,cmphu.relation, " |
| | | + " cmph.unit_no, " + " cmph.house_no " + "FROM " + " com_mng_population_house_user AS cmphu " |
| | | + " LEFT JOIN com_mng_population_house AS cmph ON cmph.id = cmphu.house_id " |
| | | + " LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmph.village_id " + "WHERE " |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityTop; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceUser; |
| | | import com.panzhihua.common.model.vos.partybuilding.*; |
| | | import com.panzhihua.service_community.model.dos.ComPbMemberDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | * @return |
| | | */ |
| | | ComPbMemberVO selectById(String idCard); |
| | | |
| | | /** |
| | | *根据社区id日期查询活动数 |
| | | * @param communityId |
| | | * @param date |
| | | * @return |
| | | */ |
| | | BigScreenActivityLine selectActivityCountMonth(@Param("communityId")Long communityId, @Param("date")String date); |
| | | |
| | | /** |
| | | * 查询党员积分前3 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | IPage<BigScreenActivityTop> selectActivityTop(Page page,@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 服务数据查询 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | BigScreenServiceData bigScreenServiceData(@Param("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 服务居民 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<BigScreenServiceUser> bigScreenServiceUser(@Param("communityId")Long communityId); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyVO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.ComProperty; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (ComProperty)表数据库访问层 |
| | |
| | | * @return |
| | | */ |
| | | IPage<ComPropertyVO> pageList(Page page, @Param("commonPage") CommonPage commonPage); |
| | | |
| | | /** |
| | | * 居民自治大屏统计数据获取 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<StatisticsCommVO> getRepairPolylineDate(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 报事报修date之前的累计数量 |
| | | * @param communityId |
| | | * @param date |
| | | * @return |
| | | */ |
| | | StatisticsCommVO getRepairTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); |
| | | |
| | | List<StatisticsCommVO> getEventAddPolylineData(@Param("communityId") Long communityId); |
| | | |
| | | StatisticsCommVO getEventTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); |
| | | } |
| | |
| | | |
| | | @Select("<script>" |
| | | + "select id,`name`,store_password,contacts,store_account,classify_id,logo,phone,delivery_type,remark,`status`," |
| | | + "sale,sale_volume,store_detail,create_at, store_describe from com_shop_store c" + " <where>" |
| | | + "c.delete_status=1 and c.status = 1" |
| | | + "sale,sale_volume,store_detail,create_at, store_describe from com_shop_store c " + " <where>" |
| | | + "c.delete_status=1 and c.status = 1 " |
| | | + "<if test='pageComShopStoreDTO.contacts != null and pageComShopStoreDTO.contacts.trim() != ""'>" |
| | | + "and c.contacts like concat('%',#{pageComShopStoreDTO.contacts},'%') \n" + " </if> " |
| | | + "and c.contacts like concat('%',#{pageComShopStoreDTO.contacts},'%') " + " </if> " |
| | | + "<if test='pageComShopStoreDTO.account != null and pageComShopStoreDTO.account.trim() != ""'>" |
| | | + "and c.store_account = #{pageComShopStoreDTO.account} \n" + " </if> " |
| | | + "and c.store_account = #{pageComShopStoreDTO.account} " + " </if> " |
| | | + "<if test='pageComShopStoreDTO.name != null and pageComShopStoreDTO.name.trim() != ""'>" |
| | | + "and c.`name` like concat('%',#{pageComShopStoreDTO.name},'%') \n" + " </if> " |
| | | + "and c.`name` like concat('%',#{pageComShopStoreDTO.name},'%') " + " </if> " |
| | | + "<if test='pageComShopStoreDTO.deliveryType != null'>" |
| | | + "and c.delivery_type =#{pageComShopStoreDTO.deliveryType}\n" + " </if> " |
| | | + "<if test='pageComShopStoreDTO.status != null'>" + "and c.status =#{pageComShopStoreDTO.status} \n" |
| | | + "and c.delivery_type =#{pageComShopStoreDTO.deliveryType} " + " </if> " |
| | | + "<if test='pageComShopStoreDTO.status != null'>" + "and c.status =#{pageComShopStoreDTO.status} " |
| | | + " </if> " + " </where>" + " order by c.create_at desc" + "</script>") |
| | | IPage<PageShopStoreVO> pageShopStore(Page page, |
| | | @Param("pageComShopStoreDTO") PageComShopStoreDTO pageComShopStoreDTO); |
| | |
| | | |
| | | 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.ExportMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageClassifyMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenMerchantStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientConsultationStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientViewStatisticsVO; |
| | |
| | | * @return |
| | | */ |
| | | int batchUpdateBusinessStatus(@Param("convenientMerchantDOList") List<ConvenientMerchantDO> convenientMerchantDOList, @Param("status") int status); |
| | | |
| | | /** |
| | | * 社区商家 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<ConvenientMerchantVO> selectMerchantListByCommunity(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 大屏分页获取热度排行商家 |
| | | * @param page |
| | | * @param pagePopularMerchantDTO |
| | | * @return |
| | | */ |
| | | List<ConvenientMerchantVO> getScreenPopularMerchants(@Param("page") Page page, @Param("pagePopularMerchantDTO") PagePopularMerchantDTO pagePopularMerchantDTO); |
| | | |
| | | BigScreenMerchantStatisticsInfo getIndexMerchantBaseData(@Param("communityId") Long communityId); |
| | | |
| | | List<StatisticsCommVO> selectServiceTypeCircleData(@Param("communityId") Long communityId); |
| | | |
| | | List<StatisticsCommVO> getServiceTimesAddPolylineData(@Param("communityId") Long communityId); |
| | | |
| | | StatisticsCommVO getServiceTimesTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); |
| | | |
| | | IPage<ConvenientMerchantVO> indexMerchantList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | 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; |
| | | |
| | | |
| | | /** |
| | | * 签到二维码表(ComActActivityCode)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-15 15:23:08 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("签到二维码表") |
| | | public class ComActActivityCode implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 821676065778343316L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 活动id |
| | | */ |
| | | @ApiModelProperty(value = "活动id") |
| | | private Long activityId; |
| | | |
| | | /** |
| | | * 二维码编号 |
| | | */ |
| | | @ApiModelProperty(value = "二维码编号") |
| | | private String code; |
| | | |
| | | /** |
| | | * 状态 1 有效 2过时 |
| | | */ |
| | | @ApiModelProperty(value = "状态 1 有效 2过时") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 二维码类型 1居民志愿者 2党员 |
| | | */ |
| | | @ApiModelProperty("二维码类型 1居民志愿者 2党员") |
| | | private Integer type; |
| | | |
| | | } |
| | |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 奖励积分 |
| | | */ |
| | | private Integer award; |
| | | |
| | | /** |
| | | * 签到位置 |
| | | */ |
| | | private String position; |
| | | |
| | | /** |
| | | * 签到次数 |
| | | */ |
| | | private Integer times; |
| | | |
| | | /** |
| | | * 二维码id |
| | | */ |
| | | private Integer codeId; |
| | | |
| | | /** |
| | | * 活动类型 1居民,志愿者 2党员 |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 是否是志愿者 0 否 1 是 |
| | | */ |
| | | private Integer isVolunteer; |
| | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.FieldStrategy; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | |
| | |
| | | * 是否是志愿者 0 不是 1 是 |
| | | */ |
| | | private Integer isVolunteer; |
| | | |
| | | /** |
| | | * 报名状态 0 已取消 1已报名 |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 取消原因 |
| | | */ |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) |
| | | private String reason; |
| | | } |
| | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.FieldStrategy; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | |
| | | * 活动是否已默认好评 |
| | | */ |
| | | private Integer isDefaultPraise; |
| | | /** |
| | | * 签到范围,默认0无限制 |
| | | */ |
| | | @TableField("`range`") |
| | | private Integer range; |
| | | /** |
| | | * 是否有积分奖励(1.是 2.否) |
| | | */ |
| | | private Integer haveIntegralReward; |
| | | /** |
| | | * 积分奖励方式(1.按次奖励 2.记时奖励) |
| | | */ |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) |
| | | private Integer rewardWay; |
| | | /** |
| | | * 奖励积分 |
| | | */ |
| | | private Integer rewardIntegral; |
| | | /** |
| | | * 参与次数上限 |
| | | */ |
| | | @TableField("`limit`") |
| | | private Integer limit; |
| | | /** |
| | | * 是否允许取消(1.允许 2.不允许) |
| | | */ |
| | | private Integer canCancel; |
| | | /** |
| | | * 取消扣除积分 |
| | | */ |
| | | private Integer cancelDeduct; |
| | | /** |
| | | * 活动类型 |
| | | */ |
| | | private String activityType; |
| | | } |
| | |
| | | */ |
| | | private Long streetId; |
| | | |
| | | /** |
| | | * 明文密码 |
| | | */ |
| | | private String plaintextPassword; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党员活动 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 17:54 |
| | | **/ |
| | | @Data |
| | | @TableName(value = "com_pb_activity") |
| | | public class ComPbActivityDO implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 活动名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 活动地点 |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | * 1 待发布 2 未开始 3 报名中 4 进行中 5 已结束 6 已取消 |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 活动开始时间 |
| | | */ |
| | | private Date activityTimeBegin; |
| | | |
| | | /** |
| | | * 活动结束时间 |
| | | */ |
| | | private Date activityTimeEnd; |
| | | |
| | | /** |
| | | * 报名开始时间 |
| | | */ |
| | | private Date enrollTimeBegin; |
| | | |
| | | /** |
| | | * 报名结束时间 |
| | | */ |
| | | private Date enrollTimeEnd; |
| | | |
| | | /** |
| | | * 活动参入人数 |
| | | */ |
| | | private Integer participationNum; |
| | | |
| | | /** |
| | | * 活动封面 |
| | | */ |
| | | private String cover; |
| | | |
| | | /** |
| | | * 活动内容-富文本 |
| | | */ |
| | | private String richText; |
| | | /** |
| | | * 活动最低参入人数-未达到到时间自动取消 |
| | | */ |
| | | private Integer participationLowestNum; |
| | | |
| | | /** |
| | | * 取消原因 |
| | | */ |
| | | private String cancelReason; |
| | | |
| | | /** |
| | | * 发布人 |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 发布时间 |
| | | */ |
| | | private Date releaseTime; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyActivity; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyBuild; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.PartyBuildingMemberVO; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * @ClasssName BigScreenService |
| | |
| | | */ |
| | | R<List<BigScreenStatisticPartyActivity>> |
| | | bigscreenPartyactivity(BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO); |
| | | |
| | | /** |
| | | * 党员活动折线图 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R partyActivityLine(Long communityId); |
| | | |
| | | /** |
| | | *查询党员积分前3 |
| | | * @param pageBigScreenStatisticPartyOrg |
| | | * @return |
| | | */ |
| | | R partyActivityTop(PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg); |
| | | |
| | | /** |
| | | * 服务数据 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R serviceData(Long communityId); |
| | | |
| | | /** |
| | | * 服务用户 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R serviceUser(Long communityId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | | * @title: BigScreenStatisticsService |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 大屏统计服务类 |
| | | * @author: hans |
| | | * @date: 2021/12/06 9:56 |
| | | */ |
| | | public interface BigScreenStatisticsService { |
| | | |
| | | /** |
| | | * 大数据分析平台-居民自治 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R getResidentAutonomy(Long communityId); |
| | | |
| | | /** |
| | | * 大数据分析平台-清网治格 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R getGridsGovernance(Long communityId); |
| | | |
| | | /** |
| | | * 大数据分析平台-社区服务 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R getCommunityServiceStatistics(Long communityId); |
| | | |
| | | /** |
| | | * 分页获取热度排行商家 |
| | | * @param pagePopularMerchantDTO |
| | | * @return |
| | | */ |
| | | R getScreenPopularMerchants(PagePopularMerchantDTO pagePopularMerchantDTO); |
| | | |
| | | /** |
| | | * 首页二级页面-微心愿 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R indexMicroWish(Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-随手拍 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R indexEasyPhoto(Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-随手拍展示列表 |
| | | * @return |
| | | */ |
| | | R indexEasyPhotoList(PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 首页二级页面-社区问卷 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R indexQuestionnaire(Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-社区动态 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R indexDyn(Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-社区动态展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | R indexDynList(PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 首页二级页面-邻里圈 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R indexNeighbor(Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-邻里圈展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | R indexNeighborList(PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 首页二级页面-便民商家 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R indexMerchant(Long communityId); |
| | | |
| | | /** |
| | | * 首页二级页面-商家展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | R indexMerchantList(PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 首页二级页面-微心愿展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | R indexMicroWishList(PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 首页二级页面-社区问卷展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | R indexQuestionnaireList(PageBaseDTO pageBaseDTO); |
| | | } |
| | |
| | | * @return 当前用户对所有活动的评价列表 |
| | | */ |
| | | R listEvaluate(Long userId); |
| | | |
| | | /** |
| | | * 我的评价 |
| | | * @param userId |
| | | * @param activityId |
| | | * @return |
| | | */ |
| | | R listMyActivityEvaluate(Long userId, Long activityId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.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_community.entity.ComActActivityCode; |
| | | |
| | | /** |
| | | * 签到二维码表(ComActActivityCode)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-15 15:23:09 |
| | | */ |
| | | public interface ComActActivityCodeService extends IService<ComActActivityCode> { |
| | | R pageList(CommonPage commonPage); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.service_community.model.dos.ComActActivityDO; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @param status |
| | | * @return 活动列表 |
| | | */ |
| | | R listActivity(Long userId); |
| | | R listActivity(Long userId, Integer status); |
| | | |
| | | /** |
| | | * 查询志愿者参与的所有已经完成的活动 |
| | |
| | | * @return 用户签到列表 |
| | | */ |
| | | R listSignInActivity(Long userId); |
| | | |
| | | /** |
| | | * 获取活动报名签到记录 |
| | | * @param id 活动主键id |
| | | * @return |
| | | */ |
| | | R listSignInRecord(Long id); |
| | | |
| | | /** |
| | | * 活动签到记录 |
| | | * @param id 活动主键 |
| | | * @param userId 用户id |
| | | * @return |
| | | */ |
| | | R listRegistRecord(Long id, Long userId); |
| | | |
| | | /** |
| | | * 获取活动类型(目前只有志愿者活动需要获取) |
| | | * @param communityId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | R listActivityType(Long communityId, Integer type); |
| | | |
| | | /** |
| | | * 添加活动类型 |
| | | * @param comActActivityTypeVO |
| | | * @return |
| | | */ |
| | | R addActivityType(ComActActivityTypeVO comActActivityTypeVO); |
| | | } |
| | |
| | | R getIntegralCommunityRankApplets(ComActIntegralCommunityRankDTO communityRankDTO); |
| | | |
| | | /** |
| | | * 根据社区活动id查询社区活动报名人员列表 |
| | | * 根据社区活动id查询社区活动报名且未参与人员列表 |
| | | * |
| | | * @param activityId |
| | | * 活动id |
| | | * @return 社区活动报名人员列表 |
| | | * @return 社区活动报名且未参与人员列表 |
| | | */ |
| | | R getTaskActivityPeopleList(Long activityId); |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | | * @title: ComActPictureLibraryService |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 公共预设图库服务类 |
| | | * @author: hans |
| | | * @date: 2021/11/23 17:01 |
| | | */ |
| | | public interface ComActPictureLibraryService { |
| | | |
| | | /** |
| | | * 获取预设图库 |
| | | * @param type |
| | | * @param subtype |
| | | * @return |
| | | */ |
| | | R getPresetPictureLibrary(Integer type, Integer subtype); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | R exportHomeQuarantine(PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | |
| | | /** |
| | | * 大屏数据统计 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R bigScreenStaticsReserve(Long communityId); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.PageUserReserveDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveCommitVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.IndexReserve; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveDO; |
| | | |
| | | /** |
| | |
| | | */ |
| | | R reserveListApplets(Long communityId); |
| | | |
| | | /** |
| | | * 返攀登记居家隔离大屏数据 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | IndexReserve indexReserve(Long communityId); |
| | | |
| | | } |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | R communitySwitchSearchDistanceList(SearchCommunityDTO communityDTO); |
| | | |
| | | R getCommunityPassword(Long communityId); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | R specialInputUserExport(PageInputUserDTO PageInputUserDTO); |
| | | |
| | | /** |
| | | * 西区大屏治理数据 |
| | | * @return |
| | | */ |
| | | R westScreenStatics(); |
| | | |
| | | R getComprehensivePopulationStatics(Long streetId); |
| | | |
| | | R getComprehensiveStreetList(); |
| | | |
| | | /** |
| | | * 新版大屏首页 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R indexInfo(Long communityId); |
| | | } |
| | |
| | | */ |
| | | R getGridVillageList(ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | |
| | | R getGridVillageListApp(ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | /** |
| | | * 小区下楼栋列表 |
| | | * |
| | |
| | | |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComPbMemberDAO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | public class BigScreenServiceImpl implements BigScreenService { |
| | | @Resource |
| | | private BigScreenDAO bigScreenDAO; |
| | | @Resource |
| | | private ComPbMemberDAO comPbMemberDAO; |
| | | |
| | | @Override |
| | | public R partyOrgMembers(PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg) { |
| | |
| | | return R.ok(listR); |
| | | } |
| | | |
| | | @Override |
| | | public R partyActivityLine(Long communityId) { |
| | | List<BigScreenActivityLine> bigScreenActivityLines=this.getPoints(); |
| | | bigScreenActivityLines.forEach(bigScreenActivityLine -> { |
| | | BigScreenActivityLine bigScreenActivityLine1=comPbMemberDAO.selectActivityCountMonth(communityId,bigScreenActivityLine.getX()); |
| | | bigScreenActivityLine.setY(bigScreenActivityLine1.getY()); |
| | | bigScreenActivityLine.setCountY(bigScreenActivityLine1.getCountY()); |
| | | }); |
| | | return R.ok(bigScreenActivityLines); |
| | | } |
| | | |
| | | @Override |
| | | public R partyActivityTop(PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg) { |
| | | return R.ok(this.comPbMemberDAO.selectActivityTop(new Page(pageBigScreenStatisticPartyOrg.getPageNum(),pageBigScreenStatisticPartyOrg.getPageSize()),pageBigScreenStatisticPartyOrg.getCommunityId())); |
| | | } |
| | | |
| | | @Override |
| | | public R serviceData(Long communityId) { |
| | | return R.ok(this.comPbMemberDAO.bigScreenServiceData(communityId)); |
| | | } |
| | | |
| | | @Override |
| | | public R serviceUser(Long communityId) { |
| | | return R.ok(this.comPbMemberDAO.bigScreenServiceUser(communityId)); |
| | | } |
| | | |
| | | public List<BigScreenActivityLine> getPoints(){ |
| | | List<BigScreenActivityLine> bigScreenActivityLines=new ArrayList<>(); |
| | | for(int i=1;i<=12;i++){ |
| | | String aDate=""; |
| | | if(i<10){ |
| | | aDate = "0"+i; |
| | | } |
| | | else { |
| | | aDate=i+""; |
| | | } |
| | | BigScreenActivityLine bigScreenActivityLine=new BigScreenActivityLine(); |
| | | bigScreenActivityLine.setX(aDate); |
| | | bigScreenActivityLines.add(bigScreenActivityLine); |
| | | } |
| | | return bigScreenActivityLines; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | 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.R; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenCommunityStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenDynStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenEasyPhotoStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenMerchantStatisticsInfo; |
| | | 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.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.ComActDiscussDAO; |
| | | import com.panzhihua.service_community.dao.ComActDynDAO; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoDAO; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishDAO; |
| | | import com.panzhihua.service_community.dao.ComActNeighborCircleDAO; |
| | | import com.panzhihua.service_community.dao.ComActQuestnaireDAO; |
| | | import com.panzhihua.service_community.dao.ComActWarehouseDonatesDao; |
| | | import com.panzhihua.service_community.dao.ComMngPopulationDAO; |
| | | import com.panzhihua.service_community.dao.ComPropertyDao; |
| | | import com.panzhihua.service_community.dao.ConvenientMerchantDAO; |
| | | import com.panzhihua.service_community.service.BigScreenStatisticsService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @title: BigScreenStatisticsServiceImpl |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 大屏统计服务实现类 |
| | | * @author: hans |
| | | * @date: 2021/12/06 9:56 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class BigScreenStatisticsServiceImpl implements BigScreenStatisticsService { |
| | | |
| | | private static final Integer pageSize = 100; |
| | | |
| | | @Resource |
| | | private ComActEasyPhotoDAO comActEasyPhotoDAO; |
| | | |
| | | @Resource |
| | | private ComActMicroWishDAO comActMicroWishDAO; |
| | | |
| | | @Resource |
| | | private ComActDiscussDAO comActDiscussDAO; |
| | | |
| | | @Resource |
| | | private ComActNeighborCircleDAO comActNeighborCircleDAO; |
| | | |
| | | @Resource |
| | | private ComPropertyDao comPropertyDao; |
| | | |
| | | @Resource |
| | | private ComActWarehouseDonatesDao comActWarehouseDonatesDao; |
| | | |
| | | @Resource |
| | | private ComMngPopulationDAO comMngPopulationDAO; |
| | | |
| | | @Resource |
| | | private ConvenientMerchantDAO convenientMerchantDAO; |
| | | |
| | | @Resource |
| | | private ComActQuestnaireDAO comActQuestnaireDAO; |
| | | |
| | | @Resource |
| | | private ComActDynDAO comActDynDAO; |
| | | |
| | | /** |
| | | * 大数据分析平台-居民自治 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getResidentAutonomy(Long communityId) { |
| | | ResidentAutonomyStatisticsVO statisticsVO = comActEasyPhotoDAO.selectResidentAutonomyStatistics(communityId); |
| | | if (isNull(statisticsVO)) { |
| | | statisticsVO = new ResidentAutonomyStatisticsVO(); |
| | | } |
| | | List<ComActEasyPhotoVO> easyPhotoVOList = 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(); |
| | | } |
| | | statisticsVO.setEasyPhotoTotalCount(easyPhotoTotalCount); |
| | | statisticsVO.setEasyPhotoHistogram(easyPhotoHistogram); |
| | | |
| | | //待实现&已实现数目及占比 |
| | | List<StatisticsCommVO> microWishRealizePercent = comActMicroWishDAO.selectRealizePercent(communityId); |
| | | statisticsVO.setMicroWishRealizePercent(microWishRealizePercent); |
| | | //微心愿图片 |
| | | List<String> microWishImages = comActMicroWishDAO.getPassedAllImages(communityId, 20); |
| | | statisticsVO.setMicroWishImages(microWishImages); |
| | | |
| | | //议事投票类型占比 |
| | | List<StatisticsCommVO> discussTypePercent = comActDiscussDAO.selectTypePercent(communityId); |
| | | statisticsVO.setDiscussTypePercent(discussTypePercent); |
| | | //议事标题 |
| | | List<String> discussTitles = comActDiscussDAO.getTitles(1, communityId, pageSize); |
| | | statisticsVO.setDiscussTitles(discussTitles); |
| | | //投票标题 |
| | | List<String> voteTitles = comActDiscussDAO.getTitles(2, communityId, pageSize); |
| | | statisticsVO.setVoteTitles(voteTitles); |
| | | |
| | | //邻里圈图片 |
| | | List<String> neighborImages = comActNeighborCircleDAO.getAllImages(communityId, 20); |
| | | statisticsVO.setNeighborImages(neighborImages); |
| | | //邻里圈文本内容 |
| | | List<String> neighborContents = comActNeighborCircleDAO.getContents(communityId, pageSize); |
| | | 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()); |
| | | temp.setFiled(e.getFiled()); |
| | | repairTotalPolylineData.add(temp); |
| | | }); |
| | | statisticsVO.setRepairTotalPolylineData(repairTotalPolylineData); |
| | | |
| | | //捐赠记录 |
| | | List<String> warehouseDonateRecords = comActWarehouseDonatesDao.getWarehouseDonateRecords(communityId, pageSize); |
| | | statisticsVO.setWarehouseDonateRecords(warehouseDonateRecords); |
| | | //爱心传递 |
| | | List<String> warehouseLoveTransfer = comActWarehouseDonatesDao.getWarehouseLoveTransfer(communityId, pageSize); |
| | | statisticsVO.setWarehouseLoveTransfer(warehouseLoveTransfer); |
| | | //捐赠图片 |
| | | List<String> warehouseImages = comActWarehouseDonatesDao.getWarehouseImages(communityId, 20); |
| | | statisticsVO.setWarehouseImages(warehouseImages); |
| | | return R.ok(statisticsVO); |
| | | } |
| | | |
| | | /** |
| | | * 大数据分析平台-清网治格 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getGridsGovernance(Long communityId) { |
| | | GridsGovernanceStatisticsVO statisticsVO = comActEasyPhotoDAO.selectGridsGovernance(communityId); |
| | | if (isNull(statisticsVO)) { |
| | | statisticsVO = new GridsGovernanceStatisticsVO(); |
| | | } |
| | | // 查询网格数据 |
| | | List<EventGridStatisticsVO> gridStatisticsList = comMngPopulationDAO.getEventScreenGridData(communityId); |
| | | statisticsVO.setGridStatisticsList(gridStatisticsList); |
| | | |
| | | // 查询小区列表 |
| | | List<CivilVillageStatisticsVO> villageStatisticsList = comMngPopulationDAO.getCivilScreenVillageList(communityId); |
| | | if (!villageStatisticsList.isEmpty()) { |
| | | villageStatisticsList.forEach(village -> { |
| | | CivilVillageStatisticsVO villageStatisticsVO = |
| | | comMngPopulationDAO.getCivilScreenVillageStatistics(village.getVillageId()); |
| | | if (villageStatisticsVO != null) { |
| | | village.setPeopleNum(villageStatisticsVO.getPeopleNum()); |
| | | village.setHouseNum(villageStatisticsVO.getHouseNum()); |
| | | village.setRegisterNum(villageStatisticsVO.getRegisterNum()); |
| | | village.setFlowNum(villageStatisticsVO.getFlowNum()); |
| | | // BeanUtils.copyProperties(villageStatisticsVO,village); |
| | | } |
| | | }); |
| | | } |
| | | 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()); |
| | | temp.setFiled(e.getFiled()); |
| | | eventTotalPolylineData.add(temp); |
| | | }); |
| | | statisticsVO.setEventTotalPolylineData(eventTotalPolylineData); |
| | | statisticsVO.generateStatisticsData(); |
| | | return R.ok(statisticsVO); |
| | | } |
| | | |
| | | /** |
| | | * 大数据分析平台-社区服务 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getCommunityServiceStatistics(Long communityId) { |
| | | BigScreenCommunityStatisticsVO statisticsVO = new BigScreenCommunityStatisticsVO(); |
| | | // 查询网格数据 |
| | | List<EventGridStatisticsVO> gridStatisticsList = comMngPopulationDAO.getEventScreenGridData(communityId); |
| | | statisticsVO.setGridStatisticsList(gridStatisticsList); |
| | | // 查询小区列表 |
| | | List<CivilVillageStatisticsVO> villageStatisticsList = comMngPopulationDAO.getCivilScreenVillageList(communityId); |
| | | if (!villageStatisticsList.isEmpty()) { |
| | | villageStatisticsList.forEach(village -> { |
| | | CivilVillageStatisticsVO villageStatisticsVO = |
| | | comMngPopulationDAO.getCivilScreenVillageStatistics(village.getVillageId()); |
| | | if (villageStatisticsVO != null) { |
| | | village.setPeopleNum(villageStatisticsVO.getPeopleNum()); |
| | | village.setHouseNum(villageStatisticsVO.getHouseNum()); |
| | | village.setRegisterNum(villageStatisticsVO.getRegisterNum()); |
| | | village.setFlowNum(villageStatisticsVO.getFlowNum()); |
| | | } |
| | | }); |
| | | } |
| | | statisticsVO.setVillageStatisticsList(villageStatisticsList); |
| | | //商家地图点位数据 |
| | | List<ConvenientMerchantVO> merchantVOList = convenientMerchantDAO.selectMerchantListByCommunity(communityId); |
| | | statisticsVO.setMerchantMapDataList(merchantVOList); |
| | | return R.ok(statisticsVO); |
| | | } |
| | | |
| | | /** |
| | | * 分页获取热度排行商家 |
| | | * @param pagePopularMerchantDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getScreenPopularMerchants(PagePopularMerchantDTO pagePopularMerchantDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pagePopularMerchantDTO.getPageSize()); |
| | | page.setCurrent(pagePopularMerchantDTO.getPageNum()); |
| | | List<ConvenientMerchantVO> popularMerchants = convenientMerchantDAO.getScreenPopularMerchants(page, pagePopularMerchantDTO); |
| | | return R.ok(popularMerchants); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-微心愿 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R indexMicroWish(Long communityId) { |
| | | BigScreenMicroWishStatisticsInfo statisticsInfo = comActMicroWishDAO.selectIndexMicroWishBaseData(communityId); |
| | | //微心愿新增折线数据 |
| | | 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()); |
| | | temp.setFiled(e.getFiled()); |
| | | microWishTotalPolylineData.add(temp); |
| | | }); |
| | | statisticsInfo.setMicroWishTotalPolylineData(microWishTotalPolylineData); |
| | | return R.ok(statisticsInfo); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-随手拍 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R indexEasyPhoto(Long communityId) { |
| | | BigScreenEasyPhotoStatisticsInfo statisticsInfo = comActEasyPhotoDAO.selectIndexEasyPhotoBaseData(communityId); |
| | | //随手拍新增折线数据 |
| | | 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()); |
| | | temp.setFiled(e.getFiled()); |
| | | easyPhotoTotalPolylineData.add(temp); |
| | | }); |
| | | statisticsInfo.setEasyPhotoTotalPolylineData(easyPhotoTotalPolylineData); |
| | | return R.ok(statisticsInfo); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-随手拍展示列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R indexEasyPhotoList(PageBaseDTO pageBaseDTO) { |
| | | Page page = retrievePage(pageBaseDTO); |
| | | return R.ok(comActEasyPhotoDAO.indexEasyPhotoList(page, pageBaseDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-社区问卷 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @Override |
| | | 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()); |
| | | temp.setFiled(e.getFiled()); |
| | | questionnaireTotalPolylineData.add(temp); |
| | | }); |
| | | statisticsInfo.setQuestionnaireTotalPolylineData(questionnaireTotalPolylineData); |
| | | return R.ok(statisticsInfo); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-社区动态 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R indexDyn(Long communityId) { |
| | | BigScreenDynStatisticsInfo statisticsInfo = new BigScreenDynStatisticsInfo(); |
| | | List<StatisticsCommVO> dynCircleData = comActDynDAO.getIndexDynBaseData(communityId); |
| | | statisticsInfo.setDynCircleData(dynCircleData); |
| | | if (!dynCircleData.isEmpty()) { |
| | | 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()); |
| | | temp.setFiled(e.getFiled()); |
| | | dynTotalPolylineData.add(temp); |
| | | }); |
| | | statisticsInfo.setDynTotalPolylineData(dynTotalPolylineData); |
| | | return R.ok(statisticsInfo); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-社区动态展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R indexDynList(PageBaseDTO pageBaseDTO) { |
| | | Page page = retrievePage(pageBaseDTO); |
| | | return R.ok(comActDynDAO.indexDynList(page, pageBaseDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-邻里圈 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R indexNeighbor(Long communityId) { |
| | | BigScreenNeighborStatisticsInfo statisticsInfo = new BigScreenNeighborStatisticsInfo(); |
| | | List<StatisticsCommVO> neighborCircleData = comActNeighborCircleDAO.getIndexNeighborBaseData(communityId); |
| | | statisticsInfo.setNeighborCircleData(neighborCircleData); |
| | | if (!neighborCircleData.isEmpty()) { |
| | | statisticsInfo.setPublishContentNum(neighborCircleData.stream().map(StatisticsCommVO::getNum).mapToInt(Integer::intValue).sum()); |
| | | 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()); |
| | | temp.setFiled(e.getFiled()); |
| | | neighborTotalPolylineData.add(temp); |
| | | }); |
| | | statisticsInfo.setNeighborTotalPolylineData(neighborTotalPolylineData); |
| | | return R.ok(statisticsInfo); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-邻里圈展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R indexNeighborList(PageBaseDTO pageBaseDTO) { |
| | | Page page = retrievePage(pageBaseDTO); |
| | | return R.ok(comActNeighborCircleDAO.indexNeighborList(page, pageBaseDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-便民商家 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R indexMerchant(Long communityId) { |
| | | BigScreenMerchantStatisticsInfo statisticsInfo = convenientMerchantDAO.getIndexMerchantBaseData(communityId); |
| | | //资源类型饼图数据(暂无) |
| | | // List<StatisticsCommVO> resourceTypeCircleData; |
| | | //服务类型饼图数据 |
| | | List<StatisticsCommVO> serviceTypeCircleData = convenientMerchantDAO.selectServiceTypeCircleData(communityId); |
| | | statisticsInfo.setServiceTypeCircleData(serviceTypeCircleData); |
| | | if (!serviceTypeCircleData.isEmpty()) { |
| | | //服务类型数 |
| | | 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()); |
| | | temp.setFiled(e.getFiled()); |
| | | serviceTimesTotalPolylineData.add(temp); |
| | | }); |
| | | statisticsInfo.setServiceTimesTotalPolylineData(serviceTimesTotalPolylineData); |
| | | return R.ok(statisticsInfo); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-商家展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R indexMerchantList(PageBaseDTO pageBaseDTO) { |
| | | Page page = retrievePage(pageBaseDTO); |
| | | return R.ok(convenientMerchantDAO.indexMerchantList(page, pageBaseDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-微心愿展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R indexMicroWishList(PageBaseDTO pageBaseDTO) { |
| | | Page page = retrievePage(pageBaseDTO); |
| | | return R.ok(comActMicroWishDAO.selectScreenDisplayList(page, pageBaseDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 首页二级页面-社区问卷展示列表 |
| | | * @param pageBaseDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R indexQuestionnaireList(PageBaseDTO pageBaseDTO) { |
| | | Page page = retrievePage(pageBaseDTO); |
| | | return R.ok(comActQuestnaireDAO.selectQuestionnaireDisplayList(page, pageBaseDTO)); |
| | | } |
| | | |
| | | private Page retrievePage(PageBaseDTO pageBaseDTO) { |
| | | Long pageNum = pageBaseDTO.getPageNum(); |
| | | Long size = pageBaseDTO.getPageSize(); |
| | | Page page = new Page<>(); |
| | | if (nonNull(pageNum) && nonNull(size)) { |
| | | page.setCurrent(pageNum); |
| | | page.setSize(size); |
| | | } else { |
| | | page.setCurrent(1); |
| | | page.setSize(pageSize); |
| | | } |
| | | return page; |
| | | } |
| | | } |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.MyActivityEvaluateVO; |
| | | import com.panzhihua.service_community.dao.ComActActEvaluateDAO; |
| | | import com.panzhihua.service_community.dao.ComActActRegistDAO; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | |
| | | //需要签到类型 |
| | | int registCount = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>() |
| | | .lambda().eq(ComActActRegistDO::getUserId, userId).eq(ComActActRegistDO::getActivityId, activityId)); |
| | | if (registCount <= 0) { |
| | | int evaluateCount = this.baseMapper.selectCount(new QueryWrapper<ComActActEvaluateDO>().lambda() |
| | | .eq(ComActActEvaluateDO::getUserId, userId).eq(ComActActEvaluateDO::getActivityId, activityId)); |
| | | if (registCount <= evaluateCount) { |
| | | //未签到,不能评价 |
| | | return R.fail("未签到,不能评价"); |
| | | } |
| | |
| | | if (nowDate.before(beginAt)) { |
| | | return R.fail("活动还未开始,暂不支持评价"); |
| | | } |
| | | } |
| | | ComActActEvaluateDO currentUserEvaluateForThisActivity = this.baseMapper.selectOne(new QueryWrapper<ComActActEvaluateDO>() |
| | | .lambda().eq(ComActActEvaluateDO::getActivityId, activityId).eq(ComActActEvaluateDO::getUserId, userId)); |
| | | if (Objects.nonNull(currentUserEvaluateForThisActivity)) { |
| | | return R.fail("该用户已评论过了,请勿重复评论"); |
| | | } |
| | | ComActActEvaluateDO comActActEvaluateDO = new ComActActEvaluateDO(); |
| | | BeanUtils.copyProperties(comActActEvaluateVO, comActActEvaluateDO); |
| | |
| | | public R listEvaluate(Long userId) { |
| | | List<ComActActEvaluateDO> comActActEvaluateDOList = this.baseMapper.selectList(new QueryWrapper<ComActActEvaluateDO>() |
| | | .lambda().eq(ComActActEvaluateDO::getUserId, userId)); |
| | | ArrayList<ComActActEvaluateVO> comActActEvaluateVOS = new ArrayList<>(); |
| | | List<ComActActEvaluateVO> comActActEvaluateVOS = new ArrayList<>(); |
| | | if (!ObjectUtils.isEmpty(comActActEvaluateDOList)) { |
| | | comActActEvaluateDOList.forEach(comActActEvaluateDO -> { |
| | | ComActActEvaluateVO comActActEvaluateVO = new ComActActEvaluateVO(); |
| | |
| | | } |
| | | return R.ok(comActActEvaluateVOS); |
| | | } |
| | | |
| | | /** |
| | | * 我的评价 |
| | | * @param userId |
| | | * @param activityId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R listMyActivityEvaluate(Long userId, Long activityId) { |
| | | ComActActivityDO comActActivityDO = comActActivityDAO.selectById(activityId); |
| | | if (isNull(comActActivityDO)) { |
| | | return R.fail("活动不存在"); |
| | | } |
| | | List<ComActActEvaluateVO> comActActEvaluateVOS = this.baseMapper.selectEvaluateList(activityId, userId); |
| | | int regCount = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>() |
| | | .lambda().eq(ComActActRegistDO::getActivityId, activityId).eq(ComActActRegistDO::getUserId, userId)); |
| | | |
| | | MyActivityEvaluateVO evaluateVO = new MyActivityEvaluateVO(); |
| | | evaluateVO.setMyEvaluateList(comActActEvaluateVOS); |
| | | boolean needDisplay = regCount > comActActEvaluateVOS.size() && |
| | | new Date().before(DateUtils.addDays(comActActivityDO.getEndAt(), 3)); |
| | | evaluateVO.setIsDisplay(needDisplay ? 1 : 0); |
| | | return R.ok(evaluateVO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.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_community.entity.ComActActivityCode; |
| | | import com.panzhihua.service_community.dao.ComActActivityCodeDao; |
| | | import com.panzhihua.service_community.service.ComActActivityCodeService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 签到二维码表(ComActActivityCode)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-15 15:23:10 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActActivityCodeServiceImpl extends ServiceImpl<ComActActivityCodeDao, ComActActivityCode> implements ComActActivityCodeService { |
| | | |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return null; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | import static org.apache.commons.lang3.StringUtils.isBlank; |
| | | import static org.apache.commons.lang3.StringUtils.isNotBlank; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.text.DecimalFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.constants.HttpStatus; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.AddComActIntegralUserDTO; |
| | | import com.panzhihua.common.model.vos.IndexDataVO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActActPictureVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActRegistVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityTypeVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.CommunityActivitiesVO; |
| | | import com.panzhihua.common.model.vos.community.CommunityGovernanceTrendsVO; |
| | |
| | | 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; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | @Resource |
| | | private ComActActPictureDAO comActActPictureDAO; |
| | | @Resource |
| | | private ComActActivityCodeDao comActActivityCodeDao; |
| | | @Resource |
| | | private ComBpActivityDAO comBpActivityDAO; |
| | | @Resource |
| | | private ComActIntegralUserTradeService comActIntegralUserTradeService; |
| | | @Resource |
| | | private ComActActivityCodeService comActActivityCodeService; |
| | | |
| | | /** |
| | | * 新增社区活动 |
| | |
| | | */ |
| | | @Override |
| | | public R addActivity(ComActActivityVO comActActivityVO) { |
| | | if (comActActivityVO.getHaveIntegralReward().intValue() == 2) { |
| | | comActActivityVO.setRewardWay(null); |
| | | } |
| | | ComActActivityDO comActActivityDO = new ComActActivityDO(); |
| | | BeanUtils.copyProperties(comActActivityVO, comActActivityDO); |
| | | Integer status = comActActivityVO.getStatus(); |
| | |
| | | comActActPictureDO.setUploadPicture(comActActivityVO.getCover()); |
| | | comActActPictureDO.setSysFlag(0); |
| | | comActActPictureDAO.insert(comActActPictureDO); |
| | | |
| | | ComActActivityCode comActActivityCode = new ComActActivityCode(); |
| | | comActActivityCode.setActivityId(comActActivityDO.getId().longValue()); |
| | | comActActivityCode.setCreateTime(new Date()); |
| | | comActActivityCode.setType(1); |
| | | comActActivityCode.setStatus(1); |
| | | comActActivityCodeService.save(comActActivityCode); |
| | | return R.ok(activityId); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | if (comActActivityVO.getHaveIntegralReward().intValue() == 2) { |
| | | comActActivityVO.setRewardWay(null); |
| | | } |
| | | BeanUtils.copyProperties(comActActivityVO, comActActivityDO); |
| | | |
| | | // 结束时间大于当前时间则设置为“进行中” |
| | | Date now = new Date(); |
| | | if (comActActivityVO.getSignUpEnd() != null && now.getTime() < comActActivityVO.getSignUpEnd().getTime()) { |
| | | if (comActActivityVO.getSignUpEnd() != null && now.getTime() < comActActivityVO.getSignUpEnd().getTime() |
| | | && now.getTime() > comActActivityVO.getSignUpBegin().getTime()) { |
| | | comActActivityDO.setStatus(3); |
| | | } |
| | | boolean b = this.updateById(comActActivityDO); |
| | |
| | | */ |
| | | @Override |
| | | public R cancelActivity(ComActActivityVO comActActivityVO) { |
| | | ComActActivityDO comActActivityDO = new ComActActivityDO(); |
| | | comActActivityDO.setId(comActActivityVO.getId()); |
| | | ComActActivityDO comActActivityDO = comActActivityDAO.selectById(comActActivityVO.getId()); |
| | | comActActivityDO.setStatus(comActActivityVO.getStatus()); |
| | | comActActivityDO.setCancelReason(comActActivityVO.getCancelReason()); |
| | | int update = comActActivityDAO.updateById(comActActivityDO); |
| | |
| | | LambdaQueryWrapper<ComActActSignDO> actSignQuery = new LambdaQueryWrapper<>(); |
| | | actSignQuery.eq(ComActActSignDO::getActivityId, id); |
| | | actSignQuery.eq(ComActActSignDO::getUserId, userId); |
| | | actSignQuery.eq(ComActActSignDO::getStatus, 1); |
| | | ComActActSignDO comActActSignDO = comActActSignDAO.selectOne(actSignQuery); |
| | | if (!ObjectUtils.isEmpty(comActActSignDO)) { |
| | | comActActivityVO.setIsSign(1); |
| | | comActActivityVO.setIsVolunteer(comActActSignDO.getIsVolunteer()); |
| | | } |
| | | List<ComActActRegistDO> regList = comActActRegistDAO.selectList(new QueryWrapper<ComActActRegistDO>().lambda() |
| | | .eq(ComActActRegistDO::getUserId, userId).eq(ComActActRegistDO::getActivityId, id).eq(ComActActRegistDO::getType, 1)); |
| | | if (!regList.isEmpty()) { |
| | | List<ComActActRegistDO> collect = regList.stream().sorted(Comparator.comparing(ComActActRegistDO::getId).reversed()).collect(Collectors.toList()); |
| | | comActActivityVO.setTimes(collect.get(0).getTimes()); |
| | | } |
| | | } |
| | | } |
| | | comActActivityVO.setCodeType(1); |
| | | return comActActivityVO; |
| | | } |
| | | |
| | |
| | | Long activityId = signactivityVO.getActivityId(); |
| | | Integer type = signactivityVO.getType(); |
| | | Long userId = signactivityVO.getUserId(); |
| | | Integer isVolunteer = signactivityVO.getIsVolunteer(); |
| | | Integer isVolunteer = 0; |
| | | // 查询社区活动 |
| | | ComActActivityDO actActivityDO = this.baseMapper.selectById(activityId); |
| | | if (isNull(actActivityDO)) { |
| | | return R.fail("活动不存在"); |
| | | } |
| | | int num = 0; |
| | | ComActActSignDO comActActSignDO = comActActSignDAO.selectOne(new QueryWrapper<ComActActSignDO>() |
| | | .lambda().eq(ComActActSignDO::getActivityId, activityId).eq(ComActActSignDO::getUserId, userId)); |
| | | if (1 == type) { |
| | | if (nonNull(comActActSignDO) && comActActSignDO.getStatus().equals(1)) { |
| | | return R.fail("已经报名过了,请勿重复提交"); |
| | | } |
| | | Integer volunteerMax = actActivityDO.getVolunteerMax(); |
| | | Integer residentMax = actActivityDO.getParticipantMax(); |
| | | R<LoginUserInfoVO> userInfoR = userService.getUserInfoByUserId(String.valueOf(userId)); |
| | | LoginUserInfoVO loginUserInfoVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(userInfoR.getData()), LoginUserInfoVO.class); |
| | | boolean userNotVolunteer = !(loginUserInfoVO.getIsVolunteer() == 1); |
| | | if (isVolunteer == 1 && userNotVolunteer) { |
| | | return R.fail("只有志愿者才能报名"); |
| | | } |
| | | |
| | | // 查询当前活动下参与志愿者/居民数量 |
| | | Integer count = comActActSignDAO.selectCount(new QueryWrapper<ComActActSignDO>().lambda() |
| | | .eq(ComActActSignDO::getActivityId, activityId).eq(ComActActSignDO::getIsVolunteer, isVolunteer)); |
| | | if (isVolunteer.equals(1) && actActivityDO.getVolunteerMax() <= count |
| | | && !actActivityDO.getVolunteerMax().equals(-1)) { |
| | | return R.fail("志愿者报名人数已满"); |
| | | } |
| | | |
| | | //审查用户是否有该活动报名权限(是否活动指定参与人群) |
| | | String currentUserTags = loginUserInfoVO.getTags(); |
| | | String attendPeople = actActivityDO.getAattendPeople(); |
| | | if (isVolunteer.intValue() == 0 && isNotBlank(attendPeople)) { |
| | | if (isBlank(currentUserTags)) { |
| | | currentUserTags = "全部居民"; |
| | | JSONObject.parseObject(JSONObject.toJSONString(userInfoR.getData()), LoginUserInfoVO.class); |
| | | // 查询当前活动下参与居民 |
| | | Integer residentCount = comActActSignDAO.selectCount(new QueryWrapper<ComActActSignDO>().lambda() |
| | | .eq(ComActActSignDO::getActivityId, activityId).eq(ComActActSignDO::getIsVolunteer, 0).eq(ComActActSignDO::getStatus, 1)); |
| | | if (volunteerMax != 0) { |
| | | //志愿者活动 |
| | | boolean userIsVolunteer = loginUserInfoVO.getIsVolunteer() == 1; |
| | | // 查询当前活动下参与志愿者 |
| | | Integer volunteerCount = comActActSignDAO.selectCount(new QueryWrapper<ComActActSignDO>().lambda() |
| | | .eq(ComActActSignDO::getActivityId, activityId).eq(ComActActSignDO::getIsVolunteer, 1).eq(ComActActSignDO::getStatus, 1)); |
| | | if (userIsVolunteer) { |
| | | //用户是志愿者以志愿者身份参加 |
| | | if (volunteerMax > volunteerCount || volunteerMax.equals(-1)) { |
| | | //以志愿者身份报名 |
| | | isVolunteer = 1; |
| | | } else if (nonNull(residentMax) && (residentMax > residentCount || residentMax.equals(-1))) { |
| | | //志愿者报名人数已满,再以居民身份报名参加 |
| | | isVolunteer = 0; |
| | | } else { |
| | | return R.fail("报名人数已满"); |
| | | } |
| | | } else { |
| | | currentUserTags = currentUserTags.concat(",全部居民"); |
| | | //用户是普通居民已居民身份参加 |
| | | if (nonNull(residentMax) && (residentMax > residentCount || residentMax.equals(-1))) { |
| | | //以居民身份报名参加 |
| | | isVolunteer = 0; |
| | | } else if (volunteerMax > volunteerCount || volunteerMax.equals(-1)) { |
| | | return R.fail(HttpStatus.NOT_ACCEPTABLE, "您还不是志愿者哦~"); |
| | | } else { |
| | | return R.fail("报名人数已满"); |
| | | } |
| | | } |
| | | List<String> currentUserTagList = Arrays.asList(currentUserTags.split(",")); |
| | | boolean checkResult = currentUserTagList.stream().anyMatch(currentUserTag -> attendPeople.contains(currentUserTag)); |
| | | if (!checkResult) { |
| | | return R.fail("您不是指定参与人群!"); |
| | | } else { |
| | | //普通居民活动 |
| | | //审查用户是否有该活动报名权限(是否活动指定参与人群) |
| | | String currentUserTags = loginUserInfoVO.getTags(); |
| | | String attendPeople = actActivityDO.getAattendPeople(); |
| | | if (isNotBlank(attendPeople)) { |
| | | if (isBlank(currentUserTags)) { |
| | | currentUserTags = "全部居民"; |
| | | } else { |
| | | currentUserTags = currentUserTags.concat(",全部居民"); |
| | | } |
| | | List<String> currentUserTagList = Arrays.asList(currentUserTags.split(",")); |
| | | boolean checkResult = currentUserTagList.stream().anyMatch(currentUserTag -> attendPeople.contains(currentUserTag)); |
| | | if (!checkResult) { |
| | | return R.fail("您不是指定参与人群!"); |
| | | } |
| | | } |
| | | if (residentMax > residentCount || residentMax.equals(-1)) { |
| | | //用户参加居民活动 |
| | | isVolunteer = 0; |
| | | } else { |
| | | return R.fail("报名人数已满"); |
| | | } |
| | | } |
| | | |
| | | if (isVolunteer.equals(0) && actActivityDO.getParticipantMax() <= count |
| | | && !actActivityDO.getParticipantMax().equals(-1)) { |
| | | return R.fail("居民报名人数已满"); |
| | | } |
| | | |
| | | ComActActSignDO comActActSignDO = new ComActActSignDO(); |
| | | comActActSignDO.setActivityId(activityId); |
| | | comActActSignDO.setUserId(userId); |
| | | comActActSignDO.setIsVolunteer(isVolunteer); |
| | | try { |
| | | if (nonNull(comActActSignDO)) { |
| | | comActActSignDO.setStatus(1); |
| | | comActActSignDO.setCreateAt(new Date()); |
| | | comActActSignDO.setReason(null); |
| | | comActActSignDO.setIsVolunteer(isVolunteer); |
| | | num = comActActSignDAO.updateById(comActActSignDO); |
| | | } else { |
| | | comActActSignDO = new ComActActSignDO(); |
| | | comActActSignDO.setActivityId(activityId); |
| | | comActActSignDO.setUserId(userId); |
| | | comActActSignDO.setIsVolunteer(isVolunteer); |
| | | num = comActActSignDAO.insert(comActActSignDO); |
| | | } catch (Exception e) { |
| | | if (e.getMessage().contains("unique_activity_id_user_id")) { |
| | | return R.fail("已经报名过了,请勿重复提交"); |
| | | } |
| | | log.error(e.getMessage()); |
| | | } |
| | | } else { |
| | | num = comActActSignDAO |
| | | .delete(new QueryWrapper<ComActActSignDO>().lambda().eq(ComActActSignDO::getUserId, userId) |
| | | .eq(ComActActSignDO::getActivityId, activityId).eq(ComActActSignDO::getIsVolunteer, isVolunteer)); |
| | | Integer regTimes = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>().lambda() |
| | | .eq(ComActActRegistDO::getActivityId, activityId).eq(ComActActRegistDO::getUserId, userId).eq(ComActActRegistDO::getType, 1)); |
| | | Integer canCancel = actActivityDO.getCanCancel(); |
| | | if (nonNull(canCancel) && canCancel.equals(2)) { |
| | | return R.fail("该活动暂不支持取消"); |
| | | } |
| | | if (regTimes > 0) { |
| | | return R.fail("您已参与活动,不可取消"); |
| | | } |
| | | if (isNull(signactivityVO.getReason())) { |
| | | return R.fail("缺少取消原因"); |
| | | } |
| | | if (isNull(comActActSignDO)) { |
| | | return R.fail("未报名"); |
| | | } |
| | | comActActSignDO.setStatus(0); |
| | | comActActSignDO.setReason(signactivityVO.getReason()); |
| | | num = comActActSignDAO.updateById(comActActSignDO); |
| | | if (num > 0) { |
| | | AddComActIntegralUserDTO addComActIntegralUserDTO = new AddComActIntegralUserDTO(); |
| | | addComActIntegralUserDTO.setUserId(userId); |
| | | addComActIntegralUserDTO.setIntegralType(8); |
| | | addComActIntegralUserDTO.setActivityType(1); |
| | | addComActIntegralUserDTO.setIsVolunteer(comActActSignDO.getIsVolunteer()); |
| | | addComActIntegralUserDTO.setCommunityId(actActivityDO.getCommunityId()); |
| | | addComActIntegralUserDTO.setServiceId(activityId); |
| | | comActIntegralUserTradeService.addIntegralTradeAdmin(addComActIntegralUserDTO); |
| | | } |
| | | } |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | return R.ok(isVolunteer); |
| | | } |
| | | return R.fail(); |
| | | } |
| | |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @param status |
| | | * @return 活动列表 |
| | | */ |
| | | @Override |
| | | public R listActivity(Long userId) { |
| | | List<ComActActSignDO> comActActSignDOS = comActActSignDAO |
| | | .selectList(new QueryWrapper<ComActActSignDO>().lambda().eq(ComActActSignDO::getUserId, userId)); |
| | | if (ObjectUtils.isEmpty(comActActSignDOS)) { |
| | | public R listActivity(Long userId, Integer status) { |
| | | List<ActivitySignVO> activitySignVOList = comActActSignDAO.selectList(userId); |
| | | if (ObjectUtils.isEmpty(activitySignVOList)) { |
| | | return R.fail(); |
| | | } |
| | | List<Long> longs = comActActSignDOS.stream().map(comActActSignDO -> comActActSignDO.getActivityId()) |
| | | List<Long> longs = activitySignVOList.stream().map(activitySignVO -> activitySignVO.getActivityId()) |
| | | .collect(Collectors.toList()); |
| | | List<ComActActivityDO> comActActivityDOS = comActActivityDAO.selectBatchIds(longs); |
| | | List<ComActActivityVO> comActActivityVOS = new ArrayList<>(); |
| | | comActActivityDOS.forEach(comActActivityDO -> { |
| | | ComActActivityVO comActActivityVO = new ComActActivityVO(); |
| | | BeanUtils.copyProperties(comActActivityDO, comActActivityVO); |
| | | List<ComActActSignDO> collect = comActActSignDOS.stream() |
| | | .filter(comActActSignDO -> comActActSignDO.getActivityId().equals(comActActivityVO.getId())).limit(1) |
| | | .collect(Collectors.toList()); |
| | | ComActActSignDO comActActSignDO = collect.get(0); |
| | | Integer isVolunteer = comActActSignDO.getIsVolunteer(); |
| | | if (isVolunteer.intValue() == 1) { |
| | | comActActivityVO.setType(1); |
| | | } else { |
| | | comActActivityVO.setType(2); |
| | | if (nonNull(status)) { |
| | | if(status.equals(4)){ |
| | | comActActivityDOS = comActActivityDOS.stream() |
| | | .filter(activityDO -> activityDO.getStatus().equals(3)||activityDO.getStatus().equals(4)).collect(Collectors.toList()); |
| | | }else{ |
| | | comActActivityDOS = comActActivityDOS.stream() |
| | | .filter(activityDO -> activityDO.getStatus().equals(status)).collect(Collectors.toList()); |
| | | } |
| | | Integer status = comActActivityVO.getStatus(); |
| | | if (status.intValue() == 3) { |
| | | comActActivityVO.setStatus(4); |
| | | } |
| | | comActActivityVO.setSingDate(comActActSignDOS.stream() |
| | | .filter(comActActSignDO1 -> comActActSignDO1.getActivityId().equals(comActActivityVO.getId())) |
| | | .collect(Collectors.toList()).get(0).getCreateAt()); |
| | | comActActivityVOS.add(comActActivityVO); |
| | | }); |
| | | } |
| | | if (!comActActivityDOS.isEmpty()) { |
| | | comActActivityDOS.forEach(comActActivityDO -> { |
| | | ComActActivityVO comActActivityVO = new ComActActivityVO(); |
| | | BeanUtils.copyProperties(comActActivityDO, comActActivityVO); |
| | | List<ActivitySignVO> collect = activitySignVOList.stream() |
| | | .filter(activitySignVO -> activitySignVO.getActivityId().equals(comActActivityVO.getId())).limit(1) |
| | | .collect(Collectors.toList()); |
| | | ActivitySignVO activitySignVO = collect.get(0); |
| | | Integer isVolunteer = activitySignVO.getIsVolunteer(); |
| | | if (isVolunteer.intValue() == 1) { |
| | | comActActivityVO.setType(1); |
| | | } else { |
| | | comActActivityVO.setType(2); |
| | | } |
| | | Integer activityStatus = comActActivityVO.getStatus(); |
| | | if (activityStatus.intValue() == 3) { |
| | | comActActivityVO.setStatus(4); |
| | | } |
| | | Date createAt = null; |
| | | try { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | createAt = simpleDateFormat.parse(activitySignVO.getCreateAt()); |
| | | } catch (ParseException e) { |
| | | log.error("时间转换异常【{}】", e.getMessage()); |
| | | } |
| | | comActActivityVO.setSingDate(createAt); |
| | | comActActivityVO.setTimes(activitySignVO.getTimes()); |
| | | Integer totalAward = comActActRegistDAO.selectTotalAwardWithRegist(activitySignVO.getActivityId(), userId); |
| | | comActActivityVO.setAward(totalAward); |
| | | comActActivityVOS.add(comActActivityVO); |
| | | }); |
| | | } |
| | | return R.ok(comActActivityVOS); |
| | | } |
| | | |
| | |
| | | if (isNull(activityId)) { |
| | | return R.fail("签到所属活动id不能为空!"); |
| | | } |
| | | ComActActivityDO comActActivityDO = comActActivityDAO.selectById(activityId); |
| | | if (isNull(comActActivityDO)) { |
| | | return R.fail("活动不存在!"); |
| | | } |
| | | if(comActActRegistVO.getActivityType()==1){ |
| | | ComActActivityDO comActActivityDO = comActActivityDAO.selectById(activityId); |
| | | if (isNull(comActActivityDO)) { |
| | | return R.fail("活动不存在!"); |
| | | } |
| | | |
| | | Date beginAt = comActActivityDO.getBeginAt(); |
| | | Date endAt = comActActivityDO.getEndAt(); |
| | | Date nowDate = new Date(); |
| | | if (nowDate.before(beginAt) || nowDate.after(endAt)) { |
| | | return R.fail("不在活动时间范围内"); |
| | | } |
| | | ComActActSignDO comActActSignDO = comActActSignDAO.selectOne(new QueryWrapper<ComActActSignDO>().lambda() |
| | | .eq(ComActActSignDO::getActivityId, activityId).eq(ComActActSignDO::getUserId, userId).eq(ComActActSignDO::getStatus, 1)); |
| | | if (isNull(comActActSignDO)) { |
| | | return R.fail("活动未报名"); |
| | | } |
| | | |
| | | int signCount = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>() |
| | | .lambda().eq(ComActActRegistDO::getActivityId, activityId).eq(ComActActRegistDO::getUserId, userId)); |
| | | Date beginAt = comActActivityDO.getBeginAt(); |
| | | Date endAt = comActActivityDO.getEndAt(); |
| | | Date nowDate = new Date(); |
| | | if (nowDate.before(beginAt) || nowDate.after(endAt)) { |
| | | return R.fail("不在活动时间范围内"); |
| | | } |
| | | |
| | | if (signCount > 0) { |
| | | return R.fail("请勿重复签到"); |
| | | } |
| | | int signDayCount = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>() |
| | | .lambda().eq(ComActActRegistDO::getActivityId, activityId).eq(ComActActRegistDO::getUserId, userId).eq(ComActActRegistDO::getCodeId,comActActRegistVO.getCodeId())); |
| | | int signAllCount = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>() |
| | | .lambda().eq(ComActActRegistDO::getActivityId, activityId).eq(ComActActRegistDO::getUserId, userId)); |
| | | if (signDayCount > 0) { |
| | | return R.fail("请扫描新的签到码"); |
| | | } |
| | | Integer haveIntegralReward = comActActivityDO.getHaveIntegralReward(); |
| | | boolean isHave = nonNull(haveIntegralReward) && haveIntegralReward.equals(1); |
| | | if (isHave) { |
| | | int limit = comActActivityDO.getLimit().intValue(); |
| | | if(limit != -1 && signAllCount >= limit){ |
| | | return R.fail("签到次数上限"); |
| | | } |
| | | } |
| | | |
| | | // String activitySignInKey = String.join(DELIMITER, ACTIVITY_SIGN_IN, userId.toString(), activityId.toString()); |
| | | // if (stringRedisTemplate.hasKey(activitySignInKey)) { |
| | | // return R.fail("你已签到,如要再次签到请三十分钟后尝试!"); |
| | | // } |
| | | ComActActRegistDO comActActRegistDO = new ComActActRegistDO(); |
| | | comActActRegistDO.setActivityId(activityId); |
| | | comActActRegistDO.setUserId(userId); |
| | | comActActRegistDO.setIsVolunteer(comActActRegistVO.getIsVolunteer()); |
| | | comActActRegistDO.setCreateAt(nowDate); |
| | | int result = comActActRegistDAO.insert(comActActRegistDO); |
| | | if (result > 0) { |
| | | // ValueOperations<String, String> opsForValue = stringRedisTemplate.opsForValue(); |
| | | // opsForValue.set(activitySignInKey, "", 1800L, TimeUnit.SECONDS); |
| | | return R.ok(); |
| | | ComActActRegistDO comActActRegistDO = new ComActActRegistDO(); |
| | | comActActRegistDO.setActivityId(activityId); |
| | | comActActRegistDO.setType(1); |
| | | comActActRegistDO.setUserId(userId); |
| | | comActActRegistDO.setIsVolunteer(comActActSignDO.getIsVolunteer()); |
| | | comActActRegistDO.setCreateAt(nowDate); |
| | | comActActRegistDO.setCodeId(comActActRegistVO.getCodeId()); |
| | | comActActRegistDO.setAward(isHave ? comActActivityDO.getRewardIntegral() : 0); |
| | | comActActRegistDO.setPosition(comActActRegistVO.getPosition()); |
| | | comActActRegistDO.setTimes(signAllCount+1); |
| | | int result = comActActRegistDAO.insert(comActActRegistDO); |
| | | if (result > 0) { |
| | | if (isHave) { |
| | | boolean isVolunteerAct = comActActivityDO.getVolunteerMax() != 0; |
| | | AddComActIntegralUserDTO addComActIntegralUserDTO=new AddComActIntegralUserDTO(); |
| | | addComActIntegralUserDTO.setUserId(userId); |
| | | addComActIntegralUserDTO.setIntegralType(isVolunteerAct ? 5 : 4); |
| | | addComActIntegralUserDTO.setActivityType(1); |
| | | addComActIntegralUserDTO.setIsVolunteer(comActActSignDO.getIsVolunteer()); |
| | | addComActIntegralUserDTO.setCommunityId(comActActivityDO.getCommunityId()); |
| | | addComActIntegralUserDTO.setServiceId(activityId); |
| | | comActIntegralUserTradeService.addIntegralTradeAdmin(addComActIntegralUserDTO); |
| | | return R.ok(comActActivityDO.getRewardIntegral()); |
| | | } else { |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail("网络错误,请重试"); |
| | | } |
| | | // else { |
| | | // ComPbActivityDO comPbActivityDO=comBpActivityDAO.selectById(activityId); |
| | | // if (isNull(comPbActivityDO)) { |
| | | // return R.fail("活动不存在!"); |
| | | // } |
| | | // |
| | | // Date beginAt = comPbActivityDO.getActivityTimeBegin(); |
| | | // Date endAt = comPbActivityDO.getActivityTimeEnd(); |
| | | // Date nowDate = new Date(); |
| | | // if (nowDate.before(beginAt) || nowDate.after(endAt)) { |
| | | // return R.fail("不在活动时间范围内"); |
| | | // } |
| | | // |
| | | // int signDayCount = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>() |
| | | // .lambda().eq(ComActActRegistDO::getActivityId, activityId).eq(ComActActRegistDO::getUserId, userId).eq(ComActActRegistDO::getCodeId,comActActRegistVO.getCodeId())); |
| | | // int signAllCount = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>() |
| | | // .lambda().eq(ComActActRegistDO::getActivityId, activityId).eq(ComActActRegistDO::getUserId, userId)); |
| | | // if (signDayCount >= 0) { |
| | | // return R.fail("请扫描新的签到码"); |
| | | // } |
| | | // int limit = comPbActivityDO.getLimit().intValue(); |
| | | // if(limit != -1 && signAllCount >= limit){ |
| | | // return R.fail("签到次数上限"); |
| | | // } |
| | | // |
| | | // ComActActRegistDO comActActRegistDO = new ComActActRegistDO(); |
| | | // comActActRegistDO.setActivityId(activityId); |
| | | // comActActRegistDO.setType(2); |
| | | // comActActRegistDO.setUserId(userId); |
| | | // comActActRegistDO.setIsVolunteer(comActActRegistVO.getIsVolunteer()); |
| | | // comActActRegistDO.setCreateAt(nowDate); |
| | | // comActActRegistDO.setCodeId(comActActRegistVO.getCodeId()); |
| | | // comActActRegistDO.setAward(comPbActivityDO.getRewardIntegral()); |
| | | // comActActRegistDO.setPosition(comActActRegistVO.getPosition()); |
| | | // comActActRegistDO.setTimes(signAllCount+1); |
| | | // int result = comActActRegistDAO.insert(comActActRegistDO); |
| | | // if (result > 0) { |
| | | // AddComActIntegralUserDTO addComActIntegralUserDTO=new AddComActIntegralUserDTO(); |
| | | // addComActIntegralUserDTO.setUserId(userId); |
| | | // addComActIntegralUserDTO.setIntegralType(8); |
| | | // addComActIntegralUserDTO.setActivityType(2); |
| | | // addComActIntegralUserDTO.setCommunityId(comPbActivityDO.getCommunityId()); |
| | | // addComActIntegralUserDTO.setServiceId(activityId); |
| | | // comActIntegralUserTradeService.addIntegralTradeAdmin(addComActIntegralUserDTO); |
| | | //// ValueOperations<String, String> opsForValue = stringRedisTemplate.opsForValue(); |
| | | //// opsForValue.set(activitySignInKey, "", 1800L, TimeUnit.SECONDS); |
| | | // return R.ok(); |
| | | // } |
| | | // return R.fail("网络错误,请重试"); |
| | | // } |
| | | |
| | | return R.fail("网络错误,请重试"); |
| | | } |
| | | |
| | |
| | | }); |
| | | return R.ok(comActActRegistVOS); |
| | | } |
| | | |
| | | /** |
| | | * 获取活动报名签到记录 |
| | | * @param id 活动主键id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R listSignInRecord(Long id) { |
| | | return R.ok(comActActSignDAO.listSignInRecord(id)); |
| | | } |
| | | |
| | | /** |
| | | * 活动签到记录 |
| | | * @param id 活动主键 |
| | | * @param userId 用户id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R listRegistRecord(Long id, Long userId) { |
| | | return R.ok(comActActRegistDAO.listRegistRecord(id, userId)); |
| | | } |
| | | |
| | | /** |
| | | * 获取活动类型(目前只有志愿者活动需要获取) |
| | | * @param communityId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R listActivityType(Long communityId, Integer type) { |
| | | return R.ok(this.baseMapper.listActivityType(communityId, type)); |
| | | } |
| | | |
| | | /** |
| | | * 添加活动类型 |
| | | * @param comActActivityTypeVO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R addActivityType(ComActActivityTypeVO comActActivityTypeVO) { |
| | | try { |
| | | this.baseMapper.addActivityType(comActActivityTypeVO); |
| | | } catch (Exception e) { |
| | | log.error("添加活动类型错误【{}】", e.getMessage()); |
| | | return R.fail("活动类型已存在"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据社区活动id查询社区活动报名人员列表 |
| | | * 根据社区活动id查询社区活动报名且未参与人员列表 |
| | | * |
| | | * @param activityId |
| | | * 活动id |
| | | * @return 社区活动报名人员列表 |
| | | * @return 社区活动报名且未参与人员列表 |
| | | */ |
| | | @Override |
| | | public R getTaskActivityPeopleList(Long activityId) { |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.service_community.dao.ComBpActivityDAO; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | import com.panzhihua.service_community.service.*; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | private ComActDiscussOptionService comActDiscussOptionService; |
| | | @Resource |
| | | private ComActActivityService comActActivityService; |
| | | @Resource |
| | | private ComBpActivityDAO comBpActivityDAO; |
| | | |
| | | /** |
| | | * 查询用户某个时间段交易数量 |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addIntegralTradeAdmin(AddComActIntegralUserDTO integralUserDTO) { |
| | | // 判断增加积分类型 积分任务类型(1.发布随手拍 2.发布微心愿 3.参与议事投票 4.参与志愿者活动 5.参与社区活动 6.参与党员活动 7.参与调查问卷) |
| | | // 判断增加积分类型 积分任务类型(1.发布随手拍 2.发布微心愿 3.参与议事投票 4.参加居民活动 5.参加志愿者活动 6.参与党员活动 7.参与调查问卷 8.取消活动) |
| | | Integer type = integralUserDTO.getIntegralType(); |
| | | // 业务id |
| | | Long serviceId = integralUserDTO.getServiceId(); |
| | |
| | | // 当前时间 |
| | | Date nowDate = new Date(); |
| | | |
| | | // 查询随手拍增加积分数量 |
| | | ComActIntegralRuleDO integralRuleDO = |
| | | comActIntegralRuleService.getOne(new QueryWrapper<ComActIntegralRuleDO>().lambda() |
| | | .eq(ComActIntegralRuleDO::getIntegralType, type).eq(ComActIntegralRuleDO::getCommunityId, communityId)); |
| | | if (integralRuleDO == null) { |
| | | log.error("未查询到该社区积分规则,社区id:" + communityId); |
| | | return R.fail("未查询到该社区积分规则,社区id:" + communityId); |
| | | } |
| | | // 判断规则是否有次数限制 |
| | | if (integralRuleDO.getIsRestrict().equals(ComActIntegralRuleDO.isRestrict.yes)) { |
| | | Integer count = this.baseMapper.getIntegralCount( |
| | | getIntegralCountDTO(integralRuleDO.getType(), userId, communityId, integralRuleDO.getIntegralType())); |
| | | if (count >= integralRuleDO.getCount()) { |
| | | log.error("该用户参加任务次数已达上限"); |
| | | return R.fail("该用户参加任务次数已达上限"); |
| | | Integer changeType = ComActIntegralUserTradeDO.changeType.add; |
| | | |
| | | Integer isVolunteer = integralUserDTO.getIsVolunteer(); |
| | | |
| | | if (!type.equals(8)) { |
| | | // 查询随手拍增加积分数量 |
| | | ComActIntegralRuleDO integralRuleDO = |
| | | comActIntegralRuleService.getOne(new QueryWrapper<ComActIntegralRuleDO>().lambda() |
| | | .eq(ComActIntegralRuleDO::getIntegralType, type).eq(ComActIntegralRuleDO::getCommunityId, communityId)); |
| | | if (integralRuleDO == null) { |
| | | log.error("未查询到该社区积分规则,社区id:" + communityId); |
| | | return R.fail("未查询到该社区积分规则,社区id:" + communityId); |
| | | } |
| | | // 判断规则是否有次数限制 |
| | | if (integralRuleDO.getIsRestrict().equals(ComActIntegralRuleDO.isRestrict.yes)) { |
| | | Integer count = this.baseMapper.getIntegralCount( |
| | | getIntegralCountDTO(integralRuleDO.getType(), userId, communityId, integralRuleDO.getIntegralType())); |
| | | if (count >= integralRuleDO.getCount()) { |
| | | log.error("该用户参加任务次数已达上限"); |
| | | return R.fail("该用户参加任务次数已达上限"); |
| | | } |
| | | } |
| | | amount = integralRuleDO.getAmount(); |
| | | } |
| | | amount = integralRuleDO.getAmount(); |
| | | |
| | | switch (type) { |
| | | case 1: |
| | |
| | | } |
| | | break; |
| | | case 4: |
| | | identityType = 3; |
| | | remark.append("参与志愿者活动奖励积分"); |
| | | ComActActivityDO actActivityZYZDO = comActActivityService.getById(serviceId); |
| | | if (actActivityZYZDO != null) { |
| | | remark.append("【"); |
| | | remark.append(actActivityZYZDO.getActivityName()); |
| | | remark.append("】"); |
| | | if (nonNull(isVolunteer) && isVolunteer.equals(1)) { |
| | | identityType = 3; |
| | | } else { |
| | | identityType = 1; |
| | | } |
| | | remark.append("成功参加居民活动奖励积分"); |
| | | ComActActivityDO actActivityDO1 = comActActivityService.getById(serviceId); |
| | | if(actActivityDO1 != null) { |
| | | amount = actActivityDO1.getRewardIntegral(); |
| | | } |
| | | break; |
| | | case 5: |
| | | remark.append("参与社区活动奖励积分"); |
| | | if (nonNull(isVolunteer) && isVolunteer.equals(0)) { |
| | | identityType = 1; |
| | | } else { |
| | | identityType = 3; |
| | | } |
| | | remark.append("成功参加志愿者活动奖励积分"); |
| | | ComActActivityDO actActivityDO = comActActivityService.getById(serviceId); |
| | | if (actActivityDO != null) { |
| | | remark.append("【"); |
| | | remark.append(actActivityDO.getActivityName()); |
| | | remark.append("】"); |
| | | if(actActivityDO != null) { |
| | | amount = actActivityDO.getRewardIntegral(); |
| | | } |
| | | break; |
| | | case 6: |
| | | identityType = 2; |
| | | remark.append("参与党员活动奖励积分"); |
| | | remark.append("参与党员活动"); |
| | | break; |
| | | case 7: |
| | | // 查询调查问卷 |
| | |
| | | remark.append("【"); |
| | | remark.append(questnaireDO.getTitle()); |
| | | remark.append("】"); |
| | | break; |
| | | case 8: |
| | | changeType = ComActIntegralUserTradeDO.changeType.reduce; |
| | | if (integralUserDTO.getActivityType() == 1) { |
| | | ComActActivityDO actActivityDO2 = comActActivityService.getById(serviceId); |
| | | if (actActivityDO2 != null) { |
| | | amount = -actActivityDO2.getCancelDeduct(); |
| | | if (actActivityDO2.getVolunteerMax() != 0) { |
| | | remark.append("取消志愿者活动扣除积分"); |
| | | } else { |
| | | remark.append("取消居民活动扣除积分"); |
| | | } |
| | | } |
| | | if (nonNull(isVolunteer) && isVolunteer.equals(1)) { |
| | | identityType = 3; |
| | | } else { |
| | | identityType = 1; |
| | | } |
| | | } |
| | | // else { |
| | | // ComPbActivityDO comPbActivityDO = comBpActivityDAO.selectById(serviceId); |
| | | // if(comPbActivityDO!=null){ |
| | | // amount=comPbActivityDO.getRewardIntegral(); |
| | | // identityType=2; |
| | | // } |
| | | // } |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | Integer integralAvailableResident = integralUserDO.getIntegralAvailableResident(); |
| | | Integer integralFrozenResident = integralUserDO.getIntegralFrozenResident(); |
| | | |
| | | integralUserDO.setIntegralSum(integralUserDO.getIntegralSum() + amount); |
| | | integralUserDO.setIntegralAvailableSum(integralUserDO.getIntegralAvailableSum() + amount); |
| | | integralUserDO.setUpdateAt(nowDate); |
| | | // 根据不同身份,计算钱包金额 |
| | | int reduceAmount = 0; |
| | | if (identityType.equals(ComActIntegralUserTradeDO.identityType.jm)) { |
| | | integralUserDO.setIntegralResident(integralUserDO.getIntegralResident() + amount); |
| | | integralUserDO.setIntegralAvailableResident(integralUserDO.getIntegralAvailableResident() + amount); |
| | | int integralResidentNow = addIntegral(integralResident + amount); |
| | | if (amount < 0) { |
| | | reduceAmount = integralResident - integralResidentNow; |
| | | } |
| | | integralUserDO.setIntegralResident(integralResidentNow); |
| | | integralUserDO.setIntegralAvailableResident(addIntegral(integralUserDO.getIntegralAvailableResident() + amount)); |
| | | } else if (identityType.equals(ComActIntegralUserTradeDO.identityType.dy)) { |
| | | integralUserDO.setIntegralParty(integralUserDO.getIntegralParty() + amount); |
| | | integralUserDO.setIntegralAvailableParty(integralUserDO.getIntegralAvailableParty() + amount); |
| | | int integralPartyNow = addIntegral(integralParty + amount); |
| | | if (amount < 0) { |
| | | reduceAmount = integralParty - integralPartyNow; |
| | | } |
| | | integralUserDO.setIntegralParty(integralPartyNow); |
| | | integralUserDO.setIntegralAvailableParty(addIntegral(integralUserDO.getIntegralAvailableParty() + amount)); |
| | | } else if (identityType.equals(ComActIntegralUserTradeDO.identityType.zyz)) { |
| | | integralUserDO.setIntegralVolunteer(integralUserDO.getIntegralVolunteer() + amount); |
| | | integralUserDO.setIntegralAvailableVolunteer(integralUserDO.getIntegralAvailableVolunteer() + amount); |
| | | int integralVolunteerNow = addIntegral(integralVolunteer + amount); |
| | | if (amount < 0) { |
| | | reduceAmount = integralVolunteer - integralVolunteerNow; |
| | | } |
| | | integralUserDO.setIntegralVolunteer(integralVolunteerNow); |
| | | integralUserDO.setIntegralAvailableVolunteer(addIntegral(integralUserDO.getIntegralAvailableVolunteer() + amount)); |
| | | } |
| | | if (changeType == ComActIntegralUserTradeDO.changeType.reduce) { |
| | | amount = reduceAmount; |
| | | integralUserDO.setIntegralSum(addIntegral(integralSum - reduceAmount)); |
| | | integralUserDO.setIntegralAvailableSum(addIntegral(integralAvailableSum - reduceAmount)); |
| | | } else { |
| | | integralUserDO.setIntegralSum(addIntegral(integralSum + amount)); |
| | | integralUserDO.setIntegralAvailableSum(addIntegral(integralAvailableSum + amount)); |
| | | } |
| | | integralUserDO.setUpdateAt(nowDate); |
| | | |
| | | // 更新钱包 |
| | | comActIntegralUserService.updateById(integralUserDO); |
| | | // 增加积分账户交易记录 |
| | | Long tradeId = this.addIntegralTradeRecord(userId, integralId, communityId, serviceId, type, amount, |
| | | ComActIntegralUserTradeDO.changeType.add, remark.toString(), identityType, 2L); |
| | | changeType, remark.toString(), identityType, 2L); |
| | | // 增加积分账户变更记录 |
| | | comActIntegralUserChangeService.addIntegralUserChangeRecord(userId, integralId, communityId, integralSum, |
| | | integralUserDO.getIntegralSum(), integralAvailableSum, integralUserDO.getIntegralAvailableSum(), |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | private int addIntegral(int integral) { |
| | | return integral > 0 ? integral : 0; |
| | | } |
| | | |
| | | /** |
| | | * 根据类型、用户id、社区id构建查询请求参数 |
| | | * |
| | |
| | | DetailNeighborCircleAdminVO vo = new DetailNeighborCircleAdminVO(); |
| | | BeanUtils.copyProperties(comActNeighborCircleDO, vo); |
| | | vo.setReleaseName(user.getName()); |
| | | vo.setImageUrl(user.getImageUrl()); |
| | | |
| | | // 查询话题名称 |
| | | if (comActNeighborCircleDO.getTopicId() != null) { |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActPictureLibraryVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.dao.ComActPictureLibraryDAO; |
| | | import com.panzhihua.service_community.service.ComActPictureLibraryService; |
| | | |
| | | /** |
| | | * @title: ComActPictureLibraryServiceImpl |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 公共预设图库服务实现类 |
| | | * @author: hans |
| | | * @date: 2021/11/23 17:03 |
| | | */ |
| | | @Service |
| | | public class ComActPictureLibraryServiceImpl implements ComActPictureLibraryService { |
| | | |
| | | @Resource |
| | | private ComActPictureLibraryDAO comActPictureLibraryDAO; |
| | | |
| | | |
| | | /** |
| | | * 获取预设图库 |
| | | * @param type |
| | | * @param subtype |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getPresetPictureLibrary(Integer type, Integer subtype) { |
| | | ComActPictureLibraryVO libraryVO = new ComActPictureLibraryVO(); |
| | | libraryVO.setPresetPictures(comActPictureLibraryDAO.getPresetPictureLibrary(type, subtype)); |
| | | return R.ok(libraryVO); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.net.URL; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.xml.bind.DatatypeConverter; |
| | | |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStaticsReserve; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStaticsReserveMonth; |
| | | import com.panzhihua.common.model.vos.community.reserve.HomeQuarantineRegisterExportVO; |
| | | import com.panzhihua.service_community.dao.ComActReserveRecordMapper; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private ComActReserveSubMapper comActReserveSubMapper; |
| | | @Resource |
| | | private ComActReserveRecordMapper comActReserveRecordMapper; |
| | | |
| | | /** |
| | | * 导出登记明细数据 |
| | |
| | | return R.ok(exportVO); |
| | | } |
| | | |
| | | @Override |
| | | public R bigScreenStaticsReserve(Long communityId) { |
| | | BigScreenStaticsReserve bigScreenStaticsReserve=comActReserveRecordMapper.biggestScreen(communityId); |
| | | bigScreenStaticsReserve.setReservePercent(BigDecimal.valueOf(bigScreenStaticsReserve.getReserveCount()*100d/ bigScreenStaticsReserve.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | bigScreenStaticsReserve.setFirePercent(BigDecimal.valueOf(bigScreenStaticsReserve.getFireCount()*100d/ bigScreenStaticsReserve.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | bigScreenStaticsReserve.setHomePercent(BigDecimal.valueOf(bigScreenStaticsReserve.getHomeCount()*100d/ bigScreenStaticsReserve.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | 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.setCount(bigScreenStaticsReserveMonth1.getCount()); |
| | | bigScreenStaticsReserveMonth.setReserveCount(bigScreenStaticsReserveMonth1.getReserveCount()); |
| | | bigScreenStaticsReserveMonth.setFireCount(bigScreenStaticsReserveMonth1.getFireCount()); |
| | | bigScreenStaticsReserveMonth.setGasCount(bigScreenStaticsReserveMonth1.getGasCount()); |
| | | bigScreenStaticsReserveMonth.setHomeCount(bigScreenStaticsReserveMonth1.getHomeCount()); |
| | | }); |
| | | bigScreenStaticsReserve.setBigScreenStaticsReserveMonthList(bigScreenStaticsReserveMonthList); |
| | | return R.ok(bigScreenStaticsReserve); |
| | | } |
| | | |
| | | private List<ComActQuestnaireSubVO> retrieveQuestnaireSub(PageReserveRegisterDetailedAdminDTO detailedAdminDTO) { |
| | | //查询题目 |
| | | List<ComActReserveSubDO> list = comActReserveSubMapper.selectList(new QueryWrapper<ComActReserveSubDO>().lambda() |
| | |
| | | }); |
| | | return listSubVo; |
| | | } |
| | | |
| | | public List<BigScreenStaticsReserveMonth> getPoints(){ |
| | | List<BigScreenStaticsReserveMonth> bigScreenStaticsReserveMonths=new ArrayList<>(); |
| | | String nowMonth=DateUtils.getDateFormatString(new Date(),"MM"); |
| | | String nowYear=DateUtils.getDateFormatString(new Date(),"yyyy"); |
| | | String nowYearMonth=DateUtils.getDateFormatString(new Date(),"yyyyMM"); |
| | | if(Integer.parseInt(nowYearMonth)<202212){ |
| | | for(int i=9;i<=12;i++){ |
| | | String aDate=""; |
| | | if(i<10){ |
| | | aDate = "0"+i; |
| | | } |
| | | else { |
| | | aDate=i+""; |
| | | } |
| | | BigScreenStaticsReserveMonth bigScreenStaticsReserveMonth=new BigScreenStaticsReserveMonth(); |
| | | bigScreenStaticsReserveMonth.setX(aDate); |
| | | bigScreenStaticsReserveMonths.add(bigScreenStaticsReserveMonth); |
| | | } |
| | | } |
| | | if(Integer.parseInt(nowYear)>2021){ |
| | | for(int i=1;i<=Integer.parseInt(nowMonth);i++){ |
| | | if(bigScreenStaticsReserveMonths.size()>=12){ |
| | | bigScreenStaticsReserveMonths.remove(0); |
| | | } |
| | | String aDate=""; |
| | | if(i<10){ |
| | | aDate = "0"+i; |
| | | } |
| | | else { |
| | | aDate=i+""; |
| | | } |
| | | BigScreenStaticsReserveMonth bigScreenStaticsReserveMonth=new BigScreenStaticsReserveMonth(); |
| | | bigScreenStaticsReserveMonth.setX(aDate); |
| | | bigScreenStaticsReserveMonths.add(bigScreenStaticsReserveMonth); |
| | | } |
| | | } |
| | | return bigScreenStaticsReserveMonths; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveIndexVo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.IndexBackReserve; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.IndexReserve; |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaiteSubSelectionVO; |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaiteSubVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | |
| | | return R.ok(this.baseMapper.getReserveIndexList(communityId)); |
| | | } |
| | | |
| | | @Override |
| | | public IndexReserve indexReserve(Long communityId) { |
| | | List<ComActReserveDO> comActReserveDOS=this.comActReserveMapper.selectList(new QueryWrapper<ComActReserveDO>().lambda().eq(ComActReserveDO::getCommunityId,communityId).orderByDesc(ComActReserveDO::getCreateAt).like(ComActReserveDO::getTitle,"返攀登记").eq(ComActReserveDO::getStatus,ComActReserveDO.status.jxz)); |
| | | if(!comActReserveDOS.isEmpty()){ |
| | | IndexBackReserve indexBackReserve=new IndexBackReserve(); |
| | | indexBackReserve.setCount(this.comActReserveRecordMapper.selectCount(new QueryWrapper<ComActReserveRecordDO>().lambda().eq(ComActReserveRecordDO::getReserveId,comActReserveDOS.get(0).getId()))); |
| | | |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public static void getFileByBytes(byte[] bytes, String filePath, String fileName) { |
| | | BufferedOutputStream bos = null; |
| | |
| | | return R.fail("社区已经存在"); |
| | | } |
| | | BeanUtils.copyProperties(comActVO, comActDO); |
| | | comActDO.setPlaintextPassword(password); |
| | | int insert = comActDAO.insert(comActDO); |
| | | if (insert > 0) { |
| | | ComActDO comActDO1 = |
| | |
| | | if (!ObjectUtils.isEmpty(password)) { |
| | | String encode = new BCryptPasswordEncoder().encode(password); |
| | | comActVO.setPassword(encode); |
| | | comActDO.setPlaintextPassword(password); |
| | | a = 1; |
| | | } |
| | | ComStreetDO comStreetDO = comStreetDAO.selectById(comActVO.getStreetId()); |
| | |
| | | // a=1; |
| | | // } |
| | | BeanUtils.copyProperties(comActVO, comActDO); |
| | | |
| | | // ComActDO selectOne = comActDAO.selectOne(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getAccount, account)); |
| | | // if (null != selectOne && selectOne.getAccount().equals(comActVO.getAccount())) { |
| | | // return R.fail("该登录账号重复,请重新修改"); |
| | |
| | | return R.ok(this.comActDAO.getCommunityListByNearby(communityDTO)); |
| | | } |
| | | |
| | | @Override |
| | | public R getCommunityPassword(Long communityId){ |
| | | return R.ok(comActDAO.getCommunityPassword(communityId)); |
| | | } |
| | | |
| | | } |
| | |
| | | // subordinateList = |
| | | // subordinateList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new |
| | | // TreeSet<>(Comparator.comparing(o -> o.getFloor()))), ArrayList::new)); |
| | | subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getFloor)) |
| | | .collect(Collectors.toList()); |
| | | // subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getFloor)) |
| | | // .collect(Collectors.toList()); |
| | | subordinateList.forEach(cascade -> { |
| | | if (cascade.getFloor().contains("栋")) { |
| | | cascade.setName(cascade.getFloor()); |
| | |
| | | if (houseDO != null) { |
| | | subordinateList = |
| | | this.baseMapper.getHouseLevelByUnitNos(houseDO.getVillageId(), houseDO.getFloor()); |
| | | subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getUnitNo)) |
| | | .collect(Collectors.toList()); |
| | | // subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getUnitNo)) |
| | | // .collect(Collectors.toList()); |
| | | // subordinateList = |
| | | // subordinateList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new |
| | | // TreeSet<>(Comparator.comparing(o -> o.getUnitNo()))), ArrayList::new)); |
| | |
| | | if (houseDO != null) { |
| | | subordinateList = this.baseMapper.getHouseLevelByHouseNos(houseDO.getVillageId(), |
| | | houseDO.getFloor(), houseDO.getUnitNo()); |
| | | subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getHouseNo)) |
| | | .collect(Collectors.toList()); |
| | | // subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getHouseNo)) |
| | | // .collect(Collectors.toList()); |
| | | // subordinateList = |
| | | // subordinateList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new |
| | | // TreeSet<>(Comparator.comparing(o -> o.getHouseNo()))), ArrayList::new)); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.segments.MergeSegments; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.WestScreenStatics; |
| | | import com.panzhihua.common.model.vos.community.screen.civil.*; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.*; |
| | | import com.panzhihua.common.utlis.*; |
| | | import com.panzhihua.service_community.util.WxDataUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyBuild; |
| | | import com.panzhihua.common.model.vos.community.screen.civil.CivilPopulationStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.civil.CivilStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.event.*; |
| | | import com.panzhihua.common.model.vos.community.screen.event.EventTransferRecordVO; |
| | | import com.panzhihua.common.model.vos.community.screen.index.*; |
| | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * 实有人口Service实现类 |
| | |
| | | private ComEldersAuthStatisticsMapper comEldersAuthStatisticsMapper; |
| | | @Resource |
| | | private ComPensionAuthStatisticsDAO comPensionAuthStatisticsDAO; |
| | | @Resource |
| | | private ComActReserveMapper comActReserveMapper; |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | | @Resource |
| | | private ComActEasyPhotoDAO comActEasyPhotoDAO; |
| | | |
| | | /** |
| | | * 新增实有人口 |
| | |
| | | ageStatisticsVO5.setSum(0); |
| | | ageStatisticsVO6.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(); |
| | | 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()); |
| | | ageStatisticsVO2.setPercent(BigDecimal.valueOf(ageMap.get("age27").intValue()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | ageStatisticsVO3.setSum(ageMap.get("age35").intValue()); |
| | | ageStatisticsVO3.setPercent(BigDecimal.valueOf(ageMap.get("age35").intValue()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | ageStatisticsVO4.setSum(ageMap.get("age45").intValue()); |
| | | ageStatisticsVO4.setPercent(BigDecimal.valueOf(ageMap.get("age45").intValue()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | ageStatisticsVO5.setSum(ageMap.get("age55").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)); |
| | | } |
| | | |
| | | agePopulationList.add(ageStatisticsVO1); |
| | |
| | | @Override |
| | | public R getScreenEventDetail(BigScreenEventDetailDTO eventDetailDTO) { |
| | | EventNewStatisticsVO statisticsVO = new EventNewStatisticsVO(); |
| | | if (eventDetailDTO.getType().equals(7)) {// 随手拍详情 |
| | | Integer eventType = eventDetailDTO.getEventType(); |
| | | if (eventDetailDTO.getType().equals(7) || (nonNull(eventType) && eventType.equals(2))) {// 随手拍详情 |
| | | statisticsVO = this.baseMapper.getEventScreenSSPDateil(eventDetailDTO.getEventId()); |
| | | if (statisticsVO != null && StringUtils.isNotEmpty(statisticsVO.getPhotoPathList())) { |
| | | statisticsVO.setDangerLevel("0"); |
| | |
| | | return R.ok(this.comMngPopulationDAO.specialInputUserExport(pageInputUserDTO)); |
| | | } |
| | | |
| | | @Override |
| | | public R westScreenStatics() { |
| | | WestScreenStatics westScreenStatics=this.comMngPopulationDAO.westScreenStatics(); |
| | | WxDataUtil wxDataUtil=new WxDataUtil(); |
| | | westScreenStatics.setDayUser(wxDataUtil.getDayUser()); |
| | | westScreenStatics.setCountUser(wxDataUtil.getMonthUser()); |
| | | return R.ok(westScreenStatics); |
| | | } |
| | | |
| | | @Override |
| | | public R getComprehensivePopulationStatics(Long streetId){ |
| | | EventPopulationStatisticsVO statisticsVo = new EventPopulationStatisticsVO(); |
| | | //查询人口数据 |
| | | List<EventPopulationBasicsStatisticsVO> basicsList = comMngPopulationDAO.getBasicsList(streetId); |
| | | if(basicsList != null){ |
| | | for (EventPopulationBasicsStatisticsVO basics : basicsList) { |
| | | statisticsVo.setPopulationNum(statisticsVo.getPopulationNum() + basics.getPopulationNum()); |
| | | statisticsVo.setVillageNum(statisticsVo.getVillageNum() + basics.getVillageNum()); |
| | | statisticsVo.setHouseNum(statisticsVo.getHouseNum() + basics.getHouseNum()); |
| | | } |
| | | statisticsVo.setBasicsList(basicsList); |
| | | } |
| | | //查询特殊人群数据 |
| | | EventPopulationSpecialStatisticsVO populationSpecial = comMngPopulationDAO.getPopulationSpecial(streetId); |
| | | if(populationSpecial != null){ |
| | | populationSpecial.setOtherTotal(populationSpecial.getZjTotal() + populationSpecial.getSfTotal() |
| | | + populationSpecial.getXsTotal() + populationSpecial.getXjTotal() |
| | | + populationSpecial.getJzTotal() + populationSpecial.getXdTotal()); |
| | | populationSpecial.setLnTotal(comMngPopulationDAO.getPopulationAge(streetId,60)); |
| | | populationSpecial.setGlTotal(comMngPopulationDAO.getPopulationAge(streetId,80)); |
| | | statisticsVo.setSpecialStatisticsVo(populationSpecial); |
| | | } |
| | | return R.ok(statisticsVo); |
| | | } |
| | | |
| | | @Override |
| | | public R getComprehensiveStreetList(){ |
| | | return R.ok(comMngPopulationDAO.getComprehensiveStreetList()); |
| | | } |
| | | |
| | | @Override |
| | | public R indexInfo(Long communityId) { |
| | | IndexInfo indexInfo=new IndexInfo(); |
| | | //基础数据 |
| | | BaseInfo baseInfo=this.comMngPopulationDAO.baseInfo(communityId); |
| | | indexInfo.setBaseInfo(baseInfo); |
| | | // 查询实有人口统计模块 |
| | | IndexPopulationStatisticsVO populationStatisticsVO = new IndexPopulationStatisticsVO(); |
| | | // 查询实有人口性别统计 |
| | | List<IndexPopulationSexStatisticsVO> sexPopulationList = |
| | | comMngPopulationDAO.getScreenIndexByPopulationSex(communityId); |
| | | populationStatisticsVO.setSexPopulationList(sexPopulationList); |
| | | // 查询实有人口年龄统计 |
| | | List<IndexPopulationAgeStatisticsVO> agePopulationList = statisticsAge(communityId); |
| | | populationStatisticsVO.setAgePopulationList(agePopulationList); |
| | | indexInfo.setIndexPopulationStatisticsVO(populationStatisticsVO); |
| | | // 查询特殊人群统计 |
| | | List<IndexSpecialStatisticsVO> specialStatisticsVOList = new ArrayList<>(); |
| | | |
| | | // 查询特殊人群标签列表 |
| | | List<ComMngUserTagVO> userTagList = comMngPopulationDAO.getUserTagListByCommunityId(communityId); |
| | | IndexSpecialStatisticsVO otherSpecialVO = new IndexSpecialStatisticsVO(); |
| | | otherSpecialVO.setTitle("其他"); |
| | | otherSpecialVO.setSum(0); |
| | | IndexSpecialStatisticsVO otherSpecialVO1 = new IndexSpecialStatisticsVO(); |
| | | otherSpecialVO1.setTitle("普通居民"); |
| | | otherSpecialVO1.setSum(0); |
| | | int countNormal=comMngPopulationDAO.getSpecialStatistics(communityId); |
| | | int countElder=comMngPopulationDAO.getStatisticsCount(communityId); |
| | | int countAll=countElder+countNormal; |
| | | 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("低收入")){ |
| | | IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); |
| | | specialStatisticsVO.setTitle(userTag.getTagName()); |
| | | Integer count =0; |
| | | if (userTag.getTagName().equals("高龄老人")) { |
| | | count=countElder; |
| | | } |
| | | else { |
| | | count= comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId); |
| | | } |
| | | specialStatisticsVO.setSum(count); |
| | | specialStatisticsVO.setPercent(BigDecimal.valueOf(specialStatisticsVO.getSum()*100d/countAll).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | otherSpecialVO1.setSum(otherSpecialVO1.getSum()+count); |
| | | specialStatisticsVOList.add(specialStatisticsVO); |
| | | } |
| | | else{ |
| | | Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId); |
| | | otherSpecialVO.setSum(otherSpecialVO.getSum()+count); |
| | | otherSpecialVO1.setSum(otherSpecialVO1.getSum()+count); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | otherSpecialVO.setPercent(BigDecimal.valueOf(otherSpecialVO.getSum()*100d/countAll).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | specialStatisticsVOList.add(otherSpecialVO); |
| | | otherSpecialVO1.setSum(countAll-otherSpecialVO1.getSum()); |
| | | otherSpecialVO1.setPercent(BigDecimal.valueOf(otherSpecialVO1.getSum()*100d/countAll).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | specialStatisticsVOList.add(otherSpecialVO1); |
| | | indexInfo.setSpecialStatisticsVOList(specialStatisticsVOList); |
| | | // 查询网格化治理 |
| | | IndexEventGridStatisticsVO eventGridStatisticsVO = new IndexEventGridStatisticsVO(); |
| | | List<IndexGridStatisticsVO> gridStatisticsList = new ArrayList<>(); |
| | | // 查询网格化事件数据 |
| | | IndexGridEventStatisticsVO gridEventStatistics = comMngPopulationDAO.getGridEventStatisticsList(communityId); |
| | | int count=gridEventStatistics.getEventGGTotal()+gridEventStatistics.getEventBWDTotal()+gridEventStatistics.getEventMDTotal()+gridEventStatistics.getEventTFTotal()+gridEventStatistics.getEventTSTotal()+gridEventStatistics.getEventZATotal(); |
| | | if(count!=0){ |
| | | gridEventStatistics.setGgPercent(BigDecimal.valueOf(gridEventStatistics.getEventGGTotal()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | gridEventStatistics.setBwdPercent(BigDecimal.valueOf(gridEventStatistics.getEventBWDTotal()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | gridEventStatistics.setMdPercent(BigDecimal.valueOf(gridEventStatistics.getEventMDTotal()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | gridEventStatistics.setTfPercent(BigDecimal.valueOf(gridEventStatistics.getEventTFTotal()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | gridEventStatistics.setTsPercent(BigDecimal.valueOf(gridEventStatistics.getEventTSTotal()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | gridEventStatistics.setZaPercent(BigDecimal.valueOf(gridEventStatistics.getEventZATotal()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | }else{ |
| | | gridEventStatistics.setGgPercent(BigDecimal.valueOf(0)); |
| | | gridEventStatistics.setBwdPercent(BigDecimal.valueOf(0)); |
| | | gridEventStatistics.setMdPercent(BigDecimal.valueOf(0)); |
| | | gridEventStatistics.setTfPercent(BigDecimal.valueOf(0)); |
| | | gridEventStatistics.setTsPercent(BigDecimal.valueOf(0)); |
| | | gridEventStatistics.setZaPercent(BigDecimal.valueOf(0)); |
| | | } |
| | | |
| | | eventGridStatisticsVO.setGridEventStatisticsList(gridEventStatistics); |
| | | // 查询网格数据 |
| | | List<EventGridDataVO> gridDataList = comMngPopulationDAO.getGridDataListByCommunityId(communityId); |
| | | if (!gridDataList.isEmpty()) { |
| | | gridDataList.forEach(gridData -> { |
| | | if (gridData != null) { |
| | | IndexGridStatisticsVO gridStatisticsVO = new IndexGridStatisticsVO(); |
| | | gridStatisticsVO.setEventData(gridData.getGridName()); |
| | | // 根据网格id查询网格事件列表 |
| | | IndexGridEventStatisticsVO gridEventList = |
| | | comMngPopulationDAO.getGridEventByGirdId(gridData.getId()); |
| | | gridStatisticsVO.setGridEventStatisticsList(gridEventList); |
| | | gridStatisticsList.add(gridStatisticsVO); |
| | | } |
| | | }); |
| | | } |
| | | eventGridStatisticsVO.setGridStatisticsList(gridStatisticsList); |
| | | indexInfo.setEventGridStatisticsVO(eventGridStatisticsVO); |
| | | //首页业务统计 |
| | | IndexDynamic indexDynamic=this.populationDAO.indexDynamic(communityId); |
| | | indexInfo.setIndexDynamic(indexDynamic); |
| | | //返攀登记居家隔离数据统计 |
| | | IndexReserve indexReserve=new IndexReserve(); |
| | | IndexBackReserve indexBackReserve=new IndexBackReserve(); |
| | | indexBackReserve.setCount(comActReserveMapper.indexBackReserve(communityId)); |
| | | indexBackReserve.setIndexReserveSubList(comActReserveMapper.indexBackReserveSub(communityId)); |
| | | indexBackReserve.getIndexReserveSubList().forEach(indexReserveSub -> { |
| | | if(indexReserveSub.getAllCount()!=0){ |
| | | indexReserveSub.setPercent(BigDecimal.valueOf(indexReserveSub.getNum()*100d/indexReserveSub.getAllCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | } |
| | | else { |
| | | indexReserveSub.setPercent(BigDecimal.valueOf(0d)); |
| | | } |
| | | }); |
| | | IndexHomeQuarantine indexHomeQuarantine=new IndexHomeQuarantine(); |
| | | indexHomeQuarantine.setCount(comActReserveMapper.indexHomeQuarantine(communityId)); |
| | | indexHomeQuarantine.setIndexReserveSubList(comActReserveMapper.IndexHomeQuarantineSub(communityId)); |
| | | indexHomeQuarantine.getIndexReserveSubList().forEach(indexReserveSub -> { |
| | | if(indexReserveSub.getAllCount()!=0){ |
| | | indexReserveSub.setPercent(BigDecimal.valueOf(indexReserveSub.getNum()*100d/indexReserveSub.getAllCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | } |
| | | else { |
| | | indexReserveSub.setPercent(BigDecimal.valueOf(0d)); |
| | | } |
| | | }); |
| | | indexReserve.setIndexBackReserve(indexBackReserve); |
| | | indexReserve.setIndexHomeQuarantine(indexHomeQuarantine); |
| | | indexInfo.setIndexReserve(indexReserve); |
| | | BigscreenGridsGovernanceStatisticsVO bigscreenGridsGovernanceStatisticsVO=comActEasyPhotoDAO.selectBigscreenGridsGovern(communityId); |
| | | indexInfo.setBigScreenGridStaticsReturn(setData(bigscreenGridsGovernanceStatisticsVO)); |
| | | |
| | | return R.ok(indexInfo); |
| | | } |
| | | |
| | | private void setMistake(ComMngPopulationMistakeExcelVO mvo, ComMngPopulationServeExcelVO vo) { |
| | | mvo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCnDescByName(vo.getPoliticalOutlook())); |
| | | mvo.setIsRent(PopulHouseUseEnum.getCnDescByName(vo.getIsRent())); |
| | |
| | | return ObjectUtils.isEmpty(hashMap.get(key)); |
| | | } |
| | | |
| | | |
| | | private BigScreenGridStaticsReturn setData(BigscreenGridsGovernanceStatisticsVO bigscreenGridsGovernanceStatisticsVO){ |
| | | List<BigScreenGridStaticsReturn> bigScreenGridStaticsReturnList=new ArrayList<>(); |
| | | BigScreenGridStaticsReturn bigScreenGridStaticsReturn=new BigScreenGridStaticsReturn(); |
| | | bigScreenGridStaticsReturn.setCount(bigscreenGridsGovernanceStatisticsVO.getEventTotal()+bigscreenGridsGovernanceStatisticsVO.getOtherTotal()+bigscreenGridsGovernanceStatisticsVO.getSafety()); |
| | | BigScreenGridStaticsReturn bigScreenGridStaticsReturn1=new BigScreenGridStaticsReturn(); |
| | | bigScreenGridStaticsReturn1.setTitle("突发事件报告"); |
| | | bigScreenGridStaticsReturn1.setNum(bigscreenGridsGovernanceStatisticsVO.getEventTFTotal()); |
| | | bigScreenGridStaticsReturn1.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventTFTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn1); |
| | | BigScreenGridStaticsReturn bigScreenGridStaticsReturn2=new BigScreenGridStaticsReturn(); |
| | | bigScreenGridStaticsReturn2.setTitle("特殊人群服务"); |
| | | bigScreenGridStaticsReturn2.setNum(bigscreenGridsGovernanceStatisticsVO.getEventTSTotal()); |
| | | bigScreenGridStaticsReturn2.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventTSTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn2); |
| | | BigScreenGridStaticsReturn bigScreenGridStaticsReturn3=new BigScreenGridStaticsReturn(); |
| | | bigScreenGridStaticsReturn3.setTitle("治安防控"); |
| | | bigScreenGridStaticsReturn3.setNum(bigscreenGridsGovernanceStatisticsVO.getEventZATotal()); |
| | | bigScreenGridStaticsReturn3.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventZATotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn3); |
| | | BigScreenGridStaticsReturn bigScreenGridStaticsReturn4=new BigScreenGridStaticsReturn(); |
| | | bigScreenGridStaticsReturn4.setTitle("民生服务"); |
| | | bigScreenGridStaticsReturn4.setNum(bigscreenGridsGovernanceStatisticsVO.getEventMSTotal()); |
| | | bigScreenGridStaticsReturn4.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventMSTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn4); |
| | | BigScreenGridStaticsReturn bigScreenGridStaticsReturn5=new BigScreenGridStaticsReturn(); |
| | | bigScreenGridStaticsReturn5.setTitle("矛盾劝解"); |
| | | bigScreenGridStaticsReturn5.setNum(bigscreenGridsGovernanceStatisticsVO.getEventMDTotal()); |
| | | bigScreenGridStaticsReturn5.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventMDTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn5); |
| | | BigScreenGridStaticsReturn bigScreenGridStaticsReturn6=new BigScreenGridStaticsReturn(); |
| | | bigScreenGridStaticsReturn6.setTitle("防灾减灾"); |
| | | bigScreenGridStaticsReturn6.setNum(bigscreenGridsGovernanceStatisticsVO.getEventFJTotal()); |
| | | bigScreenGridStaticsReturn6.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventFJTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn6); |
| | | BigScreenGridStaticsReturn bigScreenGridStaticsReturn7=new BigScreenGridStaticsReturn(); |
| | | bigScreenGridStaticsReturn7.setTitle("政策法规宣传"); |
| | | bigScreenGridStaticsReturn7.setNum(bigscreenGridsGovernanceStatisticsVO.getEventFGTotal()); |
| | | bigScreenGridStaticsReturn7.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventFGTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn7); |
| | | BigScreenGridStaticsReturn bigScreenGridStaticsReturn8=new BigScreenGridStaticsReturn(); |
| | | bigScreenGridStaticsReturn8.setTitle("安全巡查"); |
| | | bigScreenGridStaticsReturn8.setNum(bigscreenGridsGovernanceStatisticsVO.getSafety()); |
| | | bigScreenGridStaticsReturn8.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getSafety()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn8); |
| | | BigScreenGridStaticsReturn bigScreenGridStaticsReturn9=new BigScreenGridStaticsReturn(); |
| | | bigScreenGridStaticsReturn9.setTitle("其他"); |
| | | bigScreenGridStaticsReturn9.setNum(bigscreenGridsGovernanceStatisticsVO.getOtherTotal()); |
| | | bigScreenGridStaticsReturn9.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getOtherTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn9); |
| | | bigScreenGridStaticsReturn.setBigScreenGridStaticsReturnList(bigScreenGridStaticsReturnList); |
| | | return bigScreenGridStaticsReturn; |
| | | } |
| | | |
| | | } |
| | |
| | | new Page(villageListAppDTO.getPageNum(), villageListAppDTO.getPageSize()), villageListAppDTO)); |
| | | } |
| | | |
| | | @Override |
| | | public R getGridVillageListApp(ComMngVillageListAppDTO villageListAppDTO) { |
| | | return R.ok(this.baseMapper.getGridVillageList( |
| | | new Page(villageListAppDTO.getPageNum(), villageListAppDTO.getPageSize()), villageListAppDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 综治app-根据小区id查询小区下楼栋列表 |
| | | * |
| | |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.dao.ComMngPopulationDAO; |
| | | import com.panzhihua.service_community.dao.ComPensionAuthPensionerDAO; |
| | | import com.panzhihua.service_community.dao.ComPensionAuthRecordDAO; |
| | | import com.panzhihua.service_community.dao.ComPensionAuthStatisticsDAO; |
| | | import com.panzhihua.service_community.dao.SysConfMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationDO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthPensionerDO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthRecordDO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthStatisticsDO; |
| | | import com.panzhihua.service_community.model.dos.SysConfDO; |
| | | import com.panzhihua.service_community.service.ComPensionAuthRecordService; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComSwDangerReportDAO; |
| | | import com.panzhihua.service_community.dao.ComSwPatrolRecordDAO; |
| | | import com.panzhihua.service_community.dao.ComSwPatrolRecordReportDAO; |
| | | import com.panzhihua.service_community.dao.ComSwSafetyWorkRecordDAO; |
| | | import com.panzhihua.service_community.model.dos.ComSwDangerReportDO; |
| | | import com.panzhihua.service_community.model.dos.ComSwPatrolRecordDO; |
| | | import com.panzhihua.service_community.model.dos.ComSwPatrolRecordReportDO; |
| | |
| | | int half = day / 2; |
| | | String month = DateUtil.format(date, moth_format_str); |
| | | DynamicWorkVO dynamicWorkVO = new DynamicWorkVO(); |
| | | dynamicWorkVO.setMonth(monthStr[m] + "月上旬"); |
| | | dynamicWorkVO.setMonth(monthStr[m-1] + "月上旬"); |
| | | dynamicWorkVO.setStart(month + "-01 00:00:00"); |
| | | dynamicWorkVO.setEnd(month + "-" + half + " 23:59:58"); |
| | | dateList.add(dynamicWorkVO); |
| | | DynamicWorkVO dynamicWorkVO1 = new DynamicWorkVO(); |
| | | dynamicWorkVO1.setMonth(monthStr[m] + "月下旬"); |
| | | dynamicWorkVO1.setMonth(monthStr[m-1] + "月下旬"); |
| | | dynamicWorkVO1.setStart(month + "-" + half + " 23:59:58"); |
| | | dynamicWorkVO1.setEnd(DateUtils.getDateFormatString(endDay, "yyyy-MM-dd HH:mm:ss")); |
| | | dateList.add(dynamicWorkVO1); |
| | | } |
| | | return dateList; |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.util; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | public class ResultEntity { |
| | | private Integer key; |
| | | private Integer value; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.util; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.utlis.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 微信活跃用户工具类 |
| | | * @author zzj |
| | | */ |
| | | public class WxDataUtil { |
| | | WxXCXTempSend wxXCXTempSend=new WxXCXTempSend(); |
| | | String accessToken; |
| | | { |
| | | try { |
| | | accessToken = wxXCXTempSend.getAccessToken(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | public Integer getDayUser(){ |
| | | try { |
| | | String dayUrl="https://api.weixin.qq.com/datacube/getweanalysisappiddailyretaininfo?access_token="+accessToken; |
| | | WxRequestEntity wxRequestEntity=new WxRequestEntity(); |
| | | wxRequestEntity.setAccess_token(accessToken); |
| | | String date=DateUtil.format(DateUtil.offsetDay(new Date(),-1),"yyyyMMdd"); |
| | | wxRequestEntity.setBegin_date(date); |
| | | wxRequestEntity.setEnd_date(date); |
| | | String result=HttpClientUtil.httpPost(dayUrl, JSONObject.toJSONString(wxRequestEntity)); |
| | | if(StringUtils.isNotEmpty(result)&result.contains("visit_uv")){ |
| | | JSONArray jsonArray=(JSONArray) JSONObject.parseObject(result).get("visit_uv"); |
| | | JSONObject jsonObject=(JSONObject)jsonArray.get(0); |
| | | return jsonObject.getInteger("value"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | public Integer getMonthUser(){ |
| | | try { |
| | | String dayUrl="https://api.weixin.qq.com/datacube/getweanalysisappidmonthlyvisittrend?access_token="+accessToken; |
| | | WxRequestEntity wxRequestEntity=new WxRequestEntity(); |
| | | wxRequestEntity.setAccess_token(accessToken); |
| | | wxRequestEntity.setBegin_date(DateUtil.format(DateUtil.offsetMonth(DateUtils.getFirstDayOfMonth(),-1),"yyyyMMdd")); |
| | | wxRequestEntity.setEnd_date(DateUtil.format(DateUtil.offsetMonth(DateUtils.getLastDayOfMonth(),-1),"yyyyMMdd")); |
| | | String result=HttpClientUtil.httpPost(dayUrl, JSONObject.toJSONString(wxRequestEntity)); |
| | | if(StringUtils.isNotEmpty(result)&result.contains("session_cnt")){ |
| | | JSONArray resultEntity= (JSONArray) JSONObject.parseObject(result).get("list"); |
| | | JSONObject resultObject= (JSONObject) resultEntity.get(0); |
| | | return resultObject.getInteger("session_cnt"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.util; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | public class WxRequestEntity { |
| | | private String access_token; |
| | | private String begin_date; |
| | | private String end_date; |
| | | } |
| | |
| | | '五星' ELSE '未评价' |
| | | END `star_level`, |
| | | caae.evaluate_content, |
| | | su.`nick_name`, |
| | | su.`name`, |
| | | su.phone, |
| | | CASE |
| | | WHEN su.is_partymember = 1 THEN |
| | |
| | | order by caae.create_at desc |
| | | limit 1 |
| | | </select> |
| | | <select id="selectEvaluateList" resultType="com.panzhihua.common.model.vos.community.ComActActEvaluateVO"> |
| | | SELECT caae.*,su.`name`,su.nick_name,su.image_url |
| | | FROM com_act_act_evaluate AS caae |
| | | LEFT JOIN sys_user AS su ON su.user_id = caae.user_id |
| | | WHERE caae.activity_id = #{activityId} AND caae.user_id = #{userId} |
| | | ORDER BY caae.create_at DESC |
| | | </select> |
| | | </mapper> |
| | |
| | | caar.id, |
| | | caar.activity_id, |
| | | caar.create_at, |
| | | caar.position, |
| | | caar.times, |
| | | caar.award, |
| | | su.user_id, |
| | | su.`name`, |
| | | su.nick_name, |
| | |
| | | <if test="comActActRegistVO.createAt != null"> |
| | | AND caar.create_at = #{comActActRegistVO.createAt} |
| | | </if> |
| | | <if test="comActActRegistVO.startTime != null"> |
| | | AND caar.create_at >= #{comActActRegistVO.startTime} |
| | | </if> |
| | | <if test="comActActRegistVO.endTime != null"> |
| | | AND caar.create_at <= #{comActActRegistVO.endTime} |
| | | </if> |
| | | <if test="comActActRegistVO.type != null"> |
| | | AND caar.type = #{comActActRegistVO.type} |
| | | </if> |
| | | order by caar.create_at desc |
| | | </select> |
| | | |
| | | <select id="getRegistLists" resultType="com.panzhihua.common.model.vos.community.ComActActRegistExcelVO"> |
| | | SELECT |
| | | caar.create_at, |
| | | caar.position, |
| | | caar.times, |
| | | caar.award, |
| | | su.`name`, |
| | | su.phone, |
| | | su.tags, |
| | |
| | | <if test="comActActRegistVO.createAt != null"> |
| | | AND caar.create_at = #{comActActRegistVO.createAt} |
| | | </if> |
| | | <if test="comActActRegistVO.type != null"> |
| | | AND caar.type = #{comActActRegistVO.type} |
| | | </if> |
| | | order by caar.create_at desc |
| | | </select> |
| | | |
| | | <select id="getNoRegistLists" resultType="com.panzhihua.common.model.vos.community.ComActActRegistExcelVO"> |
| | | SELECT |
| | | caas.create_at, |
| | | caar.positon, |
| | | caar.times, |
| | | caar.award, |
| | | su.`name` |
| | | su.phone, |
| | | su.tags, |
| | |
| | | '志愿者' ELSE '居民' |
| | | END identity |
| | | FROM |
| | | `com_act_act_sign` caas |
| | | (SELECT * FROM com_act_act_sign WHERE `status` = 1) caas |
| | | LEFT JOIN sys_user su ON caas.user_id = su.user_id |
| | | WHERE NOT EXISTS ( SELECT 1 FROM com_act_act_regist caar WHERE caas.user_id = caar.user_id ) |
| | | AND caas.activity_id = #{comActActRegistVO.activityId} |
| | |
| | | <if test="comActActRegistVO.createAt != null"> |
| | | AND caar.create_at = #{comActActRegistVO.createAt} |
| | | </if> |
| | | <if test="comActActRegistVO.type != null"> |
| | | AND caar.type = #{comActActRegistVO.type} |
| | | </if> |
| | | </select> |
| | | <select id="listRegistRecord" resultType="com.panzhihua.common.model.vos.community.ComActActRegistVO"> |
| | | SELECT create_at, award FROM com_act_act_regist |
| | | WHERE activity_id = #{id} AND user_id = #{userId} AND `type` = 1 ORDER BY id DESC |
| | | </select> |
| | | <select id="selectTotalAwardWithRegist" resultType="java.lang.Integer"> |
| | | SELECT SUM(award) FROM com_act_act_regist WHERE activity_id = #{activityId} AND user_id = #{userId} AND `type` = 1 |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="user_id" property="userId" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="is_volunteer" property="isVolunteer" /> |
| | | <result column="status" property="status" /> |
| | | <result column="reason" property="reason" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | |
| | | <select id="getSignLists" resultType="com.panzhihua.common.model.vos.community.ComActActSignExcelVO"> |
| | | SELECT |
| | | caas.create_at, |
| | | IF(r.times IS NULL, 0, r.times) AS times, |
| | | CASE |
| | | WHEN caas.status = 1 THEN |
| | | '已报名' ELSE '已取消' |
| | | END status, |
| | | caas.reason, |
| | | IF(r.times IS NULL, 0, r.award * r.times) AS award, |
| | | t.limit, |
| | | su.`name`, |
| | | su.phone, |
| | | su.tags, |
| | | CASE |
| | | |
| | | WHEN su.is_partymember = 1 THEN |
| | | '党员' |
| | | WHEN caas.is_volunteer = 1 THEN |
| | | '志愿者' ELSE '居民' |
| | | END identity |
| | |
| | | FROM |
| | | com_act_act_sign caas |
| | | LEFT JOIN sys_user su ON caas.user_id = su.user_id |
| | | left join com_act_activity t on caas.activity_id = t.id |
| | | LEFT JOIN ( |
| | | SELECT * FROM ( |
| | | SELECT * FROM com_act_act_regist |
| | | WHERE activity_id = #{activitySignVO.activityId} AND type = 1 |
| | | ORDER BY id DESC LIMIT 1000000 |
| | | ) temp GROUP BY activity_id, user_id |
| | | ) r ON caas.activity_id = r.activity_id AND caas.user_id = r.user_id |
| | | where caas.activity_id = #{activitySignVO.activityId} |
| | | <if test="activitySignVO.phone != null and activitySignVO.phone !=''"> |
| | | AND su.phone = #{activitySignVO.phone} |
| | | </if> |
| | | <if test='activitySignVO.status != null'> |
| | | AND caas.status = #{activitySignVO.status} |
| | | </if> |
| | | <if test="activitySignVO.name != null and activitySignVO.name !=''"> |
| | | AND su.`name` = #{activitySignVO.name} |
| | |
| | | #{id} |
| | | </foreach> AND e.id IS NULL |
| | | </select> |
| | | <select id="listActivitySign" resultType="com.panzhihua.common.model.vos.community.ActivitySignVO"> |
| | | SELECT u.user_id id, u.image_url, u.name, u.nick_name, |
| | | CASE WHEN a.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity, |
| | | u.phone, u.tags, a.create_at, a.is_volunteer, a.status , IF(r.times IS NULL, 0, r.times) AS times, |
| | | a.reason, IF(r.times IS NULL, 0, r.award * r.times) AS award, t.limit |
| | | FROM com_act_act_sign a |
| | | JOIN sys_user u ON a.user_id = u.user_id |
| | | left join com_act_activity t on a.activity_id = t.id |
| | | LEFT JOIN ( |
| | | SELECT * FROM ( |
| | | SELECT * FROM com_act_act_regist |
| | | WHERE activity_id = #{activitySignVO.activityId} AND type = 1 |
| | | ORDER BY id DESC LIMIT 1000000 |
| | | ) temp GROUP BY activity_id, user_id |
| | | ) r ON a.activity_id = r.activity_id AND a.user_id = r.user_id |
| | | WHERE a.activity_id = #{activitySignVO.activityId} |
| | | <if test='activitySignVO.phone != null and activitySignVO.phone != ""'> |
| | | AND u.phone = #{activitySignVO.phone} |
| | | </if> |
| | | <if test='activitySignVO.status != null'> |
| | | AND a.status = #{activitySignVO.status} |
| | | </if> |
| | | <if test='activitySignVO.tags != null and activitySignVO.tags != ""'> |
| | | AND u.tags like concat('%',#{activitySignVO.tags},'%') |
| | | </if> |
| | | <if test='activitySignVO.name != null and activitySignVO.name != ""'> |
| | | AND u.`name` = #{activitySignVO.name} |
| | | </if> |
| | | <if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==1'> |
| | | AND u.is_partymember = 0 and a.is_volunteer=0 |
| | | </if> |
| | | <if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==2'> |
| | | AND u.is_partymember = 1 |
| | | </if> |
| | | <if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==3'> |
| | | AND a.is_volunteer=1 |
| | | </if> |
| | | <if test='activitySignVO.type != null and activitySignVO.type != 0'> |
| | | AND a.is_volunteer=#{activitySignVO.type}-1 |
| | | </if> |
| | | order by a.create_at desc |
| | | </select> |
| | | <select id="selectList" resultType="com.panzhihua.common.model.vos.community.ActivitySignVO"> |
| | | SELECT s.*, r.times, r.times * r.award AS award FROM `com_act_act_sign` s |
| | | LEFT JOIN ( |
| | | SELECT * FROM ( |
| | | SELECT * FROM com_act_act_regist |
| | | WHERE user_id = #{userId} AND type = 1 |
| | | ORDER BY id DESC LIMIT 1000000 |
| | | ) temp GROUP BY activity_id |
| | | ) r ON s.activity_id = r.activity_id |
| | | WHERE s.user_id = #{userId} AND s.status = 1 |
| | | </select> |
| | | <select id="listSignInRecord" resultType="com.panzhihua.common.model.vos.community.ActivitySignInRecordVO"> |
| | | SELECT s.activity_id, s.create_at, s.user_id, u.name, a.limit, r.type, r.times |
| | | FROM com_act_act_sign s |
| | | LEFT JOIN sys_user u ON s.user_id = u.user_id |
| | | LEFT JOIN com_act_activity a ON s.activity_id = a.id |
| | | LEFT JOIN ( |
| | | SELECT * FROM ( |
| | | SELECT * FROM com_act_act_regist |
| | | WHERE activity_id = #{id} AND type = 1 |
| | | ORDER BY id DESC LIMIT 1000000 |
| | | ) temp GROUP BY activity_id, user_id |
| | | ) r ON s.activity_id = r.activity_id AND s.user_id = r.user_id |
| | | WHERE s.activity_id = #{id} |
| | | </select> |
| | | </mapper> |
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.ComActActivityCodeDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.ComActActivityCode" id="ComActActivityCodeBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="activityId" column="activity_id"/> |
| | | <result property="code" column="code"/> |
| | | <result property="status" column="status"/> |
| | | <result property="createTime" column="create_time"/> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="cancel_reason" property="cancelReason" /> |
| | | <result column="range" property="range" /> |
| | | <result column="have_integral_reward" property="haveIntegralReward" /> |
| | | <result column="reward_way" property="rewardWay" /> |
| | | <result column="reward_integral" property="rewardIntegral" /> |
| | | <result column="limit" property="limit" /> |
| | | <result column="can_cancel" property="canCancel" /> |
| | | <result column="cancel_deduct" property="cancelDeduct" /> |
| | | <result column="activity_type" property="activityType" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, activity_name, sponsor_id, activity_addr, lat, lng, status, publish_at, end_at, begin_at, sign_up_begin, sign_up_end, aattend_people, volunteer_min, volunteer_max, participant_min, participant_max, cover, has_prize, is_qr_code, contact_name, contact_phone, is_regist, is_top, prize_remark, reward_desc, content, community_id, create_at, cancel_reason |
| | | </sql> |
| | | <insert id="addActivityType"> |
| | | INSERT INTO com_act_activity_type (`name`, `type`, community_id) |
| | | VALUES (#{comActActivityTypeVO.name}, #{comActActivityTypeVO.type}, #{comActActivityTypeVO.communityId}) |
| | | </insert> |
| | | |
| | | <select id="activityStatistics" resultType="com.panzhihua.common.model.vos.community.ComActActivityStatisticsVO"> |
| | | SELECT IFNULL(volunteer_max,0) + IFNULL(participant_max,0) as signTotal |
| | | ,(SELECT count(id) FROM com_act_act_sign WHERE activity_id = #{activityId}) as reallySignTotal |
| | | ,(SELECT count(id) FROM com_act_act_sign WHERE activity_id = #{activityId}) as registTotal |
| | | ,(SELECT count(id) FROM com_act_act_sign WHERE activity_id = #{activityId} AND `status` = 1) as reallySignTotal |
| | | ,(SELECT count(id) FROM com_act_act_sign WHERE activity_id = #{activityId} AND `status` = 1) as registTotal |
| | | ,(SELECT count(id) FROM com_act_act_regist WHERE activity_id = #{activityId}) as reallyRegistTotal |
| | | ,((SELECT count(id) FROM com_act_act_sign WHERE activity_id = #{activityId}) - (SELECT count(id) FROM com_act_act_regist WHERE activity_id = #{activityId})) as noRegistTotal |
| | | ,(SELECT count(id) FROM com_act_act_sign WHERE activity_id = #{activityId}) as evaluateTotal |
| | | ,((SELECT count(id) FROM com_act_act_sign WHERE activity_id = #{activityId} AND `status` = 1) - (SELECT count(id) FROM com_act_act_regist WHERE activity_id = #{activityId})) as noRegistTotal |
| | | ,(SELECT count(id) FROM com_act_act_sign WHERE activity_id = #{activityId} AND `status` = 1) as evaluateTotal |
| | | ,(SELECT count(id) FROM com_act_act_evaluate WHERE activity_id = #{activityId}) as reallyEvaluateTotal |
| | | ,((SELECT count(id) FROM com_act_act_sign WHERE activity_id = #{activityId}) - (SELECT count(id) FROM com_act_act_evaluate WHERE activity_id = #{activityId})) as noEvaluateTotal |
| | | ,((SELECT count(id) FROM com_act_act_sign WHERE activity_id = #{activityId} AND `status` = 1) - (SELECT count(id) FROM com_act_act_evaluate WHERE activity_id = #{activityId})) as noEvaluateTotal |
| | | FROM com_act_activity where id = #{activityId} |
| | | </select> |
| | | <select id="getIndexTopActivityList" resultMap="BaseResultMap"> |
| | | SELECT * FROM `com_act_activity` |
| | | WHERE community_id = #{communityId} and is_top = 1 and sign_up_end >= now() |
| | | </select> |
| | | <select id="pageActivityCommunityBack" |
| | | resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT t.* FROM ( |
| | | SELECT a.id, a.activity_name, u.`name` sponsorName, a.activity_addr, a.participant_max, a.contact_name, |
| | | COUNT(if(s.is_volunteer=1,NULL,s.id))participant_now, a.volunteer_max, |
| | | COUNT(if(s.is_volunteer=1,s.id,NULL))volunteer_now, a.`status`, a.publish_at, a.is_qr_code, |
| | | a.begin_at, a.end_at, a.sign_up_begin, a.sign_up_end, a.reward_way, a.activity_type, a.have_integral_reward |
| | | FROM com_act_activity a |
| | | LEFT JOIN sys_user u ON a.sponsor_id=u.user_id |
| | | LEFT JOIN (SELECT * FROM com_act_act_sign WHERE `status` = 1) s ON a.id=s.activity_id |
| | | WHERE a.`status` = 1 AND a.community_id=#{comActActivityVO.communityId} |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 1'> |
| | | AND a.volunteer_max != 0 |
| | | </if> |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 2'> |
| | | AND a.volunteer_max = 0 |
| | | </if> |
| | | <if test='comActActivityVO.rewardWay != null and comActActivityVO.rewardWay != 0'> |
| | | AND a.reward_way = #{comActActivityVO.rewardWay} |
| | | </if> |
| | | <if test='comActActivityVO.activityType != null and comActActivityVO.activityType !=""'> |
| | | AND a.activity_type = #{comActActivityVO.activityType} |
| | | </if> |
| | | <if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'> |
| | | AND a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) |
| | | </if> |
| | | <if test='comActActivityVO.status != null and comActActivityVO.status !=0 and comActActivityVO.status !=1'> |
| | | AND a.`status` = 99 |
| | | </if> |
| | | <if test='comActActivityVO.beginAt != null '> |
| | | AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} |
| | | </if> |
| | | GROUP BY a.id |
| | | UNION ALL SELECT t1.* FROM ( |
| | | SELECT a.id, a.activity_name, u.`name` sponsorName, a.activity_addr, a.participant_max, a.contact_name, |
| | | COUNT(if(s.is_volunteer=1,NULL,s.id))participant_now, a.volunteer_max, |
| | | COUNT(if(s.is_volunteer=1,s.id,NULL))volunteer_now, a.`status`, a.publish_at, |
| | | a.is_qr_code, a.begin_at, a.end_at, a.sign_up_begin, a.sign_up_end, a.reward_way, a.activity_type, a.have_integral_reward |
| | | FROM com_act_activity a |
| | | LEFT JOIN sys_user u ON a.sponsor_id=u.user_id |
| | | LEFT JOIN (SELECT * FROM com_act_act_sign WHERE `status` = 1) s ON a.id=s.activity_id |
| | | WHERE a.`status` != 1 AND a.community_id=#{comActActivityVO.communityId} |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 1'> |
| | | AND a.volunteer_max != 0 |
| | | </if> |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 2'> |
| | | AND a.volunteer_max = 0 |
| | | </if> |
| | | <if test='comActActivityVO.rewardWay != null and comActActivityVO.rewardWay != 0'> |
| | | AND a.reward_way = #{comActActivityVO.rewardWay} |
| | | </if> |
| | | <if test='comActActivityVO.activityType != null and comActActivityVO.activityType !=""'> |
| | | AND a.activity_type = #{comActActivityVO.activityType} |
| | | </if> |
| | | <if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'> |
| | | AND a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) |
| | | </if> |
| | | <if test='comActActivityVO.status != null and comActActivityVO.status !=0 '> |
| | | AND a.`status` = #{comActActivityVO.status} |
| | | </if> |
| | | <if test='comActActivityVO.beginAt != null '> |
| | | AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} |
| | | </if> |
| | | GROUP BY a.id ORDER BY a.publish_at DESC |
| | | )t1 |
| | | )t |
| | | </select> |
| | | <select id="inforActivity" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT u.name sponsorName, ca.name communityName, |
| | | count(if(s.is_volunteer=1,s.id,null))volunteer_now, count(if(s.is_volunteer=0,s.id,null))participant_now, a.* |
| | | FROM com_act_activity a |
| | | left join sys_user u on a.sponsor_id=u.user_id |
| | | left join (select * from com_act_act_sign where `status` = 1) s on a.id=s.activity_id |
| | | left join com_act ca on a.community_id=ca.community_id where a.id = #{id} group by a.id |
| | | </select> |
| | | <select id="listActivityType" resultType="com.panzhihua.common.model.vos.community.ComActActivityTypeVO"> |
| | | SELECT * FROM com_act_activity_type WHERE `type` = #{type} AND community_id = #{communityId} ORDER BY id ASC |
| | | </select> |
| | | </mapper> |
| | |
| | | JOIN sys_user u ON c.user_id = u.user_id |
| | | LEFT JOIN com_act_discuss_comment_user cu ON c.id=cu.disscuss_comment_id |
| | | WHERE |
| | | FIND_IN_SET( |
| | | c.id, |
| | | getChildren ( #{parentId} )) AND c.parent_id != 0 AND c.is_del = 2 |
| | | c.parent_id = #{parentId} AND c.is_del = 2 |
| | | GROUP BY c.id |
| | | ORDER BY create_at desc |
| | | </select> |
| | |
| | | order by cadc.create_at desc |
| | | limit 10 |
| | | </select> |
| | | <select id="selectTypePercent" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT t1.filed, t1.num, ROUND( t1.num / t2.sum * 100, 2 ) AS percent |
| | | FROM |
| | | (SELECT IF(`type` = 1,'议事','投票') AS filed, COUNT(id) AS num FROM com_act_discuss |
| | | WHERE community_id = #{communityId} AND is_del = 2 GROUP BY filed) t1, |
| | | (SELECT COUNT(id) AS sum FROM com_act_discuss WHERE community_id = #{communityId} AND is_del = 2) t2 |
| | | </select> |
| | | <select id="getTitles" resultType="java.lang.String"> |
| | | SELECT discuss_subject FROM com_act_discuss WHERE community_id = #{communityId} AND `type` = #{type} AND is_del = 2 ORDER BY release_at DESC limit #{pageSize} |
| | | </select> |
| | | <select id="countByCommunityId" resultType="Map"> |
| | | SELECT |
| | | COUNT( id ) AS totalNum, |
| | | ( |
| | | SELECT |
| | | COUNT( id ) |
| | | FROM |
| | | com_act_discuss |
| | | WHERE |
| | | community_id = #{communityId} |
| | | AND create_at BETWEEN DATE_ADD(curdate(),interval -day(curdate())+1 day) |
| | | AND now()) AS currentNum, |
| | | ( SELECT COUNT( id ) FROM com_act_discuss WHERE community_id = #{communityId} AND TYPE = 1 ) AS imgNum, |
| | | ( |
| | | SELECT |
| | | count( DISTINCT cadc.user_id ) |
| | | FROM |
| | | com_act_discuss_comment AS cadc |
| | | LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id |
| | | WHERE |
| | | cad.type = 1 |
| | | AND cad.community_id = #{communityId} |
| | | ) AS imgPeopleNum, |
| | | ( |
| | | SELECT |
| | | count( user_id ) |
| | | FROM |
| | | ( |
| | | SELECT DISTINCT |
| | | cadc.user_id |
| | | FROM |
| | | com_act_discuss_comment AS cadc |
| | | LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id |
| | | WHERE |
| | | cad.type = 2 |
| | | AND cad.community_id = #{communityId} UNION ALL |
| | | SELECT DISTINCT |
| | | cadou.user_id |
| | | FROM |
| | | com_act_discuss_option_user AS cadou |
| | | LEFT JOIN com_act_discuss_option AS cado ON cado.id = cadou.discuss_option_id |
| | | LEFT JOIN com_act_discuss AS cad ON cad.id = cado.discuss_id |
| | | WHERE |
| | | cad.community_id = #{communityId} |
| | | ) t |
| | | ) AS votePeopleNum |
| | | FROM |
| | | com_act_discuss |
| | | WHERE |
| | | community_id = #{communityId} |
| | | </select> |
| | | |
| | | </mapper> |
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.ComActDynDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActDynDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="title" property="title" /> |
| | | <result column="status" property="status" /> |
| | | <result column="is_topping" property="isTopping" /> |
| | | <result column="publish_at" property="publishAt" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="content" property="content" /> |
| | | <result column="cover" property="cover" /> |
| | | <result column="type" property="type" /> |
| | | <result column="cover_mode" property="coverMode" /> |
| | | <result column="jump_url" property="jumpUrl" /> |
| | | <result column="jump_type" property="jumpType" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id |
| | | </sql> |
| | | <select id="getIndexDynBaseData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT filed, num, ROUND(num/total,2) AS percent FROM |
| | | (SELECT t2.`name` AS filed, COUNT(1) AS num FROM com_act_dyn t1 |
| | | LEFT JOIN com_act_dyn_type t2 ON t1.type = t2.id |
| | | WHERE t1.community_id = #{communityId} AND t1.`status` = 1 GROUP BY filed) temp1, |
| | | (SELECT COUNT(t1.id) AS total FROM com_act_dyn t1 |
| | | LEFT JOIN com_act_dyn_type t2 ON t1.type = t2.id |
| | | 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 |
| | | FROM com_act_dyn |
| | | WHERE community_id = #{communityId} AND `status` = 1 |
| | | AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed |
| | | </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} |
| | | </select> |
| | | <select id="indexDynList" resultType="com.panzhihua.common.model.vos.community.ComActDynVO"> |
| | | SELECT t1.id, t1.title, t1.cover, t2.`name` AS typeName |
| | | FROM com_act_dyn t1 |
| | | LEFT JOIN com_act_dyn_type t2 ON t1.type = t2.id |
| | | WHERE t1.community_id = #{pageBaseDTO.communityId} AND t1.`status` = 1 AND t2.is_del = 2 |
| | | <if test="pageBaseDTO.paramId != null"> |
| | | AND t1.type = #{pageBaseDTO.paramId} |
| | | </if> |
| | | ORDER BY t1.id DESC |
| | | </select> |
| | | </mapper> |
| | |
| | | (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 3 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as ptDayTotal, |
| | | (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 4) as ybAllTotal, |
| | | (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 4 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as ybDayTotal, |
| | | (select IFNULL(sum(activity_amount),0) from com_act_easy_photo where `status` in (2,4) AND community_id = 2 and del_tag = 0) as allRewardAmount, |
| | | (select IFNULL(sum(activity_amount),0) from com_act_easy_photo where `status` in (2,4) AND community_id = 2 and del_tag = 0 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as dayRewardAmount |
| | | (select IFNULL(sum(activity_amount),0) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0) as allRewardAmount, |
| | | (select IFNULL(sum(activity_amount),0) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as dayRewardAmount |
| | | FROM |
| | | com_act_easy_photo |
| | | WHERE |
| | |
| | | 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> |
| | | <select id="selectResidentAutonomyStatistics" |
| | | resultType="com.panzhihua.common.model.vos.community.bigscreen.ResidentAutonomyStatisticsVO"> |
| | | SELECT * FROM |
| | | (SELECT COUNT(id) AS easyPhotoCurrentMonCount FROM com_act_easy_photo WHERE community_id = #{communityId} AND del_tag = 0 AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t1, |
| | | (SELECT COUNT(id) AS microWishCurrentMonCount FROM com_act_micro_wish WHERE community_id = #{communityId} AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t2, |
| | | (SELECT IF(SUM(aim_num) IS NULL,0,SUM(aim_num)) AS aimNum FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` != 4) t3, |
| | | (SELECT COUNT(id) AS microWishTotal FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` != 4) t4, |
| | | (SELECT COUNT(id) AS committeeCurrentMonCount FROM com_act_committee WHERE community_id = #{communityId} AND DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t5, |
| | | (SELECT COUNT(id) AS committeeTotal FROM com_act_committee WHERE community_id = #{communityId}) t6, |
| | | (SELECT ROUND( a.num / b.total * 100, 2 ) AS areaCoverPercent FROM |
| | | (SELECT COUNT(DISTINCT(area_id)) AS num FROM com_act_committee WHERE community_id = #{communityId}) a, |
| | | (SELECT COUNT(village_id) AS total FROM com_mng_village WHERE community_id = #{communityId}) b |
| | | ) t7, |
| | | (SELECT COUNT(id) AS discussCurrentMonCount FROM com_act_discuss WHERE community_id = #{communityId} AND is_del = 2 AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t8, |
| | | (SELECT COUNT(id) AS discussTotal FROM com_act_discuss WHERE community_id = #{communityId} AND is_del = 2) t9, |
| | | (SELECT COUNT(id) AS neighborCurrentMonCount FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND is_del = 2 AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t10, |
| | | (SELECT COUNT(id) AS neighborTotal, SUM(fabulous_num) AS neighborFabulousNum, SUM(forward_num) AS neighborForwardNum, |
| | | SUM(comment_num) AS neighborCommentNum FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND is_del = 2) t11, |
| | | (SELECT COUNT(c1.id) AS repairCurrentMonCount FROM com_property_repair c1 |
| | | LEFT JOIN com_property c2 ON c1.property_id = c2.id |
| | | WHERE c2.community_id = #{communityId} AND DATE_FORMAT( c1.create_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t12, |
| | | (SELECT COUNT(c1.id) AS repairTotal FROM com_property_repair c1 |
| | | LEFT JOIN com_property c2 ON c1.property_id = c2.id |
| | | WHERE c2.community_id = #{communityId}) t13, |
| | | (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) AS warehouseCurrentMonCount FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2 AND DATE_FORMAT( signing_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t14, |
| | | (SELECT warehouseTotal, warehouseSurplusTotal, warehouseTotal - warehouseSurplusTotal AS warehouseApplyTotal FROM |
| | | (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) AS warehouseTotal, IF(SUM(surplus_quantity) IS NULL,0,SUM(surplus_quantity)) AS warehouseSurplusTotal FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2) temp) t15, |
| | | (SELECT COUNT(DISTINCT d2.user_id) AS discussCount FROM com_act_discuss d1 |
| | | INNER JOIN com_act_discuss_comment d2 ON d1.id = d2.discuss_id |
| | | WHERE d1.community_id = #{communityId} AND d1.is_del = 2 AND `type` = 1) t16, |
| | | (SELECT COUNT(DISTINCT d2.user_id) AS voteCount FROM com_act_discuss d1 |
| | | INNER JOIN com_act_discuss_option_user d2 ON d1.id = d2.discuss_id |
| | | WHERE d1.community_id = #{communityId} AND d1.is_del = 2 AND `type` = 2) t17 |
| | | </select> |
| | | <select id="selectGridsGovernance" |
| | | resultType="com.panzhihua.common.model.vos.community.bigscreen.GridsGovernanceStatisticsVO"> |
| | | SELECT |
| | | IFNULL((SELECT count( e.id ) FROM `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE e.event_category = 1 AND e.event_type = 5 AND e.event_status = 2 AND egd.grid_community_id = #{communityId}), 0) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 7), 0) AS eventTFTotal, |
| | | |
| | | IFNULL(( SELECT count( e1.id ) FROM `event` AS e1 |
| | | LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id WHERE event_category = 1 AND event_type = 1 AND event_status = 2 AND egd1.grid_community_id = #{communityId} ), 0 ) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 4), 0) AS eventZATotal, |
| | | |
| | | IFNULL(( SELECT count( e2.id ) FROM `event` AS e2 LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id WHERE event_category = 1 AND event_type = 3 AND event_status = 2 AND egd2.grid_community_id = #{communityId} ), 0 ) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 5), 0) AS eventMDTotal, |
| | | |
| | | IFNULL(( SELECT count( e3.id ) FROM `event` AS e3 LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id WHERE event_category = 1 AND event_type = 6 AND event_status = 2 AND egd3.grid_community_id = #{communityId} ), 0 ) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 3), 0) AS eventTSTotal, |
| | | |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 8), 0) AS eventFJTotal, |
| | | |
| | | IFNULL(( SELECT count( e5.id ) FROM `event` AS e5 LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id WHERE event_category = 1 AND event_type = 2 AND event_status = 2 AND egd5.grid_community_id = #{communityId} ), 0 ) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 6), 0) AS eventMSTotal, |
| | | |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 1), 0) AS otherTotal, |
| | | |
| | | IFNULL((SELECT count( e.id ) FROM `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE e.event_category = 1 AND e.event_type = 5 AND e.event_deal_status = 4 AND egd.grid_community_id = #{communityId}), 0) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 7), 0) AS eventTFDeal, |
| | | |
| | | IFNULL(( SELECT count( e1.id ) FROM `event` AS e1 |
| | | LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id WHERE event_category = 1 AND event_type = 1 AND event_deal_status = 4 AND egd1.grid_community_id = #{communityId} ), 0 ) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 4), 0) AS eventZADeal, |
| | | |
| | | IFNULL(( SELECT count( e2.id ) FROM `event` AS e2 LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id WHERE event_category = 1 AND event_type = 3 AND event_deal_status = 4 AND egd2.grid_community_id = #{communityId} ), 0 ) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 5), 0) AS eventMDDeal, |
| | | |
| | | IFNULL(( SELECT count( e3.id ) FROM `event` AS e3 LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id WHERE event_category = 1 AND event_type = 6 AND event_deal_status = 4 AND egd3.grid_community_id = #{communityId} ), 0 ) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 3), 0) AS eventTSDeal, |
| | | |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 8), 0) AS eventFJDeal, |
| | | |
| | | IFNULL(( SELECT count( e5.id ) FROM `event` AS e5 LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id WHERE event_category = 1 AND event_type = 2 AND event_deal_status = 4 AND egd5.grid_community_id = #{communityId} ), 0 ) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 6), 0) AS eventMSDeal, |
| | | |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 1), 0) AS otherDeal, |
| | | IFNULL((SELECT count(id) FROM event_grid_data WHERE grid_community_id = #{communityId}), 0) AS gridTotal, |
| | | IFNULL((select count(egmr.id) from event_grid_member_relation as egmr left join event_grid_data as egd1 on egd1.id = egmr.grid_id where egd1.grid_community_id = #{communityId}), 0) AS gridMemberTotal |
| | | </select> |
| | | <select id="selectIndexEasyPhotoBaseData" |
| | | resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenEasyPhotoStatisticsInfo"> |
| | | SELECT |
| | | (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8)) AS eventDealTotal, |
| | | (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 7) AS eventTFDeal, |
| | | (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 4) AS eventZADeal, |
| | | (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 5) AS eventMDDeal, |
| | | (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 3) AS eventTSDeal, |
| | | (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 6) AS eventMSDeal, |
| | | (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 8) AS eventFJDeal, |
| | | (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 1) AS otherDeal |
| | | </select> |
| | | <select id="getEasyPhotoAddPolylineData" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT DATE_FORMAT( create_at, '%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 |
| | | </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} |
| | | </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 |
| | | FROM com_act_easy_photo t1 |
| | | LEFT JOIN com_act_easy_photo_classify t2 ON t1.classify_id = t2.id |
| | | WHERE t1.community_id = #{pageBaseDTO.communityId} AND t1.`status` = 4 AND t1.del_tag = 0 |
| | | <if test="pageBaseDTO.paramId != null"> |
| | | AND t1.classify_id = #{pageBaseDTO.paramId} |
| | | </if> |
| | | ORDER BY t1.id DESC |
| | | </select> |
| | | |
| | | <select id="selectBigscreenGridsGovern" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigscreenGridsGovernanceStatisticsVO"> |
| | | SELECT |
| | | IFNULL((SELECT count( e.id ) FROM `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE e.event_category = 1 AND e.event_type = 5 AND e.event_status = 2 AND egd.grid_community_id = #{communityId}), 0) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 7), 0) AS eventTFTotal, |
| | | |
| | | IFNULL(( SELECT count( e1.id ) FROM `event` AS e1 |
| | | LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id WHERE event_category = 1 AND event_type = 1 AND event_status = 2 AND egd1.grid_community_id = #{communityId} ), 0 ) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 4), 0) AS eventZATotal, |
| | | |
| | | IFNULL(( SELECT count( e2.id ) FROM `event` AS e2 LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id WHERE event_category = 1 AND event_type = 3 AND event_status = 2 AND egd2.grid_community_id = #{communityId} ), 0 ) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 5), 0) AS eventMDTotal, |
| | | |
| | | IFNULL(( SELECT count( e3.id ) FROM `event` AS e3 LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id WHERE event_category = 1 AND event_type = 6 AND event_status = 2 AND egd3.grid_community_id = #{communityId} ), 0 ) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 3), 0) AS eventTSTotal, |
| | | |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 8), 0) AS eventFJTotal, |
| | | |
| | | IFNULL(( SELECT count( e5.id ) FROM `event` AS e5 LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id WHERE event_category = 1 AND event_type = 2 AND event_status = 2 AND egd5.grid_community_id = #{communityId} ), 0 ) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 6), 0) AS eventMSTotal, |
| | | |
| | | IFNULL(( SELECT count( e5.id ) FROM `event` AS e5 LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id WHERE event_category = 1 AND event_type = 8 AND event_status = 2 AND egd5.grid_community_id = #{communityId} ), 0 ) + |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 2), 0) AS eventFGTotal, |
| | | |
| | | IFNULL((SELECT COUNT(1) FROM com_act_easy_photo |
| | | WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 1), 0) AS otherTotal, |
| | | IFNULL((SELECT count( e.id ) FROM `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE e.event_category = 1 AND e.event_status = 2 AND egd.grid_community_id = #{communityId}), 0) AS eventTotal, |
| | | |
| | | IFNULL((SELECT count(id) FROM com_sw_patrol_record WHERE community_id = #{communityId}), 0) AS safety |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </select> |
| | | |
| | | <select id="getTaskActivityPeopleList" resultType="com.panzhihua.common.model.vos.community.integral.admin.ComActActivityPeopleVO"> |
| | | select caas.user_id,caas.activity_id,caa.community_id,caas.is_volunteer from com_act_act_sign as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.id = #{activityId} |
| | | select caas.user_id,caas.activity_id,caa.community_id,caas.is_volunteer |
| | | from (SELECT * FROM com_act_act_sign WHERE `status` = 1) as caas |
| | | left join com_act_activity as caa on caa.id = caas.activity_id |
| | | left join com_act_act_regist AS caar ON caas.user_id = caar.user_id AND caas.activity_id = caar.activity_id |
| | | where caa.id = #{activityId} AND caar.id IS NULL |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | ORDER BY w.create_at desc |
| | | </select> |
| | | <select id="selectRealizePercent" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT t1.filed, t1.num, ROUND( t1.num / t2.sum * 100, 2 ) AS percent |
| | | FROM |
| | | (SELECT IF(`status` = 6,'已实现','待实现') AS filed, COUNT(`status`) AS num FROM com_act_micro_wish |
| | | WHERE community_id = #{communityId} AND `status` NOT IN(1,4) GROUP BY filed) t1, |
| | | (SELECT COUNT(id) AS sum FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4)) t2 |
| | | </select> |
| | | <select id="getPassedAllImages" resultType="java.lang.String"> |
| | | SELECT photo_path_list FROM com_act_micro_wish |
| | | WHERE community_id = #{communityId} AND (`status` =2 OR `status` = 3 OR `status` = 5 OR `status` = 6 OR `status` = 7) |
| | | AND photo_path_list IS NOT NULL AND photo_path_list != '' |
| | | ORDER BY create_at DESC limit #{pageSize} |
| | | </select> |
| | | <select id="selectIndexMicroWishBaseData" |
| | | resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenMicroWishStatisticsInfo"> |
| | | SELECT |
| | | (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4)) AS microWishTotal, |
| | | (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` = 6) AS microWishRealized, |
| | | (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4,6)) AS microWishUnrealized |
| | | </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> |
| | | <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} |
| | | </select> |
| | | <select id="selectScreenDisplayList" |
| | | resultType="com.panzhihua.common.model.vos.community.ComActMicroWishVO"> |
| | | SELECT id, `status`, detail, photo_path_list |
| | | FROM com_act_micro_wish |
| | | WHERE community_id = #{pageBaseDTO.communityId} AND `status` NOT IN(1,4) ORDER BY create_at DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | case when nc.`status`=1 then 0 else 1 end, |
| | | nc.`status` asc,nc.create_at desc |
| | | </select> |
| | | <select id="getAllImages" resultType="java.lang.String"> |
| | | SELECT release_images FROM com_act_neighbor_circle |
| | | WHERE community_id = #{communityId} AND `status` = 2 AND release_images IS NOT NULL AND release_images != '' |
| | | ORDER BY create_at DESC limit #{pageSize} |
| | | </select> |
| | | <select id="getContents" resultType="java.lang.String"> |
| | | SELECT release_content FROM com_act_neighbor_circle |
| | | WHERE community_id = #{communityId} AND `status` = 2 AND release_content IS NOT NULL AND release_content != '' |
| | | ORDER BY create_at DESC limit #{pageSize} |
| | | </select> |
| | | <select id="getIndexNeighborBaseData" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT filed, num, ROUND(num/total,2) AS percent FROM |
| | | (SELECT IF(t2.`name` IS NULL,'无话题',t2.`name`) AS filed, COUNT(1) 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) GROUP BY filed) temp1, |
| | | (SELECT COUNT(t1.id) AS total 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)) temp2 |
| | | </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 |
| | | 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 |
| | | </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} |
| | | </select> |
| | | <select id="indexNeighborList" |
| | | resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO"> |
| | | SELECT t1.id, t1.release_content, t1.release_images, t1.comment_num, t1.fabulous_num, t2.`name` AS topicName |
| | | FROM com_act_neighbor_circle t1 |
| | | LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id |
| | | WHERE t1.community_id = #{pageBaseDTO.communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL) |
| | | <if test="pageBaseDTO.paramId != null"> |
| | | AND t1.topic_id = #{pageBaseDTO.paramId} |
| | | </if> |
| | | ORDER BY t1.id DESC |
| | | </select> |
| | | |
| | | </mapper> |
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.ComActPictureLibraryDAO"> |
| | | |
| | | <select id="getPresetPictureLibrary" resultType="java.lang.String"> |
| | | SELECT upload_picture FROM com_act_picture_library t1 |
| | | LEFT JOIN com_act_library_type t2 ON t1.library_type_id = t2.id |
| | | WHERE t2.type = #{type} AND t2.subtype = #{subtype} |
| | | </select> |
| | | </mapper> |
| | |
| | | su.is_volunteer = 1 |
| | | AND caqua.questnaire_id = #{questId} |
| | | </select> |
| | | |
| | | <select id="getIndexQuestionnaireBaseData" |
| | | resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenQuestionnaireStatisticsInfo"> |
| | | SELECT COUNT(id) AS questionnaireNum, SUM(join_count) AS joinNum FROM com_act_questnaire WHERE community_id = #{communityId} AND state IN (2,3) |
| | | </select> |
| | | <select id="getQuestionnaireAddPolylineData" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT DATE_FORMAT( create_at, '%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 |
| | | </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} |
| | | </select> |
| | | <select id="selectQuestionnaireDisplayList" |
| | | resultType="com.panzhihua.common.model.vos.community.ComActQuestnaireVO"> |
| | | SELECT id, title, `count`, view_num, join_count, is_cover, state FROM com_act_questnaire |
| | | WHERE community_id = #{pageBaseDTO.communityId} AND state IN (2,3) ORDER BY id DESC |
| | | </select> |
| | | <insert id="addNoNotice"> |
| | | insert into com_act_questnaire_user(questnaire_id,user_id,create_at) |
| | | values(#{questId},#{userId},now()) |
| | |
| | | select id,title,type,img_type,img_url,adver_position_top,adver_position_application from com_act_reserve where `status` = 2 and is_del = 2 |
| | | and community_id = #{communityId} |
| | | </select> |
| | | |
| | | <select id="indexBackReserve" resultType="Integer"> |
| | | select count(*) from com_act_reserve t LEFT JOIN com_act_reserve_record t3 on t.id=t3.reserve_id where t.community_id = #{communityId} and ( t.title like '%返攀登记%' or t.title like '%来攀登记%') |
| | | </select> |
| | | |
| | | <select id="indexHomeQuarantine" resultType="Integer"> |
| | | select count(*) from com_act_reserve t LEFT JOIN com_act_reserve_record t3 on t.id=t3.reserve_id where t.community_id = #{communityId} and t.title like '%居家隔离%' |
| | | </select> |
| | | |
| | | <select id="indexBackReserveSub" resultType="com.panzhihua.common.model.vos.community.bigscreen.IndexReserveSub"> |
| | | select a.*,IFNULL(b.num,0) num from (select count(t2.id) as allCount,t1.key from com_act_reserve t |
| | | LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id |
| | | LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id |
| | | where t.community_id = #{communityId} and ( t.title like '%返攀登记%' or t.title like '%来攀登记%') and t1.`key` in (1,2,3,17,19,26) group by t1.key) a LEFT JOIN |
| | | (select count(t2.id) as num,t1.key from com_act_reserve t |
| | | LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id |
| | | LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id |
| | | where t.community_id = #{communityId} and ( t.title like '%返攀登记%' or t.title like '%来攀登记%') and t1.`key` in (1,2,3,17,19,26) and t2.answer_content = '是' group by t1.key) b on a.key = b.key |
| | | </select> |
| | | |
| | | <select id="IndexHomeQuarantineSub" resultType="com.panzhihua.common.model.vos.community.bigscreen.IndexReserveSub"> |
| | | select a.*,IFNULL(b.num,0) num from (select count(t2.id) as allCount,t1.key from com_act_reserve t |
| | | LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id |
| | | LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id |
| | | where t.community_id = #{communityId} and t.title like '%居家隔离%' and t1.`key` in (12,14,16) group by t1.key) a LEFT JOIN |
| | | (select count(t2.id) as num,t1.key from com_act_reserve t |
| | | LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id |
| | | LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id |
| | | where t.community_id = #{communityId} and t.title like '%居家隔离%' and t1.`key` in (12,14,16) and t2.answer_content = '是' group by t1.key) b on a.key = b.key |
| | | </select> |
| | | </mapper> |
| | |
| | | </where> |
| | | order by create_at desc |
| | | </select> |
| | | |
| | | <select id="biggestScreen" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenStaticsReserve"> |
| | | 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}) 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 '%居家%' or t1.title like '%返攀%' or t1.title like '%来攀%' ) and t1.community_id =#{communityId}) epidemicCount, |
| | | (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}) 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}) 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}) 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}) reserveCount |
| | | </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> |
| | | </mapper> |
| | |
| | | (SELECT IF(SUM(goods_num) IS NULL,0,SUM(goods_num)) FROM com_act_warehouse_apply WHERE community_id = #{communityId} AND `status` = 3 AND actual_time LIKE #{currentMonth}) as mothDec, |
| | | (SELECT IF(SUM(goods_num) IS NULL,0,SUM(goods_num)) FROM com_act_warehouse_apply WHERE community_id = #{communityId} AND `status` = 3 AND actual_time LIKE #{today}) as dayDec |
| | | </select> |
| | | <select id="getWarehouseDonateRecords" resultType="java.lang.String"> |
| | | SELECT CONCAT('收到爱心人士捐赠的',item,'x', quantity) |
| | | FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2 ORDER BY signing_at DESC limit #{pageSize} |
| | | </select> |
| | | <select id="getWarehouseLoveTransfer" resultType="java.lang.String"> |
| | | SELECT t1.content FROM com_act_warehouse_operation t1 |
| | | LEFT JOIN com_act_warehouse_donates t2 ON t1.goods_id = t2.id |
| | | WHERE t2.community_id = #{communityId} AND t1.`type` = 2 ORDER BY create_time DESC limit #{pageSize} |
| | | </select> |
| | | <select id="getWarehouseImages" resultType="java.lang.String"> |
| | | SELECT image FROM com_act_warehouse_donates |
| | | WHERE community_id = #{communityId} AND `status` = 2 AND image IS NOT NULL AND image != '' ORDER BY signing_at DESC limit #{pageSize} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | order by cear.create_at desc |
| | | </select> |
| | | |
| | | <select id="export" resultType="com.panzhihua.common.model.vos.community.ComElderAuthRecordVO"> |
| | | SELECT |
| | | cear.id, |
| | | su.`name` submitUserName, |
| | | ceae.phone, |
| | | ceae.`name`, |
| | | ceae.id_card, |
| | | ceae.sex, |
| | | ceae.birthday, |
| | | ceae.personnel_category, |
| | | cear.address, |
| | | ceae.is_alive, |
| | | cear.auth_method, |
| | | cear.auth_period, |
| | | cear.auth_video, |
| | | cear.auth_date, |
| | | cear.mark, |
| | | cear.approval_status, |
| | | cear.approver_id, |
| | | su1.`name` as approverName, |
| | | cear.approval_date, |
| | | cear.auth_status |
| | | FROM |
| | | com_elder_auth_records cear |
| | | LEFT JOIN com_elder_auth_elderlies ceae ON cear.elderlies_id = ceae.id |
| | | LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id |
| | | LEFT JOIN sys_user su1 ON cear.approver_id = su1.user_id |
| | | WHERE |
| | | ceae.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | | and cear.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authMethod != null and pageElderAuthRecordsDTO.authMethod != 0"> |
| | | and cear.auth_method = #{pageElderAuthRecordsDTO.authMethod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateBegin != null and pageElderAuthRecordsDTO.authDateBegin != ''"> |
| | | and cear.auth_date <![CDATA[ >= ]]> #{pageElderAuthRecordsDTO.authDateBegin} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateEnd != null and pageElderAuthRecordsDTO.authDateEnd != ''"> |
| | | and cear.auth_date <![CDATA[ <= ]]> #{pageElderAuthRecordsDTO.authDateEnd} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.approvalStatus != null and pageElderAuthRecordsDTO.approvalStatus != 0"> |
| | | and cear.approval_status = #{pageElderAuthRecordsDTO.approvalStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authStatus != null and pageElderAuthRecordsDTO.authStatus != 0"> |
| | | and cear.auth_status = #{pageElderAuthRecordsDTO.authStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and ceae.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.isAlive != null and pageElderAuthRecordsDTO.isAlive != 0"> |
| | | and ceae.is_alive = #{pageElderAuthRecordsDTO.isAlive} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.searchKey != null and pageElderAuthRecordsDTO.searchKey != ''"> |
| | | and (ceae.`name` like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or cear.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or ceae.id_card = #{pageElderAuthRecordsDTO.idCard}) |
| | | </if> |
| | | order by cear.create_at desc |
| | | </select> |
| | | |
| | | <select id="detailElderAuthRecords" resultType="com.panzhihua.common.model.vos.community.ComElderAuthRecordVO"> |
| | | SELECT |
| | | su.`name` submitUserName, |
| | |
| | | cmv.`name` AS villageName, |
| | | cmv.house_num as doorNum, |
| | | (select count(distinct unit_no) from com_mng_population_house where village_id = cmb.village_id AND floor = cmb.`name`) as unit_total, |
| | | (select max(CAST(house_no as SIGNED)) from com_mng_population_house where village_id = cmb.village_id AND floor = cmb.`name`) as buildFloorSum, |
| | | (select count(id) from com_mng_population_house where village_id = cmb.village_id and floor = cmb.`name`) as houseNum, |
| | | (select max(CAST(house_no as SIGNED)) from com_mng_population_house where village_id = cmb.village_id AND floor = cmb.`name` AND `unit_no` is not null and house_no is not null) as buildFloorSum, |
| | | (select count(id) from com_mng_population_house where village_id = cmb.village_id and floor = cmb.`name` ) as houseNum, |
| | | (select count(id) from com_mng_population where village_id = cmb.village_id and floor = cmb.`name`) as populationNum |
| | | FROM |
| | | com_mng_building AS cmb |
| | |
| | | cmb.`name`, |
| | | cmv.`name` AS village, |
| | | cmv.village_id, |
| | | (select count(id) from com_mng_population_house where village_id = cmb.village_id and floor = cmb.`name`) as houseNum, |
| | | (select count(id) from com_mng_population_house where village_id = cmb.village_id and floor = cmb.`name` and `status` = 1) as liveTotal, |
| | | (select count(id) from com_mng_population_house where village_id = cmb.village_id and floor = cmb.`name` and `status` = 2) as leaseTotal, |
| | | (select count(id) from com_mng_population_house where village_id = cmb.village_id and floor = cmb.`name` and `status` = 3) as vacantNum |
| | | ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmb.village_id AND floor = cmb.`name` AND `unit_no` is not null and house_no is not null) AS houseNum, |
| | | ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmb.village_id AND floor = cmb.`name` AND `unit_no` is not null and house_no is not null AND `status` = 1 ) AS liveTotal, |
| | | ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmb.village_id AND floor = cmb.`name` AND `unit_no` is not null and house_no is not null AND `status` = 2 ) AS leaseTotal, |
| | | ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmb.village_id AND floor = cmb.`name` AND `unit_no` is not null and house_no is not null AND `status` = 3 ) AS vacantNum |
| | | FROM |
| | | com_mng_building AS cmb |
| | | LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmb.village_id |
| | |
| | | com_mng_population AS cmp |
| | | LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id |
| | | LEFT JOIN com_mng_population_community_tags AS cmpct ON cmp.id = cmpct.population_id |
| | | LEFT JOIN event_grid_data as egd on egd.grid_community_id = cmpct.community_id |
| | | WHERE |
| | | cmpct.community_id = #{populationListDTO.communityId} |
| | | egd.id = #{populationListDTO.gridId} |
| | | <if test = 'populationListDTO.keyWord != null and populationListDTO.keyWord != ""' > |
| | | AND (cmp.`name` LIKE concat (#{populationListDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationListDTO.keyWord},'%')) |
| | | </if> |
| | |
| | | FROM |
| | | com_act_work_guide |
| | | </select> |
| | | |
| | | |
| | | <select id="westScreenStatics" resultType="com.panzhihua.common.model.vos.community.bigscreen.WestScreenStatics"> |
| | | select ( SELECT count(*) FROM com_act_micro_wish AS camw LEFT JOIN com_act t1 on camw.community_id = t1.community_id |
| | | where t1.area_code ='510423' and camw.STATUS = 6 ) microWish , |
| | | (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 t.community_id is not null and t1.area_code ='510423') user, |
| | | (select count(id) from com_pb_org t LEFT JOIN com_act t1 on t.community_id = t1.community_id where parent_id = 0 and t1.area_code ='510423') partyOrg, |
| | | (select count(id) from com_pb_member t LEFT JOIN com_act t1 on t.community_id = t1.community_id where audit_result = 1 and t1.area_code ='510423') partyMember, |
| | | (select count(id) from com_mng_volunteer_mng t LEFT JOIN com_act t1 on t.community_id = t1.community_id where t.state = 2 and t1.area_code ='510423') volunteer, |
| | | (select count(id) from com_sw_patrol_record t LEFT JOIN com_act t1 on t.community_id = t1.community_id where t1.area_code ='510423') safety, |
| | | (select count(*) from com_act_reserve t LEFT JOIN com_act_reserve_record t1 on t.id = t1.reserve_id LEFT JOIN com_act t2 on t.community_id = t2.community_id where (title like '%居家隔离%' or title like '%返攀登记%' or title like '%来攀登记%') and t2.area_code ='510423' and t1.status = 2 ) reserve, |
| | | (select (select count(*) from com_act_activity t LEFT JOIN com_act t1 on t.community_id = t1.community_id where status !=6 and status !=1 and t1.area_code ='510423')+(select count(id) from com_pb_activity t LEFT JOIN com_act t1 on t.community_id = t1.community_id where status !=6 and status !=1 and t1.area_code ='510423')) activity, |
| | | (select count(*) from com_act_neighbor_circle t LEFT JOIN com_act t1 on t.community_id = t1.community_id |
| | | where is_del =2 and status=2 and t1.area_code ='510423') neighbor, |
| | | (select count(*) from com_act_discuss t LEFT JOIN com_act t1 on t.community_id = t1.community_id |
| | | where is_del =2 and t1.area_code ='510423') discuss |
| | | </select> |
| | | |
| | | <select id="getBasicsList" resultType="com.panzhihua.common.model.vos.community.screen.event.EventPopulationBasicsStatisticsVO"> |
| | | SELECT |
| | | ca.community_id, |
| | | ca.`name` AS communityName, |
| | | ( |
| | | SELECT |
| | | count( cmpct.id ) |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct |
| | | LEFT JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id |
| | | WHERE |
| | | cmpct.community_id = ca.community_id |
| | | ) AS populationNum, |
| | | ( SELECT count( village_id ) FROM com_mng_village AS cmv WHERE cmv.community_id = ca.community_id ) AS villageNum, |
| | | (select count(id) from com_mng_population_house as cmph where cmph.community_id = ca.community_id) as houseNum |
| | | FROM |
| | | com_act AS ca |
| | | LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id |
| | | <where> |
| | | and ca.area_code = '510423' and ca.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs.street_id = #{streetId} |
| | | </if> |
| | | </where> |
| | | order by cs.street_id desc,populationNum desc |
| | | </select> |
| | | |
| | | <select id="getPopulationSpecial" resultType="com.panzhihua.common.model.vos.community.screen.event.EventPopulationSpecialStatisticsVO"> |
| | | SELECT |
| | | count( cmpct.id ) AS cjTotal, |
| | | ( |
| | | SELECT |
| | | count( cmpct1.id ) |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct1 |
| | | LEFT JOIN com_act AS ca1 ON ca1.community_id = cmpct1.community_id |
| | | LEFT JOIN com_street AS cs1 ON cs1.street_id = ca1.street_id |
| | | WHERE |
| | | cmpct1.label LIKE '%低保户%' and ca1.area_code = '510423' and ca1.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs1.street_id = #{streetId} |
| | | </if> |
| | | ) as dbTotal , |
| | | ( |
| | | SELECT |
| | | count( cmpct3.id ) |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct3 |
| | | LEFT JOIN com_act AS ca3 ON ca3.community_id = cmpct3.community_id |
| | | LEFT JOIN com_street AS cs3 ON cs3.street_id = ca3.street_id |
| | | WHERE |
| | | cmpct3.label LIKE '%特殊情况(重大病史/孕)%' and ca3.area_code = '510423' and ca3.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs3.street_id = #{streetId} |
| | | </if> |
| | | ) as tsTotal , |
| | | ( |
| | | SELECT |
| | | count( cmpct4.id ) |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct4 |
| | | LEFT JOIN com_act AS ca4 ON ca4.community_id = cmpct4.community_id |
| | | LEFT JOIN com_street AS cs4 ON cs4.street_id = ca4.street_id |
| | | WHERE |
| | | cmpct4.label LIKE '%特扶家庭%' and ca4.area_code = '510423' and ca4.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs4.street_id = #{streetId} |
| | | </if> |
| | | ) as tfTotal, |
| | | ( |
| | | SELECT |
| | | count( cmpct5.id ) |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct5 |
| | | LEFT JOIN com_act AS ca5 ON ca5.community_id = cmpct5.community_id |
| | | LEFT JOIN com_street AS cs5 ON cs5.street_id = ca5.street_id |
| | | WHERE |
| | | cmpct5.label LIKE '%退役军人%' and ca5.area_code = '510423' and ca5.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs5.street_id = #{streetId} |
| | | </if> |
| | | ) as tyTotal, |
| | | ( |
| | | SELECT |
| | | count( cmpct7.id ) |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct7 |
| | | LEFT JOIN com_act AS ca7 ON ca7.community_id = cmpct7.community_id |
| | | LEFT JOIN com_street AS cs7 ON cs7.street_id = ca7.street_id |
| | | WHERE |
| | | cmpct7.label LIKE '%吸毒人员%' and ca7.area_code = '510423' and ca7.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs7.street_id = #{streetId} |
| | | </if> |
| | | ) as xdTotal, |
| | | ( |
| | | SELECT |
| | | count( cmpct8.id ) |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct8 |
| | | LEFT JOIN com_act AS ca8 ON ca8.community_id = cmpct8.community_id |
| | | LEFT JOIN com_street AS cs8 ON cs8.street_id = ca8.street_id |
| | | WHERE |
| | | cmpct8.label LIKE '%社区矫正%' and ca8.area_code = '510423' and ca8.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs8.street_id = #{streetId} |
| | | </if> |
| | | ) as jzTotal, |
| | | ( |
| | | SELECT |
| | | count( cmpct9.id ) |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct9 |
| | | LEFT JOIN com_act AS ca9 ON ca9.community_id = cmpct9.community_id |
| | | LEFT JOIN com_street AS cs9 ON cs9.street_id = ca9.street_id |
| | | WHERE |
| | | cmpct9.label LIKE '%邪教人员%' and ca9.area_code = '510423' and ca9.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs9.street_id = #{streetId} |
| | | </if> |
| | | ) as xjTotal, |
| | | ( |
| | | SELECT |
| | | count( cmpct10.id ) |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct10 |
| | | LEFT JOIN com_act AS ca10 ON ca10.community_id = cmpct10.community_id |
| | | LEFT JOIN com_street AS cs10 ON cs10.street_id = ca10.street_id |
| | | WHERE |
| | | cmpct10.label LIKE '%刑释人员%' and ca10.area_code = '510423' and ca10.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs10.street_id = #{streetId} |
| | | </if> |
| | | ) as xsTotal, |
| | | ( |
| | | SELECT |
| | | count( cmpct11.id ) |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct11 |
| | | LEFT JOIN com_act AS ca11 ON ca11.community_id = cmpct11.community_id |
| | | LEFT JOIN com_street AS cs11 ON cs11.street_id = ca11.street_id |
| | | WHERE |
| | | cmpct11.label LIKE '%上访人员%' and ca11.area_code = '510423' and ca11.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs11.street_id = #{streetId} |
| | | </if> |
| | | ) as sfTotal, |
| | | ( |
| | | SELECT |
| | | count( cmpct12.id ) |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct12 |
| | | LEFT JOIN com_act AS ca12 ON ca12.community_id = cmpct12.community_id |
| | | LEFT JOIN com_street AS cs12 ON cs12.street_id = ca12.street_id |
| | | WHERE |
| | | cmpct12.label LIKE '%精神障碍患者%' and ca12.area_code = '510423' and ca12.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs12.street_id = #{streetId} |
| | | </if> |
| | | ) as zjTotal |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct |
| | | LEFT JOIN com_act AS ca ON ca.community_id = cmpct.community_id |
| | | LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id |
| | | WHERE |
| | | cmpct.label LIKE '%残疾人%' and ca.area_code = '510423' and ca.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs.street_id = #{streetId} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getPopulationListCardNo" resultType="string"> |
| | | SELECT |
| | | cmp.card_no |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct |
| | | LEFT JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id |
| | | LEFT JOIN com_act AS ca ON ca.community_id = cmpct.community_id |
| | | LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id |
| | | <where> |
| | | and ca.area_code = '510423' and ca.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs.street_id = #{streetId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getPopulationAge" resultType="integer"> |
| | | select count(age) from ( |
| | | SELECT |
| | | YEAR (now()) - YEAR (substring(cmp.card_no_str, 7, 8)) age |
| | | FROM |
| | | com_mng_population_community_tags AS cmpct |
| | | LEFT JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id |
| | | LEFT JOIN com_act AS ca ON ca.community_id = cmpct.community_id |
| | | LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id |
| | | |
| | | <where> |
| | | and ca.area_code = '510423' and ca.is_screen_statistics = 1 |
| | | <if test="streetId != null and streetId != 0"> |
| | | and cs.street_id = #{streetId} |
| | | </if> |
| | | </where> |
| | | having age >= #{age} |
| | | ) as ageDual |
| | | </select> |
| | | |
| | | <select id="getComprehensiveStreetList" resultType="com.panzhihua.common.model.vos.community.screen.event.EventPopulationStreetVO"> |
| | | SELECT |
| | | street_id, |
| | | `name` |
| | | FROM |
| | | com_street |
| | | WHERE |
| | | area_code = '510423' |
| | | ORDER BY |
| | | create_at DESC |
| | | </select> |
| | | |
| | | <select id="baseInfo" resultType="com.panzhihua.common.model.vos.community.bigscreen.BaseInfo"> |
| | | select count(id) as population, |
| | | IFNULL((select count(id) from com_mng_population_house where community_id = cmpct.community_id),0) as house, |
| | | IFNULL((select count(id) from com_mng_real_company where community_id = cmpct.community_id),0) as company, |
| | | IFNULL((select count(DISTINCT `name`) from com_mng_village where community_id = cmpct.community_id),0) as village, |
| | | IFNULL((select count(user_id) from sys_user where community_id = cmpct.community_id and type=1),0) as user, |
| | | IFNULL((select count(id) from com_pb_member where community_id = cmpct.community_id and audit_result =1 ),0) as partyMember, |
| | | IFNULL((select count(id) from com_mng_volunteer_mng where community_id = cmpct.community_id and state=2 ),0) as volunteer, |
| | | IFNULL((select count(id) from com_pb_org where community_id = cmpct.community_id and parent_id = 0),0) as partyOrg |
| | | from com_mng_population_community_tags AS cmpct |
| | | where cmpct.community_id = #{communityId} |
| | | </select> |
| | | |
| | | <select id="indexDynamic" resultType="com.panzhihua.common.model.vos.community.bigscreen.IndexDynamic"> |
| | | SELECT count( id ) AS microWish, |
| | | IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE status in (1,2,4) and del_tag = 0 AND community_id = camw.community_id ),0) AS easyPhoto, |
| | | IFNULL(( SELECT count( id ) FROM com_pb_activity WHERE STATUS = 5 AND community_id = camw.community_id ),0) AS partyActivity, |
| | | IFNULL(( SELECT count( id ) FROM com_act_questnaire WHERE community_id = camw.community_id and is_hide=0 ),0) AS questionnaire, |
| | | IFNULL(( SELECT count( id ) FROM com_act_dyn WHERE community_id = camw.community_id AND STATUS = 1 ),0) AS dynamic, |
| | | IFNULL(( SELECT count( id ) FROM com_convenient_merchants WHERE (community_id = camw.community_id OR community_id = 0) AND is_del = 0 ),0) AS convenient, |
| | | IFNULL(( SELECT count( id ) FROM com_act_neighbor_circle WHERE community_id = camw.community_id AND is_del = 2 ),0) AS neighbor |
| | | FROM com_act_micro_wish AS camw WHERE camw.STATUS = 6 |
| | | AND camw.community_id = #{communityId} |
| | | </select> |
| | | <select id="getGridsGovernanceEventList" |
| | | resultType="com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO"> |
| | | SELECT event_type AS type, IFNULL( NULL, 1 ) AS eventType, e.id AS eventId, happent_lat_lng AS latLng, event_des AS content, |
| | | (SELECT url FROM event_resource WHERE ref_id = e.id AND classification = 1 AND `type` = 1 LIMIT 1) AS cover, e.create_at, |
| | | CASE |
| | | WHEN event_deal_status = 4 THEN 1 |
| | | ELSE 2 END `status` |
| | | FROM `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = #{communityId} |
| | | UNION ALL SELECT |
| | | CASE |
| | | WHEN classify_id = 4 THEN 1 |
| | | WHEN classify_id = 6 THEN 2 |
| | | WHEN classify_id = 5 THEN 3 |
| | | WHEN classify_id = 7 THEN 5 |
| | | WHEN classify_id = 3 THEN 6 |
| | | WHEN classify_id = 8 THEN 9 |
| | | WHEN classify_id = 1 THEN 10 |
| | | END type, IFNULL( NULL, 2 ) AS eventType, id AS eventId, lng_lat AS latLng, detail AS content, substring_index(photo_path_list, ',', 1) AS cover, create_at, |
| | | CASE |
| | | WHEN handle_status = 2 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> |
| | | </mapper> |
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.ComActVillageDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComMngVillageDO"> |
| | | <id column="village_id" property="villageId" /> |
| | | <result column="street_id" property="streetId" /> |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="alley" property="alley" /> |
| | | <result column="house_num" property="houseNum" /> |
| | | <result column="group_at" property="groupAt" /> |
| | | <result column="type" property="type" /> |
| | | <result column="name" property="name" /> |
| | | <result column="build_sum" property="buildSum" /> |
| | | <result column="build_year" property="buildYear" /> |
| | | <result column="build_type" property="buildType" /> |
| | | <result column="property" property="property" /> |
| | | <result column="developers" property="developers" /> |
| | | <result column="user_sum" property="userSum" /> |
| | | <result column="village_images" property="villageImages" /> |
| | | <result column="address" property="address" /> |
| | | <result column="path" property="path" /> |
| | | <result column="lng" property="lng" /> |
| | | <result column="lat" property="lat" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | village_id, street_id, community_id, alley, house_num, group_at, type, name, build_sum, build_year, build_type, property, developers, user_sum, village_images, address, path, lng, lat, create_at, update_at |
| | | </sql> |
| | | |
| | | <select id="getGridVillageListApp" resultType="com.panzhihua.common.model.vos.grid.PageComMngVillageVO"> |
| | | SELECT cmv.village_id, cmv.`name` AS userName, IFNULL((select count(id) from com_mng_building where village_id = cmv.village_id),0) as buildSum, address, |
| | | cmv.create_at as createAt, cmv.lng, cmv.lat, |
| | | ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id ) AS userSum, |
| | | ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmv.village_id ) AS houseNum, |
| | | ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id AND out_or_local = 1 ) AS registerNum, |
| | | ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id AND is_rent = 2 ) AS rentNum |
| | | FROM com_mng_village AS cmv |
| | | LEFT JOIN event_grid_data as egd on egd.grid_community_id = cmv.community_id |
| | | where 1=1 |
| | | <if test='villageListAppDTO.gridId != null'> |
| | | and egd.id = #{villageListAppDTO.gridId} |
| | | </if> |
| | | <if test='villageListAppDTO.address != null and villageListAppDTO.address != ""'> |
| | | and cmv.address like concat(#{villageListAppDTO.address},'%') |
| | | </if> |
| | | <if test='villageListAppDTO.alley != null and villageListAppDTO.alley != ""'> |
| | | and cmv.alley like concat(#{villageListAppDTO.alley},'%') |
| | | </if> |
| | | <if test='villageListAppDTO.houseNum != null and villageListAppDTO.houseNum != ""'> |
| | | and cmv.house_num like concat(#{villageListAppDTO.houseNum},'%') |
| | | </if> |
| | | <if test='villageListAppDTO.groupAt != null and villageListAppDTO.groupAt != ""'> |
| | | and cmv.group_at like concat(#{villageListAppDTO.groupAt},'%') |
| | | </if> |
| | | <if test='villageListAppDTO.name != null and villageListAppDTO.name != ""'> |
| | | and cmv.name like concat(#{villageListAppDTO.name},'%') |
| | | </if> |
| | | <if test='villageListAppDTO.sortColumns!=null'> |
| | | ORDER BY ${villageListAppDTO.sortColumns} ${villageListAppDTO.sortType} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <select id="selectById" resultType="com.panzhihua.common.model.vos.partybuilding.ComPbMemberVO"> |
| | | select t.*,t2.name as orgName from com_pb_member t left join com_mng_population t1 on t.id_card = t1.card_no_str left join com_pb_org t2 on t.org_id = t2.id where t1.card_no_str =#{idCard} |
| | | </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 id="selectActivityTop" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityTop"> |
| | | select t.name,t.photo_path as url,t1.name as orgName,t2.integral_available_party as score from com_pb_member t LEFT JOIN com_pb_org t1 on t.org_id= t1.id LEFT JOIN com_act_integral_user t2 on t.user_id = t2.user_id where t.community_id =#{communityId} and t2.status = 1 order by integral_available_party desc |
| | | </select> |
| | | |
| | | <select id="bigScreenServiceData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData"> |
| | | select (select count(*) from com_act_work_guide ) guide, |
| | | (select count(*) from com_act_announcement where community_id = #{communityId}) announcement, |
| | | (select count(*) from com_elder_auth_elderlies where community_id = #{communityId}) eldersAuth, |
| | | (select count(*) from com_convenient_merchants where (community_id = #{communityId} OR community_id = 0) and is_del =0) convenient, |
| | | (select count(*) from renting_hourse_register where community_id = #{communityId}) rentingHouse, |
| | | (select count(*) from com_property_alarm where community_id = #{communityId}) oneButton, |
| | | (select count(*) from com_pension_auth_pensioners where community_id = #{communityId} ) pensionAuth, |
| | | (select count(*) from com_pb_dyn where community_id = #{communityId} and type = 2) partyDyn, |
| | | (select count(*) from com_property where community_id = #{communityId} ) property |
| | | </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) |
| | | from com_mng_village t left join ( |
| | | select count(*) num,village_id |
| | | from com_mng_population |
| | | where act_id = #{communityId} GROUP BY village_id |
| | | ) t1 on t.village_id = t1.village_id where t.community_id = #{communityId} |
| | | </select> |
| | | </mapper> |
| | |
| | | </where> |
| | | 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 |
| | | 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 |
| | | </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} |
| | | </select> |
| | | <select id="getEventAddPolylineData" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT DATE_FORMAT( e.create_at, '%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 |
| | | 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 |
| | | </select> |
| | | <select id="getEventTotalPolylineDate" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT SUM(num) AS num FROM ( |
| | | SELECT 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%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} |
| | | ) temp |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </foreach> |
| | | GROUP BY ccm.id |
| | | </select> |
| | | <select id="selectMerchantListByCommunity" |
| | | resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT id, `name`, logo, lat, lon FROM com_convenient_merchants WHERE community_id = #{communityId} AND is_del = 0 |
| | | </select> |
| | | <select id="getScreenPopularMerchants" |
| | | resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT * FROM ( |
| | | SELECT id, `name`, consultation_volume, view_num |
| | | FROM com_convenient_merchants |
| | | WHERE (community_id = #{pagePopularMerchantDTO.communityId} OR community_id = 0) AND is_del = 0 ORDER BY (consultation_volume + consultation_volume) DESC LIMIT 100 |
| | | ) temp |
| | | </select> |
| | | <select id="getIndexMerchantBaseData" |
| | | resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenMerchantStatisticsInfo"> |
| | | SELECT |
| | | (SELECT 0) AS resourceTypeNum, |
| | | (SELECT COUNT(id) FROM com_convenient_merchants WHERE (community_id = #{communityId} OR community_id = 0) AND is_del = 0) AS merchantNum, |
| | | (SELECT SUM(t1.consultation_volume) |
| | | 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)) AS serviceTimes |
| | | </select> |
| | | <select id="selectServiceTypeCircleData" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT t1.`name` AS filed, COUNT(t3.id) AS num |
| | | FROM com_convenient_service_categories t1 |
| | | LEFT JOIN com_convenient_service_scope t2 ON t1.id = t2.service_category_id |
| | | LEFT JOIN com_convenient_merchants t3 ON t2.merchant_id = t3.id |
| | | WHERE (t3.community_id = #{communityId} OR t3.community_id = 0) AND t3.is_del = 0 GROUP BY t1.id |
| | | </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 |
| | | 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 |
| | | </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} |
| | | </select> |
| | | <select id="indexMerchantList" |
| | | resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT t1.id, t1.`name`, t1.logo, t1.introduction, GROUP_CONCAT(t2.`service_name`) serviceScope |
| | | FROM com_convenient_merchants t1 |
| | | LEFT JOIN com_convenient_service_scope t2 ON t1.id = t2.merchant_id |
| | | WHERE (t1.community_id = #{pageBaseDTO.communityId} OR t1.community_id = 0) |
| | | <if test="pageBaseDTO.paramId != null"> |
| | | AND t2.service_category_id = #{pageBaseDTO.paramId} |
| | | </if> |
| | | GROUP BY t1.id ORDER BY t1.id DESC |
| | | </select> |
| | | <update id="deleteMerchantById"> |
| | | UPDATE com_convenient_merchants SET is_del = 1, updated_by = #{operator} WHERE id = #{merchantId} |
| | | </update> |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新版绘制多边形统计数据 |
| | | * @param eventListDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/getCivilDrawListNew") |
| | | public R getCivilDrawListNew(@RequestBody ScreenDrawEventListDTO eventListDTO) { |
| | | return eventService.getCivilDrawListNew(eventListDTO); |
| | | } |
| | | |
| | | /** |
| | | * 大屏-根据小区id查询小区统计人数 |
| | | * |
| | | * @param villageId |
| | |
| | | return eventGridMemberRelationService.getGridsMemberTrajectory(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 西区大数据分析平台-综合治理栏 |
| | | * @return |
| | | */ |
| | | @GetMapping("/comprehensive/governance") |
| | | public R getComprehensiveGovernanceStatics() { |
| | | return eventService.getComprehensiveGovernanceStatics(); |
| | | } |
| | | |
| | | /** |
| | | * 大屏-新根据小区id查询小区统计人数 |
| | | * |
| | | * @param villageId |
| | | * 小区id |
| | | * @return 小区统计数据 |
| | | */ |
| | | @GetMapping("/village/statistics-new") |
| | | public R civilVillageStatisticsNew(@RequestParam("villageId") Long villageId) { |
| | | return eventService.civilVillageStatisticsNew(villageId); |
| | | } |
| | | |
| | | } |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.panzhihua.common.model.vos.community.screen.event.EventComprehensiveGovernanceStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | List<Map<String, Object>> getMemberBuildName(@Param("userId") Long userId); |
| | | |
| | | Integer getPopulationByLabelCount(@Param("floor") String floor, @Param("villageId") Long villageId); |
| | | |
| | | /** |
| | | * 西区大数据分析平台-综合治理栏数据 |
| | | * @return |
| | | */ |
| | | EventComprehensiveGovernanceStatisticsVO selectComprehensiveGovernanceStatics(); |
| | | |
| | | List<EventGridIncidentStatisticsVO> getGridsGovernanceEventList(@Param("communityId") Long communityId); |
| | | |
| | | ScreenDrawEventPopulationTotalVO getVillagePopulationTotalNew(@Param("villageId") Long villageId); |
| | | |
| | | List<StatisticsCommVO> selectStatisticsForAge(@Param("villageIds") List<Long> villageIds); |
| | | } |
| | |
| | | R getCivilDrawList(ScreenDrawEventListDTO eventListDTO); |
| | | |
| | | /** |
| | | * 新版绘制多边形统计数据 |
| | | * |
| | | * @param eventListDTO |
| | | * 请求参数 |
| | | * @return 统计数据 |
| | | */ |
| | | R getCivilDrawListNew(ScreenDrawEventListDTO eventListDTO); |
| | | |
| | | /** |
| | | * 大屏-根据小区id查询小区统计人数 |
| | | * |
| | | * @param villageId |
| | |
| | | * @return 网格员工作汇总数据 |
| | | */ |
| | | R gridMemberStatisticsAll(MemberStatisticsAdminDTO statisticsAdminDTO); |
| | | |
| | | /** |
| | | * 西区大数据分析平台-综合治理栏 |
| | | * @return |
| | | */ |
| | | R getComprehensiveGovernanceStatics(); |
| | | |
| | | /** |
| | | * 大屏-新根据小区id查询小区统计人数 |
| | | * |
| | | * @param villageId |
| | | * 小区id |
| | | * @return 小区统计数据 |
| | | */ |
| | | R civilVillageStatisticsNew(Long villageId); |
| | | } |
| | |
| | | * @param comActEasyPhotoAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | | public R add(ComActEasyPhotoAddDTO comActEasyPhotoAddDTO) { |
| | | ComActEasyPhotoDO comActEasyPhotoDO = new ComActEasyPhotoDO(); |
| | | BeanUtils.copyProperties(comActEasyPhotoAddDTO, comActEasyPhotoDO); |
| | |
| | | * @param comActEasyPhotoEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @Override |
| | | public R edit(ComActEasyPhotoEditDTO comActEasyPhotoEditDTO) { |
| | | ComActEasyPhotoDO comActEasyPhotoDO = new ComActEasyPhotoDO(); |
| | | BeanUtils.copyProperties(comActEasyPhotoEditDTO, comActEasyPhotoDO); |
| | |
| | | * @param easyAppDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @Override |
| | | public R<IPage<ComActEasyPhotoVO>> query(PageEasyAppDTO easyAppDTO) { |
| | | Page page = new Page(easyAppDTO.getPageNum(), easyAppDTO.getPageSize()); |
| | | if (easyAppDTO.getStatus() != null) { |
| | |
| | | easyAppDTO.setIsPublicity(1); |
| | | break; |
| | | case 4: |
| | | easyAppDTO.setIsPublicity(0); |
| | | easyAppDTO.setIsPublicity(2); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | * @param ComActEasyPhotoDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | | @Override |
| | | public R delete(ComActEasyPhotoDeleteDTO ComActEasyPhotoDeleteDTO) { |
| | | return R.fail(); |
| | | } |
| | |
| | | * 社区活动 》随手拍 id |
| | | * @return 查找结果 |
| | | */ |
| | | @Override |
| | | public R<ComActEasyPhotoDetailsVO> comActEasyPhotoDetails(Long id) { |
| | | ComActEasyPhotoDO comActEasyPhotoDO = comActEasyPhotoMapper.selectById(id); |
| | | if (comActEasyPhotoDO != null) { |
| | |
| | | photoAdminVOIPage.getRecords().forEach(photoAdmin -> { |
| | | if(photoAdmin.getClassifyId() != null){ |
| | | List<String> photoTypeList = |
| | | comActEasyPhotoTypeRelationMapper.getEasyPhotoClassifyName(photoAdmin.getId()); |
| | | comActEasyPhotoTypeRelationMapper.getEasyPhotoClassifyName(photoAdmin.getClassifyId()); |
| | | if (!photoTypeList.isEmpty()) { |
| | | photoAdmin.setPhotoTypeList(photoTypeList); |
| | | } |
| | |
| | | } |
| | | BeanUtils.copyProperties(photoHandleDTO, easyPhotoDO); |
| | | easyPhotoDO.setHandleStatus(ComActEasyPhotoDO.handleStatus.yes); |
| | | easyPhotoDO.setFeedbackAt(new Date()); |
| | | // 关联随手拍类型 |
| | | if (!photoHandleDTO.getEasyTypeIds().isEmpty()) { |
| | | List<ComActEasyPhotoTypeRelationDO> typeRelationDOList = new ArrayList<>(); |
| | |
| | | package com.panzhihua.service_grid.service.impl; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.screen.event.EventComprehensiveGovernanceStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.GridsGovernanceStatisticsVO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | } else { |
| | | return R.fail("事件所属错误"); |
| | | } |
| | | eventDO.setInvalid(false); |
| | | // eventDO.setInvalid(false); |
| | | // 标为无效后, 交给网格员处理 |
| | | eventDO.setUpdateBy(eventRevokeDTO.getUserId()); |
| | | eventDO.setEventStatus(4);// 4、撤销 |
| | | eventDO.setEventDealStatus(6);// 4、撤销 |
| | | eventDO.setProcessType(1);// 网格员处理 |
| | | eventDO.setCommunityProcess(0);// 非 社区处理 |
| | | eventDO.setRevokeId(eventRevokeDTO.getRevokeId()); |
| | |
| | | if (eventDO == null) { |
| | | return R.fail("事件不存在"); |
| | | } |
| | | boolean canRepulish = eventDO.getEventDealStatus() == 7 | eventDO.getEventDealStatus() == 5; // 已失效状态 |
| | | boolean canRepulish = eventDO.getEventDealStatus() == 7 || eventDO.getEventDealStatus() == 5 || eventDO.getEventDealStatus() == 6; // 已失效状态 |
| | | if (!canRepulish) { |
| | | return R.fail("当前事件不是已失效状态/草稿状态,不能重新发布"); |
| | | return R.fail("当前事件不是已失效状态/草稿状态/撤销状态,不能重新发布"); |
| | | } |
| | | eventDO.setInvalid(true); |
| | | eventDO.setEventStatus(2); |
| | | eventDO.setEventDealStatus(1); |
| | | int updated = this.getBaseMapper().updateById(eventDO); |
| | | if (updated == 1) { |
| | | addTransferRecord(eventDO.getId(), commonEventRepublishDTO.getUserId(), |
| | |
| | | return R.ok(drawEventVO); |
| | | } |
| | | |
| | | @Override |
| | | public R getCivilDrawListNew(ScreenDrawEventListDTO eventListDTO) { |
| | | GridsGovernanceStatisticsVO statisticsVO = new GridsGovernanceStatisticsVO(); |
| | | // 返回事件列表结果集 |
| | | List<EventGridIncidentStatisticsVO> eventResultList = new ArrayList<>(); |
| | | // 返回小区列表结果集 |
| | | List<CivilVillageStatisticsVO> villageResultList = new ArrayList<>(); |
| | | // 返回人口统计 |
| | | ScreenDrawEventPopulationTotalVO drawEventPopulationTotalVO = new ScreenDrawEventPopulationTotalVO(); |
| | | //年龄段统计 |
| | | List<StatisticsCommVO> ageGroupStatistics = new ArrayList<>(); |
| | | // 查询所有事件 |
| | | List<EventGridIncidentStatisticsVO> gridIncidentList = |
| | | this.baseMapper.getGridsGovernanceEventList(eventListDTO.getCommunityId()); |
| | | if (!gridIncidentList.isEmpty()) { |
| | | gridIncidentList.forEach(gridIncident -> { |
| | | // 拆分事件经纬度 |
| | | Double lng = 0.0;// 经度 |
| | | Double lat = 0.0;// 纬度 |
| | | String[] lngLatString = gridIncident.getLatLng().split(","); |
| | | if (gridIncident.getEventType().equals(1)) { |
| | | lat = Double.parseDouble(lngLatString[0]); |
| | | lng = Double.parseDouble(lngLatString[1]); |
| | | } else { |
| | | lat = Double.parseDouble(lngLatString[1]); |
| | | lng = Double.parseDouble(lngLatString[0]); |
| | | } |
| | | // 判断绘制的图形类型 |
| | | if (eventListDTO.getType().equals(ScreenDrawEventListDTO.type.yx)) { |
| | | // 判断这个点是否在圆形范围内 |
| | | if (GisPointUtil.isInCircle(eventListDTO.getCenterLng(), eventListDTO.getCenterLat(), lng, lat, |
| | | eventListDTO.getRadius())) { |
| | | if (eventResultList.size() <= eventListDTO.getCount()) { |
| | | eventResultList.add(gridIncident); |
| | | } |
| | | countGridIncidentData(statisticsVO, gridIncident); |
| | | } |
| | | } else {// 多边形类型 |
| | | if (GisPointUtil.isInPolygon(lng, lat, eventListDTO.getLngLatList())) { |
| | | if (eventResultList.size() <= eventListDTO.getCount()) { |
| | | eventResultList.add(gridIncident); |
| | | } |
| | | countGridIncidentData(statisticsVO, gridIncident); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | statisticsVO.setGridIncidentList(eventResultList); |
| | | // 查询所有小区 |
| | | List<CivilVillageStatisticsVO> villageStatisticsList = |
| | | this.baseMapper.getCivilScreenVillageList(eventListDTO.getCommunityId()); |
| | | if (!villageStatisticsList.isEmpty()) { |
| | | List<Long> villageIds = villageStatisticsList.stream().map(CivilVillageStatisticsVO::getVillageId).collect(Collectors.toList()); |
| | | ageGroupStatistics = this.baseMapper.selectStatisticsForAge(villageIds); |
| | | villageStatisticsList.forEach(village -> { |
| | | // 判断绘制的图形类型 |
| | | if (eventListDTO.getType().equals(ScreenDrawEventListDTO.type.yx)) { |
| | | // 判断这个点是否在圆形范围内 |
| | | if (GisPointUtil.isInCircle(eventListDTO.getCenterLng(), eventListDTO.getCenterLat(), |
| | | Double.parseDouble(village.getLng()), Double.parseDouble(village.getLat()), |
| | | eventListDTO.getRadius())) { |
| | | fillVillageResultList(villageResultList, drawEventPopulationTotalVO, village); |
| | | } |
| | | } else {// 多边形类型 |
| | | if (GisPointUtil.isInPolygon(Double.parseDouble(village.getLng()), |
| | | Double.parseDouble(village.getLat()), eventListDTO.getLngLatList())) { |
| | | fillVillageResultList(villageResultList, drawEventPopulationTotalVO, village); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | statisticsVO.setVillageStatisticsList(villageResultList); |
| | | statisticsVO.setDrawEventPopulationTotalVO(drawEventPopulationTotalVO); |
| | | statisticsVO.setAgeGroupStatistics(ageGroupStatistics); |
| | | statisticsVO.generateStatisticsData(); |
| | | List<StatisticsCommVO> eventTypeCircleDrawData = new ArrayList<>(); |
| | | if (!eventResultList.isEmpty()) { |
| | | Map<Integer, List<EventGridIncidentStatisticsVO>> collect = eventResultList.stream().collect(Collectors.groupingBy(EventGridIncidentStatisticsVO::getType)); |
| | | for (Map.Entry<Integer, List<EventGridIncidentStatisticsVO>> entry : collect.entrySet()) { |
| | | StatisticsCommVO temp = new StatisticsCommVO(); |
| | | int size = entry.getValue().size(); |
| | | Integer eventTotal = statisticsVO.getEventTotal(); |
| | | temp.setFiled(entry.getKey().toString()); |
| | | temp.setNum(size); |
| | | temp.setPercent(new BigDecimal(size/eventTotal).setScale(2)); |
| | | eventTypeCircleDrawData.add(temp); |
| | | } |
| | | } |
| | | statisticsVO.setEventTypeCircleDrawData(eventTypeCircleDrawData); |
| | | return R.ok(statisticsVO); |
| | | } |
| | | |
| | | private void fillVillageResultList(List<CivilVillageStatisticsVO> villageResultList, |
| | | ScreenDrawEventPopulationTotalVO drawEventPopulationTotalVO, CivilVillageStatisticsVO village) { |
| | | villageResultList.add(village); |
| | | ScreenDrawEventPopulationTotalVO populationTotalVO = |
| | | this.baseMapper.getVillagePopulationTotalNew(village.getVillageId()); |
| | | if (populationTotalVO != null) { |
| | | drawEventPopulationTotalVO.setVillageTotal(drawEventPopulationTotalVO.getVillageTotal() + 1); |
| | | drawEventPopulationTotalVO.setPopulationTotal(drawEventPopulationTotalVO.getPopulationTotal() + populationTotalVO.getPopulationTotal()); |
| | | drawEventPopulationTotalVO.setBuildTotal(drawEventPopulationTotalVO.getBuildTotal() + populationTotalVO.getBuildTotal()); |
| | | drawEventPopulationTotalVO.setHouseTotal(drawEventPopulationTotalVO.getHouseTotal() + populationTotalVO.getHouseTotal()); |
| | | drawEventPopulationTotalVO.setLocalTotal(drawEventPopulationTotalVO.getLocalTotal() + populationTotalVO.getLocalTotal()); |
| | | drawEventPopulationTotalVO.setOutTotal(drawEventPopulationTotalVO.getOutTotal() + populationTotalVO.getOutTotal()); |
| | | drawEventPopulationTotalVO.setDisabilityTotal(drawEventPopulationTotalVO.getDisabilityTotal() + populationTotalVO.getDisabilityTotal()); |
| | | drawEventPopulationTotalVO.setLowSecurityTotal(drawEventPopulationTotalVO.getLowSecurityTotal() + populationTotalVO.getLowSecurityTotal()); |
| | | drawEventPopulationTotalVO.setElderTotal(drawEventPopulationTotalVO.getElderTotal() + populationTotalVO.getElderTotal()); |
| | | drawEventPopulationTotalVO.setSpecialSituationTotal(drawEventPopulationTotalVO.getSpecialSituationTotal() + populationTotalVO.getSpecialSituationTotal()); |
| | | drawEventPopulationTotalVO.setOtherTotal(drawEventPopulationTotalVO.getOtherTotal() + populationTotalVO.getOtherTotal()); |
| | | drawEventPopulationTotalVO.setSpecialHelpTotal(drawEventPopulationTotalVO.getSpecialHelpTotal() + populationTotalVO.getSpecialHelpTotal()); |
| | | drawEventPopulationTotalVO.setVeteransTotal(drawEventPopulationTotalVO.getVeteransTotal() + populationTotalVO.getVeteransTotal()); |
| | | drawEventPopulationTotalVO.setOldTotal(drawEventPopulationTotalVO.getOldTotal() + populationTotalVO.getOldTotal()); |
| | | drawEventPopulationTotalVO.setPensionTotal(drawEventPopulationTotalVO.getPensionTotal() + populationTotalVO.getPensionTotal()); |
| | | drawEventPopulationTotalVO.setRentingHouseTotal(drawEventPopulationTotalVO.getRentingHouseTotal() + populationTotalVO.getRentingHouseTotal()); |
| | | drawEventPopulationTotalVO.setVolunteerTotal(drawEventPopulationTotalVO.getVolunteerTotal() + populationTotalVO.getVolunteerTotal()); |
| | | drawEventPopulationTotalVO.setAverageAge(drawEventPopulationTotalVO.getAverageAge() + populationTotalVO.getAverageAge()); |
| | | } |
| | | } |
| | | |
| | | private void countGridIncidentData(GridsGovernanceStatisticsVO statisticsVO, EventGridIncidentStatisticsVO gridIncident) { |
| | | switch (gridIncident.getType()) { |
| | | case 1: |
| | | statisticsVO.setEventZATotal(statisticsVO.getEventZATotal() + 1); |
| | | if (gridIncident.getStatus().equals(1)) { |
| | | statisticsVO.setEventZADeal(statisticsVO.getEventZADeal() + 1); |
| | | } |
| | | break; |
| | | case 2: |
| | | statisticsVO.setEventMSTotal(statisticsVO.getEventMSTotal() + 1); |
| | | if (gridIncident.getStatus().equals(1)) { |
| | | statisticsVO.setEventMSDeal(statisticsVO.getEventMSDeal() + 1); |
| | | } |
| | | break; |
| | | case 3: |
| | | statisticsVO.setEventMDTotal(statisticsVO.getEventMDTotal() + 1); |
| | | if (gridIncident.getStatus().equals(1)) { |
| | | statisticsVO.setEventMDDeal(statisticsVO.getEventMDDeal() + 1); |
| | | } |
| | | break; |
| | | case 5: |
| | | statisticsVO.setEventTFTotal(statisticsVO.getEventTFTotal() + 1); |
| | | if (gridIncident.getStatus().equals(1)) { |
| | | statisticsVO.setEventTFDeal(statisticsVO.getEventTFDeal() + 1); |
| | | } |
| | | break; |
| | | case 6: |
| | | statisticsVO.setEventTSTotal(statisticsVO.getEventTSTotal() + 1); |
| | | if (gridIncident.getStatus().equals(1)) { |
| | | statisticsVO.setEventTSDeal(statisticsVO.getEventTSDeal() + 1); |
| | | } |
| | | break; |
| | | case 9: |
| | | statisticsVO.setEventFJTotal(statisticsVO.getEventFJTotal() + 1); |
| | | if (gridIncident.getStatus().equals(1)) { |
| | | statisticsVO.setEventFJDeal(statisticsVO.getEventFJDeal() + 1); |
| | | } |
| | | break; |
| | | case 10: |
| | | statisticsVO.setOtherTotal(statisticsVO.getOtherTotal() + 1); |
| | | if (gridIncident.getStatus().equals(1)) { |
| | | statisticsVO.setOtherDeal(statisticsVO.getOtherDeal() + 1); |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 大屏-根据小区id查询小区统计人数 |
| | | * |
| | |
| | | public R gridMemberStatisticsAll(MemberStatisticsAdminDTO statisticsAdminDTO) { |
| | | return R.ok(eventGridMemberRelationMapper.gridMemberStatisticsAll(statisticsAdminDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 大屏-新根据小区id查询小区统计人数 |
| | | * |
| | | * @param villageId |
| | | * 小区id |
| | | * @return 小区统计数据 |
| | | */ |
| | | @Override |
| | | public R civilVillageStatisticsNew(Long villageId) { |
| | | GridsGovernanceStatisticsVO statisticsVO = new GridsGovernanceStatisticsVO(); |
| | | List<Long> villageIds = new ArrayList<>(); |
| | | villageIds.add(villageId); |
| | | List<StatisticsCommVO> ageGroupStatistics = this.baseMapper.selectStatisticsForAge(villageIds); |
| | | ScreenDrawEventPopulationTotalVO populationTotalVO = this.baseMapper.getVillagePopulationTotalNew(villageId); |
| | | statisticsVO.setAgeGroupStatistics(ageGroupStatistics); |
| | | statisticsVO.setDrawEventPopulationTotalVO(populationTotalVO); |
| | | return R.ok(statisticsVO); |
| | | } |
| | | |
| | | /** |
| | | * 西区大数据分析平台-综合治理栏 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getComprehensiveGovernanceStatics() { |
| | | EventComprehensiveGovernanceStatisticsVO governanceStatisticsVO = this.baseMapper.selectComprehensiveGovernanceStatics(); |
| | | governanceStatisticsVO.generateGovernanceTotal(); |
| | | return R.ok(governanceStatisticsVO); |
| | | } |
| | | } |
| | |
| | | e.event_title like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.happen_address like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.order_sn like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.event_clazz like concat('%', #{pageEventManageDTO.keyWord},'%') |
| | | e.event_clazz like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.event_des like concat('%', #{pageEventManageDTO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | <if test="pageEventManageDTO.revokeType!=null"> |
| | |
| | | WHERE |
| | | e3.event_status = 2 |
| | | AND e3.create_at LIKE CONCAT(#{nowDate},'%')) as currentNum, |
| | | (select count(id) from com_act_easy_photo where community_id = 2 and del_tag = 0 and create_at LIKE CONCAT(#{nowDate},'%')) as sspCurrentNum |
| | | (select count(id) from com_act_easy_photo where community_id = #{communityId} and del_tag = 0 and create_at LIKE CONCAT(#{nowDate},'%')) as sspCurrentNum |
| | | |
| | | FROM |
| | | `event` AS e |
| | |
| | | left join com_mng_population AS cmp on cmp.id = cmpct.population_id |
| | | where cmtct.label is not null and cmp.village_id = #{villageId} and floor = #{floor} |
| | | </select> |
| | | <select id="selectComprehensiveGovernanceStatics" |
| | | resultType="com.panzhihua.common.model.vos.community.screen.event.EventComprehensiveGovernanceStatisticsVO"> |
| | | SELECT |
| | | (SELECT COUNT( e.id ) FROM `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | LEFT JOIN com_act AS a ON egd.grid_community_id = a.community_id |
| | | WHERE e.event_category = 1 AND e.event_type = 5 AND e.event_deal_status = 4 AND a.area_code = 510423) AS eventTFTotal, |
| | | |
| | | (SELECT COUNT( e1.id ) FROM `event` AS e1 |
| | | LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id |
| | | LEFT JOIN com_act AS a1 ON egd1.grid_community_id = a1.community_id |
| | | WHERE event_category = 1 AND event_type = 1 AND e1.event_deal_status = 4 AND a1.area_code = 510423) AS eventZATotal, |
| | | |
| | | (SELECT COUNT( e2.id ) FROM `event` AS e2 |
| | | LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id |
| | | LEFT JOIN com_act AS a2 ON egd2.grid_community_id = a2.community_id |
| | | WHERE event_category = 1 AND event_type = 3 AND e2.event_deal_status = 4 AND a2.area_code = 510423) AS eventMDTotal, |
| | | |
| | | (SELECT COUNT( e3.id ) FROM `event` AS e3 |
| | | LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id |
| | | LEFT JOIN com_act AS a3 ON egd3.grid_community_id = a3.community_id |
| | | WHERE event_category = 1 AND event_type = 6 AND e3.event_deal_status = 4 AND a3.area_code = 510423) AS eventTSTotal, |
| | | |
| | | (SELECT COUNT( e5.id ) FROM `event` AS e5 |
| | | LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id |
| | | LEFT JOIN com_act AS a5 ON egd5.grid_community_id = a5.community_id |
| | | WHERE event_category = 1 AND event_type = 2 AND e5.event_deal_status = 4 AND a5.area_code = 510423) AS eventMSTotal, |
| | | |
| | | (SELECT COUNT(p.id) FROM com_act_easy_photo p |
| | | LEFT JOIN com_act AS a ON p.community_id = a.community_id |
| | | WHERE p.`status` = 4 AND p.del_tag = 0 AND a.area_code = 510423) AS eventSSPTotal |
| | | </select> |
| | | <select id="getGridsGovernanceEventList" |
| | | resultType="com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO"> |
| | | SELECT event_type AS type, IFNULL( NULL, 1 ) AS eventType, e.id AS eventId, happent_lat_lng AS latLng, event_des AS content, |
| | | (SELECT url FROM event_resource WHERE ref_id = e.id AND classification = 1 AND `type` = 1 LIMIT 1) AS cover, e.create_at, |
| | | CASE |
| | | WHEN event_deal_status = 4 THEN 1 |
| | | ELSE 2 END `status` |
| | | FROM `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = #{communityId} |
| | | UNION ALL SELECT |
| | | CASE |
| | | WHEN classify_id = 4 THEN 1 |
| | | WHEN classify_id = 6 THEN 2 |
| | | WHEN classify_id = 5 THEN 3 |
| | | WHEN classify_id = 7 THEN 5 |
| | | WHEN classify_id = 3 THEN 6 |
| | | WHEN classify_id = 8 THEN 9 |
| | | WHEN classify_id = 1 THEN 10 |
| | | END type, IFNULL( NULL, 2 ) AS eventType, id AS eventId, lng_lat AS latLng, detail AS content, substring_index(photo_path_list, ',', 1) AS cover, create_at, |
| | | CASE |
| | | WHEN handle_status = 2 THEN 1 |
| | | ELSE 2 END `status` |
| | | FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) |
| | | </select> |
| | | <select id="getVillagePopulationTotalNew" |
| | | resultType="com.panzhihua.common.model.vos.screen.ScreenDrawEventPopulationTotalVO"> |
| | | SELECT |
| | | (SELECT count(id) FROM com_mng_population WHERE village_id = #{villageId}) as populationTotal, |
| | | (select count(id) from com_mng_building where village_id = #{villageId}) as buildTotal, |
| | | (SELECT COUNT(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_population where village_id = #{villageId} and out_or_local = 1) as localTotal, |
| | | (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 2) as outTotal, |
| | | (SELECT COUNT(t1.id) FROM com_disability_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}) as disabilityTotal, |
| | | (SELECT COUNT(t1.id) FROM com_low_security_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}) as lowSecurityTotal, |
| | | (SELECT COUNT(id) FROM com_mng_population WHERE village_id = #{villageId} AND TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) > 80) as elderTotal, |
| | | (SELECT COUNT(t1.id) FROM com_mng_population t1 LEFT JOIN com_mng_population_community_tags t2 ON t1.id = t2.population_id WHERE t1.village_id = #{villageId} AND t2.label LIKE '%特殊情况%') as specialSituationTotal, |
| | | (SELECT COUNT(id) FROM |
| | | (SELECT t1.id FROM com_drug_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId} |
| | | UNION ALL |
| | | SELECT t1.id FROM com_correct_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId} |
| | | UNION ALL |
| | | SELECT t1.id FROM com_cult_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId} |
| | | UNION ALL |
| | | SELECT t1.id FROM com_rehabilitation_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId} |
| | | UNION ALL |
| | | SELECT t1.id FROM com_key_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId} |
| | | UNION ALL |
| | | SELECT t1.id FROM com_major_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId} |
| | | ) temp) as otherTotal, |
| | | (SELECT COUNT(t1.id) FROM com_mng_population t1 LEFT JOIN com_mng_population_community_tags t2 ON t1.id = t2.population_id WHERE t1.village_id = #{villageId} AND t2.label LIKE '%特扶家庭%') as specialHelpTotal, |
| | | (SELECT COUNT(t1.id) FROM com_veterans_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}) as veteransTotal, |
| | | (SELECT COUNT(id) FROM com_mng_population WHERE village_id = #{villageId} AND TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) > 60) as oldTotal, |
| | | (SELECT COUNT(t1.id) FROM com_pension_auth_pensioners t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}) as pensionTotal, |
| | | (SELECT COUNT(id) FROM renting_hourse_register WHERE village_id = #{villageId} AND auth_status = 2) as rentingHouseTotal, |
| | | (SELECT COUNT(id) FROM com_mng_population t1 LEFT JOIN sys_user t2 ON t1.card_no_str = t2.id_card WHERE t1.village_id = #{villageId} AND t2.is_volunteer = 1) as volunteerTotal, |
| | | (SELECT ROUND(AVG(TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()))) FROM com_mng_population) as averageAge |
| | | </select> |
| | | <select id="selectStatisticsForAge" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT filed, SUM(num) AS num FROM ( |
| | | SELECT filed, COUNT(filed) AS num FROM ( |
| | | SELECT |
| | | CASE |
| | | WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 0 AND 18 THEN '0-18岁' |
| | | WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 19 AND 30 THEN '19-30岁' |
| | | WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 31 AND 40 THEN '31-40岁' |
| | | WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 41 AND 50 THEN '41-50岁' |
| | | WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 51 AND 60 THEN '51-60岁' |
| | | WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 61 AND 79 THEN '61-79岁' |
| | | WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 80 AND 89 THEN '80-89岁' |
| | | WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) > 89 THEN '89岁以上' |
| | | END filed |
| | | FROM com_mng_population WHERE village_id IN |
| | | <foreach collection="villageIds" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | ) temp GROUP BY filed |
| | | UNION ALL |
| | | (SELECT '0-18岁' AS filed, 0 AS num) |
| | | UNION ALL |
| | | (SELECT '19-30岁' AS filed, 0 AS num) |
| | | UNION ALL |
| | | (SELECT '31-40岁' AS filed, 0 AS num) |
| | | UNION ALL |
| | | (SELECT '41-50岁' AS filed, 0 AS num) |
| | | UNION ALL |
| | | (SELECT '51-60岁' AS filed, 0 AS num) |
| | | UNION ALL |
| | | (SELECT '61-79岁' AS filed, 0 AS num) |
| | | UNION ALL |
| | | (SELECT '80-89岁' AS filed, 0 AS num) |
| | | UNION ALL |
| | | (SELECT '89岁以上' AS filed, 0 AS num) |
| | | ) t GROUP BY filed |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="query.keyWord != null and query.keyWord != ''"> |
| | | and( |
| | | p.card_no_str like concat('%',#{query.keyWord},'%') or |
| | | p.`name` like concat('%',#{query.keyWord},'%') or |
| | | vt.visiter_address like concat('%',#{query.keyWord},'%') |
| | | ) |
| | | </if> |
| | |
| | | * @return 党建活动列表 |
| | | */ |
| | | @PostMapping("listactivity") |
| | | public R listActivity(@RequestParam("userId") Long userId, @RequestParam("communityId") Long communityId) { |
| | | return comBpActivityService.listActivity(userId, communityId); |
| | | public R listActivity(@RequestParam("userId") Long userId, |
| | | @RequestParam("communityId") Long communityId, |
| | | @RequestParam(value = "status", required = false) Integer status) { |
| | | return comBpActivityService.listActivity(userId, communityId, status); |
| | | |
| | | } |
| | | |
| | |
| | | // "</script>") |
| | | |
| | | @Select("<script> " + "SELECT\n" + "d.id,\n" + "d.title, d.jump_url, d.jump_type,\n" + "COUNT( u.id ) readingVolume,\n" + "d.`status`,\n" |
| | | + "d.publish_at,\n" + "d.content,\n" + "d.cover,\n" + "d.cover_mode,\n" + "d.dyn_type,\n" + "d.create_at \n" |
| | | + "FROM\n" + "com_pb_dyn d\n" + "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id \n" |
| | | + "d.publish_at,\n" + "d.content,\n" + "d.cover,\n" + "d.cover_mode,\n" + "d.dyn_type,\n" + "d.create_at,t.name as communityName \n" |
| | | + "FROM\n" + "com_pb_dyn d\n" + "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id left join com_act t on d.community_id = t.community_id\n" |
| | | + "where d.type=#{partyBuildingComPbDynVO.type} \n" |
| | | + "<if test='partyBuildingComPbDynVO.communityId != null and partyBuildingComPbDynVO.communityId != 0'>" |
| | | + "and d.community_id = #{partyBuildingComPbDynVO.communityId} \n" + " </if> " |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | * 用户id |
| | | * @param communityId |
| | | * 社区id |
| | | * @param status |
| | | * @return 党建活动列表 |
| | | */ |
| | | R listActivity(Long userId, Long communityId); |
| | | R listActivity(Long userId, Long communityId, Integer status); |
| | | |
| | | /** |
| | | * 党员活动人员参入列表 |
| | |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党员活动 |
| | |
| | | comBpActivityDAO.selectCommunityNameByCommunityId(partyBuildingActivityVO.getCommunityId())); |
| | | } |
| | | |
| | | partyBuildingActivityVO.setCodeType(2); |
| | | return R.ok(partyBuildingActivityVO); |
| | | } |
| | | |
| | |
| | | * 用户id |
| | | * @param communityId |
| | | * 社区id |
| | | * @param status |
| | | * @return 党建活动列表 |
| | | */ |
| | | @Override |
| | | public R listActivity(Long userId, Long communityId) { |
| | | public R listActivity(Long userId, Long communityId, Integer status) { |
| | | List<ComActActivityVO> comActActivityVOS = new ArrayList<>(); |
| | | /*Long memberId=comPbActivityMemberDAO.selectMemberIdByUserId(userId,communityId); |
| | | if (ObjectUtils.isEmpty(memberId)) { |
| | |
| | | List<Long> collect = comPbActivityMemberDOS.stream() |
| | | .map(comPbActivityMemberDO -> comPbActivityMemberDO.getActivityId()).collect(Collectors.toList()); |
| | | List<ComPbActivityDO> comPbActivityDOS = comBpActivityDAO.selectBatchIds(collect); |
| | | |
| | | comPbActivityDOS.forEach(comPbActivityDO -> { |
| | | ComActActivityVO comActActivityVO = new ComActActivityVO(); |
| | | Long createBy = comPbActivityDO.getCreateBy(); |
| | | LoginUserInfoVO loginUserInfoVO = comPbActivityMemberDAO.selectUserInfo(createBy); |
| | | Integer type = loginUserInfoVO.getType(); |
| | | if (type == 1) { |
| | | comActActivityVO.setIsPerson(1); |
| | | } else { |
| | | comActActivityVO.setIsPerson(0); |
| | | } |
| | | Integer status = comPbActivityDO.getStatus(); |
| | | if (status.intValue() == 3) { |
| | | status = 4; |
| | | } |
| | | comActActivityVO.setType(3); |
| | | comActActivityVO.setId(comPbActivityDO.getId()); |
| | | comActActivityVO.setStatus(status); |
| | | comActActivityVO.setActivityName(comPbActivityDO.getName()); |
| | | comActActivityVO.setCover(comPbActivityDO.getCover()); |
| | | comActActivityVO.setBeginAt(comPbActivityDO.getActivityTimeBegin()); |
| | | comActActivityVO.setSingDate(comPbActivityMemberDOS.stream() |
| | | .filter(comPbActivityMemberDO -> comPbActivityMemberDO.getActivityId().equals(comActActivityVO.getId())) |
| | | .collect(Collectors.toList()).get(0).getCreateAt()); |
| | | comActActivityVOS.add(comActActivityVO); |
| | | }); |
| | | if (nonNull(status)) { |
| | | comPbActivityDOS = comPbActivityDOS.stream() |
| | | .filter(activityDO -> activityDO.getStatus().equals(status)).collect(Collectors.toList()); |
| | | } |
| | | if (!comPbActivityDOS.isEmpty()) { |
| | | comPbActivityDOS.forEach(comPbActivityDO -> { |
| | | ComActActivityVO comActActivityVO = new ComActActivityVO(); |
| | | Long createBy = comPbActivityDO.getCreateBy(); |
| | | LoginUserInfoVO loginUserInfoVO = comPbActivityMemberDAO.selectUserInfo(createBy); |
| | | Integer type = loginUserInfoVO.getType(); |
| | | if (type == 1) { |
| | | comActActivityVO.setIsPerson(1); |
| | | } else { |
| | | comActActivityVO.setIsPerson(0); |
| | | } |
| | | Integer activityStatus = comPbActivityDO.getStatus(); |
| | | if (activityStatus.intValue() == 3) { |
| | | activityStatus = 4; |
| | | } |
| | | comActActivityVO.setType(3); |
| | | comActActivityVO.setId(comPbActivityDO.getId()); |
| | | comActActivityVO.setStatus(activityStatus); |
| | | comActActivityVO.setActivityName(comPbActivityDO.getName()); |
| | | comActActivityVO.setCover(comPbActivityDO.getCover()); |
| | | comActActivityVO.setBeginAt(comPbActivityDO.getActivityTimeBegin()); |
| | | comActActivityVO.setSingDate(comPbActivityMemberDOS.stream() |
| | | .filter(comPbActivityMemberDO -> comPbActivityMemberDO.getActivityId().equals(comActActivityVO.getId())) |
| | | .collect(Collectors.toList()).get(0).getCreateAt()); |
| | | comActActivityVOS.add(comActActivityVO); |
| | | }); |
| | | } |
| | | return R.ok(comActActivityVOS); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public R updateYnamic(PartyBuildingComPbDynVO partyCommitteeVO) { |
| | | ComPbDynDO comPbDynDO = new ComPbDynDO(); |
| | | if (partyCommitteeVO.getPublishAt() != null |
| | | && partyCommitteeVO.getPublishAt().getTime() > System.currentTimeMillis()) { |
| | | partyCommitteeVO.setStatus(1); |
| | | } else if (partyCommitteeVO.getPublishAt() != null |
| | | && partyCommitteeVO.getPublishAt().getTime() < System.currentTimeMillis()) { |
| | | partyCommitteeVO.setStatus(2); |
| | | } |
| | | BeanUtils.copyProperties(partyCommitteeVO, comPbDynDO); |
| | | int insert = comPbDynDAO.updateById(comPbDynDO); |
| | | if (insert > 0) { |
| | |
| | | @Override |
| | | public R editSysUser(ShopStoreVO storeVO) { |
| | | SysUserDO sysUserDO1 = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda() |
| | | .eq(SysUserDO::getPhone, storeVO.getPhone()).eq(SysUserDO::getType, 5)); |
| | | .eq(SysUserDO::getPhone, storeVO.getStoreAccount()).eq(SysUserDO::getType, 5)); |
| | | if (sysUserDO1 == null) { |
| | | return R.fail("未查询到后台管理用户!"); |
| | | } |
| | |
| | | // 获取待结束的活动列表 |
| | | List<Long> activityList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); |
| | | if (!activityList.isEmpty()) { |
| | | log.info("社区活动结束时计算积分"); |
| | | log.info("社区活动结束时扣减未参与用户积分"); |
| | | activityList.forEach(activityId -> { |
| | | R r1 = communityService.getTaskActivityPeopleList(activityId); |
| | | if (R.isOk(r1)) { |
| | |
| | | JSONArray.parseArray(JSONArray.toJSONString(r1.getData()), ComActActivityPeopleVO.class); |
| | | if (!peopleList.isEmpty()) { |
| | | peopleList.forEach(people -> { |
| | | if (people.getIsVolunteer().equals(1)) { |
| | | communityService.addIntegralTradeAdmin(new AddComActIntegralUserDTO( |
| | | people.getActivityId(), AddComActIntegralUserDTO.integralType.cyzyzhd, |
| | | people.getCommunityId(), people.getUserId())); |
| | | } else { |
| | | communityService.addIntegralTradeAdmin(new AddComActIntegralUserDTO( |
| | | people.getActivityId(), AddComActIntegralUserDTO.integralType.cysqhd, |
| | | people.getCommunityId(), people.getUserId())); |
| | | } |
| | | AddComActIntegralUserDTO addComActIntegralUserDTO = new AddComActIntegralUserDTO(); |
| | | addComActIntegralUserDTO.setUserId(people.getUserId()); |
| | | addComActIntegralUserDTO.setIntegralType(AddComActIntegralUserDTO.integralType.qxhd); |
| | | addComActIntegralUserDTO.setActivityType(1); |
| | | addComActIntegralUserDTO.setIsVolunteer(people.getIsVolunteer()); |
| | | addComActIntegralUserDTO.setCommunityId(people.getCommunityId()); |
| | | addComActIntegralUserDTO.setServiceId(activityId); |
| | | communityService.addIntegralTradeAdmin(addComActIntegralUserDTO); |
| | | }); |
| | | } |
| | | } |
| | |
| | | noLoginUrl.add("/api/applets/renting/houses/nearby"); |
| | | noLoginUrl.add("/api/applets/renting/houses/houseList"); |
| | | noLoginUrl.add("/api/applets/renting/houses/getConfig"); |
| | | noLoginUrl.add("/api/communitybackstage/screen/comprehensive/street/list"); |
| | | noLoginUrl.add("/api/communitybackstage/screen/comprehensive/population"); |
| | | noLoginUrl.add("/api/communitybackstage/screen/getWestScreenStatics"); |
| | | noLoginUrl.add("/api/communitybackstage/screen/comprehensive/governance"); |
| | | noLoginUrl.add("/api/communitybackstage/screen/comprehensive/partydyn"); |
| | | noLoginUrl.add("/api/communitybackstage/screen/comprehensive/pagedynamic"); |
| | | noLoginUrl.add("/api/communitybackstage/screen/get/community/password"); |
| | | if (noLoginUrl.contains(requestURI)) { |
| | | List<SimpleGrantedAuthority> authorities = new ArrayList<>(); |
| | | authorities.add(new SimpleGrantedAuthority(SecurityConstants.ROLE_APPLETS)); |
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.slf4j.Logger;
|
| | | import org.slf4j.LoggerFactory;
|
| | | import org.springframework.data.redis.core.StringRedisTemplate;
|
| | | import org.springframework.data.redis.core.ValueOperations;
|
| | | import org.springframework.security.access.ConfigAttribute;
|
| | |
| | | private StringRedisTemplate stringRedisTemplate;
|
| | | @Resource
|
| | | private UserService userService;
|
| | |
|
| | | // 记录特定日志的声明
|
| | | private final Logger newLogger = LoggerFactory.getLogger("requestLog");
|
| | | /**
|
| | | * 获取当前url对应的角色
|
| | | *
|
| | |
| | | List<ConfigAttribute> configAttributes = new ArrayList<>();
|
| | | String requestUrl = ((FilterInvocation)o).getRequestUrl();
|
| | | log.info("接口请求地址【{}】", requestUrl);
|
| | | try {
|
| | | String remoteHost = ((FilterInvocation)o).getRequest().getRemoteHost();
|
| | | newLogger.info("IP:{},接口请求地址【{}】", remoteHost, requestUrl);
|
| | | } catch (Exception e) {
|
| | | log.info("zuul 访问信息解析错误:【{}】", e.getMessage());
|
| | | }
|
| | | Boolean aBoolean = stringRedisTemplate.hasKey(SecurityConstants.ROLE_ALL);
|
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
|
| | | List<MenuVO> menuVOS = new ArrayList<>();
|
| | |
| | | <appender-ref ref="STDOUT" /> |
| | | <appender-ref ref="FILE" /> |
| | | </root> |
| | | |
| | | <!--不同业务日志记录到不同的文件--> |
| | | <appender name="requestAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <File>${LOG_HOME}/request.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}/request.%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="requestLog" additivity="false" level="INFO"> |
| | | <appender-ref ref="requestAppender"/> |
| | | </logger> |
| | | </configuration> |