Przeglądaj źródła

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 5 lat temu
rodzic
commit
c1d35bbb2d

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

@ -3292,7 +3292,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        }
        
        
        //获取今天的排班列表
        //获取今天的排班列表
        String doctorsql ="SELECT doctor,doctor_name,dept,dept_name FROM wlyy_doctor_work_time WHERE date='"+date+"'";
        String doctorsql ="SELECT doctor AS \"doctor\",doctor_name as \"doctor_name\",dept as \"dept\",dept_name as \"dept_name\" FROM wlyy_doctor_work_time WHERE work_date='"+date+"'";
        
        
        if(StringUtils.isNoneBlank(dept)){
        if(StringUtils.isNoneBlank(dept)){
            doctorsql = doctorsql + " and dept = '"+dept+"' ";
            doctorsql = doctorsql + " and dept = '"+dept+"' ";
@ -4843,9 +4843,24 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param patient
     * @param patient
     * @return
     * @return
     */
     */
	public List<Map<String,Object>> getTodayOutpatinetList(String patient) {
        String sql ="SELECT date_format(p.register_date ,'%Y-%m-%d %H:%i:%S' ) AS time,d.NAME as doctorName,d.job_title_name,d.photo AS photo,p.id as outpatientid FROM wlyy_outpatient p,base_doctor d " +
                "WHERE p.patient='"+patient+"' AND p.doctor=d.id AND p.status=0 AND p.register_date BETWEEN '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' AND '"+DateUtil.dateToStrShort(new Date())+" 23:59:59'";
	public List<Map<String,Object>> getTodayOutpatinetList(String patient,String wxId) {
	    String condition = "";
        if("xm_ykyy_wx".equals(wxId)){
            condition = "to_char(p.register_date,'YYYY-MM-DD hh24:mi:ss')  AS \"time\",";
        }else{
            condition ="date_format(p.register_date,'%Y-%m-%d %H:%i:%S' )  AS \"time\",";
        }
        String sql ="SELECT "+condition+"d.NAME as \"doctorName\",d.job_title_name as \"job_title_name\",d.photo AS \"photo\",p.id as \"outpatientid\" FROM wlyy_outpatient p,base_doctor d " +
                "WHERE p.patient='"+patient+"' AND p.doctor=d.id AND p.status=0 ";
        if("xm_ykyy_wx".equals(wxId)){
            sql +=" AND p.register_date >= to_date('"+DateUtil.dateToStrShort(new Date())+" 00:00:00','YYYY-MM-DD HH24:MI:SS')";
            sql +=" AND p.register_date <= to_date('"+DateUtil.dateToStrShort(new Date())+" 23:59:59','YYYY-MM-DD HH24:MI:SS')";
        }else {
            sql +=" BETWEEN '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' AND '"+DateUtil.dateToStrShort(new Date())+" 23:59:59' ";
        }
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        return list;
        return list;
	}
	}

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/user/UserService.java

@ -234,7 +234,7 @@ public class UserService extends BaseJpaService<UserDO, UserDao> {
    }
    }
    
    
    public com.alibaba.fastjson.JSONObject findDoctorPwlimitDate(String user){
    public com.alibaba.fastjson.JSONObject findDoctorPwlimitDate(String user){
        String key = "base:authPw:iser:" + user;
        String key = "base:authPw:user:" + user;
        String authPw = redisTemplate.opsForValue().get(key);
        String authPw = redisTemplate.opsForValue().get(key);
        com.alibaba.fastjson.JSONObject valueJson = null;
        com.alibaba.fastjson.JSONObject valueJson = null;
        if(org.apache.commons.lang3.StringUtils.isNotBlank(authPw)){
        if(org.apache.commons.lang3.StringUtils.isNotBlank(authPw)){

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

@ -3,7 +3,9 @@ package com.yihu.jw.hospital.endpoint.patient;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.dict.service.BaseDictJobTitleService;
import com.yihu.jw.dict.service.BaseDictJobTitleService;
import com.yihu.jw.dict.service.HospitalDeptService;
import com.yihu.jw.doctor.service.BaseDoctorInfoService;
import com.yihu.jw.doctor.service.BaseDoctorInfoService;
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.jw.entity.base.dict.DictJobTitleDO;
import com.yihu.jw.entity.base.dict.DictJobTitleDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.entity.ylzinfo.OauthYlzConfigDO;
@ -80,6 +82,8 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    private StringRedisTemplate redisTemplate;
    private StringRedisTemplate redisTemplate;
    @Autowired
    @Autowired
    private OauthYlzConfigDao oauthYlzConfigDao;
    private OauthYlzConfigDao oauthYlzConfigDao;
    @Autowired
    private HospitalDeptService hospitalDeptService;
@ -137,7 +141,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "居民获取当日就诊列表", notes = "居民获取当日就诊列表")
    @ApiOperation(value = "居民获取当日就诊列表", notes = "居民获取当日就诊列表")
    public ListEnvelop getTodayOutpatinetList(@ApiParam(name = "patient", value = "居民ID")
    public ListEnvelop getTodayOutpatinetList(@ApiParam(name = "patient", value = "居民ID")
                                              @RequestParam(value = "patient", required = true) String patient){
                                              @RequestParam(value = "patient", required = true) String patient){
        return success(prescriptionService.getTodayOutpatinetList(patient));
        return success(prescriptionService.getTodayOutpatinetList(patient,wxId));
    }
    }
@ -189,6 +193,25 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
        return success("请求成功",consultCode);
        return success("请求成功",consultCode);
    }
    }
    /**
     * 根据机构编码获取部门列表信息
     * @param orgCode
     * @return
     */
    @GetMapping(value = "/getDeptByOrgCode")
    @ApiOperation(value = "根据机构编码获取部门列表信息", notes = "基础数据获取")
    public Envelop getDeptByOrgCode(
            @ApiParam(name = "orgCode", value = "机构编码")
            @RequestParam(value = "orgCode", required = false) String orgCode,
            @ApiParam(name = "consultDeptFlag", value = "是否是就诊科室,1为查询门诊,不传为全部")
            @RequestParam(value = "consultDeptFlag", required = false) String consultDeptFlag)  {
        List<DictHospitalDeptDO> res =  hospitalDeptService.getHosDeptByCode(orgCode,consultDeptFlag);
        if(res != null && res.size() > 0 ){
            return  success(res);
        }else{
            return success("无法获取该机构的部门列表信息!");
        }
    }
    /**
    /**
     * 获取机构职称信息
     * 获取机构职称信息

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -796,7 +796,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "居民获取当日就诊列表", notes = "居民获取当日就诊列表")
    @ApiOperation(value = "居民获取当日就诊列表", notes = "居民获取当日就诊列表")
    public ListEnvelop getTodayOutpatinetList(@ApiParam(name = "patient", value = "居民ID")
    public ListEnvelop getTodayOutpatinetList(@ApiParam(name = "patient", value = "居民ID")
                                                  @RequestParam(value = "patient", required = true) String patient){
                                                  @RequestParam(value = "patient", required = true) String patient){
        return success(prescriptionService.getTodayOutpatinetList(patient));
        return success(prescriptionService.getTodayOutpatinetList(patient,wxId));
    }
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getDoctorMapping)
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getDoctorMapping)