Browse Source

Merge branch 'dev' of wangjun/wlyy2.0 into dev

wangzhinan 4 years ago
parent
commit
bd7eb1220e

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

@ -135,11 +135,21 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
                " a.del AS \"del\", " +
                " b.dept_name AS \"deptName\", " +
                " e.req_fee AS \"money\", " +
                " a.charge_type as \"chargeType\" "+
                " a.charge_type as \"chargeType\", "+
                "\tm.req_fee as \"twfzFee\",\n" +
                "\tn.req_fee as \"spfzFee\",\n" +
                "\tp.req_fee as \"spzxFee\",\n" +
                "\tv.req_fee as \"twzxFee\",\n" +
                "\td.req_fee as \"xtzxFee\"\n" +
                " FROM " +
                " base_doctor a " +
                " JOIN base_doctor_hospital b ON a.id = b.doctor_code " +
                " LEFT JOIN (SELECT * FROM wlyy_charge_dict t WHERE t.dept_type_code ='6') e ON a.charge_type = e.charge_type " +
                " LEFT JOIN wlyy_charge_dict m ON a.twfz_charge_type = m.charge_type\n" +
                " LEFT JOIN wlyy_charge_dict n ON a.spfz_charge_type = n.charge_type\n" +
                " LEFT JOIN wlyy_charge_dict p ON a.spzx_charge_type = p.charge_type\n" +
                " LEFT JOIN wlyy_charge_dict v ON a.twzx_charge_type = v.charge_type\n" +
                " LEFT JOIN wlyy_charge_dict d ON a.xtfz_charge_type = d.charge_type\n" +
                " LEFT JOIN base_doctor_mapping c ON a.id = c.doctor " +
                " WHERE 1=1";
        if (StringUtils.isNotBlank(city)){
@ -189,13 +199,23 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
                " c.mapping_code AS \"jobNumber\", " +
                " d.disease_name AS \"diseaseName\", " +
                " d.disease_code AS \"diseaseCode\", " +
                " e.req_fee AS \"money\" " +
                " e.req_fee AS \"money\" ," +
                "\tm.req_fee as \"twfzFee\",\n" +
                "\tn.req_fee as \"spfzFee\",\n" +
                "\tp.req_fee as \"spzxFee\",\n" +
                "\tv.req_fee as \"twzxFee\",\n" +
                "\tq.req_fee as \"xtzxFee\"\n" +
                " FROM " +
                " base_doctor a " +
                " LEFT JOIN base_doctor_hospital b ON a.id = b.doctor_code " +
                " LEFT JOIN base_doctor_mapping c ON a.id = c.doctor " +
                " LEFT JOIN wlyy_doctor_special_disease d ON a.id = d.doctor_code " +
                " LEFT JOIN wlyy_charge_dict e ON a.charge_type = e.charge_type " +
                " LEFT JOIN wlyy_charge_dict m ON a.twfz_charge_type = m.charge_type\n" +
                " LEFT JOIN wlyy_charge_dict n ON a.spfz_charge_type = n.charge_type\n" +
                " LEFT JOIN wlyy_charge_dict p ON a.spzx_charge_type = p.charge_type\n" +
                " LEFT JOIN wlyy_charge_dict v ON a.twzx_charge_type = v.charge_type\n" +
                " LEFT JOIN wlyy_charge_dict q ON a.xtfz_charge_type = q.charge_type\n" +
                " WHERE 1=1 ";
        if(StringUtils.isNotBlank(doctorId)){
            sql+=" AND a.id =:id";

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

@ -9770,5 +9770,47 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            return "ok";
        }
    }
    public List<Map<String,Object>> findOutpatientAndPatient(String startTime,String endTime){
        String sql  = "SELECT\n" +
                "\tt.status as \"status\",\n" +
                "\tt.source as \"source\",\n" +
                "\tt.outpatient_type as \"outpatientType\",\n" +
                "\tt.create_time as \"createTime\",\n" +
                "\tb.idcard as \"idCard\" \n" +
                "FROM\n" +
                "\twlyy_outpatient t\n" +
                "\tLEFT JOIN base_patient b ON t.patient = b.id where 1=1 ";
        if (StringUtils.isNoneBlank(startTime)){
            if("xm_ykyy_wx".equals(wechatId)){
                if (flag){
                    sql+=" and t.create_time >= '" + startTime + " ' ";
                }else {
                    sql+=" and t.create_time >= to_date('" + startTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
                }
            }else{
                sql+=" and t.create_time >= '" + startTime + "' ";
            }
        }
        if (StringUtils.isNoneBlank(endTime)){
            if("xm_ykyy_wx".equals(wechatId)){
                if (flag){
                    sql+=" and t.create_time <= '" + endTime + "' ";
                }else {
                    sql+=" and t.create_time <= to_date('" + endTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
                }
            }else{
                sql+=" and t.create_time <= '" + endTime + "'";
            }
        }
        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
        for (Map<String,Object> map:list){
            if (map.get("createTime")!=null){
                map.put("createTime",DateUtil.dateToStrLong(DateUtil.strToDateLong(map.get("createTime").toString())));
                map.put("orgCode",wechatId);
            }
        }
        return list;
    }
}

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

@ -1414,6 +1414,7 @@ public class BaseHospitalRequestMapping {
        public static final String delPrivateDict = "/delPrivateDict";
        public static final String findHospitalInfo = "/findHospitalInfo";
        public static final String synYktZxPrice = "/synYktZxPrice";
        public static final String findHospitalConsultInfo = "/findHospitalConsultInfo";
    }
    /**

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

@ -1141,5 +1141,14 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
        String object = prescriptionService.synYktZxPrice(idcard,price,type,flag);
        return success(object);
    }
    @GetMapping(value = BaseHospitalRequestMapping.PatientNoLogin.findHospitalConsultInfo)
    @ApiOperation(value = "根据疾病查询咨询数量", notes = "根据疾病查询咨询数量")
    public ListEnvelop findHospitalConsultInfo(
                                                  @ApiParam(name = "startTime", value = "开始时间 yyyy-MM-dd hh:mm:ss")
                                                  @RequestParam(value = "startTime", required = false)String startTime,
                                              @ApiParam(name = "endTime", value = "结束时间 yyyy-MM-dd hh:mm:ss")
                                                  @RequestParam(value = "endTime", required = false)String endTime) throws Exception{
        return success(prescriptionService.findOutpatientAndPatient(startTime,endTime));
    }
}