|
@ -10452,6 +10452,33 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
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) throws Exception {
|
|
|
BaseNatAppointmentDO baseNatAppointmentDO= new BaseNatAppointmentDO();
|
|
|
baseNatAppointmentDO.setMedicare(mediaCard);
|
|
|
baseNatAppointmentDO.setName(name);
|
|
|
baseNatAppointmentDO.setCardNo(cardNo);
|
|
|
baseNatAppointmentDO.setCardType(cardType);
|
|
|
baseNatAppointmentDO.setAddress(address);
|
|
|
baseNatAppointmentDO.setAppointmentTime(DateUtil.strToDate(natTime,"yyyy-MM-dd hh:mm:ss"));
|
|
|
baseNatAppointmentDO.setCityName(cityName);
|
|
|
baseNatAppointmentDO.setFirstJobCode(firstJobCode);
|
|
|
baseNatAppointmentDO.setFirstJobName(firstJobName);
|
|
|
baseNatAppointmentDO.setSecondJobCode(secondJobCode);
|
|
|
baseNatAppointmentDO.setSecondJobName(secondJobName);
|
|
|
baseNatAppointmentDO.setProvinceName(provinceName);
|
|
|
baseNatAppointmentDO.setTownName(townName);
|
|
|
baseNatAppointmentDO.setStreetName(streetName);
|
|
|
baseNatAppointmentDO.setPatientId(patientId);
|
|
|
baseNatAppointmentDO.setIsSuccess("0");
|
|
|
baseNatAppointmentDO.setPayStatus("0");
|
|
|
baseNatAppointmentDO.setCreateTime(new Date());
|
|
|
baseNatAppointmentDO.setMobile(mobile);
|
|
|
baseNatAppointmentDO.setInspectionCode("鼻/咽拭子");
|
|
|
baseNatAppointmentDO.setInspectionName("鼻/咽拭子");
|
|
|
baseNatAppointmentDO.setIcdCode("Z00.000");
|
|
|
baseNatAppointmentDO.setChargeCode("361322");
|
|
|
baseNatAppointmentDO.setWinNo("6");
|
|
|
baseNatAppointmentDO.setDept("3150000");
|
|
|
baseNatAppointmentDO.setDeptName("感染疾病科");
|
|
|
baseNatAppointmentDO= baseNatAppointmentDao.save(baseNatAppointmentDO);
|
|
|
Map returnMap = new HashMap();
|
|
|
net.sf.json.JSONObject jsondate = new JSONObject();
|
|
|
jsondate.put("checkPart","鼻/咽拭子");
|
|
@ -10472,7 +10499,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
net.sf.json.JSONObject rs = new JSONObject();
|
|
|
if (map!=null){
|
|
|
//先进行核算检测预约
|
|
|
String result = entranceService.BS10144(map.get("deptCode").toString(),map.get("doctorMappingCode").toString(),natTime,mediaCard,name,patientId,mobile,demoFlag);
|
|
|
String result = entranceService.BS10144("3150000","0001",natTime,mediaCard,name,patientId,mobile,demoFlag);
|
|
|
com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(result);
|
|
|
logger.info("核酸检测预约结束"+result);
|
|
|
Boolean flag = false;
|
|
@ -10599,8 +10626,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
logger.info("开单开始");
|
|
|
logger.info("saveNatAppointment params:"+jsondate.toString());
|
|
|
com.alibaba.fastjson.JSONArray array = new com.alibaba.fastjson.JSONArray();
|
|
|
array.add(jsondate);
|
|
|
try {
|
|
|
JSONObject jsonObject = entranceService.BS10112(jsondate.toString(),flag);
|
|
|
JSONObject jsonObject = entranceService.BS10112(array.toString(),flag);
|
|
|
//判断返回结果
|
|
|
String prers = jsonObject.getString("@RESULT");
|
|
|
//保存日志
|
|
@ -10616,10 +10645,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
if ("0".equals(prers)) {
|
|
|
String realOrder = jsonObject.getString("@real_order");
|
|
|
baseNatAppointmentDO.setRealOrder(realOrder);
|
|
|
baseNatAppointmentDO.setIsSuccess("1");
|
|
|
baseNatAppointmentDao.save(baseNatAppointmentDO);
|
|
|
String recipeTime = DateUtil.dateToStr(new Date(), "yyyyMMddHHmmss");
|
|
|
String applyDepaName = map.get("deptCode").toString();
|
|
|
|
|
|
String voucherNo = jsonObject.getString("@xtgzh0") ;
|
|
|
String voucherNo = jsonObject.getString("@xtgzh") ;
|
|
|
String applyDoctorName = map.get("doctorName").toString();
|
|
|
BasePatientDO patientDO = basePatientDao.findById(patientId);
|
|
|
String userName = null;
|
|
@ -10644,6 +10675,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
free = res.getString("@total_charge");
|
|
|
}
|
|
|
ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, free, "1");
|
|
|
|
|
|
/*//成功后发送模板消息
|
|
|
sendNatWxTemplat(name,cardNo,mobile,natTime,realOrder,"natAppointmentRemind");*/
|
|
|
}else{
|
|
@ -10655,29 +10687,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
baseNatAppointmentDO.setMedicare(mediaCard);
|
|
|
baseNatAppointmentDO.setName(name);
|
|
|
baseNatAppointmentDO.setCardNo(cardNo);
|
|
|
baseNatAppointmentDO.setCardType(cardType);
|
|
|
baseNatAppointmentDO.setAddress(address);
|
|
|
baseNatAppointmentDO.setAppointmentTime(DateUtil.strToDate(natTime,"yyyy-MM-dd hh:mm:ss"));
|
|
|
baseNatAppointmentDO.setCityName(cityName);
|
|
|
baseNatAppointmentDO.setFirstJobCode(firstJobCode);
|
|
|
baseNatAppointmentDO.setFirstJobName(firstJobName);
|
|
|
baseNatAppointmentDO.setSecondJobCode(secondJobCode);
|
|
|
baseNatAppointmentDO.setSecondJobName(secondJobName);
|
|
|
baseNatAppointmentDO.setProvinceName(provinceName);
|
|
|
baseNatAppointmentDO.setTownName(townName);
|
|
|
baseNatAppointmentDO.setStreetName(streetName);
|
|
|
baseNatAppointmentDO.setPatientId(patientId);
|
|
|
baseNatAppointmentDO.setIsSuccess("1");
|
|
|
baseNatAppointmentDO.setPayStatus("0");
|
|
|
baseNatAppointmentDO.setCreateTime(new Date());
|
|
|
baseNatAppointmentDO.setMobile(mobile);
|
|
|
baseNatAppointmentDao.save(baseNatAppointmentDO);
|
|
|
returnMap.put("msg","预约成功");
|
|
|
returnMap.put("status","200");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
return map;
|
|
|
}
|