|
@ -12543,26 +12543,35 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
if(StringUtils.isNoneBlank(itemPrice)){
|
|
if(StringUtils.isNoneBlank(itemPrice)){
|
|
natFee= Double.parseDouble(itemPrice)*100;
|
|
natFee= Double.parseDouble(itemPrice)*100;
|
|
}
|
|
}
|
|
//先预约号源
|
|
|
|
Date format2 = null;
|
|
|
|
format2 = new SimpleDateFormat("yyyy-MM-dd").parse(natTime);
|
|
|
|
String shortDate = new SimpleDateFormat("yyyyMMdd").format(format2);
|
|
|
|
System.out.println("yyyy-MM-dd转yyyyMMdd:"+shortDate);
|
|
|
|
String regRes=tasyNatService.saveRegOrder(regDept,shortDate,pm,preNo,cardNo,mobile,name,"3");
|
|
|
|
com.alibaba.fastjson.JSONObject regObj = com.alibaba.fastjson.JSONObject.parseObject(regRes);
|
|
|
|
String HisSeqNo="";
|
|
String HisSeqNo="";
|
|
String orderNum="";
|
|
String orderNum="";
|
|
if (regObj!=null){
|
|
|
|
if ("true".equalsIgnoreCase(regObj.getString("success"))){
|
|
|
|
com.alibaba.fastjson.JSONObject dataObj = com.alibaba.fastjson.JSONObject.parseObject(regObj.getString("data"));
|
|
|
|
HisSeqNo=dataObj.getString("HisSeqNo").trim();
|
|
|
|
orderNum=dataObj.getString("OrderNumber").trim();
|
|
|
|
}else {
|
|
|
|
returnMap.put("msg",regObj.getString("data"));
|
|
|
|
returnMap.put("status","-1");
|
|
|
|
return returnMap;
|
|
|
|
|
|
WlyyHospitalSysDictDO tasyTime = wlyyHospitalSysDictDao.findById("natTime");
|
|
|
|
if (tasyTime!=null){
|
|
|
|
String natTimeC = tasyTime.getDictValue();
|
|
|
|
if (natTimeC.equalsIgnoreCase("1")){
|
|
|
|
//先预约号源
|
|
|
|
Date format2 = null;
|
|
|
|
format2 = new SimpleDateFormat("yyyy-MM-dd").parse(natTime);
|
|
|
|
String shortDate = new SimpleDateFormat("yyyyMMdd").format(format2);
|
|
|
|
System.out.println("yyyy-MM-dd转yyyyMMdd:"+shortDate);
|
|
|
|
String regRes=tasyNatService.saveRegOrder(regDept,shortDate,pm,preNo,cardNo,mobile,name,"3");
|
|
|
|
com.alibaba.fastjson.JSONObject regObj = com.alibaba.fastjson.JSONObject.parseObject(regRes);
|
|
|
|
|
|
|
|
if (regObj!=null){
|
|
|
|
if ("true".equalsIgnoreCase(regObj.getString("success"))){
|
|
|
|
com.alibaba.fastjson.JSONObject dataObj = com.alibaba.fastjson.JSONObject.parseObject(regObj.getString("data"));
|
|
|
|
HisSeqNo=dataObj.getString("HisSeqNo").trim();
|
|
|
|
orderNum=dataObj.getString("OrderNumber").trim();
|
|
|
|
}else {
|
|
|
|
returnMap.put("msg",regObj.getString("data"));
|
|
|
|
returnMap.put("status","-1");
|
|
|
|
return returnMap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
//先进行核算检测预约
|
|
//先进行核算检测预约
|
|
String realOrder="";
|
|
String realOrder="";
|
|
String addressNow=provinceName+cityName+townName+streetName+address;
|
|
String addressNow=provinceName+cityName+townName+streetName+address;
|
|
@ -12577,7 +12586,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
if ("0".equalsIgnoreCase(returnCode)){
|
|
if ("0".equalsIgnoreCase(returnCode)){
|
|
returnMap.put("msg",object.getString("data"));
|
|
returnMap.put("msg",object.getString("data"));
|
|
returnMap.put("status","-1");
|
|
returnMap.put("status","-1");
|
|
tasyNatService.cancleOrder(cardNo,HisSeqNo,orderNum);
|
|
|
|
|
|
if (tasyTime.getDictValue().equalsIgnoreCase("1")){
|
|
|
|
tasyNatService.cancleOrder(cardNo,HisSeqNo,orderNum);
|
|
|
|
}
|
|
return returnMap;
|
|
return returnMap;
|
|
}else {
|
|
}else {
|
|
flag = true;
|
|
flag = true;
|
|
@ -12600,7 +12611,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
baseNatAppointmentDO.setCardType(cardType);
|
|
baseNatAppointmentDO.setCardType(cardType);
|
|
baseNatAppointmentDO.setIdnoType(idnoType);
|
|
baseNatAppointmentDO.setIdnoType(idnoType);
|
|
baseNatAppointmentDO.setAddress(address);
|
|
baseNatAppointmentDO.setAddress(address);
|
|
baseNatAppointmentDO.setAppointmentTime(DateUtil.strToDateLong(natTime));
|
|
|
|
|
|
if (tasyTime.getDictValue().equalsIgnoreCase("1")){
|
|
|
|
baseNatAppointmentDO.setAppointmentTime(DateUtil.strToDateLong(natTime));
|
|
|
|
}else {
|
|
|
|
baseNatAppointmentDO.setAppointmentTime(new Date());
|
|
|
|
}
|
|
baseNatAppointmentDO.setOderNum(orderNum);
|
|
baseNatAppointmentDO.setOderNum(orderNum);
|
|
baseNatAppointmentDO.setCityName(cityName);
|
|
baseNatAppointmentDO.setCityName(cityName);
|
|
baseNatAppointmentDO.setFirstJobCode(firstJobCode);
|
|
baseNatAppointmentDO.setFirstJobCode(firstJobCode);
|
|
@ -13153,10 +13168,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
}else if("xm_tasy_wx".equalsIgnoreCase(wechatId)){
|
|
}else if("xm_tasy_wx".equalsIgnoreCase(wechatId)){
|
|
if (StringUtils.isNoneBlank(baseNatAppointmentDO.getRealOrder())){
|
|
if (StringUtils.isNoneBlank(baseNatAppointmentDO.getRealOrder())){
|
|
logger.info("同步his订单状态"+baseNatAppointmentDO.getRealOrder());
|
|
logger.info("同步his订单状态"+baseNatAppointmentDO.getRealOrder());
|
|
//取消号源
|
|
|
|
String registerCancel =tasyNatService.cancleOrder(baseNatAppointmentDO.getCardNo(),baseNatAppointmentDO.getRegisterNo(),baseNatAppointmentDO.getOderNum());
|
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(registerCancel);
|
|
|
|
String isSuccess=jsonObject.getString("success");
|
|
|
|
|
|
WlyyHospitalSysDictDO tasyTime = wlyyHospitalSysDictDao.findById("natTime");
|
|
|
|
if (tasyTime!=null){
|
|
|
|
if (tasyTime.getDictValue().equalsIgnoreCase("1")){
|
|
|
|
//取消号源
|
|
|
|
String registerCancel =tasyNatService.cancleOrder(baseNatAppointmentDO.getCardNo(),baseNatAppointmentDO.getRegisterNo(),baseNatAppointmentDO.getOderNum());
|
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(registerCancel);
|
|
|
|
String isSuccess=jsonObject.getString("success");
|
|
|
|
}
|
|
|
|
}
|
|
String natCancel=tasyNatService.cancelNat(baseNatAppointmentDO.getRealOrder(),baseNatAppointmentDO.getMedicare().trim(),baseNatAppointmentDO.getName());
|
|
String natCancel=tasyNatService.cancelNat(baseNatAppointmentDO.getRealOrder(),baseNatAppointmentDO.getMedicare().trim(),baseNatAppointmentDO.getName());
|
|
com.alibaba.fastjson.JSONObject jsonObject1 = JSON.parseObject(natCancel);
|
|
com.alibaba.fastjson.JSONObject jsonObject1 = JSON.parseObject(natCancel);
|
|
String returnCode=jsonObject1.getString("ReturnCode");
|
|
String returnCode=jsonObject1.getString("ReturnCode");
|