| | |
| | | <result property="containerId" column="container_id"></result> |
| | | </resultMap> |
| | | |
| | | <insert id="insertOpeLaboratoryReserve" parameterType="com.nanometer.smartlab.entity.OpeLaboratoryReserve"> |
| | | insert into ope_laboratory_reserve(id, reagent_id, article_number,reserve, valid_flag, update_time,user_id,house_id,container_id) |
| | | values (#{id},#{reagentId},#{articleNumber},#{reserve},#{validFlag},now(),#{userId},#{houseId},#{containerId}) |
| | | <insert id="insertOpeLaboratoryReserve" parameterType="com.nanometer.smartlab.entity.OpeLaboratoryReserve" useGeneratedKeys = "true" keyProperty = "id"> |
| | | insert into ope_laboratory_reserve( reagent_id, article_number,reserve, valid_flag, update_time,user_id,house_id,container_id) |
| | | values (#{reagentId},#{articleNumber},#{reserve},#{validFlag},now(),#{userId},#{houseId},#{containerId}) |
| | | </insert> |
| | | |
| | | <insert id="batchInsert"> |
| | | insert into ope_laboratory_reserve( reagent_id, article_number,reserve, valid_flag, user_id,house_id,container_id) |
| | | values |
| | | <foreach collection="list" item="item" separator=","> |
| | | (#{item.reagentId},#{item.articleNumber},#{item.reserve},#{item.validFlag},#{item.userId},#{item.houseId},#{item.containerId}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <select id="selectByReId" resultMap="OpeLaboratoryReserve"> |
| | | select * from ope_laboratory_reserve where reagent_id=#{id} |
| | | </select> |
| | |
| | | <update id="updateByReId" parameterType="java.util.Map"> |
| | | update ope_laboratory_reserve set reagent_id=#{newReId} where reagent_id=#{oldReId} |
| | | </update> |
| | | |
| | | |
| | | <update id="updateByReagent"> |
| | | update ope_laboratory_reserve |
| | | set valid_flag = 0 |
| | | where reagent_id=#{reagentId} |
| | | and house_id = #{houseId} |
| | | and container_id = #{containerId} |
| | | and user_id = #{userId} |
| | | and valid_flag = 1 |
| | | </update> |
| | | </mapper> |