| | |
| | | Boolean isExpertCheck=false; |
| | | Long expertId=null; |
| | | Boolean isStretAccount = isStreetAccount(loginUserInfoVO); |
| | | // comEvent.setAppId(loginUserInfoVO.getAppId()); |
| | | comEvent.setAppId(loginUserInfoVO.getAppId()); |
| | | if (nonNull(comEvent.getUserType())){ |
| | | if (comEvent.getUserType().equals(1)){ |
| | | //个人账号权限 |
| | |
| | | IPage<ComEvent> list=null; |
| | | //是否为专家查看自己发布的事件 |
| | | if (isExpertCheck && comEvent.getUserType()!=1){ |
| | | if (nonNull(comEventMapper.listEventIds(expertId))){ |
| | | list = comEventMapper.pageByComEventExpert(comEventMapper.listEventIds(expertId), comEvent, pagination); |
| | | List<Long> ids=comEventMapper.listEventIds(expertId); |
| | | if (ids!=null && ids.size()>0 ){ |
| | | list = comEventMapper.pageByComEventExpert(ids, comEvent, pagination); |
| | | } |
| | | else |
| | | { |
| | | list = comEventMapper.pageByComEventExpert(null, comEvent, pagination); |
| | | } |
| | | }else{ |
| | | list = baseMapper.pageByComEvent(comEvent, pagination); |
| | | } |
| | | if (list.getRecords().size() < 1) { |
| | | if (list==null || list.getRecords().size() < 1) { |
| | | return R.ok(Collections.emptyList()); |
| | | } |
| | | list.getRecords().forEach(comEvent1 -> { |
| | |
| | | } |
| | | ComMediateType category = commediateTypeService.getById(comEvent1.getEventCategory()); |
| | | comEvent1.setEventCategoryName(category.getName()); |
| | | // comEvent1.setHasPerm(hasPermission(comEvent1,loginUserInfoVO )); |
| | | // this.accountMenu(comEvent1,comEvent.getUserType(),loginUserInfoVO,isStretAccount); |
| | | comEvent1.setHasPerm(hasPermission(comEvent1,loginUserInfoVO )); |
| | | this.accountMenu(comEvent1,comEvent.getUserType(),loginUserInfoVO,isStretAccount); |
| | | }); |
| | | return R.ok(list); |
| | | } |
| | |
| | | }else if (isAdmin){ |
| | | //区三说会堂账号,最高权限全部开放 |
| | | // 是否上报到三说会堂 |
| | | if (comEvent.getCurrentProcessType().equals(4) || comEvent.getReportHall().equals(1)){ |
| | | //已上报到三说会堂,可以操作 |
| | | if (comEvent.getEventProcessStatus().equals(1)){ |
| | | //待受理和待验证状态,可以受理,分配专家 |
| | | //关闭调解和归档 |
| | | comEvent.setArchive(0); |
| | | comEvent.setSolve(0); |
| | | comEvent.setConciliation(0); |
| | | comEvent.setChangeExpert(0); |
| | | } |
| | | else if(comEvent.getEventProcessStatus().equals(2)){ |
| | | //待分配和待验证状态,可以受理,分配专家 |
| | | //关闭调解和归档 |
| | | comEvent.setArchive(0); |
| | | comEvent.setConciliation(0); |
| | | comEvent.setChangeExpert(0); |
| | | if (comEvent.getSpecialistName().equals("待分配")){ |
| | | comEvent.setSolve(0); |
| | | } |
| | | }else if (comEvent.getEventProcessStatus().equals(3)){ |
| | | //新分配给专家并且专家还未受理 |
| | | comEvent.setDistribution(0); |
| | | comEvent.setArchive(0); |
| | | //comEvent.setConciliation(0); |
| | | comEvent.setChangeExpert(0); |
| | | comEvent.setSolve(0); |
| | | } |
| | | else if (comEvent.getEventProcessStatus().equals(5)){ |
| | | //调解中,可以查看,调解,更换专家,删除 |
| | | comEvent.setDistribution(0); |
| | | comEvent.setSolve(0); |
| | | comEvent.setArchive(0); |
| | | } else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventResult().equals(1) && !comEvent.getIsEnd().equals(1)){ |
| | | //失败后转交三说会堂 |
| | | comEvent.setSolve(0); |
| | | comEvent.setDistribution(0); |
| | | //comEvent.setConciliation(0); |
| | | comEvent.setEventProcessStatus(2); |
| | | comEvent.setArchive(0); |
| | | //comEvent.setChangeExpert(0); |
| | | } |
| | | else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventSucceed().equals(2)){ |
| | | //调解完成,可以归档,查看 |
| | | comEvent.setConciliation(0); |
| | | comEvent.setSolve(0); |
| | | comEvent.setDistribution(0); |
| | | comEvent.setChangeExpert(0); |
| | | } |
| | | }else{ |
| | | if(comEvent.getCurrentProcessType()==null) |
| | | { |
| | | //未上报到三说会堂,仅查看 |
| | | comEvent.setArchive(0); |
| | | comEvent.setSolve(0); |
| | |
| | | comEvent.setChangeExpert(0); |
| | | comEvent.setConciliation(0); |
| | | } |
| | | else |
| | | { |
| | | if (comEvent.getCurrentProcessType().equals(4) || comEvent.getReportHall().equals(1)){ |
| | | //已上报到三说会堂,可以操作 |
| | | if (comEvent.getEventProcessStatus().equals(1)){ |
| | | //待受理和待验证状态,可以受理,分配专家 |
| | | //关闭调解和归档 |
| | | comEvent.setArchive(0); |
| | | comEvent.setSolve(0); |
| | | comEvent.setConciliation(0); |
| | | comEvent.setChangeExpert(0); |
| | | } |
| | | else if(comEvent.getEventProcessStatus().equals(2)){ |
| | | //待分配和待验证状态,可以受理,分配专家 |
| | | //关闭调解和归档 |
| | | comEvent.setArchive(0); |
| | | comEvent.setConciliation(0); |
| | | comEvent.setChangeExpert(0); |
| | | if (comEvent.getSpecialistName().equals("待分配")){ |
| | | comEvent.setSolve(0); |
| | | } |
| | | }else if (comEvent.getEventProcessStatus().equals(3)){ |
| | | //新分配给专家并且专家还未受理 |
| | | comEvent.setDistribution(0); |
| | | comEvent.setArchive(0); |
| | | //comEvent.setConciliation(0); |
| | | comEvent.setChangeExpert(0); |
| | | comEvent.setSolve(0); |
| | | } |
| | | else if (comEvent.getEventProcessStatus().equals(5)){ |
| | | //调解中,可以查看,调解,更换专家,删除 |
| | | comEvent.setDistribution(0); |
| | | comEvent.setSolve(0); |
| | | comEvent.setArchive(0); |
| | | } else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventResult().equals(1) && !comEvent.getIsEnd().equals(1)){ |
| | | //失败后转交三说会堂 |
| | | comEvent.setSolve(0); |
| | | comEvent.setDistribution(0); |
| | | //comEvent.setConciliation(0); |
| | | comEvent.setEventProcessStatus(2); |
| | | comEvent.setArchive(0); |
| | | //comEvent.setChangeExpert(0); |
| | | } |
| | | else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventSucceed().equals(2)){ |
| | | //调解完成,可以归档,查看 |
| | | comEvent.setConciliation(0); |
| | | comEvent.setSolve(0); |
| | | comEvent.setDistribution(0); |
| | | comEvent.setChangeExpert(0); |
| | | } |
| | | }else{ |
| | | //未上报到三说会堂,仅查看 |
| | | comEvent.setArchive(0); |
| | | comEvent.setSolve(0); |
| | | comEvent.setDistribution(0); |
| | | comEvent.setChangeExpert(0); |
| | | comEvent.setConciliation(0); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | //上报级别是否匹配当前账号级别 |
| | | if (sysUser.getType().equals(12) ){ |
| | | if (!comEvent.getCurrentProcessType().equals(1)){ |
| | | if (comEvent.getCurrentProcessType()!=null && !comEvent.getCurrentProcessType().equals(1)){ |
| | | perm=0; |
| | | } |
| | | }else if (account.equals("admin")){ |
| | | if (!comEvent.getCurrentProcessType().equals(4)){ |
| | | }else if (StringUtils.equals("admin",account)){ |
| | | if ( comEvent.getCurrentProcessType()!=null && comEvent.getCurrentProcessType()!=4){ |
| | | perm=0; |
| | | } |
| | | }else if (isStreetAccount(sysUser)){ |
| | | if (!comEvent.getCurrentProcessType().equals(3)){ |
| | | if (comEvent.getCurrentProcessType()!=null && comEvent.getCurrentProcessType()!=3){ |
| | | perm=0; |
| | | } |
| | | } |
| | |
| | | return map; |
| | | } |
| | | |
| | | public String getPhone(ComEvent comEvent){ |
| | | public String getPhone(ComEvent comEvent) |
| | | { |
| | | if(comEvent==null) |
| | | { |
| | | return ""; |
| | | } |
| | | if (isNull(comEvent.getRequestUserCommunity())){ |
| | | ComSanshuoIndustryCenter sanshuoIndustryCenter=comSanShuoIndustryCenterService.getById(comEvent.getCenterId()); |
| | | if(sanshuoIndustryCenter==null) |
| | | { |
| | | return null; |
| | | return ""; |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | String contactsPhone = comActDO.getContactsPhone(); |
| | | if (isNull(contactsPhone)){ |
| | | return null; |
| | | return ""; |
| | | } |
| | | else |
| | | { |
| | | return contactsPhone; |
| | | } |
| | | } |
| | | return null; |
| | | return ""; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | comEvent.setSpecialistId(expert.getId()); |
| | | isExpertCheck=true; |
| | | expertId=expert.getId(); |
| | | // level=expert.getLevel(); |
| | | // id=expert.getCommunityId(); |
| | | comEvent.setCommunityId(expert.getCommunityId()); |
| | | } |
| | | |
| | | |
| | | }else if (loginUserInfoVO.getType().equals(12)){ |
| | | //行业分中心权限 |
| | | comEvent.setUserType(3); |
| | |
| | | List<Long> cids = comActDAO.selectCommunityByStreetId(loginUserInfoVO.getStreetId()); |
| | | comEvent.setUserType(5); |
| | | comEvent.setCommunityIds(cids); |
| | | } |
| | | } |
| | | if (isExpertCheck){ |
| | | if(nonNull(comEventMapper.listEventIds(expertId))){ |
| | | List<Long> eventIds = comEventMapper.listEventIds(expertId); |
| | | List<Long> eventIds = comEventMapper.listEventIds(expertId); |
| | | if(eventIds!=null && eventIds.size()>0){ |
| | | |
| | | //获取该专家的所有事件 |
| | | comEvent.setEventIds(eventIds); |
| | | } |