修复一对多bug

This commit is contained in:
28353131@qq.com 2020-12-29 22:08:22 +08:00
parent 1a6837f49e
commit d5195dfe9e
3 changed files with 10 additions and 1 deletions

View File

@ -28,6 +28,6 @@ public class ClientPatientController extends BaseController {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String createAt = sdf.format(new Date());
return AjaxResult.success(iFtPatientDaoService.getReportMealsToday("2020-12-29", patientId));
return AjaxResult.success(iFtPatientDaoService.getReportMealsToday(createAt, patientId));
}
}

View File

@ -1,5 +1,6 @@
package com.ruoyi.system.fantang.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -43,6 +44,9 @@ private static final long serialVersionUID=1L;
/** 所属部门id */
private Long departId;
@TableField(exist = false)
private String departName;
/** 床号 */
@Excel(name = "床号")
private String bedId;

View File

@ -21,6 +21,11 @@ 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">
<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>
<collection property="reportMealsList" ofType="com.ruoyi.system.fantang.domain.FtReportMealsDao">
<result property="id" column="id"></result>
<result property="createAt" column="create_at"></result>