Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

chenyongxing 7 years ago
parent
commit
9ba84589d3

+ 9 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionExpressage.java

@ -47,6 +47,7 @@ public class PrescriptionExpressage extends IdEntity{
    private String hospitalCode;            // 配药机构code
    private String hospitalDoctor;          // 配药机构出药人(健管师或者称工作人员)
    private String hospitalDoctorCode;     // 配药机构出药人code
    private Date fetchingMedicineTime;    //配药机构出药时间
    //配送人信息
    private String expressageHospitalName;            // 如果配送方式是健管师那么这个字段存服务站名称,如果是快递配送那么是快递公司名称
@ -406,4 +407,12 @@ public class PrescriptionExpressage extends IdEntity{
    public void setHospitalDoctorCode(String hospitalDoctorCode) {
        this.hospitalDoctorCode = hospitalDoctorCode;
    }
    public Date getFetchingMedicineTime() {
        return fetchingMedicineTime;
    }
    public void setFetchingMedicineTime(Date fetchingMedicineTime) {
        this.fetchingMedicineTime = fetchingMedicineTime;
    }
}

+ 6 - 1
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionCAService.java

@ -77,7 +77,6 @@ public class PrescriptionCAService {
        Map<String,String> p = new HashMap<>();
        p.put("msgHeader",msgHeader);
        p.put("msgBody",msgBody);
        return WebserviceUtil.post(urlString,namespace,unifiedCallInterface,p);
    }
@ -233,6 +232,7 @@ public class PrescriptionCAService {
        String re = "";
        String body = "";
        String error = "";
        Throwable errorLog =null;
        String action = MODIFY_PASSWD;
        try {
            Map<String,String> params = new HashMap<>();
@ -259,6 +259,7 @@ public class PrescriptionCAService {
            isSuccess = false;
            ex.printStackTrace();
            error = ex.getMessage();
            errorLog = ex.getCause();
        }
        //保存http日志
@ -268,6 +269,10 @@ public class PrescriptionCAService {
        {
            throw new Exception(error);
        }
        if(errorLog!=null)
        {
            throw new Exception("CA服务器维护中。。。");
        }
        return re;
    }

+ 12 - 12
patient-co-service/wlyy_service/src/main/resources/system.properties

@ -1,18 +1,18 @@
###基卫测试环境服务
#gateway_url = http://117.25.173.18:18280/
#gateway_licence = 5YGl5bq45LmL7Lev
#gateway_public_key = PublicKeyTest.key
#jw_hospital = 350211B1013
#jw_licence = 5YGl5bq45LmL7Lev
gateway_url = http://117.25.173.18:18280/
gateway_licence = 5YGl5bq45LmL7Lev
gateway_public_key = PublicKeyTest.key
jw_hospital = 350211B1013
jw_licence = 5YGl5bq45LmL7Lev
##基卫服务
guahao_url =  http://10.95.18.10/urp.service/urp.open.service/ReservationPulic.asmx
guahao_namespace = http://www.zysoft.com.cn/
gateway_url = http://10.95.21.21:18280/
gateway_licence = 5YGl5bq45LmL7Lev
gateway_public_key = PublicGov.key
jw_hospital = 350211B1004
jw_licence = 5YGl5bq35LmL6LevMzUwMjExQjEwMDQ=
#guahao_url =  http://10.95.18.10/urp.service/urp.open.service/ReservationPulic.asmx
#guahao_namespace = http://www.zysoft.com.cn/
#gateway_url = http://10.95.21.21:18280/
#gateway_licence = 5YGl5bq45LmL7Lev
#gateway_public_key = PublicGov.key
#jw_hospital = 350211B1004
#jw_licence = 5YGl5bq35LmL6LevMzUwMjExQjEwMDQ=
ca_url = http://117.29.183.114:8081/XMCAService?wsdl
ca_namespace = http://platfomservice.xmca.com/

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -1113,6 +1113,8 @@ public class ConsultTeamService extends ConsultService {
            prescription.setJwDoctorCode(map.get("jw_doctor").toString());
            prescription.setJwHospital(map.get("jw_doctor_hospital").toString());
        }
        //设置费别类型
        prescription.setJwRateTypeCode(zyDictService.getRateType());
        prescriptionDao.save(prescription);

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -523,7 +523,7 @@ public class PrescriptionInfoService extends BaseService {
                p.setReviewedTime(new Date());
                p.setJwDeptCode(dept);
                p.setJwRegisterFee(registerFee);
                p.setJwRateTypeCode(rateTypeCode);
                p.setJwGisterTypeCode(rateTypeCode);//挂号类型
            } else {
                //审核不通过
                p.setStatus(PrescriptionLog.PrescriptionLogStatus.no_reviewed.getValue());

+ 8 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/pc/prescription/PrescriptionExpressagePCService.java

@ -60,8 +60,8 @@ public class PrescriptionExpressagePCService extends BaseService {
    public JSONObject getMedicine(String code,String userCode) throws Exception{
        JSONObject jsonObject = new JSONObject();
        Doctor doctor = doctorService.findDoctorByCode(userCode);
        String sql = "select a.type,a.prescription_code as prescriptionCode ,c.status,b.hospital_code as hospitalCode, \n" +
                "b.code as orderCode, b.hospital_name as hospitalName,c.dispensary_type as dispensaryType, \n" +
        String sql = "select a.type,a.prescription_code as prescriptionCode ,c.status,b.hospital_code as hospitalCode, b.hospital_doctor as hospitalDoctor,\n" +
                "b.code as orderCode, b.hospital_name as hospitalName,c.dispensary_type as dispensaryType,b.fetching_medicine_time as fetchingMedicineTime ,\n" +
                "b.expressage_name as expressageName, b.expressage_code as expressageCode,b.expressage_mobile as expressageMobile,d.idcard \n" +
                "from wlyy_prescription_dispensary_code a \n" +
                "left join wlyy_prescription_expressage b on a.prescription_code = b.prescription_code \n" +
@ -95,6 +95,8 @@ public class PrescriptionExpressagePCService extends BaseService {
                            jsonObject.put("dispensaryType",result.get("dispensaryType"));
                            jsonObject.put("expressageName",result.get("expressageName"));
                            jsonObject.put("expressageMobile",result.get("expressageMobile"));
                            jsonObject.put("fetchingMedicineTime",result.get("fetchingMedicineTime"));
                            jsonObject.put("hospitalDoctor",result.get("hospitalDoctor"));
//                            return jsonObject;
                        }else{
                            List<PrescriptionInfo> list = prescriptionInfoDao.findByPrescriptionCode(result.get("prescriptionCode").toString());
@ -116,7 +118,7 @@ public class PrescriptionExpressagePCService extends BaseService {
                    case 2:{
                        //判断出药机构是否与健管师所属机构一致,不一致弹窗提示:“出药机构与您所在机构不一致,无法出药,请重新确认”。一致则进入下一步。
                        if(doctor.getHospital().equals(result.get("hospitalCode").toString())){
                        if(doctor.getHospital().equals(result.get("hospitalCode")!=null?result.get("hospitalCode").toString():"")){
                            //20开方完成/待支付, 21 支付失败 , 30 支付成功/待配药 , 40配药成功/待配送  41配送失败 42分配健管师 45配送中   49配送到服务站  100配送到患者手中/已完成
                            if(status==50){
                                jsonObject.put("flag",-5);//订单正在配药中,暂时无法出药
@ -168,7 +170,7 @@ public class PrescriptionExpressagePCService extends BaseService {
                }
            }else{
                jsonObject.put("status",-3);
                //保存验证二维码的日志
                PrescriptionLog prescriptionLog = new PrescriptionLog();
                prescriptionLog.setCode(UUID.randomUUID().toString());
@ -180,6 +182,7 @@ public class PrescriptionExpressagePCService extends BaseService {
                prescriptionLog.setUserType(2);
                prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing_error.getValue());
                prescriptionLog.setRemark("PC端取药码输入错误!");
                prescriptionLogDao.save(prescriptionLog);
            }
            return jsonObject;
@ -243,6 +246,7 @@ public class PrescriptionExpressagePCService extends BaseService {
        Doctor doctor = doctorDao.findByCode(userCode);
        prescriptionExpressage.setHospitalDoctorCode(userCode);
        prescriptionExpressage.setHospitalDoctor(doctor.getName());
        prescriptionExpressage.setFetchingMedicineTime(new Date());
        prescriptionExpressageDao.save(prescriptionExpressage);
    }
}

+ 12 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/JwPrescriptionService.java

@ -123,14 +123,19 @@ public class JwPrescriptionService {
     * @return
     * @throws Exception
     */
    public String saveRecipe(String prescriptionCode) throws Exception{
        String url = jwUrl + "/third/prescription/saveRecipe";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("prescriptionCode", prescriptionCode));
        String response = httpClientUtil.post(url, params, "UTF-8");
    public String saveRecipe(String prescriptionCode){
        String response = null;
        try {
            String url = jwUrl + "/third/prescription/saveRecipe";
            List<NameValuePair> params = new ArrayList<>();
            params.add(new BasicNameValuePair("prescriptionCode", prescriptionCode));
        return response;
            response = httpClientUtil.post(url, params, "UTF-8");
            return response;
        }catch (Exception e){
            logger.info("处方开方接口saveRecipe:"+response);
            throw e;
        }
    }
    /**

+ 20 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/ZyDictService.java

@ -65,6 +65,26 @@ public class ZyDictService {
        return doctorMappingDao.getDoctorByJw(jwHospital,jwDoctor);
    }
    /**
     * 获取费别类型,长处方默认市医保
     * @return
     */
    public String getRateType(){
        String sql = "SELECT code,name from zy_common_dict WHERE dict_name = 'IV_RATE_TYPE_DICT' ORDER BY code ";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        if(list!=null&&list.size()>0){
            for (Map<String,Object> map:list){
                String code = map.get("code").toString();
                String name = map.get("name").toString();
                if("市医保".equals(name)){
                    return code;
                }
            }
            return list.get(0).get("code").toString();
        }
        return null;
    }
    /**
     * 根据医生code获取
     * @param doctor