完善功能
parent
ac53f09dd8
commit
1e23e76a1a
|
@ -95,6 +95,10 @@
|
||||||
<version>7.10.4</version>
|
<version>7.10.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,10 @@ import com.alibaba.fastjson.JSONObject;
|
||||||
import com.grail.common.core.domain.Result;
|
import com.grail.common.core.domain.Result;
|
||||||
import com.grail.doctor.publice.service.DoctorService;
|
import com.grail.doctor.publice.service.DoctorService;
|
||||||
import com.grail.publice.domain.Consultation;
|
import com.grail.publice.domain.Consultation;
|
||||||
|
import com.grail.publice.domain.Disgnosis;
|
||||||
import com.grail.publice.domain.Doctor;
|
import com.grail.publice.domain.Doctor;
|
||||||
import com.grail.publice.domain.request.RequestDoctor;
|
import com.grail.publice.domain.request.RequestDoctor;
|
||||||
|
import com.grail.publice.domain.response.DisgnosisResponse;
|
||||||
import com.grail.publice.domain.response.ResponseDoctor;
|
import com.grail.publice.domain.response.ResponseDoctor;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -71,6 +73,44 @@ public class DoctorController {
|
||||||
log.info("功能名称:完善修改医生信息,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
log.info("功能名称:完善修改医生信息,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||||
request.getMethod(),doctor);
|
request.getMethod(),doctor);
|
||||||
Result result = doctorService.updateDoctor(doctor);
|
Result result = doctorService.updateDoctor(doctor);
|
||||||
|
log.info("功能名称:完善医生信息,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||||
|
request.getMethod(),JSONObject.toJSONString(result));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:查看问诊结束诊断结果
|
||||||
|
No such property: code for class: Script1
|
||||||
|
* @return: com.grail.common.core.domain.Result<java.util.List<com.grail.publice.domain.response.DisgnosisResponse>>
|
||||||
|
* @Author: YHY
|
||||||
|
* @Updator: YHY
|
||||||
|
* @Date 2023/10/28 15:30
|
||||||
|
*/
|
||||||
|
@GetMapping("/disgnosisList")
|
||||||
|
public Result<List<DisgnosisResponse>> disgnosisList(){
|
||||||
|
log.info("功能名称:查看问诊诊断结果,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||||
|
request.getMethod());
|
||||||
|
Result<List<DisgnosisResponse>> result = doctorService.disgnosisList();
|
||||||
|
log.info("功能名称:查看问诊诊断结果,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||||
|
request.getMethod(),JSONObject.toJSONString(result));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:添加诊断结果
|
||||||
|
No such property: code for class: Script1
|
||||||
|
* @return: com.grail.common.core.domain.Result
|
||||||
|
* @Author: YHY
|
||||||
|
* @Updator: YHY
|
||||||
|
* @Date 2023/10/28 15:35
|
||||||
|
*/
|
||||||
|
@PostMapping("/addDisgnosis")
|
||||||
|
public Result addDisgnosis(@RequestBody Disgnosis disgnosis){
|
||||||
|
log.info("功能名称:添加诊断结果,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||||
|
request.getMethod(),disgnosis);
|
||||||
|
Result result = doctorService.addDisgnosis(disgnosis);
|
||||||
|
log.info("功能名称:添加诊断结果,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||||
|
request.getMethod(),JSONObject.toJSONString(result));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package com.grail.doctor.publice.mapper;
|
package com.grail.doctor.publice.mapper;
|
||||||
|
|
||||||
import com.grail.common.core.domain.Result;
|
import com.grail.common.core.domain.Result;
|
||||||
|
import com.grail.publice.domain.Disgnosis;
|
||||||
import com.grail.publice.domain.Doctor;
|
import com.grail.publice.domain.Doctor;
|
||||||
import com.grail.publice.domain.request.RequestDoctor;
|
import com.grail.publice.domain.request.RequestDoctor;
|
||||||
|
import com.grail.publice.domain.response.DisgnosisResponse;
|
||||||
import com.grail.publice.domain.response.ResponseDoctor;
|
import com.grail.publice.domain.response.ResponseDoctor;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
@ -22,4 +24,8 @@ public interface DoctorMapper {
|
||||||
Result<ResponseDoctor> findDoctorById(@Param("doctorId") Integer doctorId);
|
Result<ResponseDoctor> findDoctorById(@Param("doctorId") Integer doctorId);
|
||||||
|
|
||||||
int updateDoctor(Doctor doctor);
|
int updateDoctor(Doctor doctor);
|
||||||
|
|
||||||
|
List<DisgnosisResponse> disgnosisList();
|
||||||
|
|
||||||
|
Result addDisgnosis(Disgnosis disgnosis);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package com.grail.doctor.publice.service;
|
package com.grail.doctor.publice.service;
|
||||||
|
|
||||||
import com.grail.common.core.domain.Result;
|
import com.grail.common.core.domain.Result;
|
||||||
|
import com.grail.publice.domain.Disgnosis;
|
||||||
import com.grail.publice.domain.Doctor;
|
import com.grail.publice.domain.Doctor;
|
||||||
import com.grail.publice.domain.request.RequestDoctor;
|
import com.grail.publice.domain.request.RequestDoctor;
|
||||||
|
import com.grail.publice.domain.response.DisgnosisResponse;
|
||||||
import com.grail.publice.domain.response.ResponseDoctor;
|
import com.grail.publice.domain.response.ResponseDoctor;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -19,4 +21,8 @@ public interface DoctorService {
|
||||||
Result<ResponseDoctor> findDoctorById(Integer doctorId);
|
Result<ResponseDoctor> findDoctorById(Integer doctorId);
|
||||||
|
|
||||||
Result updateDoctor(Doctor doctor);
|
Result updateDoctor(Doctor doctor);
|
||||||
|
|
||||||
|
Result<List<DisgnosisResponse>> disgnosisList();
|
||||||
|
|
||||||
|
Result addDisgnosis(Disgnosis disgnosis);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,12 @@ package com.grail.doctor.publice.service.impl;
|
||||||
import com.grail.common.core.domain.Result;
|
import com.grail.common.core.domain.Result;
|
||||||
import com.grail.doctor.publice.mapper.DoctorMapper;
|
import com.grail.doctor.publice.mapper.DoctorMapper;
|
||||||
import com.grail.doctor.publice.service.DoctorService;
|
import com.grail.doctor.publice.service.DoctorService;
|
||||||
|
import com.grail.publice.domain.Disgnosis;
|
||||||
import com.grail.publice.domain.Doctor;
|
import com.grail.publice.domain.Doctor;
|
||||||
import com.grail.publice.domain.request.RequestDoctor;
|
import com.grail.publice.domain.request.RequestDoctor;
|
||||||
|
import com.grail.publice.domain.response.DisgnosisResponse;
|
||||||
import com.grail.publice.domain.response.ResponseDoctor;
|
import com.grail.publice.domain.response.ResponseDoctor;
|
||||||
|
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
@ -22,6 +25,8 @@ import java.util.List;
|
||||||
public class DoctorServiceimpl implements DoctorService {
|
public class DoctorServiceimpl implements DoctorService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private DoctorMapper doctorMapper;
|
private DoctorMapper doctorMapper;
|
||||||
|
@Autowired
|
||||||
|
private RabbitTemplate rabbitTemplate;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result<List<ResponseDoctor>> doctorList(RequestDoctor requestDoctor) {
|
public Result<List<ResponseDoctor>> doctorList(RequestDoctor requestDoctor) {
|
||||||
|
@ -39,4 +44,18 @@ public class DoctorServiceimpl implements DoctorService {
|
||||||
int i = doctorMapper.updateDoctor(doctor);
|
int i = doctorMapper.updateDoctor(doctor);
|
||||||
return i>0?Result.success(200,"信息完善成功"):Result.error(500,"系统异常");
|
return i>0?Result.success(200,"信息完善成功"):Result.error(500,"系统异常");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<List<DisgnosisResponse>> disgnosisList() {
|
||||||
|
List<DisgnosisResponse> list = doctorMapper.disgnosisList();
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result addDisgnosis(Disgnosis disgnosis) {
|
||||||
|
|
||||||
|
//添加诊断信息后 MQ发送消息到患者用户
|
||||||
|
|
||||||
|
return doctorMapper.addDisgnosis(disgnosis);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.grail.doctor.publice.mapper.CommentMapper">
|
<mapper namespace="com.grail.doctor.publice.mapper.CommentMapper">
|
||||||
<insert id="addComment">
|
<insert id="addComment">
|
||||||
INSERT INTO `all_healthcare`.`t_comment` (
|
INSERT INTO `t_interrogation`.`t_comment` (
|
||||||
`comment_id`,
|
`comment_id`,
|
||||||
`comment_content`,
|
`comment_content`,
|
||||||
`comment_time`,
|
`comment_time`,
|
||||||
|
|
|
@ -1,6 +1,26 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.grail.doctor.publice.mapper.DoctorMapper">
|
<mapper namespace="com.grail.doctor.publice.mapper.DoctorMapper">
|
||||||
|
<insert id="addDisgnosis">
|
||||||
|
INSERT INTO `t_interrogation`.`t_disgnosis` (
|
||||||
|
`diagnosis_id`,
|
||||||
|
`diagnosis_time`,
|
||||||
|
`diagnosis_result`,
|
||||||
|
`medicine_id`,
|
||||||
|
`user_id`,
|
||||||
|
`doctor_id`,
|
||||||
|
`diagnosis_hospital`,
|
||||||
|
`disgnosis_status`) VALUES (
|
||||||
|
#{disgnosisId},
|
||||||
|
#{disgnosisTime},
|
||||||
|
#{disgnosisResult},
|
||||||
|
#{medicineId},
|
||||||
|
#{userId},
|
||||||
|
#{doctorId},
|
||||||
|
#{diagnosisHospital},
|
||||||
|
#{disgnosisStatus});
|
||||||
|
|
||||||
|
</insert>
|
||||||
<update id="updateDoctor">
|
<update id="updateDoctor">
|
||||||
update t_doctor set
|
update t_doctor set
|
||||||
docker_name=#{dockerName},
|
docker_name=#{dockerName},
|
||||||
|
@ -19,7 +39,6 @@
|
||||||
<select id="doctorList" resultType="com.grail.publice.domain.response.ResponseDoctor">
|
<select id="doctorList" resultType="com.grail.publice.domain.response.ResponseDoctor">
|
||||||
select t_doctor.*,department_name from t_doctor left join
|
select t_doctor.*,department_name from t_doctor left join
|
||||||
t_department on t_doctor.department_id=t_department.department_id
|
t_department on t_doctor.department_id=t_department.department_id
|
||||||
<where>
|
|
||||||
<if test="sort == 1">
|
<if test="sort == 1">
|
||||||
order by doctor_id <if test="key==1"> desc </if>
|
order by doctor_id <if test="key==1"> desc </if>
|
||||||
<if test="key!=1"> asc </if>
|
<if test="key!=1"> asc </if>
|
||||||
|
@ -36,10 +55,15 @@
|
||||||
order by consultation_price <if test="key==1"> desc </if>
|
order by consultation_price <if test="key==1"> desc </if>
|
||||||
<if test="key!=1"> asc </if>
|
<if test="key!=1"> asc </if>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
|
||||||
</select>
|
</select>
|
||||||
<select id="findDoctorById" resultType="com.grail.publice.domain.response.ResponseDoctor">
|
<select id="findDoctorById" resultType="com.grail.publice.domain.response.ResponseDoctor">
|
||||||
select t_doctor.*,department_name from t_doctor left join
|
select t_doctor.*,department_name from t_doctor left join
|
||||||
t_department on t_doctor.department_id=t_department.department_id where doctor_id=#{doctorId}
|
t_department on t_doctor.department_id=t_department.department_id where doctor_id=#{doctorId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="disgnosisList" resultType="com.grail.publice.domain.response.DisgnosisResponse">
|
||||||
|
select t_disgnosis.*,medicine_name,medicine_function,medicine_dosage,user_name,doctor_name
|
||||||
|
from t_disgnosis left join t_medicine on t_disgnosis.medicine_id=t_medicine.medicine_id
|
||||||
|
left join t_user on t_disgnosis.user_id=t_user.user_id left join
|
||||||
|
t_doctor on t_disgnosis.doctor_id=t_doctor.doctor_id
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue