Forráskód Böngészése

海沧医保接口

wangzhinan 2 éve
szülő
commit
e5287b7c23

+ 3 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/HcyyPrescriptionService.java

@ -1827,6 +1827,9 @@ public class HcyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            if (ylzMedicalRelationDO!=null&&ylzMedicalRelationDO.getState()!=null&&ylzMedicalRelationDO.getState()==1){
                return "已结算";
            }
            if (ylzMedicalRelationDO==null){
                return "已结算";
            }
            BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(ylzMedicalRelationDO.getId());
            String depositType = "";
            String depositAmount = "";

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

@ -2203,21 +2203,28 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        logger.info("下载银医通");
        String chargeType = "";
        if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getTwfzChargeType();
        }else if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getSpfzChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getTwzxChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getSpzxChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"3".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getJyzxChargeType();
        }else if ("2".equalsIgnoreCase(outpatientDO.getOutpatientType())){
            chargeType = doctorDO.getXtfzChargeType();
        if (StringUtils.isNoneBlank(outpatientDO.getVisitType())&&outpatientDO.getVisitType().equalsIgnoreCase("1")){
            chargeType = doctorDO.getXgszChargeType();
        }else {
            chargeType = doctorDO.getChargeType();
            if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
                chargeType = doctorDO.getTwfzChargeType();
            }else if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
                chargeType = doctorDO.getSpfzChargeType();
            }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
                chargeType = doctorDO.getTwzxChargeType();
            }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
                chargeType = doctorDO.getSpzxChargeType();
            }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"3".equalsIgnoreCase(outpatientDO.getType())){
                chargeType = doctorDO.getJyzxChargeType();
            }else if ("2".equalsIgnoreCase(outpatientDO.getOutpatientType())){
                chargeType = doctorDO.getXtfzChargeType();
            }else if ("2".equalsIgnoreCase(outpatientDO.getOutpatientType())){
                chargeType = doctorDO.getXtfzChargeType();
            }else {
                chargeType = doctorDO.getChargeType();
            }
        }
        net.sf.json.JSONObject rs = entranceService.BS10111(outpatientDO.getCardNo(), doctorMappingDO.getMappingCode(), outpatientDO.getDept(), chargeType, outpatientDO.getWinNo(), demoFlag);
        net.sf.json.JSONObject res = rs.getJSONObject("resquest");
        logger.info("挂号结果 res: " + res.toString());
@ -14957,7 +14964,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    logger.info("变更处方结算状态成功");
                    String fee = ylzMedicalRelationDO.getTotalAmount();
                    Double medicarePrice = Double.parseDouble(ylzMedicalRelationDO.getMedicalPrice())+Double.parseDouble(ylzMedicalRelationDO.getPersonAccount());
                    String pushPayLog =  payInfoNoticeService.pushPrescriptionPayMedicare(wlyyOutpatientDO.getConsumer(),prescriptionDO.getDoctorName(),prescriptionDO.getVoucherNo(),prescriptionDO.getOutpatientId(),prescriptionDO.getId(),fee,medicarePrice+"",ylzMedicalRelationDO.getPersonCash(),title,null);
                    String pushPayLog =  payInfoNoticeService.pushPrescriptionPayMedicare(wlyyOutpatientDO.getConsumer(),prescriptionDO.getDoctorName(),prescriptionDO.getRealOrder(),prescriptionDO.getOutpatientId(),prescriptionDO.getId(),fee,medicarePrice+"",ylzMedicalRelationDO.getPersonCash(),title,null);
                    logger.info("处方结算成功"+pushPayLog+"====="+realOrder);
                    //2.6.1	电子处方订单接收
                    logger.info("医保电子处方订单");

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/HcyyEntranceService.java

@ -1842,7 +1842,7 @@ public class HcyyEntranceService {
            condition += "<patientId>"+patientId+"</patientId>";
        }
        if (StringUtils.isNotBlank(eventNo)&&!"null".equalsIgnoreCase(eventNo)){
            condition += "<eventNo>"+eventNo+"</eventNo>";
            condition += "<eventNo>R"+eventNo+"</eventNo>";
        }
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";

