|
|
|
@ -7,7 +7,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<resultMap type="WxInstrumentSerial" id="WxInstrumentSerialResult">
|
|
|
|
<resultMap type="WxInstrumentSerial" id="WxInstrumentSerialResult">
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="instrumentId" column="instrument_id" />
|
|
|
|
<result property="instrumentId" column="instrument_id" />
|
|
|
|
<result property="instrumentName" column="instrument_name" />
|
|
|
|
|
|
|
|
<result property="serial" column="serial" />
|
|
|
|
<result property="serial" column="serial" />
|
|
|
|
<result property="source" column="source" />
|
|
|
|
<result property="source" column="source" />
|
|
|
|
<result property="bindingStatus" column="binding_status" />
|
|
|
|
<result property="bindingStatus" column="binding_status" />
|
|
|
|
@ -19,14 +18,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectWxInstrumentSerialVo">
|
|
|
|
<sql id="selectWxInstrumentSerialVo">
|
|
|
|
select id, source,instrument_id, instrument_name, serial, binding_status, valid_status, status, create_by, create_time, remark from wx_instrument_serial
|
|
|
|
select id, source,instrument_id, serial, binding_status, valid_status, status, create_by, create_time, remark from wx_instrument_serial
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectWxInstrumentSerialList" parameterType="WxInstrumentSerial" resultMap="WxInstrumentSerialResult">
|
|
|
|
<select id="selectWxInstrumentSerialList" parameterType="WxInstrumentSerial" resultMap="WxInstrumentSerialResult">
|
|
|
|
<include refid="selectWxInstrumentSerialVo"/>
|
|
|
|
<include refid="selectWxInstrumentSerialVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="instrumentId != null "> and instrument_id = #{instrumentId}</if>
|
|
|
|
<if test="instrumentId != null "> and instrument_id = #{instrumentId}</if>
|
|
|
|
<if test="instrumentName != null and instrumentName != ''"> and instrument_name like concat('%', #{instrumentName}, '%')</if>
|
|
|
|
|
|
|
|
<if test="serial != null and serial != ''"> and serial like concat('%', #{serial}, '%')</if>
|
|
|
|
<if test="serial != null and serial != ''"> and serial like concat('%', #{serial}, '%')</if>
|
|
|
|
<if test="source != null and source != ''"> and `source` like concat('%', #{source}, '%')</if>
|
|
|
|
<if test="source != null and source != ''"> and `source` like concat('%', #{source}, '%')</if>
|
|
|
|
<if test="bindingStatus != null "> and binding_status = #{bindingStatus}</if>
|
|
|
|
<if test="bindingStatus != null "> and binding_status = #{bindingStatus}</if>
|
|
|
|
@ -66,7 +64,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
insert into wx_instrument_serial
|
|
|
|
insert into wx_instrument_serial
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="instrumentId != null">instrument_id,</if>
|
|
|
|
<if test="instrumentId != null">instrument_id,</if>
|
|
|
|
<if test="instrumentName != null and instrumentName != ''">instrument_name,</if>
|
|
|
|
|
|
|
|
<if test="serial != null and serial != ''">serial,</if>
|
|
|
|
<if test="serial != null and serial != ''">serial,</if>
|
|
|
|
<if test="source != null and source != ''">`source`,</if>
|
|
|
|
<if test="source != null and source != ''">`source`,</if>
|
|
|
|
<if test="bindingStatus != null">binding_status,</if>
|
|
|
|
<if test="bindingStatus != null">binding_status,</if>
|
|
|
|
@ -78,7 +75,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="instrumentId != null">#{instrumentId},</if>
|
|
|
|
<if test="instrumentId != null">#{instrumentId},</if>
|
|
|
|
<if test="instrumentName != null and instrumentName != ''">#{instrumentName},</if>
|
|
|
|
|
|
|
|
<if test="serial != null and serial != ''">#{serial},</if>
|
|
|
|
<if test="serial != null and serial != ''">#{serial},</if>
|
|
|
|
<if test="source != null and source != ''">#{source},</if>
|
|
|
|
<if test="source != null and source != ''">#{source},</if>
|
|
|
|
<if test="bindingStatus != null">#{bindingStatus},</if>
|
|
|
|
<if test="bindingStatus != null">#{bindingStatus},</if>
|
|
|
|
@ -94,7 +90,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
update wx_instrument_serial
|
|
|
|
update wx_instrument_serial
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
|
|
|
|
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
|
|
|
|
<if test="instrumentName != null and instrumentName != ''">instrument_name = #{instrumentName},</if>
|
|
|
|
|
|
|
|
<if test="serial != null and serial != ''">serial = #{serial},</if>
|
|
|
|
<if test="serial != null and serial != ''">serial = #{serial},</if>
|
|
|
|
<if test="source != null and source != ''">`source` = #{source},</if>
|
|
|
|
<if test="source != null and source != ''">`source` = #{source},</if>
|
|
|
|
<if test="bindingStatus != null">binding_status = #{bindingStatus},</if>
|
|
|
|
<if test="bindingStatus != null">binding_status = #{bindingStatus},</if>
|
|
|
|
@ -111,7 +106,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
update wx_instrument_serial
|
|
|
|
update wx_instrument_serial
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
|
|
|
|
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
|
|
|
|
<if test="instrumentName != null and instrumentName != ''">instrument_name = #{instrumentName},</if>
|
|
|
|
|
|
|
|
<if test="source != null and source != ''">`source` = #{source},</if>
|
|
|
|
<if test="source != null and source != ''">`source` = #{source},</if>
|
|
|
|
<if test="bindingStatus != null">binding_status = #{bindingStatus},</if>
|
|
|
|
<if test="bindingStatus != null">binding_status = #{bindingStatus},</if>
|
|
|
|
<if test="validStatus != null">valid_status = #{validStatus},</if>
|
|
|
|
<if test="validStatus != null">valid_status = #{validStatus},</if>
|
|
|
|
|