| | |
| | | sysUserNoticeVO.setBusinessContent(String.format("活动将于%tF %tT 开始,请按时参加", beginAt, beginAt)); |
| | | sysUserNoticeVO.setBusinessId(activityId); |
| | | sysUserNoticeVO.setStatus(0); |
| | | sysUserNoticeVO.setActivityType(isVolunteer.intValue() == 1 ? 1 : 2); |
| | | sysUserNoticeVO.setActivityType(comActActivityVO.getType()); |
| | | sysUserNoticeVO.setBusinessStatus(2); |
| | | R r1 = userService.addNotice(sysUserNoticeVO); |
| | | if (R.isOk(r1)) { |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.common.EditComActEasyPhotoHandlerDto; |
| | | import com.panzhihua.common.model.dtos.common.EvaluateEasyDto; |
| | | import com.panzhihua.common.model.dtos.common.PageComActEasyPhotoHandlerDto; |
| | | import com.panzhihua.common.model.vos.common.ComActEasyPhotoHandlerVo; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.BannerVO; |
| | | import com.panzhihua.common.service.community.ComActEasyPhotoEvaluateFeign; |
| | | import com.panzhihua.common.service.community.ComActEasyPhotoHandlerFeign; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | return communityService.addEasyPhoto(comActEasyPhotoVO); |
| | | } |
| | | |
| | | /** |
| | | * description queryByPage 分页查询 |
| | | * |
| | | * @param comActEasyPhotoHandler 请求参数 |
| | | * @return 分页查询返回参数 |
| | | * @author lyq |
| | | * @date 2022-03-01 13:45:10 |
| | | */ |
| | | @ApiOperation(value = "查询处理列表",response = ComActEasyPhotoHandlerVo.class) |
| | | @PostMapping("/handleList") |
| | | public R handleList(@RequestBody PageComActEasyPhotoHandlerDto comActEasyPhotoHandler) { |
| | | comActEasyPhotoHandler.setUserId(this.getUserId()); |
| | | return this.communityService.queryEasyPhotoHandler(comActEasyPhotoHandler); |
| | | } |
| | | /** |
| | | * description edit 编辑数据 |
| | | * |
| | | * @param comActEasyPhotoHandler 请求参数 |
| | | * @return 编辑结果 |
| | | * @author lyq |
| | | * @date 2022-03-01 13:45:10 |
| | | */ |
| | | @ApiOperation(value = "提交反馈") |
| | | @PostMapping("/editEasyPhotoHandler") |
| | | public R editEasyPhotoHandler(@RequestBody EditComActEasyPhotoHandlerDto comActEasyPhotoHandler) { |
| | | return this.communityService.editEasyPhotoHandler(comActEasyPhotoHandler); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询随手拍是否有活动", response = ComActEasyPhotoActivityVO.class) |
| | | @PostMapping("getEasyPhotoActivity") |
| | | public R getEasyPhotoActivity(@RequestBody CommonDTO commonDTO) { |
| | |
| | | comActActRegistVOS.forEach(activitySignInVO -> { |
| | | if (comActActivityVO.getId().equals(activitySignInVO.getActivityId())) { |
| | | currentList.add(activitySignInVO); |
| | | comActActivityVO.setIsComment(1); |
| | | if(comActActivityVO.getType()!=3){ |
| | | comActActivityVO.setIsComment(1); |
| | | if(comActActivityVO.getTimes()==null){ |
| | | comActActivityVO.setTimes(1); |
| | | comActActivityVO.setAward(comActActivityVO.getRewardIntegral()); |
| | | } |
| | | else { |
| | | comActActivityVO.setTimes(comActActivityVO.getTimes()+1); |
| | | comActActivityVO.setAward(comActActivityVO.getRewardIntegral()*comActActivityVO.getTimes()); |
| | | } |
| | | } |
| | | else { |
| | | if(activitySignInVO.getEndTime()!=null){ |
| | | comActActivityVO.setIsComment(1); |
| | | if(comActActivityVO.getTimes()==null){ |
| | | comActActivityVO.setTimes(1); |
| | | comActActivityVO.setAward(comActActivityVO.getRewardIntegral()); |
| | | } |
| | | else { |
| | | comActActivityVO.setTimes(comActActivityVO.getTimes()+1); |
| | | comActActivityVO.setAward(comActActivityVO.getRewardIntegral()*comActActivityVO.getTimes()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | if (currentList.size() > 10) { |
| | | comActActivityVO.setActivitySignInList(currentList.subList(0, 10)); |
| | | } else { |
| | | comActActivityVO.setActivitySignInList(currentList); |
| | | } |
| | | if(comActActivityVO.getLimit()>0&¤tList.size()>0){ |
| | | if(comActActivityVO.getType()==3){ |
| | | if(comActActivityVO.getLimit()==currentList.size()||currentList.get(currentList.size()-1).getEndTime()!=null){ |
| | | comActActivityVO.setIsRegist(1); |
| | | } |
| | | } |
| | | else { |
| | | if(comActActivityVO.getLimit()==currentList.size()){ |
| | | comActActivityVO.setIsRegist(1); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | // 判断用户是否已认证成功 |
| | | R certUser = partyBuildingService.userCertification(userId); |
| | | R certUser = partyBuildingService.userCertification(userId,communityId); |
| | | |
| | | Object certUserInfo = certUser.getData(); |
| | | AtomicBoolean userCertified = new AtomicBoolean(false); |
| | |
| | | } else { |
| | | partyBuildingMemberVO.setIdCard(loginUserInfo.getIdCard()); |
| | | partyBuildingMemberVO.setName(loginUserInfo.getName()); |
| | | partyBuildingMemberVO.setPhone(loginUserInfo.getPhone()); |
| | | } |
| | | |
| | | R r = partyBuildingService.addPartyBuildingMember(partyBuildingMemberVO); |
| | |
| | | // 党员认证查询 |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | R r = partyBuildingService.userCertification(userId); |
| | | R r = partyBuildingService.userCertification(userId,this.getCommunityId()); |
| | | |
| | | if (R.isOk(r)) { |
| | | List<PartyBuildingMemberVO> partyBuildingMemberVOList = |
| | |
| | | @ApiModelProperty(value = "党员类型(1.预备党员 2.正式党员)") |
| | | private Integer type; |
| | | @ApiModelProperty(value = "报道单位id") |
| | | private Integer checkUnitId; |
| | | private Long checkUnitId; |
| | | @ApiModelProperty(value = "职位") |
| | | private String position; |
| | | @ApiModelProperty(value = "职能") |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * title: 编辑随手拍、微心愿处理人绑定表请求参数 |
| | | * <p> |
| | |
| | | @ApiModelProperty(value = "业务类型(1.随手拍 2.微心愿)") |
| | | private Integer serviceType; |
| | | |
| | | /** |
| | | * 服务状态 0待执行 1已完成 |
| | | */ |
| | | @ApiModelProperty(value = "服务状态 0待执行 1已完成") |
| | | private Integer status; |
| | | /** |
| | | * 发起人id |
| | | */ |
| | | private Long senderId; |
| | | |
| | | private Date createTime; |
| | | /** |
| | | * 得分 |
| | | */ |
| | | @ApiModelProperty(value = "得分") |
| | | private Integer score; |
| | | /** |
| | | * 汇报内容 |
| | | */ |
| | | @ApiModelProperty(value = "汇报内容") |
| | | private String resultContent; |
| | | /** |
| | | * 汇报图片 |
| | | */ |
| | | @ApiModelProperty(value = "汇报图片") |
| | | private String resultUrl; |
| | | } |
| | | |
| | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "状态 0待执行 1已完成") |
| | | private Integer status; |
| | | |
| | | } |
| | | |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * title: 随手拍、微心愿处理人绑定表返回参数 |
| | | * <p> |
| | |
| | | @ApiModelProperty(value = "业务类型(1.随手拍 2.微心愿)") |
| | | private Integer serviceType; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "状态") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "发起人名称") |
| | | private String senderName; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * title: ComActActRegistExcelVO 社区活动签到表 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 记录和展示社区活动签到内容 |
| | | * |
| | | * @author txb |
| | | * @date 2021/8/24 10:21 |
| | | */ |
| | | |
| | | @Data |
| | | @ApiModel("社区活动签到表") |
| | | public class ComActActRegistExcelNewVO { |
| | | |
| | | @ExcelProperty(value = "姓名", index = 3) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "身份", index = 4) |
| | | private String identity; |
| | | |
| | | @ExcelProperty(value = "电话", index = 6) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "签到时间", index = 0) |
| | | private Date startTime; |
| | | |
| | | @ExcelProperty(value = "人群标签", index = 5) |
| | | private String tags; |
| | | |
| | | @ExcelProperty(value = "签到地点", index = 1) |
| | | private String position; |
| | | |
| | | @ExcelProperty(value = "参加次数序号", index = 2) |
| | | private Integer times; |
| | | } |
| | |
| | | @ExcelProperty(value = "签到地点", index = 2) |
| | | private String position; |
| | | |
| | | @ExcelProperty(value = "签到次数", index = 3) |
| | | @ExcelProperty(value = "参加次数序号", index = 3) |
| | | private Integer times; |
| | | } |
| | |
| | | @ExcelProperty(value = "身份", index = 2) |
| | | private String identity; |
| | | |
| | | @ExcelProperty(value = "电话", index = 3) |
| | | @ExcelProperty(value = "手机号", index = 3) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "报名时间", index = 0) |
| | |
| | | @ApiModelProperty(value = "体育类党员人数") |
| | | private Integer tyNum; |
| | | |
| | | @ApiModelProperty(value = "体育类党员人数百分比") |
| | | private BigDecimal tyNumPercent = new BigDecimal(0); |
| | | |
| | | @ApiModelProperty(value = "美术类党员人数") |
| | | private Integer msNum; |
| | | |
| | | @ApiModelProperty(value = "美术类党员人数百分比") |
| | | private BigDecimal msNumPercent = new BigDecimal(0); |
| | | |
| | | @ApiModelProperty(value = "音乐类党员人数") |
| | | private Integer yyNum; |
| | | |
| | | @ApiModelProperty(value = "音乐类党员人数百分比") |
| | | private BigDecimal yyNumPercent = new BigDecimal(0); |
| | | |
| | | @ApiModelProperty(value = "舞蹈类党员人数") |
| | | private Integer wdNum; |
| | | |
| | | @ApiModelProperty(value = "舞蹈类党员人数百分比") |
| | | private BigDecimal wdNumPercent = new BigDecimal(0); |
| | | |
| | | @ApiModelProperty(value = "其他类党员人数") |
| | | private Integer qtNum; |
| | | |
| | | @ApiModelProperty(value = "其他类党员人数百分比") |
| | | private BigDecimal qtNumPercent = new BigDecimal(0); |
| | | |
| | | @ApiModelProperty(value = "无类型党员人数") |
| | | private Integer wuNum; |
| | | |
| | | @ApiModelProperty(value = "无类型党员人数百分比") |
| | | private BigDecimal wuNumPercent = new BigDecimal(0); |
| | | |
| | | @ApiModelProperty(value = "党员列表") |
| | | private List<PartyBuildingMemberVO> partyMemberList; |
| | |
| | | @ApiModelProperty(value = "参与志愿者活动次数") |
| | | private Integer participateVolunteerActivityNum; |
| | | |
| | | @ApiModelProperty(value = "参与志愿者活动次数百分比") |
| | | private BigDecimal participateVolunteerActivityNumPercent = new BigDecimal(0); |
| | | |
| | | @ApiModelProperty(value = "参与志愿者活动时长") |
| | | private Integer participateVolunteerActivityDuration; |
| | | |
| | | @ApiModelProperty(value = "参与志愿者活动时长百分比") |
| | | private BigDecimal participateVolunteerActivityDurationPercent = new BigDecimal(0); |
| | | |
| | | @ApiModelProperty(value = "参与党员活动次数") |
| | | private Integer participatePartyActivityNum; |
| | | |
| | | @ApiModelProperty(value = "参与党员活动次数百分比") |
| | | private BigDecimal participatePartyActivityNumPercent = new BigDecimal(0); |
| | | |
| | | @ApiModelProperty(value = "参与党员活动时长") |
| | | private Integer participatePartyActivityDuration; |
| | | |
| | | @ApiModelProperty(value = "参与党员活动时长百分比") |
| | | private BigDecimal participatePartyActivityDurationPercent = new BigDecimal(0); |
| | | |
| | | @ApiModelProperty(value = "月份统计list") |
| | | private List<String> monthList; |
| | | |
| | |
| | | @Data |
| | | public class ComPbMemberExcelVO { |
| | | |
| | | @ExcelProperty(value = "党员姓名", index = 0) |
| | | private String comName; |
| | | @ExcelProperty(value = "账号", index = 0) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "身份证号", index = 1) |
| | | private String idCard; |
| | | @ExcelProperty(value = "党员姓名", index = 1) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "所属党组织", index = 2) |
| | | private String orgName; |
| | |
| | | @ExcelProperty(value = "转正日期", index = 4) |
| | | private Date employmentTime; |
| | | |
| | | @ExcelProperty(value = "所属社区", index = 5) |
| | | private String communityName; |
| | | @ExcelProperty(value = "报道单位", index = 5) |
| | | private String checkUnitName; |
| | | |
| | | @ExcelProperty(value = "党龄", index = 6) |
| | | private Integer partyAge; |
| | | |
| | | @ExcelProperty(value = "状态",index = 7) |
| | | private String status; |
| | | } |
| | |
| | | @ApiModelProperty("业务主键 用于跳转") |
| | | private Long businessId; |
| | | |
| | | @ApiModelProperty("社区活动类型 1志愿者活动 2居民活动") |
| | | @ApiModelProperty("社区活动类型 1志愿者活动 2居民活动 3党建活动") |
| | | private Integer activityType; |
| | | |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.civil.*; |
| | | import com.panzhihua.common.model.dtos.common.*; |
| | | import com.panzhihua.common.model.dtos.community.warehouse.ComActWarehouseApplyDTO; |
| | | import com.panzhihua.common.model.dtos.community.GetIdentityEidTokenDTO; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | |
| | | import com.panzhihua.common.model.dtos.civil.ComActSocialWorkerEditDTO; |
| | | import com.panzhihua.common.model.dtos.civil.ComActSocialWorkerExcelVO; |
| | | import com.panzhihua.common.model.dtos.civil.PageComActSocialWorkerDTO; |
| | | import com.panzhihua.common.model.dtos.common.AddComMngVolunteerOrgTeamDto; |
| | | import com.panzhihua.common.model.dtos.common.AddComMngVolunteerServiceTypeDto; |
| | | import com.panzhihua.common.model.dtos.common.AddComMngVolunteerSkillDto; |
| | | import com.panzhihua.common.model.dtos.common.EditComMngVolunteerOrgTeamDto; |
| | | import com.panzhihua.common.model.dtos.common.EditComMngVolunteerServiceTypeDto; |
| | | import com.panzhihua.common.model.dtos.common.EditComMngVolunteerSkillDto; |
| | | import com.panzhihua.common.model.dtos.common.PageComMngVolunteerOrgTeamDto; |
| | | import com.panzhihua.common.model.dtos.common.PageComMngVolunteerServiceTypeDto; |
| | | import com.panzhihua.common.model.dtos.common.PageComMngVolunteerSkillDto; |
| | | import com.panzhihua.common.model.dtos.community.AddComActDynTypeDTO; |
| | | import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.CancelRecordDTO; |
| | |
| | | */ |
| | | @GetMapping("/screen/courtyard/base") |
| | | R getCourtyardBaseData(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * description queryByPage 分页查询 |
| | | * |
| | | * @param comActEasyPhotoHandler 请求参数 |
| | | * @return 分页查询返回参数 |
| | | * @author lyq |
| | | * @date 2022-03-01 13:45:10 |
| | | */ |
| | | @PostMapping("/comActEasyPhotoHandler/page") |
| | | R queryEasyPhotoHandler(@RequestBody PageComActEasyPhotoHandlerDto comActEasyPhotoHandler); |
| | | |
| | | /** |
| | | * description edit 编辑数据 |
| | | * |
| | | * @param comActEasyPhotoHandler 请求参数 |
| | | * @return 编辑结果 |
| | | * @author lyq |
| | | * @date 2022-03-01 13:45:10 |
| | | */ |
| | | @PostMapping("/comActEasyPhotoHandler/edit") |
| | | R editEasyPhotoHandler(@RequestBody EditComActEasyPhotoHandlerDto comActEasyPhotoHandler); |
| | | } |
| | |
| | | * 查询用户党员认证信息 |
| | | * |
| | | * @param id |
| | | * @param communityId |
| | | * 用户ID |
| | | * @return 查询结果 |
| | | */ |
| | | @GetMapping("/partybuildIng/usercertification") |
| | | R userCertification(@RequestParam("id") Long id); |
| | | R userCertification(@RequestParam("id") Long id,@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 查询待认证党员信息 |
| | |
| | | sysUserNoticeVO.setBusinessId(id); |
| | | sysUserNoticeVO.setStatus(0); |
| | | sysUserNoticeVO.setBusinessStatus(1); |
| | | sysUserNoticeVO.setActivityType(1 == isVolunteer ? 1 : 2); |
| | | sysUserNoticeVO.setActivityType(comActActivityVO.getType()); |
| | | R r2 = userService.addNotice(sysUserNoticeVO); |
| | | if (R.isOk(r2)) { |
| | | log.info("新增取消社区活动通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | R r = communityService.getSignLists(activitySignVO); |
| | | if (R.isOk(r)) { |
| | | List<ComActActSignExcelVO> excelVOS = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActActSignExcelVO.class); |
| | | excelVOS.forEach(e -> e.generateCondition()); |
| | | List<ComActActSignExcelNewVO> excelVOS = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActActSignExcelNewVO.class); |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | |
| | | return R.fail("未查询到用户"); |
| | | } |
| | | |
| | | @ApiOperation(value = "excel导出-活动签到居民志愿者") |
| | | @PostMapping("regist/export/new") |
| | | public R activityExportRegistNew(@RequestBody ComActActRegistVO comActActRegistVO) { |
| | | String name = "活动签到导出数据.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | R r = communityService.getRegistLists(comActActRegistVO); |
| | | if (R.isOk(r)) { |
| | | List<ComActActRegistExcelNewVO> excelVOS = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActActRegistExcelNewVO.class); |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComActActRegistExcelNewVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("活动签到导出数据").build(); |
| | | excelWriter.write(excelVOS, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | return R.fail("未查询到用户"); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区活动数据统计", response = ComActActivityStatisticsVO.class) |
| | | @GetMapping("statistics") |
| | | public R activityStatistics(@RequestParam("activityId") Long activityId){ |
| | |
| | | import com.panzhihua.common.model.dtos.partybuilding.ComDataStatisticsOrgDto; |
| | | import com.panzhihua.common.model.dtos.partybuilding.PageComDataStatisticsMemberDto; |
| | | import com.panzhihua.common.model.vos.PartyMemberListExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeRightExcelAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeRightStatisticsAdminVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComDataStatisticsMemberExcelVo; |
| | |
| | | |
| | | R updated = partyBuildingService.updatePartyBuildingMember(partyBuildingMemberVO); |
| | | |
| | | // 审核通过: 修改用户的党员状态 |
| | | if (R.isOk(updated)) { |
| | | // 审核通过: 修改用户的党员状态 |
| | | PartyBuildingMemberVO vo1 = |
| | | JSONObject.parseObject(JSONObject.toJSONString(updated.getData()), PartyBuildingMemberVO.class); |
| | | //金沙社区特殊需求 添加党员默认添加志愿者 |
| | | if(vo1.getCommunityId()==2){ |
| | | ComMngVolunteerMngVO comMngVolunteerMngVO=new ComMngVolunteerMngVO(); |
| | | comMngVolunteerMngVO.setOrgId(53L); |
| | | comMngVolunteerMngVO.setName(vo1.getName()); |
| | | comMngVolunteerMngVO.setPhone(vo1.getPhone()); |
| | | comMngVolunteerMngVO.setIdCard(vo1.getIdCard()); |
| | | comMngVolunteerMngVO.setState(2); |
| | | comMngVolunteerMngVO.setCommunityId(2L); |
| | | R r = communityService.addVolunteer(comMngVolunteerMngVO); |
| | | // 支援者添加成功,修改小程序用户的志愿者状态 ,通过手机号 |
| | | if (R.isOk(r)) { |
| | | String phone = comMngVolunteerMngVO.getPhone(); |
| | | R r1 = userService.putUserIsVolunteer(phone, 1); |
| | | if (R.isOk(r1)) { |
| | | log.info("修改手机号【{}】的支援者状态为是", phone); |
| | | } else { |
| | | log.info("手机号【{}】没有小程序用户", phone); |
| | | } |
| | | } |
| | | } |
| | | Long userId = vo1.getUserId(); |
| | | Long memId = partyBuildingMemberVO.getId(); |
| | | String userIdcard = vo1.getIdCard(); |
| | |
| | | String name = "党员信息数据.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | // 用户搜索了就下载搜索的用户否则下载所有用户 |
| | | R r = partyBuildingService.exportPbMember(organizationVO); |
| | | R r = partyBuildingService.exportPartyMember(organizationVO); |
| | | if (R.isOk(r)) { |
| | | List<ComPbMemberExcelVO> eexcelUserDTOS = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComPbMemberExcelVO.class); |
| | |
| | | * @author lyq |
| | | * @date 2022-03-01 13:45:10 |
| | | */ |
| | | @PutMapping("/edit") |
| | | @PostMapping("/edit") |
| | | public R edit(@RequestBody EditComActEasyPhotoHandlerDto comActEasyPhotoHandler) { |
| | | return this.comActEasyPhotoHandlerService.update(comActEasyPhotoHandler); |
| | | } |
| | |
| | | + "a.`status`, " + "a.is_qr_code, " + "a.publish_at, " + "a.begin_at, " + "a.cover, " + "a.end_at, " + "a.volunteer_max, " |
| | | + "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,a.type " + "FROM " + "com_act_activity a " |
| | | + "a.sign_up_end, " + "ca.name as communityName,a.type,a.party_member_max " + "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 1=1 " + |
| | | |
| | |
| | | + "left join com_street as cs on cs.street_id = ca.street_id\n" + "where ca.community_id = ${communityId}") |
| | | ComPopulationActVO getPopulationActById(@Param("communityId") Long communityId); |
| | | |
| | | @Select("select `name`,street_id from com_street where area_code = #{areaCode}") |
| | | @Select("select `name`,street_id from com_street order by area_code asc") |
| | | List<StreetAllAppletsVO> getStreetList(String areaCode); |
| | | |
| | | @Select("select ca.`name`,ca.street_id,ca.community_id,cs.`name` as streetName from com_act as ca left join com_street as cs on cs.street_id = ca.street_id where ca.state = 0 and ca.street_id = #{streetId}") |
| | | List<CommunitySwitchAllAppletsVO> getCommunityListByStreetId(@Param("streetId") Long streetId); |
| | | |
| | | @Select("select ca.`name`,ca.street_id,ca.community_id,cs.`name` as streetName " + |
| | | @Select("<script> select ca.`name`,ca.street_id,ca.community_id,cs.`name` as streetName " + |
| | | "from com_act as ca " + |
| | | "left join com_street as cs on cs.street_id = ca.street_id " + |
| | | "where ca.state = 0 and ca.name like '%%' and cs.area_code = #{areaCode}") |
| | | "where ca.state = 0 and ca.name like concat('%',#{name},'%') <if test='areaCode !=null and areaCode !=""'> and cs.area_code = #{areaCode} </if> </script> ") |
| | | List<CommunitySwitchAllAppletsVO> getCommunityListByName(@Param("name") String name,@Param("areaCode") String areaCode); |
| | | |
| | | @Select("SELECT c.community_id, c.`name`, c.street_id, cs.`name` as streetName," + |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import lombok.Data; |
| | | |
| | |
| | | */ |
| | | private Integer serviceType; |
| | | /** |
| | | * 服务状态 0待执行 1已完成 |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 发起人id |
| | | */ |
| | | private Long senderId; |
| | | |
| | | private Date createTime; |
| | | /** |
| | | * 得分 |
| | | */ |
| | | private Integer score; |
| | | /** |
| | | * 汇报内容 |
| | | */ |
| | | private String resultContent; |
| | | /** |
| | | * 汇报图片 |
| | | */ |
| | | private String resultUrl; |
| | | /** |
| | | * 业务分类(1.随手拍 2.微心愿) |
| | | */ |
| | | public interface ServiceType{ |
| | | int SSP = 1; |
| | | int WXY = 2; |
| | | } |
| | | /** |
| | | * 服务状态 0待执行 1已完成 |
| | | */ |
| | | public interface Status{ |
| | | int DZX = 0; |
| | | int YWC= 1; |
| | | } |
| | | } |
| | | |
| | |
| | | int dsh = 1; |
| | | int dfk = 2; |
| | | int ybh = 3; |
| | | int ywc = 4; |
| | | int dpj = 4; |
| | | int ypj = 5; |
| | | } |
| | | } |
| | |
| | | * @param serviceId 业务id |
| | | * @param type 人员类型(1.后台用户 2.党员 3.志愿者 4.社工 5.四长四员) |
| | | * @param serviceType 业务类型(1.随手拍 2.微心愿) |
| | | * @param sponsorId 发起人id |
| | | */ |
| | | void addHandleRecord(Long communityId,Long userId,Long serviceId,Integer type,Integer serviceType); |
| | | void addHandleRecord(Long communityId,Long userId,Long serviceId,Integer type,Integer serviceType,Long sponsorId); |
| | | |
| | | } |
| | |
| | | int size = entry.getValue().size(); |
| | | temp.setFiled(entry.getKey()); |
| | | temp.setNum(size); |
| | | temp.setPercent(new BigDecimal(size/teamCount).setScale(2)); |
| | | temp.setPercent(new BigDecimal(size) |
| | | .divide(new BigDecimal(teamCount), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | teamTypeCircleData.add(temp); |
| | | } |
| | | } |
| | |
| | | int size = entry.getValue().size(); |
| | | temp.setFiled(entry.getKey()); |
| | | temp.setNum(size); |
| | | temp.setPercent(new BigDecimal(size/adjustCount).setScale(2)); |
| | | temp.setPercent(new BigDecimal(size) |
| | | .divide(new BigDecimal(adjustCount), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | adjustCircleData.add(temp); |
| | | } |
| | | } |
| | |
| | | int size = entry.getValue().size(); |
| | | temp.setFiled(entry.getKey()); |
| | | temp.setNum(size); |
| | | temp.setPercent(new BigDecimal(size/controlCount).setScale(2)); |
| | | temp.setPercent(new BigDecimal(size) |
| | | .divide(new BigDecimal(controlCount), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | controlCircleData.add(temp); |
| | | } |
| | | } |
| | |
| | | int size = entry.getValue().size(); |
| | | temp.setFiled(entry.getKey()); |
| | | temp.setNum(size); |
| | | temp.setPercent(new BigDecimal(size/count).setScale(2)); |
| | | temp.setPercent(new BigDecimal(size) |
| | | .divide(new BigDecimal(count), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | volunteerServiceTypeCircleData.add(temp); |
| | | } |
| | | } |
| | |
| | | int sum = volunteerAgeCircleData.stream().mapToInt(StatisticsCommVO::getNum).sum(); |
| | | volunteerAgeCircleData.forEach(e -> { |
| | | if (sum != 0) { |
| | | e.setPercent(new BigDecimal(e.getNum()/sum).setScale(2)); |
| | | e.setPercent(new BigDecimal(e.getNum()) |
| | | .divide(new BigDecimal(sum), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | } else { |
| | | e.setPercent(new BigDecimal(0)); |
| | | } |
| | |
| | | int size = entry.getValue().size(); |
| | | temp.setFiled(entry.getKey()); |
| | | temp.setNum(size); |
| | | temp.setPercent(new BigDecimal(size/count).setScale(2)); |
| | | temp.setPercent(new BigDecimal(size) |
| | | .divide(new BigDecimal(count), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | volunteerSkillCircleData.add(temp); |
| | | } |
| | | } |
| | |
| | | if (comActActivityVO.getSignUpEnd() != null && now.getTime() < comActActivityVO.getSignUpEnd().getTime() |
| | | && now.getTime() > comActActivityVO.getSignUpBegin().getTime()) { |
| | | comActActivityDO.setStatus(3); |
| | | comActActivityDO.setPublishAt(new Date()); |
| | | } |
| | | boolean b = this.updateById(comActActivityDO); |
| | | if (b) { |
| | |
| | | List<ComActActRegistDO> collect = regList.stream().sorted(Comparator.comparing(ComActActRegistDO::getId).reversed()).collect(Collectors.toList()); |
| | | comActActivityVO.setTimes(collect.get(0).getTimes()); |
| | | ComActActRegistDO comActActRegistDO=collect.get(0); |
| | | if(comActActRegistDO.getType()==2){ |
| | | if(comActActRegistDO.getType()==3){ |
| | | if(comActActRegistDO.getEndTime()==null){ |
| | | comActActivityVO.setSignType(2); |
| | | } |
| | |
| | | .collect(Collectors.toList()); |
| | | comActActivityVO.setSignCount(collect.size()); |
| | | comActActivityVO.setIsComment(0); |
| | | comActActivityVO.setIsRegist(0); |
| | | ActivitySignVO activitySignVO = collect.get(0); |
| | | Integer activityStatus = comActActivityVO.getStatus(); |
| | | if (activityStatus.intValue() == 3) { |
| | |
| | | log.error("时间转换异常【{}】", e.getMessage()); |
| | | } |
| | | comActActivityVO.setSingDate(createAt); |
| | | comActActivityVO.setTimes(activitySignVO.getTimes()); |
| | | Integer totalAward = comActActRegistDAO.selectTotalAwardWithRegist(activitySignVO.getActivityId(), userId); |
| | | comActActivityVO.setAward(totalAward); |
| | | comActActivityVO.setActivitySignVOList(collect); |
| | |
| | | } |
| | | comActActRegistDO.setActivityId(activityId); |
| | | comActActRegistDO.setStartTime(new Date()); |
| | | comActActRegistDO.setType(1); |
| | | comActActRegistDO.setType(comActActivityDO.getType()); |
| | | comActActRegistDO.setUserId(userId); |
| | | comActActRegistDO.setIsVolunteer(comActActSignDO.getIsVolunteer()); |
| | | comActActRegistDO.setCreateAt(nowDate); |
| | |
| | | comActActRegistDO.setPosition(comActActRegistVO.getPosition()); |
| | | comActActRegistDO.setTimes(signAllCount+1); |
| | | int result = comActActRegistDAO.insert(comActActRegistDO); |
| | | if (result > 0&&comActActRegistDO.getType()==1&&comActActivityDO.getType()!=3) { |
| | | if (result > 0&&comActActivityDO.getType()!=3) { |
| | | if (isHave) { |
| | | boolean isVolunteerAct = comActActivityDO.getVolunteerMax() != 0; |
| | | AddComActIntegralUserDTO addComActIntegralUserDTO=new AddComActIntegralUserDTO(); |
| | |
| | | LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(userId); |
| | | comActDiscussVO.setUserName(loginUserInfoVO.getName()); |
| | | comActDiscussVO.setUserNickName(loginUserInfoVO.getNickName()); |
| | | comActDiscussVO.setImageUrl(loginUserInfoVO.getImageUrl()); |
| | | |
| | | //分页查询评论列表 |
| | | PageComActDiscussCommentDTO pageComActDiscussCommentDTO = new PageComActDiscussCommentDTO(); |
| | |
| | | import com.panzhihua.service_community.entity.ComActEasyPhotoEvaluate; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoEvaluateMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoDO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishDO; |
| | | import com.panzhihua.service_community.service.ComActEasyPhotoEvaluateService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.service_community.service.ComActMicroWishOperationRecordService; |
| | | import com.panzhihua.service_community.service.ComActMicroWishService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import com.panzhihua.common.model.dtos.common.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | if(easyPhotoDO == null){ |
| | | return R.fail("未查询到该记录"); |
| | | } |
| | | if(!easyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.ywc)){ |
| | | if(!easyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.dpj)){ |
| | | return R.fail("当前状态不可进行评价"); |
| | | } |
| | | Date nowDate = new Date(); |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * title: 随手拍、微心愿处理人绑定表表服务实现类 |
| | | * <p> |
| | |
| | | * @param serviceType 业务类型(1.随手拍 2.微心愿) |
| | | */ |
| | | @Override |
| | | public void addHandleRecord(Long communityId, Long userId, Long serviceId, Integer type, Integer serviceType) { |
| | | public void addHandleRecord(Long communityId, Long userId, Long serviceId, Integer type, Integer serviceType,Long sponsorId) { |
| | | ComActEasyPhotoHandler easyPhotoHandler = new ComActEasyPhotoHandler(); |
| | | easyPhotoHandler.setCommunityId(communityId); |
| | | easyPhotoHandler.setStatus(ComActEasyPhotoHandler.Status.DZX); |
| | | easyPhotoHandler.setCreateTime(new Date()); |
| | | easyPhotoHandler.setUserId(userId); |
| | | easyPhotoHandler.setSenderId(sponsorId); |
| | | easyPhotoHandler.setServiceId(serviceId); |
| | | easyPhotoHandler.setType(type); |
| | | easyPhotoHandler.setServiceType(serviceType); |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.panzhihua.common.model.dtos.common.PageComActEasyPhotoEvaluateDto; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.BannerVO; |
| | | import com.panzhihua.service_community.entity.ComActEasyPhotoEvaluate; |
| | |
| | | } |
| | | |
| | | if (comActEasyPhotoVO1.getActivityId() != null |
| | | && comActEasyPhotoVO1.getStatus().equals(ComActEasyPhotoDO.status.ywc)) { |
| | | && comActEasyPhotoVO1.getStatus().equals(ComActEasyPhotoDO.status.dpj)) { |
| | | // 查询随手拍活动 |
| | | ComActEasyPhotoActivityDO photoActivityDO = |
| | | comActEasyPhotoActivityMapper.selectById(comActEasyPhotoVO1.getActivityId()); |
| | |
| | | if(comActEasyPhotoVO.getHandleList() != null && comActEasyPhotoVO.getHandleList().size() > 0){ |
| | | comActEasyPhotoVO.getHandleList().forEach(handle -> { |
| | | easyPhotoHandlerService.addHandleRecord(cmActEasyPhotoDO.getCommunityId(),comActEasyPhotoVO.getUserId() |
| | | ,cmActEasyPhotoDO.getId(),handle.getType(), ComActEasyPhotoHandler.ServiceType.SSP); |
| | | ,cmActEasyPhotoDO.getId(),handle.getType(), ComActEasyPhotoHandler.ServiceType.SSP,comActEasyPhotoVO.getSponsorId()); |
| | | }); |
| | | } |
| | | break; |
| | |
| | | comActEasyPhotoFeedbackMapper.insert(photoFeedbackDO); |
| | | break; |
| | | case 4: |
| | | if (cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.ywc)) { |
| | | if (cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.ypj)) { |
| | | return R.fail("该随手拍已完成,不可重复操作"); |
| | | } |
| | | if (StringUtils.isNotEmpty(comActEasyPhotoVO.getHandleResult()) |
| | |
| | | // comActUserWalletService.examineAddMoney(comActEasyPhotoVO.getActivityType(),comActEasyPhotoVO.getId(),comActEasyPhotoVO.getUserId(),BigDecimal.ZERO); |
| | | // } |
| | | cmActEasyPhotoDO.setFeedbackAt(nowDate); |
| | | cmActEasyPhotoDO.setStatus(ComActEasyPhotoDO.status.ywc); |
| | | cmActEasyPhotoDO.setStatus(ComActEasyPhotoDO.status.dpj); |
| | | cmActEasyPhotoDO.setCompleteId(comActEasyPhotoVO.getUserId()); |
| | | if(comActEasyPhotoVO.getUrbanStatus()!=null&&comActEasyPhotoVO.getUrbanStatus()==2){ |
| | | cmActEasyPhotoDO.setUrbanStatus(2); |
| | |
| | | } |
| | | else { |
| | | identityType=1; |
| | | remark.append("取消党员活动扣除积分"); |
| | | remark.append("取消居民活动扣除积分"); |
| | | } |
| | | |
| | | } |
| | |
| | | if(comActMicroWishVO.getHandleList() != null && comActMicroWishVO.getHandleList().size() > 0){ |
| | | comActMicroWishVO.getHandleList().forEach(handle -> { |
| | | easyPhotoHandlerService.addHandleRecord(microWishDO.getCommunityId(),handle.getUserId() |
| | | ,microWishDO.getId(),handle.getType(), ComActEasyPhotoHandler.ServiceType.WXY); |
| | | ,microWishDO.getId(),handle.getType(), ComActEasyPhotoHandler.ServiceType.WXY,comActMicroWishVO.getSponsorId()); |
| | | }); |
| | | } |
| | | break; |
| | |
| | | street.setCount(communityList.size()); |
| | | } |
| | | }); |
| | | streetList = streetList.stream().sorted(Comparator.comparing(StreetAllAppletsVO::getCount).reversed()) |
| | | .collect(Collectors.toList()); |
| | | // streetList = streetList.stream().sorted(Comparator.comparing(StreetAllAppletsVO::getCount).reversed()) |
| | | // .collect(Collectors.toList()); |
| | | return R.ok(streetList); |
| | | } |
| | | |
| | |
| | | SELECT |
| | | caar.id, |
| | | caar.activity_id, |
| | | caar.start_time, |
| | | caar.end_time, |
| | | caar.create_at, |
| | | caar.position, |
| | | caar.times, |
| | |
| | | su.tags, |
| | | caar.is_volunteer, |
| | | t.duration, |
| | | CASE |
| | | |
| | | WHEN su.is_partymember = 1 THEN |
| | | '党员' |
| | | WHEN caar.is_volunteer = 1 THEN |
| | | '志愿者' ELSE '居民' |
| | | END identity |
| | | CASE WHEN t.type = 1 and caar.is_volunteer = 1 THEN '志愿者' WHEN t.type = 1 and caar.is_volunteer = 0 THEN '居民' WHEN t.type=2 THEN '居民' ELSE '党员' END identity |
| | | |
| | | FROM |
| | | com_act_act_regist caar |
| | |
| | | com_act_act_regist caar |
| | | LEFT JOIN sys_user su ON caar.user_id = su.user_id |
| | | LEFT JOIN com_act_activity t on caar.activity_id = t.id |
| | | WHERE caar.activity_id = #{id} AND caar.user_id = #{userId} AND caar.`type` = 1 ORDER BY caar.id DESC |
| | | WHERE caar.activity_id = #{id} AND caar.user_id = #{userId} ORDER BY caar.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 id="getSignLists" resultType="com.panzhihua.common.model.vos.community.ComActActSignExcelVO"> |
| | | SELECT |
| | | caas.create_at, |
| | | IF(r.times IS NULL, 0, r.times) AS times, |
| | | caas.times, |
| | | CASE |
| | | WHEN caas.status = 1 THEN |
| | | '已报名' ELSE '已取消' |
| | |
| | | su.`name`, |
| | | su.phone, |
| | | su.tags, |
| | | CASE |
| | | WHEN caas.is_volunteer = 1 THEN |
| | | '志愿者' ELSE '居民' |
| | | END identity |
| | | CASE WHEN t.type = 1 THEN '志愿者' WHEN t.type=2 THEN '居民' ELSE '党员' END identity |
| | | |
| | | FROM |
| | | com_act_act_sign caas |
| | |
| | | LEFT JOIN ( |
| | | SELECT * FROM ( |
| | | SELECT * FROM com_act_act_regist |
| | | WHERE activity_id = #{activitySignVO.activityId} AND type = 1 |
| | | WHERE activity_id = #{activitySignVO.activityId} |
| | | 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 |
| | |
| | | </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, |
| | | CASE WHEN t.type = 1 and a.is_volunteer = 1 THEN '志愿者' WHEN t.type = 1 and a.is_volunteer = 0 THEN '居民' WHEN t.type=2 THEN '居民' ELSE '党员' END identity, |
| | | u.phone, u.tags, a.create_at, a.is_volunteer, a.status , a.times, |
| | | a.reason, IF(r.times IS NULL, 0, r.award * r.times) AS award, t.limit |
| | | FROM com_act_act_sign a |
| | |
| | | LEFT JOIN ( |
| | | SELECT * FROM ( |
| | | SELECT * FROM com_act_act_regist |
| | | WHERE activity_id = #{activitySignVO.activityId} AND type = 1 |
| | | WHERE activity_id = #{activitySignVO.activityId} |
| | | 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 |
| | |
| | | LEFT JOIN ( |
| | | SELECT * FROM ( |
| | | SELECT * FROM com_act_act_regist |
| | | WHERE activity_id = #{id} AND type = 1 |
| | | WHERE activity_id = #{id} |
| | | 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 |
| | |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT activity_type AS filed, COUNT(id) AS num |
| | | FROM com_act_activity |
| | | WHERE community_id = ${communityId} |
| | | WHERE community_id = ${communityId} AND `status` IN(2,3,4,5) |
| | | <if test="isResidentAct"> |
| | | AND `type` = 2 |
| | | </if> |
| | |
| | | </select> |
| | | <select id="getActAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT filed, SUM(num) AS num FROM ( |
| | | SELECT DATE_FORMAT( publish_at, '%Y-%m' ) AS filed, COUNT(id) AS num |
| | | SELECT DATE_FORMAT( create_at, '%Y-%m' ) AS filed, COUNT(id) AS num |
| | | FROM com_act_activity |
| | | WHERE community_id = ${communityId} |
| | | WHERE community_id = ${communityId} AND `status` IN(2,3,4,5) |
| | | <if test="isResidentAct"> |
| | | AND `type` = 2 |
| | | </if> |
| | | <if test="!isResidentAct"> |
| | | AND `type` = 1 |
| | | </if> |
| | | AND DATE_FORMAT( publish_at, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | AND DATE_FORMAT( create_at, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | UNION ALL SELECT * FROM |
| | | ( |
| | | SELECT DATE_FORMAT(curdate(),'%Y-%m') AS filed, 0 AS num union |
| | |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT COUNT(id) AS num |
| | | FROM com_act_activity |
| | | WHERE community_id = ${communityId} |
| | | WHERE community_id = ${communityId} AND `status` IN(2,3,4,5) |
| | | <if test="isResidentAct"> |
| | | AND `type` = 2 |
| | | </if> |
| | | <if test="!isResidentAct"> |
| | | AND `type` = 1 |
| | | </if> |
| | | AND DATE_FORMAT( publish_at, '%Y-%m' ) <= #{date} |
| | | AND DATE_FORMAT( create_at, '%Y-%m' ) <= #{date} |
| | | </select> |
| | | <select id="indexActList" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT id, `status`, activity_type, activity_name, cover |
| | |
| | | </select> |
| | | |
| | | <!--查询指定行数据--> |
| | | <select id="queryAllByLimit" resultMap="ComActEasyPhotoHandlerMap"> |
| | | <select id="queryAllByLimit" resultType="com.panzhihua.common.model.vos.common.ComActEasyPhotoHandlerVo"> |
| | | select |
| | | id, community_id, user_id, service_id, type, service_type |
| | | from com_act_easy_photo_handler |
| | | t.id, t.community_id, t.user_id, t.service_id, t.type, t.service_type ,t.status ,t1.name as senderName ,t.create_time |
| | | from com_act_easy_photo_handler t left join sys_user t1 on t.sender_id = t1.user_id |
| | | <where> |
| | | <if test="dto.id != null"> |
| | | and id = #{dto.id} |
| | | and t.id = #{dto.id} |
| | | </if> |
| | | <if test="dto.communityId != null"> |
| | | and community_id = #{dto.communityId} |
| | | and t.community_id = #{dto.communityId} |
| | | </if> |
| | | <if test="dto.userId != null"> |
| | | and user_id = #{dto.userId} |
| | | and t.user_id = #{dto.userId} |
| | | </if> |
| | | <if test="dto.serviceId != null"> |
| | | and service_id = #{dto.serviceId} |
| | | and t.service_id = #{dto.serviceId} |
| | | </if> |
| | | <if test="dto.type != null"> |
| | | and type = #{dto.type} |
| | | and t.type = #{dto.type} |
| | | </if> |
| | | <if test="dto.serviceType != null"> |
| | | and service_type = #{dto.serviceType} |
| | | and t.service_type = #{dto.serviceType} |
| | | </if> |
| | | <if test="dto.status !=null"> |
| | | and t.status = #{dto.status} |
| | | </if> |
| | | </where> |
| | | order by create_at desc |
| | |
| | | * @return 查询结果 |
| | | */ |
| | | @GetMapping("usercertification") |
| | | R userCertification(@RequestParam("id") Long id) { |
| | | R userCertification(@RequestParam("id") Long id,@RequestParam("communityId")Long communityId) { |
| | | List<ComPbMemberDO> comPbMemberDOList = |
| | | comPbMemberService.list(new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getUserId, id)); |
| | | comPbMemberService.list(new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getUserId, id).eq(ComPbMemberDO::getCommunityId,communityId)); |
| | | List<PartyBuildingMemberVO> partyBuildingMemberVOList = new ArrayList<>(); |
| | | comPbMemberDOList.forEach(comPbMemberDO -> { |
| | | PartyBuildingMemberVO partyBuildingMemberVO = new PartyBuildingMemberVO(); |
| | |
| | | * @param buildingMemberVO 请求参数 |
| | | * @return 党员列表 |
| | | */ |
| | | List<PartyMemberListExcelVO> exportPartyMemberList(@Param("dto") PagePartyOrganizationVO buildingMemberVO); |
| | | List<ComPbMemberExcelVO> exportPartyMemberList(@Param("dto") PagePartyOrganizationVO buildingMemberVO); |
| | | |
| | | /** |
| | | * 根据id查询党员信息 |
| | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldStrategy; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | |
| | | /** |
| | | * 转正时间 |
| | | */ |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) |
| | | private Date employmentTime; |
| | | |
| | | /** |
| | |
| | | import com.panzhihua.common.enums.ComPbMemberRoleTypeEnum; |
| | | import com.panzhihua.common.model.dtos.partybuilding.ComDataStatisticsOrgDto; |
| | | import com.panzhihua.common.model.dtos.partybuilding.PageComDataStatisticsMemberDto; |
| | | import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComDataStatisticsMemberExcelVo; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitErrorExcelVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbMemberRoleErrorExcelVo; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbMemberRoleExcelVo; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_dangjian.entity.ComPbCheckUnit; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党员 |
| | |
| | | private ComPbDynDAO comPbDynDAO; |
| | | @Resource |
| | | private ComPbDynUserDAO comPbDynUserDAO; |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | /** |
| | | * 新增党员 |
| | |
| | | comPbMemberDOS.add(comPbMemberDO); |
| | | } |
| | | } |
| | | comPbMemberDOS.forEach(comPbMemberDO -> { |
| | | //金沙社区特殊需求 添加党员默认添加志愿者 |
| | | if(comPbMemberDO.getCommunityId()==2L){ |
| | | ComMngVolunteerMngVO comMngVolunteerMngVO=new ComMngVolunteerMngVO(); |
| | | comMngVolunteerMngVO.setOrgId(53L); |
| | | comMngVolunteerMngVO.setName(comPbMemberDO.getName()); |
| | | comMngVolunteerMngVO.setPhone(comPbMemberDO.getPhone()); |
| | | comMngVolunteerMngVO.setIdCard(comPbMemberDO.getIdCard()); |
| | | comMngVolunteerMngVO.setState(2); |
| | | comMngVolunteerMngVO.setCommunityId(2L); |
| | | R r = communityService.addVolunteer(comMngVolunteerMngVO); |
| | | // 支援者添加成功,修改小程序用户的志愿者状态 ,通过手机号 |
| | | if (R.isOk(r)) { |
| | | String phone = comMngVolunteerMngVO.getPhone(); |
| | | R r1 = userService.putUserIsVolunteer(phone, 1); |
| | | if (R.isOk(r1)) { |
| | | log.info("修改手机号【{}】的支援者状态为是", phone); |
| | | } else { |
| | | log.info("手机号【{}】没有小程序用户", phone); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | this.saveBatch(comPbMemberDOS); |
| | | return R.ok(); |
| | | } |
| | |
| | | partyBuildingMemberVO.setOrgId(null); |
| | | } |
| | | BeanUtils.copyProperties(partyBuildingMemberVO, comPbMemberDO); |
| | | Integer type = partyBuildingMemberVO.getType(); |
| | | if (nonNull(type) && type.equals(1)) { |
| | | comPbMemberDO.setEmploymentTime(null); |
| | | } |
| | | comPbMemberDO.setAuditResult(partyBuildingMemberVO.getAuditResult()); |
| | | int i = comPbMemberDAO.updateById(comPbMemberDO); |
| | | if (i > 0) { |
| | |
| | | if (userId != null) { |
| | | String userKey = UserConstants.LOGIN_USER_INFO + userId; |
| | | stringRedisTemplate.delete(userKey); |
| | | return R.ok(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | |
| | | if (partyBuildingMemberVO.getPhotoPath() != null) { |
| | | comPbMemberDO.setPhotoPath(partyBuildingMemberVO.getPhotoPath()); |
| | | } |
| | | if (Objects.nonNull(partyBuildingMemberVO.getType())) { |
| | | if (nonNull(partyBuildingMemberVO.getType())) { |
| | | comPbMemberDO.setType(partyBuildingMemberVO.getType()); |
| | | } |
| | | if (StringUtils.isNotEmpty(partyBuildingMemberVO.getPosition())) { |
| | | comPbMemberDO.setPosition(partyBuildingMemberVO.getPosition()); |
| | | } |
| | | if (Objects.nonNull(partyBuildingMemberVO.getCheckUnitId())) { |
| | | if (nonNull(partyBuildingMemberVO.getCheckUnitId())) { |
| | | comPbMemberDO.setCheckUnitId(partyBuildingMemberVO.getCheckUnitId()); |
| | | } |
| | | if (StringUtils.isNotEmpty(partyBuildingMemberVO.getFunction())) { |
| | | comPbMemberDO.setFunction(partyBuildingMemberVO.getFunction()); |
| | | } |
| | | if (Objects.nonNull(partyBuildingMemberVO.getSpecialtyCategory())) { |
| | | if (nonNull(partyBuildingMemberVO.getSpecialtyCategory())) { |
| | | comPbMemberDO.setSpecialtyCategory(partyBuildingMemberVO.getSpecialtyCategory()); |
| | | comPbMemberDO.setSpecialtyName(partyBuildingMemberVO.getSpecialtyName()); |
| | | } |
| | | |
| | | Integer type = partyBuildingMemberVO.getType(); |
| | | if (nonNull(type) && type.equals(1)) { |
| | | comPbMemberDO.setEmploymentTime(null); |
| | | } |
| | | |
| | | |
| | |
| | | statisticsOrgVo.setCumulativeWishList(cumulativeWishList); |
| | | statisticsOrgVo.setCumulativeEasyList(cumulativeEasyList); |
| | | Integer partyMemberNum = statisticsOrgVo.getPartyMemberNum(); |
| | | if (Objects.nonNull(partyMemberNum) && partyMemberNum.intValue() > 0) { |
| | | if (nonNull(partyMemberNum) && partyMemberNum.intValue() > 0) { |
| | | Integer formalPartyMemberNum = statisticsOrgVo.getFormalPartyMemberNum(); |
| | | if (Objects.nonNull(formalPartyMemberNum) && formalPartyMemberNum.intValue() > 0) { |
| | | statisticsOrgVo.setFormalPartyMemberNumPercent(new BigDecimal(formalPartyMemberNum/partyMemberNum).setScale(2)); |
| | | if (nonNull(formalPartyMemberNum) && formalPartyMemberNum.intValue() > 0) { |
| | | statisticsOrgVo.setFormalPartyMemberNumPercent(new BigDecimal(formalPartyMemberNum) |
| | | .divide(new BigDecimal(partyMemberNum), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | } |
| | | Integer preparePartyMemberNum = statisticsOrgVo.getPreparePartyMemberNum(); |
| | | if (Objects.nonNull(preparePartyMemberNum) && preparePartyMemberNum.intValue() > 0) { |
| | | statisticsOrgVo.setPreparePartyMemberNumPercent(new BigDecimal(preparePartyMemberNum/partyMemberNum).setScale(2)); |
| | | if (nonNull(preparePartyMemberNum) && preparePartyMemberNum.intValue() > 0) { |
| | | statisticsOrgVo.setPreparePartyMemberNumPercent(new BigDecimal(preparePartyMemberNum) |
| | | .divide(new BigDecimal(partyMemberNum), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | } |
| | | Integer tyNum = statisticsOrgVo.getTyNum(); |
| | | if (nonNull(tyNum) && tyNum.intValue() > 0) { |
| | | statisticsOrgVo.setTyNumPercent(new BigDecimal(tyNum) |
| | | .divide(new BigDecimal(partyMemberNum), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | } |
| | | Integer msNum = statisticsOrgVo.getMsNum(); |
| | | if (nonNull(msNum) && msNum.intValue() > 0) { |
| | | statisticsOrgVo.setMsNumPercent(new BigDecimal(msNum) |
| | | .divide(new BigDecimal(partyMemberNum), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | } |
| | | Integer yyNum = statisticsOrgVo.getYyNum(); |
| | | if (nonNull(yyNum) && yyNum.intValue() > 0) { |
| | | statisticsOrgVo.setYyNumPercent(new BigDecimal(yyNum) |
| | | .divide(new BigDecimal(partyMemberNum), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | } |
| | | Integer wdNum = statisticsOrgVo.getWdNum(); |
| | | if (nonNull(wdNum) && wdNum.intValue() > 0) { |
| | | statisticsOrgVo.setWdNumPercent(new BigDecimal(wdNum) |
| | | .divide(new BigDecimal(partyMemberNum), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | } |
| | | Integer qtNum = statisticsOrgVo.getQtNum(); |
| | | if (nonNull(qtNum) && qtNum.intValue() > 0) { |
| | | statisticsOrgVo.setQtNumPercent(new BigDecimal(qtNum) |
| | | .divide(new BigDecimal(partyMemberNum), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | } |
| | | Integer wuNum = statisticsOrgVo.getWuNum(); |
| | | if (nonNull(wuNum) && wuNum.intValue() > 0) { |
| | | statisticsOrgVo.setWuNumPercent(new BigDecimal(wuNum) |
| | | .divide(new BigDecimal(partyMemberNum), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | } |
| | | } |
| | | Integer participateActivityNum = statisticsOrgVo.getParticipateActivityNum(); |
| | | if (nonNull(participateActivityNum) && participateActivityNum.intValue() > 0) { |
| | | Integer participateVolunteerActivityNum = statisticsOrgVo.getParticipateVolunteerActivityNum(); |
| | | if (nonNull(participateVolunteerActivityNum) && participateVolunteerActivityNum.intValue() > 0) { |
| | | statisticsOrgVo.setParticipateVolunteerActivityNumPercent(new BigDecimal(participateVolunteerActivityNum) |
| | | .divide(new BigDecimal(participateActivityNum), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | } |
| | | Integer participatePartyActivityNum = statisticsOrgVo.getParticipatePartyActivityNum(); |
| | | if (nonNull(participatePartyActivityNum) && participatePartyActivityNum.intValue() > 0) { |
| | | statisticsOrgVo.setParticipatePartyActivityNumPercent(new BigDecimal(participatePartyActivityNum) |
| | | .divide(new BigDecimal(participateActivityNum), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | } |
| | | } |
| | | Integer participateActivityDuration = statisticsOrgVo.getParticipateActivityDuration(); |
| | | if (nonNull(participateActivityDuration) && participateActivityDuration.intValue() > 0) { |
| | | Integer participateVolunteerActivityDuration = statisticsOrgVo.getParticipateVolunteerActivityDuration(); |
| | | if (nonNull(participateVolunteerActivityDuration) && participateVolunteerActivityDuration.intValue() > 0) { |
| | | statisticsOrgVo.setParticipateVolunteerActivityDurationPercent(new BigDecimal(participateVolunteerActivityDuration) |
| | | .divide(new BigDecimal(participateActivityDuration), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | } |
| | | Integer participatePartyActivityDuration = statisticsOrgVo.getParticipatePartyActivityDuration(); |
| | | if (nonNull(participatePartyActivityDuration) && participatePartyActivityDuration.intValue() > 0) { |
| | | statisticsOrgVo.setParticipatePartyActivityDurationPercent(new BigDecimal(participatePartyActivityDuration) |
| | | .divide(new BigDecimal(participateActivityDuration), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); |
| | | } |
| | | } |
| | | return R.ok(statisticsOrgVo); |
| | |
| | | order by m.create_at desc |
| | | </select> |
| | | |
| | | <select id="exportPartyMemberList" resultType="com.panzhihua.common.model.vos.PartyMemberListExcelVO"> |
| | | <select id="exportPartyMemberList" resultType="com.panzhihua.common.model.vos.partybuilding.ComPbMemberExcelVO"> |
| | | select |
| | | m.id, m.org_id, m.name, m.id_card, m.photo_path, m.join_time, m.employment_time, m.audit_result, m.create_at, m.update_at, |
| | | m.community_id, m.user_id, m.refuse_reason, m.phone, m.type, m.position, m.check_unit_id, m.function, m.specialty_category, |
| | |
| | | <select id="getHeaderOrgDataStatistics" resultType="com.panzhihua.common.model.vos.partybuilding.ComDataStatisticsHeaderOrgVo"> |
| | | SELECT |
| | | count( id ) AS orgNum, |
| | | ( SELECT count( id ) FROM com_pb_org WHERE community_id = #{communityId} AND area_id IS NOT NULL ) AS areaNum, |
| | | ( SELECT count( distinct area_id ) FROM com_pb_org WHERE community_id = #{communityId} AND area_id IS NOT NULL ) AS areaNum, |
| | | (select count(village_id) from com_mng_village where community_id = #{communityId}) as villageNum |
| | | FROM |
| | | com_pb_org |
| | |
| | | cpo.type, |
| | | cmv.`name` AS areaName, |
| | | cmb.`name` AS buildName, |
| | | cpmr.`name` AS userName, |
| | | cpmr.phone, |
| | | (select count(id) from com_pb_member where org_id = cpo.id and audit_result = 1) as countPerson |
| | | FROM |
| | | com_pb_org AS cpo |
| | | LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cpo.area_id |
| | | left join com_mng_building as cmb on cmb.id = cpo.build_id |
| | | LEFT JOIN com_pb_member_role cpmr ON cpmr.org_id = cpo.id |
| | | <where> |
| | | <if test="partyOrganizationVO.communityId != null"> |
| | | and cpo.community_id = ${partyOrganizationVO.communityId} |
| | |
| | | and cpo.build_id = #{partyOrganizationVO.buildId} |
| | | </if> |
| | | </where> |
| | | GROUP BY cpo.id |
| | | ORDER BY cpo.id desc |
| | | </select> |
| | | |
| | |
| | | and cpo.build_id = #{partyOrganizationVO.buildId} |
| | | </if> |
| | | </where> |
| | | GROUP BY cpo.id |
| | | ORDER BY cpo.id desc |
| | | </select> |
| | | |
| | |
| | | and cpo.build_id = #{partyOrganizationVO.buildId} |
| | | </if> |
| | | </where> |
| | | GROUP BY cpo.id |
| | | ORDER BY cpo.id desc |
| | | </select> |
| | | |