+ 56 - 21
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -24,9 +24,11 @@ import com.yihu.jw.hospital.healthCare.YlzMedicailRelationDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.service.HcyyPrescriptionService;
import com.yihu.jw.hospital.prescription.service.PrescriptionLogService;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.HcyyEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import com.yihu.jw.hospital.ykyy.service.YkyyService;
@ -151,6 +153,8 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
    private HttpClientUtil httpClientUtil;
    @Autowired
    private YlzMedicailRelationDao ylzMedicailRelationDao;
    @Autowired
    private HcyyPrescriptionService hcyyPrescriptionService;
    /**
@ -1815,28 +1819,34 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                String fee = null;
                if (wechatId.equalsIgnoreCase("xm_zsyy_wx")||wechatId.equalsIgnoreCase("xm_xzzx_wx")||wechatId.equalsIgnoreCase("xm_hcyy_wx")){
                    if (wlyyOutpatientDO!=null){
                        if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
                            WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getTwfzChargeType(),"6");
                            fee = chargeDictDO.getReqFee()+"";
                        }else if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(wlyyOutpatientDO.getType())){
                            WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getSpfzChargeType(),"6");
                            fee = chargeDictDO.getReqFee()+"";
                        }else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
                            WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getTwzxChargeType(),"6");
                            fee = chargeDictDO.getReqFee()+"";
                        }else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(wlyyOutpatientDO.getType())){
                            WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getSpzxChargeType(),"6");
                            fee = chargeDictDO.getReqFee()+"";
                        }else if ("2".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())){
                            WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getXtfzChargeType(),"6");
                            fee = chargeDictDO.getReqFee()+"";
                        }else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"3".equalsIgnoreCase(wlyyOutpatientDO.getType())){
                            WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getJyzxChargeType(),"6");
                        if (wlyyOutpatientDO.getVisitType()!=null&&wlyyOutpatientDO.getVisitType().equalsIgnoreCase("1")){
                            WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getXgszChargeType(),"6");
                            fee = chargeDictDO.getReqFee()+"";
                        }else {
                            WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getChargeType(),"6");
                            fee = chargeDictDO.getReqFee()+"";
                            if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
                                WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getTwfzChargeType(),"6");
                                fee = chargeDictDO.getReqFee()+"";
                            }else if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(wlyyOutpatientDO.getType())){
                                WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getSpfzChargeType(),"6");
                                fee = chargeDictDO.getReqFee()+"";
                            }else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
                                WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getTwzxChargeType(),"6");
                                fee = chargeDictDO.getReqFee()+"";
                            }else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(wlyyOutpatientDO.getType())){
                                WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getSpzxChargeType(),"6");
                                fee = chargeDictDO.getReqFee()+"";
                            }else if ("2".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())){
                                WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getXtfzChargeType(),"6");
                                fee = chargeDictDO.getReqFee()+"";
                            }else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"3".equalsIgnoreCase(wlyyOutpatientDO.getType())){
                                WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getJyzxChargeType(),"6");
                                fee = chargeDictDO.getReqFee()+"";
                            }else {
                                WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getChargeType(),"6");
                                fee = chargeDictDO.getReqFee()+"";
                            }
                        }
                    }
                }else {
@ -2145,7 +2155,20 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            }
            logger.info("开始1"+idcard);
            String openId = "";
            businessOrderDO.setPayPrice(b1.doubleValue());
            JSONObject object1 = hcyyPrescriptionService.selectCardInfo(cardNo);
            Double cardFee = object1.getDouble("ZHYE");
            BigDecimal b = new BigDecimal(String.valueOf(cardFee));
            BigDecimal c = new BigDecimal(String.valueOf(fee));
            if (b.compareTo(c) == 1){
                return "无需线上支付";
            }
            BigDecimal balance = c.subtract(b);
            if (balance.doubleValue()<=0){
                return "无需线上支付";
            }
            businessOrderDO.setPayPrice(balance.doubleValue());
            businessOrderDO.setPayType(4);
            businessOrderDO.setHistoryOrder(businessOrderDO.getOrderNo());
            businessOrderDO.setOrderNo("HLWYY"+System.currentTimeMillis()+(int)(Math.random()*900)+100);
@ -2209,7 +2232,19 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            }
            logger.info("开始2"+idcard);
            String openId = "";
            businessOrderDO.setPayPrice(b1.doubleValue());
            JSONObject object1 = hcyyPrescriptionService.selectCardInfo(cardNo);
            Double cardFee = object1.getDouble("ZHYE");
            BigDecimal b = new BigDecimal(String.valueOf(cardFee));
            BigDecimal c = new BigDecimal(String.valueOf(fee));
            if (b.compareTo(c) == 1){
                return "无需线上支付";
            }
            BigDecimal balance = c.subtract(b);
            if (balance.doubleValue()<=0){
                return "无需线上支付";
            }
            businessOrderDO.setPayPrice(balance.doubleValue());
            businessOrderDO.setPayType(4);
            businessOrderDO.setOrderNo("HLWYY"+System.currentTimeMillis()+(int)(Math.random()*900)+100);
            businessOrderDO.setDepositType(depositType);

+ 2 - 2
svr/svr-internet-hospital/pom.xml

@ -11,7 +11,7 @@
    </parent>
    <groupId>com.yihu.jw</groupId>
    <artifactId>svr-internet-hospital-test</artifactId>
    <artifactId>svr-internet-hospital</artifactId>
    <packaging>jar</packaging>
    <version>${parent.version}</version>
@ -267,7 +267,7 @@
    </dependencies>
    <build>
        <finalName>svr-internet-hospital-test</finalName>
        <finalName>svr-internet-hospital</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -376,7 +376,7 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
						}
					}
				}else if("xm_hcyy_wx".equals(wxId)){ //心脏中心挂号
				}else if("xm_hcyy_wx".equals(wxId)){ //海沧医院
					if (demoFlag.equalsIgnoreCase("true")){
						rsCode="0";
						mes="已退号";

+ 6 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/QrcodeService.java

@ -9,6 +9,7 @@ import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.HcyyEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.patient.dao.BasePatientDao;
@ -75,6 +76,8 @@ public class QrcodeService {
    private HttpClientUtil httpClientUtil;
    @Autowired
    private BaseOrgDao baseOrgDao;
    @Autowired
    private HcyyEntranceService hcyyEntranceService;
    /**
     * 生成所有医生的二维码
     *
@ -457,7 +460,9 @@ public class QrcodeService {
                jsonObject.put("nickname","nickname");
                objEnvelop.setMessage(jsonObject.toString());
                return objEnvelop;
            }else{
            } else if ("xm_hcyy_wx".equalsIgnoreCase(wxId)) {
                token =  hcyyEntranceService.getHcToken();
            } else{
                token = wxAccessTokenService.getWxAccessTokenById(wxId).getAccessToken();
            }
            System.out.println("token"+token);