|
|
|
|
<?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.nov.KgLowDurable.mapper.LdDurableFormMapper">
|
|
|
|
|
|
|
|
|
|
<!-- 完整的ldApproveResultMap -->
|
|
|
|
|
<resultMap id="ldApproveResultMap" type="com.nov.KgLowDurable.pojo.entity.LdDurableForm">
|
|
|
|
|
<id column="id" property="id"/>
|
|
|
|
|
<result column="material_id" property="materialId"/>
|
|
|
|
|
<result column="material_name" property="materialName"/>
|
|
|
|
|
<result column="material_code" property="materialCode"/>
|
|
|
|
|
<result column="one_put_material_code" property="onePutMaterialCode"/>
|
|
|
|
|
<result column="model" property="model"/>
|
|
|
|
|
<result column="type" property="type"/>
|
|
|
|
|
<result column="unit" property="unit"/>
|
|
|
|
|
<result column="num" property="num"/>
|
|
|
|
|
<result column="unit_price" property="unitPrice"/>
|
|
|
|
|
<result column="amount" property="amount"/>
|
|
|
|
|
<result column="department_id" property="departmentId"/>
|
|
|
|
|
<result column="department" property="department"/>
|
|
|
|
|
<result column="picture" property="picture"/>
|
|
|
|
|
<result column="remark" property="remark"/>
|
|
|
|
|
<result column="is_borrow" property="isBorrow"/>
|
|
|
|
|
<result column="return_time" property="returnTime"/>
|
|
|
|
|
<result column="return_reason" property="returnReason"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<select id="selectDurableFormList" resultType="com.nov.KgLowDurable.pojo.entity.LdDurableForm">
|
|
|
|
|
select * from ld_durable_form where 1=1
|
|
|
|
|
<if test="departmentId != null">
|
|
|
|
|
and department_id = #{departmentId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="materialName != null and materialName != ''">
|
|
|
|
|
AND material_name LIKE CONCAT('%', #{materialName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectByMaterialId" resultType="com.nov.KgLowDurable.pojo.entity.LdDurableForm">
|
|
|
|
|
select * from ld_durable_form where material_id = #{materialId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|