101captain
2022-07-28 f0e91343445b1e568d1dfe705252d3e1201a18a7
Merge branch 'huacheng' into huacheng_test

# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PagePartyOrganizationVO.java
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/partybuilding/ComPbCheckUnitFeign.java
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java
# springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPbCheckUnitApi.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComAreaTownCommunityApi.java
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/api/ComPbCheckUnitController.java
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbCheckUnitMapper.java
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/ComPbCheckUnitService.java
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbMemberMapper.xml
47个文件已修改
4个文件已添加
878 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActAcidRecordApi.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
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/LoginApi.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/config/WxMaConfiguration.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/UserApi.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/Constants.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/common/PageComPbCheckUnitDto.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/acid/ComActAcidRecordDTO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/AreaVOS.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/CommunityVO.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/StreetVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/StreetVOS.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/partybuilding/ComPbCheckUnitFeign.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAcidCheckRecordApi.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAcidDangerMemberApi.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAcidMemberApi.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAcidRecordApi.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPbCheckUnitApi.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/IndexApi.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/SystemManagementApi.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActAcidRecordApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComAreaTownCommunityApi.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActAcidRecordDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActAcidRecordService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/util/MyAESUtil.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidDangerMemberMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidRecordMapper.xml 107 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActSignMapper.xml 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/api/ComPbCheckUnitController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbCheckUnitMapper.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/ComPbCheckUnitService.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbMemberMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/pom.xml
@@ -44,7 +44,7 @@
        <dependency>
            <groupId>com.github.binarywang</groupId>
            <artifactId>weixin-java-miniapp</artifactId>
            <version>3.9.9.B</version>
            <version>4.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActAcidRecordApi.java
