From a411c58990bb7979fdde17ba8f0c3b20ae5cec85 Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期二, 18 十月 2022 14:20:46 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/zigonggao_dev' into zigonggao_dev --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java | 162 ++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 126 insertions(+), 36 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java index e05caed..0566827 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java @@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.panzhihua.common.constants.Constants; import com.panzhihua.common.constants.ReturnMsgConstants; import com.panzhihua.common.enums.SanShuoEventStatusEnum; import com.panzhihua.common.model.dtos.community.sanshuo.IndexDateDTO; @@ -85,6 +86,7 @@ @Override public R pageByComEvent(ComEvent comEvent, Page pagination,LoginUserInfoVO loginUserInfoVO) { log.info("=================当前登陆的用户信息,用户类型"+loginUserInfoVO.getType()+"社区id"+loginUserInfoVO.getCommunityId()); + log.info("=====================当前的userType1:="+comEvent.getUserType()); Boolean isExpertCheck=false; Long expertId=null; Boolean isStretAccount = isStreetAccount(loginUserInfoVO); @@ -127,13 +129,13 @@ comEvent.setCommunityIds(cids); } } -// if (nonNull(loginUserInfoVO.getAccount())){ -// if (loginUserInfoVO.getAccount().equals("admin")){ -// comEvent.setUserType(null); -// } -// } + if (nonNull(loginUserInfoVO.getAccount())){ + if (loginUserInfoVO.getAccount().equals("admin") && loginUserInfoVO.getStreetId().equals(Constants.ADMIN_STREET_ID)){ + comEvent.setUserType(null); + } + } IPage<ComEvent> list=null; - log.info("=====================当前的userType"+comEvent.getUserType()); + log.info("=====================当前的userType2:="+comEvent.getUserType()); log.info("=====================是否专家账号查看"+isExpertCheck); //是否为专家查看自己发布的事件 if (isExpertCheck && comEvent.getUserType()!=1){ @@ -143,7 +145,6 @@ }else{ list = baseMapper.pageByComEvent(comEvent, pagination); } - if (list.getRecords().size() < 1) { return R.ok(Collections.emptyList()); } @@ -208,19 +209,27 @@ //账号获取 expert = comSanShuoExpertService.getOne(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getAccount, loginUserInfoVO.getAccount())); } - if (!comEvent.getSpecialistId().equals(expert.getId()) || !comEvent.getCurrentProcessType().equals(5)){ + if (!comEvent.getCurrentProcessType().equals(5)){ + if (comEvent.getSpecialistId().equals(expert.getId()) && comEvent.getEventProcessStatus().equals(3)){ + //更高级别分配给该专家,可以受理 + comEvent.setConciliation(0); + comEvent.setArchive(0); + //comEvent.setSolve(0); + return; + } //已经上报或者重新分配专家,只能查看 comEvent.setConciliation(0); //comEvent.setArchive(0); comEvent.setSolve(0); return; }//未上报,根据状态决定权限 - if (comEvent.getEventProcessStatus().equals(1) || comEvent.getEventProcessStatus().equals(2)){ + if (comEvent.getEventProcessStatus().equals(1)){ //待受理和待验证状态,仅有查看和受理权限,可能为用户选择该专家或上级单位分配给该专家 //关闭调解和归档 comEvent.setArchive(0); comEvent.setConciliation(0); - } else if (comEvent.getEventProcessStatus().equals(5)){ + } + else if (comEvent.getEventProcessStatus().equals(5)){ //调解中,可以查看,调解 comEvent.setArchive(0); comEvent.setSolve(0); @@ -239,13 +248,23 @@ //如果未上报到街道,当前事件权限和专家一样 if (comEvent.getCurrentProcessType().equals(5)){ //根据事件状态决定权限 - if (comEvent.getEventProcessStatus().equals(1) || comEvent.getEventProcessStatus().equals(2)){ + if (comEvent.getEventProcessStatus().equals(1) ){ //待受理和待验证状态,可以受理,分配专家 //关闭调解和归档 comEvent.setArchive(0); comEvent.setConciliation(0); comEvent.setChangeExpert(0); - } else if (comEvent.getEventProcessStatus().equals(5)){ + } 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(5)){ //调解中,可以查看,调解,更换专家,删除 comEvent.setDistribution(0); comEvent.setSolve(0); @@ -265,7 +284,16 @@ comEvent.setArchive(0); comEvent.setConciliation(0); comEvent.setDistribution(0); - } else if (comEvent.getEventProcessStatus().equals(5)){ + } + else if (comEvent.getEventProcessStatus().equals(3)){ + //分配新专家后 + comEvent.setDistribution(0); + comEvent.setArchive(0); + comEvent.setChangeExpert(0); + comEvent.setSolve(0); + comEvent.setEventResult(null); + comEvent.setEventProcessStatus(1); + }else if (comEvent.getEventProcessStatus().equals(5)){ //调解中,可以查看,调解,更换专家,删除 comEvent.setSolve(0); comEvent.setArchive(0); @@ -307,14 +335,32 @@ }else if (userType.equals(3)){ //分配行业分中心操作权限 //是否上报到行业分中心 - if (comEvent.getReportCenter().equals(1) || comEvent.getCurrentProcessType().equals(1)){ + if (comEvent.getCurrentProcessType().equals(1)){ //已经报到行业分中心 - if (comEvent.getEventProcessStatus().equals(1) || comEvent.getEventProcessStatus().equals(2)){ + if (comEvent.getEventProcessStatus().equals(1) ){ //待受理和待验证状态,可以受理,分配专家 //关闭调解和归档 comEvent.setArchive(0); comEvent.setConciliation(0); - } else if (comEvent.getEventProcessStatus().equals(5)){ + }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.setChangeExpert(0); + comEvent.setSolve(0); + comEvent.setEventResult(null); + comEvent.setEventProcessStatus(1); + }else if (comEvent.getEventProcessStatus().equals(5)){ //调解中,可以查看,调解,更换专家,删除 comEvent.setDistribution(0); comEvent.setArchive(0); @@ -342,9 +388,9 @@ }else if (userType.equals(5) || isStreet){ //街道权限,操作街道下属社区的所有事件 //是否上报到街道 - if (comEvent.getReportStreet().equals(1) || comEvent.getCurrentProcessType().equals(3)){ + if (comEvent.getCurrentProcessType().equals(3)){ //已上报到街道 - if (comEvent.getEventProcessStatus().equals(1) || comEvent.getEventProcessStatus().equals(2)){ + if (comEvent.getEventProcessStatus().equals(1) ){ //待受理和待验证状态,可以受理,分配专家 //关闭调解和归档 comEvent.setArchive(0); @@ -352,15 +398,26 @@ comEvent.setChangeExpert(0); //comEvent.setDistribution(0); comEvent.setSolve(0); - } else if (comEvent.getEventProcessStatus().equals(5)){ + } 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(5)){ //调解中,可以查看,调解,更换专家,删除 comEvent.setDistribution(0); comEvent.setArchive(0); + comEvent.setSolve(0); }else if (comEvent.getEventProcessStatus().equals(3)){ //分配新专家后 comEvent.setDistribution(0); comEvent.setArchive(0); comEvent.setChangeExpert(0); + comEvent.setSolve(0); comEvent.setEventResult(null); comEvent.setEventProcessStatus(1); } @@ -383,8 +440,14 @@ comEvent.setChangeExpert(0); comEvent.setConciliation(0); } - }else{ + }else if (comEvent.getCurrentProcessType().equals(4)){ //未上报到街道,仅查看 + comEvent.setSolve(0); + comEvent.setDistribution(0); + comEvent.setChangeExpert(0); + comEvent.setConciliation(0); + + }else { comEvent.setArchive(0); comEvent.setSolve(0); comEvent.setDistribution(0); @@ -396,17 +459,46 @@ // 是否上报到三说会堂 if (comEvent.getCurrentProcessType().equals(4) || comEvent.getReportHall().equals(1)){ //已上报到三说会堂,可以操作 - if (comEvent.getEventProcessStatus().equals(1) || comEvent.getEventProcessStatus().equals(2)){ + if (comEvent.getEventProcessStatus().equals(1)){ //待受理和待验证状态,可以受理,分配专家 //关闭调解和归档 comEvent.setArchive(0); + comEvent.setSolve(0); comEvent.setConciliation(0); - } else if (comEvent.getEventProcessStatus().equals(5)){ - //调解中,可以查看,调解,更换专家,删除 + 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); - } else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventSucceed().equals(2)){ + //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.setSolve(0); + comEvent.setDistribution(0); + comEvent.setConciliation(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); @@ -417,6 +509,7 @@ comEvent.setSolve(0); comEvent.setDistribution(0); comEvent.setChangeExpert(0); + comEvent.setConciliation(0); } } } @@ -764,26 +857,24 @@ @Override public R calculate(LoginUserInfoVO loginUserInfoVO) { ComEvent comEvent=new ComEvent(); - comEvent.setUserType(3); Boolean isExpertCheck=false; Long expertId=null; Boolean isStretAccount = isStreetAccount(loginUserInfoVO); - if (nonNull(comEvent.getUserType())){ - if (loginUserInfoVO.getType().equals(13) || loginUserInfoVO.getType().equals(11)){ + if (loginUserInfoVO.getType().equals(13) || loginUserInfoVO.getType().equals(11)){ ComSanshuoExpert expert=new ComSanshuoExpert(); //专家账号权限(后台) - if (nonNull(loginUserInfoVO.getPhone())){ + if (nonNull(loginUserInfoVO.getPhone())){ expert = comSanShuoExpertService.getOne(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getPhone, loginUserInfoVO.getPhone())); - }else{ + }else{ //账号获取 expert = comSanShuoExpertService.getOne(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getAccount, loginUserInfoVO.getAccount())); - } - comEvent.setUserType(2); - if (nonNull(expert)){ + } + comEvent.setUserType(2); + if (nonNull(expert)){ comEvent.setSpecialistId(expert.getId()); isExpertCheck=true; expertId=expert.getId(); - } + } }else if (loginUserInfoVO.getType().equals(12)){ //行业分中心权限 comEvent.setUserType(3); @@ -802,8 +893,7 @@ List<Long> cids = comActDAO.selectCommunityByStreetId(loginUserInfoVO.getStreetId()); comEvent.setUserType(5); comEvent.setCommunityIds(cids); - } - } + } if (isExpertCheck && comEvent.getUserType()!=1){ if (nonNull(comEventMapper.listEventIds(expertId))){ List<Long> eventIds = comEventMapper.listEventIds(expertId); @@ -812,7 +902,7 @@ } } if (nonNull(loginUserInfoVO.getAccount())){ - if (loginUserInfoVO.getAccount().equals("admin")){ + if (loginUserInfoVO.getAccount().equals("admin") && loginUserInfoVO.getStreetId().equals(Constants.ADMIN_STREET_ID)){ comEvent.setUserType(null); } } -- Gitblit v1.7.1