Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/dev' into dev

wangxingwang 7 anni fa
parent
commit
fb951c4f95

+ 9 - 12
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PatientPrescriptionPayService.java

@ -12,10 +12,7 @@ import com.yihu.wlyy.entity.organization.Hospital;
import com.yihu.wlyy.entity.organization.HospitalMapping;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.entity.patient.prescription.Prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressage;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionInfo;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionPay;
import com.yihu.wlyy.entity.patient.prescription.*;
import com.yihu.wlyy.repository.charge.ChargeDao;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.message.MessageDao;
@ -419,7 +416,7 @@ public class PatientPrescriptionPayService extends BaseService {
                //支付成功返回续方code给前端
                resultMap.put("prescriptionCode",prescriptionCode);
                prescriptionPay.setTradeStatus("1");//交易状态 成功1 失败0
                prescription.setStatus(30);//续费状态 30支付成功 21支付失败
                prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.pay_success.getValue());//续费状态 枚举 支付成功
                expressage.setDel(1);//快递信息状态 1可用 0删除
                expressageDao.save(expressage);
                prescriptionDao.save(prescription);
@ -445,7 +442,7 @@ public class PatientPrescriptionPayService extends BaseService {
            } else if ("1".equals(tradeStatus)) {
                prescriptionPay.setTradeStatus("0");//交易状态 成功1 失败0
                prescription.setStatus(21);////续费状态 30支付成功 21支付失败
                prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.pay_error.getValue());////续费状态 支付失败
                expressage.setDel(0);//快递信息状态 1可用 0删除
                expressageDao.save(expressage);
                prescriptionDao.save(prescription);
@ -457,8 +454,8 @@ public class PatientPrescriptionPayService extends BaseService {
        }
        //                记录log日志到数据库
        logService.saveHttpLog(isSuccess, config.getRecipeReturnUrl(), "长处方支付页面跳转", "POST", null, "", responses, error, logService.onepayType);
        //记录支付log日志到数据库
        payLogService.addLog(prescription, 2, flag, 1);
        //记录支付log日志到数据库  支付
        payLogService.addLog(prescription, PrescriptionLog.PrescriptionLogType.pay.getValue(), flag, 1);
        return resultMap;
    }
@ -589,7 +586,7 @@ public class PatientPrescriptionPayService extends BaseService {
                    PrescriptionExpressage expressage = expressageDao.findByPrescriptionPay(prescriptionCode);
                    if ("0".equals(tradeStatus)) {
                        prescriptionPay.setTradeStatus("1");//交易状态 成功1 失败0
                        prescription.setStatus(30);//续费状态 30支付成功 21支付失败
                        prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.pay_success.getValue());//续费状态 30支付成功 21支付失败
                        expressage.setDel(1);//快递信息状态 1可用 0删除
                        expressageDao.save(expressage);
                        prescriptionDao.save(prescription);
@ -610,7 +607,7 @@ public class PatientPrescriptionPayService extends BaseService {
                        jwPrescriptionService.executeSickSettle(prescriptionCode);
                    } else if ("1".equals(tradeStatus)) {
                        prescriptionPay.setTradeStatus("0");//交易状态 成功1 失败0
                        prescription.setStatus(21);////续费状态 30支付成功 21支付失败
                        prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.pay_error.getValue());////续费状态 30支付成功 21支付失败
                        expressage.setDel(0);//快递信息状态 1可用 0删除
                        expressageDao.save(expressage);
                        prescriptionDao.save(prescription);
@ -628,7 +625,7 @@ public class PatientPrescriptionPayService extends BaseService {
        //                记录log日志到数据库
        logService.saveHttpLog(isSuccess, config.getReceiveNotify(), "异步支付通知", "POST", null, params, responses, error, logService.onepayType);
        //记录支付log日志到数据库
        payLogService.addLog(prescription, 2, flag, 1);
        payLogService.addLog(prescription, PrescriptionLog.PrescriptionLogType.pay.getValue(), flag, 1);
    }
@ -958,7 +955,7 @@ public class PatientPrescriptionPayService extends BaseService {
        //保存http日志
        logService.saveHttpLog(isSuccess, config.getRecipeChargeType(), "长处方结算", "POST", null, msgBody, response, error, logService.onepayType);
        //保存长处方日志  type=2易联众对接 flag =1成功 flag=0 0失败 userType 1 患者 2医生
        payLogService.addLog(prescription, 2, flag, 1);
        payLogService.addLog(prescription, PrescriptionLog.PrescriptionLogType.pay.getValue(), flag, 1);
        if (!isSuccess) {
            throw new Exception(error);
        }