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.
97 lines
1.9 KiB
Markdown
97 lines
1.9 KiB
Markdown
2 years ago
|
queryCondition
|
||
|
===
|
||
|
|
||
|
* 查询条件
|
||
|
|
||
|
@if(!isEmpty(examinationId)){
|
||
|
and t.examination_id =#examinationId#
|
||
|
@}
|
||
|
@if(!isEmpty(flowId)){
|
||
|
and t.flow_id =#flowId#
|
||
|
@}
|
||
|
@if(!isEmpty(instanceId)){
|
||
|
and t.instance_id =#instanceId#
|
||
|
@}
|
||
|
@if(!isEmpty(repaymentNo)){
|
||
|
and t.repayment_no =#repaymentNo#
|
||
|
@}
|
||
|
@if(!isEmpty(repaymentStatus)){
|
||
|
and t.repayment_status =#repaymentStatus#
|
||
|
@}
|
||
|
@if(!isEmpty(repaymentType)){
|
||
|
and t.repayment_type =#repaymentType#
|
||
|
@}
|
||
|
@if(!isEmpty(sellerName)){
|
||
|
and (
|
||
|
t3.seller_name like #'%'+sellerName+'%'#
|
||
|
or t3.buyer_name like #'%'+sellerName+'%'#
|
||
|
)
|
||
|
@}
|
||
|
@if(!isEmpty(buyerName)){
|
||
|
and t3.buyer_name like #'%'+buyerName+'%'#
|
||
|
@}
|
||
|
|
||
|
|
||
|
|
||
|
pageQueryByCondition
|
||
|
===
|
||
|
|
||
|
* 根据不为空的参数进行分页查询
|
||
|
|
||
|
select
|
||
|
@pageTag(){
|
||
|
t.*, t2.fk_amount, t2.bank_name, t2.yfzk_amount,
|
||
|
t3.buyer_name, t3.seller_name, t3.contract_no,
|
||
|
t4.telephone buyer_telephone, t4.corporation buyer_corporation
|
||
|
@}
|
||
|
from repayments t
|
||
|
join financings t2 on t2.financing_no = t.financing_no
|
||
|
join contracts_purchase_sales t3 on t3.id = t2.contract_id
|
||
|
join materials t4 on t4.id = t3.buyer_id
|
||
|
where 1=1
|
||
|
#use("queryCondition")#
|
||
|
|
||
|
order by t.id desc
|
||
|
|
||
|
|
||
|
chzyPageQueryByCondition
|
||
|
===
|
||
|
|
||
|
* 根据不为空的参数进行分页查询
|
||
|
|
||
|
select
|
||
|
@pageTag(){
|
||
|
t.*, t2.fk_amount, t2.bank_name, t2.seller_name, t2.seller_id,
|
||
|
t4.telephone seller_telephone, t4.corporation seller_corporation
|
||
|
@}
|
||
|
from repayments t
|
||
|
join financings t2 on t2.financing_no = t.financing_no
|
||
|
join materials t4 on t4.id = t2.seller_id
|
||
|
where 1=1
|
||
|
@if(!isEmpty(examinationId)){
|
||
|
and t.examination_id =#examinationId#
|
||
|
@}
|
||
|
@if(!isEmpty(flowId)){
|
||
|
and t.flow_id =#flowId#
|
||
|
@}
|
||
|
@if(!isEmpty(instanceId)){
|
||
|
and t.instance_id =#instanceId#
|
||
|
@}
|
||
|
@if(!isEmpty(sellerName)){
|
||
|
and t2.seller_name like #'%'+sellerName+'%'#
|
||
|
@}
|
||
|
|
||
|
order by t.id desc
|
||
|
|
||
|
|
||
|
getRepaymentAmount
|
||
|
===
|
||
|
|
||
|
* 根据贷款编号查询已还款总额
|
||
|
|
||
|
select
|
||
|
sum(t.repayment_amount) repayment_amount
|
||
|
from repayments t
|
||
|
where financing_no = #financingNo#
|
||
|
|