Browse Source

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 4 years ago
parent
commit
593e46fe08

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

@ -60,7 +60,7 @@ public class PayInfoNoticeService {
            String idcard = patientDO.getIdcard();
            String phone = patientDO.getMobile();
            if (!StringUtils.isNotBlank(url)){
                url = "https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/prescriptionDetail?outpatientId="+id;
                url = "https://hlwyy.xmzsh.com/hlwyy/ims-wx/#/nucleicTest/detail?id="+id;
            }
            String remark = "结算方式:微信结算" +
                    "点击查看核酸预约开单信息";

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

@ -10530,6 +10530,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                            jsondate.put("serialNo",registerDO.getRegisterNo());
                            jsondate.put("dept",map.get("deptCode").toString());
                            jsondate.put("doctor",map.get("doctorMappingCode").toString());
                            baseNatAppointmentDO.setRegisterNo(registerDO.getRegisterNo());
                            baseNatAppointmentDO.setDoctorId(map.get("doctorMappingCode").toString());
                            baseNatAppointmentDO.setDoctorName(map.get("doctorName").toString());
                        }else {
@ -10554,6 +10555,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                            jsondate.put("serialNo",serialNo);
                            jsondate.put("dept",map.get("deptCode").toString());
                            jsondate.put("doctor",map.get("doctorMappingCode").toString());
                            baseNatAppointmentDO.setRegisterNo(serialNo);
                            //存储就诊记录
                            WlyyPatientRegisterDO registerDO = new WlyyPatientRegisterDO();
                            // 存储挂号医生与挂号科室
@ -10651,13 +10653,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    wlyyHttpLogDao.save(log);
                    if ("0".equals(prers)) {
                        String realOrder = jsonObject.getString("@real_order");
                        String voucherNo = jsonObject.getString("@xtgzh0");
                        baseNatAppointmentDO.setRealOrder(realOrder);
                        baseNatAppointmentDO.setIsSuccess("1");
                        baseNatAppointmentDO.setVoucherNo(voucherNo);
                        baseNatAppointmentDao.save(baseNatAppointmentDO);
                        String recipeTime = DateUtil.dateToStr(new Date(), "yyyyMMddHHmmss");
                        String applyDepaName = map.get("deptName").toString();
                        String voucherNo = jsonObject.getString("@xtgzh0");
                        String applyDoctorName = map.get("doctorName").toString();
                        BasePatientDO patientDO = basePatientDao.findById(patientId);
                        String userName = null;
@ -10677,7 +10681,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        net.sf.json.JSONObject res = jsonObject1.getJSONObject("resquest");
                        logger.info("获取待结算数据 res: " + res.toString());
                        String rsCode = res.getString("@RESULT");
                        String free= "";
                        String free= 0+"";
                        if ("0".equals(rsCode)) {
                            free = res.getString("@total_charge");
                        }
@ -10703,7 +10707,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return returnMap;
    }
    public MixEnvelop getNatRecords(String patientId,Integer page ,Integer pageSize){
    public MixEnvelop getNatRecords(String patientId,String id,Integer page ,Integer pageSize){
        String sql = "select t.name as \"name\"," +
                "t.card_no as \"cardNo\"," +
                "t.card_type as \"cardType\"," +
@ -10713,12 +10717,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "t.is_success as \"isSuccess\"," +
                "t.create_time as \"createTime\"," +
                "t.pay_status as \"payStatus\"," +
                "t.medicare as \"medicare\","+
                "t.voucher_no as \"voucherNo\","+
                "t.id as \"id\"," +
                "t.appointment_time as \"appointmentTime\" " +
                " from base_nat_appointment t where 1=1 ";
        if (StringUtils.isNoneBlank(patientId)){
            sql+=" and t.patient_id ='"+patientId+"'";
        }
        if (StringUtils.isNoneBlank(id)){
            sql+=" and t.id ='"+id+"'";
        }
        List<Map<String ,Object>> list = hibenateUtils.createSQLQuery(sql,page,pageSize);
        List<Map<String ,Object>> listCount = hibenateUtils.createSQLQuery(sql);
        MixEnvelop mixnvelop = new MixEnvelop();
@ -10773,6 +10782,33 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                            baseNatAppointmentDO.setCancelTime(new Date());
                            baseNatAppointmentDO.setCancelBy(patientId);
                            baseNatAppointmentDao.save(baseNatAppointmentDO);
                            //删除处方
                            logger.info("删除处方开始");
                            net.sf.json.JSONObject jsondate = new JSONObject();
                            jsondate.put("checkPart","鼻/咽拭子");
                            jsondate.put("cardNo",baseNatAppointmentDO.getMedicare());
                            jsondate.put("chargeFlag","2");
                            jsondate.put("chargeCode","361322");
                            jsondate.put("icdCode","Z00.000");
                            jsondate.put("socialNo",baseNatAppointmentDO.getCardNo());
                            jsondate.put("tellPhone",baseNatAppointmentDO.getMobile());
                            jsondate.put("address1",baseNatAppointmentDO.getProvinceName());
                            jsondate.put("address2",baseNatAppointmentDO.getCityName());
                            jsondate.put("address3",baseNatAppointmentDO.getTownName());
                            jsondate.put("address4",baseNatAppointmentDO.getStreetName());
                            jsondate.put("address5",2);
                            jsondate.put("area",baseNatAppointmentDO.getAddress());
                            jsondate.put("winNo",6);
                            jsondate.put("target",2);
                            jsondate.put("quantity",1);
                            jsondate.put("serialNo",baseNatAppointmentDO.getRegisterNo());
                            jsondate.put("dept",baseNatAppointmentDO.getDept());
                            jsondate.put("doctor",baseNatAppointmentDO.getDoctorId());
                            jsondate.put("realOrder",baseNatAppointmentDO.getRealOrder());
                            JSONArray array = new JSONArray();
                            array.add(jsondate);
                            JSONObject object1  = entranceService.BS10112(array.toString(),demoFlag);
                            logger.info("删除处方结束");
                        }
                    }

+ 18 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/BaseNatAppointmentDO.java

@ -52,6 +52,8 @@ public class BaseNatAppointmentDO extends IntegerIdentityEntity {
    private String chargeCode;
    private String icdCode;
    private String doctorName;
    private String voucherNo;
    private String registerNo;
    public String getMedicare() {
        return medicare;
@ -381,4 +383,20 @@ public class BaseNatAppointmentDO extends IntegerIdentityEntity {
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }
    public String getVoucherNo() {
        return voucherNo;
    }
    public void setVoucherNo(String voucherNo) {
        this.voucherNo = voucherNo;
    }
    public String getRegisterNo() {
        return registerNo;
    }
    public void setRegisterNo(String registerNo) {
        this.registerNo = registerNo;
    }
}

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

@ -958,14 +958,12 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                    String name= natAppointmentDO.getName();
                                    String idcard = natAppointmentDO.getCardNo();
                                    String mobile = natAppointmentDO.getMobile();
                                    String url = "https://hlwyy.xmzsh.com";
                                    String url = "https://hlwyy.xmzsh.com/hlwyy/ims-wx/#/nucleicTest/detail?id="+natAppointmentDO.getId();
                                    String date = DateUtil.dateToStrLong(natAppointmentDO.getAppointmentTime());
                                    String first = "尊敬的用户"+name+",您已完成线上自助核酸检测开单预约";
                                    String contentMsg = "申请人:"+name+";预约时间:"+date+";发票流水号:"+voucherNo;
                                    String remark="<div style=\"color:#ff4949;\">\n" +
                                            "        <p>备注:1、请您持核酸开单预约信息和发票流水号、医保卡/就诊卡/电子健康卡,提前15分钟至我院五号楼北侧(急诊部后侧)核酸检测点?号取管窗口绑定检测。</p >\n" +
                                            "<p>2、核酸检测标本采集24小时后出具报告。请关注厦门大学附属中山医院微信公众号查询;如需打印,请至厦门大学附属中山医院核酸检测点自助机打印。</p >\n" +
                                            "    </div>";
                                    String contentMsg = "申请人:"+name+";预约时间:"+date+";发票流水号:"+waitPayDetailVO.getRecipeNo();
                                    String remark="备注:1、请您持核酸开单预约信息和发票流水号、医保卡/就诊卡/电子健康卡,提前15分钟至我院五号楼北侧(急诊部后侧)核酸检测点?号取管窗口绑定检测。" +
                                            "2、核酸检测标本采集24小时后出具报告。请关注厦门大学附属中山医院微信公众号查询;如需打印,请至厦门大学附属中山医院核酸检测点自助机打印。";
                                    String responseMsg="";
                                    if ("xm_zsyy_wx".equalsIgnoreCase(wxId)) {
                                        responseMsg = entranceService.ehospitalNotice(
@ -1471,13 +1469,15 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "查询预约记录", notes = "查询预约记录")
    public MixEnvelop getNatRecords(@ApiParam(name = "patientId", value = "居民id")
                                        @RequestParam(value = "patientId", required = false)String patientId,
                                    @ApiParam(name = "id", value = "预约id")
                                    @RequestParam(value = "id", required = false)String id,
                                    @ApiParam(name = "page", value = "页数")
                                    @RequestParam(value = "page", required = false)Integer page,
                                    @ApiParam(name = "pageSize", value = "每页大小")
                                        @RequestParam(value = "pageSize", required = false)Integer pageSize) {
        return  prescriptionService.getNatRecords(patientId,page,pageSize);
        return  prescriptionService.getNatRecords(patientId,id,page,pageSize);
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findBaseAddress)
    @ApiOperation(value = "查询地址", notes = "查询地址")