Bladeren bron

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

mengkang 5 jaren geleden
bovenliggende
commit
88d8a215d4

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

@ -345,9 +345,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " o.adm_date AS \"admDate\", " +
                " o.con_date AS \"conDate\", " +
                " o.description AS \"description\", " +
                " o.disease_img AS \"diseaseImg\", " +
                " o.create_time AS \"createTime\", " +
                " o.status AS \"status\"," +
                " o.disease_img AS \"diseaseImg\", ";
        if("xm_ykyy_wx".equals(wechatId)){
            sql= sql +"to_char(o.create_time ,'yyyy-MM-dd hh24:mi:ss' ) AS \"createTime\"," ;
        }else{
            sql= sql +  "date_format(o.create_time ,'%Y-%m-%d %H:%i:%S' ) AS createTime," ;
        }
        sql= sql+    " o.status AS \"status\"," +
                condition+
              /*  " o.register_date AS \"registerDate\"," +*/
                " o.evaluate_status AS \"evaluateStatus\"," +
@ -3919,7 +3923,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param general_doctor
     * @return
     */
    public List<Map<String,Object>> getVideoPrescriptionByDoctor(String doctor,String general_doctor) {
    public List<Map<String,Object>> getVideoPrescriptionByDoctor(String doctor,String general_doctor,String wxId) {
        String condition = "";
        if("xm_ykyy_wx".equals(wxId)){
            condition+= "to_char(room.reservation_time,'YYYY-MM-DD hh24:mi:ss')  AS \"time\",";
        }else{
            condition += "date_format(room.reservation_time ,'%Y-%m-%d %H:%i:%S' ) AS \"time\",";
        }
        String sql ="SELECT " +
                "room.outpatient_id AS id," +
                "room.patient_id AS patient_id," +
@ -3929,8 +3939,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "patient.photo AS photo," +
                "patient.birthday AS birthday," +
                "patient.mobile AS mobile," +
                "room.consult_type AS consult_type," +
                "date_format(room.reservation_time ,'%Y-%m-%d %H:%i:%S' ) AS time," +
                "room.consult_type AS consult_type," +condition +
                "room.reservation_type AS reservation_type," +
                "outpatient.disease_img AS disease_img," +
                "outpatient.description AS description," +
@ -3978,25 +3987,31 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return list;
    }
    
    public com.alibaba.fastjson.JSONArray getWaitingForVisitVideoPrescriptionByDoctor(String doctor) {
    public com.alibaba.fastjson.JSONArray getWaitingForVisitVideoPrescriptionByDoctor(String doctor,String wxId) {
        String condition = "";
        if("xm_ykyy_wx".equals(wxId)){
            condition+= "to_char(room.reservation_time,'YYYY-MM-DD hh24:mi:ss')  AS \"time\",";
            condition+= "to_char(room.reservation_time,'YYYY-MM-DD')  AS \"group_date\",";
        }else{
            condition += "date_format(room.reservation_time ,'%Y-%m-%d %H:%i:%S' ) AS \"time\",";
            condition += "date_format(room.reservation_time ,'%Y-%m-%d' ) AS \"group_date\",";
        }
        String sql ="SELECT " +
                "room.outpatient_id AS id," +
                "room.patient_id AS patient_id," +
                "room.patient_name AS name," +
                "patient.sex AS sex," +
                "patient.idcard AS idcard," +
                "patient.photo AS photo," +
                "patient.birthday AS birthday," +
                "patient.mobile AS mobile," +
                "outpatient.mobile AS outpatient_mobile," +
                "room.consult_type AS consult_type," +
                "date_format(room.reservation_time ,'%Y-%m-%d %H:%i:%S' ) AS time," +
                "date_format(room.reservation_time ,'%Y-%m-%d' ) AS group_date," +
                "room.reservation_type AS reservation_type," +
                "outpatient.disease_img AS disease_img," +
                "outpatient.description AS description," +
                "outpatient.origin_con_no AS origin_con_no, " +
                "room.reservation_type AS reservation_type " +
                "room.outpatient_id AS \"id\"," +
                "room.patient_id AS \"patient_id\"," +
                "room.patient_name AS \"name\"," +
                "patient.sex AS \"sex\"," +
                "patient.idcard AS \"idcard\"," +
                "patient.photo AS \"photo\"," +
                "patient.birthday AS \"birthday\"," +
                "patient.mobile AS \"mobile\"," +
                "outpatient.mobile AS \"outpatient_mobile\"," +
                "room.consult_type AS \"consult_type\"," +condition+
                "room.reservation_type AS \"reservation_type\"," +
                "outpatient.disease_img AS \"disease_img\"," +
                "outpatient.description AS \"description\"," +
                "outpatient.origin_con_no AS \"origin_con_no\", " +
                "room.reservation_type AS \"reservation_type\" " +
                "FROM " +
                "wlyy_hospital_waiting_room room," +
                "base_patient patient," +
@ -4007,9 +4022,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "AND outpatient.status = 0 " +
                "AND room.doctor='"+doctor+"' " +
                "AND room.reservation_time is not null " +
                "AND room.consult_type= 2 AND room.reservation_time >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' order by room.reservation_time ASC ";
//                "AND room.reservation_time>='"+DateUtil.getStringDate("yyyy-MM-dd")+" 00:00:00"+"' ";
                "AND room.consult_type= 2 ";/* +
                "AND room.reservation_time >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' order by room.reservation_time ASC ";
//                "AND room.reservation_time>='"+DateUtil.getStringDate("yyyy-MM-dd")+" 00:00:00"+"' ";*/
        if("xm_ykyy_wx".equals(wxId)){
            sql+=" AND room.reservation_time >= to_date('"+DateUtil.dateToStrShort(new Date())+" 00:00:00','YYYY-MM-DD HH24:MI:SS')";
        }else {
            sql +=" AND room.reservation_time >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' ";
        }
        sql+=" order by room.reservation_time ASC ";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        
        Set<String> datelist = new HashSet<>();

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

@ -149,7 +149,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            businessOrderDO.setOrderCategory("2");
        } else if (outpatientDO.getType().equalsIgnoreCase("2")) {
            businessOrderDO.setOrderType(3);
            businessOrderDO.setOrderCategory("3");
            businessOrderDO.setOrderCategory("2");
        }
        businessOrderService.saveOrder(businessOrderDO);

+ 44 - 8
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1770,11 +1770,21 @@ public class ImService {
		}
		
		if(!StringUtils.isEmpty(start_time)){
			sql +=" and a.czrq >= '"+start_time+"'";
			if("xm_ykyy_wx".equals(wxId)){
				sql +=" and a.czrq >= to_date('"+start_time+"','YYYY-MM-DD HH24:MI:SS')";
			}else {
				sql +=" and a.czrq >= '"+start_time+"'";
			}
		}
		
		if(!StringUtils.isEmpty(end_time)){
			sql +=" and a.czrq <= '"+end_time+"'";
			if("xm_ykyy_wx".equals(wxId)){
				sql +=" and a.czrq <= to_date('"+end_time+"','YYYY-MM-DD HH24:MI:SS')";
			}else {
				sql +=" and a.czrq <= '"+end_time+"'";
			}
		}
		
		
@ -1831,11 +1841,20 @@ public class ImService {
		}
		
		if(!StringUtils.isEmpty(start_time)){
			sql +=" and a.czrq >= '"+start_time+"'";
			if("xm_ykyy_wx".equals(wxId)){
				sql +=" and a.czrq >= to_date('"+start_time+"','YYYY-MM-DD HH24:MI:SS')";
			}else {
				sql +=" and a.czrq >= '"+start_time+"'";
			}
			/*sql +=" and a.czrq >= '"+start_time+"'";*/
		}
		
		if(!StringUtils.isEmpty(end_time)){
			sql +=" and a.czrq <= '"+end_time+"'";
			if("xm_ykyy_wx".equals(wxId)){
				sql +=" and a.czrq <= to_date('"+end_time+"','YYYY-MM-DD HH24:MI:SS')";
			}else {
				sql +=" and a.czrq <= '"+end_time+"'";
			}
		}
		
		//咨询状态
@ -2130,11 +2149,20 @@ public class ImService {
		}
		
		if(!StringUtils.isEmpty(start_time)){
			sql +=" and a.czrq >= '"+start_time+"'";
			if("xm_ykyy_wx".equals(wxId)){
				sql +=" and a.czrq >= to_date('"+start_time+"','YYYY-MM-DD HH24:MI:SS')";
			}else {
				sql +=" and a.czrq >= '"+start_time+"'";
			}
		}
		
		if(!StringUtils.isEmpty(end_time)){
			sql +=" and a.czrq <= '"+end_time+"'";
			if("xm_ykyy_wx".equals(wxId)){
				sql +=" and a.czrq <= to_date('"+end_time+"','YYYY-MM-DD HH24:MI:SS')";
			}else {
				sql +=" and a.czrq <= '"+end_time+"'";
			}
		}
		
		
@ -2195,11 +2223,19 @@ public class ImService {
		}
		
		if(!StringUtils.isEmpty(start_time)){
			sql +=" and a.czrq >= '"+start_time+"'";
			if("xm_ykyy_wx".equals(wxId)){
				sql +=" and a.czrq >= to_date('"+start_time+"','YYYY-MM-DD HH24:MI:SS')";
			}else {
				sql +=" and a.czrq >= '"+start_time+"'";
			}
		}
		
		if(!StringUtils.isEmpty(end_time)){
			sql +=" and a.czrq <= '"+end_time+"'";
			if("xm_ykyy_wx".equals(wxId)){
				sql +=" and a.czrq <= to_date('"+end_time+"','YYYY-MM-DD HH24:MI:SS')";
			}else {
				sql +=" and a.czrq <= '"+end_time+"'";
			}
		}
		
		//咨询状态

+ 2 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -314,7 +314,7 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
			@RequestParam(value = "doctor",required = false) String doctor,
			@ApiParam(name = "general_doctor", value = "全科医生CODE")
			@RequestParam(value = "general_doctor",required = false) String general_doctor)throws Exception{
		return success("请求成功",prescriptionService.getVideoPrescriptionByDoctor(doctor,general_doctor));
		return success("请求成功",prescriptionService.getVideoPrescriptionByDoctor(doctor,general_doctor,wxId));
	}
	
	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.getWaitingForVisitVideoPrescriptionByDoctor)
@ -322,7 +322,7 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
	public ListEnvelop getWaitingForVisitVideoPrescriptionByDoctor(
			@ApiParam(name = "doctor", value = "医生CODE")
			@RequestParam(value = "doctor",required = true) String doctor)throws Exception{
		return success("请求成功",prescriptionService.getWaitingForVisitVideoPrescriptionByDoctor(doctor));
		return success("请求成功",prescriptionService.getWaitingForVisitVideoPrescriptionByDoctor(doctor,wxId));
	}
	
	@PostMapping(value = BaseHospitalRequestMapping.DodtorIM.pickVideoPrescripitonWaitingPeople)

+ 1 - 1
svr/svr-internet-hospital/src/main/resources/application.yml

@ -257,7 +257,7 @@ fastDFS:
fast-dfs:
  tracker-server: 192.0.33.26:22122 #服务器地址
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段  # todo 待配置
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段  # todo 待配置
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP #todo 待配置