@@ -122,7 +122,7 @@
    @ApiOperation(value = "7项常规统计",response = FiveCount.class)
    @GetMapping("fiveCountPlus")
    public R fiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity") String localCity){
        return this.communityService.comActAcidRecordFiveCountPlus(date,localCity);
        return this.communityService.comActAcidRecordFiveCountPlus(date,localCity,null);
    }
    @ApiOperation(value = "新版查看详情",response = ComActAcidRecordVO.class)
    @GetMapping("/detailByApp")
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java
@@ -403,7 +403,7 @@
                                  @RequestParam(value = "size",required = false) Integer size,
                                  @RequestParam(value = "belongTo",required = false) String belongTo,
                                  @RequestParam(value = "unitId",required = false) Long unitId){
        return communityService.institutionalUnitServiceAnalysis(year,type,range,communityId,page,size,belongTo,unitId);
        return communityService.institutionalUnitServiceAnalysis(year,type,range,communityId,page,size,belongTo,unitId,this.getLoginUserInfo().getAccount());
    }
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java
@@ -3,7 +3,9 @@
import javax.annotation.Resource;
import com.panzhihua.common.model.vos.user.UuLoginVO;
import me.chanjar.weixin.common.error.WxErrorException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.util.ObjectUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/config/WxMaConfiguration.java
@@ -2,11 +2,18 @@
import javax.annotation.Resource;
import cn.binarywang.wx.miniapp.config.WxMaConfig;
import cn.binarywang.wx.miniapp.config.impl.WxMaRedisBetterConfigImpl;
import cn.binarywang.wx.miniapp.config.impl.WxMaRedisConfigImpl;
import com.alibaba.fastjson.JSONObject;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.user.SysAppConfigVO;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.common.utlis.StringUtils;
import me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps;
import me.chanjar.weixin.common.redis.WxRedisOps;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;
import cn.binarywang.wx.miniapp.api.WxMaService;
@@ -34,10 +41,14 @@
    private WxMaRHProperties wxMaRHProperties;
    @Resource
    private StringRedisTemplate stringRedisTemplate;
    @Resource
    private UserService userService;
    public WxMaService getMaService(String appid) {
        WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
        WxRedisOps redisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
        WxMaRedisBetterConfigImpl config = new WxMaRedisBetterConfigImpl(redisOps, "access_token");
        if(StringUtils.isNotEmpty(appid)){
            R<SysAppConfigVO> r=userService.selectByAppid(appid);
            if(R.isOk(r)){
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/UserApi.java
@@ -3,6 +3,7 @@
import javax.annotation.Resource;
import com.panzhihua.common.utlis.StringUtils;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -29,6 +30,8 @@
public class UserApi extends BaseController {
    @Resource
    private UserService userService;
    @Resource
    private StringRedisTemplate stringRedisTemplate;
    @ApiOperation(value = "当前登录用户信息", response = LoginUserInfoVO.class)
    @GetMapping("info")
@@ -73,4 +76,13 @@
        Long userId = this.getUserId();
        return userService.listmenu(userId);
    }
    @ApiOperation("重置密码")
    @GetMapping("/unlock")
    public R unlock(@RequestParam("type")Integer type,@RequestParam("isReset")Integer isReset,@RequestParam("account")String account){
        stringRedisTemplate.delete("LOGIN_FAIL_"+account+"_"+type);
        if(isReset==1){
            userService.resetPasswordAccount(type,account);
        }
        return R.ok();
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/Constants.java
@@ -251,4 +251,5 @@
    public static final String INSERT="insert";
    public static final String QUERY="query";
    public static final String DELETE="delete";
    public static final String VILLAGE="村";
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java
@@ -94,6 +94,9 @@
    public Long getAreaId() {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        Long areaId = loginUserInfo.getAreaId();
        if (null == areaId) {
            throw new ServiceException("用户未绑定小区");
        }
        return areaId;
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/common/PageComPbCheckUnitDto.java
@@ -90,5 +90,8 @@
    @ApiModelProperty("区级")
    private String belongTo;
    @ApiModelProperty("单位性质")
    private String natureName;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/acid/ComActAcidRecordDTO.java
@@ -1,6 +1,7 @@
package com.panzhihua.common.model.dtos.community.acid;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
@@ -61,4 +62,7 @@
    private String checkStatus;
    @ApiModelProperty("id数组")
    private String ids;
    @ApiModelProperty("登录的账号名")
    private String loginAccount;
    private Integer type;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/AreaVOS.java
New file
@@ -0,0 +1,21 @@
package com.panzhihua.common.model.vos.user;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
@ApiModel
public class AreaVOS implements Serializable {
    @ApiModelProperty("区县名")
    private String name;
    @ApiModelProperty("区县code")
    private Integer id;
    @ApiModelProperty("下属街道列表")
    private List<StreetVOS> childList;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/CommunityVO.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.common.model.vos.user;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
@ApiModel
public class CommunityVO implements Serializable {
    @ApiModelProperty("社区/村落名")
    private String name;
    @ApiModelProperty("社区/村落id")
    private String id;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/StreetVO.java
@@ -5,6 +5,7 @@
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
@ApiModel
@@ -15,4 +16,7 @@
    @ApiModelProperty("街道名")
    private String name;
    @ApiModelProperty("下属社区列表")
    private List<CommunityVO> communityList;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/StreetVOS.java
New file
@@ -0,0 +1,20 @@
package com.panzhihua.common.model.vos.user;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel
public class StreetVOS {
    @ApiModelProperty("街道id")
    private Integer id;
    @ApiModelProperty("街道名")
    private String name;
    @ApiModelProperty("下属社区列表")
    private List<CommunityVO> childList;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -9710,7 +9710,7 @@
     * @return
     */
    @GetMapping("/comActAcidRecord/fiveCountPlus")
    R comActAcidRecordFiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity")String localCity);
    R comActAcidRecordFiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity")String localCity,@RequestParam(value = "loginAccount",required = false)String loginAccount);
    @GetMapping("/comActAcidRecord/statics")
    R comActAcidRecordStatics(@RequestParam("date")String date);
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/partybuilding/ComPbCheckUnitFeign.java
@@ -103,10 +103,13 @@
     * 报到单位统计-顶部数据
     * @param communityId
     * @param belongTo
     * @param choice
     * @return
     */
    @GetMapping("/statistics/top")
    R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, @RequestParam(value = "belongTo") String belongTo);
    R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId,
                        @RequestParam(value = "belongTo") String belongTo,
                        @RequestParam(value = "choice", required = false) String choice);
    /**
     * 报到单位统计
@@ -120,10 +123,15 @@
     * 报到党员统计-顶部数据
     * @param communityId
     * @param belongTo
     * @param choice
     * @param checkUnitId
     * @return
     */
    @GetMapping("/pbStatistics/top")
    R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, @RequestParam(value = "belongTo") String belongTo);
    R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId,
                      @RequestParam(value = "belongTo") String belongTo,
                      @RequestParam(value = "choice", required = false) String choice,
                      @RequestParam(value = "checkUnitId", required = false) Long checkUnitId);
    /**
     * 报到党员统计-按单位归属统计
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java
@@ -144,6 +144,9 @@
    @GetMapping("resetPassword")
    R resetPassword(@RequestParam("userId") Long userId);
    @GetMapping("/resetPasswordAccount")
    R resetPasswordAccount(@RequestParam("type")Integer type,@RequestParam("account")String account);
    /**
     * 批量重置密码用户登录密码默认admin123456
     *
@@ -1264,4 +1267,7 @@
     */
    @GetMapping("/uuPush")
    R uuPush(@RequestParam("washPhone")String washPhone,@RequestParam("phone")String phone,@RequestParam("washName")String washName,@RequestParam("orderStatus")Integer orderStatus);
    @GetMapping("/communityList")
    R communityList(@RequestParam("name") String name, @RequestParam("id") Long  id);
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java
@@ -42,6 +42,8 @@
    private static String APP_IMAGE_NAME = "5.jpg";
    @Resource
    private RedisTemplate redisTemplate;
    @Resource
    private StringRedisTemplate stringRedisTemplate;
    UserService userService;
    private static WxXCXTempSend wxXCXTempSend;
@@ -92,35 +94,16 @@
     * @return
     */
    public String getAccessToken() throws Exception {
         String appid=this.getAppId();
         String accessToken = "";
         Boolean aBoolean = wxXCXTempSend.redisTemplate.hasKey(SecurityConstants.APPLETS_ACCESS_TOKEN+"_"+appid);
         ValueOperations<String, String> valueOperations = wxXCXTempSend.redisTemplate.opsForValue();
         if(aBoolean){
         Long expireTime = Long.parseLong(valueOperations.get(SecurityConstants.APPLETS_ACCESS_TOKEN_TIME+"_"+appid));
         if(expireTime <= System.currentTimeMillis()){
             wxXCXTempSend.redisTemplate.delete(SecurityConstants.APPLETS_ACCESS_TOKEN+"_"+appid);//如果过期则删除
             wxXCXTempSend.redisTemplate.delete(SecurityConstants.APPLETS_ACCESS_TOKEN_TIME+"_"+appid);//如果过期则删除
         valueOperations.set(SecurityConstants.APPLETS_ACCESS_TOKEN+"_"+appid, getAppAccessToken(appid));
         valueOperations.set(SecurityConstants.APPLETS_ACCESS_TOKEN_TIME+"_"+appid, System.currentTimeMillis() + 1100000 + "");
         }else{
         accessToken = valueOperations.get(SecurityConstants.APPLETS_ACCESS_TOKEN+"_"+appid);
         }
         }else{
         accessToken = getAppAccessToken(appid);
         valueOperations.set(SecurityConstants.APPLETS_ACCESS_TOKEN+"_"+appid, accessToken);
         valueOperations.set(SecurityConstants.APPLETS_ACCESS_TOKEN_TIME+"_"+appid, System.currentTimeMillis() + 1100000 + "");
         }
         accessToken=stringRedisTemplate.boundValueOps("access_token:access_token:"+this.getAppId()).get();
        return accessToken;
    }
    public String getAppAccessToken(String appid) throws Exception {
        R<SysAppConfigVO> sysAppConfigVOR=userService.selectByAppid(appid);
    public String getAppAccessToken() throws Exception {
        String accessToken = "0";
        try {
            log.info("获取微信token参数:appid=" + APP_ID + ",appSecret=" + APP_SECRET);
            String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=" + sysAppConfigVOR.getData().getAppId() + "&secret=" + sysAppConfigVOR.getData().getSecret();
            String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=" + APP_ID + "&secret=" + APP_SECRET;
            String result = HttpClientUtil.httpGet(accessTokenUrl, null, null);
            Map<String, Object> resultMap = JSON.parseObject(result, Map.class);
            if (resultMap.containsKey("access_token")) {
@@ -277,6 +260,7 @@
    public void init() {
        wxXCXTempSend = this;
        wxXCXTempSend.redisTemplate = this.redisTemplate;
        wxXCXTempSend.stringRedisTemplate=this.stringRedisTemplate;
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAcidCheckRecordApi.java
@@ -42,7 +42,7 @@
     * @return 所有数据
     */
    @ApiOperation(value = "分页查询",response = ComActAcidCheckRecordVO.class)
    @OperLog(operModul = "分页查询排查数据",operType = 1)
    //@OperLog(operModul = "分页查询排查数据",operType = 1)
    @PostMapping("queryAll")
    public R selectAll(@RequestBody ComActAcidCheckRecordDTO comActAcidCheckRecordDTO) {
        return this.communityService.selectAllComActAcidCheckRecord(comActAcidCheckRecordDTO);
@@ -54,7 +54,7 @@
     * @param id 主键
     * @return 单条数据
     */
    @OperLog(operModul = "查询单条排查数据",operType = 1)
    //@OperLog(operModul = "查询单条排查数据",operType = 1)
    @ApiOperation(value = "通过主键查询单条数据",response = ComActAcidCheckRecordVO.class)
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Long id) {
@@ -67,7 +67,7 @@
     * @param comActAcidCheckRecordVO 实体对象
     * @return 新增结果
     */
    @OperLog(operModul = "新增排查数据",operType = 1)
    //@OperLog(operModul = "新增排查数据",operType = 1)
    @ApiOperation(value = "新增数据")
    @PostMapping
    public R insert(@RequestBody ComActAcidCheckRecordVO comActAcidCheckRecordVO) {
@@ -81,7 +81,7 @@
     * @param comActAcidCheckRecordVO 实体对象
     * @return 修改结果
     */
    @OperLog(operModul = "修改排查数据",operType = 1,businessType = Constants.UPDATE)
    //@OperLog(operModul = "修改排查数据",operType = 1,businessType = Constants.UPDATE)
    @ApiOperation(value = "修改数据")
    @PostMapping("/update")
    public R update(@RequestBody ComActAcidCheckRecordVO comActAcidCheckRecordVO) {
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAcidDangerMemberApi.java
@@ -40,7 +40,7 @@
    @Resource
    private CommunityService communityService;
    @OperLog(operModul = "后台查询风险人员",operType = 1)
    //@OperLog(operModul = "后台查询风险人员",operType = 1)
    @ApiOperation(value = "后台分页查询风险人员", response = ComActAcidDangerMemberVO.class)
    @PostMapping("/queryAll")
    public R pageDangerMember(@RequestBody @Valid ComActAcidDangerMemberDTO pageDangerMemberDTO) {
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAcidMemberApi.java
@@ -42,7 +42,7 @@
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @OperLog(operModul = "分页查询防疫工作人员列表",operType = 1)
    //@OperLog(operModul = "分页查询防疫工作人员列表",operType = 1)
    @ApiOperation(value = "分页查询列表",response = ComActAcidMemberVO.class)
    @PostMapping("queryAll")
    public R selectAll(@RequestBody ComActAcidMemberDTO commonPage) {
@@ -56,7 +56,7 @@
     * @param id 主键
     * @return 单条数据
     */
    @OperLog(operModul = "查询单条防疫工作人员信息",operType = 1)
    //@OperLog(operModul = "查询单条防疫工作人员信息",operType = 1)
    @ApiOperation("通过主键查询单条数据")
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Long id) {
@@ -69,7 +69,7 @@
     * @param comActAcidMemberVO 实体对象
     * @return 新增结果
     */
    @OperLog(operModul = "新增防疫工作人员记录",operType = 1)
    //@OperLog(operModul = "新增防疫工作人员记录",operType = 1)
    @ApiOperation("新增数据")
    @PostMapping
    public R insert(@RequestBody ComActAcidMemberVO comActAcidMemberVO) {
@@ -84,7 +84,7 @@
     * @param comActAcidMemberVO 实体对象
     * @return 修改结果
     */
    @OperLog(operModul = "修改防疫工作人员信息",operType = 1,businessType = Constants.UPDATE)
    //@OperLog(operModul = "修改防疫工作人员信息",operType = 1,businessType = Constants.UPDATE)
    @ApiOperation("修改数据")
    @PostMapping("/update")
    public R update(@RequestBody ComActAcidMemberVO comActAcidMemberVO) {
@@ -97,7 +97,7 @@
     * @param id 主键结合
     * @return 删除结果
     */
    @OperLog(operModul = "删除防疫工作人员信息",operType = 1)
    //@OperLog(operModul = "删除防疫工作人员信息",operType = 1)
    @ApiOperation("删除数据")
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAcidRecordApi.java
@@ -12,6 +12,7 @@
import com.panzhihua.common.interfaces.OperLog;
import com.panzhihua.common.model.dtos.community.acid.ComActAcidRecordDTO;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.acid.ComAcidStaticVO;
import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordExcelReturn;
@@ -96,6 +97,8 @@
            }
        }
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        comActAcidRecordDTO.setLoginAccount(loginUserInfo.getAccount());
        return this.communityService.selectAllComActAcidRecord(comActAcidRecordDTO);
    }
@@ -392,9 +395,9 @@
    @GetMapping("fiveCountPlus")
    public R fiveCountPlus(@RequestParam("date")String date,@RequestParam(value = "localCity",required = false)String localCity){
        if(StringUtils.isNotEmpty(localCity)){
            return this.communityService.comActAcidRecordFiveCountPlus(date,localCity);
            return this.communityService.comActAcidRecordFiveCountPlus(date,localCity,this.getLoginUserInfo().getAccount());
        }
        return this.communityService.comActAcidRecordFiveCountPlus(date,this.getLoginUserInfo().getName());
        return this.communityService.comActAcidRecordFiveCountPlus(date,this.getLoginUserInfo().getName(),this.getLoginUserInfo().getAccount());
    }
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPbCheckUnitApi.java
@@ -23,6 +23,7 @@
import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.StringRedisTemplate;
@@ -239,15 +240,19 @@
    }
    @ApiOperation(value = "报到单位统计-顶部数据", response = PbCheckUnitStatisticsVo.class)
    @ApiImplicitParam(name = "communityId", value = "社区id")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "communityId", value = "社区id"),
            @ApiImplicitParam(name = "choice", value = "单位归属选择")
    })
    @GetMapping("/statistics/top")
    public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId) {
    public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId,
                               @RequestParam(value = "belongTo", required = false) String choice) {
        String belongTo = "";
        String[] area={"东区","仁和区","米易县","盐边县"};
        if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){
            belongTo = this.getLoginUserInfo().getName();
        }
        return this.comPbCheckUnitService.unitStatisticsTop(communityId, belongTo);
        return this.comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice);
    }
    @ApiOperation(value = "报到单位统计", response = PbCheckUnitStatisticsVo.class)
@@ -261,15 +266,21 @@
    }
    @ApiOperation(value = "报到党员统计-顶部数据", response = PbCheckUnitStatisticsVo.class)
    @ApiImplicitParam(name = "communityId", value = "社区id")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "communityId", value = "社区id"),
            @ApiImplicitParam(name = "choice", value = "单位归属选择"),
            @ApiImplicitParam(name = "checkUnitId", value = "单位id")
    })
    @GetMapping("/pbStatistics/top")
    public R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId) {
    public R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId,
                             @RequestParam(value = "choice", required = false) String choice,
                             @RequestParam(value = "checkUnitId", required = false) Long checkUnitId) {
        String belongTo = "";
        String[] area={"东区","仁和区","米易县","盐边县"};
        if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){
            belongTo = this.getLoginUserInfo().getName();
        }
        return this.comPbCheckUnitService.pbStatisticsTop(communityId, belongTo);
        return this.comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId);
    }
    @ApiOperation(value = "报到党员统计-按单位归属统计", response = PbCheckUnitStatisticsVo.class)
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java
@@ -1315,7 +1315,8 @@
                                  @RequestParam(value = "communityId",required = false) Long communityId,
                                  @RequestParam(value = "belongTo",required = false) String  belongTo,
                                  @RequestParam(value = "page",required = false) Integer page,
                                  @RequestParam(value = "size",required = false) Integer size, @RequestParam(value = "unitId",required = false) Long unitId){
        return communityService.institutionalUnitServiceAnalysis(year,type,range,communityId,page,size,belongTo,unitId);
                                  @RequestParam(value = "size",required = false) Integer size,
                                  @RequestParam(value = "unitId",required = false) Long unitId){
        return communityService.institutionalUnitServiceAnalysis(year,type,range,communityId,page,size,belongTo,unitId,this.getLoginUserInfo().getAccount());
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java
@@ -152,7 +152,7 @@
        return partyBuildingService.getPbOrgAllList(partyOrganizationVO);
    }
    @OperLog(operModul = "党支部管理", operType = 1)
    //@OperLog(operModul = "党支部管理", operType = 1)
    @ApiOperation(value = "新增党支部")
    @PostMapping("addpartyorganization")
    public R addPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) {
@@ -162,7 +162,7 @@
        return r;
    }
    @OperLog(operModul = "党支部管理", operType = 2)
    //@OperLog(operModul = "党支部管理", operType = 2)
    @ApiOperation(value = "编辑党支部")
    @PostMapping("updatepartyorganization")
    public R updatePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) {
@@ -173,7 +173,7 @@
        return partyBuildingService.updatePartyOrganization(partyOrganizationVO);
    }
    @OperLog(operModul = "党支部管理", operType = 3)
    //@OperLog(operModul = "党支部管理", operType = 3)
    @ApiOperation(value = "启用、禁用党支部")
    @PutMapping("resetpartyorganization")
    public R resetPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) {
@@ -188,7 +188,7 @@
        return partyBuildingService.resetPartyOrganization(partyOrganizationVO);
    }
    @OperLog(operModul = "党支部管理", operType = 4)
    //@OperLog(operModul = "党支部管理", operType = 4)
    @ApiOperation(value = "删除党支部")
    @DeleteMapping("deletepartyorganization")
    public R deletePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) {
@@ -199,7 +199,7 @@
        return partyBuildingService.deletePartyOrganization(partyOrganizationVO);
    }
    @OperLog(operModul = "党员管理", operType = 1)
    //@OperLog(operModul = "党员管理", operType = 1)
    @ApiOperation(value = "新增党员")
    @PostMapping("addpartybuildingmember")
    public R addPartyBuildingMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) {
@@ -214,7 +214,7 @@
        return r;
    }
    @OperLog(operModul = "党员管理", operType = 2)
    //@OperLog(operModul = "党员管理", operType = 2)
    @ApiOperation(value = "编辑党员")
    @PutMapping("updatepartybuildingmember")
    public R updatePartyBuildingMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) {
@@ -477,7 +477,7 @@
        return userService.listIdentity(communityId);
    }
    @OperLog(operModul = "党委管理", operType = 1)
    //@OperLog(operModul = "党委管理", operType = 1)
    @ApiOperation(value = "新增党委")
    @PostMapping("addpartycommittee")
    public R addPartyCommittee(@RequestBody @Validated(AddGroup.class) PartyCommitteeVO partyCommitteeVO) {
@@ -490,7 +490,7 @@
        return r;
    }
    @OperLog(operModul = "党委管理", operType = 2)
    //@OperLog(operModul = "党委管理", operType = 2)
    @ApiOperation(value = "编辑党委")
    @PutMapping("updatepartycommittee")
    public R updatePartyCommittee(@RequestBody @Validated(AddGroup.class) PartyCommitteeVO partyCommitteeVO) {
@@ -503,7 +503,7 @@
        return partyBuildingService.updatePartyCommittee(partyCommitteeVO);
    }
    @OperLog(operModul = "党委管理", operType = 3)
    //@OperLog(operModul = "党委管理", operType = 3)
    @ApiOperation(value = "删除党委")
    @DeleteMapping("deletepartycommittee")
    public R deletePartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) {
@@ -581,7 +581,7 @@
        return partyBuildingWestService.deleteYnamic(id);
    }
    @OperLog(operModul = "党员管理", operType = 3)
    //@OperLog(operModul = "党员管理", operType = 3)
    @ApiOperation(value = "删除党员")
    @DeleteMapping("deletepartybuildingmember")
    public R deleteDynUser(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) {
@@ -1063,7 +1063,7 @@
        return partyBuildingService.checkMember(idCard);
    }
    @OperLog(operModul = "党员管理", operType = 1)
    //@OperLog(operModul = "党员管理", operType = 1)
    @ApiOperation(value = "分页查询党员列表",response = PartyBuildingMemberVO.class)
    @PostMapping("/page/member")
    public R pageMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) {
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/IndexApi.java
@@ -3,8 +3,15 @@
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import cn.hutool.core.util.StrUtil;
import com.panzhihua.common.constants.Constants;
import com.panzhihua.common.constants.TokenConstant;
import com.panzhihua.common.model.vos.user.IndexDataAnalysisVO;
import com.panzhihua.common.model.vos.user.StreetVO;
import com.panzhihua.common.utlis.AES;
import com.panzhihua.common.utlis.StringUtils;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import org.springframework.util.ObjectUtils;
@@ -26,6 +33,8 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
@@ -75,4 +84,9 @@
        }
        return r;
    }
    @GetMapping("/communityList")
    @ApiOperation(value = "获取当前账号下的社区/村落列表",response = StreetVO.class)
    public R communityList(){
        return userService.communityList(this.getLoginUserInfo().getAccount(),this.getUserId());
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/SystemManagementApi.java
@@ -41,7 +41,7 @@
    @ApiOperation(value = "新增社区后台账户")
    @PostMapping("user")
    @OperLog(operModul = "用户管理", operType = 1)
    //@OperLog(operModul = "用户管理", operType = 1)
    public R addUser(@RequestBody @Validated(AddGroup.class) AdministratorsUserVO administratorsUserVO) {
        administratorsUserVO.setType(3);
        administratorsUserVO.setAreaId(null);
@@ -51,7 +51,7 @@
    @ApiOperation(value = "编辑社区后台账户")
    @PutMapping("user")
    @OperLog(operModul = "用户管理", operType = 2)
    //@OperLog(operModul = "用户管理", operType = 2)
    public R putUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) {
        Long userId = administratorsUserVO.getUserId();
        if (null == userId || 0 == userId) {
@@ -69,7 +69,7 @@
    @ApiOperation(value = "删除后台用户")
    @DeleteMapping("user")
    @OperLog(operModul = "用户管理", operType = 3)
    //@OperLog(operModul = "用户管理", operType = 3)
    public R deleteUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) {
        Long userId = administratorsUserVO.getUserId();
        if (null == userId || 0 == userId) {
@@ -112,7 +112,7 @@
    @ApiOperation(value = "删除角色")
    @DeleteMapping("role")
    @OperLog(operModul = "角色管理", operType = 3)
    //@OperLog(operModul = "角色管理", operType = 3)
    public R deleteRoleBackstage(@RequestBody RoleVO roleVO) {
        Long roleId = roleVO.getRoleId();
        if (null == roleId || 0 == roleId) {
@@ -138,7 +138,7 @@
    @ApiOperation(value = "新增角色-设置角色的权限")
    @PostMapping("menu")
    @OperLog(operModul = "角色管理", operType = 1)
    //@OperLog(operModul = "角色管理", operType = 1)
    public R addMenuRole(@RequestBody @Validated MenuRoleVO menuRoleVO) {
        RoleVO roleVO = new RoleVO();
        String roleName = menuRoleVO.getRoleName();
@@ -166,7 +166,7 @@
    @ApiOperation(value = "设置角色的权限")
    @PutMapping("menu")
    @OperLog(operModul = "角色管理", operType = 2)
    //@OperLog(operModul = "角色管理", operType = 2)
    public R putMenuRole(@RequestBody @Validated MenuRoleVO menuRoleVO) {
        menuRoleVO.setCommunityId(this.getCommunityId());
        return userService.putMenuRole(menuRoleVO);
@@ -216,7 +216,7 @@
    @ApiOperation(value = "编辑用户协议")
    @PutMapping("agreement")
    @OperLog(operModul = "用户协议", operType = 2)
    //@OperLog(operModul = "用户协议", operType = 2)
    public R putAgreement(@RequestBody SysUserAgreementVO sysUserAgreementVO) {
        Long id = sysUserAgreementVO.getId();
        if (null == id || id == 0) {
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActAcidRecordApi.java
@@ -139,8 +139,8 @@
     * @return
     */
    @GetMapping("fiveCountPlus")
    public R fiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity")String localCity){
        return this.comActAcidRecordService.fiveCountPlus(date,localCity);
    public R fiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity")String localCity,@RequestParam(value = "loginAccount",required = false)String loginAccount){
        return this.comActAcidRecordService.fiveCountPlus(date,localCity,loginAccount);
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComAreaTownCommunityApi.java
@@ -94,7 +94,7 @@
    @GetMapping("/areaTownCommunity")
    public R test(@RequestParam("name")String name,@RequestParam("userId")Long userId){
        Long[] idArray={4L,17959L,16522L,16196L,16214L,17949L,17237L};
        Long[] idArray={4L,17959L,16522L,16196L,16214L,17949L,89234L};
        if("panzhihua".equals(name)){
            List<ComAreaCounty> list=comAreaTownCommunityDao.selectArea();
            list.forEach(lis->{
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java
@@ -397,7 +397,8 @@
                                              @RequestParam(value = "page",required = false) Integer page,
                                              @RequestParam(value = "belongTo",required = false) String  belongTo,
                                              @RequestParam(value = "size",required = false) Integer size,
                                              @RequestParam(value = "unitId",required = false) Long unitId ){
                                              @RequestParam(value = "unitId",required = false) Long unitId,
                                              @RequestParam(value = "loginAccount",required = false) String loginAccount){
        return this.comActNeighborCircleService.institutionalUnitServiceAnalysis(year,type,range,communityId,page,size,belongTo,unitId);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActAcidRecordDao.java
@@ -66,7 +66,7 @@
     * @param localCity
     * @return
     */
    FiveCount fiveCountPlus(@Param("date") String date,@Param("localCity") String localCity);
    FiveCount fiveCountPlus(@Param("date") String date,@Param("localCity") String localCity,@Param("type") Integer type);
    /**
     * 统计查询
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java
@@ -47,6 +47,8 @@
//        + "AND a.is_volunteer=#{activitySignVO.type}-1   " + " </if> " + " order by a.create_at desc " + "</script>")
    IPage<ActivitySignVO> listActivitySign(Page page, @Param("activitySignVO") ActivitySignVO activitySignVO);
    IPage<ActivitySignVO> listActivitySignParty(Page page, @Param("activitySignVO") ActivitySignVO activitySignVO);
@Select("<script> " + "SELECT " + "u.user_id id, " + "u.image_url, " + "u.name, " + "u.nick_name, u.openid, "
        + "CASE WHEN a.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity, "
        + "u.phone, " + "u.tags, " + "a.create_at,  " + "a.is_volunteer, a.status , a.reason, t.limit " + "FROM " + "com_act_act_sign a "
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActAcidRecordService.java
@@ -56,7 +56,7 @@
     * 5项统计
     * @return
     */
    R fiveCountPlus(String date,String localCity);
    R fiveCountPlus(String date,String localCity,String loginAccount);
    /**
     * 图标统计
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java
@@ -69,6 +69,10 @@
    @Override
    public R pageList(ComActAcidRecordDTO comActAcidRecordDTO) {
        //是否需要筛选
        comActAcidRecordDTO.setType(isVilliage(comActAcidRecordDTO.getLoginAccount()));
        log.info("搜索条件=========="+comActAcidRecordDTO);
        //获取当前登录账号的社区名
        return R.ok(this.baseMapper.pageList(new Page<>(comActAcidRecordDTO.getPage(), comActAcidRecordDTO.getSize()),comActAcidRecordDTO));
    }
@@ -259,8 +263,12 @@
        return R.ok(this.baseMapper.fiveCount(localCity));
    }
    @Override
    public R fiveCountPlus(String date,String localCity) {
        return R.ok(this.baseMapper.fiveCountPlus(date,localCity));
    public R fiveCountPlus(String date,String localCity,String loginAccount) {
        Integer type=3;
        if (StringUtils.isNotEmpty(loginAccount)){
             type = isVilliage(loginAccount);
        }
        return R.ok(this.baseMapper.fiveCountPlus(date,localCity,type));
    }
    @Override
@@ -566,4 +574,18 @@
            case "盐边县": comStreetDO.setAreaCode(510422); break;
        }
    }
    /**
     * 是否需要区分村落/社区
     * */
    private Integer isVilliage(String name){
        if ("fangyipingtai".equals(name)){
            return 3;
        }else if ("pandashujuzhongxin".equals(name)){
            return 1;
        }else if ("pannongyenongcunju".equals(name)){
            return 2;
        }
        return 3;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -361,10 +361,16 @@
     */
    @Override
    public R listActivitySign(ActivitySignVO activitySignVO) {
        ComActActivityDO comActActivityDO=comActActivityDAO.selectById(activitySignVO.getActivityId());
        if(comActActivityDO!=null){
            if(comActActivityDO.getType()==3||comActActivityDO.getType()==5){
                IPage<ActivitySignVO> activitySignVOS = comActActSignDAO
                        .listActivitySignParty(new Page(activitySignVO.getPageNum(), activitySignVO.getPageSize()), activitySignVO);
                return R.ok(activitySignVOS);
            }
        }
        IPage<ActivitySignVO> activitySignVOS = comActActSignDAO
            .listActivitySign(new Page(activitySignVO.getPageNum(), activitySignVO.getPageSize()), activitySignVO);
        // List<ActivitySignVO> activitySignVOS = comActActSignDAO.listActivitySign(activitySignVO);
        return R.ok(activitySignVOS);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
@@ -7,6 +7,8 @@
import javax.annotation.Resource;
import com.panzhihua.common.model.vos.community.ComActPasswordVo;
import com.panzhihua.service_community.util.MyAESUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
@@ -281,7 +283,13 @@
    @Override
    public R getCommunityPassword(Long communityId){
        return R.ok(comActDAO.getCommunityPassword(communityId));
        ComActPasswordVo comActPasswordVo=comActDAO.getCommunityPassword(communityId);
        try {
            comActPasswordVo.setPassword(MyAESUtil.Decrypt(comActPasswordVo.getPassword(),"Ryo7M3n8loC5Abcd"));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return R.ok(comActPasswordVo);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/util/MyAESUtil.java
New file
@@ -0,0 +1,61 @@
package com.panzhihua.service_community.util;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
public class MyAESUtil {
    // 加密
    public static String Encrypt(String sSrc, String sKey) throws Exception {
        if (sKey == null) {
            System.out.print("Key为空null");
            return null;
        }
        // 判断Key是否为16位
        if (sKey.length() != 16) {
            System.out.print("Key长度不是16位");
            return null;
        }
        byte[] raw = sKey.getBytes("utf-8");
        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
        byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
        return new BASE64Encoder().encode(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
    }
    // 解密
    public static String Decrypt(String sSrc, String sKey) throws Exception {
        try {
            // 判断Key是否正确
            if (sKey == null) {
                System.out.print("Key为空null");
                return null;
            }
            // 判断Key是否为16位
            if (sKey.length() != 16) {
                System.out.print("Key长度不是16位");
                return null;
            }
            byte[] raw = sKey.getBytes("utf-8");
            SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
            cipher.init(Cipher.DECRYPT_MODE, skeySpec);
            byte[] encrypted1 = new BASE64Decoder().decodeBuffer(sSrc);//先用base64解密
            try {
                byte[] original = cipher.doFinal(encrypted1);
                String originalString = new String(original,"utf-8");
                return originalString;
            } catch (Exception e) {
                System.out.println(e.toString());
                return null;
            }
        } catch (Exception ex) {
            System.out.println(ex.toString());
            return null;
        }
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidDangerMemberMapper.xml
@@ -65,7 +65,7 @@
            <if test="commonPage.stopTime!=null">
                AND concat(SUBSTR(#{commonPage.stopTime} FROM 1 FOR 10),' 23:59:59') >= checkTime
            </if>
            order by checkTime desc
            order by checkTime asc,reportTime desc
        </if>
        <if test="commonPage.type == 2">
            <if test="commonPage.startTime!=null">
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidRecordMapper.xml
@@ -59,6 +59,12 @@
            <if test="commonPage.travelCard !=null and commonPage.travelCard !=''">
                and travel_card like concat('%',#{commonPage.travelCard},'%')
            </if>
            <if test="commonPage.type == 1">
                and local_city like concat('%','社区')
            </if>
            <if test="commonPage.type == 2">
                and local_city like concat('%','村')
            </if>
        </where>
        order by check_status asc,create_time desc
    </select>
@@ -222,53 +228,116 @@
    <select id="fiveCountPlus" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount">
        select (select count(*) from com_act_acid_record where 1=1 and is_del=0
        <if test="type == 1">
            and local_city like
            concat('%','社区')
        </if>
        <if test="type == 2">
            and local_city like
            concat('%','村')
        </if>
        <if test="date!=null and date!=''">and
            create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')
        </if>
        <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like
            concat('%',#{localCity},'%')</if>) allCount,
            concat('%',#{localCity},'%')
            <if test="type == 1">
                and local_city like
                concat('%','社区')
            </if>
            <if test="type == 2">
                and local_city like
                concat('%','村')
            </if></if>) allCount,
        (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0
        <if
                test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},'
        <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},'
            23:23:59')
        </if>
        <if test="type == 1">
            and local_city like
            concat('%','社区')
        </if>
        <if test="type == 2">
            and local_city like
            concat('%','村')
        </if>
        <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like
            concat('%',#{localCity},'%')</if>) dangerCount,
            concat('%',#{localCity},'%')
            </if>) dangerCount,
        (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0
        <if
                test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},'
        <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},'
            23:23:59')
        </if>
        <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like
            concat('%',#{localCity},'%')</if>) greenMark,
            concat('%',#{localCity},'%')</if>
        <if test="type == 1">
            and local_city like
            concat('%','社区')
        </if>
        <if test="type == 2">
            and local_city like
            concat('%','村')
        </if>) greenMark,
        (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0
        <if
                test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},'
        <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},'
            23:23:59')
        </if>
        <if test="type == 1">
            and local_city like
            concat('%','社区')
        </if>
        <if test="type == 2">
            and local_city like
            concat('%','村')
        </if>
        <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like
            concat('%',#{localCity},'%')</if>) redMark,
            concat('%',#{localCity},'%')
            </if>) redMark,
        (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0
        <if
                test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},'
        <if test="type == 1">
            and local_city like
            concat('%','社区')
        </if>
        <if test="type == 2">
            and local_city like
            concat('%','村')
        </if>
        <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},'
            23:23:59')
        </if>
        <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like
            concat('%',#{localCity},'%')</if>) yellowMark,
            concat('%',#{localCity},'%')
        </if>) yellowMark,
        (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0
        <if
                test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},'
        <if test="type == 1">
            and local_city like
            concat('%','社区')
        </if>
        <if test="type == 2">
            and local_city like
            concat('%','村')
        </if>
        <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},'
            23:23:59')
        </if>
        <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like
            concat('%',#{localCity},'%')</if>) travelCount,
            concat('%',#{localCity},'%')
           </if>) travelCount,
        (select count(*) from com_act_acid_record where outside_city = '是' and is_del=0
        <if
                test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},'
        <if test="type == 1">
            and local_city like
            concat('%','社区')
        </if>
        <if test="type == 2">
            and local_city like
            concat('%','村')
        </if>
        <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},'
            23:23:59')
        </if>
        <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like
            concat('%',#{localCity},'%')</if>) outsideCount
            concat('%',#{localCity},'%')
           </if>) outsideCount
    </select>
    <select id="pushStatics" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount">
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActSignMapper.xml
@@ -116,6 +116,49 @@
            </if>
        order by a.create_at desc
    </select>
    <select id="listActivitySignParty" resultType="com.panzhihua.common.model.vos.community.ActivitySignVO">
        SELECT u.user_id id, u.image_url, cpm.name, u.nick_name,
        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
        JOIN sys_user u ON a.user_id = u.user_id
        JOIN com_pb_member cpm on a.user_id = cpm.user_id
        left join com_act_activity t on a.activity_id = t.id
        LEFT JOIN (
        SELECT * FROM (
        SELECT * FROM com_act_act_regist
        WHERE activity_id = #{activitySignVO.activityId}
        ORDER BY id DESC LIMIT 1000000
        ) temp GROUP BY activity_id, user_id
        ) r ON a.activity_id = r.activity_id AND a.user_id = r.user_id
        WHERE a.activity_id = #{activitySignVO.activityId}
        <if test='activitySignVO.phone != null and activitySignVO.phone != &quot;&quot;'>
            AND u.phone = #{activitySignVO.phone}
        </if>
        <if test='activitySignVO.status != null'>
            AND a.status = #{activitySignVO.status}
        </if>
        <if test='activitySignVO.tags != null and activitySignVO.tags != &quot;&quot;'>
            AND u.tags like concat('%',#{activitySignVO.tags},'%')
        </if>
        <if test='activitySignVO.name != null and activitySignVO.name != &quot;&quot;'>
            AND u.`name` = #{activitySignVO.name}
        </if>
        <if test='activitySignVO.identity != null and activitySignVO.identity != &quot;&quot; and activitySignVO.identity==1'>
            AND u.is_partymember = 0 and a.is_volunteer=0
        </if>
        <if test='activitySignVO.identity != null and activitySignVO.identity != &quot;&quot; and activitySignVO.identity==2'>
            AND u.is_partymember = 1
        </if>
        <if test='activitySignVO.identity != null and activitySignVO.identity != &quot;&quot; and activitySignVO.identity==3'>
            AND a.is_volunteer=1
        </if>
        <if test='activitySignVO.type != null and activitySignVO.type != 0'>
            AND a.is_volunteer=#{activitySignVO.type}-1
        </if>
        order by a.create_at desc
    </select>
    <select id="selectList" resultType="com.panzhihua.common.model.vos.community.ActivitySignVO">
        SELECT s.id,s.activity_id,s.user_id,s.create_at,s.is_volunteer, r.times, r.times * r.award AS award FROM `com_act_act_sign` s
        LEFT JOIN (
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/api/ComPbCheckUnitController.java
@@ -133,12 +133,14 @@
     * 报到单位统计-顶部数据
     * @param communityId
     * @param belongTo
     * @param choice
     * @return
     */
    @GetMapping("/statistics/top")
    public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId,
                               @RequestParam(value = "belongTo") String belongTo) {
        return comPbCheckUnitService.unitStatisticsTop(communityId, belongTo);
                               @RequestParam(value = "belongTo") String belongTo,
                               @RequestParam(value = "belongTo", required = false) String choice) {
        return comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice);
    }
    /**
@@ -155,12 +157,16 @@
     * 报到党员统计-顶部数据
     * @param communityId
     * @param belongTo
     * @param choice
     * @param checkUnitId
     * @return
     */
    @GetMapping("/pbStatistics/top")
    public R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId,
                             @RequestParam(value = "belongTo") String belongTo) {
        return comPbCheckUnitService.pbStatisticsTop(communityId, belongTo);
                             @RequestParam(value = "belongTo") String belongTo,
                             @RequestParam(value = "choice", required = false) String choice,
                             @RequestParam(value = "checkUnitId", required = false) Long checkUnitId) {
        return comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId);
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbCheckUnitMapper.java
@@ -61,9 +61,10 @@
     * 报到单位统计-顶部数据
     * @param communityId
     * @param belongTo
     * @param choice
     * @return
     */
    PbCheckUnitStatisticsVo unitStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo);
    PbCheckUnitStatisticsVo unitStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo, @Param("choice") String choice);
    /**
     * 报到单位统计
@@ -77,9 +78,11 @@
     * 报到党员统计-顶部数据
     * @param communityId
     * @param belongTo
     * @param choice
     * @param checkUnitId
     * @return
     */
    PbCheckUnitStatisticsVo pbStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo);
    PbCheckUnitStatisticsVo pbStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo, @Param("choice") String choice, @Param("checkUnitId") Long checkUnitId);
    /**
     * 报到党员统计-按单位归属统计
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/ComPbCheckUnitService.java
@@ -98,9 +98,10 @@
     * 报到单位统计-顶部数据
     * @param communityId
     * @param belongTo
     * @param choice
     * @return
     */
    R unitStatisticsTop(Long communityId, String belongTo);
    R unitStatisticsTop(Long communityId, String belongTo, String choice);
    /**
     * 报到单位统计
@@ -113,9 +114,11 @@
     * 报到党员统计-顶部数据
     * @param communityId
     * @param belongTo
     * @param choice
     * @param checkUnitId
     * @return
     */
    R pbStatisticsTop(Long communityId, String belongTo);
    R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId);
    /**
     * 报到党员统计-按单位归属统计
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
@@ -5,7 +5,6 @@
import com.google.common.collect.Lists;
import com.panzhihua.common.enums.ComPbCheckUnitTypeEnum;
import com.panzhihua.common.model.vos.common.ComPbCheckUnitVo;
import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO;
import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitErrorExcelVO;
import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitExcelVO;
import com.panzhihua.common.utlis.StringUtils;
@@ -242,11 +241,12 @@
     * 报到单位统计-顶部数据
     * @param communityId
     * @param belongTo
     * @param choice
     * @return
     */
    @Override
    public R unitStatisticsTop(Long communityId, String belongTo) {
        return R.ok(this.baseMapper.unitStatisticsTop(communityId, belongTo));
    public R unitStatisticsTop(Long communityId, String belongTo, String choice) {
        return R.ok(this.baseMapper.unitStatisticsTop(communityId, belongTo, choice));
    }
    /**
@@ -263,11 +263,13 @@
     * 报到党员统计-顶部数据
     * @param communityId
     * @param belongTo
     * @param choice
     * @param checkUnitId
     * @return
     */
    @Override
    public R pbStatisticsTop(Long communityId, String belongTo) {
        return R.ok(this.baseMapper.pbStatisticsTop(communityId, belongTo));
    public R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId) {
        return R.ok(this.baseMapper.pbStatisticsTop(communityId, belongTo, choice, checkUnitId));
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml
@@ -51,6 +51,9 @@
            <if test="dto.belongTo != null and dto.belongTo != ''">
                and cpcu.belong_to =#{dto.belongTo}
            </if>
            <if test="dto.natureName != null and dto.natureName != ''">
                and cpcu.nature_name = #{dto.natureName}
            </if>
        </where>
        order by cpcu.create_at desc
    </select>
@@ -98,6 +101,9 @@
            <if test="belongTo != null and belongTo != ''">
                AND belong_to = #{belongTo}
            </if>
            <if test="choice != null and choice != ''">
                AND belong_to = #{choice}
            </if>
        ) AS unitTotal,
        (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '机关单位'
            <if test="communityId != null">
@@ -105,6 +111,9 @@
            </if>
            <if test="belongTo != null and belongTo != ''">
                AND belong_to = #{belongTo}
            </if>
            <if test="choice != null and choice != ''">
                AND belong_to = #{choice}
            </if>
        ) AS organTotal,
        (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位'
@@ -114,6 +123,9 @@
            <if test="belongTo != null and belongTo != ''">
                AND belong_to = #{belongTo}
            </if>
            <if test="choice != null and choice != ''">
                AND belong_to = #{choice}
            </if>
        ) AS businessTotal,
        (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1
            <if test="communityId != null">
@@ -122,13 +134,28 @@
            <if test="belongTo != null and belongTo != ''">
                AND cpcu.belong_to = #{belongTo}
            </if>
            <if test="choice != null and choice != ''">
                AND cpcu.belong_to = #{choice}
            </if>
        ) AS partyMemberTotal
    </select>
    <select id="unitStatistics" resultType="com.panzhihua.common.model.vos.common.PbCheckUnitStatisticsVo">
        SELECT temp.*,
        (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '机关单位' AND belong_to = temp.belong_to) AS organTotal,
        (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位' AND belong_to = temp.belong_to) AS businessTotal,
        (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 AND cpcu.belong_to = temp.belong_to) AS partyMemberTotal
        (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '机关单位'
            <if test="commonDto.communityId != null">
                AND community_id = #{commonDto.communityId}
            </if>
         AND belong_to = temp.belong_to) AS organTotal,
        (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位'
            <if test="commonDto.communityId != null">
                AND community_id = #{commonDto.communityId}
            </if>
        AND belong_to = temp.belong_to) AS businessTotal,
        (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1
            <if test="commonDto.communityId != null">
                AND m.community_id = #{commonDto.communityId}
            </if>
         AND cpcu.belong_to = temp.belong_to) AS partyMemberTotal
        FROM (SELECT belong_to,COUNT( id ) AS unitTotal FROM com_pb_check_unit WHERE 1=1
        <if test="commonDto.communityId != null">
            AND community_id = #{commonDto.communityId}
@@ -148,6 +175,12 @@
        <if test="belongTo != null and belongTo != ''">
            AND cpcu.belong_to = #{belongTo}
        </if>
        <if test="choice != null and choice != ''">
            AND cpcu.belong_to = #{choice}
        </if>
        <if test="checkUnitId != null">
            AND m.check_unit_id = #{checkUnitId}
        </if>
        ) AS organTotal,
        (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1
        AND cpcu.nature_name = '企事业单位'
@@ -157,6 +190,12 @@
        <if test="belongTo != null and belongTo != ''">
            AND cpcu.belong_to = #{belongTo}
        </if>
        <if test="choice != null and choice != ''">
            AND cpcu.belong_to = #{choice}
        </if>
        <if test="checkUnitId != null">
            AND m.check_unit_id = #{checkUnitId}
        </if>
        ) AS businessTotal,
        (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1
        <if test="communityId != null">
@@ -165,13 +204,25 @@
        <if test="belongTo != null and belongTo != ''">
            AND cpcu.belong_to = #{belongTo}
        </if>
        <if test="choice != null and choice != ''">
            AND cpcu.belong_to = #{choice}
        </if>
        <if test="checkUnitId != null">
            AND m.check_unit_id = #{checkUnitId}
        </if>
        ) AS partyMemberTotal
    </select>
    <select id="pbStatisticsBelong" resultType="com.panzhihua.common.model.vos.common.PbCheckUnitStatisticsVo">
        SELECT temp.*,
        (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1
            <if test="commonDto.communityId != null">
                AND m.community_id = #{commonDto.communityId}
            </if>
        AND cpcu.nature_name = '机关单位' AND cpcu.belong_to = temp.belong_to) AS organTotal,
        (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1
            <if test="commonDto.communityId != null">
                AND m.community_id = #{commonDto.communityId}
            </if>
        AND cpcu.nature_name = '企事业单位' AND cpcu.belong_to = temp.belong_to) AS businessTotal
        FROM (SELECT cpcu.belong_to,COUNT( m.id ) AS partyMemberTotal FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1
        <if test="commonDto.communityId != null">
@@ -184,6 +235,7 @@
    </select>
    <select id="pbStatisticsUnit" resultType="com.panzhihua.common.model.vos.common.ComPbCheckUnitVo">
        SELECT
        cpcu.id,
        cpcu.`name`,
        cpcu.nature_name,
        cpcu.belong_to,
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbMemberMapper.xml
@@ -62,7 +62,7 @@
        su.nick_name
        from com_pb_member as m
        LEFT JOIN com_pb_org o ON m.org_id = o.id
        LEFT JOIN sys_user su ON o.user_id = su.user_id
        LEFT JOIN sys_user su ON m.user_id = su.user_id
        LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id
        LEFT JOIN com_mng_village cmv on m.village_id = cmv.village_id
        LEFT JOIN com_act ca on m.community_id = ca.community_id
@@ -111,9 +111,6 @@
            </if>
            <if test="dto.natureName !=null and dto.natureName !=''">
                and cpcu.nature_name = #{dto.natureName}
            </if>
            <if test="dto.workUnitName !=null and dto.workUnitName !=''">
                and cpcu.name = #{dto.workUnitName}
            </if>
            <if test="dto.isRegister !=null">
                <if test="dto.isRegister == 1">
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -4,6 +4,7 @@
import javax.annotation.Resource;
import cn.hutool.core.util.StrUtil;
import com.panzhihua.common.model.dtos.DataKanBansDto;
import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO;
import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO;
@@ -1433,4 +1434,14 @@
    public R getAreaAndStreet(){
        return userService.getAreaAndStreet();
    }
    @GetMapping("/communityList")
    public R getCommunityList(@RequestParam("name") String name, @RequestParam(value = "id",required = false) Long id){
        return userService.getCommunityList(name,id);
    }
    @GetMapping("/resetPasswordAccount")
    public R resetPasswordAccount(@RequestParam("type")Integer type,@RequestParam("account")String account){
        return userService.resetPassword(type,account);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java
@@ -342,7 +342,9 @@
    Map<String,Long> getDailyAddAndActive(@Param("date") Date date,@Param("id") Long streetId,@Param("areaCode") Long areaCode);
    List<StreetVO> selectStreetByAreaCode(Integer code);
    List<StreetVOS> selectStreetByAreaCode(Integer code);
    List<StreetVO> selectStreetsByAreaCode(Integer code);
    ComActAcidCheckRecordVO selectComActAcidCheckRecordById(Long id);
@@ -355,5 +357,17 @@
     * */
    Integer getMonthUsers(@Param("streetId") Long streetId,@Param("areaCode") Long areaCode,@Param("range") String range);
    /**
     * 获取街道下属村/社区
     * */
    List<CommunityVO> selectCommunityByStreetId(@Param("id") Integer streetId,@Param("type") Integer type);
    /**
     * 获取账户id
     * */
    List<Integer> selectIdsByAccount(@Param("array") String[] streetList);
    List<CommunityVO> selectCommunityByStreetName(String name);
    StreetVOS selectStreetByName(String name);
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java
@@ -899,4 +899,17 @@
     * @return
     */
    R uuPush(@RequestParam("washPhone")String washPhone,@RequestParam("phone")String phone,@RequestParam("washName")String washName,@RequestParam("orderStatus")Integer orderStatus);
    /**
     * 获取城镇或村落列表
     * */
    R getCommunityList(String name,Long id);
    /**
     * 重置密码
     * @param type
     * @param account
     * @return
     */
    R resetPassword(Integer type,String account);
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -13,9 +13,12 @@
import javax.annotation.Resource;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
@@ -41,6 +44,7 @@
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -3529,7 +3533,6 @@
        return R.ok(vo);
    }
    @Override
    public R uuPush(String washPhone,String phone,String washName,Integer orderStatus) {
        if(StringUtils.isNotEmpty(phone)){
@@ -3562,6 +3565,93 @@
        return R.ok();
    }
    @Override
    public R getCommunityList(String name,Long id) {
        //区级账号名
        String[] streetList={"bingcaogangjiedao","donghuajiedao","nongnongpingjiedao","dadukoujiedaojiedao","guazipingjiedao",
        "yinjiangzhen","qingxiangpingjiedao","yuquanjiedao","hemenkoujiedao","dabaodingjiedao","taojiadujiedao","gelipinzhen","dahezhonglujiedao",
        "jingjiangzhen","renhezhen","pingdizhen","datianzhen","tongdezhen","futianzhen","qianjinzhen","panlianzhen","binguzhen","baimazhen",
        "salianzhen","puweizhen","deshizhen","wanqiuyizuxiang","caochangzhen","xinshanlisuzuxiang","tongzilinzhen","yongxingzhen","yumenzhen",
        "honggezhen","hongguoyizuxiang"};
        List<Integer> ids = userDao.selectIdsByAccount(streetList);
        //村或社区账号
        Integer type=isVilliage(name);
        //是否为市级账号
        Boolean cityAccount = isCityAccount(name);
        if (cityAccount){
            List<Integer> areaList=areaCodeList();
            List<AreaVOS> areaVOList=new ArrayList<>();
            for (Integer code : areaList) {
                AreaVOS areaVO=new AreaVOS();
                areaVO.setId(code);
                areaVO.setName(areaCodeToName(code.longValue()));
                List<StreetVOS> streetVOS = userDao.selectStreetByAreaCode(code);
                Iterator<StreetVOS> iterator = streetVOS.listIterator();
                while (iterator.hasNext()){
                    StreetVOS vo = iterator.next();
                    List<CommunityVO> communityVOS = userDao.selectCommunityByStreetId(vo.getId(), type);
                    vo.setChildList(communityVOS);
                    if (type!=3){
                        if (communityVOS==null || communityVOS.size()==0){
                            iterator.remove();
                        }
                    }
                }
                areaVO.setChildList(streetVOS);
                areaVOList.add(areaVO);
            }
            return R.ok(areaVOList);
        }else{
            Boolean areaAccount = isAreaAccount(name);
            if (areaAccount){
                Integer areaCode = accountToCode(name);
                List<Integer> areaList=new ArrayList<>();
                areaList.add(areaCode);
                List<AreaVOS> areaVOList=new ArrayList<>();
                for (Integer code : areaList) {
                    AreaVOS areaVO=new AreaVOS();
                    areaVO.setId(code);
                    areaVO.setName(areaCodeToName(code.longValue()));
                    List<StreetVOS> streetVOS = userDao.selectStreetByAreaCode(code);
                    Iterator<StreetVOS> iterator = streetVOS.listIterator();
                    while (iterator.hasNext()){
                        StreetVOS vo = iterator.next();
                        List<CommunityVO> communityVOS = userDao.selectCommunityByStreetId(vo.getId(), type);
                        vo.setChildList(communityVOS);
                    }
                    areaVO.setChildList(streetVOS);
                    areaVOList.add(areaVO);
                }
                return R.ok(areaVOList);
            }else{
                //非区县账号,只看街道下属社区
                if (ArrayUtil.contains(streetList, name)){
                    List<StreetVOS> list=new ArrayList<>();
                    //只看当前街道下属社区
                    StreetVOS streetVOS = userDao.selectStreetByName(name);
                    List<CommunityVO> communityVOS = userDao.selectCommunityByStreetName(name);
                    if (org.apache.commons.lang3.ObjectUtils.isNotEmpty(streetVOS)) {
                        streetVOS.setChildList(communityVOS);
                    }
                    list.add(streetVOS);
                    return R.ok(list);
                }
            }
        }
        return R.ok(null);
    }
    @Override
    public R resetPassword(Integer type, String account) {
        SysUserDO sysUserDO=userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getAccount,account).eq(SysUserDO::getType,type));
        if(sysUserDO!=null){
            sysUserDO.setPassword("$2a$10$F/2lE2NMhKNHJfi5.FLmfu7jIr7ImRWgCTTeO6m3IRNR2V4sv8YR.");
            userDao.updateById(sysUserDO);
        }
        return R.ok();
    }
    @Override
    public R getAreaAndStreet() {
        List<Integer> areaCodeList=areaCodeList();
        List<AreaVO> areaVOList=new ArrayList<>();
@@ -3569,7 +3659,7 @@
            AreaVO vo=new AreaVO();
            vo.setId(code);
            vo.setName(areaCodeToName(code.longValue()));
            vo.setStreetList(userDao.selectStreetByAreaCode(code));
            vo.setStreetList(userDao.selectStreetsByAreaCode(code));
            areaVOList.add(vo);
        }
        return R.ok(areaVOList);
@@ -3701,6 +3791,9 @@
            case "510422":
                name="盐边县";
                break;
            case "510424":
                name="钒钛新区";
                break;
        }
        return name;
    }
@@ -3741,11 +3834,12 @@
     * */
    private List<Integer> areaCodeList(){
        List<Integer> list=new ArrayList<>();
        list.add(510423);
        list.add(510402);
        list.add(510423);
        list.add(510411);
        list.add(510421);
        list.add(510422);
        list.add(510424);
        return list;
    }
@@ -3768,6 +3862,73 @@
        return null;
    }
    /**
     * 是否需要区分村落/社区
     * */
    private Integer isVilliage(String name){
        if ("fangyipingtai".equals(name)){
            return 3;
        }else if ("pandashujuzhongxin".equals(name)){
            return 1;
        }else if ("pannongyenongcunju".equals(name)){
            return 2;
        }
        return 3;
    }
    /**
     * 是否为市级账号
     * */
    private Boolean isCityAccount(String name){
        if(("fangyipingtai").equals(name) || ("pandashujuzhongxin").equals(name) || ("pannongyenongcunju").equals(name)){
            return true;
        }
        return false;
    }
    /**
     * 是否为区级账号
     * */
    private Boolean isAreaAccount(String name){
        Boolean flag=false;
        switch (name){
            case "dongqu":
            case "xiqu":
            case "renhequ":
            case "miyixian":
            case "yanbianxian":
                flag=true;
                break;
        }
        return flag;
    }
    /**
     * account转区areaCode
     * */
    private  Integer accountToCode(String code){
        String name="100000";
        switch (code){
            case "xiqu" :
                name= "510423";
                break;
            case "dongqu":
                name="510402";
                break;
            case "renhequ":
                name="510411";
                break;
            case "miyixian":
                name="510421";
                break;
            case "yanbianxian":
                name="510422";
                break;
            case "fantaixinqu":
                name="510424";
                break;
        }
        return Integer.parseInt(name);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml
@@ -699,7 +699,10 @@
        </if>
    </select>
    <select id="selectStreetByAreaCode" resultType="com.panzhihua.common.model.vos.user.StreetVO">
    <select id="selectStreetByAreaCode" resultType="com.panzhihua.common.model.vos.user.StreetVOS">
        select street_id as id,name as name from com_street where area_code=#{code}
    </select>
    <select id="selectStreetsByAreaCode" resultType="com.panzhihua.common.model.vos.user.StreetVO">
        select street_id as id,name as name from com_street where area_code=#{code}
    </select>
    <select id="selectComActAcidCheckRecordById"
@@ -728,5 +731,34 @@
            and t.create_at >= #{range}
        </if>
    </select>
    <select id="selectCommunityByStreetId" resultType="com.panzhihua.common.model.vos.user.CommunityVO">
        select community_id as id,name from com_act where street_id =#{id}
        <if test="type == 1">
            and name like concat('%','社区')
        </if>
        <if test="type == 2">
            and name like concat('%','村')
        </if>
    </select>
    <select id="selectIdsByAccount" resultType="java.lang.Integer">
        select user_id from sys_user where account in
        <foreach collection="array" item="name" separator="," open="(" close=")" >
            #{name}
        </foreach>
    </select>
    <select id="selectCommunityByStreetName" resultType="com.panzhihua.common.model.vos.user.CommunityVO">
        select ca.community_id as id,ca.name as name
        from sys_user as su
        left join com_street as cs on cs.name=su.name
        left join com_act as ca on ca.street_id=cs.street_id
        where su.account=#{name}
    </select>
    <select id="selectStreetByName" resultType="com.panzhihua.common.model.vos.user.StreetVOS">
        select cs.street_id as id,cs.name as name
        from sys_user as su
        left join com_street as cs on su.name=cs.name
        where su.account=#{name}
        limit 1
    </select>
</mapper>