Bläddra i källkod

Merge branch 'dev' of wujunjie/patient-co-management into dev

yeshijie 7 år sedan
förälder
incheckning
f4ce5e8bf5

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

@ -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 {
    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();
        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("-", "");
        String uuid = UUID.randomUUID().toString().replaceAll("-", "");
        Date now = new Date();
        Date now = new Date();
        Boolean isSuccess = true;
        Boolean isSuccess = true;
@ -616,6 +587,37 @@ public class PatientPrescriptionPayService extends BaseService {
        String channel = "WX_MMP";   //  医保支付渠道
        String channel = "WX_MMP";   //  医保支付渠道
        String subject = "续方订单支付";   //  订单名称
        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);
        OnepayDefaultClient onepayClient = new OnepayDefaultClient(config.getOnepayApi(), appId, appSecret, signType, encryptType);
@ -626,7 +628,7 @@ public class PatientPrescriptionPayService extends BaseService {
            expressage.setCode(getCode());
            expressage.setCode(getCode());
        }
        }
        expressage.setPrescriptionCode(prescriptionCode);
        expressage.setPrescriptionCode(prescriptionCode);
        Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
        prescription = prescriptionDao.findByCode(prescriptionCode);
        // 续方居民信息
        // 续方居民信息
        String paySsc = prescription.getSsc();
        String paySsc = prescription.getSsc();
        String payPatientCode = prescription.getPatient();
        String payPatientCode = prescription.getPatient();
@ -774,7 +776,7 @@ public class PatientPrescriptionPayService extends BaseService {
        prescriptionPay.setCreateTime(now);
        prescriptionPay.setCreateTime(now);
        prescriptionPay.setCzrq(now);
        prescriptionPay.setCzrq(now);
        try {
//        try {
//             ***************************  测通流程 ***************************************
//             ***************************  测通流程 ***************************************
            LOGGER.info("================================>" + "Before get BindCard");
            LOGGER.info("================================>" + "Before get BindCard");