| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.supervision.medicalhealth.mapper.BdglConsumeArchivesMapper">
- <resultMap type="BdglConsumeArchives" id="BdglConsumeArchivesResult">
- <result property="id" column="id" />
- <result property="durgName" column="durg_name" />
- <result property="durgBrand" column="durg_brand" />
- <result property="manufacturer" column="manufacturer" />
- <result property="specifications" column="specifications" />
- <result property="productIntroduction" column="product_introduction" />
- <result property="storeHouse" column="store_house" />
- <result property="unitId" column="unit_id" />
- <result property="amount" column="amount" />
- <result property="putIn" column="put_in" />
- <result property="putOut" column="put_out" />
- <result property="overdue" column="overdue" />
- <result property="remarks" column="remarks" />
- <result property="adminId" column="admin_id" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="unitName" column="unit_name" />
- <result property="userName" column="user_name" />
- <result property="barCode" column="bar_code" />
- </resultMap>
- <sql id="selectBdglConsumeArchivesVo">
- select id, durg_name, durg_brand, manufacturer, specifications, product_introduction, store_house, unit_id, amount, put_in, put_out, overdue, remarks, admin_id, create_time, update_time, unit_name, user_name,bar_code from bdgl_consume_archives
- </sql>
- <select id="selectBdglConsumeArchivesList" parameterType="BdglConsumeArchives" resultMap="BdglConsumeArchivesResult">
- <include refid="selectBdglConsumeArchivesVo"/>
- <where>
- <if test="durgName != null and durgName != ''"> and durg_name like concat('%', #{durgName}, '%')</if>
- <if test="durgBrand != null and durgBrand != ''"> and durg_brand = #{durgBrand}</if>
- <if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
- <if test="specifications != null and specifications != ''"> and specifications = #{specifications}</if>
- <if test="productIntroduction != null and productIntroduction != ''"> and product_introduction = #{productIntroduction}</if>
- <if test="storeHouse != null "> and store_house = #{storeHouse}</if>
- <if test="unitId != null "> and unit_id = #{unitId}</if>
- <if test="amount != null "> and amount = #{amount}</if>
- <if test="putIn != null "> and put_in = #{putIn}</if>
- <if test="putOut != null "> and put_out = #{putOut}</if>
- <if test="overdue != null "> and overdue = #{overdue}</if>
- <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
- <if test="adminId != null "> and admin_id = #{adminId}</if>
- <if test="barCode != null "> and bar_code = #{barCode}</if>
- <if test="unitName != null and unitName != ''"> and unit_name like concat('%', #{unitName}, '%')</if>
- <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
- </where>
- </select>
- <select id="selectBdglConsumeArchivesById" parameterType="Long" resultMap="BdglConsumeArchivesResult">
- <include refid="selectBdglConsumeArchivesVo"/>
- where id = #{id}
- </select>
- <select id="selectBdglConsumeArchivesbynumber" parameterType="BdglConsumeArchives" resultMap="BdglConsumeArchivesResult">
- <include refid="selectBdglConsumeArchivesVo"/>
- where bar_code = #{barCode}
- </select>
- <insert id="insertBdglConsumeArchives" parameterType="BdglConsumeArchives" useGeneratedKeys="true" keyProperty="id">
- insert into bdgl_consume_archives
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="durgName != null">durg_name,</if>
- <if test="durgBrand != null">durg_brand,</if>
- <if test="manufacturer != null">manufacturer,</if>
- <if test="specifications != null">specifications,</if>
- <if test="productIntroduction != null">product_introduction,</if>
- <if test="storeHouse != null">store_house,</if>
- <if test="unitId != null">unit_id,</if>
- <if test="amount != null">amount,</if>
- <if test="putIn != null">put_in,</if>
- <if test="putOut != null">put_out,</if>
- <if test="overdue != null">overdue,</if>
- <if test="remarks != null">remarks,</if>
- <if test="adminId != null">admin_id,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="unitName != null">unit_name,</if>
- <if test="userName != null">user_name,</if>
- <if test="barCode != null">bar_code,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="durgName != null">#{durgName},</if>
- <if test="durgBrand != null">#{durgBrand},</if>
- <if test="manufacturer != null">#{manufacturer},</if>
- <if test="specifications != null">#{specifications},</if>
- <if test="productIntroduction != null">#{productIntroduction},</if>
- <if test="storeHouse != null">#{storeHouse},</if>
- <if test="unitId != null">#{unitId},</if>
- <if test="amount != null">#{amount},</if>
- <if test="putIn != null">#{putIn},</if>
- <if test="putOut != null">#{putOut},</if>
- <if test="overdue != null">#{overdue},</if>
- <if test="remarks != null">#{remarks},</if>
- <if test="adminId != null">#{adminId},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="unitName != null">#{unitName},</if>
- <if test="userName != null">#{userName},</if>
- <if test="barCode != null">#{barCode},</if>
- </trim>
- </insert>
- <update id="updateBdglConsumeArchives" parameterType="BdglConsumeArchives">
- update bdgl_consume_archives
- <trim prefix="SET" suffixOverrides=",">
- <if test="durgName != null">durg_name = #{durgName},</if>
- <if test="durgBrand != null">durg_brand = #{durgBrand},</if>
- <if test="manufacturer != null">manufacturer = #{manufacturer},</if>
- <if test="specifications != null">specifications = #{specifications},</if>
- <if test="productIntroduction != null">product_introduction = #{productIntroduction},</if>
- <if test="storeHouse != null">store_house = #{storeHouse},</if>
- <if test="unitId != null">unit_id = #{unitId},</if>
- <if test="amount != null">amount = #{amount},</if>
- <if test="putIn != null">put_in = #{putIn},</if>
- <if test="putOut != null">put_out = #{putOut},</if>
- <if test="overdue != null">overdue = #{overdue},</if>
- <if test="remarks != null">remarks = #{remarks},</if>
- <if test="adminId != null">admin_id = #{adminId},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="unitName != null">unit_name = #{unitName},</if>
- <if test="userName != null">user_name = #{userName},</if>
- <if test="barCode != null">bar_code=#{barCode},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteBdglConsumeArchivesById" parameterType="Long">
- delete from bdgl_consume_archives where id = #{id}
- </delete>
- <delete id="deleteBdglConsumeArchivesByIds" parameterType="String">
- delete from bdgl_consume_archives where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|