浏览代码

完成服务项目时添加一条message

zd_123 7 年之前
父节点
当前提交
481138c8a7

+ 11 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/rehabilitation/RehabilitationManageService.java

@ -533,11 +533,20 @@ public class RehabilitationManageService extends BaseService {
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status") == 200){
            JSONObject object = result.getJSONObject("obj");
            //保存wlyy_message
            String hospotal = object.getString("hospital");
            String patient = object.getString("patient_code");
            String doctor = object.getString("doctor_code");
            Message message = new Message();
            message.setType(21);
            message.setSender(patient);
            message.setReceiver(doctor);
            message.setRelationCode(planDetailId);
            specialistEvaluateSevice.sendMessage(message,hospotal,patient,null);
            //发送微信模板消息
            int evaluation = object.getInt("evaluation");
            if (evaluation == 1){
                String serviceItemId = object.getString("service_item_id");
                String doctor = object.getString("doctor_code");
                String patient = object.getString("patient_code");
                String title = object.getString("title");
                Patient p = patientDao.findByCode(patient);
                String patientName = p.getName();