Explorar o código

通过楼栋id查询实验室信息,增加楼栋名称

hanzhiwei hai 1 ano
pai
achega
054bb49f0f

+ 2 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/LabSubject.java

@@ -108,7 +108,8 @@ public class LabSubject extends BaseEntity implements QCInterface {
     @ApiModelProperty("楼栋ID")
     private Long buildId;
 
-
+    @ApiModelProperty("楼栋名称")
+    private String buildName;
     @ApiModelProperty("布局ID")
     private Long layoutId;
 

+ 2 - 1
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabSubjectMapper.xml

@@ -1451,8 +1451,9 @@
      </select>
     <select id="buildBySub" resultType="com.zd.laboratory.domain.LabSubject">
 
-        select s.id,s.name,s.dept_id deptId,dt.`dept_name` deptName,s.build_id buildId,s.room from lab_subject s
+        select s.id,s.name,s.dept_id deptId,dt.`dept_name` deptName,s.build_id buildId,lbf.name buildName, s.room from lab_subject s
         INNER JOIN sys_dept dt ON s.`dept_id` = dt.dept_id
+        INNER JOIN lab_build_floor lbf ON s.build_id = lbf.id
         <where>
             <if test="buildId != null ">and s.build_id = #{buildId}</if>
             <if test="searchValue != null and searchValue !=''">