|
|
@ -47,23 +47,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="updateTimeStart != null "> and CONVERT(date,updated_time) >= #{updateTimeStart}</if>
|
|
|
|
<if test="updateTimeStart != null "> and CONVERT(date,updated_time) >= #{updateTimeStart}</if>
|
|
|
|
<if test="updateTimeEnd != null "> and #{updateTimeEnd} >= CONVERT(date,updated_time)</if>
|
|
|
|
<if test="updateTimeEnd != null "> and #{updateTimeEnd} >= CONVERT(date,updated_time)</if>
|
|
|
|
<if test="updatedBy != null and updatedBy != ''"> and updated_by like concat('%', #{updatedBy}, '%')</if>
|
|
|
|
<if test="updatedBy != null and updatedBy != ''"> and updated_by like concat('%', #{updatedBy}, '%')</if>
|
|
|
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
|
|
|
ORDER BY created_time DESC
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectEquCheckItemByItemId" parameterType="String" resultMap="EquCheckItemResult">
|
|
|
|
<select id="selectEquCheckItemByItemId" parameterType="String" resultMap="EquCheckItemResult">
|
|
|
|
<include refid="selectEquCheckItemVo"/>
|
|
|
|
<include refid="selectEquCheckItemVo"/>
|
|
|
|
where item_id = #{itemId}
|
|
|
|
where item_id = #{itemId} and del_flag = '0'
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectEquCheckItemByItemName" parameterType="String" resultMap="EquCheckItemResult">
|
|
|
|
<select id="selectEquCheckItemByItemName" parameterType="String" resultMap="EquCheckItemResult">
|
|
|
|
<include refid="selectEquCheckItemVo"/>
|
|
|
|
<include refid="selectEquCheckItemVo"/>
|
|
|
|
where item_name = #{itemName}
|
|
|
|
where item_name = #{itemName} and del_flag = '0'
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectSerialNumber" resultType="java.lang.Integer">
|
|
|
|
<select id="selectSerialNumber" resultType="java.lang.Integer">
|
|
|
|
SELECT COUNT(item_id)+1 AS serialNum
|
|
|
|
SELECT COUNT(item_id)+1 AS serialNum
|
|
|
|
FROM equ_check_item
|
|
|
|
FROM equ_check_item
|
|
|
|
WHERE CONVERT(date, GETDATE()) = CONVERT(date,created_time);
|
|
|
|
WHERE CONVERT(date, GETDATE()) = CONVERT(date,created_time) and del_flag = '0'
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertEquCheckItem" parameterType="EquCheckItem">
|
|
|
|
<insert id="insertEquCheckItem" parameterType="EquCheckItem">
|
|
|
@ -125,15 +127,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
|
|
|
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
|
|
|
<if test="updatedBy != null and updatedBy != ''">updated_by = #{updatedBy},</if>
|
|
|
|
<if test="updatedBy != null and updatedBy != ''">updated_by = #{updatedBy},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
where item_id = #{itemId}
|
|
|
|
where item_id = #{itemId} and del_flag = '0'
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteEquCheckItemByItemId" parameterType="String">
|
|
|
|
<delete id="deleteEquCheckItemByItemId" parameterType="String">
|
|
|
|
delete from equ_check_item where item_id = #{itemId}
|
|
|
|
update equ_check_item set del_flag = '1' where item_id = #{itemId}
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteEquCheckItemByItemIds" parameterType="String">
|
|
|
|
<delete id="deleteEquCheckItemByItemIds" parameterType="String">
|
|
|
|
delete from equ_check_item where item_id in
|
|
|
|
update equ_check_item set del_flag = '1' where item_id in
|
|
|
|
<foreach item="itemId" collection="array" open="(" separator="," close=")">
|
|
|
|
<foreach item="itemId" collection="array" open="(" separator="," close=")">
|
|
|
|
#{itemId}
|
|
|
|
#{itemId}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|