|
|
@ -34,26 +34,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<select id="selectEquSpareApplyList" parameterType="EquSpareApply" resultMap="EquSpareApplyResult">
|
|
|
|
<select id="selectEquSpareApplyList" parameterType="EquSpareApply" resultMap="EquSpareApplyResult">
|
|
|
|
<include refid="selectEquSpareApplyVo"/>
|
|
|
|
<include refid="selectEquSpareApplyVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="applyCode != null and applyCode != ''"> and apply_code = #{applyCode}</if>
|
|
|
|
<if test="applyCode != null and applyCode != ''"> and apply_code like concat('%', #{applyCode}, '%')</if>
|
|
|
|
<if test="spareCode != null and spareCode != ''"> and spare_code = #{spareCode}</if>
|
|
|
|
<if test="spareCode != null and spareCode != ''"> and spare_code like concat('%', #{spareCode}, '%')</if>
|
|
|
|
<if test="spareName != null and spareName != ''"> and spare_name like concat('%', #{spareName}, '%')</if>
|
|
|
|
<if test="spareName != null and spareName != ''"> and spare_name like concat('%', #{spareName}, '%')</if>
|
|
|
|
<if test="spareModel != null and spareModel != ''"> and spare_model = #{spareModel}</if>
|
|
|
|
<if test="spareModel != null and spareModel != ''"> and spare_model like concat('%', #{spareModel}, '%')</if>
|
|
|
|
<if test="spareQuantity != null "> and spare_quantity = #{spareQuantity}</if>
|
|
|
|
<if test="spareQuantity != null "> and spare_quantity like concat('%', #{spareQuantity}, '%')</if>
|
|
|
|
<if test="spareGroupLine != null and spareGroupLine != ''"> and spare_group_line = #{spareGroupLine}</if>
|
|
|
|
<if test="spareGroupLine != null and spareGroupLine != ''"> and spare_group_line like concat('%', #{spareGroupLine}, '%')</if>
|
|
|
|
<if test="spareUseEquipment != null and spareUseEquipment != ''"> and spare_use_equipment = #{spareUseEquipment}</if>
|
|
|
|
<if test="spareUseEquipment != null and spareUseEquipment != ''"> and spare_use_equipment like concat('%', #{spareUseEquipment}, '%')</if>
|
|
|
|
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
|
|
|
|
<if test="applyTimeStart != null "> and CONVERT(date,apply_time) >= #{applyTimeStart}</if>
|
|
|
|
<if test="applyPeople != null and applyPeople != ''"> and apply_people = #{applyPeople}</if>
|
|
|
|
<if test="applyTimeEnd != null "> and #{applyTimeEnd} >= CONVERT(date,apply_time)</if>
|
|
|
|
<if test="applyApprovePeople != null and applyApprovePeople != ''"> and apply_approve_people = #{applyApprovePeople}</if>
|
|
|
|
<if test="applyPeople != null and applyPeople != ''"> and apply_people like concat('%', #{applyPeople}, '%')</if>
|
|
|
|
|
|
|
|
<if test="applyApprovePeople != null and applyApprovePeople != ''"> and apply_approve_people like concat('%', #{applyApprovePeople}, '%')</if>
|
|
|
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
|
|
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
|
|
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
|
|
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
|
|
|
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
|
|
|
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
|
|
|
ORDER BY apply_time DESC
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectEquSpareApplyByApplyId" parameterType="String" resultMap="EquSpareApplyResult">
|
|
|
|
<select id="selectEquSpareApplyByApplyId" parameterType="String" resultMap="EquSpareApplyResult">
|
|
|
|
<include refid="selectEquSpareApplyVo"/>
|
|
|
|
<include refid="selectEquSpareApplyVo"/>
|
|
|
|
where apply_id = #{applyId}
|
|
|
|
where apply_id = #{applyId}
|
|
|
|
|
|
|
|
and del_flag = '0'
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertEquSpareApply" parameterType="EquSpareApply">
|
|
|
|
<insert id="insertEquSpareApply" parameterType="EquSpareApply">
|
|
|
|