| | |
| | | if(nonNull(archiveRecord)){ |
| | | comEvent1.setIsArchive(0); |
| | | } |
| | | comEvent.setHasPerm(hasPermission(comEvent1,loginUserInfoVO )); |
| | | }); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | /** |
| | | * 当前账号是否有操作事件权限 |
| | | * */ |
| | | public Integer hasPermission(ComEvent comEvent,LoginUserInfoVO sysUser){ |
| | | String account=""; |
| | | if (nonNull(sysUser.getAccount())){ |
| | | account=sysUser.getAccount(); |
| | | } |
| | | Integer perm=1; |
| | | //上报级别是否匹配当前账号级别 |
| | | if (sysUser.getType().equals(12) ){ |
| | | if (!comEvent.getCurrentProcessType().equals(1)){ |
| | | perm=0; |
| | | } |
| | | }else if (account.equals("admin")){ |
| | | if (!comEvent.getCurrentProcessType().equals(4)){ |
| | | perm=0; |
| | | } |
| | | } |
| | | return perm; |
| | | } |
| | | @Override |
| | | public List<ComEvent> listByComEvent(ComEvent comEvent,LoginUserInfoVO loginUserInfoVO) { |
| | | List<ComEvent> list = baseMapper.listByComEvent(comEvent,null); |
| | |
| | | //上报到社区 |
| | | //查询社区账号,由专家转交到社区 |
| | | comEvent.setCurrentProcessType(2); |
| | | comEvent.setSpecialistName("待分配"); |
| | | comEvent.setSpecialistId(99999L); |
| | | ComActDO comActDO = comActDAO.selectById(expert.getCommunityId()); |
| | | comEvent.setCurrentOrgId(comActDO.getStreetId().toString()); |
| | | //生成一次流转记录 |
| | |
| | | //上报到行业分中心 |
| | | comEvent.setCurrentProcessType(1); |
| | | comEvent.setCurrentOrgId(expert.getIndustryCenterId().toString()); |
| | | comEvent.setSpecialistName("待分配"); |
| | | comEvent.setSpecialistId(99999L); |
| | | //生成一次流转记录 |
| | | comEvent.setCurrentEventProcessResult("专家上报到行业分中心"); |
| | | comEventTransferRecord.setFromId(comEvent.getSpecialistId()); |