|
@@ -47,14 +47,6 @@
|
|
select aircraft_type,count(aircraft_type) as num from t_fault group by aircraft_type
|
|
select aircraft_type,count(aircraft_type) as num from t_fault group by aircraft_type
|
|
</select>
|
|
</select>
|
|
|
|
|
|
-<!-- <insert id="batchAdd" parameterType="java.util.List">-->
|
|
|
|
-<!-- <foreach collection="list" item="equ" separator=";">-->
|
|
|
|
-<!-- insert into t_equipment (equipment_type)-->
|
|
|
|
-<!-- SELECT #{equ.equipment_type}-->
|
|
|
|
-<!-- FROM DUAL WHERE NOT EXISTS (SELECT equipment_type FROM t_equipment WHERE equipment_type = #{equ.equipment_type})-->
|
|
|
|
-<!-- </foreach>-->
|
|
|
|
-<!-- </insert>-->
|
|
|
|
-
|
|
|
|
<select id="findByName" parameterType="String" resultMap="faultMap">
|
|
<select id="findByName" parameterType="String" resultMap="faultMap">
|
|
select id,fault_name,fault_number,author,aircraft_type,major_type,description,file_path,input_time,fault_time,book_name,chapter,remarks from t_fault where fault_name
|
|
select id,fault_name,fault_number,author,aircraft_type,major_type,description,file_path,input_time,fault_time,book_name,chapter,remarks from t_fault where fault_name
|
|
like #{fault_name}
|
|
like #{fault_name}
|
|
@@ -145,4 +137,66 @@
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="findByBookName1" parameterType="String" resultMap="faultMap">
|
|
|
|
+ select * from t_fault where book_name
|
|
|
|
+ like #{name}
|
|
|
|
+ and major_type = #{major}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="findByFaultName1" parameterType="String" resultMap="faultMap">
|
|
|
|
+ select * from t_fault where fault_name
|
|
|
|
+ like #{name}
|
|
|
|
+ and major_type = #{major}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="findByAuthor1" parameterType="String" resultMap="faultMap">
|
|
|
|
+ select * from t_fault where author
|
|
|
|
+ like #{name}
|
|
|
|
+ and major_type = #{major}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="findByDepartment1" parameterType="String" resultMap="faultMap">
|
|
|
|
+ select * from t_fault where department
|
|
|
|
+ like #{name}
|
|
|
|
+ and major_type = #{major}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="findByDescription1" parameterType="String" resultMap="faultMap">
|
|
|
|
+ select * from t_fault where description
|
|
|
|
+ like #{name}
|
|
|
|
+ and major_type = #{major}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="findByAircraft1" parameterType="String" resultMap="faultMap">
|
|
|
|
+ select * from t_fault where aircraft_type
|
|
|
|
+ like #{name}
|
|
|
|
+ and major_type = #{major}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <select id="findByMultiple1" parameterType="String" resultMap="faultMap">
|
|
|
|
+ select *
|
|
|
|
+ from t_fault where
|
|
|
|
+ (book_name like #{name} and major_type = #{major})
|
|
|
|
+ or (fault_name like #{name} and major_type = #{major})
|
|
|
|
+ or (author like #{name} and major_type = #{major})
|
|
|
|
+ or (department like #{name} and major_type = #{major})
|
|
|
|
+ or (description like #{name} and major_type = #{major})
|
|
|
|
+ or (aircraft_type like #{name} and major_type = #{major})
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="findByFaultTime1" parameterType="com.zglc.fm.entity.FaultFind2" resultMap="faultMap">
|
|
|
|
+ select *
|
|
|
|
+ from t_fault where 1=1
|
|
|
|
+ <if test="major !=null">
|
|
|
|
+ and major_type = #{major}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="beginTime != null">
|
|
|
|
+ and fault_time <![CDATA[>=]]> #{beginTime}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="finishTime !=null">
|
|
|
|
+ and fault_time <![CDATA[<=]]> #{finishTime}
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|