李宇
2021-01-22 b333f50f15173827abf7096c2c782cb1dc190f47
src/main/java/com/nanometer/smartlab/dao/OpeWarehouseReserveDao.xml
@@ -29,7 +29,8 @@
       <result property="updateTime" column="update_time"></result>
       <result property="supplierName" column="supplierName"></result>
       <result property="productHome" column="product_home"></result>
          <result property="productHomeName" column="productHomeName"></result>
        <result property="productHomeName" column="productHomeName"></result>
        <result property="productSn" column="product_sn"/>
    </association>
  </resultMap>
@@ -49,9 +50,12 @@
    <if test="reagentName != null and reagentName != ''">
      and sr.name like concat('%',#{reagentName},'%')
    </if>
      <if test="warehouseId != null and warehouseId != ''">
          and oa.warehouseId=#{warehouseId}
      </if>
    <if test="warehouseId != null and warehouseId != ''">
        and oa.warehouseId=#{warehouseId}
    </if>
    <if test="productSn != null and productSn != ''">
        and sr.product_sn like concat('%',#{productSn},'%')
    </if>
  </sql>
  <sql id="queryColumns">
@@ -107,7 +111,18 @@
    </insert>
    <update id="updateOpeWarehouseReserve" parameterType="com.nanometer.smartlab.entity.OpeWarehouseReserve">
        update ope_warehouse_reserve set reagent_id=#{reagentId},warehouseId=#{warehouseId}, article_number=#{articleNumber}, reserve=#{reserve}, update_time=now()
        update ope_warehouse_reserve
        <set>
            reagent_id=#{reagentId},
            reserve=#{reserve},
            update_time=now(),
            <if test="articleNumber != null and articleNumber !=''">
                article_number=#{articleNumber},
            </if>
            <if test="warehouseId != null and warehouseId !=''">
                warehouseId=#{warehouseId},
            </if>
        </set>
        where id=#{id}
    </update>