Bladeren bron

充值卡支付

wangjun 4 jaren geleden
bovenliggende
commit
3305529bc0

+ 3 - 2
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java

@ -103,7 +103,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
        }
        if (StringUtils.isNotBlank(name)){
            name = "%"+name+"%";
            sqlTotal += " AND (a.name like:name or b.dept_name like:name)";
            sqlTotal += " AND (a.name like:name or b.dept_name like:name or c.mapping_code like :name)";
            params.put("name",name);
        }
        if (StringUtils.isNotBlank(type)){
@ -136,6 +136,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
                " b.dept_name AS \"deptName\", " +
                " e.req_fee AS \"money\", " +
                " a.charge_type as \"chargeType\", "+
                " c.mapping_code as \"mappingCode\", "+
                "\tm.req_fee as \"twfzFee\",\n" +
                "\tn.req_fee as \"spfzFee\",\n" +
                "\tp.req_fee as \"spzxFee\",\n" +
@ -170,7 +171,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
            sql += " AND a.del =:status";
        }
        if (StringUtils.isNotBlank(name)){
            sql += " AND (a.name like:name or b.dept_name like:name)";
            sql += " AND (a.name like:name or b.dept_name like:name or c.mapping_code like:name)";
        }
        if (StringUtils.isNotBlank(type)){
            sql += " AND a.outpatient_type like:type";

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

@ -11221,7 +11221,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param size
     * @return
     */
    public Envelop getNatAppointmentList(String realOrder, String name, String hospitalFlag, String mobile, String idcard, String payStatus, String medicare, String createTimeStart, String createTimeEnd, String appointmentTimeStart, String appointmentTimeEnd, Integer isSuccess, Integer page, Integer pageSize) {
    public Envelop getNatAppointmentList(String realOrder, String name, String hospitalFlag, String mobile, String idcard, String payStatus, String medicare, String createTimeStart, String createTimeEnd, String appointmentTimeStart, String appointmentTimeEnd, Integer isSuccess, Integer page, Integer pageSize,String orderNo) {
        String sql = "select t.name as \"name\"," +
                "t.card_no as \"cardNo\"," +
                "t.card_type as \"cardType\"," +
@ -11238,8 +11238,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "t.id as \"id\"," +
                "t.card_no_type as \"cardNoType\"," +
                "t.HOSPITAL_FLAG as \"hospitalFlag\"," +
                "m.order_no as \"orderNo\"," +
                "t.appointment_time as \"appointmentTime\" " +
                " from base_nat_appointment t where 1=1 ";
                " from base_nat_appointment t left join base_business_order_pay m ";
        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
            sql+=" on to_char(t.id) = m.relation_code " +
                    " where 1=1 ";
        }else{
            sql+=" on cast(t.id as char) = m.relation_code " +
                    " where 1=1 ";
        }
        if (StringUtils.isNotBlank(realOrder)) {
            sql += " and t.real_order like '%" + realOrder + "%' ";
        }
@ -11252,6 +11260,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if (StringUtils.isNotBlank(idcard)) {
            sql += " and t.card_no like '%" + idcard + "%' ";
        }
        if (StringUtils.isNoneBlank(orderNo)){
            sql+=" and m.order_no = '"+orderNo+"' ";
        }
        //支付状态
        if (StringUtils.isNotBlank(payStatus)) {
            sql += " and t.pay_status ='" + payStatus + "' ";

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

@ -1152,6 +1152,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        return businessOrderDO;
    }
    public BusinessOrderDO selectStatusById(Integer id){
        BusinessOrderDO businessOrderDO = businessOrderDao.findOne(id);
        return businessOrderDO;
    }
    public BaseNatAppointmentDO selectById(Integer relationCode){
        return  baseNatAppointmentDao.findOne(relationCode);
@ -1365,7 +1369,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                   }
               }
               if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
                   String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                       String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                   enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
               }else if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
                   String url="https://intel.yanketong.com/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
@ -1806,6 +1810,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        String notifyUrl =url;
        String price = (int)(businessOrderDO.getPayPrice()*100)+"";
        map = unifiedorder(wechatId,businessOrderDO.getDescription(),price,wxPayType,openid,businessOrderDO.getOrderNo(),notifyUrl,patientId);
        map.put("id",businessOrderDO.getId());
        logger.info("success="+JSONObject.toJSONString(map));
        return map;
    }

