101captain
2022-03-23 2d0487d82ff61219c71155699b52d8d339a2443a
Merge branch 'dev'
41个文件已修改
1个文件已添加
632 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/model/dtos/ComPbMemberCertificationDTO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/common/EditComActEasyPhotoHandlerDto.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/common/PageComActEasyPhotoHandlerDto.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/common/ComActEasyPhotoHandlerVo.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActRegistExcelNewVO.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActRegistExcelVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActSignExcelNewVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/ComDataStatisticsOrgVo.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/ComPbMemberExcelVO.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/SysUserNoticeVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/partybuilding/PartyBuildingService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActEasyPhotoHandlerController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDAO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActEasyPhotoHandler.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActEasyPhotoDO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoHandlerService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenStatisticsServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoEvaluateServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoHandlerServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserTradeServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActRegistMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActSignMapper.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoHandlerMapper.xml 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/api/PartyBuildIngApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbMemberDO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbMemberMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbOrgMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java
@@ -191,7 +191,7 @@
            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)) {
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java
@@ -2,9 +2,13 @@
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.*;
@@ -85,6 +89,34 @@
        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) {
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java
@@ -305,13 +305,48 @@
                    comActActRegistVOS.forEach(activitySignInVO -> {
                        if (comActActivityVO.getId().equals(activitySignInVO.getActivityId())) {
                            currentList.add(activitySignInVO);
                            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&&currentList.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);
                            }
                        }
                    }
                });
            }
@@ -417,7 +452,7 @@
        }
        // 判断用户是否已认证成功
        R certUser = partyBuildingService.userCertification(userId);
        R certUser = partyBuildingService.userCertification(userId,communityId);
        Object certUserInfo = certUser.getData();
        AtomicBoolean userCertified = new AtomicBoolean(false);
@@ -452,6 +487,7 @@
        } else {
            partyBuildingMemberVO.setIdCard(loginUserInfo.getIdCard());
            partyBuildingMemberVO.setName(loginUserInfo.getName());
            partyBuildingMemberVO.setPhone(loginUserInfo.getPhone());
        }
        R r = partyBuildingService.addPartyBuildingMember(partyBuildingMemberVO);
@@ -464,7 +500,7 @@
        // 党员认证查询
        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 =
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/model/dtos/ComPbMemberCertificationDTO.java
@@ -28,7 +28,7 @@
    @ApiModelProperty(value = "党员类型(1.预备党员 2.正式党员)")
    private Integer type;
    @ApiModelProperty(value = "报道单位id")
    private Integer checkUnitId;
    private Long checkUnitId;
    @ApiModelProperty(value = "职位")
    private String position;
    @ApiModelProperty(value = "职能")
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/common/EditComActEasyPhotoHandlerDto.java
@@ -6,6 +6,8 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * title: 编辑随手拍、微心愿处理人绑定表请求参数
 * <p>
@@ -51,5 +53,31 @@
    @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;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/common/PageComActEasyPhotoHandlerDto.java
@@ -60,5 +60,8 @@
    @ApiModelProperty(value = "关键词")
    private String keyWord;
    @ApiModelProperty(value = "状态 0待执行 1已完成")
    private Integer status;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/common/ComActEasyPhotoHandlerVo.java
@@ -6,6 +6,8 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * title: 随手拍、微心愿处理人绑定表返回参数
 * <p>
@@ -51,4 +53,13 @@
    @ApiModelProperty(value = "业务类型(1.随手拍 2.微心愿)")
    private Integer serviceType;
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "状态")
    private Integer status;
    @ApiModelProperty(value = "发起人名称")
    private String senderName;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActRegistExcelNewVO.java
New file
@@ -0,0 +1,42 @@
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;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActRegistExcelVO.java
@@ -40,6 +40,6 @@
    @ExcelProperty(value = "签到地点", index = 2)
    private String position;
    @ExcelProperty(value = "签到次数", index = 3)
    @ExcelProperty(value = "参加次数序号", index = 3)
    private Integer times;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActSignExcelNewVO.java
@@ -26,7 +26,7 @@
    @ExcelProperty(value = "身份", index = 2)
    private String identity;
    @ExcelProperty(value = "电话", index = 3)
    @ExcelProperty(value = "手机号", index = 3)
    private String phone;
    @ExcelProperty(value = "报名时间", index = 0)
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/ComDataStatisticsOrgVo.java
@@ -33,20 +33,38 @@
    @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;
@@ -60,15 +78,27 @@
    @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;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/ComPbMemberExcelVO.java
@@ -14,11 +14,11 @@
@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;
@@ -29,6 +29,12 @@
    @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;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/SysUserNoticeVO.java
