省口腔同步逻辑修改
parent
7401fe1bee
commit
409dc0aa7b
@ -0,0 +1,46 @@
|
||||
package com.medical.record.dao;
|
||||
|
||||
import com.medical.record.entity.CommomTableVo;
|
||||
import com.medical.record.entity.TscanAssort;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName CommomTableMapper
|
||||
* @Description 患者基础数据
|
||||
* @Author linjj
|
||||
* @Date 2026/2/4 15:16
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface CommomTableMapper {
|
||||
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 查询患者基础数量
|
||||
* @DateTime: 2026/2/4 15:18
|
||||
* @Return Integer
|
||||
*/
|
||||
Integer getNum();
|
||||
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 查询患者基础信息
|
||||
* @DateTime: 2026/2/4 15:38
|
||||
* @Params: [offset, limit]
|
||||
* @Return java.util.List<com.medical.record.entity.CommomTableVo>
|
||||
*/
|
||||
List<CommomTableVo> getPatientList(@Param("offset") int offset, @Param("limit") int limit);
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 查询患者图像信息
|
||||
* @DateTime: 2026/2/4 15:39
|
||||
* @Params: [PatientId]
|
||||
* @Return java.util.List<com.medical.record.entity.TscanAssort>
|
||||
*/
|
||||
List<TscanAssort> getTscanAssort(String PatientId);
|
||||
|
||||
boolean updateStaicByPatientId(@Param("PatientId") String PatientId,@Param("flag") String flag);
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.medical.record.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName commomtable
|
||||
* @Description 患者基础数据
|
||||
* @Author linjj
|
||||
* @Date 2026/2/4 15:03
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("commontable")
|
||||
public class CommomTableVo {
|
||||
|
||||
//流水号
|
||||
private String patientId;
|
||||
//住院号
|
||||
private String inpatientNo;
|
||||
//患者姓名
|
||||
private String name;
|
||||
//住院次数
|
||||
private Integer admissTimes;
|
||||
//出院时间
|
||||
private Date disDate;
|
||||
//入院时间
|
||||
private Date admissDate;
|
||||
//路径
|
||||
private String filePath;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.medical.record.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName TscanAssort
|
||||
* @Description 文件信息
|
||||
* @Author linjj
|
||||
* @Date 2026/2/4 15:37
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class TscanAssort {
|
||||
|
||||
//文件名称
|
||||
private String scanPage;
|
||||
//分段id
|
||||
private String assortId;
|
||||
//分段名称
|
||||
private String assortName;
|
||||
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
<?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">
|
||||
<mapper namespace="com.medical.record.dao.CommomTableMapper">
|
||||
<update id="updateStaicByPatientId">
|
||||
UPDATE commomtable set static=#{flag} WHERE patient_id=#{PatientId}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="getNum" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM commomtable WHERE static='0'
|
||||
</select>
|
||||
<select id="getPatientList" resultType="com.medical.record.entity.CommomTableVo">
|
||||
SELECT * FROM (
|
||||
SELECT *, ROW_NUMBER() OVER (ORDER BY patient_id) as row_num
|
||||
FROM commomtable
|
||||
WHERE static = '0'
|
||||
) t
|
||||
WHERE t.row_num BETWEEN (#{offset} + 1) AND (#{offset} + #{limit})
|
||||
</select>
|
||||
<select id="getTscanAssort" resultType="com.medical.record.entity.TscanAssort">
|
||||
SELECT
|
||||
t.scan_page,z.assort_id,z.assort_name
|
||||
FROM
|
||||
t_scan_assort t
|
||||
LEFT JOIN zd_assort z ON z.assort_id=t.assort_id
|
||||
WHERE
|
||||
patient_id = #{patientId}
|
||||
ORDER BY assort_sort
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue