39 lines
2.1 KiB
XML
Raw Normal View History

2020-11-19 15:15:23 +08:00
<?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.ruoyi.system.fantang.mapper.FtPatientDaoMapper">
2020-12-29 18:41:11 +08:00
2020-11-19 15:15:23 +08:00
<resultMap type="FtPatientDao" id="FtPatientDaoResult">
<result property="patientId" column="patient_id" />
<result property="name" column="name" />
<result property="departId" column="depart_id" />
<result property="bedId" column="bed_id" />
2020-11-24 17:56:12 +08:00
<result property="hospitalId" column="hospital_id" />
<result property="syncFlag" column="sync_flag" />
<result property="offFlag" column="off_flag" />
<result property="createAt" column="create_at" />
2020-11-19 15:15:23 +08:00
</resultMap>
2020-12-29 18:41:11 +08:00
<select id="getReportMealsToday" resultMap="patientReportMealsList">
SELECT a.patient_id, a.`name`, b.depart_name, a.bed_id, a.hospital_id, c.create_at, c.foods, c.id, c.nutrition_food_id, c.type from ft_patient a
LEFT JOIN ft_depart b on a.depart_id = b.depart_id
RIGHT JOIN ft_report_meals c on a.patient_id = c.patient_id
WHERE a.patient_id = #{patientId} and c.create_at = #{createAt}
</select>
<resultMap id="patientReportMealsList" type="com.ruoyi.system.fantang.vo.FtPatientVo">
2020-12-29 22:08:22 +08:00
<result property="patientId" column="patient_id"></result>
<result property="name" column="name"></result>
<result property="departName" column="depart_name"></result>
<result property="bedId" column="bed_id"></result>
<result property="hospitalId" column="hospital_id"></result>
2020-12-29 18:41:11 +08:00
<collection property="reportMealsList" ofType="com.ruoyi.system.fantang.domain.FtReportMealsDao">
<result property="id" column="id"></result>
<result property="createAt" column="create_at"></result>
<result property="type" column="type"></result>
<result property="foods" column="foods"></result>
<result property="nutritionFoodId" column="nutrition_food_id"></result>
</collection>
</resultMap>
2020-11-19 15:15:23 +08:00
</mapper>