|
@ -1,10 +1,13 @@
|
|
package com.yihu.jw.hospital.endpoint.prescription;
|
|
package com.yihu.jw.hospital.endpoint.prescription;
|
|
|
|
|
|
|
|
import com.yihu.jw.doctor.dao.BaseDoctorDao;
|
|
|
|
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
|
|
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
|
|
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
|
|
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
|
|
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
|
|
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
|
|
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
|
|
import com.yihu.jw.hospital.prescription.service.YkyyPrescriptionService;
|
|
import com.yihu.jw.hospital.prescription.service.YkyyPrescriptionService;
|
|
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
|
|
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
|
|
|
|
import com.yihu.jw.hospital.service.SystemMessage.HospitalSystemMessageService;
|
|
import com.yihu.jw.order.BusinessOrderService;
|
|
import com.yihu.jw.order.BusinessOrderService;
|
|
import com.yihu.jw.restmodel.hospital.prescription.WlyyOutpatientVO;
|
|
import com.yihu.jw.restmodel.hospital.prescription.WlyyOutpatientVO;
|
|
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
|
|
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
|
|
@ -15,6 +18,7 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@ -32,11 +36,17 @@ public class YkyyPrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
@Autowired
|
|
@Autowired
|
|
private YkyyPrescriptionService prescriptionService;
|
|
private YkyyPrescriptionService prescriptionService;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
private PrescriptionService sysPrescriptionService;
|
|
|
|
@Autowired
|
|
private YkyyEntranceService ykyyEntranceService;
|
|
private YkyyEntranceService ykyyEntranceService;
|
|
@Autowired
|
|
@Autowired
|
|
private BusinessOrderService businessOrderService;
|
|
private BusinessOrderService businessOrderService;
|
|
@Autowired
|
|
@Autowired
|
|
private PrescriptionService commenPrescriptionService;
|
|
private PrescriptionService commenPrescriptionService;
|
|
|
|
@Autowired
|
|
|
|
private HospitalSystemMessageService hospitalSystemMessageService;
|
|
|
|
@Autowired
|
|
|
|
private BaseDoctorDao doctorDao;
|
|
|
|
|
|
@Value("${demo.flag}")
|
|
@Value("${demo.flag}")
|
|
private boolean demoFlag;
|
|
private boolean demoFlag;
|
|
@ -221,7 +231,20 @@ public class YkyyPrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
return objEnvelop;
|
|
return objEnvelop;
|
|
}
|
|
}
|
|
|
|
|
|
/* SystemMessageDO systemMessageDO = commenPrescriptionService.sendOutPatientMes(wlyyOutpatientDO,payFlag);*/
|
|
|
|
|
|
if (wlyyOutpatientDO.getPayStatus() != null && wlyyOutpatientDO.getPayStatus() == 1) {
|
|
|
|
//发送系统消息
|
|
|
|
SystemMessageDO systemMessageDO = sysPrescriptionService.sendOutPatientMes(wlyyOutpatientDO, payFlag);
|
|
|
|
//发送IM消息
|
|
|
|
hospitalSystemMessageService.sendImMessage(systemMessageDO);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//发送医生抢单消息
|
|
|
|
if (StringUtils.isBlank(wlyyOutpatientDO.getDoctor())) {
|
|
|
|
hospitalSystemMessageService.sendImPichCheckMessage(wlyyOutpatientDO);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*SystemMessageDO systemMessageDO = commenPrescriptionService.sendOutPatientMes(wlyyOutpatientDO,payFlag);*/
|
|
/* //发送系统消息
|
|
/* //发送系统消息
|
|
SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO);
|
|
SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO);
|
|
//发送IM消息
|
|
//发送IM消息
|