|
@@ -33,8 +33,8 @@ public interface PhysicalExamReportMapper {
|
|
|
/**
|
|
|
* 新增体检报告
|
|
|
*/
|
|
|
- @Insert("INSERT INTO fs_physical_exam_report(user_id, exam_date, height, weight, bmi, waist_circumference, " +
|
|
|
- "chest_circumference, report_status) VALUES(#{userId}, #{examDate}, #{height}, #{weight}, #{bmi}, " +
|
|
|
+ @Insert("INSERT INTO fs_physical_exam_report(user_id, company_user_id, exam_date, height, weight, bmi, waist_circumference, " +
|
|
|
+ "chest_circumference, report_status) VALUES(#{userId}, #{companyUserId}, #{examDate}, #{height}, #{weight}, #{bmi}, " +
|
|
|
"#{waistCircumference}, #{chestCircumference}, #{reportStatus})")
|
|
|
@Options(useGeneratedKeys = true, keyProperty = "reportId")
|
|
|
int insert(PhysicalExamReport report);
|
|
@@ -45,6 +45,7 @@ public interface PhysicalExamReportMapper {
|
|
|
@Update("<script>" +
|
|
|
"UPDATE fs_physical_exam_report SET " +
|
|
|
"<if test='userId != null'>user_id = #{userId}, </if>" +
|
|
|
+ "<if test='companyUserId != null'>company_user_id = #{companyUserId}, </if>" +
|
|
|
"<if test='examDate != null'>exam_date = #{examDate}, </if>" +
|
|
|
"<if test='height != null'>height = #{height}, </if>" +
|
|
|
"<if test='weight != null'>weight = #{weight}, </if>" +
|
|
@@ -72,6 +73,9 @@ public interface PhysicalExamReportMapper {
|
|
|
"<if test='userId != null'>" +
|
|
|
"AND user_id = #{userId} " +
|
|
|
"</if>" +
|
|
|
+ "<if test='companyUserId != null'>" +
|
|
|
+ "AND company_user_id = #{companyUserId} " +
|
|
|
+ "</if>" +
|
|
|
"<if test='examDateStart != null'>" +
|
|
|
"AND exam_date <![CDATA[>=]]> #{examDateStart} " +
|
|
|
"</if>" +
|