@@ -60,7 +60,7 @@
    @ApiModelProperty("业务主键 用于跳转")
    private Long businessId;
    @ApiModelProperty("社区活动类型 1志愿者活动 2居民活动")
    @ApiModelProperty("社区活动类型 1志愿者活动 2居民活动 3党建活动")
    private Integer activityType;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -4,6 +4,7 @@
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.*;
@@ -49,15 +50,6 @@
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;
@@ -9491,4 +9483,26 @@
     */
    @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);
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/partybuilding/PartyBuildingService.java
@@ -474,11 +474,12 @@
     * 查询用户党员认证信息
     *
     * @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);
    /**
     * 查询待认证党员信息
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java
@@ -207,7 +207,7 @@
                                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));
@@ -305,9 +305,8 @@
        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();
@@ -478,6 +477,60 @@
        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){
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java
@@ -16,6 +16,7 @@
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;
@@ -669,10 +670,31 @@
        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();
@@ -760,7 +782,7 @@
        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);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActEasyPhotoHandlerController.java
@@ -58,7 +58,7 @@
     * @author lyq
     * @date 2022-03-01 13:45:10
     */
    @PutMapping("/edit")
    @PostMapping("/edit")
    public R edit(@RequestBody EditComActEasyPhotoHandlerDto comActEasyPhotoHandler) {
        return this.comActEasyPhotoHandlerService.update(comActEasyPhotoHandler);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -50,7 +50,7 @@
        + "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 " +
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDAO.java
@@ -73,16 +73,16 @@
        + "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 !=&quot;&quot;'> 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," +
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActEasyPhotoHandler.java
@@ -1,6 +1,7 @@
package com.panzhihua.service_community.entity;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
@@ -38,11 +39,40 @@
     */
    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;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActEasyPhotoDO.java
@@ -203,7 +203,7 @@
        int dsh = 1;
        int dfk = 2;
        int ybh = 3;
        int ywc = 4;
        int dpj = 4;
        int ypj = 5;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoHandlerService.java
@@ -82,7 +82,8 @@
     * @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);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenStatisticsServiceImpl.java
@@ -916,7 +916,8 @@
                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);
            }
        }
@@ -943,7 +944,8 @@
                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);
            }
        }
@@ -970,7 +972,8 @@
                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);
            }
        }
@@ -1107,7 +1110,8 @@
                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);
            }
        }
@@ -1117,7 +1121,8 @@
        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));
            }
@@ -1134,7 +1139,8 @@
                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);
            }
        }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -199,6 +199,7 @@
        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) {
@@ -309,7 +310,7 @@
                    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);
                        }
@@ -634,6 +635,7 @@
                        .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) {
@@ -647,7 +649,6 @@
                    log.error("时间转换异常【{}】", e.getMessage());
                }
                comActActivityVO.setSingDate(createAt);
                comActActivityVO.setTimes(activitySignVO.getTimes());
                Integer totalAward = comActActRegistDAO.selectTotalAwardWithRegist(activitySignVO.getActivityId(), userId);
                comActActivityVO.setAward(totalAward);
                comActActivityVO.setActivitySignVOList(collect);
@@ -976,7 +977,7 @@
                }
                comActActRegistDO.setActivityId(activityId);
                comActActRegistDO.setStartTime(new Date());
                comActActRegistDO.setType(1);
                comActActRegistDO.setType(comActActivityDO.getType());
                comActActRegistDO.setUserId(userId);
                comActActRegistDO.setIsVolunteer(comActActSignDO.getIsVolunteer());
                comActActRegistDO.setCreateAt(nowDate);
@@ -985,7 +986,7 @@
                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();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java
@@ -302,6 +302,7 @@
        LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(userId);
        comActDiscussVO.setUserName(loginUserInfoVO.getName());
        comActDiscussVO.setUserNickName(loginUserInfoVO.getNickName());
        comActDiscussVO.setImageUrl(loginUserInfoVO.getImageUrl());
        //分页查询评论列表
        PageComActDiscussCommentDTO pageComActDiscussCommentDTO = new PageComActDiscussCommentDTO();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoEvaluateServiceImpl.java
@@ -5,11 +5,9 @@
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;
@@ -141,7 +139,7 @@
        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();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoHandlerServiceImpl.java
