|
@ -142,11 +142,6 @@ public class DoctorHealthGuidanceController extends WeixinBaseController {
|
|
}
|
|
}
|
|
guidance.setImages(images);
|
|
guidance.setImages(images);
|
|
|
|
|
|
if (StringUtils.isNotEmpty(voice)) {
|
|
|
|
images = CommonUtil.copyTempVoice(voice);
|
|
|
|
}
|
|
|
|
guidance.setVoice(voice);
|
|
|
|
|
|
|
|
// 保存
|
|
// 保存
|
|
if (patientHealthGuidanceService.add(guidance, getAccessToken()) != null) {
|
|
if (patientHealthGuidanceService.add(guidance, getAccessToken()) != null) {
|
|
Patient p = patientService.findByCode(patient);
|
|
Patient p = patientService.findByCode(patient);
|
|
@ -161,30 +156,14 @@ public class DoctorHealthGuidanceController extends WeixinBaseController {
|
|
return error(-1, "保存失败!");
|
|
return error(-1, "保存失败!");
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
// 使用模板发送指导
|
|
|
|
try{
|
|
try{
|
|
/*// 1.查询单个模板详情
|
|
|
|
JSONObject modelDetail = doctorGuidanceTempService.listDetail(modelCode);
|
|
|
|
String name = modelDetail.get("modelName").toString();
|
|
|
|
String contain = modelDetail.get("content").toString();
|
|
|
|
String image = modelDetail.get("imagesUrl").toString();
|
|
|
|
content+=contain;
|
|
|
|
images+=image;*/
|
|
|
|
PatientHealthGuidance guidance = new PatientHealthGuidance();
|
|
PatientHealthGuidance guidance = new PatientHealthGuidance();
|
|
guidance.setContent(content);
|
|
guidance.setContent(content);
|
|
guidance.setDoctor(getUID());
|
|
guidance.setDoctor(getUID());
|
|
guidance.setPatient(patient);
|
|
guidance.setPatient(patient);
|
|
Doctor doctor = doctorService.findDoctorByCode(getUID());
|
|
Doctor doctor = doctorService.findDoctorByCode(getUID());
|
|
if (StringUtils.isNotEmpty(images)) {
|
|
|
|
images = CommonUtil.copyTempImage(images);
|
|
|
|
}
|
|
|
|
guidance.setImages(images);
|
|
guidance.setImages(images);
|
|
|
|
|
|
if (StringUtils.isNotEmpty(voice)) {
|
|
|
|
images = CommonUtil.copyTempVoice(voice);
|
|
|
|
}
|
|
|
|
guidance.setVoice(voice);
|
|
|
|
|
|
|
|
// 保存
|
|
// 保存
|
|
if (patientHealthGuidanceService.add(guidance, getAccessToken()) != null) {
|
|
if (patientHealthGuidanceService.add(guidance, getAccessToken()) != null) {
|
|
Patient p = patientService.findByCode(patient);
|
|
Patient p = patientService.findByCode(patient);
|