Parcourir la source

feat: 销售id

xdd il y a 2 semaines
Parent
commit
d93c245838

+ 1 - 0
fs-service/src/main/java/com/fs/medical/domain/PhysicalExamReport.java

@@ -26,6 +26,7 @@ public class PhysicalExamReport {
      * 用户ID
      */
     private Long userId;
+    private Long companyUserId;
 
     /**
      * 体检日期

+ 6 - 2
fs-service/src/main/java/com/fs/medical/mapper/PhysicalExamReportMapper.java

@@ -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>" +

+ 4 - 1
fs-service/src/main/java/com/fs/medical/param/PhysicalExamReportQueryDto.java

@@ -20,6 +20,9 @@ public class PhysicalExamReportQueryDto implements Serializable {
     @ApiModelProperty(value = "用户ID")
     private Long userId;
 
+    private Long companyUserId;
+
+
     @ApiModelProperty(value = "体检日期开始")
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     private Date examDateStart;
@@ -69,4 +72,4 @@ public class PhysicalExamReportQueryDto implements Serializable {
 
     @ApiModelProperty(value = "排序字段")
     private String orderBy;
-}
+}