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.

81 lines
1.7 KiB
Markdown

queryCondition
===
* 查询条件
@if(!isEmpty(examinationId)){
and t.examination_id =#examinationId#
@}
@if(!isEmpty(flowId)){
and t.flow_id =#flowId#
@}
@ if(!isEmpty(sellerId)){
and t.seller_id = #sellerId#
@}
@ if(!isEmpty(sellerName)){
and t.seller_name like #'%'+sellerName+'%'#
@}
@ if(!isEmpty(inWarehouseStatus)){
and t.in_warehouse_status like #'%'+inWarehouseStatus+'%'#
@}
pageQueryByCondition
===
* 分页查询
select
@pageTag(){
t.*,
t2.bank_name, t2.express_id, t2.express_name, t2.protocol_no, t2.contract_id,
t3.total_sell_price
@}
from warehouse_receipt t
join protocols t2 on t2.id = t.protocol_id
left join contracts_purchase_sales t3 on t2.contract_id = t3.id
where 1 = 1
#use("queryCondition")#
@ if(!isEmpty(inWarehouseStatusGreater)){
and t.in_warehouse_status > #inWarehouseStatusGreater#
@}
getNewWarehouseReceiptSendProductList
===
* 保兑仓 可新增入库的发货列表
select
t.send_no, t.protocol_id, t.protocol_no,t.accept_time,
t.seller_name, t.contract_id, t.express_id, t.express_name,
t3.financing_start_time, t3.financing_end_time,
t4.address express_address,
t5.account seller_account
from send_products t
left join warehouse_receipt t2 on t.protocol_id = t2.protocol_id
join financings t3 on t.protocol_id = t3.protocol_id
join materials t4 on t4.id = t.express_id
join materials t5 on t5.id = t.seller_id
where t.send_status = 2 and t2.protocol_id is null
@if(!isEmpty(examinationId)){
and t.examination_id =#examinationId#
@}
@if(!isEmpty(flowId)){
and t.flow_id =#flowId#
@}
getInWarehouseFileData
===
* 查询质物清单
select
t.in_warehouse_file_data
from warehouse_receipt t
join protocols t2 on t2.id = t.protocol_id
join financings t3 on t3.protocol_no = t2.protocol_no
where t3.id = #financingId#