select thisTab.id, thisTab.system_code, thisTab.plan_name, thisTab.customer_id, thisTab.customer_name, thisTab.project_id, thisTab.project_name, thisTab.contract_id, thisTab.contract_name, thisTab.effective_date, thisTab.expiry_date, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark, thisTab.plan_type ,thisTab.provider_type, thisTab.provider_id, thisTab.provider_name from tms_quote_plan AS thisTab select count(0) from tms_quote_plan as thisTab and thisTab.system_code = #{systemCode} and thisTab.plan_name like concat('%', #{planName}, '%') and thisTab.customer_id = #{customerId} and thisTab.customer_name like concat('%', #{customerName}, '%') and thisTab.project_id = #{projectId} and thisTab.project_name like concat('%', #{projectName}, '%') and thisTab.contract_id = #{contractId} and thisTab.contract_name like concat('%', #{contractName}, '%') and thisTab.effective_date = #{effectiveDate} and thisTab.expiry_date = #{expiryDate} and thisTab.status = #{status} and thisTab.plan_type = #{planType} and thisTab.provider_type = #{providerType} and thisTab.provider_id = #{providerId} and thisTab.provider_name like concat('%', #{providerName}, '%') insert into tms_quote_plan system_code, plan_name, customer_id, customer_name, project_id, project_name, contract_id, contract_name, effective_date, expiry_date, status, create_by, create_time, update_by, update_time, remark, plan_type, provider_type, provider_id, provider_name, #{systemCode}, #{planName}, #{customerId}, #{customerName}, #{projectId}, #{projectName}, #{contractId}, #{contractName}, #{effectiveDate}, #{expiryDate}, #{status}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark}, #{planType}, #{providerType}, #{providerId}, #{providerName}, insert into tms_quote_plan id,system_code,plan_name,customer_id,customer_name,project_id,project_name,contract_id,contract_name,effective_date,expiry_date,status,create_by,create_time,update_by,update_time,remark,plan_type,provider_type,provider_id,provider_name, #{item.id},#{item.systemCode},#{item.planName},#{item.customerId},#{item.customerName},#{item.projectId},#{item.projectName},#{item.contractId},#{item.contractName},#{item.effectiveDate},#{item.expiryDate},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.planType},#{item.providerType},#{item.providerId},#{item.providerName}, update tms_quote_plan system_code = #{systemCode}, plan_name = #{planName}, customer_id = #{customerId}, customer_name = #{customerName}, project_id = #{projectId}, project_name = #{projectName}, contract_id = #{contractId}, contract_name = #{contractName}, effective_date = #{effectiveDate}, expiry_date = #{expiryDate}, status = #{status}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, plan_type = #{planType}, provider_type = #{providerType}, provider_id = #{providerId}, provider_name = #{providerName}, where id = #{id} update tms_quote_plan system_code = #{item.systemCode}, plan_name = #{item.planName}, customer_id = #{item.customerId}, customer_name = #{item.customerName}, project_id = #{item.projectId}, project_name = #{item.projectName}, contract_id = #{item.contractId}, contract_name = #{item.contractName}, effective_date = #{item.effectiveDate}, expiry_date = #{item.expiryDate}, status = #{item.status}, create_by = #{item.createBy}, create_time = #{item.createTime}, update_by = #{item.updateBy}, update_time = #{item.updateTime}, remark = #{item.remark}, plan_type = #{item.planType}, provider_type = #{item.providerType}, provider_id = #{item.providerId}, provider_name = #{item.providerName}, where id = #{item.id} delete from tms_quote_plan where id = #{id} delete from tms_quote_plan where id in #{id}