|
@ -575,36 +575,7 @@ public class PatientPrescriptionPayService extends BaseService {
|
|
|
public Map charge(int type, String addressJson, String orgCode, String prescriptionCode, int totalAmount, String people, String accessToken, String returnUrl) throws Exception {
|
|
|
|
|
|
Map resultMap = new HashMap();
|
|
|
//获取机构映射
|
|
|
HospitalMapping hos = mappingDao.findByCode(orgCode);
|
|
|
if (hos == null) {
|
|
|
throw new Exception("no hospital mapping!");
|
|
|
}
|
|
|
Hospital hospital = hospitalDao.findByCode(orgCode);
|
|
|
// 患者签约信息
|
|
|
String orgName = hos.getName();
|
|
|
String appId = hos.getAppId();
|
|
|
String appSecret = hos.getAppSecret();
|
|
|
String signAddress = hospital.getAddress();
|
|
|
LOGGER.info("APPID============> " + appId);
|
|
|
LOGGER.info("APPSECRET============> " + appSecret);
|
|
|
|
|
|
Patient patient = patientDao.findByCode(people);
|
|
|
//微信登录患者信息
|
|
|
String userName = patient.getName();
|
|
|
String openid = patient.getOpenid();
|
|
|
String userProvince = patient.getProvince();
|
|
|
String userProvinceName = patient.getProvinceName();
|
|
|
String userCity = patient.getCity();
|
|
|
String userCityName = patient.getCityName();
|
|
|
String userTown = patient.getTown();
|
|
|
String userTownName = patient.getTownName();
|
|
|
String userStreet = patient.getStreet();
|
|
|
String userStreetName = patient.getStreetName();
|
|
|
String userAddress = patient.getAddress();
|
|
|
String userSsc = patient.getSsc();
|
|
|
String userIdcard = patient.getIdcard();
|
|
|
|
|
|
Prescription prescription = null;
|
|
|
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
|
|
|
Date now = new Date();
|
|
|
Boolean isSuccess = true;
|
|
@ -616,6 +587,37 @@ public class PatientPrescriptionPayService extends BaseService {
|
|
|
String channel = "WX_MMP"; // 医保支付渠道
|
|
|
String subject = "续方订单支付"; // 订单名称
|
|
|
|
|
|
try {
|
|
|
//获取机构映射
|
|
|
HospitalMapping hos = mappingDao.findByCode(orgCode);
|
|
|
if (hos == null) {
|
|
|
throw new Exception("no hospital mapping!");
|
|
|
}
|
|
|
Hospital hospital = hospitalDao.findByCode(orgCode);
|
|
|
// 患者签约信息
|
|
|
String orgName = hos.getName();
|
|
|
String appId = hos.getAppId();
|
|
|
String appSecret = hos.getAppSecret();
|
|
|
String signAddress = hospital.getAddress();
|
|
|
LOGGER.info("APPID============> " + appId);
|
|
|
LOGGER.info("APPSECRET============> " + appSecret);
|
|
|
|
|
|
Patient patient = patientDao.findByCode(people);
|
|
|
//微信登录患者信息
|
|
|
String userName = patient.getName();
|
|
|
String openid = patient.getOpenid();
|
|
|
String userProvince = patient.getProvince();
|
|
|
String userProvinceName = patient.getProvinceName();
|
|
|
String userCity = patient.getCity();
|
|
|
String userCityName = patient.getCityName();
|
|
|
String userTown = patient.getTown();
|
|
|
String userTownName = patient.getTownName();
|
|
|
String userStreet = patient.getStreet();
|
|
|
String userStreetName = patient.getStreetName();
|
|
|
String userAddress = patient.getAddress();
|
|
|
String userSsc = patient.getSsc();
|
|
|
String userIdcard = patient.getIdcard();
|
|
|
|
|
|
// *************************** 测通流程 ***************************************
|
|
|
OnepayDefaultClient onepayClient = new OnepayDefaultClient(config.getOnepayApi(), appId, appSecret, signType, encryptType);
|
|
|
|
|
@ -626,7 +628,7 @@ public class PatientPrescriptionPayService extends BaseService {
|
|
|
expressage.setCode(getCode());
|
|
|
}
|
|
|
expressage.setPrescriptionCode(prescriptionCode);
|
|
|
Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
|
|
|
prescription = prescriptionDao.findByCode(prescriptionCode);
|
|
|
// 续方居民信息
|
|
|
String paySsc = prescription.getSsc();
|
|
|
String payPatientCode = prescription.getPatient();
|
|
@ -774,7 +776,7 @@ public class PatientPrescriptionPayService extends BaseService {
|
|
|
prescriptionPay.setCreateTime(now);
|
|
|
prescriptionPay.setCzrq(now);
|
|
|
|
|
|
try {
|
|
|
// try {
|
|
|
|
|
|
// *************************** 测通流程 ***************************************
|
|
|
LOGGER.info("================================>" + "Before get BindCard");
|