| 
					
				 | 
			
			
				@@ -3,7 +3,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <mapper namespace="com.ozs.pm.mapper.PmDemandMapper"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <resultMap type="com.ozs.pm.doman.PmDemand" id="PmDemandResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="demandId"    column="demand_id"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="planId"    column="plan_id"    /> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -42,21 +42,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectPmDemandList" parameterType="com.ozs.pm.doman.PmDemand" resultMap="PmDemandResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <include refid="selectPmDemandVo"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="planId != null ">and plan_id = #{planId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="purchaseDeptId != null ">and purchase_dept_id = #{purchaseDeptId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="projectName != null  and projectName != ''">and project_name like concat('%', #{projectName}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                '%') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="projectType != null  and projectType != ''">and project_type = #{projectType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="demandOverview != null  and demandOverview != ''">and demand_overview = #{demandOverview}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="evaluation != null ">and evaluation = #{evaluation}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="isExcess != null ">and is_excess = #{isExcess}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="purchaseServices != null  and purchaseServices != ''">and purchase_services = 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                #{purchaseServices} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="purchaseMode != null  and purchaseMode != ''">and purchase_mode = #{purchaseMode}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="planDemandSubTime != null ">and plan_demand_sub_time = #{planDemandSubTime}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <where>   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="planId != null "> and plan_id = #{planId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="purchaseDeptId != null "> and purchase_dept_id = #{purchaseDeptId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="projectName != null  and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="projectType != null  and projectType != ''"> and project_type = #{projectType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="demandOverview != null  and demandOverview != ''"> and demand_overview = #{demandOverview}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="evaluation != null "> and evaluation = #{evaluation}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="isExcess != null "> and is_excess = #{isExcess}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="purchaseServices != null  and purchaseServices != ''"> and purchase_services = #{purchaseServices}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="purchaseMode != null  and purchaseMode != ''"> and purchase_mode = #{purchaseMode}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="planDemandSubTime != null "> and plan_demand_sub_time = #{planDemandSubTime}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="planPurchaseFinishTime != null "> and plan_purchase_finish_time = #{planPurchaseFinishTime}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="planDeliverTime != null "> and plan_deliver_time = #{planDeliverTime}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="projectAttr != null  and projectAttr != ''"> and project_attr = #{projectAttr}</if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -77,20 +73,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="params.endDate != null  and params.endDate != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 and 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                (demand_commit_time <= #{params.endDate} or purchase_finish_time <= #{params.endDate} or 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                deliver_time <= #{params.endDate}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                (demand_commit_time <= #{params.endDate} or purchase_finish_time <= #{params.endDate} or deliver_time <= #{params.endDate}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="projectFiles != null  and projectFiles != ''">and project_files = #{projectFiles}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="projectFiles != null  and projectFiles != ''"> and project_files = #{projectFiles}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectPmDemandByDemandId" parameterType="Long" resultMap="PmDemandResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <include refid="selectPmDemandVo"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         where demand_id = #{demandId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <insert id="insertPmDemand" parameterType="com.ozs.pm.doman.PmDemand" useGeneratedKeys="true" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            keyProperty="demandId"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <insert id="insertPmDemand" parameterType="com.ozs.pm.doman.PmDemand" useGeneratedKeys="true" keyProperty="demandId"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         insert into pm_demand 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <trim prefix="(" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="planId != null">plan_id,</if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -189,4 +183,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         where demand_id = #{demandId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </update> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-</mapper> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</mapper> 
			 |