查询省级区域信息信息/根据父级区域编码查询下级区域/优化问诊信息接口

This commit is contained in:
HaoWang 2023-10-10 09:09:54 +08:00
parent 8fe8dc82ab
commit c1e79c2ba6
7 changed files with 84 additions and 8 deletions

View File

@ -116,4 +116,30 @@ public class AppletLoginController extends BaseController {
} }
return appletLoginService.existPatientInfo(openId); return appletLoginService.existPatientInfo(openId);
} }
/**
* 查询省级区域信息信息小程序app修改用户地址信息查询
*
* @return 省级区域信息集合
*/
@GetMapping("/getProvinceInfo")
public AjaxResult getProvinceAreaInfo() {
return appletLoginService.getProvinceAreaInfo();
}
/**
* 根据父级区域编码查询下级区域小程序app修改用户地址信息查询
*
* @param areaCode 父级区域编码
* @return 所属下级区域信息集合
*/
@GetMapping("/getSubordinateInfo")
public AjaxResult getSubordinateAreaInfo(String areaCode) {
if (StringUtils.isBlank(areaCode)) {
return AjaxResult.error("上级区域编码不能为空");
}
return appletLoginService.getSubordinateAreaInfo(areaCode);
}
} }

View File

@ -42,6 +42,7 @@ public class ChatRecordDTO extends BaseEntity implements Serializable {
/** /**
* 发送时间时间格式yyyy-MM-dd HH:mm:ss * 发送时间时间格式yyyy-MM-dd HH:mm:ss
*/ */
@NotNull(message = "接收时间不能为空", groups = {Insert.class})
private Date sendTime; private Date sendTime;
/** /**

View File

@ -128,6 +128,10 @@ public class ConsultationInfoDTO extends BaseEntity implements Serializable {
@Length(max = 100, message = "病历不能超过100位", groups = {Insert.class, Update.class}) @Length(max = 100, message = "病历不能超过100位", groups = {Insert.class, Update.class})
private String medicalRecord; private String medicalRecord;
/**
* 状态
*/
private Integer status;
/** /**
* 问诊资料文件 * 问诊资料文件

View File

@ -52,4 +52,19 @@ public interface AppletLoginService {
* @return 护理人列表集合 * @return 护理人列表集合
*/ */
AjaxResult existPatientInfo(String openId); AjaxResult existPatientInfo(String openId);
/**
* 查询省级区域信息信息
*
* @return 省级区域信息集合
*/
AjaxResult getProvinceAreaInfo();
/**
* 根据父区域编码查询其下属区域信息
*
* @param areaCode 父级区域编码
* @return 下属区域信息集合
*/
AjaxResult getSubordinateAreaInfo(String areaCode);
} }

View File

@ -26,10 +26,12 @@ import com.xinelu.manage.domain.appointmentorder.AppointmentOrder;
import com.xinelu.manage.domain.appointmentorderdetails.AppointmentOrderDetails; import com.xinelu.manage.domain.appointmentorderdetails.AppointmentOrderDetails;
import com.xinelu.manage.domain.appointmentorderprocessrecord.AppointmentOrderProcessRecord; import com.xinelu.manage.domain.appointmentorderprocessrecord.AppointmentOrderProcessRecord;
import com.xinelu.manage.domain.patientinfo.PatientInfo; import com.xinelu.manage.domain.patientinfo.PatientInfo;
import com.xinelu.manage.domain.sysarea.SysArea;
import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper; import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper;
import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper; import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper;
import com.xinelu.manage.mapper.appointmentorderprocessrecord.AppointmentOrderProcessRecordMapper; import com.xinelu.manage.mapper.appointmentorderprocessrecord.AppointmentOrderProcessRecordMapper;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
import com.xinelu.manage.mapper.sysarea.SysAreaMapper;
import com.xinelu.manage.vo.patientinfo.PatientInfoVO; import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
@ -88,6 +90,9 @@ public class AppletLoginServiceImpl implements AppletLoginService {
*/ */
private static final String OK = "ok"; private static final String OK = "ok";
@Resource
private SysAreaMapper sysAreaMapper;
/** /**
* 提前预约时间半天标识 * 提前预约时间半天标识
*/ */
@ -308,6 +313,31 @@ public class AppletLoginServiceImpl implements AppletLoginService {
return AjaxResult.success("NOT_LOGIN"); return AjaxResult.success("NOT_LOGIN");
} }
/**
* 查询省级区域信息信息
*
* @return 省级区域信息集合
*/
@Override
public AjaxResult getProvinceAreaInfo() {
SysArea area = new SysArea();
area.setAreaLevel(1);
area.setRemoteSigns(0);
return AjaxResult.success(sysAreaMapper.selectSysAreaList(area));
}
/**
* 根据父级区域编码查询其下属区域信息
*
* @param areaCode 父级区域编码
* @return 下属区域信息集合
*/
@Override
public AjaxResult getSubordinateAreaInfo(String areaCode) {
//查询出下级区域集合
return AjaxResult.success(sysAreaMapper.getCityInfoList(areaCode, RemoteSignsEnum.REMOTE.getInfo()));
}
/** /**
* 校验预约服务时间 * 校验预约服务时间
* *

View File

@ -68,17 +68,17 @@
ci.doctor_id, ci.doctor_id,
ci.doctor_name, ci.doctor_name,
ci.problem_description, ci.problem_description,
COUNT(cr.id) as messageCount ci.create_time,
FROM (SELECT COUNT(cr.id) FROM chat_record cr WHERE cr.consultation_id = ci.id AND read_status = '0'
consultation_info ci
LEFT JOIN chat_record cr ON cr.consultation_id=ci.id AND read_status='0'
<if test="patientId != null "> <if test="patientId != null ">
and sender_id= ci.doctor_id and sender_id= ci.doctor_id
</if> </if>
<if test="doctorId != null "> <if test="doctorId != null ">
and sender_id= ci.patient_id and sender_id= ci.patient_id
</if> </if>
) AS messageCount
FROM
consultation_info ci
<where> <where>
<if test="patientId != null "> <if test="patientId != null ">
and ci.patient_id = #{patientId} and ci.patient_id = #{patientId}
@ -143,7 +143,7 @@
SELECT file_url FROM consultation_file WHERE del_flag='0' AND consultation_id=#{id} SELECT file_url FROM consultation_file WHERE del_flag='0' AND consultation_id=#{id}
</select> </select>
<insert id="insertConsultationInfo" parameterType="ConsultationInfo"> <insert id="insertConsultationInfo" parameterType="ConsultationInfo" useGeneratedKeys="true" keyProperty="id">
insert into consultation_info insert into consultation_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id, <if test="id != null">id,
@ -246,7 +246,7 @@
<insert id="insertConsultationFile"> <insert id="insertConsultationFile">
insert into consultation_file(consultation_id, file_url) values insert into consultation_file(consultation_id, file_url) values
<foreach item="item" index="index" collection="fileUrls" separator=","> <foreach item="item" index="index" collection="fileUrls" separator=",">
(#{consultationId},#{item.fileUrl}) (#{consultationId},#{item})
</foreach> </foreach>
</insert> </insert>

View File

@ -22,7 +22,7 @@ import java.util.Date;
* @date 2023-09-25 * @date 2023-09-25
*/ */
@Data @Data
public class ConsultationInfoVO implements Serializable { public class ConsultationInfoVO extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**