4 Commits 4a5831cf3d ... ac3a76c5e0

Author SHA1 Message Date
  Trick ac3a76c5e0 测试环境 5 years ago
  Trick 8055c120e0 Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev 5 years ago
  Trick ad4a27175c Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev 5 years ago
  Trick 7c8e3b2d28 测试环境 5 years ago

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/doctor/dao/DoctorWorkTimeDao.java

@ -16,7 +16,7 @@ public interface DoctorWorkTimeDao extends PagingAndSortingRepository<WlyyDoctor
    @Query("from WlyyDoctorWorkTimeDO a where a.doctor = ?1 and a.endTime > ?2 and a.endTime < ?3 order by a.startTime asc")
    List<WlyyDoctorWorkTimeDO> findDoctorWorkTime(String doctor, Date startTime, Date endTime);
    @Query("from WlyyDoctorWorkTimeDO a where a.doctor = ?1 and a.date like ?2 order by a.startTime asc")
    @Query("from WlyyDoctorWorkTimeDO a where a.doctor = ?1 and a.workDate like ?2 order by a.startTime asc")
    List<WlyyDoctorWorkTimeDO> findDoctorWorkTimeByMonth(String doctor, String date);
    @Query("from WlyyDoctorWorkTimeDO a where a.doctor = ?1 and a.startTime >= ?2 and a.startTime <= ?3 order by a.startTime asc")

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

@ -884,21 +884,22 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     */
    public List<Map<String,Object>> findDoctorByHospitalAndDept(String orgCode,String dept,String chargeType,String doctorCode,String outpatientType,String startDate,String endDate,String key,String consultStatus){
        String sql ="SELECT " +
                " d.id, " +
                " d.photo, " +
                " d.`name`, " +
                " d.expertise," +
                " d.introduce," +
                " d.job_title_code AS jobTitleCode, " +
                " d.job_title_name AS jobTitleName," +
                " d.charge_type AS chargeType," +
                " d.outpatient_type AS outpatientType," +
                " d.consult_status AS consultStatus" +
                " d.id AS \"id\", " +
                " d.photo AS \"photo\", " +
                " d.name AS \"name\", " +
                " d.expertise AS \"expertise\"," +
                " d.introduce AS \"introduce\"," +
                " d.job_title_code AS \"jobTitleCode\", " +
                " d.job_title_name AS \"jobTitleName\"," +
                " d.charge_type AS \"chargeType\"," +
                " d.outpatient_type AS \"outpatientType\"," +
                " d.consult_status AS \"consultStatus\"" +
                " FROM " +
                " base_doctor d " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
                " WHERE  " +
                " 1=1";
        Map<String,Object> params = new HashedMap();
        if (StringUtils.isNotBlank(dept)) {
            sql += " AND h.dept_code = '" + dept + "'";
        }
@ -937,14 +938,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    "  wlyy_doctor_work_time t " +
                    " WHERE " +
                    "  t.doctor = d.id " +
                    " AND t.start_time >='" + startDate + "'" +
                    " AND t.start_time <='" + endDate + "'" +
                    " AND t.start_time >=:startDate" +
                    " AND t.start_time <=:endDate" +
                    " )";
            params.put("startDate",DateUtil.stringToDate(startDate,"yyyy-MM-ss HH:mm:ss"));
            params.put("endDate",DateUtil.stringToDate(endDate,"yyyy-MM-ss HH:mm:ss"));
        }
        logger.info("findDoctorByHospitalAndDept sql:" + sql);
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql,params);
        if (list != null && list.size() > 0 && StringUtils.isNotBlank(doctorCode)) {
            //排序
@ -969,12 +973,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public MixEnvelop findDoctorWithWork(String orgCode, String dept, String chargeType, String doctorCode, String outpatientType, String startDate, String endDate, String key, String consultStatus, Integer page, Integer size) {
        String totalSql = "SELECT " +
                " count(1) AS total " +
                " count(1) AS \"total\" " +
                " FROM " +
                " base_doctor d " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
                " WHERE  " +
                " 1=1 ";
        Map<String,Object> params = new HashedMap();
        if (StringUtils.isNotBlank(dept)) {
            totalSql += " AND h.dept_code = '" + dept + "'";
        }
@ -1018,30 +1023,32 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    "  wlyy_doctor_work_time t " +
                    " WHERE " +
                    "  t.doctor = d.id " +
                    " AND t.start_time >='" + startDate + "'" +
                    " AND t.start_time <='" + endDate + "'" +
                    " AND t.start_time >=:startDate" +
                    " AND t.start_time <=:endDate" +
                    " )";
            params.put("startDate",DateUtil.stringToDate(startDate,"yyyy-MM-ss HH:mm:ss"));
            params.put("endDate",DateUtil.stringToDate(endDate,"yyyy-MM-ss HH:mm:ss"));
        }
        List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(totalSql);
        List<Map<String, Object>> rstotal = hibenateUtils.createSQLQuery(totalSql,params);
        Long count = 0L;
        if (rstotal != null && rstotal.size() > 0) {
            count = (Long) rstotal.get(0).get("total");
            count = hibenateUtils.objTransformLong(rstotal.get(0).get("total"));
        }
        String sql = "SELECT " +
                " d.id, " +
                " d.photo, " +
                " d.`name`, " +
                " d.expertise," +
                " d.introduce," +
                " d.job_title_code AS jobTitleCode, " +
                " d.job_title_name AS jobTitleName," +
                " d.charge_type AS chargeType," +
                " h.dept_code AS deptCode," +
                " h.dept_Name AS deptName," +
                " d.outpatient_type AS outpatientType," +
                " d.consult_status AS consultStatus" +
                " d.id AS \"id\", " +
                " d.photo AS \"photo\", " +
                " d.name AS \"name\", " +
                " d.expertise AS \"expertise\"," +
                " d.introduce AS \"introduce\"," +
                " d.job_title_code AS \"jobTitleCode\", " +
                " d.job_title_name AS \"jobTitleName\"," +
                " d.charge_type AS \"chargeType\"," +
                " h.dept_code AS \"deptCode\"," +
                " h.dept_Name AS \"deptName\"," +
                " d.outpatient_type AS \"outpatientType\"," +
                " d.consult_status AS \"consultStatus\"" +
                " FROM " +
                " base_doctor d " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
@ -1093,13 +1100,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    "  wlyy_doctor_work_time t " +
                    " WHERE " +
                    "  t.doctor = d.id " +
                    " AND t.start_time >='" + startDate + "'" +
                    " AND t.start_time <='" + endDate + "'" +
                    " AND t.start_time >= :startDate" +
                    " AND t.start_time <= :endDate" +
                    " )";
        }
        sql += " AND d.del='1' AND d.outpatient_type is not null LIMIT " + (page - 1) * size + "," + size + "";
        sql += " AND d.del='1' AND d.outpatient_type is not null ";
        logger.info("withwork sql:" +sql);
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql,params,page,size);
        if (list != null && list.size() > 0) {
            //获取排班
            for (Map<String, Object> doctor : list) {
@ -1170,7 +1177,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public MixEnvelop findDoctorWithMouthWork(String orgCode, String dept, String chargeType, String date, String nameKey,String iswork, Integer page, Integer size) {
        String totalSql = "SELECT " +
                " count(1) AS total " +
                " count(1) AS \"total\" " +
                " FROM " +
                " base_doctor d " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
@ -1204,7 +1211,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        " FROM " +
                        "  wlyy_doctor_work_time t " +
                        " WHERE " +
                        "  t.date LIKE '%"+date+"%' " +
                        "  t.work_date LIKE '%"+date+"%' " +
                        " )";
            }else{
                totalSql +=" AND d.id NOT IN ( " +
@ -1213,29 +1220,29 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        " FROM " +
                        "  wlyy_doctor_work_time t " +
                        " WHERE " +
                        "  t.date LIKE '%"+date+"%' " +
                        "  t.work_date LIKE '%"+date+"%' " +
                        " )";
            }
        }
        List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(totalSql);
        List<Map<String, Object>> rstotal = hibenateUtils.createSQLQuery(totalSql);
        Long count = 0L;
        if (rstotal != null && rstotal.size() > 0) {
            count = (Long) rstotal.get(0).get("total");
            count = hibenateUtils.objTransformLong(rstotal.get(0).get("total"));
        }
        String sql = "SELECT " +
                " d.id, " +
                " d.photo, " +
                " d.`name`, " +
                " d.expertise," +
                " d.introduce," +
                " d.job_title_code AS jobTitleCode, " +
                " d.job_title_name AS jobTitleName," +
                " d.charge_type AS chargeType," +
                " h.dept_code AS deptCode," +
                " h.dept_Name AS deptName" +
                " d.id AS \"id\", " +
                " d.photo AS \"photo\", " +
                " d.name AS \"name\", " +
                " d.expertise AS  \"expertise\"," +
                " d.introduce AS \"introduce\"," +
                " d.job_title_code AS \"jobTitleCode\", " +
                " d.job_title_name AS \"jobTitleName\"," +
                " d.charge_type AS \"chargeType\"," +
                " h.dept_code AS \"deptCode\"," +
                " h.dept_Name AS \"deptName\"" +
                " FROM " +
                " base_doctor d " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
@ -1268,7 +1275,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        " FROM " +
                        "  wlyy_doctor_work_time t " +
                        " WHERE " +
                        "  t.date LIKE '%"+date+"%' " +
                        "  t.work_date LIKE '%"+date+"%' " +
                        " )";
            }else{
                sql +=" AND d.id NOT IN ( " +
@ -1277,13 +1284,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        " FROM " +
                        "  wlyy_doctor_work_time t " +
                        " WHERE " +
                        "  t.date LIKE '%"+date+"%' " +
                        "  t.work_date LIKE '%"+date+"%' " +
                        " )";
            }
        }
        sql += " LIMIT " + (page - 1) * size + "," + size + "";
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql,page,size);
        if (list != null && list.size() > 0) {
            //获取排班
            for (Map<String, Object> doctor : list) {
@ -2736,8 +2743,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            //医生角色
            String sql = "SELECT " +
                    " t. CODE AS roleCode, " +
                    " t. NAME AS roleName" +
                    " t. CODE AS \"roleCode\", " +
                    " t. NAME AS \"roleName\"" +
                    " FROM " +
                    " base_doctor_role r " +
                    " JOIN base_doctor_role_dict t ON t.`code` = r.role_code " +
@ -2772,7 +2779,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    
            //专家咨询
            String zjCountsql = "SELECT id FROM wlyy_consult_team WHERE doctor='"+doctor+"' AND (type=1 OR type=15)";
            String zjCountsql = "SELECT id AS \"id\" FROM wlyy_consult_team WHERE doctor='"+doctor+"' AND (type=1 OR type=15)";
            List<Map<String,Object>> zjList = jdbcTemplate.queryForList(zjCountsql);
    
            if(zjList!=null&&zjList.size()>0){
@ -2783,8 +2790,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    
            //查询医生各项评价平均分
            String sqlscore = "SELECT " +
                    "AVG(a.score) AS score," +
                    "a.score_type AS score_type " +
                    "AVG(a.score) AS \"score\"," +
                    "a.score_type AS \"score_type\" " +
                    "FROM base_evaluate a,base_evaluate_score b " +
                    "WHERE " +
                    "a.relation_code=b.id " +
@ -2810,16 +2817,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    
            //查询评价明细
            String sqlScoreList = "SELECT " +
                    "a.score as score," +
                    "b.score as doctorscore," +
                    "a.score_type as score_type," +
                    "a.content as content," +
                    "b.create_time as create_time," +
                    "c.type as type," +
                    "c.name as patientname," +
                    "b.id as id," +
                    "c.photo as patientphoto," +
                    "b.type as niming " +
                    "a.score as \"score\"," +
                    "b.score as \"doctorscore\"," +
                    "a.score_type as \"score_type\"," +
                    "a.content as \"content\"," +
                    "b.create_time as \"create_time\"," +
                    "c.type as \"type\"," +
                    "c.name as \"patientname\"," +
                    "b.id as \"id\"," +
                    "c.photo as \"patientphoto\"," +
                    "b.type as \"niming\" " +
                    "FROM " +
                    "base_evaluate a " +
                    "LEFT JOIN base_evaluate_score b ON b.id=a.relation_code " +
@ -3401,21 +3408,21 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
    
        String sql ="SELECT " +
                " d.id, " +
                " d.photo, " +
                " d.`name`, " +
                " d.expertise," +
                " d.introduce," +
                " d.job_title_code AS jobTitleCode, " +
                " d.job_title_name AS jobTitleName," +
                " d.charge_type AS chargeType," +
                " h.dept_name AS deptName," +
                " d.consult_status AS consultStatus," +
                " d.outpatient_type AS outpatientType," +
                " a.total as consultTotal," +
                " h.org_name as orgName," +
                " follow.patient as followid," +
                " h.org_code as orgCode" +
                " d.id AS \"id\", " +
                " d.photo AS \"photo\", " +
                " d.name AS \"name\", " +
                " d.expertise AS \"expertise\"," +
                " d.introduce AS \"introduce\"," +
                " d.job_title_code AS \"jobTitleCode\", " +
                " d.job_title_name AS \"jobTitleName\"," +
                " d.charge_type AS \"chargeType\"," +
                " h.dept_name AS \"deptName\"," +
                " d.consult_status AS \"consultStatus\"," +
                " d.outpatient_type AS \"outpatientType\"," +
                " a.total AS \"consultTotal\"," +
                " h.org_name AS \"orgName\"," +
                " follow.patient AS \"followid\"," +
                " h.org_code AS \"orgCode\"" +
                " FROM " +
                " base_doctor d " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id "+
@ -3427,6 +3434,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        sql +=  " WHERE  1=1 ";
        Map<String, Object> params = new HashedMap();
        if(StringUtils.isBlank(chargType)){
            sql +=" AND d.charge_type is not null ";
        }
@ -3434,13 +3444,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            if("all".equals(chargType)){
                //不过滤
            }else{
                sql+=" AND d.charge_type = '"+chargType+"'";
                sql+=" AND d.charge_type = :chargType";
                params.put("chargType",chargType);
            }
        }
        if(StringUtils.isNotBlank(iswork)&&"1".equals(iswork)){
            logger.info("iswork:"+iswork);
            String date = DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss");
            Date date = new Date();
            sql+=" AND (" +
                    " EXISTS ( " +
                    " SELECT " +
@ -3449,28 +3460,36 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    "  wlyy_doctor_work_time t " +
                    " WHERE " +
                    "  t.doctor = d.id " +
                    " AND t.start_time <='" +date+"'" +
                    " AND t.end_time >='"+date+"'"+
                    " AND t.start_time <=:startTime" +
                    " AND t.end_time >=:endTime"+
                    " ) OR " +
                    " d.consult_status = '1') ";
            params.put("startTime",date);
            params.put("endTime",date);
        }
        if(StringUtils.isNotBlank(orgCode)){
            sql += " AND  h.org_code = '"+orgCode+"'";
            sql += " AND  h.org_code = :orgCode";
            params.put("orgCode",orgCode);
        }
        if(StringUtils.isNotBlank(diseaseKey)){
            sql+=" AND d.expertise like '%"+diseaseKey+"%'";
            sql+=" AND d.expertise like :diseaseKey";
            params.put("diseaseKey","%"+diseaseKey+"%");
        }
    
        if(StringUtils.isNotBlank(doctorNameKey)){
            sql+=" AND d.name like '%"+doctorNameKey+"%'";
            sql+=" AND d.name like :doctorNameKey";
            params.put("doctorNameKey","%"+doctorNameKey+"%");
        }
        
        if(StringUtils.isNotBlank(dept)){
            sql+=" AND h.dept_code = '"+dept+"' ";
            sql+=" AND h.dept_code = :dept ";
            params.put("dept",dept);
        }
    
        if(StringUtils.isNotBlank(jobTitleNameKey)){
            sql+=" AND d.job_title_name  = '"+jobTitleNameKey+"' ";
            sql+=" AND d.job_title_name  = :jobTitleNameKey ";
            params.put("jobTitleNameKey",jobTitleNameKey);
        }
    
        if(StringUtils.isNotBlank(outpatientType)){
@ -3497,17 +3516,21 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
    
        if(StringUtils.isNotBlank(workingTime)){
            sql+=" AND wk.date = '"+workingTime+"' ";
            sql+=" AND wk.date = :workingTime ";
            params.put("workingTime",workingTime);
        }
    
    
        if(StringUtils.isNotBlank(consultStatus)){
            sql+=" AND d.consult_status = '"+consultStatus+"' ";
            sql+=" AND d.consult_status = :consultStatus ";
            params.put("consultStatus",consultStatus);
        }
    
        sql += " and d.del='1' order by a.total "+ consutlSort +" limit "+page * pagesize +","+pagesize;
        
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        sql += " and d.del='1' order by a.total "+ consutlSort;
        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,params,page,pagesize);
        logger.info("findDoctorByHospitalAndDiseaseAndDept end:"+DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS"));
        logger.info("sql:"+sql);
@ -3520,7 +3543,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     */
    public List<Map<String,Object>> findHotDeptAndDiseaseDict(String dictName) {
        String sql ="SELECT * from wlyy_hospital_sys_dict where dict_name='"+dictName+"' ORDER BY sort ASC;";
        String sql ="SELECT * from wlyy_hospital_sys_dict where dict_name='"+dictName+"' ORDER BY sort ASC";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        
@ -3571,10 +3594,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if("1".equals(type)){
            String sql ="SELECT " +
                    " DISTINCT " +
                    " d.id, " +
                    " d.`name`, " +
                    " h.org_code, " +
                    " h.org_name " +
                    " d.id AS \"id\", " +
                    " d.name AS \"name\", " +
                    " h.org_code AS \"org_code\", " +
                    " h.org_name AS \"org_name\"" +
                    " FROM " +
                    " base_doctor d " +
                    " JOIN base_doctor_hospital h ON d.id= h.doctor_code " +
@ -3588,10 +3611,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            String sql ="SELECT " +
                    " DISTINCT " +
                    " d.id, " +
                    " d.`name`, " +
                    " h.org_code, " +
                    " h.org_name " +
                    " d.id AS \"id\", " +
                    " d.name AS \"name\", " +
                    " h.org_code AS \"org_code\", " +
                    " h.org_name AS \"org_name\"" +
                    " FROM " +
                    " base_doctor d " +
                    " JOIN base_doctor_hospital h ON d.id= h.doctor_code " +
@ -3604,10 +3627,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }else if("3".equals(type)){
            String sql ="SELECT " +
                    " DISTINCT " +
                    " d.id, " +
                    " d.`name`, " +
                    " h.org_code, " +
                    " h.org_name " +
                    " d.id AS \"id\", " +
                    " d.name AS \"name\", " +
                    " h.org_code AS \"org_code\", " +
                    " h.org_name AS \"org_name\"" +
                    " FROM " +
                    " base_doctor d " +
                    " JOIN base_doctor_hospital h ON d.id= h.doctor_code " +
@ -3650,7 +3673,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    t.setTimeType(time.getTimeType());
                    t.setStartTime(time.getStartTime());
                    t.setEndTime(time.getEndTime());
                    t.setDate(time.getDate());
                    t.setWorkDate(time.getWorkDate());
                    t.setTimeInterval(time.getTimeInterval());
                    t.setSourceNumber(time.getSourceNumber());
                    rs.add(t);
@ -3674,11 +3697,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            for(WlyyDoctorWorkTimeDO time : workTimeDOs){
                //医生工作月份
                String workMonth = time.getDoctor()+","+time.getDate().substring(0,7);
                String workMonth = time.getDoctor()+","+time.getWorkDate().substring(0,7);
                //判断是否是首次插入医生月份数据,如果是首次,则删除该医生当前月份排班数据数据
                if(!workMonths.contains(workMonth)){
                    workMonths.add(workMonth);
                    List<WlyyDoctorWorkTimeDO> oldTimes = doctorWorkTimeDao.findDoctorWorkTimeByMonth(time.getDoctor(),"%"+time.getDate().substring(0,7)+"%");
                    List<WlyyDoctorWorkTimeDO> oldTimes = doctorWorkTimeDao.findDoctorWorkTimeByMonth(time.getDoctor(),"%"+time.getWorkDate().substring(0,7)+"%");
                    doctorWorkTimeDao.delete(oldTimes);
                }
            }
@ -4873,19 +4896,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    
    public List<Map<String,Object>> findDeptByKeyWord(String keyWord,Integer page,Integer pagesize) {
    
        if(page >=1){
            page --;
        }
    
        if (pagesize <= 0) {
            pagesize = 10;
        }
    
        String sql ="SELECT " +
                "dept.`code` AS deptCode," +
                "dept.`name` AS deptName," +
                "org.CODE AS orgCode, " +
                "org.NAME AS orgName " +
                "dept.code AS \"deptCode\"," +
                "dept.name AS \"deptName\"," +
                "org.CODE AS \"orgCode\", " +
                "org.NAME AS \"orgName\" " +
                "FROM " +
                "dict_hospital_dept dept," +
                "base_org org " +
@ -4895,9 +4910,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if(StringUtils.isNoneBlank(keyWord)){
            sql = sql + "AND dept.NAME LIKE '%"+keyWord+"%' ";
        }
        sql = sql + " limit "+page * pagesize +","+pagesize ;
    
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,page,pagesize);
        logger.info("sql:"+sql);
        return list;
    }

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

@ -242,7 +242,7 @@ public class WorkTimeService {
        String workDate = date+"-"+day;
        logger.info("workDate:"+workDate);
        workTimeDO.setDate(workDate);
        workTimeDO.setWorkDate(workDate);
        workTimeDO.setCreateTime(new Date());
        //上午

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/utils/hibernate/HibenateDemo.java

@ -57,7 +57,7 @@ public class HibenateDemo {
        }
        Long count = 0L;
        List<Map<String,Object>> total = hibenateUtils.createSQLQuery(sqlTotal,params);
        if(count!=null){
        if(total!=null){
            //mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
            count = hibenateUtils.objTransformLong(total.get(0).get("total"));
        }

+ 5 - 5
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/doctor/WlyyDoctorWorkTimeDO.java

@ -27,7 +27,7 @@ public class WlyyDoctorWorkTimeDO extends UuidIdentityEntity {
    private String timeType;//1.上午00:00~12:00之前;2.下午12:00~00:00;',
    private Date startTime;//开始时间',
    private Date endTime;//结束时间',
    private String date;//排班日期',
    private String workDate;//排班日期',
    private Integer timeInterval;//号源间隔
    private Integer sourceNumber;//号源数目
    private Date createTime;//创建时间',
@ -139,12 +139,12 @@ public class WlyyDoctorWorkTimeDO extends UuidIdentityEntity {
        this.endTime = endTime;
    }
    public String getDate() {
        return date;
    public String getWorkDate() {
        return workDate;
    }
    public void setDate(String date) {
        this.date = date;
    public void setWorkDate(String workDate) {
        this.workDate = workDate;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")

+ 6 - 1
svr/svr-base/pom.xml

@ -191,7 +191,12 @@
            <scope>compile</scope>
        </dependency>
        <!--   poi xml导入导出工具 end -->
        <!--oracle驱动-->
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc6</artifactId>
            <version>11.2.0.3</version>
        </dependency>
    </dependencies>

+ 41 - 0
svr/svr-base/src/main/resources/application.yml

@ -243,6 +243,47 @@ wlyy:
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040
#文件服务器上传配置 0本地,1.I健康,2.内网调用
testPattern:
  sign: 0
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream
---
spring:
  profiles: jwOracleTest
  datasource:
    driver-class-name: oracle.jdbc.driver.OracleDriver
    url: jdbc:oracle:thin:@172.26.0.141:1521:helowin
    username: normal
    password: normal
  elasticsearch:
    cluster-name: jkzl #集群名 默认elasticsearch
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    client-transport-sniff: false
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
      connection-timeout: 60000 # Connection timeout in milliseconds.
      multi-threaded: true # Enable connection requests from multiple execution threads.
  activemq:
    broker-url: tcp://172.19.103.87:61616
    user: admin
    password: admin
  redis:
    host: 172.26.0.253 # Redis server host.
    port: 6379 # Redis server port.
fastDFS:
  fastdfs_file_url: http://172.19.103.54:80/
demo:
  flag: true
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
wlyy:
  url: http://ehr.yihu.com/wlyy/
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040
#文件服务器上传配置 0本地,1.I健康,2.内网调用
testPattern:
  sign: 0
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream