101captain
2022-06-21 47589b52112f37e4366f96a7f13c6d99bbacdc77
Merge branch 'huacheng' into huacheng_test

# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java
12个文件已修改
95 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/config/MinioUtil.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java 32 ●●●●● 补丁 | 查看 | 原始文档 | 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/vos/community/acid/ComActAcidRecordExcelReturn.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/acid/ComActAcidRecordExcelVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/acid/ComActAcidRecordTimeVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/acid/ComActAcidRecordVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingMemberVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActAcidRecord.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbMemberMapper.xml 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/config/MinioUtil.java
@@ -1,5 +1,6 @@
package com.panzhihua.applets.config;
import com.panzhihua.common.utlis.DateUtils;
import io.minio.MinioClient;
import io.minio.ObjectStat;
import org.apache.commons.io.IOUtils;
@@ -80,9 +81,8 @@
    public String uploadFile(File file, String name) {
        if (null != file) {
            try {
                UUID uuid = UUID.randomUUID();
                StringBuilder s = new StringBuilder();
                s.append(uuid.toString().replace("-", "")).append("/");
                s.append(DateUtils.getCurrentDateyymd()).append("/");
                MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(),
                        minioProperties.getSecretKey());
                // bucket 不存在,创建
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java
@@ -54,6 +54,7 @@
        // 获取表单输入中返回的用户名
        String userName = (String)authentication.getPrincipal();
        String password =(String)authentication.getCredentials();
        if(!userName.contains("_1")){
        try {
            password = MyAESUtil.Decrypt((String)authentication.getCredentials(),"Ryo7M3n8loC5Abcd");
        } catch (Exception e) {
@@ -98,6 +99,37 @@
        userService.putUserLastLoginTime(loginUserInfoVO.getUserId());
        return new UsernamePasswordAuthenticationToken(loginUserInfoVO, password, grantedAuthorityList);
    }
        else {
            // 查询用户是否存在
            R<LoginUserInfoVO> r = userService.getUserInfo(userName);
            if (r.getCode() != 200) {
                throw new UsernameNotFoundException("该账号不存在");
            }
            LoginUserInfoVO loginUserInfoVO = r.getData();
            List<GrantedAuthority> grantedAuthorityList = new ArrayList<>();
            Set<String> roles = loginUserInfoVO.getRoles();
            if (!ObjectUtils.isEmpty(roles)) {
                roles.forEach(s -> {
                    grantedAuthorityList.add(new SimpleGrantedAuthority(s));
                });
            }
            if (ObjectUtils.isEmpty(loginUserInfoVO.getAccount())) {
                throw new UsernameNotFoundException("该账号不存在");
            }
            // 我们还要判断密码是否正确,这里我们的密码使用BCryptPasswordEncoder进行加密的
            if (!new BCryptPasswordEncoder().matches(password, loginUserInfoVO.getPassword())) {
                throw new BadCredentialsException("密码不正确");
            }
            // 还可以加一些其他信息的判断,比如用户账号已停用等判断
            if (loginUserInfoVO.getStatus().intValue() == 2) {
                throw new LockedException("该用户已被禁用");
            }
            // 维护最后登录时间
            userService.putUserLastLoginTime(loginUserInfoVO.getUserId());
            return new UsernamePasswordAuthenticationToken(loginUserInfoVO, password, grantedAuthorityList);
        }
    }
    @Override
    public boolean supports(Class<?> aClass) {
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/common/PageComPbCheckUnitDto.java
@@ -87,5 +87,8 @@
    @ApiModelProperty(value = "技能特长")
    private String specialtyName;
    @ApiModelProperty("区级")
    private String belongTo;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/acid/ComActAcidRecordExcelReturn.java
@@ -137,9 +137,11 @@
    @ExcelProperty("是否核对")
    private Integer checkStatus;
    @ApiModelProperty("是否特殊职业")
    @ExcelProperty("是否特殊职业")
    private String isSpecialJob;
    @ApiModelProperty("户籍地")
    @ExcelProperty("户籍地")
    private String registerResidence;
    @ExcelProperty("是否为入(返)川学生")
    private String isStudent;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/acid/ComActAcidRecordExcelVO.java
@@ -134,4 +134,7 @@
    @ExcelProperty("是否冷链、运输、海口等特殊行业从业者")
    private String isSpecialJob;
    @ExcelProperty("是否为入(返)川学生")
    private String isStudent;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/acid/ComActAcidRecordTimeVO.java
@@ -165,6 +165,9 @@
    @ApiModelProperty("户籍地")
    private String registerResidence;
    @ApiModelProperty("是否学生")
    private String isStudent;
    public interface type{
        int zj=1;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/acid/ComActAcidRecordVO.java
@@ -183,6 +183,10 @@
    @ApiModelProperty("户籍地")
    private String registerResidence;
    @ApiModelProperty("是否学生")
    private String isStudent;
    @ApiModelProperty("修改记录")
    private List<ComActAcidUpdateRecordVO> comActAcidUpdateRecordVOList;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingMemberVO.java
@@ -129,4 +129,6 @@
    private String unitHelpCommunityContacts;
    @ApiModelProperty(value = "帮扶社区联系人")
    private String unitHelpCommunityContactsName;
    @ApiModelProperty("区级")
    private String belongTo;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActAcidRecord.java
@@ -190,4 +190,6 @@
    @ApiModelProperty("户籍地")
    private String registerResidence;
    private String isStudent;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java
@@ -379,6 +379,9 @@
        String dangerArea = comActAcidRecordVO.getDangerArea();
        String outsideCity = comActAcidRecordVO.getOutsideCity();
        String acidTest = comActAcidRecordVO.getAcidTest();
        if(StringUtils.isEmpty(acidTest)){
            acidTest="阴性";
        }
        if (StringUtils.inStringIgnoreCase(colorMark, "红码", "黄码") || travelCard.equals("是") || dangerArea.equals("是")
            || outsideCity.equals("是") || acidTest.equals("阳性")) {
            // 风险人员
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml
@@ -37,7 +37,7 @@
                and cpcu.community_id = #{dto.communityId}
            </if>
            <if test="dto.keyWord != null and dto.keyWord != ''">
                and (cpcu.contacts like concat(#{dto.keyWord},'%') or cpcu.`name` like concat('%',#{dto.name},'%') or cpcu.phone like concat(#{dto.keyWord},'%'))
                and (cpcu.contacts like concat(#{dto.keyWord},'%') or cpcu.`name` like concat('%',#{dto.keyWord},'%') or cpcu.phone like concat(#{dto.keyWord},'%'))
            </if>
            <if test="dto.name != null and dto.name != ''">
                and cpcu.`name` like concat('%',#{dto.name},'%')
@@ -46,7 +46,10 @@
                and cpcu.`contacts` like concat(#{dto.contacts},'%')
            </if>
            <if test="dto.specialtyName != null and dto.specialtyName != ''">
                and cpcu.specialty_name like concat(#{dto.specialtyName},'%')
                and cpcu.specialty_name like concat('%',#{dto.specialtyName},'%')
            </if>
            <if test="dto.belongTo != null and dto.belongTo != ''">
                and cpcu.belong_to =#{dto.belongTo}
            </if>
        </where>
        order by cpcu.create_at desc
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbMemberMapper.xml
@@ -53,19 +53,13 @@
    <select id="queryAllByLimit" resultType="com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO">
        select
        m.id, m.org_id, m.name, m.id_card, m.photo_path, m.join_time, m.employment_time, m.audit_result, m.create_at, m.update_at,
        m.community_id, u.user_id, m.refuse_reason, m.phone, m.type, m.position, m.check_unit_id, m.function, m.specialty_category,
        m.community_id, m.user_id, m.refuse_reason, m.phone, m.type, m.position, m.check_unit_id, m.function, m.specialty_category,
        m.specialty_name, m.position_two, m.org_name,cpcu.name as checkUnitName,t2.partyTime,t2.partyInterval,cmv.name as villageName,ca.name as communityName,
        TIMESTAMPDIFF(
        YEAR,
        m.employment_time,
        DATE_FORMAT( NOW(), '%Y-%m-%d' )) as partyAge,
        CASE
        WHEN u.id_card IS NULL THEN
        '未注册' ELSE '已注册'
        END status
        DATE_FORMAT( NOW(), '%Y-%m-%d' )) as partyAge
        from com_pb_member as m
        LEFT JOIN sys_user u ON m.id_card = u.id_card and u.type = 1
        LEFT JOIN com_pb_org o ON m.org_id = o.id
        LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id
        LEFT JOIN com_mng_village cmv on m.village_id = cmv.village_id
@@ -74,7 +68,7 @@
        <if test="dto.startTime !=null">
            and t.begin_at between #{dto.startTime} and #{dto.endTime}
        </if>
        GROUP BY t1.user_id ) t2 on u.user_id = t2.user_id
        GROUP BY t1.user_id ) t2 on m.user_id = t2.user_id
        <where>
            and m.audit_result = 1
            <if test='dto.orgName != null and dto.orgName != &quot;&quot;'>
@@ -84,7 +78,7 @@
               and o.id = #{dto.orgId}
            </if>
            <if test='dto.account != null and dto.account != &quot;&quot;'>
                and u.phone like concat (#{dto.account},'%')
                and m.phone like concat (#{dto.account},'%')
            </if>
            <if test='dto.name != null and dto.name != &quot;&quot;'>
                and m.name like concat (#{dto.name},'%')
@@ -96,9 +90,9 @@
                and m.community_id = ${dto.communityId}
            </if>
            <if test="dto.keyWord != null and dto.keyWord != ''">
                and (m.name like concat (#{dto.keyWord},'%') or
                m.phone like concat (#{dto.keyWord},'%') or
                cpcu.name like concat (#{dto.keyWord},'%') or o.name like concat (#{dto.keyWord},'%')
                and (m.name like concat ('%',#{dto.keyWord},'%') or
                m.phone like concat ('%',#{dto.keyWord},'%') or
                cpcu.name like concat ('%',#{dto.keyWord},'%') or ca.name like concat ('%',#{dto.keyWord},'%')
                )
            </if>
            <if test="dto.type != null">
@@ -727,7 +721,8 @@
               t1.phone as helpCommunityContacts,
               t4.name           as communityName,
               t1.address,
               t1.village_name as unitVillageName
               t1.village_name as unitVillageName,
               t1.belong_to
        from com_pb_member t
                 left join com_pb_check_unit t1 on t.check_unit_id = t1.id
                 left join com_mng_village t2 on t.village_id = t2.village_id
@@ -745,7 +740,8 @@
               t1.phone as helpCommunityContacts,
               t4.name           as communityName,
               t1.address,
               t1.village_name as unitVillageName
               t1.village_name as unitVillageName,
               t1.belong_to
        from com_pb_member t
                 left join com_pb_check_unit t1 on t.check_unit_id = t1.id
                 left join com_mng_village t2 on t.village_id = t2.village_id