| | |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo; |
| | | import com.panzhihua.common.model.vos.west.SystemUserVo; |
| | | import com.panzhihua.common.redis.RedisUtils; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | |
| | | import com.panzhihua.westcommittee.model.query.ComplaintQuery; |
| | | import com.panzhihua.westcommittee.model.vo.*; |
| | | import com.panzhihua.westcommittee.service.*; |
| | | import com.panzhihua.westcommittee.warpper.IdentityInformation; |
| | | import com.panzhihua.westcommittee.warpper.MgtComplaintQuery; |
| | | import com.panzhihua.westcommittee.warpper.PermissionsVO; |
| | | import com.panzhihua.westcommittee.warpper.*; |
| | | import jodd.util.StringUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | if (Objects.isNull(config)) { |
| | | throw new ServiceException("工单事项未配置,请联系管理员"); |
| | | } |
| | | complaint.setClosingTime(new Date(System.currentTimeMillis() + config.getDemandProcessingTime() * 24 * 60 * 60 * 1000)); |
| | | complaint.setNowLevelTime(new Date()); |
| | | // 保存诉求记录 |
| | | save(complaint); |
| | | } |
| | |
| | | } |
| | | } |
| | | } else { |
| | | if (detail.getFirstStatus() == 1) { |
| | | if (detail.getFirstStatus() == 1 && detail.getStatus() != 3 && detail.getStatus() != 8) { |
| | | detail.setStatus(0); |
| | | } else { |
| | | } else if(detail.getFirstStatus()==0){ |
| | | detail.setStatus(-2); |
| | | }else if(detail.getFirstStatus() == 1 && detail.getStatus() == 3 ){ |
| | | detail.setStatus(3); |
| | | }else if(detail.getFirstStatus() == 1 && detail.getStatus() == 8){ |
| | | detail.setStatus(8); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | return detail; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public ComplaintVO detailScreen(Long id) { |
| | | //获取当前身份,1=党员,2=管理员 |
| | | ComplaintVO detail = baseMapper.getDetail(id); |
| | | // 更新状态 此时status是表中的状态 未做变动 |
| | | if (detail.getFirstStatus() == 1 && detail.getStatus() != 3 && detail.getStatus() != 8) { |
| | | detail.setStatus(0); |
| | | } else if(detail.getFirstStatus()==0){ |
| | | detail.setStatus(-2); |
| | | }else if(detail.getFirstStatus() == 1 && detail.getStatus() == 3 ){ |
| | | detail.setStatus(3); |
| | | }else if(detail.getFirstStatus() == 1 && detail.getStatus() == 8){ |
| | | detail.setStatus(8); |
| | | } |
| | | |
| | | List<ComplaintFlow> list = complaintFlowService.lambdaQuery().eq(ComplaintFlow::getComplaintId, id).orderByAsc(ComplaintFlow::getSort).list(); |
| | | detail.setComplaintFlows(list); |
| | | //查询办理进度 |
| | | List<ComplaintProgress> list1 = complaintProgressService.lambdaQuery().eq(ComplaintProgress::getComplaintId, id) |
| | | .orderByAsc(ComplaintProgress::getCreateTime).list(); |
| | | detail.setComplaintProgresses(list1); |
| | | |
| | | return detail; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 办理进度录入 |
| | |
| | | complaint.setNowLevel(nowLevel); |
| | | complaint.setLastLevel(nowLevel + 1); |
| | | complaint.setAssignStatus(0); |
| | | complaint.setNowLevelTime(new Date()); |
| | | updateById(complaint); |
| | | |
| | | // 标记最新 |
| | |
| | | complaint.setAssignStatus(0); |
| | | complaint.setNowLevel(nowLevel); |
| | | complaint.setLastLevel(nowLevel); |
| | | complaint.setNowLevelTime(new Date()); |
| | | this.updateById(complaint); |
| | | |
| | | complaintAuditRecord.setSuperiorId(superiorId); |
| | |
| | | complaint.setLastSuperiorId(complaint.getSuperiorId()); |
| | | complaint.setLastLevel(complaint.getNowLevel()); |
| | | complaint.setRemark(complaintReporAuditDTO.getRemark()); |
| | | complaint.setNowLevelTime(new Date()); |
| | | this.updateById(complaint); |
| | | |
| | | |
| | |
| | | complaint.setAssignStatus(1); |
| | | complaint.setSuperiorId(complaint.getLastSuperiorId()); |
| | | complaint.setNowLevel(complaint.getLastLevel()); |
| | | complaint.setNowLevelTime(new Date()); |
| | | this.updateById(complaint); |
| | | |
| | | } |
| | |
| | | complaint.setFirstStatus(1); |
| | | complaint.setAssignStatus(1); |
| | | complaint.setRemark(remark); |
| | | complaint.setNowLevelTime(new Date()); |
| | | baseMapper.updateById(complaint); |
| | | } else { |
| | | throw new ServiceException("你没有分配权限"); |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Page<ComplaintVO> pageScreenList(ScreenComplaintQuery query) { |
| | | |
| | | // 已分派了的 |
| | | Page<ComplaintVO> page = new Page<>(query.getPageNum(), query.getPageSize()); |
| | | |
| | | String address = this.baseMapper.getHouseAddressFromId(query.getHouseId()); |
| | | query.setAddress(address); |
| | | page = baseMapper.pageScreenList(page, query); |
| | | |
| | | page.getRecords().forEach(detail -> { |
| | | if (detail.getFirstStatus() == 1 && detail.getStatus() != 3 && detail.getStatus() != 8) { |
| | | detail.setStatus(0); |
| | | } else if(detail.getFirstStatus()==0){ |
| | | detail.setStatus(-2); |
| | | }else if(detail.getFirstStatus() == 1 && detail.getStatus() == 3 ){ |
| | | detail.setStatus(3); |
| | | }else if(detail.getFirstStatus() == 1 && detail.getStatus() == 8){ |
| | | detail.setStatus(8); |
| | | } |
| | | }); |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | | public Page<String> getHouseAddress(GetHouseAddressQuery query) { |
| | | Page<String> page = new Page<>(query.getPageNum(), query.getPageSize()); |
| | | return this.baseMapper.getHouseAddress(page,query.getAddress()); |
| | | } |
| | | } |
| | | |