@@ -10,6 +10,8 @@
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.Date;
/**
 * title: 随手拍、微心愿处理人绑定表表服务实现类
 * <p>
@@ -126,10 +128,13 @@
     * @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);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
@@ -7,7 +7,6 @@
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;
@@ -118,7 +117,7 @@
                }
                if (comActEasyPhotoVO1.getActivityId() != null
                    && comActEasyPhotoVO1.getStatus().equals(ComActEasyPhotoDO.status.ywc)) {
                    && comActEasyPhotoVO1.getStatus().equals(ComActEasyPhotoDO.status.dpj)) {
                    // 查询随手拍活动
                    ComActEasyPhotoActivityDO photoActivityDO =
                        comActEasyPhotoActivityMapper.selectById(comActEasyPhotoVO1.getActivityId());
@@ -330,7 +329,7 @@
                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;
@@ -357,7 +356,7 @@
                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())
@@ -379,7 +378,7 @@
                // 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);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserTradeServiceImpl.java
@@ -331,7 +331,7 @@
                        }
                        else {
                            identityType=1;
                            remark.append("取消党员活动扣除积分");
                            remark.append("取消居民活动扣除积分");
                        }
                }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishServiceImpl.java
@@ -253,7 +253,7 @@
                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;
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
@@ -243,8 +243,8 @@
                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);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActRegistMapper.xml
@@ -20,6 +20,8 @@
        SELECT
        caar.id,
        caar.activity_id,
        caar.start_time,
        caar.end_time,
        caar.create_at,
        caar.position,
        caar.times,
@@ -32,13 +34,7 @@
        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
@@ -171,7 +167,7 @@
            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
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActSignMapper.xml
@@ -21,7 +21,7 @@
    <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 '已取消'
@@ -32,10 +32,7 @@
        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
@@ -44,7 +41,7 @@
        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
@@ -79,7 +76,7 @@
    </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
@@ -88,7 +85,7 @@
        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
@@ -138,7 +135,7 @@
        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
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml
@@ -117,7 +117,7 @@
            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>
@@ -154,16 +154,16 @@
    </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' ) &gt; DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed
            AND DATE_FORMAT( create_at, '%Y-%m' ) &gt; 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
@@ -185,14 +185,14 @@
            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' ) &lt;= #{date}
        AND DATE_FORMAT( create_at, '%Y-%m' ) &lt;= #{date}
    </select>
    <select id="indexActList" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO">
        SELECT id, `status`, activity_type, activity_name, cover
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoHandlerMapper.xml
@@ -20,28 +20,31 @@
    </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
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/api/PartyBuildIngApi.java
@@ -634,9 +634,9 @@
     * @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();
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberDAO.java
@@ -103,7 +103,7 @@
     * @param buildingMemberVO 请求参数
     * @return  党员列表
     */
    List<PartyMemberListExcelVO> exportPartyMemberList(@Param("dto") PagePartyOrganizationVO buildingMemberVO);
    List<ComPbMemberExcelVO> exportPartyMemberList(@Param("dto") PagePartyOrganizationVO buildingMemberVO);
    /**
     * 根据id查询党员信息
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbMemberDO.java
@@ -3,6 +3,7 @@
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;
@@ -56,6 +57,7 @@
    /**
     * 转正时间
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date employmentTime;
    /**
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
@@ -15,10 +15,13 @@
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;
@@ -48,6 +51,8 @@
import lombok.extern.slf4j.Slf4j;
import static java.util.Objects.nonNull;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description: 党员
@@ -70,6 +75,10 @@
    private ComPbDynDAO comPbDynDAO;
    @Resource
    private ComPbDynUserDAO comPbDynUserDAO;
    @Resource
    private CommunityService communityService;
    @Resource
    private UserService userService;
    /**
     * 新增党员
@@ -217,6 +226,29 @@
                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();
    }
@@ -263,6 +295,10 @@
            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) {
@@ -404,8 +440,8 @@
            if (userId != null) {
                String userKey = UserConstants.LOGIN_USER_INFO + userId;
                stringRedisTemplate.delete(userKey);
                return R.ok();
            }
            return R.ok();
        }
        return R.fail();
    }
@@ -661,21 +697,26 @@
        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);
        }
@@ -811,14 +852,72 @@
        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);
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbMemberMapper.xml
@@ -111,7 +111,7 @@
        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,
@@ -559,7 +559,7 @@
    <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
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbOrgMapper.xml
@@ -38,11 +38,14 @@
            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}
@@ -63,6 +66,7 @@
                and cpo.build_id = #{partyOrganizationVO.buildId}
            </if>
        </where>
        GROUP BY cpo.id
        ORDER BY cpo.id desc
    </select>
@@ -106,6 +110,7 @@
                and cpo.build_id = #{partyOrganizationVO.buildId}
            </if>
        </where>
        GROUP BY cpo.id
        ORDER BY cpo.id desc
    </select>
@@ -152,6 +157,7 @@
                and cpo.build_id = #{partyOrganizationVO.buildId}
            </if>
        </where>
        GROUP BY cpo.id
        ORDER BY cpo.id desc
    </select>