应付模块菜单调整,新增应付费用编辑等
This commit is contained in:
@@ -58,9 +58,20 @@
|
||||
o.product_name as productName, o.country_code as countryCode, o.country_name as countryName,
|
||||
o.dest_postcode as destPostcode, e.air_no_old as ladingNo, e.product_floor as channelName,
|
||||
e.supplier_name as supplierName,
|
||||
(select group_concat(concat(ifnull(nullif(trim(f.fee_name), ''), ifnull(f.fee_type, '费用')), ' ', format(f.amount, 2))
|
||||
order by field(f.fee_type, 'BASIC_FREIGHT', 'REGISTRATION_FEE', 'SURCHARGE', 'REFUND'), f.fee_id separator ';')
|
||||
from prc_pay_bill_fee f where f.bill_id = o.bill_id and f.is_deleted = '0') as feeText,
|
||||
(select group_concat(concat(
|
||||
case
|
||||
when f.fee_source = 'LADING' and nullif(trim(air_sc.sc_name), '') is not null then air_sc.sc_name
|
||||
when f.fee_type = 'SURCHARGE' and nullif(trim(item_sc.sc_name), '') is not null then item_sc.sc_name
|
||||
when nullif(trim(dict.dict_label), '') is not null then dict.dict_label
|
||||
else ifnull(f.fee_type, '费用')
|
||||
end, ' ', format(f.amount, 2))
|
||||
order by field(f.fee_type, 'BASIC_FREIGHT', 'REGISTRATION_FEE', 'SURCHARGE', 'REFUND', 'ADJUST'), f.fee_id separator ';')
|
||||
from prc_pay_bill_fee f
|
||||
left join srv_bill_air_fee air on f.fee_source = 'LADING' and air.id = f.sc_id
|
||||
left join prc_surcharge air_sc on air_sc.sc_id = air.sc_id
|
||||
left join prc_surcharge item_sc on ifnull(f.fee_source, '') <> 'LADING' and item_sc.sc_id = f.sc_id
|
||||
left join sys_dict_data dict on dict.dict_type = 'bms_fee_type' and dict.dict_value = f.fee_type
|
||||
where f.bill_id = o.bill_id and f.is_deleted = '0') as feeText,
|
||||
(select count(*) from prc_pay_bill_fee f
|
||||
where f.bill_id = o.bill_id and ifnull(f.is_deleted, '0') = '0') as feeCount,
|
||||
(select count(*) from prc_pay_bill_fee f
|
||||
@@ -106,14 +117,24 @@
|
||||
</select>
|
||||
|
||||
<select id="selectOrderFees" resultType="com.bms.price.domain.PrcPayBillFee">
|
||||
select fee_id as feeId, bill_id as billId, pay_bill_id as payBillId, fee_type as feeType, fee_name as feeName,
|
||||
sc_id as scId, fee_level as feeLevel, amount, currency, fee_source as feeSource, source_id as sourceId,
|
||||
is_deleted as isDeleted
|
||||
from prc_pay_bill_fee
|
||||
where is_deleted = '0'
|
||||
and bill_id in
|
||||
select f.fee_id as feeId, f.bill_id as billId, f.pay_bill_id as payBillId, f.fee_type as feeType,
|
||||
case
|
||||
when f.fee_source = 'LADING' and nullif(trim(air_sc.sc_name), '') is not null then air_sc.sc_name
|
||||
when f.fee_type = 'SURCHARGE' and nullif(trim(item_sc.sc_name), '') is not null then item_sc.sc_name
|
||||
when nullif(trim(dict.dict_label), '') is not null then dict.dict_label
|
||||
else f.fee_type
|
||||
end as feeName,
|
||||
f.sc_id as scId, f.fee_level as feeLevel, f.amount, f.currency, f.fee_source as feeSource, f.source_id as sourceId,
|
||||
f.is_deleted as isDeleted
|
||||
from prc_pay_bill_fee f
|
||||
left join srv_bill_air_fee air on f.fee_source = 'LADING' and air.id = f.sc_id
|
||||
left join prc_surcharge air_sc on air_sc.sc_id = air.sc_id
|
||||
left join prc_surcharge item_sc on ifnull(f.fee_source, '') <> 'LADING' and item_sc.sc_id = f.sc_id
|
||||
left join sys_dict_data dict on dict.dict_type = 'bms_fee_type' and dict.dict_value = f.fee_type
|
||||
where f.is_deleted = '0'
|
||||
and f.bill_id in
|
||||
<foreach collection="billIds" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
order by bill_id, fee_id
|
||||
order by f.bill_id, f.fee_id
|
||||
</select>
|
||||
|
||||
<insert id="insertPayBill" useGeneratedKeys="true" keyProperty="billId">
|
||||
@@ -228,10 +249,20 @@
|
||||
|
||||
<select id="selectFreeFees" resultType="com.bms.price.domain.PrcPayBillFee">
|
||||
select f.fee_id as feeId, f.bill_id as billId, f.pay_bill_id as payBillId, f.fee_type as feeType,
|
||||
f.fee_name as feeName, f.sc_id as scId, f.fee_level as feeLevel, f.amount, f.currency,
|
||||
case
|
||||
when f.fee_source = 'LADING' and nullif(trim(air_sc.sc_name), '') is not null then air_sc.sc_name
|
||||
when f.fee_type = 'SURCHARGE' and nullif(trim(item_sc.sc_name), '') is not null then item_sc.sc_name
|
||||
when nullif(trim(dict.dict_label), '') is not null then dict.dict_label
|
||||
else f.fee_type
|
||||
end as feeName,
|
||||
f.sc_id as scId, f.fee_level as feeLevel, f.amount, f.currency,
|
||||
f.fee_source as feeSource, f.source_id as sourceId, f.settle_supplier_id as settleSupplierId,
|
||||
f.settle_supplier_name as settleSupplierName
|
||||
from prc_pay_bill_fee f
|
||||
left join srv_bill_air_fee air on f.fee_source = 'LADING' and air.id = f.sc_id
|
||||
left join prc_surcharge air_sc on air_sc.sc_id = air.sc_id
|
||||
left join prc_surcharge item_sc on ifnull(f.fee_source, '') <> 'LADING' and item_sc.sc_id = f.sc_id
|
||||
left join sys_dict_data dict on dict.dict_type = 'bms_fee_type' and dict.dict_value = f.fee_type
|
||||
where ifnull(f.is_deleted, '0') = '0'
|
||||
and f.statement_line_id is null
|
||||
and f.bill_id in
|
||||
|
||||
Reference in New Issue
Block a user