| | |
| | | @ApiModelProperty(value = "上报人") |
| | | private String reporter; |
| | | |
| | | @ApiModelProperty(value = "上报人id") |
| | | Long reporterId; |
| | | |
| | | private Long auditCreateBy; |
| | | |
| | | @ApiModelProperty("上报人层级 1=市级账号,2=区县账号,3=街道账号,4=社区账号 5=党员账号") |
| | | private Integer reporterLevel; |
| | | |
| | | @ApiModelProperty(value = "上报人联系方式") |
| | | private String reporterPhone; |
| | | |
| | |
| | | |
| | | @Override |
| | | public Page<ComplaintVO> complaintList(ComplaintQuery query, LoginUserInfoVO loginUserInfoVO) { |
| | | |
| | | |
| | | Page<ComplaintVO> page = new Page<>(query.getPageNum(), query.getPageSize()); |
| | | //判断当前登录用户级别,查询对应工单 |
| | | Optional<SystemUser> systemUserByPhone = systemUserService.getSystemUserAdminByPhone(loginUserInfoVO.getPhone()); |
| | |
| | | //获取当前身份,1=党员,2=管理员 |
| | | IdentityInformation identityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfoVO); |
| | | Integer identity = identityInformation.getIdentity(); |
| | | query.setUserId(loginUserInfoVO.getUserId()); |
| | | //上级 |
| | | if (systemUserByPhone.isPresent() && null != identity && identity == 2) { |
| | | SystemUser systemUser = systemUserByPhone.get(); |
| | |
| | | //查询对应诉求 |
| | | //page = baseMapper.selectComplaintPage(page, query, targetId, isSuperior); |
| | | page = baseMapper.selectComplaintPage1(page, query, accountLevel, targetId); |
| | | page.getRecords().forEach(s -> buttonPermission(s, systemUserByPhone, loginUserInfoVO)); |
| | | |
| | | page.getRecords().forEach(s -> { |
| | | buttonPermission(s, systemUserByPhone, loginUserInfoVO); |
| | | Integer auditButtonStatus = s.getAuditButtonStatus(); |
| | | if (auditButtonStatus == 1 && s.getStatus() == 5 && !Objects.equals(s.getAuditCreateBy(), loginUserInfoVO.getUserId())){ |
| | | s.setStatus(0); |
| | | } |
| | | }); |
| | | return page; |
| | | } |
| | | |
| | |
| | | sc.longitude, |
| | | scar.audit_type, |
| | | scar.audit_status, |
| | | scar.reporter_level, |
| | | scar.comment, |
| | | scar.create_time AS reportTime, |
| | | scar.system_user_id, |
| | | scar.create_by as auditCreateBy, |
| | | scar.reporter, |
| | | scar.reporter_id, |
| | | scar.department_name, |
| | | scar.department_id |
| | | FROM sgsb_complaint sc |
| | |
| | | and (sc.party_member_id = #{targetId} || sc.id in (select complaint_id from sgsb_complaint_audit_record where audit_type = 3 and audit_status = 1 and report_type = #{accountLevel} and superior_id = #{targetId})) |
| | | </if> |
| | | <if test="query.type!=null and query.type == 0"> |
| | | AND (scar.superior_id = #{targetId} or scar.create_by = #{query.userId}) |
| | | AND sc.status IN(0,1,2) and scar.audit_status = 0 |
| | | </if> |
| | | <if test="query.type!=null and query.type == 1"> |
| | | AND (sc.status IN(0,1,2) and scar.audit_status != 0 || sc.status IN(0,1,2) and scar.audit_status is null) |
| | | OR ( |
| | | scar.superior_id != #{targetId} AND scar.create_by != #{query.userId} |
| | | AND sc.status IN(0,1,2) and scar.audit_status = 0 |
| | | ) |
| | | </if> |
| | | <if test="query.type!=null and query.type == 2"> |
| | | AND sc.status IN (3,8) |