| | |
| | | comEvent.setCurrentOrgId(community.getCommunityId().toString()); |
| | | comEvent.setCurrentProcessType(5); |
| | | } |
| | | if (!StringUtils.isEmpty(comEvent.getCenterId())) { |
| | | if (!StringUtils.isEmpty(comEvent.getCenterId())) { |
| | | //创建时处理级别都是专家 |
| | | ComSanshuoIndustryCenter center = comSanShuoIndustryCenterService.getById(comEvent.getCenterId()); |
| | | comEvent.setCurrentOrgName(center.getName()); |
| | | comEvent.setCurrentOrgId(center.getId().toString()); |
| | | comEvent.setCurrentProcessType(5); |
| | | } |
| | | if (nonNull(comEvent.getCenterId())){ |
| | | comEvent.setRequestUserCommunity(null); |
| | | } |
| | | comEvent.setUserEventStatus(2); |
| | | //设置为未上报 |
| | |
| | | return R.ok(ReturnMsgConstants.SAVE_SUCCESS); |
| | | } |
| | | |
| | | |
| | | public void sendMessage(Long expertId,ComEvent comEvent){ |
| | | //获取专家的openId |
| | | ComSanshuoExpert expert = comSanShuoExpertService.getById(expertId); |
| | | SysUser sysUser = sysUserDao.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getPhone, expert.getPhone()).eq(SysUser::getType, 1)); |
| | | SysUser sysUser = sysUserDao.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getPhone, expert.getPhone()).eq(SysUser::getType, 1).eq(SysUser::getAppId,"wx0cef797390444b75" )); |
| | | SanShuoMessageVO vo=new SanShuoMessageVO(); |
| | | if (nonNull(sysUser)){ |
| | | if (isNull(sysUser.getOpenid())){ |
| | |
| | | comEvent.setSpecialistName("待分配"); |
| | | comEvent.setSpecialistId(99999L); |
| | | //生成一次流转记录 |
| | | ComSanshuoIndustryCenter center = comSanShuoIndustryCenterService.getById(comEvent.getSpecialistId()); |
| | | ComSanshuoIndustryCenter center = comSanShuoIndustryCenterService.getById(comEvent.getCurrentOrgId()); |
| | | comEvent.setCurrentEventProcessResult("(专家上报到"+center.getName()+")"+comEventConciliationVO.getCurrentEventProcessResult()); |
| | | comEvent.setCurrentOrgName(expert.getUnit()); |
| | | comEventTransferRecord.setFromId(comEvent.getSpecialistId()); |
| | |
| | | List<ComEventResource> resource = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getRefId, id) |
| | | .eq(ComEventResource::getStatus, 5)); |
| | | map.put("archiveImage", resource); |
| | | map.put("contact", getPhone(comEvent)); |
| | | return map; |
| | | } |
| | | |
| | | public String getPhone(ComEvent comEvent){ |
| | | if (isNull(comEvent.getRequestUserCommunity())){ |
| | | return comSanShuoIndustryCenterService.getById(comEvent.getCenterId()).getPhone(); |
| | | }else { |
| | | String contactsPhone = comActDAO.selectById(comEvent.getRequestUserCommunity()).getContactsPhone(); |
| | | if (isNull(contactsPhone)){ |
| | | return null; |
| | | } |
| | | return contactsPhone; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | comEvent.setSpecialistName(specter.getName()); |
| | | comEvent.setEventProcessStatus(SanShuoEventStatusEnum.VALID.getCode()); |
| | | int flag = baseMapper.updateById(comEvent); |
| | | sendMessage(specialistId,comEvent ); |
| | | ComEvent comEvent1 = comEventMapper.selectById(id); |
| | | sendMessage(specialistId,comEvent1 ); |
| | | //添加一条对应记录 |
| | | comEventMapper.insertEventAndExpertRecord(id, specialistId,1); |
| | | return flag > 0 ? R.ok() : R.fail(ReturnMsgConstants.UPDATE_FALSE); |