|
@ -1,10 +1,12 @@
|
|
package com.yihu.wlyy.web.third.zysoft;
|
|
package com.yihu.wlyy.web.third.zysoft;
|
|
|
|
|
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
import com.yihu.wlyy.entity.message.SMS;
|
|
import com.yihu.wlyy.entity.message.SMS;
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
import com.yihu.wlyy.entity.patient.PatientReservation;
|
|
import com.yihu.wlyy.entity.patient.PatientReservation;
|
|
import com.yihu.wlyy.entity.wechat.WechatTemplateConfig;
|
|
import com.yihu.wlyy.entity.wechat.WechatTemplateConfig;
|
|
import com.yihu.wlyy.logs.BusinessLogs;
|
|
import com.yihu.wlyy.logs.BusinessLogs;
|
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorDao;
|
|
import com.yihu.wlyy.repository.message.SMSDao;
|
|
import com.yihu.wlyy.repository.message.SMSDao;
|
|
import com.yihu.wlyy.repository.wechat.WechatTemplateConfigDao;
|
|
import com.yihu.wlyy.repository.wechat.WechatTemplateConfigDao;
|
|
import com.yihu.wlyy.service.app.consult.ConsultService;
|
|
import com.yihu.wlyy.service.app.consult.ConsultService;
|
|
@ -80,6 +82,9 @@ public class BookingController extends WeixinBaseController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private StringRedisTemplate redisTemplate;
|
|
private StringRedisTemplate redisTemplate;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private DoctorDao doctorDao;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@ -608,6 +613,24 @@ public class BookingController extends WeixinBaseController {
|
|
@ApiParam(name="surveyCode",value = "筛选code",defaultValue = "a")
|
|
@ApiParam(name="surveyCode",value = "筛选code",defaultValue = "a")
|
|
@RequestParam(value = "surveyCode",required = false)String surveyCode) {
|
|
@RequestParam(value = "surveyCode",required = false)String surveyCode) {
|
|
try {
|
|
try {
|
|
|
|
|
|
|
|
String currentdoctorid = getUID();
|
|
|
|
//获取当前登录的医生CODE,判断接口传递的代预约医生CODE是否一致
|
|
|
|
if(StringUtils.isBlank(currentdoctorid) || !currentdoctorid.equals(dcode)){
|
|
|
|
return error(-1, "创建挂号单失败10001:当前登录医生和代预约医生不一致!");
|
|
|
|
}
|
|
|
|
|
|
|
|
//判断接口传入的代预约医生CODE是否为空
|
|
|
|
if(StringUtils.isBlank(dcode)){
|
|
|
|
return error(-1, "创建挂号单失败10002:代预约医生不能为空!");
|
|
|
|
}
|
|
|
|
|
|
|
|
//判断接口传入的代预约医生CODE查询代预约医生是否存在
|
|
|
|
Doctor doctor = doctorDao.findByCode(dcode);
|
|
|
|
if(doctor == null || StringUtils.isBlank(doctor.getCode())){
|
|
|
|
return error(-1, "创建挂号单失败:代预约的医生不存在!");
|
|
|
|
}
|
|
|
|
|
|
String orderCode = guahaoXM.CreateOrderByDoctor(hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, arrangeDate, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode,surveyCode);
|
|
String orderCode = guahaoXM.CreateOrderByDoctor(hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, arrangeDate, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode,surveyCode);
|
|
//获取预约信息查询是否挂号成功
|
|
//获取预约信息查询是否挂号成功
|
|
PatientReservation obj = patientReservationService.findByCode(orderCode);
|
|
PatientReservation obj = patientReservationService.findByCode(orderCode);
|