liujie
2025-05-30 535223079f6fa155feb492e1b48786ece31d3467
小程序接口修改
26个文件已修改
622 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/AnalyticStatisticsController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/BannerController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/ComplaintRejectController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/MessageNotificationController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/MgtComplaintController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/MgtPartyMemberController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/ProblemTypeController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/SystemLogController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/SystemMenuController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/SystemPostController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/SystemRoleController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/SystemUserController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/WorkOrderItemConfigController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/controller/ComplaintController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/controller/HomeController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/dao/ComplaintMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/model/entity/Complaint.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/model/entity/SystemUser.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/model/query/ComplaintQuery.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/model/vo/ComplaintVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/service/ISystemUserService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/service/impl/ComplaintFlowServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/service/impl/ComplaintServiceImpl.java 217 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/service/impl/IdentityInformationServiceImpl.java 143 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/service/impl/SystemUserServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/resources/mapper/ComplaintMapper.xml 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/AnalyticStatisticsController.java
@@ -55,7 +55,7 @@
    @PostMapping("/data")
    @ApiOperation(value = "分析统计", tags = {"三个身边后台-分析统计"})
    @ApiOperation(value = "分析统计", tags = {"西区纪委后台-分析统计"})
    public R<AnalyticStatisticsDataVo> data(@Valid @RequestBody AnalyticStatisticsQuery query){
        SystemUserVo loginUserInfoSanGeShenBian = getLoginUserInfoWest();
        Integer id = loginUserInfoSanGeShenBian.getId();
@@ -192,7 +192,7 @@
    @GetMapping("/getRegion")
    @ApiOperation(value = "分析统计--获取市-区县-街道-社区", tags = {"三个身边后台-分析统计--获取市-区县-街道-社区"})
    @ApiOperation(value = "分析统计--获取市-区县-街道-社区", tags = {"西区纪委后台-分析统计--获取市-区县-街道-社区"})
    public R<AnalyticStatisticsRegionVo> getRegion(){
        SystemUserVo loginUserInfoSanGeShenBian = getLoginUserInfoWest();
        Integer id = loginUserInfoSanGeShenBian.getId();
@@ -267,7 +267,7 @@
    @GetMapping("/getNextRegion")
    @ApiOperation(value = "分析统计--获取下一级树", tags = {"三个身边后台-分析统计--获取市-区县-街道-社区"})
    @ApiOperation(value = "分析统计--获取下一级树", tags = {"西区纪委后台-分析统计--获取市-区县-街道-社区"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "区 传regionCode  街道streetId", required = true, dataType = "String"),
            @ApiImplicitParam(name = "type", value = "1区  2街道", required = true, dataType = "Integer")
@@ -285,7 +285,7 @@
    }
    @GetMapping("/getLastRegion")
    @ApiOperation(value = "分析统计--获取上级回显", tags = {"三个身边后台-分析统计--获取市-区县-街道-社区"})
    @ApiOperation(value = "分析统计--获取上级回显", tags = {"西区纪委后台-分析统计--获取市-区县-街道-社区"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "街道streetId 社区 communityId", required = true, dataType = "String"),
            @ApiImplicitParam(name = "type", value = "2街道 3社区", required = true, dataType = "Integer")
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/BannerController.java
@@ -36,8 +36,8 @@
    
    
    @GetMapping("/list")
    @ApiOperation(value = "获取banner列表", tags = {"三个身边后台-banner管理"})
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取banner列表")
    @ApiOperation(value = "获取banner列表", tags = {"西区纪委后台-banner管理"})
    @OperLog(operModul = "西区纪委后台",operType = 0, businessType = "获取banner列表")
    public R<IPage<Banner>> list(String name, Integer pageNum, Integer pageSize){
        Integer id = this.getLoginUserInfoWest().getId();
        SystemUser systemUser = systemUserService.getById(id);
@@ -50,7 +50,7 @@
    
    
    @PostMapping("/add")
    @ApiOperation(value = "添加banner", tags = {"三个身边后台-banner管理"})
    @ApiOperation(value = "添加banner", tags = {"西区纪委后台-banner管理"})
    @SysLog(operatorCategory = "添加banner",operId = 7)
    public R<Banner> add(@RequestBody Banner banner){
        Integer id = this.getLoginUserInfoWest().getId();
@@ -66,7 +66,7 @@
    
    
    @PostMapping("/edit")
    @ApiOperation(value = "编辑banner", tags = {"三个身边后台-banner管理"})
    @ApiOperation(value = "编辑banner", tags = {"西区纪委后台-banner管理"})
    @SysLog(operatorCategory = "编辑banner",operId = 7)
    public R<Banner> edit(@RequestBody Banner banner){
        Integer id = this.getLoginUserInfoWest().getId();
@@ -80,7 +80,7 @@
    
    
    @DeleteMapping("/delete/{id}")
    @ApiOperation(value = "删除banner", tags = {"三个身边后台-banner管理"})
    @ApiOperation(value = "删除banner", tags = {"西区纪委后台-banner管理"})
    @SysLog(operatorCategory = "删除banner",operId = 7)
    public R delete(@PathVariable("id") Integer id){
        Integer id1 = this.getLoginUserInfoWest().getId();
@@ -94,11 +94,11 @@
    }
    
    @GetMapping("/getBannerInfo/{id}")
    @ApiOperation(value = "获取banner信息", tags = {"三个身边后台-banner管理"})
    @ApiOperation(value = "获取banner信息", tags = {"西区纪委后台-banner管理"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "bannerID", required = true, dataType = "Integer")
    })
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取banner信息")
    @OperLog(operModul = "西区纪委后台",operType = 0, businessType = "获取banner信息")
    public R<Banner> getBannerInfo(@PathVariable("id") Integer id){
        Banner banner = bannerService.getById(id);
        return R.ok(banner);
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/ComplaintRejectController.java
@@ -40,7 +40,7 @@
    @GetMapping("/list")
    @ApiOperation(value = "获取问题驳回统计列表", tags = {"三个身边后台-问题驳回统计"})
    @ApiOperation(value = "获取问题驳回统计列表", tags = {"西区纪委后台-问题驳回统计"})
    public R<IPage<ComplaintRejectVo>> list(ComplaintRejectQuery query){
        SystemUserVo loginUserInfoSanGeShenBian = getLoginUserInfoWest();
        Integer id = loginUserInfoSanGeShenBian.getId();
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/MessageNotificationController.java
@@ -34,8 +34,8 @@
    
    
    @GetMapping("/list")
    @ApiOperation(value = "获取消息通知列表", tags = {"三个身边后台-消息通知"})
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取消息通知列表")
    @ApiOperation(value = "获取消息通知列表", tags = {"西区纪委后台-消息通知"})
    @OperLog(operModul = "西区纪委后台",operType = 0, businessType = "获取消息通知列表")
    public R<IPage<MessageNotification>> list(MessageNotificationList query) {
        Integer id = this.getLoginUserInfoWest().getId();
        SystemUser systemUser = systemUserService.getById(id);
@@ -63,8 +63,8 @@
    
    
    @PutMapping("/read/{id}")
    @ApiOperation(value = "标记为已读", tags = {"三个身边后台-消息通知"})
    @OperLog(operModul = "三个身边后台",operType = 2, businessType = "标记为已读")
    @ApiOperation(value = "标记为已读", tags = {"西区纪委后台-消息通知"})
    @OperLog(operModul = "西区纪委后台",operType = 2, businessType = "标记为已读")
    public R read(@PathVariable("id") Integer id) {
        MessageNotification messageNotification = messageNotificationService.getById(id);
        if(messageNotification.getReadStatus()==1){
@@ -77,8 +77,8 @@
    
    
    @GetMapping("/unreadCount")
    @ApiOperation(value = "获取未读数量", tags = {"三个身边后台-消息通知"})
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取未读数量")
    @ApiOperation(value = "获取未读数量", tags = {"西区纪委后台-消息通知"})
    @OperLog(operModul = "西区纪委后台",operType = 0, businessType = "获取未读数量")
    public R unreadCount() {
        Integer id = this.getLoginUserInfoWest().getId();
        SystemUser systemUser = systemUserService.getById(id);
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/MgtComplaintController.java
@@ -23,7 +23,7 @@
 * @author mitao
 * @date 2025/3/14
 */
@Api(tags = {"三个身边后台-诉求管理"})
@Api(tags = {"西区纪委后台-诉求管理"})
@RequestMapping("/complaint")
@RestController
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/MgtPartyMemberController.java
@@ -32,7 +32,7 @@
 * @author mitao
 * @since 2025-03-13
 */
@Api(tags = {"三个身边后台-党员管理"})
@Api(tags = {"西区纪委后台-党员管理"})
@Validated
@RestController
@RequestMapping("/party-member")
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/ProblemTypeController.java
@@ -40,8 +40,8 @@
    
    
    @GetMapping("/list")
    @ApiOperation(value = "获取问题类型列表", tags = {"三个身边后台-问题类型管理"})
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取问题类型列表")
    @ApiOperation(value = "获取问题类型列表", tags = {"西区纪委后台-问题类型管理"})
    @OperLog(operModul = "西区纪委后台",operType = 0, businessType = "获取问题类型列表")
    public R<IPage<ProblemType>> list(String name, Integer pageNum, Integer pageSize){
        Integer id = this.getLoginUserInfoWest().getId();
        SystemUser systemUser = systemUserService.getById(id);
@@ -54,7 +54,7 @@
    
    
    @PostMapping("/add")
    @ApiOperation(value = "添加问题类型", tags = {"三个身边后台-问题类型管理"})
    @ApiOperation(value = "添加问题类型", tags = {"西区纪委后台-问题类型管理"})
    @SysLog(operatorCategory = "添加问题类型",operId = 6)
    public R add(@RequestBody ProblemType problemType){
        Integer id = this.getLoginUserInfoWest().getId();
@@ -74,7 +74,7 @@
    
    
    @PostMapping("/edit")
    @ApiOperation(value = "编辑问题类型", tags = {"三个身边后台-问题类型管理"})
    @ApiOperation(value = "编辑问题类型", tags = {"西区纪委后台-问题类型管理"})
    @SysLog(operatorCategory = "编辑问题类型",operId = 6)
    public R edit(@RequestBody ProblemType problemType){
        Integer id = this.getLoginUserInfoWest().getId();
@@ -92,7 +92,7 @@
    
    
    @DeleteMapping("/delete/{id}")
    @ApiOperation(value = "删除问题类型", tags = {"三个身边后台-问题类型管理"})
    @ApiOperation(value = "删除问题类型", tags = {"西区纪委后台-问题类型管理"})
    @SysLog(operatorCategory = "删除问题类型",operId = 6)
    public R delete(@PathVariable("id") Integer id){
        Integer userid = this.getLoginUserInfoWest().getId();
@@ -106,11 +106,11 @@
    }
    
    @GetMapping("/getProblemTypeInfo/{id}")
    @ApiOperation(value = "获取问题类型信息", tags = {"三个身边后台-问题类型管理"})
    @ApiOperation(value = "获取问题类型信息", tags = {"西区纪委后台-问题类型管理"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "问题类型ID", required = true, dataType = "Integer")
    })
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取问题类型信息")
    @OperLog(operModul = "西区纪委后台",operType = 0, businessType = "获取问题类型信息")
    public R<ProblemType> getProblemTypeInfo(@PathVariable("id") Integer id){
        ProblemType problemType = problemTypeService.getById(id);
        return R.ok(problemType);
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/SystemLogController.java
@@ -29,7 +29,7 @@
    private ISystemLogService systemLogMapper;
    @GetMapping("/list")
    @ApiOperation(value = "获取日志数据", tags = {"三个身边后台-日志"})
    @ApiOperation(value = "获取日志数据", tags = {"西区纪委后台-日志"})
    public R<IPage<SystemLog>> list(SystemLogQuery query){
        IPage<SystemLog> list = systemLogMapper.getLogList(query);
        return R.ok(list);
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/SystemMenuController.java
@@ -26,8 +26,8 @@
    private ISystemMenuService systemMenuService;
    
    @GetMapping("/getSystemMenuList")
    @ApiOperation(value = "获取菜单列表", tags = {"三个身边后台-角色管理"})
    @OperLog(operModul = "三个身边后台",operType = 0, businessType = "获取菜单列表")
    @ApiOperation(value = "获取菜单列表", tags = {"西区纪委后台-角色管理"})
    @OperLog(operModul = "西区纪委后台",operType = 0, businessType = "获取菜单列表")
    public R<List<SystemMenu>> getSystemMenuList(){
        return R.ok(systemMenuService.getSystemMenuList());
    }
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/SystemPostController.java
@@ -27,7 +27,7 @@
    
    
    @PostMapping("/add")
    @ApiOperation(value = "添加职位", tags = {"三个身边后台-职位管理"})
    @ApiOperation(value = "添加职位", tags = {"西区纪委后台-职位管理"})
    @SysLog(operatorCategory = "添加职位",operId = 2)
    public R add(@RequestBody SystemPost systemPost) {
        systemPost.setCreateTime(LocalDateTime.now());
@@ -37,7 +37,7 @@
    
    
    @PostMapping("/edit")
    @ApiOperation(value = "编辑职位", tags = {"三个身边后台-职位管理"})
    @ApiOperation(value = "编辑职位", tags = {"西区纪委后台-职位管理"})
    @SysLog(operatorCategory = "编辑职位",operId = 2)
    public R edit(@RequestBody SystemPost systemPost) {
        systemPostService.updateById(systemPost);
@@ -45,7 +45,7 @@
    }
    
    @DeleteMapping("/delete/{id}")
    @ApiOperation(value = "删除职位", tags = {"三个身边后台-职位管理"})
    @ApiOperation(value = "删除职位", tags = {"西区纪委后台-职位管理"})
    @SysLog(operatorCategory = "删除职位",operId = 2)
    public R delete(@PathVariable("id") Integer id) {
        String name = systemPostService.getById(id).getName();
@@ -55,8 +55,8 @@
    
    
    @GetMapping("/list")
    @ApiOperation(value = "获取列表数据", tags = {"三个身边后台-职位管理"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "获取职位列表数据")
    @ApiOperation(value = "获取列表数据", tags = {"西区纪委后台-职位管理"})
    @OperLog(operModul = "西区纪委后台",operType = 0,businessType = "获取职位列表数据")
    public R<IPage<SystemPost>> list(String name, Integer pageNum, Integer pageSize) {
        return R.ok(systemPostService.list(name, pageNum, pageSize));
    }
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/SystemRoleController.java
@@ -38,8 +38,8 @@
    
    
    @GetMapping("/list")
    @ApiOperation(value = "获取列表数据", tags = {"三个身边后台-角色管理"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "获取角色列表数据")
    @ApiOperation(value = "获取列表数据", tags = {"西区纪委后台-角色管理"})
    @OperLog(operModul = "西区纪委后台",operType = 0,businessType = "获取角色列表数据")
    public R<IPage<SystemRoleListVo>> list(SystemRoleList systemRoleList){
        IPage<SystemRoleListVo> list = systemRoleService.list(systemRoleList);
        return R.ok(list);
@@ -48,7 +48,7 @@
    
    
    @PostMapping("/add")
    @ApiOperation(value = "添加角色", tags = {"三个身边后台-角色管理"})
    @ApiOperation(value = "添加角色", tags = {"西区纪委后台-角色管理"})
    @SysLog(operatorCategory = "添加角色",operId = 3)
    public R add(@RequestBody AddSystemRole addSystemRole){
        long count = systemRoleService.count(new LambdaQueryWrapper<SystemRole>().eq(SystemRole::getDel, 0).eq(SystemRole::getName, addSystemRole.getName()));
@@ -72,7 +72,7 @@
    }
    
    @PostMapping("/edit")
    @ApiOperation(value = "编辑角色", tags = {"三个身边后台-角色管理"})
    @ApiOperation(value = "编辑角色", tags = {"西区纪委后台-角色管理"})
    @SysLog(operatorCategory = "编辑角色",operId = 3)
    public R edit(@RequestBody EditSystemRole editSystemRole){
        long count = systemRoleService.count(new LambdaQueryWrapper<SystemRole>().eq(SystemRole::getDel, 0)
@@ -100,7 +100,7 @@
    
    
    @DeleteMapping("/delete/{id}")
    @ApiOperation(value = "删除角色", tags = {"三个身边后台-角色管理"})
    @ApiOperation(value = "删除角色", tags = {"西区纪委后台-角色管理"})
    @SysLog(operatorCategory = "删除角色",operId = 3)
    public R delete(@PathVariable("id") Integer id){
        SystemRole systemRole = systemRoleService.getById(id);
@@ -114,8 +114,8 @@
    
    
    @GetMapping("/getSystemRoleInfo/{id}")
    @ApiOperation(value = "获取角色详情", tags = {"三个身边后台-角色管理"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "获取角色详情")
    @ApiOperation(value = "获取角色详情", tags = {"西区纪委后台-角色管理"})
    @OperLog(operModul = "西区纪委后台",operType = 0,businessType = "获取角色详情")
    public R<SystemRoleInfo> getSystemRoleInfo(@PathVariable("id") Integer id){
        SystemRole systemRole = systemRoleService.getById(id);
        if(null == systemRole){
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/SystemUserController.java
@@ -69,10 +69,6 @@
    @Resource
    private IDepartmentService departmentService;
    @Resource
    private ISystemUserLevelService systemUserLevelService;
@@ -304,23 +300,6 @@
        systemUser.setStatus(2);
        systemUserService.updateById(systemUser);
        return R.ok();
    }
    @PostMapping("/setDeptAdmin")
    @ApiOperation(value = "设置单位管理员", tags = {"西区纪委后台-人员管理"})
    @OperLog(operModul = "西区纪委后台",operType = 2,businessType = "设置单位管理员")
    public R setDeptAdmin(@RequestParam(name = "id",value = "用户id",required = true) Integer id, @RequestParam(name = "deptId",value = "单位id",required = true) Integer deptId){
        SystemUser systemUser = systemUserService.getById(id);
        if(!systemUser.getOneDepartmentId().equals(deptId)){
            return R.fail("不能设置非所属单位管理员为单位管理员");
        }
        boolean update = systemUserService.update(new LambdaUpdateWrapper<SystemUser>().eq(SystemUser::getIsDeptAdmin, deptId).set(SystemUser::getIsDeptAdmin, 0));
        if(update){
            systemUser.setIsDeptAdmin(1);
            systemUserService.updateById(systemUser);
            return R.ok();
        }
        return R.fail("设置失败");
    }
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/WorkOrderItemConfigController.java
@@ -25,8 +25,8 @@
    
    
    @GetMapping("/getWorkOrderItemConfigInfo")
    @ApiOperation(value = "获取工单事项配置", tags = {"三个身边后台-工单事项配置"})
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "获取工单事项配置")
    @ApiOperation(value = "获取工单事项配置", tags = {"西区纪委后台-工单事项配置"})
    @OperLog(operModul = "西区纪委后台",operType = 0,businessType = "获取工单事项配置")
    public R<WorkOrderItemConfig> getWorkOrderItemConfigInfo(){
        WorkOrderItemConfig one = workOrderItemConfigService.getOne(null);
        return R.ok(one);
@@ -34,7 +34,7 @@
    
    
    @PostMapping("/addWorkOrderItemConfig")
    @ApiOperation(value = "保存工单事项配置", tags = {"三个身边后台-工单事项配置"})
    @ApiOperation(value = "保存工单事项配置", tags = {"西区纪委后台-工单事项配置"})
    @SysLog(operatorCategory = "工单事项配置",operId = 5)
    public R<WorkOrderItemConfig> add(@RequestBody WorkOrderItemConfig workOrderItemConfig){
        // 获取原来的数据 用作日志修改对比
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/controller/ComplaintController.java
@@ -98,7 +98,7 @@
    @GetMapping("/detail")
    @ApiOperation("工单详情")
    public R<ComplaintVO> detail(@ApiParam(name = "id", value = "工单id", required = true) Long id) {
    public R<ComplaintVO> detail(Long id) {
        return R.ok(complaintService.detail(id,getLoginUserInfo()));
    }
@@ -203,7 +203,7 @@
    @ApiOperation(value = "分配诉求")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "complainId", value = "诉求id", required = true),
            @ApiImplicitParam(name = "userId", value = "单位id", required = true)
            @ApiImplicitParam(name = "deptId", value = "单位id", required = true)
    })
    public R<?> assignComplain(@RequestParam Long complainId,@RequestParam Integer deptId) {
        complaintService.assignComplain(getLoginUserInfo(),complainId,deptId);
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/controller/HomeController.java
@@ -90,7 +90,7 @@
    }
    @GetMapping("/current-user-info")
    @ApiOperation("获取三个身边当前用户信息 用于判断用户是否是上级")
    @ApiOperation("获取西区纪委当前用户信息 用于判断用户是否是上级")
    public R<SystemUser> getCurrentUserInfo() {
        SystemUser systemUser = systemUserService.getSystemUserAdminByPhone(getLoginUserInfo().getPhone()).orElse(null);
        Object o1 = redisUtils.get("identity:" + getLoginUserInfo().getPhone());
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/dao/ComplaintMapper.java
@@ -114,8 +114,8 @@
    List<Complaint> getStatusForList(@Param("ids") List<Long> ids);
    Page<ComplaintVO> selectComplaintPage3(@Param("page") Page<ComplaintVO> page, @Param("query") ComplaintQuery query, @Param("accountLevel") Integer accountLevel, @Param("targetId") Long targetId);
    Page<ComplaintVO> selectComplaintPage3(@Param("page") Page<ComplaintVO> page, @Param("query") ComplaintQuery query, @Param("accountLevel") Integer accountLevel, @Param("targetId") Long targetId);
    Page<ComplaintVO> selectComplaintPage4(@Param("page") Page<ComplaintVO> page, @Param("query") ComplaintQuery query, @Param("oneDepartmentId") Integer oneDepartmentId);
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/model/entity/Complaint.java
@@ -101,6 +101,10 @@
    @ApiModelProperty(value = "上级id")
    @TableField("superior_id")
    private Long superiorId;
    @ApiModelProperty(value = "上报前上级id")
    @TableField("last_superior_id")
    private Long lastSuperiorId;
    
    @ApiModelProperty(value = "上报类型 1=市级账号,2=区县账号,3=街道账号,4=社区账号,5=党员账号")
    @TableField("report_type")
@@ -234,4 +238,9 @@
    @TableField("now_level")
    @ApiModelProperty(value = "当前层级")
    private Integer nowLevel;
    @TableField("last_level")
    @ApiModelProperty(value = "上报前层级")
    private Integer lastLevel;
}
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/model/entity/SystemUser.java
@@ -141,11 +141,6 @@
    @TableField("create_time")
    private LocalDateTime createTime;
    /**
     * 是否是单位理员(0=否,1=是)
     */
    @TableField("is_dept_admin")
    private Integer isDeptAdmin;
    @TableField(exist = false)
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/model/query/ComplaintQuery.java
@@ -12,8 +12,8 @@
@ApiModel("工单查询数据传输对象")
public class ComplaintQuery extends BasePage{
    @ApiModelProperty("全部:不传,上报待审核:0,正在办理:1, 办结:2")
    private Integer type;
    @ApiModelProperty("全部:不传,上报待审核:5,正在办理:0, 办结:3")
    private Integer status;
    /**
     * 当前登录用户id
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/model/vo/ComplaintVO.java
@@ -100,8 +100,6 @@
    @ApiModelProperty(value = "已上报次数")
    private Integer reportCount;
    @ApiModelProperty(value = "0待分配 1已分配")
    private Integer assignStatus;
}
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/service/ISystemUserService.java
@@ -25,12 +25,12 @@
    IPage<SystemUserListVo> list(SystemUser user, SystemUserList query);
    /**
     * 根据手机号码查询小程序用户在三个身边的上级角色用户
     * 根据手机号码查询小程序用户在西区纪委的上级角色用户
     */
    Optional<SystemUser> getSystemUserAdminByPhone(String phone);
    /**
     * 根据手机号码查询小程序用户在三个身边的用户
     * 根据手机号码查询小程序用户在西区纪委的用户
     */
    Optional<SystemUser> getSystemUserByPhone(String phone);
    /**
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/service/impl/ComplaintFlowServiceImpl.java
@@ -48,6 +48,7 @@
    }
    private String getFlowName(Integer reportType, Long superiorId) {
        reportType = reportType+1;
        String name = "";
        if (reportType == ReportTypeEnum.COMMUNITY.getCode()) {
            ComAct byId = comActService.getById(superiorId);
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/service/impl/ComplaintServiceImpl.java
@@ -39,6 +39,7 @@
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
@@ -105,7 +106,7 @@
        // 设置流水号
        complaint.setSerialNumber(serialNumber);
        Integer accountLevel = 5;
        Integer accountLevel = 4;
        //获取当前身份
        IdentityInformation identityInformationVO = identityInformationService.getCurrentIdentityInformation(loginUserInfoVO);
        //1=党员,2=管理员
@@ -184,6 +185,7 @@
            complaint.setPartyMemberId(partyMember.getId());
            complaint.setReportUserName(partyMember.getName());
            complaint.setReportUserPhone(partyMember.getPhone());
            complaint.setSuperiorId( partyMember.getCommunityId());
            // 添加处理人
//            SystemUser one = systemUserService.getOne(new LambdaQueryWrapper<SystemUser>().eq(SystemUser::getAccountLevel, 4).eq(SystemUser::getIsDeptAdmin, 1).eq(SystemUser::getCommunityId, partyMember.getCommunityId()).ne(SystemUser::getStatus, 3));
@@ -196,6 +198,8 @@
        }
        complaint.setReportType(accountLevel);
        complaint.setNowLevel(accountLevel);
        complaint.setLastLevel(accountLevel);
        complaint.setLastSuperiorId(complaint.getSuperiorId());
        // 设置其他字段
        complaint.setStatus(ProcessStatusEnum.PROCESSING.getCode());
@@ -252,10 +256,10 @@
        Integer identity = identityInformation.getIdentity();
        query.setUserId(loginUserInfoVO.getUserId());
        SystemUser systemUser = null;
        SystemUser systemUser;
        //上级
        if (systemUserByPhone.isPresent() && null != identity && identity == 2) {
          systemUserByPhone.get();
            systemUser= systemUserByPhone.get();
            accountLevel = systemUser.getAccountLevel();
            switch (accountLevel) {
                case 2:
@@ -277,6 +281,7 @@
                    break;
            }
        } else {
            systemUser = null;
            //党员
            PartyMember partyMember = partyMemberService.getPartyMemberByPhone(loginUserInfoVO.getPhone());
            targetId = partyMember.getCommunityId();
@@ -298,13 +303,8 @@
        }else if(accountLevel==3){
            // 街道 1
            if(systemUser.getSystemRoleId()==1){
                // 获取街道的所有单位
                List<Department> list = departmentService.list(new LambdaQueryWrapper<Department>().eq(Department::getTier, 3).eq(Department::getStreetId, systemUser.getStreetId()));
                if(list.isEmpty()){
                    return page;
                }
                // 是管理员 可以看到下派来的  也可以看到上派待审核的
                page =  baseMapper.selectComplaintPage5(page, query,systemUser.getStreetId(),list.stream().map(Department::getId).collect(Collectors.toList()));
                page =  baseMapper.selectComplaintPage5(page, query,systemUser.getStreetId(),null);
            }else {
                // 不是管理员 看指派给我的
                page =  baseMapper.selectComplaintPage4(page, query, systemUser.getOneDepartmentId());
@@ -312,12 +312,8 @@
        }else if(accountLevel==4){
            // 社区
            if(systemUser.getSystemRoleId()==1){
                List<Department> list = departmentService.list(new LambdaQueryWrapper<Department>().eq(Department::getTier, 4).eq(Department::getCommunityId, systemUser.getCommunityId()));
                if(list.isEmpty()){
                    return page;
                }
                // 是管理员
                page =  baseMapper.selectComplaintPage6(page, query,systemUser.getCommunityId(),list.stream().map(Department::getId).collect(Collectors.toList()));
                page =  baseMapper.selectComplaintPage6(page, query,systemUser.getCommunityId(),null);
            }else {
                // 不是管理员 看到负责社区的所有诉求  和 上级下派来的诉求
                page =  baseMapper.selectComplaintPage4(page, query, systemUser.getOneDepartmentId());
@@ -338,7 +334,6 @@
        // 获取身份
        IdentityInformation currentIdentityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfo);
        Integer identity = currentIdentityInformation.getIdentity();
        SystemUserLevel systemUserLevel = currentIdentityInformation.getSystemUserLevel();
        SystemUser systemUser1 = currentIdentityInformation.getSystemUser();
        ComplaintAuditRecord one = complaintAuditRecordService.getOne(new LambdaQueryWrapper<ComplaintAuditRecord>()
                .eq(ComplaintAuditRecord::getComplaintId, vo.getId())
@@ -364,7 +359,7 @@
                }
            }*/
            //当前身份是管理员
            if (2 == identity && systemUserLevel.getLevel().compareTo(vo.getReportType()) == 0 && (systemUserLevel.getLevel() != 5)) {
            if (2 == identity && systemUser1.getAccountLevel().compareTo(vo.getReportType()) == 0 && (systemUser1.getAccountLevel() != 5)) {
                vo.setListControlsButtonStatus(0);
            }
            //如果当前身份是党员
@@ -389,7 +384,7 @@
                    }*/
                    if (identity == 2) {
                        //非党员用户,必须是管理员有权限
                        if (systemUserLevel.getLevel().compareTo(one.getReportType()) == 0) {
                        if (systemUser1.getAccountLevel().compareTo(one.getReportType()) == 0) {
                            vo.setListControlsButtonStatus(0);
                        }
                    }
@@ -403,7 +398,7 @@
                            .last(" limit 0, 1"));
                    if (null != one1) {
                        //非党员用户,必须是管理员有权限
                        if (identity == 2 && systemUserLevel.getLevel().compareTo(one1.getReportType()) == 0 && systemUserLevel.getLevel() != 5) {
                        if (identity == 2 && systemUser1.getAccountLevel().compareTo(one1.getReportType()) == 0 && systemUser1.getAccountLevel()!= 5) {
                            vo.setListControlsButtonStatus(0);
                        }
                        /*if (systemUserByPhone.isPresent()) {
@@ -435,7 +430,7 @@
                            }
                        }*/
                        //当前身份是管理员
                        if (2 == identity && systemUserLevel.getLevel().compareTo(vo.getReportType()) == 0 && (systemUserLevel.getLevel() != 5)) {
                        if (2 == identity && systemUser1.getAccountLevel().compareTo(vo.getReportType()) == 0 && (systemUser1.getAccountLevel()!= 5)) {
                            vo.setListControlsButtonStatus(0);
                        }
                        //如果当前身份是党员
@@ -460,7 +455,7 @@
                            vo.setListControlsButtonStatus(0);
                        }
                    }*/
                    if (2 == identity && systemUserLevel.getLevel().compareTo(one.getReportType()) == 0) {
                    if (2 == identity && systemUser1.getAccountLevel().compareTo(one.getReportType()) == 0) {
                        vo.setListControlsButtonStatus(0);
                    }
                }
@@ -474,7 +469,7 @@
            String targetId = "";
            Integer accountLevel = 5;
            //获取当前身份,1=党员,2=管理员
            accountLevel = systemUserLevel.getLevel();
            accountLevel =systemUser1.getAccountLevel();
            switch (accountLevel) {
                case 1:
                    //市级
@@ -482,15 +477,15 @@
                    break;
                case 2:
                    //区县级
                    targetId = systemUserLevel.getDistrictsCode();
                    targetId = systemUser1.getDistrictsCode();
                    break;
                case 3:
                    //街道
                    targetId = systemUserLevel.getStreetId().toString();
                    targetId = systemUser1.getStreetId().toString();
                    break;
                case 4:
                    //社区
                    targetId = systemUserLevel.getCommunityId().toString();
                    targetId = systemUser1.getCommunityId().toString();
                    break;
                case 5:
                    //党员
@@ -529,7 +524,7 @@
                }
            }*/
            //当前不是党员身份,需要是管理员才有权限
            if (2 == identity && systemUserLevel.getLevel().compareTo(vo.getReportType()) == 0 && systemUserLevel.getLevel() != 5) {
            if (2 == identity && systemUser1.getAccountLevel().compareTo(vo.getReportType()) == 0 && systemUser1.getAccountLevel()!= 5) {
                vo.setEvaluateButtonStatus(0);
            }
            //当前是党员身份,只有是以党员身份提交的数据才有权限
@@ -564,10 +559,11 @@
        //获取当前身份,1=党员,2=管理员
        IdentityInformation identityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfoVO);
        Integer identity = identityInformation.getIdentity();
        ComplaintVO detail = baseMapper.getDetail(id);
        SystemUser systemUser = identityInformation.getSystemUser();
        //上级
        if (identity == 2) {
            SystemUserLevel systemUserLevel = identityInformation.getSystemUserLevel();
            accountLevel = systemUserLevel.getLevel();
            accountLevel = systemUser.getAccountLevel();
            switch (accountLevel) {
                case 1:
                    //市级
@@ -575,15 +571,15 @@
                    break;
                case 2:
                    //区县级
                    targetId = systemUserLevel.getDistrictsCode();
                    targetId = systemUser.getDistrictsCode();
                    break;
                case 3:
                    //街道
                    targetId = systemUserLevel.getStreetId().toString();
                    targetId = systemUser.getStreetId().toString();
                    break;
                case 4:
                    //社区
                    targetId = systemUserLevel.getCommunityId().toString();
                    targetId = systemUser.getCommunityId().toString();
                    break;
                case 5:
                    //党员
@@ -596,7 +592,51 @@
            PartyMember partyMember = partyMemberService.getPartyMemberByPhone(loginUserInfoVO.getPhone());
            targetId = partyMember.getId().toString();
        }
        ComplaintVO detail = baseMapper.getDetail(id);
        // 更新状态 此时status是表中的状态 未做变动
        // 如果是区级
        if(systemUser!=null) {
            if (systemUser.getAccountLevel() == 2) {
                if(detail.getNowLevel()==2 && detail.getAssignStatus()==0){
                    detail.setStatus(-1);
                }
                if (systemUser.getSystemRoleId() == 0) {
                    // 查是否是当前层级处理  不是则都是正在办理
                    if (detail.getNowLevel() != 4 && detail.getStatus() != 3 && detail.getStatus() != 8) {
                        detail.setStatus(0);
                    }
                }
            }
            if (systemUser.getAccountLevel() == 3) {
                if(detail.getNowLevel()==3 && detail.getAssignStatus()==0){
                    detail.setStatus(-1);
                }
                if (systemUser.getSystemRoleId() == 0) {
                    // 查是否是当前层级处理  不是则都是正在办理
                    if (detail.getNowLevel() != 3 && detail.getStatus() != 3 && detail.getStatus() != 8) {
                        detail.setStatus(0);
                    }
                }
            }
            if (systemUser.getAccountLevel() == 4) {
                if(detail.getNowLevel()==4 && detail.getAssignStatus()==0){
                    detail.setStatus(-1);
                }
                if (systemUser.getSystemRoleId() == 0) {
                    // 查是否是当前层级处理  不是则都是正在办理
                    if (detail.getNowLevel() != 4 && detail.getStatus() != 3 && detail.getStatus() != 8) {
                        detail.setStatus(0);
                    }
                }
            }
        }else {
            if(detail.getFirstStatus()==1){
                detail.setStatus(0);
            }else {
                detail.setStatus(-2);
            }
        }
        if (detail.getStatus().equals(0)) {
            List<ComplaintFlow> list = complaintFlowService.lambdaQuery().eq(ComplaintFlow::getComplaintId, id).orderByAsc(ComplaintFlow::getSort).list();
            detail.setComplaintFlows(list);
@@ -620,21 +660,20 @@
//        }
//        //已办结,显示评价按钮
//        int count = complaintCommentService.count(new LambdaQueryWrapper<ComplaintComment>().eq(ComplaintComment::getComplaintId, detail.getId()).eq(ComplaintComment::getDelFlag, 0));
//        if(detail.getStatus() == 3 && 0 == count){
//            if(systemUserByPhone.isPresent()){
//                SystemUser systemUser = systemUserByPhone.get();
//                Integer isAdmin = systemUser.getIsAdmin();
//                if(accountLevel.compareTo(detail.getReportType()) == 0 && ((accountLevel != 5 && 1 == isAdmin) || accountLevel == 5)){
//                    detail.setEvaluateButtonStatus(0);
//                }
//            }else{
//                if(detail.getReportType() == 5){
//                    detail.setEvaluateButtonStatus(0);
//                }
//            }
//        }
        //已办结,显示评价按钮
        int count = complaintCommentService.count(new LambdaQueryWrapper<ComplaintComment>().eq(ComplaintComment::getComplaintId, detail.getId()).eq(ComplaintComment::getDelFlag, 0));
        if(detail.getStatus() == 3 && 0 == count){
            if(systemUserByPhone.isPresent()){
                Integer isAdmin = systemUser.getIsAdmin();
                if(accountLevel.compareTo(detail.getReportType()) == 0 && ((accountLevel != 5 && 1 == isAdmin) || accountLevel == 5)){
                    detail.setEvaluateButtonStatus(0);
                }
            }else{
                if(detail.getReportType() == 5){
                    detail.setEvaluateButtonStatus(0);
                }
            }
        }
        return detail;
    }
@@ -691,8 +730,7 @@
        if (identityInformationVO.getIdentity() == 2) {
            //1=党员,2=管理员
            SystemUser systemUser = identityInformationVO.getSystemUser();
            SystemUserLevel systemUserLevel = identityInformationVO.getSystemUserLevel();
            accountLevel = systemUserLevel.getLevel();
            accountLevel = systemUser.getAccountLevel();
            name = systemUser.getName();
        } else if (identityInformationVO.getIdentity() == 1) {
            accountLevel = 5;
@@ -740,6 +778,7 @@
        SystemUser adminUser = identityInformationVO.getSystemUser();
        Long superiorId;
        Long lastSuperiorId;
        int reportType;
        int reporterLevel;
        Long reporterId = null;
@@ -748,7 +787,9 @@
        int nowLevel=0;
        if (identityInformationVO.getIdentity() == 1) {
            PartyMember partyMember = partyMemberService.getPartyMemberByPhone(phone);
            superiorId = partyMember.getCommunityId();
            superiorId = Long.valueOf(partyMember.getStreetId());
            lastSuperiorId= partyMember.getCommunityId();
            reporterId = partyMember.getId();
            reportType = 4;
            reporterLevel = 5;
@@ -769,11 +810,16 @@
            // 使用基本类型比较并补充默认分支
            if (accountLevel == ReportTypeEnum.COMMUNITY.getCode()) {
                superiorId = Long.parseLong(adminUser.getStreetId());
                 lastSuperiorId = adminUser.getCommunityId();
                reporterId = adminUser.getCommunityId();
                nowLevel = 3;
            } else if (accountLevel == ReportTypeEnum.STREET.getCode()) {
                superiorId = Long.parseLong(adminUser.getDistrictsCode());
                lastSuperiorId = Long.valueOf(adminUser.getStreetId());
                reporterId = Long.parseLong(adminUser.getStreetId());
                nowLevel = 2;
            } else {
@@ -814,7 +860,9 @@
            complaint.setStatus(0);
        }
        complaint.setSuperiorId(superiorId);
        complaint.setLastSuperiorId(lastSuperiorId);
        complaint.setNowLevel(nowLevel);
        complaint.setLastLevel(nowLevel+1);
        complaint.setAssignStatus(0);
        updateById(complaint);
@@ -840,7 +888,7 @@
        complaintAuditRecord.setComment(dto.getComment());
        complaintAuditRecord.setSort(count + 1);
        complaintAuditRecord.setDepartmentName(departmentName);
        complaintAuditRecord.setReporterLevel(reporterLevel);
        complaintAuditRecord.setReporterLevel(nowLevel);
        complaintAuditRecord.setReporterId(reporterId);
        complaintAuditRecord.setApplyName(reporter);
        complaintAuditRecord.setApplyPhone(phone);
@@ -946,11 +994,14 @@
                break;
            case 4:
                superiorId = systemUser.getCommunityId();
                nowLevel=4;
                break;
        }
        complaint.setSuperiorId(superiorId);
        complaint.setLastSuperiorId(superiorId);
        complaint.setAssignStatus(0);
        complaint.setNowLevel(nowLevel);
        complaint.setLastLevel( nowLevel);
        this.updateById(complaint);
        complaintAuditRecord.setSuperiorId(superiorId);
@@ -964,35 +1015,32 @@
        IdentityInformation identityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfoVO);
        SystemUser systemUser = identityInformation.getSystemUser();
        SystemUserLevel systemUserLevel = identityInformation.getSystemUserLevel();
        if (identityInformation.getIdentity() != 2) {
            throw new ServiceException("无权审核");
        }
        Long superiorId = 0L;
        switch (systemUserLevel.getLevel()) {
        switch (systemUser.getAccountLevel()) {
            case 1:
                superiorId = 510400L;//默认市级
                break;
            case 2:
                superiorId = Long.parseLong(systemUserLevel.getDistrictsCode());
                superiorId = Long.parseLong(systemUser.getDistrictsCode());
                break;
            case 3:
                superiorId = Long.parseLong(systemUserLevel.getStreetId());
                superiorId = Long.parseLong(systemUser.getStreetId());
                break;
            case 4:
                superiorId = systemUserLevel.getCommunityId();
                superiorId = systemUser.getCommunityId();
                break;
        }
        //查询上报审核记录
        ComplaintAuditRecord complaintAuditRecord = complaintAuditRecordService.lambdaQuery()
                .eq(ComplaintAuditRecord::getComplaintId, complaintReporAuditDTO.getId())
                .eq(ComplaintAuditRecord::getAuditType, 2)
                .eq(ComplaintAuditRecord::getLatestFlag, true)
                .eq(ComplaintAuditRecord::getReportType, systemUserLevel.getLevel())
                .eq(ComplaintAuditRecord::getReportType, systemUser.getAccountLevel())
                .eq(ComplaintAuditRecord::getSuperiorId, superiorId)
                .last("LIMIT 1").one();
        if (Objects.isNull(complaintAuditRecord)) {
@@ -1001,6 +1049,14 @@
        complaintAuditRecord.setAuditorName(systemUser.getName());
        complaintAuditRecord.setAuditorPhone(systemUser.getPhone());
        complaintAuditRecord.setAuditTime(new Date());
        if(systemUser.getSystemRoleId()!=1 || systemUser.getAccountLevel()!=complaintAuditRecord.getReporterLevel()){
             throw new ServiceException("无权审核");
        }
        if (complaintReporAuditDTO.getAuditResult().equals(1)) {
            complaintAuditRecord.setAuditStatus(1);
@@ -1013,10 +1069,12 @@
            complaintAuditRecord2.setReportType(complaintAuditRecord.getReporterLevel());
            complaintFlowService.createFlow(complaintAuditRecord2, 0, loginUserInfoVO.getUserId());
            // 通过修改状态
            // 通过修改状态  已经修改superiorId  和层级  不需要修改 superiorId
            Complaint complaint = this.getById(complaintReporAuditDTO.getId());
            complaint.setAssignPersonId(complaintReporAuditDTO.getDeptId());
            complaint.setAssignStatus(1);
             complaint.setLastSuperiorId(complaint.getSuperiorId());
             complaint.setLastLevel(complaint.getNowLevel());
            this.updateById(complaint);
@@ -1025,6 +1083,15 @@
            complaintAuditRecord.setAuditStatus(2);
            complaintAuditRecord.setAuditorId(loginUserInfoVO.getUserId());
            complaintAuditRecordService.updateById(complaintAuditRecord);
            // 还原上次的状态
            Complaint complaint = this.getById(complaintReporAuditDTO.getId());
            complaint.setAssignPersonId(complaintReporAuditDTO.getDeptId());
            complaint.setAssignStatus(1);
            complaint.setSuperiorId(complaint.getLastSuperiorId());
            complaint.setNowLevel(complaint.getLastLevel());
            this.updateById(complaint);
        }
    }
@@ -1035,11 +1102,11 @@
        IdentityInformation identityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfoVO);
        SystemUser systemUser = identityInformation.getSystemUser();
        SystemUserLevel systemUserLevel = identityInformation.getSystemUserLevel();
        Long superiorId;
        int reportType;
        String departmentName = "";
        String reporter = "";
        int nowLevel=4;
        if (identityInformation.getIdentity() == 1) {
            PartyMember partyMember = partyMemberService.getPartyMemberByPhone(loginUserInfoVO.getPhone());
            superiorId = partyMember.getCommunityId();
@@ -1050,7 +1117,7 @@
            departmentName = partyMember.getDistricts() + "-" + partyMember.getStreet() + "-" + partyMember.getCommunity();
            reporter = partyMember.getName();
        } else if (identityInformation.getIdentity() == 2) {
            int accountLevel = systemUserLevel.getLevel(); // 改为基本类型
            int accountLevel = systemUser.getAccountLevel(); // 改为基本类型
            if (accountLevel == 2) {
                throw new ServiceException("区级账号,无法延期申请!");
            }
@@ -1059,13 +1126,13 @@
            // 使用基本类型比较并补充默认分支
            if (accountLevel == ReportTypeEnum.COMMUNITY.getCode()) {
                superiorId = Long.parseLong(systemUserLevel.getStreetId());
                superiorId = Long.parseLong(systemUser.getStreetId());
            } else if (accountLevel == ReportTypeEnum.STREET.getCode()) {
                superiorId = Long.parseLong(systemUserLevel.getDistrictsCode());
                superiorId = Long.parseLong(systemUser.getDistrictsCode());
                nowLevel =4;
            } else if (accountLevel == ReportTypeEnum.DISTRICT.getCode()) {
                superiorId = 510400L; // 攀枝花市
            } else if (accountLevel == ReportTypeEnum.PARTY.getCode()) {
                superiorId = systemUserLevel.getCommunityId();
                superiorId = Long.valueOf(systemUser.getDistrictsCode());
                nowLevel =3;// 攀枝花市
            } else {
                // 处理未预期的账号等级
                throw new ServiceException("未知的账号等级");
@@ -1073,22 +1140,22 @@
            //查询社区信息
            switch (accountLevel) {
                case 2:
                    BcRegion region = bcRegionService.getDistrictByCode(systemUserLevel.getDistrictsCode().toString());
                    BcRegion region = bcRegionService.getDistrictByCode(systemUser.getDistrictsCode().toString());
                    if (Objects.nonNull(region)) {
                        departmentName = region.getRegionName();
                    }
                    break;
                case 3:
                    ComStreet street = comStreetService.getById(systemUserLevel.getStreetId().toString());
                    ComStreet street = comStreetService.getById(systemUser.getStreetId().toString());
                    if (Objects.nonNull(street)) {
                        BcRegion district = bcRegionService.getDistrictByCode(street.getAreaCode().toString());
                        departmentName = Objects.nonNull(district) ? district.getRegionName() + "-" + street.getName() : street.getName();
                    }
                    break;
                case 4:
                    ComAct act = comActService.getById(systemUserLevel.getCommunityId());
                    ComAct act = comActService.getById(systemUser.getCommunityId());
                    if (Objects.nonNull(act)) {
                        ComStreet street2 = comStreetService.getById(systemUserLevel.getStreetId().toString());
                        ComStreet street2 = comStreetService.getById(systemUser.getStreetId().toString());
                        BcRegion district = bcRegionService.getDistrictByCode(act.getAreaCode());
                        departmentName = Objects.nonNull(district) && Objects.nonNull(street2) ?
                                district.getRegionName() + "-" + street2.getName() + "-" + act.getName() : act.getName();
@@ -1123,6 +1190,13 @@
        record1.setApplyName(reporter);
        record1.setApplyPhone(loginUserInfoVO.getPhone());
        complaintAuditRecordService.save(record1);
        Complaint byId = this.getById(dto.getComplaintId());
        byId.setSuperiorId(superiorId);
        byId.setNowLevel( nowLevel);
         this.updateById(byId);
    }
@@ -1802,7 +1876,7 @@
        IdentityInformation currentIdentityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfo);
        if (currentIdentityInformation.getIdentity().equals(2)) {
            SystemUser systemUser = currentIdentityInformation.getSystemUser();
            if(systemUser.getIsDeptAdmin()==0){
            if(systemUser.getSystemRoleId()!=1){
                throw new ServiceException("你没有分配权限");
            }
@@ -1835,6 +1909,7 @@
            complaint.setAssignPersonId(userId);
            complaint.setFirstStatus(1);
            complaint.setAssignStatus(1);
             baseMapper.updateById(complaint);
        }else {
            throw new ServiceException("你没有分配权限");
        }
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/service/impl/IdentityInformationServiceImpl.java
@@ -46,7 +46,6 @@
                .ne(SystemUser::getStatus, 3)
                .one();
        // 获取身份
        UserIdentityDTO userIdentityDTO = (UserIdentityDTO) redisUtils.get("identity:" + phone);
        // 权限列表
        List<PermissionsVO> permissions = new ArrayList<>();
@@ -54,85 +53,91 @@
        identityInformationVO.setPartyMember(partyMember);
        identityInformationVO.setSystemUser(systemUser);
        // 获取提示内容是否确认
        Integer isConfirm = (Integer) redisUtils.get("confirmContent:" + phone);
        identityInformationVO.setIsConfirmContent(isConfirm != null && isConfirm == 1);
        // 获取当前身份
        if (userIdentityDTO == null){
            handleSystemUserLevelId(phone, systemUser, 2, identityInformationVO, partyMember);
        if(systemUser!=null){
            identityInformationVO.setIdentity(2);
            identityInformationVO.setIsFrozen(systemUser.getStatus() == 2);
        }else {
            Integer identity = userIdentityDTO.getIdentity();
            identityInformationVO.setIdentity(identity);
            if (identity == 1 && (partyMember == null || partyMember.getAuditStatus() != 1)){
                identityInformationVO.setIdentity(null);
                redisUtils.remove("identity:" + phone);
            }else if (identity == 2 && systemUser == null){
                identityInformationVO.setIdentity(null);
                redisUtils.remove("identity:" + phone);
            }else if (identity == 2){
                Integer levelId = userIdentityDTO.getLevelId();
                //验证账号所属层级
                SystemUserLevel userLevel = systemUserLevelService.getById(levelId);
                if (Objects.isNull(userLevel)) {
                    handleSystemUserLevelId(phone, systemUser, identity, identityInformationVO,partyMember);
                } else {
                    identityInformationVO.setLevelId(levelId);
                    identityInformationVO.setSuperviseFlag(userLevel.getSuperviseFlag());
                    identityInformationVO.setIdentity(identity);
                    identityInformationVO.setSystemUserLevel(userLevel);
                }
            }
            identityInformationVO.setIdentity(1);
            identityInformationVO.setIsFrozen(partyMember != null && partyMember.getFreezeStatus() == 1);
        }
        // 获取是否冻结
        if (identityInformationVO.getIdentity() != null) {
            if (identityInformationVO.getIdentity() == 1) {
                identityInformationVO.setIsFrozen(partyMember != null && partyMember.getFreezeStatus() == 1);
            } else if (identityInformationVO.getIdentity() == 2) {
                identityInformationVO.setIsFrozen(systemUser != null && systemUser.getStatus() == 2);
            }
        } else {
            identityInformationVO.setIsFrozen(false);
        }
        // 是否认证党员
        identityInformationVO.setIsPartymember(partyMember != null && partyMember.getAuditStatus().equals(1));
        // 是否确认党员信息
        identityInformationVO.setIsConfirm(partyMember != null && partyMember.getIsConfirm() == 1);
        // 党员审核状态
        identityInformationVO.setAuditStatus(partyMember == null ? null : partyMember.getAuditStatus());
        // 封装管理员信息
        // 获取提示内容是否确认
//        Integer isConfirm = (Integer) redisUtils.get("confirmContent:" + phone);
//        identityInformationVO.setIsConfirmContent(isConfirm != null && isConfirm == 1);
//
//        // 获取当前身份
//        if (o1 == null){
//            handleSystemUserLevelId(phone, systemUser, 2, identityInformationVO, partyMember);
//        }else {
//            UserIdentityDTO userIdentityDTO = (UserIdentityDTO) o1;
//            Integer identity = userIdentityDTO.getIdentity();
//            identityInformationVO.setIdentity(identity);
//            if (identity == 1 && (partyMember == null || partyMember.getAuditStatus() != 1)){
//                identityInformationVO.setIdentity(null);
//                redisUtils.remove("identity:" + phone);
//            }else if (identity == 2 && systemUser == null){
//                identityInformationVO.setIdentity(null);
//                redisUtils.remove("identity:" + phone);
//            }else if (identity == 2){
//                Integer levelId = userIdentityDTO.getLevelId();
//                //验证账号所属层级
//                SystemUserLevel userLevel = systemUserLevelService.getById(levelId);
//                if (Objects.isNull(userLevel)) {
//                    handleSystemUserLevelId(phone, systemUser, identity, identityInformationVO,partyMember);
//                } else {
//                    identityInformationVO.setLevelId(levelId);
//                    identityInformationVO.setSuperviseFlag(userLevel.getSuperviseFlag());
//                    identityInformationVO.setIdentity(identity);
//                    identityInformationVO.setSystemUserLevel(userLevel);
//                }
//            }
//        }
//
//
//
//        // 获取是否冻结
//        if (identityInformationVO.getIdentity() != null) {
//            if (identityInformationVO.getIdentity() == 1) {
//                identityInformationVO.setIsFrozen(partyMember != null && partyMember.getFreezeStatus() == 1);
//            } else if (identityInformationVO.getIdentity() == 2) {
//                identityInformationVO.setIsFrozen(systemUser != null && systemUser.getStatus() == 2);
//            }
//        } else {
//            identityInformationVO.setIsFrozen(false);
//        }
//
//        // 是否认证党员
//        identityInformationVO.setIsPartymember(partyMember != null && partyMember.getAuditStatus().equals(1));
//        // 是否确认党员信息
//        identityInformationVO.setIsConfirm(partyMember != null && partyMember.getIsConfirm() == 1);
//        // 党员审核状态
//        identityInformationVO.setAuditStatus(partyMember == null ? null : partyMember.getAuditStatus());
//
//        // 封装管理员信息
        if (systemUser != null) {
            List<SystemUserLevel> userLevels = systemUserLevelService.getListBySystemUserId(systemUser.getId());
            for (SystemUserLevel userLevel : userLevels) {
                Integer accountLevel = userLevel.getLevel();
                String districts = userLevel.getDistricts();
                String street = userLevel.getStreet();
                String community = userLevel.getCommunity();
            Integer accountLevel = systemUser.getAccountLevel();
                String districts = systemUser.getDistricts();
                String street = systemUser.getStreet();
                String community = systemUser.getCommunity();
                PermissionsVO adminPermissions = new PermissionsVO();
                adminPermissions.setIdentity(2);
                adminPermissions.setIsFrozen(systemUser.getStatus() == 2);
                adminPermissions.setLevelId(userLevel.getId());
                adminPermissions.setLevelId(accountLevel);
                if (accountLevel == 1) {
                    adminPermissions.setName(String.format("%s%s", "攀枝花市", "管理员"));
                } else if (accountLevel == 2) {
                } else if (accountLevel == 2 && systemUser.getSystemRoleId()==1) {
                    adminPermissions.setName(String.format("%s%s", districts, "管理员"));
                } else if (accountLevel == 3) {
                } else if (accountLevel == 3  && systemUser.getSystemRoleId()==1) {
                    adminPermissions.setName(String.format("%s%s%s", districts, street, "管理员"));
                } else if (accountLevel == 4) {
                } else if (accountLevel == 4  && systemUser.getSystemRoleId()==1) {
                    adminPermissions.setName(String.format("%s%s%s%s", districts, street, community, "管理员"));
                } else {
                    adminPermissions.setName("未知");
                }
                permissions.add(adminPermissions);
            }
        }
        // 封装党员信息
//
//        // 封装党员信息
        if (partyMember != null && partyMember.getAuditStatus().equals(1)) {
            PermissionsVO partyMemberPermissions = new PermissionsVO();
            partyMemberPermissions.setIdentity(1);
@@ -158,18 +163,16 @@
            Optional<SystemUserLevel> levelOptional = systemUserLevelService.getByLevelByUserId(systemUser.getId());
            if (levelOptional.isPresent()) {
                // 系统用户有关联的用户级别
                SystemUserLevel userLevel = levelOptional.get();
                Integer userLevel = systemUser.getAccountLevel();
                // 设置用户身份信息为系统用户身份
                identityInformationVO.setIdentity(identity);
                identityInformationVO.setLevelId(userLevel.getId());
                identityInformationVO.setSuperviseFlag(userLevel.getSuperviseFlag());
                identityInformationVO.setSystemUserLevel(userLevel);
                identityInformationVO.setLevelId(userLevel);
                // 存储到Redis
                UserIdentityDTO build = UserIdentityDTO.builder()
                        .identity(identity)
                        .levelId(userLevel.getId())
                        .levelId(userLevel)
                        .build();
                redisUtils.set("identity:" + phone, build);
            } else if (partyMember != null && partyMember.getAuditStatus() == 1) {
@@ -214,10 +217,6 @@
        SystemUser systemUser = identityInformation.getSystemUser();
        if (identityInformation.getIdentity() == 2 && Objects.isNull(systemUser)) {
            throw new ServiceException("管理员信息不存在");
        }
        SystemUserLevel systemUserLevel = identityInformation.getSystemUserLevel();
        if (identityInformation.getIdentity() == 2&&Objects.isNull(systemUserLevel)) {
            throw new ServiceException("管理员所属层级不存在");
        }
        PartyMember partyMember = identityInformation.getPartyMember();
        if (identityInformation.getIdentity() == 1 && Objects.isNull(partyMember)) {
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/service/impl/SystemUserServiceImpl.java
@@ -53,7 +53,7 @@
    }
    /**
     * 根据手机号码查询小程序用户在三个身边的上级角色用户
     * 根据手机号码查询小程序用户在西区纪委的上级角色用户
     * @param phone
     * @return
     */
springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/resources/mapper/ComplaintMapper.xml
@@ -184,12 +184,12 @@
        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
        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 and scar.audit_type = 2 THEN 6
        ELSE sc.status
        END          AS status,
        END AS status,
        sc.report_type,
        sc.superior_type,
        sc.superior_id,
@@ -211,6 +211,12 @@
        sc.longitude,
        sc.report_user_name,
        sc.report_user_phone,
        sc.superior_id,
        sc.last_superior_id,
        sc.now_level,
        sc.last_level,
        sc.assign_status,
        sc.first_status as firstStatus,
        scar.audit_type,
        scar.audit_status,
        scar.comment,
@@ -854,7 +860,7 @@
        FROM west_complaint sc
        LEFT JOIN west_complaint_audit_record scar ON scar.complaint_id = sc.id and scar.latest_flag = 1
        WHERE sc.create_by =#{query.userId}
        ) as t1
        ) as t1 where 1=1
        <if test="query.status !=null">
            and t1.status = #{query.status}
        </if>
@@ -875,13 +881,19 @@
            sc.description_content,
            sc.images,
            sc.videos,
            case
            WHEN sc.assign_status = 0 THEN -1
            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 and scar.audit_type = 2 THEN 6
            ELSE sc.status
            END AS status,
        case
            WHEN  sc.now_level = 2  and sc.assign_status =0 THEN -1
        WHEN  sc.now_level = 2 and sc.status = 0 and scar.audit_type = 1 AND scar.audit_status = 0 THEN 7
        WHEN  sc.now_level = 2 and sc.status = 0 and scar.audit_type = 2 AND scar.audit_status = 0 THEN 5
        WHEN  sc.now_level = 2 and sc.status = 0 and scar.audit_status = 2 and scar.audit_type = 2 THEN 6
        WHEN sc.`status` =8 THEN 3
        WHEN sc.`status` =3 THEN 3
        ELSE 0
        END AS status,
        CASE
        WHEN sc.status = 8  THEN 1
        ELSE 0
        END AS evaluateButtonStatus,
        sc.report_type,
        sc.superior_id,
        sc.create_by,
@@ -915,7 +927,7 @@
        sc.assign_status AS assignStatus
        FROM west_complaint sc
        LEFT JOIN west_complaint_audit_record scar ON scar.complaint_id = sc.id and scar.latest_flag = 1
              ) as t1
              ) as t1 where 1=1
        <if test="query.status !=null">
            and t1.status = #{query.status}
        </if>
@@ -923,7 +935,7 @@
    </select>
    <select id="selectComplaintPage5" resultType="com.panzhihua.westcommittee.model.vo.ComplaintVO">
        select * from (
        SELECT
        SELECT distinct
            sc.id,
            sc.serial_number,
            sc.time,
@@ -936,13 +948,18 @@
            sc.description_content,
            sc.images,
            sc.videos,
            case
            WHEN sc.assign_status = 0  THEN -1
            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 and scar.audit_type = 2 THEN 6
            ELSE sc.status
        case
        WHEN  (sc.now_level = 3 or sc.last_level = 3) and sc.status = 0 and scar.audit_type = 1 AND scar.audit_status = 0 THEN 7
        WHEN   (sc.now_level = 3 or sc.last_level = 3) and sc.status = 0 and scar.audit_type = 2 AND scar.audit_status = 0 THEN 5
        WHEN   (sc.now_level = 3 or sc.last_level = 3) and sc.status = 0 and scar.audit_status = 2 and scar.audit_type = 2 THEN 6
        WHEN sc.`status` =8 THEN 3
        WHEN sc.`status` =3 THEN 3
        ELSE 0
        END AS status,
        CASE
        WHEN sc.status = 8  THEN 1
        ELSE 0
        END AS evaluateButtonStatus,
        sc.report_type,
        sc.superior_id,
        sc.create_by,
@@ -976,13 +993,10 @@
        sc.assign_status AS assignStatus
        FROM west_complaint sc
        LEFT JOIN west_complaint_audit_record scar ON scar.complaint_id = sc.id and scar.latest_flag = 1
        where (
            sc.assign_person_id in
            <foreach collection="ids"  item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
            ) or (superior_id =#{streetId} and sc.now_level=3)
        ) as t1
        where
           (sc.superior_id =#{streetId} and 3 =sc.now_level) or (sc.last_superior_id = #{streetId} and  3 =sc.last_level)
        or (4 =sc.now_level)
        ) as t1 where 1=1
        <if test="query.status !=null">
            and t1.status = #{query.status}
        </if>
@@ -1003,10 +1017,16 @@
            sc.description_content,
            sc.images,
            sc.videos,
            case
                WHEN  sc.status!=3 and sc.status !=8 THEN 0
                ELSE 3
                END AS status,
        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 and scar.audit_type = 2 THEN 6
        ELSE sc.status
         END AS status,
        CASE
        WHEN sc.status = 8  THEN 1
        ELSE 0
        END AS evaluateButtonStatus,
            sc.report_type,
            sc.superior_id,
            sc.create_by,
@@ -1040,8 +1060,8 @@
            sc.assign_status AS assignStatus
        FROM west_complaint sc
                 LEFT JOIN west_complaint_audit_record scar ON scar.complaint_id = sc.id and scar.latest_flag = 1
        WHERE assign_person_id =#{oneDepartmentId}
            ) as t1
        WHERE sc.assign_person_id =#{oneDepartmentId}
            ) as t1 where 1=1
        <if test="query.status !=null">
            and t1.status = #{query.status}
        </if>
@@ -1049,7 +1069,7 @@
    </select>
    <select id="selectComplaintPage6" resultType="com.panzhihua.westcommittee.model.vo.ComplaintVO">
        select * from (
        SELECT
        SELECT distinct
        sc.id,
        sc.serial_number,
        sc.time,
@@ -1063,12 +1083,18 @@
        sc.images,
        sc.videos,
        case
        WHEN sc.assign_status = 0  THEN -1
        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 and scar.audit_type = 2 THEN 6
        ELSE sc.status
        WHEN  sc.now_level = 4 and  sc.assign_status = 0 THEN -1
        WHEN  (sc.now_level = 4 or sc.last_level = 4) and sc.status = 0 and scar.audit_type = 1 AND scar.audit_status = 0 THEN 7
        WHEN  (sc.now_level = 4 or sc.last_level = 4) and sc.status = 0 and scar.audit_type = 2 AND scar.audit_status = 0 THEN 5
        WHEN  (sc.now_level = 4 or sc.last_level = 4) and sc.status = 0 and scar.audit_status = 2 and scar.audit_type = 2 THEN 6
        WHEN sc.`status` =8 THEN 3
        WHEN sc.`status` =3 THEN 3
        ELSE 0
        END AS status,
        CASE
        WHEN sc.status = 8  THEN 1
        ELSE 0
        END AS evaluateButtonStatus,
        sc.report_type,
        sc.superior_id,
        sc.create_by,
@@ -1102,13 +1128,9 @@
        sc.assign_status AS assignStatus
        FROM west_complaint sc
        LEFT JOIN west_complaint_audit_record scar ON scar.complaint_id = sc.id and scar.latest_flag = 1
        where (
        sc.assign_person_id in
        <foreach collection="ids"  item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
        ) or (superior_id =#{communityId} and sc.now_level=4)
        ) as t1
        where
           (sc.superior_id =#{communityId} and sc.now_level=4) or (sc.last_superior_id = #{communityId} and sc.last_level=4)
        ) as t1  where 1=1
        <if test="query.status !=null">
            and t1.status = #{query.status}
        </if>