yanghui
2022-10-24 bca8e672a8dd26099f5013d49f25d1bb4ceff803
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
@@ -624,6 +624,9 @@
            comEvent.setCurrentOrgId(center.getId().toString());
            comEvent.setCurrentProcessType(5);
        }
        if (nonNull(comEvent.getCenterId())){
            comEvent.setRequestUserCommunity(null);
        }
        comEvent.setUserEventStatus(2);
        //设置为未上报
        comEvent.setReportLevel(0);
@@ -649,7 +652,6 @@
        saveEventImageList(comEvent.getImages(), comEvent.getId(),null,1);
        return R.ok(ReturnMsgConstants.SAVE_SUCCESS);
    }
    public void sendMessage(Long expertId,ComEvent comEvent){
        //获取专家的openId
@@ -896,7 +898,16 @@
        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 {
            return comActDAO.selectById(comEvent.getRequestUserCommunity()).getContactsPhone();
        }
    }
    @Override
@@ -924,7 +935,8 @@
        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);