|
|
|
@ -17,14 +17,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="attr2" column="attr2" />
|
|
|
|
|
<result property="attr3" column="attr3" />
|
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
|
<result property="createdTime" column="created_time" />
|
|
|
|
|
<result property="createdBy" column="created_by" />
|
|
|
|
|
<result property="updatedTime" column="updated_time" />
|
|
|
|
|
<result property="updatedBy" column="updated_by" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectEquCheckItemVo">
|
|
|
|
|
select item_id, item_code, item_name, item_method, item_type, item_type_name, item_remark, factory_code, attr1, attr2, attr3, del_flag, created_time, created_by, updated_time, updated_by from equ_check_item
|
|
|
|
|
select item_id, item_code, item_name, item_method, item_type, item_type_name, item_remark, factory_code, attr1, attr2, attr3, del_flag, create_time, create_by, update_time, update_by from equ_check_item
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectEquCheckItemList" parameterType="EquCheckItem" resultMap="EquCheckItemResult">
|
|
|
|
@ -41,14 +41,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
|
|
|
|
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
|
|
|
|
|
<if test="createTimeStart != null "> and CONVERT(date,created_time) >= #{createTimeStart}</if>
|
|
|
|
|
<if test="createTimeEnd != null "> and #{createTimeEnd} >= CONVERT(date,created_time)</if>
|
|
|
|
|
<if test="createdBy != null and createdBy != ''"> and created_by like concat('%', #{createdBy}, '%')</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="updatedBy != null and updatedBy != ''"> and updated_by like concat('%', #{updatedBy}, '%')</if>
|
|
|
|
|
<if test="createTimeStart != null "> and CONVERT(date,create_time) >= #{createTimeStart}</if>
|
|
|
|
|
<if test="createTimeEnd != null "> and #{createTimeEnd} >= CONVERT(date,create_time)</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
|
|
|
|
<if test="updateTimeStart != null "> and CONVERT(date,update_time) >= #{updateTimeStart}</if>
|
|
|
|
|
<if test="updateTimeEnd != null "> and #{updateTimeEnd} >= CONVERT(date,update_time)</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
ORDER BY created_time DESC
|
|
|
|
|
ORDER BY create_time DESC
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<select id="selectSerialNumber" resultType="java.lang.Integer">
|
|
|
|
|
SELECT COUNT(item_id)+1 AS serialNum
|
|
|
|
|
FROM equ_check_item
|
|
|
|
|
WHERE CONVERT(date, GETDATE()) = CONVERT(date,created_time) and del_flag = '0'
|
|
|
|
|
WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time) and del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectAllEquipmentList" resultType="com.op.device.domain.vo.EquCheckItemVO">
|
|
|
|
@ -87,10 +87,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="attr2 != null">attr2,</if>
|
|
|
|
|
<if test="attr3 != null">attr3,</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
|
|
|
|
<if test="createdTime != null">created_time,</if>
|
|
|
|
|
<if test="createdBy != null and createdBy != ''">created_by,</if>
|
|
|
|
|
<if test="updatedTime != null">updated_time,</if>
|
|
|
|
|
<if test="updatedBy != null and updatedBy != ''">updated_by,</if>
|
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="itemId != null">#{itemId},</if>
|
|
|
|
@ -105,10 +105,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="attr2 != null">#{attr2},</if>
|
|
|
|
|
<if test="attr3 != null">#{attr3},</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
|
|
|
|
<if test="createdTime != null">#{createdTime},</if>
|
|
|
|
|
<if test="createdBy != null and createdBy != ''">#{createdBy},</if>
|
|
|
|
|
<if test="updatedTime != null">#{updatedTime},</if>
|
|
|
|
|
<if test="updatedBy != null and updatedBy != ''">#{updatedBy},</if>
|
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -126,10 +126,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
|
|
|
|
<if test="attr3 != null">attr3 = #{attr3},</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
|
|
|
|
<if test="createdTime != null">created_time = #{createdTime},</if>
|
|
|
|
|
<if test="createdBy != null and createdBy != ''">created_by = #{createdBy},</if>
|
|
|
|
|
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
|
|
|
|
<if test="updatedBy != null and updatedBy != ''">updated_by = #{updatedBy},</if>
|
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where item_id = #{itemId} and del_flag = '0'
|
|
|
|
|
</update>
|
|
|
|
|