|  | @@ -753,75 +753,7 @@
 | 
	
		
			
				|  |  |  		LEFT JOIN work_contract_info wci on r.contract_id = wci.id
 | 
	
		
			
				|  |  |  		LEFT JOIN work_client_info wct on wci.client_id = wct.id
 | 
	
		
			
				|  |  |  		<where>
 | 
	
		
			
				|  |  | -			a.del_flag = #{DEL_FLAG_NORMAL}
 | 
	
		
			
				|  |  | -			<if test="project != null and project.id != null and project.id != ''">
 | 
	
		
			
				|  |  | -				AND a.project_id = #{project.id}
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="type != null and type != ''">
 | 
	
		
			
				|  |  | -				AND a.type = #{type}
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="name != null and name != ''">
 | 
	
		
			
				|  |  | -				AND a.name like
 | 
	
		
			
				|  |  | -				<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
 | 
	
		
			
				|  |  | -				<if test="dbName == 'mysql'">CONCAT('%', #{name}, '%')</if>
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="number != null and number != ''">
 | 
	
		
			
				|  |  | -				AND a.number like
 | 
	
		
			
				|  |  | -				<if test="dbName == 'oracle'">'%'||#{number}||'%'</if>
 | 
	
		
			
				|  |  | -				<if test="dbName == 'mysql'">CONCAT('%', #{number}, '%')</if>
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="achievementType != null and achievementType != ''">
 | 
	
		
			
				|  |  | -				AND a.achievement_type = #{achievementType}
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="signCostOne!=null and signCostOne.id != null and signCostOne.id != ''">
 | 
	
		
			
				|  |  | -				AND a.sign_cost_one = #{signCostOne.id}
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="signCostTwo!=null and signCostTwo.id != null and signCostTwo.id != ''">
 | 
	
		
			
				|  |  | -				AND a.sign_cost_two = #{signCostTwo.id}
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="master!=null and master.id != null and master.id != ''">
 | 
	
		
			
				|  |  | -				AND a.master = #{master.id}
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="reviewStandard != null and reviewStandard != ''">
 | 
	
		
			
				|  |  | -				AND a.review_standard = #{reviewStandard}
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -			<if test="startDate != null and startDate != ''">
 | 
	
		
			
				|  |  | -				AND a.report_date >= #{startDate}
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="endDate != null and endDate != ''">
 | 
	
		
			
				|  |  | -				AND a.report_date <= #{endDate}
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="fileStatus != null and fileStatus != ''">
 | 
	
		
			
				|  |  | -				AND a.file_status = #{fileStatus}
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="officeId != null and officeId != ''">
 | 
	
		
			
				|  |  | -				AND a.office_id = #{officeId}
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="createStartDate != null and createStartDate != ''">
 | 
	
		
			
				|  |  | -				AND a.create_date >= #{createStartDate}
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="createEndDate != null and createEndDate != ''">
 | 
	
		
			
				|  |  | -				AND a.create_date <= #{createEndDate}
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="project!=null and project.projectName != null and project.projectName != ''">
 | 
	
		
			
				|  |  | -				AND r.project_name like
 | 
	
		
			
				|  |  | -				<if test="dbName == 'oracle'">'%'||#{project.projectName}||'%'</if>
 | 
	
		
			
				|  |  | -				<if test="dbName == 'mysql'">CONCAT('%', #{project.projectName}, '%')</if>
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="contractNum != null and contractNum != ''">
 | 
	
		
			
				|  |  | -				AND wci.contract_num like
 | 
	
		
			
				|  |  | -				<if test="dbName == 'oracle'">'%'||#{contractNum}||'%'</if>
 | 
	
		
			
				|  |  | -				<if test="dbName == 'mysql'">CONCAT('%', #{contractNum}, '%')</if>
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="clientName != null and clientName != ''">
 | 
	
		
			
				|  |  | -				AND wct.name like
 | 
	
		
			
				|  |  | -				<if test="dbName == 'oracle'">'%'||#{clientName}||'%'</if>
 | 
	
		
			
				|  |  | -				<if test="dbName == 'mysql'">CONCAT('%', #{clientName}, '%')</if>
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="projectMasterId != null and projectMasterId != ''">
 | 
	
		
			
				|  |  | -				AND #{projectMasterId} in (select user_id from work_project_user pm WHERE pm.project_id = a.project_id AND is_master = '1' AND pm.del_flag = '0')
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | +			a.del_flag = 0 and a.file_status in(1,2)
 | 
	
		
			
				|  |  |  			AND a.status in ('5','7')
 | 
	
		
			
				|  |  |  			and a. id =#{id}
 | 
	
		
			
				|  |  |  		</where>
 |