| | |
| | | <result property="reserve" column="reserve"></result> |
| | | <result property="updateTime" column="update_time"></result> |
| | | <result property="warehouseId" column="warehouseId"></result> |
| | | <result property="containerId" column="container_id"></result> |
| | | <result property="warehouseName" column="warehouseName"></result> |
| | | <result property="validFlag" column="valid_flag" typeHandler="com.nanometer.smartlab.entity.handler.ValidFlagHandler"></result> |
| | | |
| | |
| | | </select> |
| | | |
| | | <insert id="insertOpeWarehouseReserve" parameterType="com.nanometer.smartlab.entity.OpeWarehouseReserve"> |
| | | insert into ope_warehouse_reserve(id, reagent_id, article_number, reserve, valid_flag, update_time,warehouseId) |
| | | values (#{id}, #{reagentId}, #{articleNumber}, #{reserve}, 1, now(),#{warehouseId}) |
| | | insert into ope_warehouse_reserve(id, reagent_id, article_number, reserve, valid_flag, update_time,warehouseId,container_id) |
| | | values (#{id}, #{reagentId}, #{articleNumber}, #{reserve}, 1, now(),#{warehouseId},#{containerId}) |
| | | </insert> |
| | | <insert id="insertOpeWarehouseReserve2" parameterType="com.nanometer.smartlab.entity.OpeWarehouseReserve"> |
| | | insert into ope_warehouse_reserve(id, reagent_id, article_number, reserve, valid_flag, update_time,warehouseId,apply_code,order_code) |
| | | values (#{id}, #{reagentId}, #{articleNumber}, #{reserve}, 1, now(),#{warehouseId},#{applyCode},#{orderCode}) |
| | | insert into ope_warehouse_reserve(id, reagent_id, article_number, reserve, valid_flag, update_time,warehouseId,apply_code,order_code,container_id) |
| | | values (#{id}, #{reagentId}, #{articleNumber}, #{reserve}, 1, now(),#{warehouseId},#{applyCode},#{orderCode},#{containerId}) |
| | | </insert> |
| | | |
| | | <update id="updateOpeWarehouseReserve" parameterType="com.nanometer.smartlab.entity.OpeWarehouseReserve"> |
| | |
| | | <if test="warehouseId != null and warehouseId !=''"> |
| | | warehouseId=#{warehouseId}, |
| | | </if> |
| | | <if test="containerId != null and containerId !=''"> |
| | | container_id=#{containerId}, |
| | | </if> |
| | | </set> |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <update id="updateOpeWarehouseReserve2" parameterType="com.nanometer.smartlab.entity.OpeWarehouseReserve"> |
| | | update ope_warehouse_reserve |
| | | set reserve=#{reserve} |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | |
| | | <select id="selectByReId" resultMap="OpeWarehouseReserve"> |
| | | select * from ope_warehouse_reserve where reagent_id=#{id} |
| | |
| | | owr.warehouseId, |
| | | sw.NAME warehouseName, |
| | | owr.reserve, |
| | | owr.article_number |
| | | owr.article_number, |
| | | owr.container_id, |
| | | owr.update_time |
| | | FROM |
| | | ope_warehouse_reserve owr |
| | | LEFT JOIN sys_warehouse sw ON sw.id = owr.warehouseId |