Pu Zhibing
2025-03-17 7f302004e78ca5220a4f88a7fab843964a18739a
Merge remote-tracking branch 'origin/dev-2.0' into dev-2.0
23个文件已修改
3个文件已添加
796 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/.idea/jarRepositories.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtPartyMemberController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/ProblemTypeController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/BcRegionController.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/PartyMemberController.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/conveter/EConverter.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/ComplaintMapper.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/enums/ComplaintExportEnum.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/enums/ProcessStatusEnum.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/PartyMember.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/excel/ComplaintExcel.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IBcRegionService.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/BcRegionServiceImpl.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/utils/SignatureUtil.java 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/IdentityInformationVO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MgtComplaintQuery.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberApplicationRequest.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberDTO.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberQuery.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/SignatureVO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml 270 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/PartyMemberMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/.idea/jarRepositories.xml
@@ -4,12 +4,12 @@
    <remote-repository>
      <option name="id" value="central" />
      <option name="name" value="Central Repository" />
      <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
      <option name="url" value="https://repo.maven.apache.org/maven2" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="central" />
      <option name="name" value="Central Repository" />
      <option name="url" value="https://repo.maven.apache.org/maven2" />
      <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="releases" />
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtPartyMemberController.java
@@ -107,7 +107,7 @@
        }
    }
    @ApiOperation("审核")
    @GetMapping("/audit/{id}")
    @PostMapping("/audit")
    public R<?> audit(@RequestBody PartyMemberDTO dto) {
        SystemUserVo loginUserInfo = getLoginUserInfoSanGeShenBian();
        partyMemberService.audit(dto,loginUserInfo);
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/ProblemTypeController.java
@@ -18,6 +18,7 @@
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
 * @author zhibing.pu
@@ -112,4 +113,10 @@
        ProblemType problemType = problemTypeService.getById(id);
        return R.ok(problemType);
    }
    @ApiOperation(value = "获取问题类型列表(不分页)")
    @GetMapping("/list-no-page")
    public R<List<ProblemType>> listNoPage(){
        List<ProblemType> list = problemTypeService.list(new LambdaQueryWrapper<ProblemType>().eq(ProblemType::getDel, 0));
        return R.ok(list);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java
@@ -1,5 +1,10 @@
package com.panzhihua.sangeshenbian.api;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.panzhihua.common.controller.BaseController;
@@ -8,6 +13,8 @@
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo;
import com.panzhihua.common.service.auth.TokenService;
import com.panzhihua.common.utlis.HttpClientUtil;
import com.panzhihua.common.utlis.ServletUtils;
import com.panzhihua.sangeshenbian.model.entity.SystemMenu;
import com.panzhihua.sangeshenbian.model.entity.SystemRoleMenu;
import com.panzhihua.sangeshenbian.model.entity.SystemUser;
@@ -15,21 +22,26 @@
import com.panzhihua.sangeshenbian.service.ISystemMenuService;
import com.panzhihua.sangeshenbian.service.ISystemRoleMenuService;
import com.panzhihua.sangeshenbian.service.ISystemUserService;
import com.panzhihua.sangeshenbian.warpper.LoginVo;
import com.panzhihua.sangeshenbian.warpper.SystemUserList;
import com.panzhihua.sangeshenbian.warpper.SystemUserListVo;
import com.panzhihua.sangeshenbian.warpper.TokenVo;
import com.panzhihua.sangeshenbian.utils.SignatureUtil;
import com.panzhihua.sangeshenbian.warpper.*;
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.apache.commons.codec.digest.DigestUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.security.MessageDigest;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.*;
import java.util.concurrent.TimeUnit;
@@ -44,28 +56,28 @@
@RestController
@RequestMapping("/systemUser")
public class SystemUserController extends BaseController {
    @Resource
    private ISystemUserService systemUserService;
    @Resource
    private RedisTemplate redisTemplate;
    @Resource
    private TokenService tokenService;
    private final Integer max_err = 5;
    @Resource
    private ISystemRoleMenuService systemRoleMenuService;
    @Resource
    private ISystemMenuService systemMenuService;
    @PostMapping("/login")
    @ApiOperation(value = "登录", tags = {"三个身边后台-登录"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "登录")
@@ -99,7 +111,7 @@
        LoginReturnVO loginReturnVO = reult.getData();
        TokenVo tokenVo = new TokenVo();
        BeanUtils.copyProperties(loginReturnVO, tokenVo);
        List<SystemRoleMenu> list = systemRoleMenuService.list(new LambdaQueryWrapper<SystemRoleMenu>().eq(SystemRoleMenu::getSystemRoleId, systemUser.getSystemRoleId()));
        List<Integer> collect = list.stream().map(SystemRoleMenu::getSystemMenuId).collect(Collectors.toList());
        Set<String> collect1 = new HashSet<>();
@@ -170,8 +182,8 @@
        }
        return R.ok(tokenVo);
    }
    @PostMapping("logout")
    @ApiOperation(value = "退出登录", tags = {"三个身边后台-登录"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "退出登录")
@@ -182,8 +194,8 @@
        }
        return tokenService.logout(token);
    }
    @GetMapping("/list")
    @ApiOperation(value = "获取列表数据", tags = {"三个身边管理后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "获取人员管理列表数据")
@@ -193,9 +205,9 @@
        IPage<SystemUserListVo> list = systemUserService.list(user, query);
        return R.ok(list);
    }
    @PostMapping("/add")
    @ApiOperation(value = "添加人员", tags = {"三个身边管理后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 1,businessType = "添加人员")
@@ -220,8 +232,8 @@
        systemUserService.save(systemUser);
        return R.ok();
    }
    @PostMapping("/edit")
    @ApiOperation(value = "编辑人员", tags = {"三个身边后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 2,businessType = "编辑人员")
@@ -236,8 +248,8 @@
        systemUserService.updateById(systemUser);
        return R.ok();
    }
    @DeleteMapping("/delete/{id}")
    @ApiOperation(value = "删除人员", tags = {"三个身边后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 3,businessType = "删除人员")
@@ -247,8 +259,8 @@
        systemUserService.updateById(systemUser);
        return R.ok();
    }
    @GetMapping("/getSystemUserInfo/{id}")
    @ApiOperation(value = "查询人员详情", tags = {"三个身边后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "查询人员详情")
@@ -256,8 +268,8 @@
        SystemUser systemUser = systemUserService.getById(id);
        return R.ok(systemUser);
    }
    @PutMapping("/freeze/{id}")
    @ApiOperation(value = "冻结账号", tags = {"三个身边后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 2,businessType = "冻结账号")
@@ -270,8 +282,8 @@
        systemUserService.updateById(systemUser);
        return R.ok();
    }
    @PutMapping("/unfreeze/{id}")
    @ApiOperation(value = "解冻账号", tags = {"三个身边后台-人员管理"})
    @OperLog(operModul = "三个身边后台",operType = 2,businessType = "解冻账号")
@@ -284,8 +296,8 @@
        systemUserService.updateById(systemUser);
        return R.ok();
    }
    /**
     * 根据用户id获取信息
     * @param id
@@ -306,9 +318,9 @@
        BeanUtils.copyProperties(systemUser, systemUserVo);
        return R.ok(systemUserVo);
    }
    @GetMapping("/getAdministrativeDivision/{id}/{tier}")
    @ApiOperation(value = "获取行政区划层级联动数据", tags = {"三个身边后台-人员管理"})
    @ApiImplicitParams({
@@ -340,4 +352,32 @@
        List<RegionVO> list = systemUserService.getRegionTree(loginUserInfo);
        return R.ok(list);
    }
    @GetMapping("/getSignature")
    @ApiOperation(value = "获取签名",tags = {"三个身边小程序"})
    public R<?> getSignature() throws Exception {
        String APP_ID = "wx118de8a734d269f0";
        String APP_SECRET = "0264342daefde5cd70a6adada09ee5b1";
        String accessToken = SignatureUtil.getAccessToken(APP_ID, APP_SECRET);
        String jsapiTicket = SignatureUtil.getJsApiTicket(accessToken);
        String nonceStr = UUID.randomUUID().toString().replace("-", "");
        String timestamp = String.valueOf(System.currentTimeMillis() / 1000);
        String url = "https://huacheng.psciio.com/web/sangeshenbian/"; // 当前页面的URL,不包含#及其后面部分
        String signature = SignatureUtil.getSignature(jsapiTicket, nonceStr, timestamp, url);
        System.out.println("appId: " + APP_ID);
        System.out.println("timestamp: " + timestamp);
        System.out.println("nonceStr: " + nonceStr);
        System.out.println("signature: " + signature);
        SignatureVO signatureVO = new SignatureVO();
        signatureVO.setTimestamp(timestamp);
        signatureVO.setNonceStr(nonceStr);
        signatureVO.setSignature(signature);
        return R.ok(signatureVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/BcRegionController.java
@@ -1,9 +1,19 @@
package com.panzhihua.sangeshenbian.controller;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.sangeshenbian.model.vo.RegionVO;
import com.panzhihua.sangeshenbian.service.IBcRegionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.chanjar.weixin.common.annotation.Required;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * <p>
@@ -13,8 +23,15 @@
 * @author 
 * @since 2025-02-23
 */
@Api(tags = {"行政区划管理相关接口"})
@RestController
@RequestMapping("/bc-region")
@RequiredArgsConstructor
public class BcRegionController {
    private final IBcRegionService bcRegionService;
    @GetMapping("/regionTree-applet")
    @ApiOperation(value = "获取区县-街道-社区树")
    public R<List<RegionVO>> regionTree() {
        return R.ok(bcRegionService.regionTree());
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java
@@ -133,8 +133,14 @@
            identityInformationVO.setIsFrozen(systemUser.getStatus() == 2);
        }
        identityInformationVO.setIdentity(identity);
        identityInformationVO.setIsPartymember(partyMember != null);
        if (identity == null && systemUser != null){
            identityInformationVO.setIdentity(2);
        }else {
            identityInformationVO.setIdentity(identity);
        }
        identityInformationVO.setIsPartymember(partyMember != null && partyMember.getAuditStatus().equals(1));
        identityInformationVO.setIsConfirm(partyMember != null && partyMember.getIsConfirm() == 1);
        identityInformationVO.setAuditStatus(partyMember == null ? null : partyMember.getAuditStatus());
        if (partyMember !=null){
            permissions.add(1);
@@ -146,6 +152,7 @@
        return R.ok(identityInformationVO);
    }
    /**
     * 切换身份
     */
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/PartyMemberController.java
@@ -1,8 +1,10 @@
package com.panzhihua.sangeshenbian.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.sangeshenbian.model.entity.PartyMember;
import com.panzhihua.sangeshenbian.service.IPartyMemberService;
@@ -14,8 +16,10 @@
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Lazy;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@@ -24,7 +28,8 @@
@Api(tags = {"小程序-党员管理"})
@Validated
@RestController("/applet/party-member")
@RestController
@RequestMapping("/applet/party-member")
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
public class PartyMemberController extends BaseController {
    private final IPartyMemberService partyMemberService;
@@ -59,8 +64,11 @@
     */
    @ApiOperation(value = "党员信息详情")
    @PostMapping("/detail")
    public R<?> detail(@RequestParam Long id) {
        return R.ok(partyMemberService.getById(id));
    public R<?> detail() {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        String phone = loginUserInfo.getPhone();
        return R.ok(partyMemberService.getOne(new LambdaUpdateWrapper<PartyMember>()
                .eq(PartyMember::getPhone, phone)));
    }
    /**
@@ -92,5 +100,25 @@
        return R.ok();
    }
    /**
     * 确认党员信息
     */
    @GetMapping("/confirm-party-member-info")
    @ApiOperation("确认党员信息")
    public R<?> confirmPartyMemberInfo() {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        // 获取党员信息
        PartyMember partyMember = partyMemberService.getOne(new LambdaQueryWrapper<PartyMember>()
                .eq(PartyMember::getPhone, loginUserInfo.getPhone())
                .eq(PartyMember::getDelFlag, 0));
        if (partyMember == null){
            return R.fail("请先完善党员信息");
        }
        partyMember.setIsConfirm(1);
        partyMemberService.updateById(partyMember);
        return R.ok();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/conveter/EConverter.java
@@ -6,6 +6,7 @@
import cn.idev.excel.metadata.data.WriteCellData;
import cn.idev.excel.metadata.property.ExcelContentProperty;
import com.panzhihua.sangeshenbian.annotation.FastExcel;
import com.panzhihua.sangeshenbian.annotation.TargetEnum;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
@@ -32,9 +33,9 @@
        //获取字段属性中的注解
        Field field = contentProperty.getField();
        //获取该字段所属枚举
        FastExcel fastExcel = field.getAnnotation(FastExcel.class);
        TargetEnum targetEnum = field.getAnnotation(TargetEnum.class);
        //获取注解中的枚举信息
        Class<? extends Enum> type = fastExcel.type();
        Class<? extends Enum> type = targetEnum.type();
        //获取枚举类的方法名 “getEnumByCode”就是自己编写的函数,Integer.class 指定入参类型
        Method codeOf = type.getMethod("getEnumByCode", Integer.class);
        //反射执行方法,此方法得到的是一个枚举实例(具体得到什么,结合自身项目)
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/ComplaintMapper.java
@@ -80,5 +80,12 @@
     * @param query
     * @param loginUserInfo
     */
    List<ComplaintVO> getList(MgtComplaintQuery query, SystemUserVo loginUserInfo);
    List<ComplaintVO> getList( @Param("query") MgtComplaintQuery query, @Param("loginUserInfo") SystemUserVo loginUserInfo);
    /**
     * 管理后台-获取诉求详情
     * @param id
     * @return
     */
    ComplaintVO getDetailBg(Long id);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/enums/ComplaintExportEnum.java
New file
@@ -0,0 +1,25 @@
package com.panzhihua.sangeshenbian.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum ComplaintExportEnum {
    PROCESSING(0, "正在办理"),
    EXTENDED(1, "延期办理"),
    OVERDUE(2, "超时办理"),
    COMPLETED(3, "已办结"),
    REPORT_PENDING_AUDIT(4, "上报待审核");
    private final Integer code;
    private final String desc;
    public static ComplaintExportEnum getEnumByCode(Integer code) {
        for (ComplaintExportEnum e : ComplaintExportEnum.values()) {
            if (e.code.equals(code)) {
                return e;
            }
        }
        return null;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/enums/ProcessStatusEnum.java
@@ -5,7 +5,8 @@
    PROCESSING(0, "正在办理"),
    EXTENDED(1, "延期办理"),
    OVERDUE(2, "超时办理"),
    COMPLETED(3, "已办结");
    COMPLETED(3, "已办结"),
    REPORT_PENDING_AUDIT(4, "上报待审核");
    private final int code;
    private final String description;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/PartyMember.java
@@ -70,6 +70,7 @@
    private String community;
    @ApiModelProperty(value = "社区ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long communityId;
    @ApiModelProperty(value = "服务对象")
@@ -87,6 +88,9 @@
    @ApiModelProperty(value = "冻结状态 1:已冻结 0:正常中")
    private Integer freezeStatus;
    @ApiModelProperty(value = "是否确认党员信息")
    private Integer isConfirm;
    @ApiModelProperty(value = "拒绝理由")
    private String refuseReason;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/excel/ComplaintExcel.java
@@ -1,6 +1,10 @@
package com.panzhihua.sangeshenbian.model.excel;
import cn.idev.excel.annotation.ExcelProperty;
import com.panzhihua.sangeshenbian.annotation.TargetEnum;
import com.panzhihua.sangeshenbian.conveter.EConverter;
import com.panzhihua.sangeshenbian.enums.ComplaintExportEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@@ -14,10 +18,10 @@
@Data
public class ComplaintExcel {
    @ExcelProperty(value = "录入人")
    private String nickname;
    private String reportUserName;
    @ExcelProperty(value = "录入人联系方式")
    private String phone;
    private String reportUserPhone;
    @ExcelProperty(value = "群众姓名")
    private String name;
@@ -40,6 +44,7 @@
    @ExcelProperty(value = "详细地址描述")
    private String detailedAddress;
    @ExcelProperty(value = "流转状态:0-正在办理 1-延期办理 2-超时办理 3-已办结 4-群众撤销 5-上报待审核 6-上级驳回 7-延期待审核")
    @ExcelProperty(value = "状态",converter = EConverter.class)
    @TargetEnum(type = ComplaintExportEnum.class)
    private Integer status;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IBcRegionService.java
@@ -2,6 +2,9 @@
import com.panzhihua.sangeshenbian.model.entity.BcRegion;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.sangeshenbian.model.vo.RegionVO;
import java.util.List;
/**
 * <p>
@@ -18,4 +21,12 @@
     * @return
     */
    BcRegion getDistrictByName(String districtName);
    BcRegion getDistrictByCode(String districtCode);
    /**
     * 获取区县-街道-社区树
     * @return
     */
    List<RegionVO> regionTree();
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/BcRegionServiceImpl.java
@@ -1,10 +1,16 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.panzhihua.sangeshenbian.dao.SystemUserMapper;
import com.panzhihua.sangeshenbian.model.entity.BcRegion;
import com.panzhihua.sangeshenbian.dao.BcRegionMapper;
import com.panzhihua.sangeshenbian.model.vo.RegionVO;
import com.panzhihua.sangeshenbian.service.IBcRegionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * <p>
@@ -15,7 +21,9 @@
 * @since 2025-02-23
 */
@Service
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
public class BcRegionServiceImpl extends ServiceImpl<BcRegionMapper, BcRegion> implements IBcRegionService {
    private final SystemUserMapper systemUserMapper;
    /**
     * 判断区县是否存在
     * @param districtName
@@ -26,6 +34,29 @@
        return this.lambdaQuery()
                .eq(BcRegion::getRegionName, districtName)
                .eq(BcRegion::getDeleteFlag, 0)
                .eq(BcRegion::getHierarchyOrder, 2).last("LIMIT 1").one();
                .eq(BcRegion::getHierarchyOrder, 3).last("LIMIT 1").one();
    }
    @Override
    public BcRegion getDistrictByCode(String districtCode) {
        return this.lambdaQuery().eq(BcRegion::getRegionCode, districtCode).last("LIMIT 1").one();
    }
    /**
     * 获取区县-街道-社区树
     * @return
     */
    @Override
    public List<RegionVO> regionTree() {
        List<RegionVO> regionTree = systemUserMapper.getRegion("510400");
        systemUserMapper.getStreet("510400");
        regionTree.forEach(district -> {
            List<RegionVO> streets = systemUserMapper.getStreet(district.getId());
            district.setChildren(streets);
            streets.forEach(street -> {
                List<RegionVO> communities = systemUserMapper.getCommunity(street.getId());
                street.setChildren(communities);
            });
        });
        return regionTree;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -112,7 +112,7 @@
        Integer accountLevel = 5;
        //获取当前身份,1=党员,2=管理员
        Integer identity = (Integer) redisUtils.get("identity:" + loginUserInfoVO.getPhone());
        if (systemUserOpt.isPresent() && identity == 2) {
        if (systemUserOpt.isPresent() && null != identity && identity == 2) {
            SystemUser systemUser = systemUserOpt.get();
            accountLevel = systemUser.getAccountLevel();
            switch (accountLevel) {
@@ -201,7 +201,7 @@
        //获取当前身份,1=党员,2=管理员
        Integer identity = (Integer) redisUtils.get("identity:" + loginUserInfoVO.getPhone());
        //上级
        if (systemUserByPhone.isPresent() && identity == 2) {
        if (systemUserByPhone.isPresent() && null != identity && identity == 2) {
            SystemUser systemUser = systemUserByPhone.get();
            accountLevel = systemUser.getAccountLevel();
            switch (accountLevel) {
@@ -954,22 +954,22 @@
        response.setCharacterEncoding("utf-8");
        String fileName = URLEncoder.encode("诉求数据", "UTF-8").replaceAll("\\+", "%20");
        response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
        EasyExcel.write(response.getOutputStream(), PartyMemberExcel.class)
        EasyExcel.write(response.getOutputStream(), ComplaintExcel.class)
                .sheet("诉求数据")
                .doWrite(complaintExcels);
    }
    @Override
    public void downloadFile(Long id,Integer type) throws IOException {
        Complaint complaint = getById(id);
        Complaint complaint = baseMapper.getDetailBg(id);
        if (Objects.isNull(complaint)) {
            throw new ServiceException("该诉求不存在");
        }
         //查询社区信息
        BcRegion region = bcRegionService.lambdaQuery().eq(BcRegion::getRegionCode, complaint.getDistrictsCode()).last("LIMIT 1").one();
        ComStreet street = comStreetService.lambdaQuery().eq(ComStreet::getStreetId, complaint.getStreetId()).one();
        ComAct act = comActService.lambdaQuery().eq(ComAct::getCommunityId, complaint.getCommunityId()).one();
        String community = region.getRegionName() +"-"+ street.getName() + act.getName();
        BcRegion region = bcRegionService.getDistrictByCode(complaint.getDistrictsCode().toString());
        ComStreet street = comStreetService.getById(complaint.getStreetId().toString());
        ComAct act = comActService.getById(complaint.getCommunityId());
        String community = region.getRegionName() +"-"+ street.getName() + "-"+ act.getName();
        PartyMember partyMember = null;
        if (Objects.nonNull(complaint.getPartyMemberId())){
             partyMember = partyMemberService.getById(complaint.getPartyMemberId());
@@ -993,12 +993,12 @@
        map.put("community", community);
        map.put("problemType", complaint.getProblemType());
        map.put("descriptionContent", complaint.getDescriptionContent());
        map.put("reportType", Objects.nonNull(complaint.getPartyMemberId())?"党员": "上级"); //TODO待修改
        map.put("reportType", ReportTypeEnum.fromCode(complaint.getReportType()).getDescription());
        map.put("partyOrganization",Objects.nonNull(partyMember)? partyMember.getPartyOrganization() : "");
        map.put("name", complaint.getName());
        map.put("contactNumber", complaint.getContactNumber());
        map.put("nickname", Objects.nonNull(partyMember)? partyMember.getName() : "");
        map.put("phone", Objects.nonNull(partyMember)? partyMember.getPhone() : "");
        map.put("nickname", complaint.getReportUserName());
        map.put("phone", complaint.getReportUserPhone());
        List<ComplaintProgress> list = complaintProgressService.lambdaQuery().eq(ComplaintProgress::getComplaintId, id).orderByAsc(ComplaintProgress::getCreateTime).list();
        StringBuilder sb = new StringBuilder();
        if (CollUtil.isNotEmpty(list)) {
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java
@@ -1,55 +1,36 @@
package com.panzhihua.sangeshenbian.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.idev.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import cn.idev.excel.FastExcel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.exceptions.ServiceException;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.exceptions.ServiceException;
import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo;
import com.panzhihua.common.redis.RedisUtils;
import com.panzhihua.sangeshenbian.dao.PartyMemberMapper;
import com.panzhihua.sangeshenbian.enums.AuditStatusEnum;
import com.panzhihua.sangeshenbian.enums.FreezeStatusEnum;
import com.panzhihua.sangeshenbian.enums.ReportTypeEnum;
import com.panzhihua.sangeshenbian.enums.AuditStatusEnum;
import com.panzhihua.sangeshenbian.model.entity.BcRegion;
import com.panzhihua.sangeshenbian.model.entity.ComAct;
import com.panzhihua.sangeshenbian.model.entity.ComStreet;
import com.panzhihua.sangeshenbian.model.entity.PartyMember;
import com.panzhihua.sangeshenbian.model.entity.SystemUser;
import com.panzhihua.sangeshenbian.model.entity.*;
import com.panzhihua.sangeshenbian.model.excel.PartyMemberExcel;
import com.panzhihua.sangeshenbian.warpper.PartyMemberImportFailedVO;
import com.panzhihua.sangeshenbian.model.excel.PartyMemberTemplate;
import com.panzhihua.sangeshenbian.service.IBcRegionService;
import com.panzhihua.sangeshenbian.service.IComActService;
import com.panzhihua.sangeshenbian.service.IComStreetService;
import com.panzhihua.sangeshenbian.service.IPartyMemberService;
import com.panzhihua.sangeshenbian.service.ISystemUserService;
import com.panzhihua.sangeshenbian.warpper.PartyMemberApplicationRequest;
import com.panzhihua.sangeshenbian.warpper.PartyMemberDTO;
import com.panzhihua.sangeshenbian.warpper.PartyMemberQuery;
import com.panzhihua.sangeshenbian.warpper.PendingPartyMemberApplicationVO;
import com.panzhihua.sangeshenbian.service.*;
import com.panzhihua.sangeshenbian.warpper.*;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.*;
/**
 * <p>
@@ -67,6 +48,7 @@
    private final IBcRegionService bcRegionService;
    private final IComStreetService comStreetService;
    private final IComActService comActService;
    private final RedisUtils redisUtils;
    /**
     * 党员分页查询列表
     *
@@ -88,10 +70,23 @@
        PartyMember partyMember = BeanUtil.copyProperties(dto, PartyMember.class);
        String idNumber = dto.getIdNumber();
        partyMember.setGender(getGender(idNumber));
        BcRegion districtByCode = bcRegionService.getDistrictByCode(dto.getDistrictsCode());
        if (Objects.nonNull(districtByCode)){
            partyMember.setDistricts(districtByCode.getRegionName());
        }
        ComStreet street = comStreetService.getById(dto.getStreetId());
        if (Objects.nonNull(street)){
            partyMember.setStreet(street.getName());
        }
        ComAct act = comActService.getById(dto.getCommunityId());
        if (Objects.nonNull(act)){
            partyMember.setCommunity(act.getName());
        }
        if (Objects.isNull(dto.getId())) {
            //添加
            partyMember.setCreateBy(Long.parseLong(loginUserInfo.getId().toString()));
            partyMember.setAuditStatus(AuditStatusEnum.APPROVED.getCode());
            partyMember.setFreezeStatus(FreezeStatusEnum.NORMAL.getCode());
            partyMember.setSource(1);
            save(partyMember);
        } else {
@@ -233,11 +228,12 @@
                            // 验证社区是否存在且属于该街道
                            // 实际代码应该是调用相应的Service查询社区信息
                            ComAct comAct = comActService.getCommunityByNameAndStreet(communityName, comStreet.getStreetId());
                            streetId = comStreet.getStreetId();
                            communityId = comAct.getCommunityId();
                            if (Objects.isNull(comAct)) {
                                isValid = false;
                                errorMsg.append("社区不存在或不属于所选街道; ");
                            } else {
                                streetId = comStreet.getStreetId();
                                communityId = comAct.getCommunityId();
                            }
                        }
                    }
@@ -327,10 +323,18 @@
                .eq(SystemUser::getPhone, loginUserInfo.getPhone())
                .eq(SystemUser::getIsAdmin, 1)
                .ne(SystemUser::getStatus, 3)
                .ne(SystemUser::getAccountLevel, 5)
                .last("LIMIT 1"));
        if (adminUser == null){
            throw new ServiceException("无权审核");
        }
        Integer identity = (Integer) redisUtils.get("identity:" + loginUserInfo.getPhone());
        if(identity != null && identity != 2){
            throw new ServiceException("请切换至管理员身份");
        }
        int accountLevel = adminUser.getAccountLevel();
@@ -343,7 +347,7 @@
            streetId = adminUser.getStreetId();
        } else if (accountLevel == ReportTypeEnum.DISTRICT.getCode()) {
            districtsCode = adminUser.getDistrictsCode();
        } else if(accountLevel != ReportTypeEnum.PARTY.getCode()){
        } else if(accountLevel != ReportTypeEnum.CITY.getCode()){
            throw new ServiceException("无权审核:未知等级");
        }
        String phone = loginUserInfo.getPhone();
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/utils/SignatureUtil.java
New file
@@ -0,0 +1,99 @@
package com.panzhihua.sangeshenbian.utils;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
public class SignatureUtil {
    private static final String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s";
    private static final String JSAPI_TICKET_URL = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=%s&type=jsapi";
    public static String getAccessToken(String appId, String appSecret) throws Exception {
        String url = String.format(ACCESS_TOKEN_URL, appId, appSecret);
        URL obj = new URL(url);
        HttpURLConnection con = (HttpURLConnection) obj.openConnection();
        con.setRequestMethod("GET");
        BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
        String inputLine;
        StringBuffer response = new StringBuffer();
        while ((inputLine = in.readLine()) != null) {
            response.append(inputLine);
        }
        in.close();
        Map<String, String> result = parseJson(response.toString());
        return result.get("access_token");
    }
    public static String getJsApiTicket(String accessToken) throws Exception {
        String url = String.format(JSAPI_TICKET_URL, accessToken);
        URL obj = new URL(url);
        HttpURLConnection con = (HttpURLConnection) obj.openConnection();
        con.setRequestMethod("GET");
        BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
        String inputLine;
        StringBuffer response = new StringBuffer();
        while ((inputLine = in.readLine()) != null) {
            response.append(inputLine);
        }
        in.close();
        Map<String, String> result = parseJson(response.toString());
        return result.get("ticket");
    }
    private static Map<String, String> parseJson(String json) {
        // 简单的JSON解析,实际项目中可以使用更强大的库如Jackson或Gson
        Map<String, String> map = new HashMap<>();
        String[] keyValuePairs = json.replace("{", "").replace("}", "").split(",");
        for (String pair : keyValuePairs) {
            String[] entry = pair.split(":");
            map.put(entry[0].trim().replace("\"", ""), entry[1].trim().replace("\"", ""));
        }
        return map;
    }
    public static String getSignature(String jsapiTicket, String nonceStr, String timestamp, String url) throws Exception {
        Map<String, String> params = new HashMap<>();
        params.put("jsapi_ticket", jsapiTicket);
        params.put("noncestr", nonceStr);
        params.put("timestamp", timestamp);
        params.put("url", url);
        String[] keys = params.keySet().toArray(new String[0]);
        Arrays.sort(keys);
        StringBuilder sb = new StringBuilder();
        for (String key : keys) {
            sb.append(key).append("=").append(params.get(key)).append("&");
        }
        sb.deleteCharAt(sb.length() - 1); // Remove the last '&'
        MessageDigest md = MessageDigest.getInstance("SHA-1");
        byte[] hashBytes = md.digest(sb.toString().getBytes(StandardCharsets.UTF_8));
        StringBuilder hexString = new StringBuilder();
        for (byte b : hashBytes) {
            String hex = Integer.toHexString(0xff & b);
            if (hex.length() == 1) {
                hexString.append('0');
            }
            hexString.append(hex);
        }
        return hexString.toString();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/IdentityInformationVO.java
@@ -22,6 +22,12 @@
    private Boolean isFrozen;
    /**
     * 是否确认党员信息
     */
    @ApiModelProperty(value = "是否确认党员信息")
    private Boolean isConfirm;
    /**
     * 是否认证党员信息
     */
    @ApiModelProperty(value = "是否认证党员信息")
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MgtComplaintQuery.java
@@ -19,13 +19,16 @@
@ApiModel("管理后台诉求管理查询数据传输对象")
public class MgtComplaintQuery extends BasePage {
    @ApiModelProperty(value = "录入人")
    private String nickname;
    private String reportUserName;
    @ApiModelProperty(value = "联系方式")
    private String phone;
    @ApiModelProperty(value = "录入人联系方式")
    private String reportUserPhone;
    @ApiModelProperty(value = "群众姓名")
    private String name;
    @ApiModelProperty(value = "群众联系方式")
    private String contactNumber;
    @ApiModelProperty(value = "发生时间-开始")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@@ -38,6 +41,6 @@
    @ApiModelProperty(value = "问题类型")
    private String problemType;
    @ApiModelProperty(value = "流转状态:0-正在办理 1-延期办理 2-超时办理 3-已办结 4-群众撤销 5-上报待审核 6-上级驳回 7-延期待审核")
    @ApiModelProperty(value = "流转状态:0-正在办理 1-延期办理 2-超时办理 3-已办结 4-上报待审核")
    private Integer status;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberApplicationRequest.java
@@ -5,6 +5,7 @@
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
@ApiModel("党员申请传输对象")
@@ -42,7 +43,7 @@
    private String community;
    @ApiModelProperty(value = "社区ID")
    @NotBlank(message = "社区ID不能空")
    @NotNull(message = "社区ID不能空")
    private Long communityId;
    @ApiModelProperty(value = "服务对象")
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberDTO.java
@@ -9,6 +9,7 @@
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
 * @author mitao
@@ -34,7 +35,6 @@
    private String phone;
    @ApiModelProperty(value = "所属区县")
    @NotBlank(message = "区县不能空")
    private String districts;
    @ApiModelProperty(value = "区县编号")
@@ -42,7 +42,6 @@
    private String districtsCode;
    @ApiModelProperty(value = "街道")
    @NotBlank(message = "街道不能空")
    private String street;
    @ApiModelProperty(value = "街道ID")
@@ -50,11 +49,10 @@
    private String streetId;
    @ApiModelProperty(value = "社区")
    @NotBlank(message = "社区不能空")
    private String community;
    @ApiModelProperty(value = "社区ID")
    @NotBlank(message = "社区ID不能空")
    @NotNull(message = "社区ID不能空")
    private Long communityId;
    @ApiModelProperty(value = "服务对象")
@@ -66,4 +64,10 @@
    @ApiModelProperty(value = "头像")
    @NotBlank(message = "头像不能空")
    private String avatar;
    @ApiModelProperty(value = "审核状态 0:待审核 1:审核通过 2:审核不通过")
    private Integer auditStatus;
    @ApiModelProperty(value = "拒绝理由")
    private String refuseReason;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberQuery.java
@@ -21,7 +21,7 @@
    private Long communityId;
    @ApiModelProperty(value = "服务对象")
    private String serviceObject;
    private String serviceTarget;
    @ApiModelProperty(value = "所在党组织")
    private String partyOrganization;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/SignatureVO.java
New file
@@ -0,0 +1,10 @@
package com.panzhihua.sangeshenbian.warpper;
import lombok.Data;
@Data
public class SignatureVO {
    private String timestamp;
    private String nonceStr;
    private String signature;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml
@@ -248,9 +248,107 @@
        sc.images,
        sc.videos,
        CASE
        WHEN sc.status = 0 and scar.audit_type = 1 AND scar.audit_status = 0 THEN 7
        WHEN sc.status = 0 and scar.audit_type = 2 AND scar.audit_status = 0 THEN 5
        WHEN sc.status = 0 and scar.audit_status = 2 THEN 6
        WHEN sc.status = 0 and scar.audit_type = 1 AND scar.audit_status = 0 THEN 4
        WHEN sc.status = 0 and scar.audit_type = 2 AND scar.audit_status = 0 THEN 4
        ELSE sc.status
        END AS status,
        sc.report_type,
        sc.report_user_name,
        sc.report_user_phone,
        sc.superior_id,
        sc.city_code,
        sc.districts_code,
        sc.street_id,
        sc.community_id,
        sc.party_member_id,
        sc.create_by,
        sc.create_time,
        sc.update_by,
        sc.update_time,
        sc.completion_description,
        sc.completion_images,
        sc.completion_videos,
        sc.completion_other_description,
        sc.completion_time,
        sc.completion_user_id,
        sc.completion_username,
        sc.completion_user_phone,
        sc.closing_time,
        sc.over_time_days,
        sc.latitude,
        sc.longitude,
        scar.audit_type,
        scar.audit_status,
        scar.comment,
        scar.create_time AS reportTime,
        scar.system_user_id,
        scar.reporter,
        scar.department_name,
        scar.department_id
        FROM sgsb_complaint sc
        INNER JOIN sgsb_complaint_audit_record scar ON scar.complaint_id = sc.id and scar.latest_flag = 1
        ) AS t
        <where>
            <if test="1 == loginUserInfo.accountLevel">
                and t.city_code = 510400
            </if>
            <if test="2 == loginUserInfo.accountLevel">
                and (t.districts_code = #{loginUserInfo.districtsCode} || t.id in (select complaint_id from
                sgsb_complaint_audit_record where audit_type = 3 and audit_status = 1 and report_type =
                #{loginUserInfo.accountLevel} and superior_id = #{loginUserInfo.districtsCode}))
            </if>
            <if test="3 == loginUserInfo.accountLevel">
                and (t.street_id = #{loginUserInfo.streetId} || t.id in (select complaint_id from
                sgsb_complaint_audit_record where audit_type = 3 and audit_status = 1 and report_type =
                #{loginUserInfo.accountLevel} and superior_id = #{loginUserInfo.streetId}))
            </if>
            <if test="4 == loginUserInfo.accountLevel">
                and (t.community_id = #{loginUserInfo.communityId} || t.id in (select complaint_id from
                sgsb_complaint_audit_record where audit_type = 3 and audit_status = 1 and report_type =
                #{loginUserInfo.accountLevel} and superior_id = #{loginUserInfo.communityId}))
            </if>
            <if test="query.status!=null and query.status!=''">
                AND t.status = #{query.status}
            </if>
            <if test="query.reportUserName != null and query.reportUserName!=''">
                AND t.report_user_name LIKE CONCAT('%',#{query.reportUserName},'%')
            </if>
            <if test="query.reportUserPhone != null and query.reportUserPhone!=''">
                AND t.report_user_phone LIKE CONCAT('%',#{query.phone},'%')
            </if>
            <if test="query.name != null and query.name!=''">
                AND t.name LIKE CONCAT('%',#{query.name},'%')
            </if>
            <if test="query.contactNumber != null and query.contactNumber!=''">
                AND t.contact_number LIKE CONCAT('%',#{query.contactNumber},'%')
            </if>
            <if test="query.startTime != null and query.endTime!=null">
                AND t.create_time BETWEEN #{query.startTime} AND #{query.endTime}
            </if>
            <if test="query.problemType != null and query.problemType!=''">
                AND t.problem_type =#{query.problemType}
            </if>
        </where>
        GROUP BY t.id
        ORDER BY t.create_time DESC
    </select>
    <select id="getList" resultType="com.panzhihua.sangeshenbian.model.vo.ComplaintVO">
        SELECT * FROM(
        SELECT sc.id,
        sc.serial_number,
        sc.time,
        sc.problem_type,
        sc.name,
        sc.contact_number,
        sc.location,
        sc.detailed_address,
        sc.description_title,
        sc.description_content,
        sc.images,
        sc.videos,
        CASE
        WHEN sc.status = 0 and scar.audit_type = 1 AND scar.audit_status = 0 THEN 4
        WHEN sc.status = 0 and scar.audit_type = 2 AND scar.audit_status = 0 THEN 4
        ELSE sc.status
        END AS status,
        sc.report_type,
@@ -311,11 +409,17 @@
            <if test="query.status!=null and query.status == 0">
                AND t.status = #{query.status}
            </if>
            <if test="query.nickname != null and query.nickname!=''">
            <if test="query.reportUserName != null and query.reportUserName!=''">
                AND t.report_user_name LIKE CONCAT('%',#{query.reportUserName},'%')
            </if>
            <if test="query.phone != null and query.phone!=''">
            <if test="query.reportUserPhone != null and query.reportUserPhone!=''">
                AND t.report_user_phone LIKE CONCAT('%',#{query.phone},'%')
            </if>
            <if test="query.name != null and query.name!=''">
                AND t.name LIKE CONCAT('%',#{query.name},'%')
            </if>
            <if test="query.contactNumber != null and query.contactNumber!=''">
                AND t.contact_number LIKE CONCAT('%',#{query.contactNumber},'%')
            </if>
            <if test="query.startTime != null and query.endTime!=null">
                AND t.create_time BETWEEN #{query.startTime} AND #{query.endTime}
@@ -324,98 +428,7 @@
                AND t.problem_type =#{query.problemType}
            </if>
        </where>
        ORDER BY t.create_time DESC
    </select>
    <select id="getList" resultType="com.panzhihua.sangeshenbian.model.vo.ComplaintVO">
        SELECT * FROM(
        SELECT sc.id,
        sc.serial_number,
        sc.time,
        sc.problem_type,
        sc.name,
        sc.contact_number,
        sc.location,
        sc.detailed_address,
        sc.description_title,
        sc.description_content,
        sc.images,
        sc.videos,
        CASE
        WHEN sc.status = 0 and scar.audit_type = 1 AND scar.audit_status = 0 THEN 7
        WHEN sc.status = 0 and scar.audit_type = 2 AND scar.audit_status = 0 THEN 5
        WHEN sc.status = 0 and scar.audit_status = 2 THEN 6
        ELSE sc.status
        END AS status,
        sc.report_type,
        sc.superior_id,
        sc.city_code,
        sc.districts_code,
        sc.street_id,
        sc.community_id,
        sc.party_member_id,
        sc.create_by,
        sc.create_time,
        sc.update_by,
        sc.update_time,
        sc.completion_description,
        sc.completion_images,
        sc.completion_videos,
        sc.completion_other_description,
        sc.completion_time,
        sc.completion_user_id,
        sc.completion_username,
        sc.completion_user_phone,
        sc.closing_time,
        sc.over_time_days,
        sc.latitude,
        sc.longitude,
        scar.audit_type,
        scar.audit_status,
        scar.comment,
        scar.create_time AS reportTime,
        scar.system_user_id,
        scar.reporter,
        scar.department_name,
        scar.department_id
        FROM sgsb_complaint sc
        INNER JOIN sgsb_complaint_audit_record scar ON scar.complaint_id = sc.id and scar.latest_flag = 1
        ) AS t
        <where>
            scar.latest_flag = 1
            <if test="1 == loginUserInfo.accountLevel">
                and t.city_code = 510400
            </if>
            <if test="2 == loginUserInfo.accountLevel">
                and (t.districts_code = #{loginUserInfo.districtsCode} || t.id in (select complaint_id from
                sgsb_complaint_audit_record where audit_type = 3 and audit_status = 1 and report_type =
                #{loginUserInfo.accountLevel} and superior_id = #{loginUserInfo.districtsCode}))
            </if>
            <if test="3 == loginUserInfo.accountLevel">
                and (t.street_id = #{loginUserInfo.streetId} || t.id in (select complaint_id from
                sgsb_complaint_audit_record where audit_type = 3 and audit_status = 1 and report_type =
                #{loginUserInfo.accountLevel} and superior_id = #{loginUserInfo.streetId}))
            </if>
            <if test="4 == loginUserInfo.accountLevel">
                and (t.community_id = #{loginUserInfo.communityId} || t.id in (select complaint_id from
                sgsb_complaint_audit_record where audit_type = 3 and audit_status = 1 and report_type =
                #{loginUserInfo.accountLevel} and superior_id = #{loginUserInfo.communityId}))
            </if>
            <if test="query.status!=null and query.status == 0">
                AND t.status = #{query.status}
            </if>
            <if test="query.nickname != null and query.nickname!=''">
            </if>
            <if test="query.phone != null and query.phone!=''">
            </if>
            <if test="query.startTime != null and query.endTime!=null">
                AND t.create_time BETWEEN #{query.startTime} AND #{query.endTime}
            </if>
            <if test="query.problemType != null and query.problemType!=''">
                AND t.problem_type =#{query.problemType}
            </if>
        </where>
        GROUP BY t.id
        ORDER BY t.create_time DESC
    </select>
    
@@ -423,4 +436,63 @@
    <select id="getTimeoutAndNotComment" resultType="com.panzhihua.sangeshenbian.model.entity.Complaint">
        select * from sgsb_complaint where status = 3 and DATE_ADD(completion_time, INTERVAL 10 DAY) &lt;= NOW() and id not in (select complaint_id from sgsb_complaint_comment where del_flag = 0)
    </select>
    <select id="getDetailBg" resultType="com.panzhihua.sangeshenbian.model.vo.ComplaintVO"
            parameterType="java.lang.Long">
        SELECT * FROM(
                         SELECT sc.id,
                                sc.serial_number,
                                sc.time,
                                sc.problem_type,
                                sc.name,
                                sc.contact_number,
                                sc.location,
                                sc.detailed_address,
                                sc.description_title,
                                sc.description_content,
                                sc.images,
                                sc.videos,
                                CASE
                                    WHEN sc.status = 0 and scar.audit_type = 1 AND scar.audit_status = 0 THEN 4
                                    WHEN sc.status = 0 and scar.audit_type = 2 AND scar.audit_status = 0 THEN 4
                                    ELSE sc.status
                                    END AS status,
                                sc.report_type,
                                sc.report_user_name,
                                sc.report_user_phone,
                                sc.superior_id,
                                sc.city_code,
                                sc.districts_code,
                                sc.street_id,
                                sc.community_id,
                                sc.party_member_id,
                                sc.create_by,
                                sc.create_time,
                                sc.update_by,
                                sc.update_time,
                                sc.completion_description,
                                sc.completion_images,
                                sc.completion_videos,
                                sc.completion_other_description,
                                sc.completion_time,
                                sc.completion_user_id,
                                sc.completion_username,
                                sc.completion_user_phone,
                                sc.closing_time,
                                sc.over_time_days,
                                sc.latitude,
                                sc.longitude,
                                scar.audit_type,
                                scar.audit_status,
                                scar.comment,
                                scar.create_time AS reportTime,
                                scar.system_user_id,
                                scar.reporter,
                                scar.department_name,
                                scar.department_id
                         FROM sgsb_complaint sc
                                  INNER JOIN sgsb_complaint_audit_record scar ON scar.complaint_id = sc.id and scar.latest_flag = 1
                     ) AS t
        WHERE t.id = #{id}
        GROUP BY t.id
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/PartyMemberMapper.xml
@@ -9,6 +9,7 @@
               phone,
               districts,
               districts_code,
               id_number,
               street,
               street_id,
               community,
@@ -45,7 +46,7 @@
            <if test="query.communityId != null and query.communityId != ''">
                and community_id = #{query.communityId}
            </if>
            <if test="query.serviceObject != null and query.serviceObject != ''">
            <if test="query.serviceTarget != null and query.serviceTarget != ''">
                and service_target like concat('%',#{query.serviceTarget},'%')
            </if>
            <if test="query.partyOrganization != null and query.partyOrganization != ''">
@@ -97,7 +98,7 @@
            <if test="query.communityId != null and query.communityId != ''">
                and community_id = #{query.communityId}
            </if>
            <if test="query.serviceObject != null and query.serviceObject != ''">
            <if test="query.serviceTarget != null and query.serviceTarget != ''">
                and service_target like concat('%',#{query.serviceTarget},'%')
            </if>
            <if test="query.partyOrganization != null and query.partyOrganization != ''">