You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.8 KiB
Markdown
76 lines
1.8 KiB
Markdown
2 years ago
|
queryCondition
|
||
|
===
|
||
|
|
||
|
* 查询条件
|
||
|
|
||
|
@if(!isEmpty(examinationId)){
|
||
|
and t.examination_id =#examinationId#
|
||
|
@}
|
||
|
@if(!isEmpty(flowId)){
|
||
|
and t.flow_id =#flowId#
|
||
|
@}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
pageQueryByCondition
|
||
|
===
|
||
|
|
||
|
* 分页查询
|
||
|
|
||
|
select
|
||
|
@pageTag(){
|
||
|
t.*, t2.seller_name
|
||
|
@}
|
||
|
from invoice t
|
||
|
join contracts_purchase_sales t2 on t2.id = t.contract_id
|
||
|
where 1 = 1
|
||
|
@if(!isEmpty(sellerName)){
|
||
|
and t2.seller_name like #'%'+sellerName+'%'#
|
||
|
@}
|
||
|
|
||
|
#use("queryCondition")#
|
||
|
|
||
|
|
||
|
getFinancingList
|
||
|
===
|
||
|
|
||
|
* 查询可以新增反向保理融资申请的数据
|
||
|
|
||
|
select
|
||
|
t.invoice_amount, t.invoice_end_time,
|
||
|
t3.seller_id,
|
||
|
t3.seller_name, t3.buyer_name, t3.contract_no, t3.id contract_id, t3.contract_amount,
|
||
|
t4.accept_amount, t4.bank_name, t4.bank_id,
|
||
|
t5.yfzk_amount
|
||
|
from invoice t
|
||
|
left join financings t2 on t2.contract_id = t.contract_id
|
||
|
join contracts_purchase_sales t3 on t3.id = t.contract_id
|
||
|
join contracts_factoring t4 on t4.contract_id = t.contract_id
|
||
|
join recommend_supplier t5 on t5.contract_id = t.contract_id
|
||
|
where t2.contract_id is null and t.invoice_status = 2
|
||
|
#use("queryCondition")#
|
||
|
|
||
|
|
||
|
|
||
|
getContractList
|
||
|
===
|
||
|
|
||
|
* 查询可以新增发票传输的购销合同
|
||
|
|
||
|
select
|
||
|
t.contract_no, t.id contract_id, t.contract_amount, t.contract_time, t.pay_time,t.buyer_id,t.seller_id,
|
||
|
t3.protocol_end_time,
|
||
|
t4.telephone buyer_telephone, t4.corporation buyer_corporation,
|
||
|
t4.address buyer_address, t4.account buyer_account,
|
||
|
t4.telephone seller_telephone, t4.corporation seller_corporation,
|
||
|
t4.address seller_address, t4.account seller_account
|
||
|
from contracts_purchase_sales t
|
||
|
left join invoice t2 on t2.contract_id = t.id
|
||
|
join protocols t3 on t3.contract_id = t.id
|
||
|
join materials t4 on t4.id = t.buyer_id
|
||
|
join materials t5 on t5.id = t.seller_id
|
||
|
where t2.contract_no is null and t3.protocol_status > 1
|
||
|
#use("queryCondition")#
|
||
|
|