Переглянути джерело

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/doctor/dao/DoctorWorkTimeDao.java
#	business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
#	gateway/ag-basic/src/main/resources/bootstrap.yml
#	svr/svr-internet-hospital/src/main/resources/application.yml
wangzhinan 5 роки тому
батько
коміт
940a3eb2df

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

@ -5159,6 +5159,106 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return result;
    }
    /**
     * 根据门诊唯一号,处方号,到顺丰下单,下单成功返回面单信息--心脏和眼科
     *
     * @param admNo     门诊唯一号
     * @param realOrder 处方号
     * @return
     */
    public Object getSFExpressInfoNew(String admNo, String realOrder, String wxId) throws Exception {
        //根据门诊唯一号取就诊记录
//        List<WlyyOutpatientDO> wlyyOutpatientDOs = outpatientDao.findByAdmNo(admNo);
        WlyyPrescriptionDO wlyyPrescriptionDOS = prescriptionDao.findByAdmNoAndRealOrder(admNo, realOrder);
        Object result = "";
        System.out.println("获取顺丰物流面单信息:wlyyPrescriptionDOS != null=" + wlyyPrescriptionDOS != null);
        if (wlyyPrescriptionDOS != null) {
            List<WlyyPrescriptionExpressageDO> expressageDOList = sfexpressService.findByField("outpatientId", wlyyPrescriptionDOS.getOutpatientId());
            WlyyPrescriptionExpressageDO sfexpress_obj = null;
            System.out.println("获取顺丰物流面单信息:CollectionUtils.isEmpty(expressageDOList)=" + CollectionUtils.isEmpty(expressageDOList));
            if (CollectionUtils.isEmpty(expressageDOList)) {
                throw new Exception("顺丰快递下单失败,未找到该处方的派送地址!");
            } else {
                System.out.println("获取顺丰物流面单信息:1");
                sfexpress_obj = expressageDOList.get(0);
                System.out.println("获取顺丰物流面单信息:2");
                BasePatientDO basePatientDO = basePatientDao.findById(wlyyPrescriptionDOS.getPatientCode());
                //如果该处方的快递单号已生成,则说明已经下单成功,不需要重复下单,直接返回面单信息
                System.out.println("获取顺丰物流面单信息:3");
                if (org.apache.commons.lang.StringUtils.isNotBlank(sfexpress_obj.getMailno())) {
                    //处方已下单成功
                    System.out.println("获取顺丰物流面单信息:4");
                } else {
                    //如果该处方的快递单号未生成,则继续下单
                    //根据业务订单号判断是否已经下单成功
                    //--2020.05.20--顺丰V2.0接口已不提供查询接口,直接单下单--START
//                    boolean go_on = sfexpressService.sfOrderSearchService(sfexpress_obj);
//
//                    //如果该业务订单号未下单成功过,则重新下单
//                    if(go_on){
//                        //请求顺丰接口下单,成功下单后,返回快递单号
//                        sfexpress_obj = sfexpressService.postSFOrderService(sfexpress_obj);
//                        //保存快递单号和增加处方物流记录为配送
//                        sfexpressService.updatePrescriptionExpressage(sfexpress_obj);
//                    }
                    //--2020.05.20--顺丰V2.0接口已不提供查询接口,直接单下单--END
                    //请求顺丰接口下单,成功下单后,返回快递单号
                    sfexpress_obj = sfexpressService.postSFOrderService(sfexpress_obj);
                    System.out.println("获取顺丰物流面单信息:5");
                    //保存快递单号和增加处方物流记录为配送
                    sfexpressService.updatePrescriptionExpressage(sfexpress_obj);
                    System.out.println("获取顺丰物流面单信息:6");
                }
                if (sfexpress_obj != null && StringUtils.isNoneBlank(sfexpress_obj.getMailno())) {
                    com.alibaba.fastjson.JSONObject object = sfexpressService.postSFOrderQueryService(sfexpress_obj);
                    System.out.println("获取顺丰物流面单信息7-1"+object.toJSONString());
                    System.out.println("获取顺丰物流面单信息:7");
                   /* com.alibaba.fastjson.JSONObject sfJsonObject = new com.alibaba.fastjson.JSONObject();*/
                    /*sfJsonObject.put("mailno", sfexpress_obj.getMailno());
                    sfJsonObject.put("mailtype", "标准快递");
                    sfJsonObject.put("destcode", object.getString("destRouteLabel"));
                    if (wxId.equalsIgnoreCase("xm_zsyy_wx")) {
                        sfJsonObject.put("j_name", "厦门大学附属中山医院");
                        sfJsonObject.put("j_phone", "4003008888");
                        sfJsonObject.put("j_townName", "思明区");
                        sfJsonObject.put("j_address", "湖滨南路201-209号");
                    } else if (wxId.equalsIgnoreCase("xm_ykyy_wx")) {
                        sfJsonObject.put("j_name", "厦门大学附属中山医院");
                        sfJsonObject.put("j_phone", "4003008888");
                        sfJsonObject.put("j_townName", "思明区");
                        sfJsonObject.put("j_address", "湖滨南路201-209号");
                    }
                    sfJsonObject.put("j_provinceName", "福建省");
                    sfJsonObject.put("j_cityName", "厦门市");
                    sfJsonObject.put("d_name", sfexpress_obj.getName());
                    sfJsonObject.put("d_provinceName", sfexpress_obj.getProvinceName());
                    sfJsonObject.put("d_cityName", sfexpress_obj.getCityName());
                    sfJsonObject.put("d_townName", sfexpress_obj.getTownName());
                    sfJsonObject.put("d_address", sfexpress_obj.getAddress());
                    sfJsonObject.put("d_phone", sfexpress_obj.getMobile());
                    sfJsonObject.put("express_type", 11);
                    sfJsonObject.put("pay_method", 2);
                    sfJsonObject.put("receive_time", "");
                    sfJsonObject.put("dispensaryType", 2);*/
                    result = object;
                    System.out.println("获取顺丰物流面单信息:8");
                }
            }
        }
        System.out.println("获取顺丰物流面单信息:9");
        return result;
    }
    /**
     * 根据类型获取候诊居民数量
     *
@ -5800,7 +5900,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "wlyy_outpatient outpatient " +
                "WHERE " +
                " room.outpatient_id=outpatient.id " +
                "AND outpatient.status = 0 AND room.doctor IS NULL AND outpatient.dept='" + dept + "' ";
                "AND outpatient.status = 0 AND room.doctor IS NULL AND outpatient.pay_status=1 AND outpatient.dept='" + dept + "' ";
        List<Map<String, Object>> alltotal = jdbcTemplate.queryForList(sqlAll);
@ -5819,7 +5919,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "wlyy_outpatient outpatient " +
                "WHERE " +
                " room.outpatient_id=outpatient.id " +
                "AND outpatient.status = 0 AND room.doctor IS NULL AND room.reservation_type=1 AND room.consult_type=1 AND outpatient.dept='" + dept + "' ";
                "AND outpatient.status = 0 AND room.doctor IS NULL AND outpatient.pay_status=1 AND room.reservation_type=1 AND room.consult_type=1 AND outpatient.dept='" + dept + "' ";
        List<Map<String, Object>> imgtotal = jdbcTemplate.queryForList(imgAll);
@ -5838,7 +5938,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "wlyy_outpatient outpatient " +
                "WHERE " +
                " room.outpatient_id=outpatient.id " +
                "AND outpatient.status = 0 AND room.doctor IS NULL AND room.reservation_type=1 AND room.consult_type=2 AND outpatient.dept='" + dept + "' ";
                "AND outpatient.status = 0 AND room.doctor IS NULL AND outpatient.pay_status=1 AND room.reservation_type=1 AND room.consult_type=2 AND outpatient.dept='" + dept + "' ";
        List<Map<String, Object>> sptotal = jdbcTemplate.queryForList(spsql);
@ -5858,7 +5958,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "wlyy_outpatient outpatient " +
                "WHERE " +
                " room.outpatient_id=outpatient.id " +
                "AND outpatient.status = 0 AND room.doctor IS NULL AND room.reservation_type=2 AND outpatient.dept='" + dept + "' ";
                "AND outpatient.status = 0 AND room.doctor IS NULL AND outpatient.pay_status=1 AND room.reservation_type=2 AND outpatient.dept='" + dept + "' ";
        List<Map<String, Object>> xttotal = jdbcTemplate.queryForList(xtsql);

Різницю між файлами не показано, бо вона завелика
+ 28 - 0
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/third/PrescriptionUpdateController.java