+ 1 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -483,6 +483,7 @@ public class BaseHospitalRequestMapping {
        public static final String tradeQuery= "/tradeQuery";
        public static final String selectOrderStatus="/selectOrderStatus";
        public static final String selectOrderStatusById="/selectOrderStatusById";
        public static final String selectOrderListStatus="/selectOrderListStatus";
        public static final String selectPrescriptionList = "/selectPrescriptionList";

+ 35 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -1561,4 +1561,39 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
        ConsultDo consultDo = consultDao.findOne(consult);
        return  success(systemMessageService.sendDoctorRemindSms(consultDo));
    }
    /**
     * 充值卡一支付
     * @param mzhm
     * @param jkje
     * @param type
     * @param paymentType
     * @param patientId
     * @return
     * @throws Exception
     */
    @PostMapping(value= BaseHospitalRequestMapping.Prescription.yktMedicalCardTopUp)
    @ApiOperation("眼科--充值卡支付")
    public ObjEnvelop yktMedicalCardTopUp(
            @ApiParam(name = "mzhm", value = "卡号", required = true)
            @RequestParam(required = true)String mzhm,
            @ApiParam(name = "jkje", value = "充值金额", required = true)
            @RequestParam(required = true)Double jkje,
            @ApiParam(name = "type", value = "类型0 就诊卡号 1 门诊卡号", required = true)
            @RequestParam(required = true)Integer type,
            @ApiParam(name = "paymentType", value = "1支付宝 2微信", required = true)
            @RequestParam(required = true)Integer paymentType,
            @ApiParam(name = "patientId", value = "居民code", required = true)
            @RequestParam(required = true)String patientId,
            @ApiParam(name = "hospitalId", value = "医院Ccode", required = true)
            @RequestParam(required = true)String hospitalId,
            @ApiParam(name = "wxPayType", value = "微信交易类型 公众号支付:JSAPI  原生扫码支付:NATIVE", required = true)
            @RequestParam(required = true)String wxPayType,
            @ApiParam(name = "appletCode", value = "appletCode", required = false)
            @RequestParam(required = false)String appletCode) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",businessOrderService.yktMedicalCardTopUp(mzhm,jkje,type,paymentType,patientId,wxId,hospitalId,wxPayType,appletCode));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
}

+ 20 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -1592,7 +1592,23 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    /**
     * 查询支付状态
     * @param id
     * @return
     * @throws Exception
     */
    @PostMapping(value= BaseHospitalRequestMapping.Prescription.selectOrderStatusById)
    @ApiOperation("查询支付状态")
    public ObjEnvelop selectOrderStatusById(
            @ApiParam(name = "id", value = "订单id", required = true)
            @RequestParam(required = true)Integer id) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",businessOrderService.selectStatusById(id));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    /**
     * 查询支付info
@ -2663,12 +2679,14 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            @RequestParam(required = false) String appointmentTimeEnd,
            @ApiParam(name = "isSuccess", value = "1成功  0失败")
            @RequestParam(value = "isSuccess", required = false) Integer isSuccess,
            @ApiParam(name = "orderNo", value = "订单号")
            @RequestParam(value = "orderNo", required = false) String  orderNo,
            @ApiParam(name = "page", value = "页数")
            @RequestParam(value = "page", required = false) Integer page,
            @ApiParam(name = "pageSize", value = "每页大小")
            @RequestParam(value = "pageSize", required = false) Integer pageSize) throws Exception {
        try {
            return prescriptionService.getNatAppointmentList(realOrder, name, hospitalFlag, mobile, idcard, payStatus, medicare, createTimeStart, createTimeEnd, appointmentTimeStart,appointmentTimeEnd,isSuccess, page, pageSize);
            return prescriptionService.getNatAppointmentList(realOrder, name, hospitalFlag, mobile, idcard, payStatus, medicare, createTimeStart, createTimeEnd, appointmentTimeStart,appointmentTimeEnd,isSuccess, page, pageSize,orderNo);
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }