|
@@ -384,6 +384,47 @@
|
|
|
) AS query
|
|
|
</select>
|
|
|
|
|
|
+ <select id="countInformationQueryTwo" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ count( distinct query.id)
|
|
|
+ from
|
|
|
+ (
|
|
|
+ select
|
|
|
+ query.id
|
|
|
+ from
|
|
|
+ (
|
|
|
+ select
|
|
|
+ iq.id,
|
|
|
+ (case iq.STATUS when 0 THEN null else t.batch end) as report_number,
|
|
|
+ date_format(iq.create_time,'%Y-%m-%d') as createTimes
|
|
|
+ from u_information_query iq left join (select * from u_task k where k.status!=3 and k.contract_id = #{query.contractId}) t on iq.id = t.form_data_id and t.is_deleted = 0
|
|
|
+ where
|
|
|
+ iq.is_deleted = 0
|
|
|
+ and iq.classify = #{query.classify}
|
|
|
+ and iq.contract_id = #{query.contractId}
|
|
|
+ <if test="query.taskStatus != null and query.taskStatus != ''"> and iq.status = #{query.taskStatus} </if>
|
|
|
+ <if test="query.sourceType != null and query.sourceType != ''"> and iq.source_type = #{query.sourceType} </if>
|
|
|
+ <if test="query.reportNumber != null and query.reportNumber != ''"> and t.batch = #{query.reportNumber} </if>
|
|
|
+ <if test="query.fileUserIdAndName != null and query.fileUserIdAndName != ''"> and iq.file_user_id_and_name like concat('%',#{query.fileUserIdAndName},'%') </if>
|
|
|
+ <if test="query.queryValue != null and query.queryValue != ''"> and (iq.name like concat('%',#{query.queryValue},'%') OR iq.number like concat('%',#{query.queryValue},'%')) </if>
|
|
|
+ <if test="query.firstTitle != null and query.firstTitle != ''"> and iq.type = 3 </if>
|
|
|
+ <if test="query.firstTitle == null or query.firstTitle == ''"> and iq.type != 3 </if>
|
|
|
+ <if test="query.wbsIds != null">
|
|
|
+ and iq.wbs_id in
|
|
|
+ <foreach collection="query.wbsIds" item="wbsIdc" open="(" separator="," close=")">
|
|
|
+ #{wbsIdc}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ ) AS query
|
|
|
+ where
|
|
|
+ 1 = 1
|
|
|
+ <if test="query.reportNumber != null and query.reportNumber != ''"> and report_number = #{query.reportNumber} </if>
|
|
|
+ <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
|
|
|
+ and query.createTimes between #{query.startTime} and #{query.endTime}
|
|
|
+ </if>
|
|
|
+ ) AS query
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="selectInformationQueryPage" resultMap="informationQueryResultMap">
|
|
|
select
|
|
|
query.wbs_id,
|