| | |
| | | if (R.isOk(r)&&r.getData()!=null) { |
| | | comActActivityVOS = (List<ComActActivityVO>)r.getData(); |
| | | } |
| | | R r1 = partyBuildingService.listActivity(userId, communityId, status); |
| | | if (R.isOk(r1)&&r1.getData()!=null) { |
| | | List<ComActActivityVO> data = (List<ComActActivityVO>)r1.getData(); |
| | | comActActivityVOS.addAll(data); |
| | | } |
| | | // R r1 = partyBuildingService.listActivity(userId, communityId, status); |
| | | // if (R.isOk(r1)&&r1.getData()!=null) { |
| | | // List<ComActActivityVO> data = (List<ComActActivityVO>)r1.getData(); |
| | | // comActActivityVOS.addAll(data); |
| | | // } |
| | | if (!ObjectUtils.isEmpty(comActActivityVOS)) { |
| | | String s = JSONArray.toJSONString(comActActivityVOS); |
| | | List<ComActActivityVO> comActActivityVOS1 = new ArrayList<>(); |
| | |
| | | R r3 = communityService.listEvaluate(userId); |
| | | if (R.isOk(r3) && !ObjectUtils.isEmpty(r3.getData())) { |
| | | List<ComActActEvaluateVO> comActActEvaluateVOS = JSONArray.parseArray(JSONArray.toJSONString(r3.getData()), ComActActEvaluateVO.class); |
| | | collect.forEach(comActActivityVO -> comActActEvaluateVOS.forEach(comActActEvaluateVO -> { |
| | | if (comActActEvaluateVO.getActivityId().equals(comActActivityVO.getId())) { |
| | | comActActivityVO.setMyRating(comActActEvaluateVO.getStarLevel()); |
| | | } |
| | | })); |
| | | collect.forEach(comActActivityVO -> { |
| | | List<ComActActEvaluateVO> evaluateVOS=comActActEvaluateVOS.stream().filter(comActActEvaluateVO -> comActActEvaluateVO.getActivityId().equals(comActActivityVO.getId())).collect(toList()); |
| | | if(comActActivityVO.getSignCount()>evaluateVOS.size()){ |
| | | comActActivityVO.setIsComment(1); |
| | | } |
| | | else { |
| | | comActActivityVO.setIsComment(0); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(collect); |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | public class PartyMemberListExcelVO { |
| | | @ExcelProperty(value = "姓名",index = 1) |
| | | private String name; |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @ExcelProperty(value = "入党时间",index = 3) |
| | | private Date joinTime; |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @ExcelProperty(value = "转正时间",index = 4) |
| | | private Date employmentTime; |
| | | @ExcelProperty(value = "党组织名字",index = 5) |
| | | private String orgName; |
| | | @ExcelProperty(value = "手机号",index = 0) |
| | | private String phone; |
| | | @ExcelProperty(value = "党龄",index = 2) |
| | | private Integer partyAge; |
| | | @ExcelProperty(value = "状态",index = 8) |
| | | private String status; |
| | | @ExcelProperty(value = "活动时长",index = 6) |
| | | private Integer partyTime; |
| | | @ExcelProperty(value = "参与活动获得积分",index = 7) |
| | | private Integer partyInterval; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("1签到 2签退") |
| | | private Integer signType; |
| | | |
| | | @ApiModelProperty("时长") |
| | | private Integer duration; |
| | | |
| | | @ApiModelProperty("活动状态 1 待发布 2 未开始 3 报名中 4 进行中 5 已结束 6 已取消") |
| | | private Integer status; |
| | | } |
| | |
| | | @ApiModelProperty("签退范围,默认0无限制") |
| | | private Integer signOutRange; |
| | | |
| | | @ApiModelProperty("单次活动时长") |
| | | private Integer activityTime; |
| | | |
| | | @ApiModelProperty("1签到 2签退") |
| | | private Integer signType; |
| | | |
| | | @ApiModelProperty("是否可以评价 1是 0 否") |
| | | private Integer isComment; |
| | | |
| | | private Integer signCount; |
| | | |
| | | private Integer registerCount; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | public class PartyMemberDetailExcelVO { |
| | | |
| | | @ExcelProperty("活动名称") |
| | | private String activityName; |
| | | |
| | | @ExcelProperty("活动地址") |
| | | private String activityAddr; |
| | | |
| | | @ExcelProperty("活动开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date beginAt; |
| | | |
| | | @ExcelProperty(value = "签到位置") |
| | | private String position; |
| | | |
| | | @ExcelProperty("签到开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | |
| | | @ExcelProperty("签到结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | |
| | | @ExcelProperty("单次活动时长(小时)") |
| | | private Integer duration; |
| | | |
| | | @ExcelProperty("参与签到/打卡奖励积分") |
| | | private Integer rewardIntegral; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class PartyMemberDetailVO { |
| | | |
| | | @ApiModelProperty("活动名称") |
| | | private String activityName; |
| | | |
| | | @ApiModelProperty("活动地址") |
| | | private String activityAddr; |
| | | |
| | | @ApiModelProperty("活动开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date beginAt; |
| | | |
| | | @ApiModelProperty(value = "签到位置") |
| | | private String position; |
| | | |
| | | @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; |
| | | |
| | | @ApiModelProperty("单次活动时长(小时)") |
| | | private Integer duration; |
| | | |
| | | @ApiModelProperty("参与签到/打卡奖励积分") |
| | | private Integer rewardIntegral; |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.partybuilding; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | |
| | | @ApiModelProperty(value = "特长类别(1.体育类 2.舞蹈类 3.音乐类 4.美术类 5.其他)") |
| | | private Long specialtyCategory; |
| | | |
| | | @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; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "职位2") |
| | | private String positionTwo; |
| | | |
| | | @ApiModelProperty(value = "活动时长") |
| | | private Integer partyTime; |
| | | |
| | | @ApiModelProperty(value = "活动积分") |
| | | private Integer partyInterval; |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/building/getBuildListByVillageId") |
| | | R getBuildListByVillageId(@RequestParam(value = "villageId") Long villageId); |
| | | /** |
| | | * 党员活动详情数据 |
| | | * @return |
| | | */ |
| | | @PostMapping("/activity/partyMemberDetail") |
| | | R partyMemberDetail(@RequestBody CommonPage commonPage); |
| | | /** |
| | | * 导出党员活动详情数据 |
| | | * @return |
| | | */ |
| | | @PostMapping("/activity/exportPartyMemberDetail") |
| | | R exportPartyMemberDetail(@RequestBody CommonPage commonPage); |
| | | } |
| | |
| | | R pagePartyOrganization(@RequestBody PagePartyOrganizationVO pagePartyOrganizationVO); |
| | | |
| | | /** |
| | | * 导出党员信息 |
| | | * |
| | | * @param pagePartyOrganizationVO |
| | | * 查询信息 |
| | | * @return 分页数据 |
| | | */ |
| | | @PostMapping("/partybuildIng/exportPartyMember") |
| | | R exportPartyMember(@RequestBody PagePartyOrganizationVO pagePartyOrganizationVO); |
| | | |
| | | /** |
| | | * 党员活动 |
| | | * |
| | | * @param partyBuildingActivityVO |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityTypeVO; |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.*; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | 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; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import sun.misc.BASE64Encoder; |
| | | |
| | |
| | | public R partyMemberCount(@RequestParam("year")String year){ |
| | | return communityService.partyMemberCount(this.getCommunityId(),year); |
| | | } |
| | | |
| | | /** |
| | | * 党员活动详情数据 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "党员活动详情数据",response = PartyMemberDetailVO.class) |
| | | @PostMapping("activity/partyMemberDetail") |
| | | public R partyMemberDetail(@RequestBody CommonPage commonPage){ |
| | | return communityService.partyMemberDetail(commonPage); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出党员活动详情数据 |
| | | * @return |
| | | */ |
| | | @ApiOperation("导出党员活动详情数据") |
| | | @PostMapping("activity/exportPartyMemberDetail") |
| | | public R exportPartyMemberDetail(@RequestBody CommonPage commonPage){ |
| | | String name = "党员活动详情数据.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | R r = communityService.exportPartyMemberDetail(commonPage);; |
| | | if (R.isOk(r)) { |
| | | List<PartyMemberDetailExcelVO> excelVOS = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), PartyMemberDetailExcelVO.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, PartyMemberDetailExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).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("未查询到用户"); |
| | | } |
| | | } |
| | |
| | | import com.panzhihua.common.listen.ComPbMemberRoleExcelListen; |
| | | 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.reserve.ComActReserveMakeRightExcelAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeRightStatisticsAdminVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComDataStatisticsMemberExcelVo; |
| | |
| | | pagePartyOrganizationVO.setCommunityId(this.getCommunityId()); |
| | | return partyBuildingService.pagePartyOrganization(pagePartyOrganizationVO); |
| | | } |
| | | @ApiOperation(value = "党员时长信息导出", response = PartyBuildingMemberVO.class) |
| | | @PostMapping("exportPartyMember") |
| | | public R exportPartyMember(@RequestBody PagePartyOrganizationVO pagePartyOrganizationVO) { |
| | | pagePartyOrganizationVO.setCommunityId(this.getCommunityId()); |
| | | String url = userurl; |
| | | String name = "党员时长信息数据.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | // 用户搜索了就下载搜索的用户否则下载所有用户 |
| | | R r = partyBuildingService.exportPartyMember(pagePartyOrganizationVO); |
| | | if (R.isOk(r)) { |
| | | List<PartyMemberListExcelVO> eexcelUserDTOS = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), PartyMemberListExcelVO.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, PartyMemberListExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("党员时长信息数据导出").build(); |
| | | excelWriter.write(eexcelUserDTOS, 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(url + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | return R.fail("未查询到用户"); |
| | | } |
| | | |
| | | @ApiOperation(value = "党员档案--党员活动", response = PartyBuildingActivityVO.class) |
| | | @PostMapping("listpartymemberactivities") |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityTypeVO; |
| | | import com.panzhihua.common.model.vos.community.volunteer.ComMngVolunteerExcelVO; |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | |
| | | public R partyMemberCount(@RequestParam("communityId")Long communityId,@RequestParam("year")String year){ |
| | | return comActActivityService.partyMemberCount(communityId,year); |
| | | } |
| | | |
| | | /** |
| | | * 党员活动详情数据 |
| | | * @return |
| | | */ |
| | | @PostMapping("activity/partyMemberDetail") |
| | | public R partyMemberDetail(@RequestBody CommonPage commonPage){ |
| | | return comActActivityService.partyMemberDetail(commonPage); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出党员活动详情数据 |
| | | * @return |
| | | */ |
| | | @PostMapping("activity/exportPartyMemberDetail") |
| | | public R exportPartyMemberDetail(@RequestBody CommonPage commonPage){ |
| | | return comActActivityService.exportPartyMemberDetail(commonPage); |
| | | } |
| | | } |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | */ |
| | | Integer selectActivityLine(@Param("communityId") Long communityId,@Param("year")String year,@Param("date")String date); |
| | | |
| | | /** |
| | | * 分页查询党员详情活动 |
| | | * @param page |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | IPage<PartyMemberDetailVO> partyMemberDetail(Page page,@Param("commonPage") CommonPage commonPage); |
| | | |
| | | /** |
| | | * 导出党员详情活动 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | List<PartyMemberDetailExcelVO> exportPartyMemberDetail(@Param("commonPage") CommonPage commonPage); |
| | | } |
| | |
| | | * 签退范围,默认0无限制 |
| | | */ |
| | | private Integer signOutRange; |
| | | /** |
| | | * 单次活动时长 |
| | | */ |
| | | private Integer activityTime; |
| | | |
| | | /** |
| | | * 单次活动时长(小时) |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | 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.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.service_community.model.dos.ComActActivityDO; |
| | |
| | | * @return |
| | | */ |
| | | R partyMemberCount(Long communityId,String year); |
| | | |
| | | /** |
| | | * 党员活动个人统计 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R partyMemberDetail(CommonPage commonPage); |
| | | |
| | | /** |
| | | *导出党员活动 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R exportPartyMemberDetail(CommonPage commonPage); |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | ComActActivityVO comActActivityVO = new ComActActivityVO(); |
| | | BeanUtils.copyProperties(comActActivityDO, comActActivityVO); |
| | | List<ActivitySignVO> collect = activitySignVOList.stream() |
| | | .filter(activitySignVO -> activitySignVO.getActivityId().equals(comActActivityVO.getId())).limit(1) |
| | | .filter(activitySignVO -> activitySignVO.getActivityId().equals(comActActivityVO.getId())) |
| | | .collect(Collectors.toList()); |
| | | comActActivityVO.setSignCount(collect.size()); |
| | | ActivitySignVO activitySignVO = collect.get(0); |
| | | Integer isVolunteer = activitySignVO.getIsVolunteer(); |
| | | if (isVolunteer.intValue() == 1) { |
| | |
| | | partyActivityStatics.setPartyActivityLines(getPoints(communityId,year)); |
| | | return R.ok(partyActivityStatics); |
| | | } |
| | | |
| | | @Override |
| | | public R partyMemberDetail(CommonPage commonPage) { |
| | | return R.ok(comActActivityDAO.partyMemberDetail(new Page<>(commonPage.getPage(),commonPage.getSize()),commonPage)); |
| | | } |
| | | |
| | | @Override |
| | | public R exportPartyMemberDetail(CommonPage commonPage) { |
| | | return R.ok(comActActivityDAO.exportPartyMemberDetail(commonPage)); |
| | | } |
| | | |
| | | public List<PartyActivityLine> getPoints(Long communityId,String year){ |
| | | List<PartyActivityLine> partyActivityLines=new ArrayList<>(); |
| | | for(int i=1;i<=12;i++){ |
| | |
| | | su.image_url, |
| | | su.tags, |
| | | caar.is_volunteer, |
| | | t.duration, |
| | | CASE |
| | | |
| | | WHEN su.is_partymember = 1 THEN |
| | |
| | | FROM |
| | | 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 = #{comActActRegistVO.activityId} |
| | | <if test="comActActRegistVO.phone != null and comActActRegistVO.phone !=''"> |
| | | AND su.phone = #{comActActRegistVO.phone} |
| | |
| | | </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 |
| | | caar.id, |
| | | caar.activity_id, |
| | | caar.create_at, |
| | | caar.position, |
| | | caar.times, |
| | | caar.award, |
| | | su.user_id, |
| | | su.`name`, |
| | | su.nick_name, |
| | | su.phone, |
| | | su.image_url, |
| | | su.tags, |
| | | caar.is_volunteer, |
| | | t.duration, |
| | | t.status |
| | | |
| | | FROM |
| | | 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 |
| | | </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="selectActivityLine" resultType="integer"> |
| | | select count(*) from com_act_activity where type = 3 and publish_at >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=publish_at |
| | | </select> |
| | | |
| | | <select id="partyMemberDetail" resultType="com.panzhihua.common.model.vos.community.PartyMemberDetailVO"> |
| | | select t.activity_name,t.activity_addr,t.begin_at,t1.position,t1.start_time,t1.end_time,t.duration,t. reward_integral from com_act_activity t LEFT JOIN com_act_act_regist t1 on t.id = t1.activity_id |
| | | where t.type = 3 and t1.user_id = #{commonPage.userId} |
| | | <if test="commonPage.beginTime !=null"> |
| | | and t.begin_at between #{commonPage.beginTime} and #{commonPage.endTime} |
| | | </if> |
| | | order by t.begin_at desc |
| | | </select> |
| | | |
| | | <select id="exportPartyMemberDetail" resultType="com.panzhihua.common.model.vos.community.PartyMemberDetailVO"> |
| | | select t.activity_name,t.activity_addr,t.begin_at,t1.position,t1.start_time,t1.end_time,t.duration,t. reward_integral from com_act_activity t LEFT JOIN com_act_act_regist t1 on t.id = t1.activity_id |
| | | where t.type = 3 and t1.user_id = #{commonPage.userId} |
| | | <if test="commonPage.beginTime !=null"> |
| | | and t.begin_at between #{commonPage.beginTime} and #{commonPage.endTime} |
| | | </if> |
| | | order by t.begin_at desc |
| | | </select> |
| | | </mapper> |
| | |
| | | } |
| | | |
| | | /** |
| | | * 查询党员信息导出 |
| | | * |
| | | * @param pagePartyOrganizationVO |
| | | * 查询信息 |
| | | * @return 分页数据 |
| | | */ |
| | | @PostMapping("exportPartyMember") |
| | | public R exportPartyMember(@RequestBody PagePartyOrganizationVO pagePartyOrganizationVO) { |
| | | return comPbMemberService.exportPartyMember(pagePartyOrganizationVO); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 党员活动查询 |
| | | * |
| | | * @param partyBuildingActivityVO |
| | |
| | | import java.util.Map; |
| | | |
| | | import com.panzhihua.common.model.dtos.partybuilding.PageComDataStatisticsMemberDto; |
| | | import com.panzhihua.common.model.vos.PartyMemberListExcelVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComDataStatisticsMemberExcelVo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | IPage<PartyBuildingMemberVO> queryAllByLimit(Page page,@Param("dto") PagePartyOrganizationVO buildingMemberVO); |
| | | |
| | | /** |
| | | * 导出党员列表 |
| | | * @param buildingMemberVO 请求参数 |
| | | * @return 党员列表 |
| | | */ |
| | | List<PartyMemberListExcelVO> exportPartyMemberList(@Param("dto") PagePartyOrganizationVO buildingMemberVO); |
| | | |
| | | /** |
| | | * 根据id查询党员信息 |
| | | * @param id 主键id |
| | | * @return 党员信息 |
| | |
| | | * @return 导入结果 |
| | | */ |
| | | R importPbMemberRole(List<ComPbMemberRoleExcelVo> list, Long communityId, Long userId); |
| | | |
| | | /** |
| | | * 导出党员积分 |
| | | * @param pagePartyOrganizationVO |
| | | * @return |
| | | */ |
| | | R exportPartyMember(PagePartyOrganizationVO pagePartyOrganizationVO); |
| | | } |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R exportPartyMember(PagePartyOrganizationVO pagePartyOrganizationVO) { |
| | | return R.ok(comPbMemberDAO.exportPartyMemberList(pagePartyOrganizationVO)); |
| | | } |
| | | } |
| | |
| | | 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, |
| | | m.specialty_name, m.position_two, o.`name` orgName,cpcu.name as checkUnitName, |
| | | m.specialty_name, m.position_two, o.`name` orgName,cpcu.name as checkUnitName,t2.partyTime,t2.partyInterval, |
| | | TIMESTAMPDIFF( |
| | | YEAR, |
| | | m.employment_time, |
| | |
| | | LEFT JOIN sys_user u ON m.id_card = u.id_card |
| | | LEFT JOIN com_pb_org o ON m.org_id = o.id |
| | | LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id |
| | | LEFT JOIN (select t1.user_id,sum(t.duration) as partyTime,sum(t.reward_integral) as partyInterval from com_act_activity t LEFT JOIN com_act_act_regist t1 on t.id = t1.activity_id where t.type = 3 |
| | | <if test="dto.startTime !=null"> |
| | | and t.begin_at between #{dto.startTime} and #{dto.endTime} |
| | | </if> |
| | | GROUP BY t1.user_id ) t2 on u.user_id = t2.user_id |
| | | <where> |
| | | and m.audit_result = 1 |
| | | <if test='dto.orgName != null and dto.orgName != ""'> |
| | |
| | | order by m.create_at desc |
| | | </select> |
| | | |
| | | <select id="exportPartyMemberList" resultType="com.panzhihua.common.model.vos.PartyMemberListExcelVO"> |
| | | 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, |
| | | m.specialty_name, m.position_two, o.`name` orgName,cpcu.name as checkUnitName,t2.partyTime,t2.partyInterval, |
| | | TIMESTAMPDIFF( |
| | | YEAR, |
| | | m.employment_time, |
| | | DATE_FORMAT( NOW(), '%Y-%m-%d' )) as partyAge, |
| | | CASE |
| | | |
| | | WHEN u.id_card IS NULL THEN |
| | | '未注册' ELSE '已注册' |
| | | END status |
| | | from com_pb_member as m |
| | | LEFT JOIN sys_user u ON m.id_card = u.id_card |
| | | LEFT JOIN com_pb_org o ON m.org_id = o.id |
| | | LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id |
| | | LEFT JOIN (select t1.user_id,sum(t.duration) as partyTime,sum(t.reward_integral) as partyInterval from com_act_activity t LEFT JOIN com_act_act_regist t1 on t.id = t1.activity_id where t.type = 3 |
| | | <if test="dto.startTime !=null"> |
| | | and t.begin_at between #{dto.startTime} and #{dto.endTime} |
| | | </if> |
| | | GROUP BY t1.user_id ) t2 on u.user_id = t2.user_id |
| | | <where> |
| | | and m.audit_result = 1 |
| | | <if test='dto.orgName != null and dto.orgName != ""'> |
| | | and o.name like concat(#{dto.orgName},'%') |
| | | </if> |
| | | <if test='dto.orgId != null'> |
| | | and o.id = #{dto.orgId} |
| | | </if> |
| | | <if test='dto.account != null and dto.account != ""'> |
| | | and u.phone like concat (#{dto.account},'%') |
| | | </if> |
| | | <if test='dto.name != null and dto.name != ""'> |
| | | and m.name like concat (#{dto.name},'%') |
| | | </if> |
| | | <if test="dto.orgId != null"> |
| | | and m.org_id = #{dto.orgId} |
| | | </if> |
| | | <if test="dto.communityId != null"> |
| | | and m.community_id = ${dto.communityId} |
| | | </if> |
| | | <if test="dto.keyWord != null and dto.keyWord != ''"> |
| | | and (m.name like concat (#{dto.keyWord},'%') or |
| | | u.phone like concat (#{dto.keyWord},'%') or |
| | | cpcu.name like concat (#{dto.keyWord},'%') |
| | | ) |
| | | </if> |
| | | <if test="dto.type != null"> |
| | | and m.type = #{dto.type} |
| | | </if> |
| | | <if test="dto.checkUnitId != null"> |
| | | and m.check_unit_id = #{dto.checkUnitId} |
| | | </if> |
| | | <if test="dto.specialtyCategory != null"> |
| | | and m.specialty_category = #{dto.specialtyCategory} |
| | | </if> |
| | | </where> |
| | | order by m.create_at desc |
| | | </select> |
| | | |
| | | <select id="pagePartyBuildingMembersVO" resultType="com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO"> |
| | | 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, |