gdg
2021-01-29 31ffbaf322685984516cfb284fa58741debf4e96
src/main/java/com/nanometer/smartlab/dao/OpeWarehouseReserveDao.xml
@@ -57,6 +57,9 @@
    <if test="productSn != null and productSn != ''">
        and sr.product_sn like concat('%',#{productSn},'%')
    </if>
      <if test="warehouseName != null and warehouseName != ''">
          and sw.name like concat('%',#{warehouseName},'%')
      </if>
  </sql>
  <sql id="queryColumns">
@@ -112,8 +115,21 @@
    </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(),
        container_id=#{containerId}
        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>
            <if test="containerId != null and containerId !=''">
                container_id=#{containerId},
            </if>
        </set>
        where id=#{id}
    </update>