kongzy
2023-11-01 dd8795a2675e32b25abe98f644f80d5f72fadb90
src/main/java/com/nanometer/smartlab/dao/OpeReagentStatusDao.xml
@@ -42,6 +42,7 @@
       <result property="supplierName" column="supplierName"></result>
        <result property="deadline" column="deadline"></result>
        <result property="productHome" column="product_home"></result>
        <result property="density" column="density"></result>
    </association>
  </resultMap>
@@ -145,11 +146,11 @@
       <if test="status != null">
          <choose>
             <when test="status == 1">
                 left join sys_warehouse as sw on sw.id = oa.house_id
               left join sys_warehouse as sw on sw.id = oa.house_id
                 left join sys_warehouse_container as swc on swc.id = oa.container_id
             </when>
             <when test="status == 2">
                 left join sys_laboratory as sw on sw.id = oa.house_id
               left join sys_laboratory as sw on sw.id = oa.house_id
                 left join sys_laboratory_container as swc on swc.id = oa.container_id
             </when>
          </choose>
@@ -176,6 +177,7 @@
    <select id="getOpeReagentStatusInfoList" parameterType="java.util.Map"  resultMap="OpeReagentStatus">
      select s.id ,name,cas, deadline,reagent_code,bm3.meta_value reagent_format,r.main_metering,bm1.meta_value reagent_type,bm2.meta_value product_home,
      bm4.meta_value reagent_unit,
      r.density,
      s.article_number
      from ope_reagent_status s
      left join sys_reagent r on r.id = s.reagent_id
@@ -204,6 +206,35 @@
      limit #{first}, #{pageSize}
    </if>
  </select>
    <select id="getOpeReagentStatusList22" parameterType="java.util.Map" resultMap="OpeReagentStatus">
        <include refid="queryColumns"/>
        from ope_reagent_status as oa
        left join sys_reagent sr on oa.reagent_id = sr.id
        left join sys_supplier as ss on sr.supplier_id = ss.id
        left join sys_user as su on oa.user_id = su.id
        <if test="status != null">
            <choose>
                <when test="status == 1">
                    inner join sys_warehouse as sw on sw.id = oa.house_id
                    left join sys_warehouse_container as swc on swc.id = oa.container_id
                </when>
                <when test="status == 2">
                    inner join sys_laboratory as sw on sw.id = oa.house_id
                    left join sys_laboratory_container as swc on swc.id = oa.container_id
                </when>
            </choose>
        </if>
        where oa.valid_flag = 1
        <include refid="queryWhereSql"/>
        order by oa.reagent_code asc
        <if test="first != null and pageSize != null">
            limit #{first}, #{pageSize}
        </if>
    </select>
   <select id="getOpeReagentStatusListForLab" parameterType="java.util.Map" resultMap="OpeReagentStatus">
      select oa.*,
@@ -270,6 +301,9 @@
         <when test="status == 2 and project != null and project != ''">
            and sw.project like concat("%",#{project},"%")
         </when>
            <when test="status == 2 and labName != null and labName != ''">
                and sw.name like concat("%",#{labName},"%")
            </when>
      </choose>
      order by oa.reagent_code asc
      <if test="first != null and pageSize != null">
@@ -360,6 +394,9 @@
         <when test="status == 2 and project != null and project != ''">
            and sw.project like concat("%",#{project},"%")
         </when>
            <when test="status == 2 and labName != null and labName != ''">
                and sw.name like concat("%",#{labName},"%")
            </when>
      </choose>
   </select>
@@ -627,7 +664,18 @@
         <when test="status == 2 and project != null and project != ''">
            and sw.project like concat("%",#{project},"%")
         </when>
            <when test="status == 2 and labName != null and labName != ''">
                and sw.name like concat("%",#{labName},"%")
            </when>
      </choose>
      order by oa.reagent_code asc
   </select>
    <select id="getStatus" resultMap="OpeReagentStatus">
        select *
        from ope_reagent_status
        where valid_flag = 1
        and reagent_code = #{reagentCode}
        and reagent_id = #{reagentId}
   </select>
</mapper>