Quellcode durchsuchen

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
wangzhinan vor 4 Jahren
Ursprung
Commit
2bf18ea9f2

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -6670,7 +6670,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    public MixEnvelop selectByUrl(String oupatientId,String prescriptionId,String wxId) throws Exception {
    public MixEnvelop selectByUrl(String oupatientId,String prescriptionId,String wxId,String flag) throws Exception {
        WxWechatDO wxWechatDO = wechatDao.findById(wxId);
        if (wxWechatDO==null){
            throw new Exception("微信配置不存在!");
@ -6693,7 +6693,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if (!StringUtils.isNoneBlank(idcard)){
            throw new Exception("就诊卡不存在!");
        }
        String url = ylzPayService.createSicardPayUrl(wxWechatDO.getAppOriginId(),patientWechatDo.getOpenid(),idcard,"WX");
        String url = ylzPayService.createSicardPayUrl(wxWechatDO.getAppOriginId(),patientWechatDo.getOpenid(),idcard,"WX",flag);
        com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(url);
        return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find,object);
    }

+ 1 - 0
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -1054,6 +1054,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            Double doctorFee = Double.parseDouble(fee);
            Double balance = doctorFee-cardFee;
            businessOrderDO.setPayPrice(balance);
            businessOrderDO.setPayType(4);
            businessOrderDao.save(businessOrderDO);
            List<BasePatientWechatDo> patientWechatDos = patientWechatDao.findByWechatIdAndPatientId(wechatId,businessOrderDO.getPatient());
            if (patientWechatDos!=null&&patientWechatDos.size()!=0){

+ 12 - 2
business/base-service/src/main/java/com/yihu/jw/order/pay/ylz/YlzPayService.java

@ -6,6 +6,8 @@ import com.yihu.jw.entity.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.hospital.prescription.dao.OauthDzqmConfigDao;
import com.yihu.jw.hospital.prescription.dao.OauthYlzConfigDao;
import com.yihu.jw.order.pay.utils.PayLogService;
import com.yihu.jw.util.common.QrcodeUtil;
import com.yihu.jw.utils.ByteToInputStream;
import com.yihu.jw.utils.StringUtil;
import com.ylzinfo.onepay.sdk.HisOnepayClient;
import com.ylzinfo.onepay.sdk.OnepayClient;
@ -17,6 +19,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.HashMap;
@ -308,7 +311,7 @@ public class YlzPayService {
     * @param channel
     * @return
     */
    public String createSicardPayUrl(String accId,String openId,String cardNo,String channel){
    public String createSicardPayUrl(String accId,String openId,String cardNo,String channel,String flag){
        String object  = null;
        Boolean isSuccess = true;
        String error = null;
@ -331,6 +334,13 @@ public class YlzPayService {
            //jsonObject.put("extra")
            ResponseParams<JSONObject> response = onepayClient.createSicardPayUrl(jsonObject);
            if (response.getRespCode().equals("000000")){
                JSONObject object1 = response.getParam();
                String url = object1.getString("payUrl");
                InputStream qrcode = QrcodeUtil.createQrcode(url,300,"jpg");
                ByteToInputStream byteToInputStream = new ByteToInputStream();
                String QRCodeImg = byteToInputStream.getBase64FromInputStream(qrcode);
                object1.put("qrcodeUrl","data:image/png;base64,"+ QRCodeImg);
                response.setParam(object1);
                object = JSON.toJSONString(response);
            }else {
                isSuccess = false;
@ -345,7 +355,7 @@ public class YlzPayService {
            e.printStackTrace(pw);
            error = sw.toString();
        }
        logService.saveHttpLog(isSuccess, "hop.mmpay.sicard.url", "互联网医院支付地址", "POST", null,JSON.toJSONString(jsonObject), object, error,logService.pushType);
        logService.saveHttpLog(isSuccess, "hop.mmpay.sicard.pay.url", "互联网医院支付地址", "POST", null,JSON.toJSONString(jsonObject), object, error,logService.pushType);
        return object;
    }