|
@ -10465,7 +10465,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
return null;
|
|
|
}
|
|
|
public Map saveNatAppointment(String mediaCard,String patientId,String name,String cardNo,String cardType,String mobile,
|
|
|
String firstJobCode,String firstJobName,String secondJobCode,String secondJobName,String natTime,String address,String provinceName,String cityName,String townName,String streetName,String pm,String pushChannel,String pushFlag,String cardNoType) throws Exception {
|
|
|
String firstJobCode,String firstJobName,String secondJobCode,String secondJobName,String natTime,String address,String provinceName,String cityName,String townName,String streetName,String pm,String pushChannel,String pushFlag,String cardNoType,String consumer) throws Exception {
|
|
|
Map returnMap = new HashMap();
|
|
|
if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
|
|
|
net.sf.json.JSONObject jsondate = new JSONObject();
|
|
@ -10697,11 +10697,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
baseNatAppointmentDO.setDeptName("感染疾病科");
|
|
|
baseNatAppointmentDO.setAmpm(pm);
|
|
|
baseNatAppointmentDO.setHospitalFlag(pushFlag);
|
|
|
baseNatAppointmentDO.setConsumer(consumer);
|
|
|
BasePatientDO basePatientDO = basePatientDao.findById(consumer);
|
|
|
baseNatAppointmentDO.setConsumerName(basePatientDO.getName());
|
|
|
baseNatAppointmentDO= baseNatAppointmentDao.save(baseNatAppointmentDO);
|
|
|
//添加订单
|
|
|
BusinessOrderDO businessDO = new BusinessOrderDO();
|
|
|
businessDO.setPatient(patientId);
|
|
|
businessDO.setPatientName(name);
|
|
|
businessDO.setPatient(consumer);
|
|
|
businessDO.setPatientName(basePatientDO.getName());
|
|
|
businessDO.setOrderNo("HLWYY"+System.currentTimeMillis()+(int)(Math.random()*900)+100);
|
|
|
businessDO.setCreateTime(new Date());
|
|
|
businessDO.setStatus(0);
|
|
@ -10715,6 +10718,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
businessDO.setPayType(1);
|
|
|
businessDO.setUpdateTime(new Date());
|
|
|
businessOrderDao.save(businessDO);
|
|
|
logger.info("建档开始");
|
|
|
com.alibaba.fastjson.JSONObject jdObject = ykyyEntranceService.patientJDKH(patientId, cardNo,name,mobile,mediaCard);
|
|
|
logger.info("建档结束");
|
|
|
logger.info("更新建档信息");
|
|
|
BaseJobCategoryDO jobCategoryDO =jobCategoryDao.findByName(firstJobName);
|
|
|
Float zy= 0f;
|
|
@ -10829,11 +10835,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
if (patientDO != null) {
|
|
|
userName = patientDO.getName();
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(baseNatAppointmentDO.getPatientId())){
|
|
|
ps = basePatientWechatDao.findByWechatIdAndPatientId(wechatId, baseNatAppointmentDO.getPatientId());
|
|
|
if (StringUtils.isNotEmpty(baseNatAppointmentDO.getConsumer())){
|
|
|
ps = basePatientWechatDao.findByWechatIdAndPatientId(wechatId, baseNatAppointmentDO.getConsumer());
|
|
|
}
|
|
|
if (ps.isEmpty()) {
|
|
|
logger.info("该用户没有openid,无法推送模版消息,用户ID:" + baseNatAppointmentDO.getPatientId() + "wechatId:" + wechatId);
|
|
|
logger.info("该用户没有openid,无法推送模版消息,用户ID:" + baseNatAppointmentDO.getConsumer() + "wechatId:" + wechatId);
|
|
|
}
|
|
|
Map<String,Object> map = ykyyEntranceService.findYkDoctor(baseNatAppointmentDO.getHospitalFlag());
|
|
|
WxAccessTokenDO wxAccessTokenDO = wxAccessTokenService.getWxAccessTokenById(wechatId);
|
|
@ -10924,10 +10930,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
"t.dept_name as \"deptName\","+
|
|
|
"t.id as \"id\"," +
|
|
|
"t.card_no_type as \"cardNoType\"," +
|
|
|
"t.HOSPITAL_FLAG as \"hospitalFlag\"," +
|
|
|
"t.appointment_time as \"appointmentTime\" " +
|
|
|
" from base_nat_appointment t where 1=1 ";
|
|
|
if (StringUtils.isNoneBlank(patientId)){
|
|
|
sql+=" and t.patient_id ='"+patientId+"'";
|
|
|
sql+=" and t.consumer ='"+patientId+"'";
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(id)){
|
|
|
sql+=" and t.id ='"+id+"'";
|