| | |
| | | private final RedisUtils redisUtils; |
| | | |
| | | @Override |
| | | public void saveComplaint(Complaint complaint, LoginUserInfoVO loginUserInfoVO) { |
| | | public String saveComplaint(Complaint complaint, LoginUserInfoVO loginUserInfoVO) { |
| | | String timeStr = null; |
| | | // 获取当前日期(年月日) |
| | | String datePrefix = new SimpleDateFormat("yyyyMMdd").format(new Date()); |
| | | |
| | |
| | | complaint.setReportUserName(loginUserInfoVO.getName()); |
| | | complaint.setReportUserPhone(loginUserInfoVO.getPhone()); |
| | | complaint.setSuperiorId(loginUserInfoVO.getCommunityId()); |
| | | |
| | | LocalDate localDate = LocalDate.now().plusDays(workOrderItemConfigService.getById(1).getCommunityHandlingTime()); |
| | | timeStr = localDate.toString(); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | complaint.setNowLevelSms(0); |
| | | // 保存诉求记录 |
| | | save(complaint); |
| | | return timeStr; |
| | | } |
| | | |
| | | @Override |
| | |
| | | complaintCompletionDTO.setId(complaint.getId()); |
| | | saveResult(complaintCompletionDTO, loginUserInfo); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Page<ComplaintVO> complaintList(ComplaintQuery query, LoginUserInfoVO loginUserInfoVO) { |
| | |
| | | if (systemUser != null) { |
| | | ComplaintAuditRecord one = complaintAuditRecordService.getOne(new LambdaQueryWrapper<ComplaintAuditRecord>().eq(ComplaintAuditRecord::getComplaintId, id).eq(ComplaintAuditRecord::getLatestFlag, 1).last("limit 1")); |
| | | if (systemUser.getAccountLevel() == 2) { |
| | | if (detail.getNowLevel() == 2 && detail.getAssignStatus() == 0 && one != null && one.getAuditStatus() == 1) { |
| | | if (detail.getStatus() != 3 && detail.getStatus() != 8 && detail.getNowLevel() == 2 && detail.getAssignStatus() == 0 && ((one != null && one.getAuditStatus() == 1)||(one != null && one.getAuditStatus() == 3) || one==null )) { |
| | | detail.setStatus(-1); |
| | | } |
| | | if (systemUser.getSystemRoleId() == 0) { |
| | | }else if (systemUser.getSystemRoleId() == 0) { |
| | | // 查是否是当前层级处理 不是则都是正在办理 |
| | | if (detail.getNowLevel() != 4 && detail.getStatus() != 3 && detail.getStatus() != 8) { |
| | | detail.setStatus(0); |
| | | } |
| | | } |
| | | if (detail.getFirstStatus() == 0) { |
| | | }else if (detail.getStatus() != 3 && detail.getStatus() != 8 && detail.getFirstStatus() == 0 && detail.getNowLevel()==2) { |
| | | detail.setStatus(5); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | if (systemUser.getAccountLevel() == 3) { |
| | | if (detail.getNowLevel() == 3 && detail.getAssignStatus() == 0 && one != null && one.getAuditStatus() == 1) { |
| | | if (detail.getStatus() != 3 && detail.getStatus() != 8 && detail.getNowLevel() == 3 && detail.getAssignStatus() == 0 && ((one != null && one.getAuditStatus() == 1)||(one != null && one.getAuditStatus() == 3) || one==null )) { |
| | | detail.setStatus(-1); |
| | | } |
| | | if (systemUser.getSystemRoleId() == 0) { |
| | | }else if (systemUser.getSystemRoleId() == 0) { |
| | | // 查是否是当前层级处理 不是则都是正在办理 |
| | | if (detail.getNowLevel() != 3 && detail.getStatus() != 3 && detail.getStatus() != 8) { |
| | | detail.setStatus(0); |
| | | } |
| | | } |
| | | if (detail.getFirstStatus() == 0) { |
| | | }else if (detail.getStatus() != 3 && detail.getStatus() != 8 && detail.getFirstStatus() == 0 && detail.getNowLevel()==3) { |
| | | detail.setStatus(5); |
| | | } |
| | | } |
| | | if (systemUser.getAccountLevel() == 4) { |
| | | if (detail.getNowLevel() == 4 && detail.getAssignStatus() == 0 && one != null && one.getAuditStatus() == 1) { |
| | | if (detail.getStatus() != 3 && detail.getStatus() != 8 && detail.getNowLevel() == 4 && detail.getAssignStatus() == 0 && ((one != null && one.getAuditStatus() == 1)||(one != null && one.getAuditStatus() == 3) || one==null )) { |
| | | detail.setStatus(-1); |
| | | } |
| | | if (systemUser.getSystemRoleId() == 0) { |
| | | }else if (systemUser.getSystemRoleId() == 0) { |
| | | // 查是否是当前层级处理 不是则都是正在办理 |
| | | if (detail.getNowLevel() != 4 && detail.getStatus() != 3 && detail.getStatus() != 8) { |
| | | detail.setStatus(0); |
| | | } |
| | | } |
| | | if (detail.getFirstStatus() == 0) { |
| | | }else if (detail.getStatus() != 3 && detail.getStatus() != 8 && detail.getFirstStatus() == 0 && detail.getNowLevel()==4) { |
| | | detail.setStatus(5); |
| | | } |
| | | } |
| | | } else { |
| | | if (detail.getFirstStatus() == 1 && detail.getStatus() != 3 && detail.getStatus() != 8) { |
| | | detail.setStatus(0); |
| | | } else if (detail.getFirstStatus() == 0) { |
| | | } else if (detail.getFirstStatus() == 0 && detail.getCreateBy().equals(loginUserInfoVO.getUserId())) { |
| | | detail.setStatus(5); |
| | | } else if (detail.getFirstStatus() == 1 && detail.getStatus() == 3) { |
| | | detail.setStatus(3); |
| | |
| | | buttonPermission(detail, systemUserByPhone, loginUserInfoVO); |
| | | Long reporterId = detail.getReporterId(); |
| | | Long superiorId = detail.getSuperiorId2(); |
| | | if (!String.valueOf(reporterId).equals(targetId) && !String.valueOf(superiorId).equals(targetId) && detail.getStatus() == 5) { |
| | | detail.setStatus(0); |
| | | } |
| | | // if (!String.valueOf(reporterId).equals(targetId) && !String.valueOf(superiorId).equals(targetId) && detail.getStatus() == 5 && systemUser==null) { |
| | | // detail.setStatus(0); |
| | | // } |
| | | |
| | | |
| | | // if (auditButtonStatus == 1 && detail.getStatus() == 5 && !Objects.equals(detail.getAuditCreateBy(), loginUserInfoVO.getUserId())){ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | return detail; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | } |
| | | Integer oneDepartmentId = adminUser.getOneDepartmentId(); |
| | | Department byId = departmentService.getById(oneDepartmentId); |
| | | List<Department> list1 = departmentService.list(new LambdaQueryWrapper<Department>().eq(Department::getTier, byId.getTier())); |
| | | LambdaQueryWrapper<Department> eq = new LambdaQueryWrapper<Department>().eq(Department::getTier, byId.getTier()); |
| | | if(byId.getTier()==2){ |
| | | eq.eq(Department::getDistrictsCode, byId.getDistrictsCode()); |
| | | } |
| | | if(byId.getTier()==3){ |
| | | eq.eq(Department::getStreetId, byId.getStreetId()); |
| | | } |
| | | if(byId.getTier()==4){ |
| | | eq.eq(Department::getCommunityId, byId.getCommunityId()); |
| | | } |
| | | List<Department> list1 = departmentService.list(eq); |
| | | for (Department department : list1) { |
| | | DispatchVO dispatchVO = new DispatchVO(); |
| | | dispatchVO.setId(department.getId().toString()); |
| | |
| | | .registerWriteHandler(new AutoColumnWidthStrategy()) |
| | | .doWrite(complaintExcels); |
| | | } |
| | | |
| | | // ComplaintVO(reporter=何健豪, reporterId=1676144498628919300, superiorId2=510403, auditCreateBy=1892421828085837826, reporterLevel=2, reporterPhone=null, departmentName=西区-金江镇, reportTime=Tue Jun 03 15:06:01 CST 2025, comment=1111, nickname=null, phone=null, auditorName=null, auditorPhone=null, rejectReason=null, auditTime=null, complaintFlows=null, complaintProgresses=null, auditButtonStatus=null, withdrawButtonStatus=null, rate=null, complaintComment=null, listControlsButtonStatus=null, evaluateButtonStatus=0, voiceFileList=null, progressCount=null, assignmentCount=null, reportCount=null, remindStatus=0, remindTime=null, reportStr=自办, deptName=aa) |
| | | // ComplaintVO(reporter=null, reporterId=null, superiorId2=null, auditCreateBy=null, reporterLevel=null, reporterPhone=null, departmentName=null, reportTime=null, comment=null, nickname=null, phone=null, auditorName=null, auditorPhone=null, rejectReason=null, auditTime=null, complaintFlows=null, complaintProgresses=null, auditButtonStatus=null, withdrawButtonStatus=null, rate=null, complaintComment=null, listControlsButtonStatus=null, evaluateButtonStatus=0, voiceFileList=null, progressCount=null, assignmentCount=null, reportCount=null, remindStatus=0, remindTime=null, reportStr=自办, deptName=aa) |
| | | // ComplaintVO(reporter=刘, reporterId=1552661132500668416, superiorId2=510403, auditCreateBy=1892403820151992322, reporterLevel=2, reporterPhone=null, departmentName=西区-格里坪镇, reportTime=Fri Jun 27 10:04:18 CST 2025, comment=null, nickname=null, phone=null, auditorName=null, auditorPhone=null, rejectReason=null, auditTime=null, complaintFlows=null, complaintProgresses=null, auditButtonStatus=null, withdrawButtonStatus=null, rate=null, complaintComment=null, listControlsButtonStatus=null, evaluateButtonStatus=0, voiceFileList=null, progressCount=null, assignmentCount=null, reportCount=null, remindStatus=0, remindTime=null, reportStr=自办, deptName=null) |
| | |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | LocalDate localDate = LocalDate.now().plusDays(2); |
| | | |
| | | String time = "2022-02-02 - 2023-02-02"; |
| | | String[] split = time.split(" - "); |
| | | System.out.println(split[0]); |
| | | System.out.println(localDate.toString()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | updateById(complaint); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Integer> getComplaintTip(LoginUserInfoVO loginUserInfo) { |
| | | HashMap<String, Integer> map = new HashMap<>(); |
| | | IdentityInformation currentIdentityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfo); |
| | | SystemUser systemUser = currentIdentityInformation.getSystemUser(); |
| | | if (systemUser.getSystemRoleId() == 1) { |
| | | Integer accountLevel =systemUser.getAccountLevel(); |
| | | String code = null; |
| | | switch (accountLevel) { |
| | | case 2: |
| | | break; |
| | | case 3: |
| | | code =systemUser.getStreetId(); |
| | | break; |
| | | case 4: |
| | | code =systemUser.getCommunityId().toString(); |
| | | break; |
| | | default: |
| | | throw new ServiceException("无此权限"); |
| | | } |
| | | // 待分配 |
| | | map.put("waitAssign", this.baseMapper.getWaitAssign(accountLevel,code)); |
| | | // 待处理 |
| | | int count = this.count(new LambdaQueryWrapper<Complaint>().eq(Complaint::getAssignPersonId, systemUser.getOneDepartmentId()).notIn(Complaint::getStatus, 3, 8)); |
| | | map.put("waitProcess", count); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | } |
| | | |