insert into inspection_plan(
inspection_plan_name,create_user_id,inspection_route_id,inspection_plan_period,remark,create_user_name,sign_type,start_time,inspection_plan_id,end_time,state,community_id
) values (
#{inspectionPlanName},#{createUserId},#{inspectionRouteId},#{inspectionPlanPeriod},#{remark},#{createUserName},#{signType},#{startTime},#{inspectionPlanId},#{endTime},#{state},#{communityId}
)
update inspection_plan t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.inspection_plan_name= #{inspectionPlanName}
, t.create_user_id= #{createUserId}
, t.inspection_route_id= #{inspectionRouteId}
, t.inspection_plan_period= #{inspectionPlanPeriod}
, t.remark= #{remark}
, t.create_user_name= #{createUserName}
, t.sign_type= #{signType}
, t.start_time= #{startTime}
, t.end_time= #{endTime}
, t.state= #{state}
, t.community_id= #{communityId}
where 1=1
and t.inspection_plan_id= #{inspectionPlanId}