package thyyxxk.webserver.dao.his.chronicDisease; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import thyyxxk.webserver.entity.chronicDisease.CrmPatientMi; public interface CrmPatientMiDao extends BaseMapper { @Select(" select top 1 mi.*, tz.height, tz.weight, tz.temperature, tz.respiratory_rate, tz.heart_rate, " + " tz.blood_sugar, tz.blood_pressure_high, tz.blood_pressure_low, tz.blood_oxygen, rtrim(p.name) as referPhysicianName " + " from crm_patient_mi mi" + " left join crm_patient_tzxx tz on (mi.p_id = tz.p_id collate Chinese_PRC_BIN) and mi.visit_times = tz.visit_times " + " left join a_employee_mi p on mi.refer_physician = p.code collate Chinese_PRC_BIN " + " where mi.social_no = #{keyCode} or mi.his_mz_no = #{keyCode} or mi.his_zy_no = #{keyCode} or mi.his_tj_no = #{keyCode}" + " or mi.p_name = #{keyCode} or mi.p_id = #{keyCode} ") CrmPatientMi selectCrmPatientMiByCode(@Param("keyCode") String keyCode); @Select(" select * from crm_patient_mi where social_no = #{socialNo} ") CrmPatientMi selectCrmPatientMiBySocialNo(@Param("socialNo") String socialNo); @Select(" select * from crm_patient_mi where p_id = #{pId} ") CrmPatientMi selectCrmPatientMiByPId(@Param("pId") String pId); @Delete(" delete from crm_patient_mi where social_no = #{socialNo} ") void deleteCrmPatientMiBySocialNo(@Param("socialNo") String socialNo); @Delete(" delete from crm_patient_mi where p_id = #{pId} ") void deleteCrmPatientMiByPId(@Param("pId") String pId); }