| 
					
				 | 
			
			
				@@ -6,7 +6,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<resultMap type="com.ozs.plan.doman.PlanYears" id="PlanYearsResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<id property="plan_year_id" column="planYearId"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<result property="purchase_unit" column="purchaseUnit"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result property="purchase_dept_id" column="purchaseDeptId"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result property="project_name" column="projectName"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result property="project_type" column="projectType"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result property="demand_overview" column="demandOverview"/> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -14,36 +14,38 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result property="is_excess" column="isExcess"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result property="purchase_services" column="purchaseServices"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result property="purchase_mode" column="purchaseMode"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<result property="demand_commit_time" column="demandCommitTime"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<result property="purchase_finish_time" column="purchaseFinishTime"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<result property="deliver_time" column="deliverTime"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<result property="project_attribute" column="projectAttribute"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<result property="readjust_of_plan" column="readjustOfPlan"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result property="plan_demand_sub_time" column="planDemandSubTime"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result property="plan_purchase_finish_time" column="planPurchaseFinishTime"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result property="plan_deliver_time" column="planDeliverTime"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result property="project_attr" column="projectAtt"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result property="adjust_reason" column="adjustReason"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result property="remarks" column="remarks"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result property="project_status" column="projectStatus"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<result property="create_by" column="createBy"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result property="created" column="created"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result property="create_time" column="createTime"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<result property="reason_of_return" column="reasonOfReturn"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<result property="is_delete" column="isDelete"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result property="updated" column="updated"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result property="update_time" column="updateTime"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result property="refuse_reason" column="refuseReason"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result property="del_flay" column="delFlay"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<update id="updateById" parameterType="com.ozs.plan.doman.PlanYears"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		update plan_years 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		set purchase_unit=#{purchaseUnit}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			project_name=#{projectName}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		set project_name=#{projectName}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			project_type=#{projectType}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			demand_overview=#{demandOverview}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			evaluation=#{evaluation}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			is_excess=#{isExcess}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			purchase_services=#{purchaseServices}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			purchase_mode=#{purchaseMode}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			demand_commit_time=#{demandCommitTime}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			purchase_finish_time=#{purchaseFinishTime}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			deliver_time=#{deliverTime}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			project_attribute=#{projectAttribute}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			readjust_of_plan=#{readjustOfPlan}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			plan_demand_sub_time=#{planDemandSubTime}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			plan_purchase_finish_time=#{planPurchaseFinishTime}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			plan_deliver_time=#{planDeliverTime}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			project_attr=#{projectAtt}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			adjust_reason=#{adjustReason}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			remarks=#{remarks}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			project_status=#{projectStatus} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			updated=#{updated}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			update_time=#{updateTime} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		where plan_year_id = #{planYearId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</update> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -63,12 +65,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				AND project_status = #{projectStatus} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				and date_format(demand_commit_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				and date_format(plan_demand_sub_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				and date_format(demand_commit_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				and date_format(plan_demand_sub_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			and is_delete=0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			and del_flay=0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		</where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		order by create_time desc 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</select> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -77,14 +79,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		select * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		from plan_years 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		where project_name = #{projectName} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		  and is_delete = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		  and del_flay = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<select id="getById" resultType="com.ozs.plan.doman.PlanYears" parameterType="java.lang.Long"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		select * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		from plan_years 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		where plan_year_id = #{planYearId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		  and is_delete = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		  and del_flay = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<select id="countProjectNameOther" resultType="java.lang.Integer" parameterType="java.lang.String"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -92,23 +94,24 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		from plan_years 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		where project_name = #{projectName} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		  and plan_year_id != #{planYearId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		  and is_delete = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		  and del_flay = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<!--	创建计划信息--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<insert id="insertPlanYears" parameterType="com.ozs.plan.doman.PlanYears"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		insert into plan_years (purchase_unit, project_name, project_type, demand_overview, evaluation, is_excess, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								purchase_services, purchase_mode, demand_commit_time, purchase_finish_time, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								deliver_time, project_attribute, readjust_of_plan, remarks, project_status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								create_by, create_time, is_delete) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		values (#{purchaseUnit}, #{projectName}, #{projectType}, #{demandOverview}, #{evaluation}, #{isExcess}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				#{purchaseServices}, #{purchaseMode}, #{demandCommitTime}, #{purchaseFinishTime}, #{deliverTime}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				#{projectAttribute}, #{readjustOfPlan}, #{remarks}, #{projectStatus}, #{createBy}, #{createTime}, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		insert into plan_years (purchase_dept_id, project_name, project_type, demand_overview, evaluation, is_excess, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								purchase_services, purchase_mode, plan_demand_sub_time, plan_purchase_finish_time, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								plan_deliver_time, project_attr, adjust_reason, remarks, project_status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								created, create_time, del_flay) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		values (#{purchaseDeptId}, #{projectName}, #{projectType}, #{demandOverview}, #{evaluation}, #{isExcess}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				#{purchaseServices}, #{purchaseMode}, #{planDemandSubTime}, #{planPurchaseFinishTime}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				#{planDeliverTime}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				#{projectAtt}, #{adjustReason}, #{remarks}, #{projectStatus}, #{created}, #{createTime}, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</insert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<!--	计划删除--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<update id="deletePlanYearsByIds" parameterType="java.lang.Long"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		update plan_years set is_delete=1 where plan_year_id in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		update plan_years set del_flay=1 where plan_year_id in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<foreach collection="array" item="item" open="(" separator="," close=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			#{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		</foreach> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -116,7 +119,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<update id="deletePlanYearsById" parameterType="java.lang.Long"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		update plan_years 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		set is_delete=1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		set del_flay=1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		where plan_year_id = #{plan_year_id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</update> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -130,7 +133,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<!--	计划审核--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<update id="review" parameterType="com.ozs.plan.doman.PlanYears"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		update plan_years 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		set reason_of_return=#{reasonOfReturn}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		set refuse_reason=#{refuseReason}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			project_status=#{projectStatus} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		where plan_year_id = #{planYearId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</update> 
			 |