|
@@ -441,6 +441,64 @@
|
|
|
limit #{current}, #{size}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectInformationQueryPageTwo" resultMap="informationQueryResultMap">
|
|
|
+ select
|
|
|
+ query.wbs_id,
|
|
|
+ query.id,
|
|
|
+ query.name,
|
|
|
+ query.number,
|
|
|
+ query.create_time,
|
|
|
+ query.status,
|
|
|
+ query.report_number,
|
|
|
+ query.file_user_id_and_name,
|
|
|
+ query.pdf_url,
|
|
|
+ query.e_visa_pdf_url,
|
|
|
+ query.sj_record_ids
|
|
|
+ from
|
|
|
+ (
|
|
|
+ select
|
|
|
+ iq.sort,
|
|
|
+ iq.id,
|
|
|
+ iq.name,
|
|
|
+ iq.number,
|
|
|
+ iq.create_time,
|
|
|
+ iq.status,
|
|
|
+ (case iq.STATUS when 0 THEN null else t.batch end) as report_number,
|
|
|
+ iq.file_user_id_and_name,
|
|
|
+ date_format(iq.create_time,'%Y-%m-%d') as createTimes,
|
|
|
+ iq.pdf_url,
|
|
|
+ iq.e_visa_pdf_url,
|
|
|
+ iq.wbs_id,
|
|
|
+ iq.sj_record_ids
|
|
|
+ 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>
|
|
|
+ order by create_time desc
|
|
|
+ limit #{current}, #{size}
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="getContractNodeByPrimaryKeyIds" resultType="org.springblade.manager.entity.WbsTreeContract">
|
|
|
select * from m_wbs_tree_contract where p_key_id in (${ids}) and is_deleted = 0 order by ancestors,sort
|
|
|
</select>
|