queryCondition
===

* 查询条件

  @if(!isEmpty(examinationId)){
  and t.examination_id =#examinationId#
  @}
  @if(!isEmpty(flowId)){
  and t.flow_id =#flowId#
  @}
  @ if(!isEmpty(sellerName)){
  and t.seller_name like #'%'+sellerName+'%'#
  @}
  @ if(!isEmpty(sellerId)){
  and t.seller_id like #'%'+sellerId+'%'#
  @}

 


pageQueryByCondition
===

* 分页查询

  select
  @pageTag(){
  t.*,
  t4.telephone seller_telephone, t4.corporation seller_corporation
  @}
  from recommend_supplier t
  join materials t4 on t4.id = t.seller_id
  where 1 = 1
  #use("queryCondition")#


queryByCondition
===

* 不分页查询

  select
  t.*
  from recommend_supplier t
  where 1 = 1
  #use("queryCondition")#




getSellerList
===

* 查询可以新增推荐供应商的数据

select
t.protocol_fxbl_amount,
t3.seller_name, t3.seller_id, t3.id contract_id, t3.contract_no,
t4.telephone seller_telephone, t4.corporation seller_corporation, t4.address seller_address
from protocols t
left join recommend_supplier t2 on t.contract_no = t2.contract_no
join contracts_purchase_sales t3 on t.contract_id = t3.id
join materials t4 on t4.id = t3.seller_id
where t.protocol_status = 2
and t2.contract_no is null
@if(!isEmpty(examinationId)){
and t.examination_id =#examinationId#
@}
@if(!isEmpty(flowId)){
and t.flow_id =#flowId#
@}