Browse Source

代码修改

LAPTOP-KB9HII50\70708 1 year ago
parent
commit
70aa55c9a0

+ 1 - 0
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1091,6 +1091,7 @@ public class ImService {
        // 添加医生咨询日志
        String content = addLogs(ct);
        re.put("doctor", doctor);
        re.put("title", title);
        re.put("doctorName", baseDoctorDO.getName());
        re.put("status", 1);
        re.put("sessiond_id", patient + "_" + doctor + "_" + ct.getType());

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/im/ConsultDo.java

@ -23,7 +23,7 @@ public class ConsultDo extends UuidIdentityEntity {
	private String patient;
	// 咨询类型:1三师咨询,2视频咨询,3图文咨询,4公共咨询,
	//          5病友圈 6、患者名医咨询 7医生名医咨询 8续方咨询
	//          9在线复诊咨询(居民直接咨询专家) 10医生发起的求助 11思明区上门服务在线咨询
	//          9在线复诊咨询(居民直接咨询专家) 10医生发起的求助 11思明区上门服务在线咨询 28康复咨询
	private Integer type;
	// 咨询标题/主诉
	private String title;

+ 4 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -443,6 +443,8 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
			@RequestParam(value = "images",required = false) String images,
			@ApiParam(name = "voice", value = "语音")
			@RequestParam(value = "voice",required = false) String voice,
			@ApiParam(name = "relationCode", value = "关联业务表的code(服务项执行计划id)")
			@RequestParam(value = "relationCode",required = false) String relationCode,
			@ApiParam(name = "type", value = "咨询类型:1专家咨询 14导诊助手 17专家视频咨询 28康复咨询")
			@RequestParam(value = "type",required = false) Integer type,
			@ApiParam(name = "source", value = "咨询类型来源")
@ -467,6 +469,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
		consult.setVoice(voice);
		consult.setDoctor(doctor);
		consult.setPatient(patient);
		consult.setRelationCode(relationCode);
		// 保存到数据库
//		int res = 0;
//		JSONArray dts = null;
@ -508,7 +511,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
			//发送系统消息
			SystemMessageDO systemMessageDO = new SystemMessageDO();
			systemMessageDO.setTitle("新增专家咨询");
			systemMessageDO.setTitle("新增"+re.getString("title"));
			systemMessageDO.setType("4");
			systemMessageDO.setReceiver(re.getString("doctor"));
			systemMessageDO.setReceiverName(re.getString("doctorName"));

+ 3 - 2
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/DoctorRehabilitaionInfoController.java

@ -256,10 +256,11 @@ public class DoctorRehabilitaionInfoController extends EnvelopRestEndpoint {
    @ApiOperation("查询居民的康复计划")
    public String getPatientRehabilitationByPatientId(
            @ApiParam(name = "patientId", value = "居民", required = false) @RequestParam(value = "patientId", required = false) String patientId,
            @ApiParam(name = "planId", value = "计划id", required = false) @RequestParam(value = "planId", required = false) String planId
            @ApiParam(name = "planId", value = "计划id", required = false) @RequestParam(value = "planId", required = false) String planId,
            @ApiParam(name = "diseaseId", value = "专病id", required = false) @RequestParam(value = "diseaseId", required = false) String diseaseId
    ) {
        try {
            List<Map<String, Object>> result = rehabilitationInfoService.getPatientRehabilitationByPatientId(patientId,planId);
            List<Map<String, Object>> result = rehabilitationInfoService.getPatientRehabilitationByPatientId(patientId,planId,diseaseId);
            return write(200, "请求成功", "data", result);
        } catch (Exception e) {
            e.printStackTrace();

+ 4 - 3
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationInfoService.java

@ -1,6 +1,5 @@
package com.yihu.jw.hospital.module.rehabilitation.service;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
@ -1232,7 +1231,7 @@ public class RehabilitationInfoService {
    /**
     * todo 还需要代办项目还需要重新join一张新表 todayTaskCount 今日任务项,等后面在整
     */
    public List<Map<String, Object>> getPatientRehabilitationByPatientId(String patientId, String planId) {
    public List<Map<String, Object>> getPatientRehabilitationByPatientId(String patientId, String planId,String diseaseId) {
        String sql = "SELECT DISTINCT \n" +
                "	 a.id,a.`name`,a.birthday,a.phone,a.sex,a.mobile,TIMESTAMPDIFF(YEAR,a.birthday,NOW()) 'age',a.idcard,\n" +
                "	 b.id 'planId',b.title 'planTitle',b.plan_doctor 'planDoctor',b.plan_doctor_name 'planDoctorName'" +
@ -1264,8 +1263,10 @@ public class RehabilitationInfoService {
        if (StringUtils.isNotBlank(planId)) {
            sql += "	AND b.id='" + planId + "' ";
        }
        if(StringUtils.isNotBlank(diseaseId)){
            sql += "	AND d.id='" + diseaseId + "' ";
        }
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        System.out.println("数据:" + JSON.toJSONString(list));
        return list;
    }