应付模块菜单调整,新增应付费用编辑等
This commit is contained in:
@@ -32,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="cooperationStartDate" column="cooperation_start_date" />
|
||||
<result property="contractEndDate" column="contract_end_date" />
|
||||
<result property="cooperationStatus" column="cooperation_status" />
|
||||
<result property="dataSource" column="data_source" />
|
||||
<result property="channelIds" column="channel_ids" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
@@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
s.is_enable, s.purchaser_user_id, s.purchaser_user, s.settlement_user_id, s.settlement_user,
|
||||
s.service_user_id, s.service_user, s.ed, s.zq, s.settlement_type, s.temp_ed, s.account_balance,
|
||||
s.foreign_currency_balance, s.credit_ed, s.weight_threshold, s.throw_ratio, s.cooperation_start_date,
|
||||
s.contract_end_date, s.cooperation_status, s.channel_ids, s.remark,
|
||||
s.contract_end_date, s.cooperation_status, s.data_source, s.channel_ids, s.remark,
|
||||
s.create_by, s.create_time, s.update_by, s.update_time, s.del_flag
|
||||
from sup_supplier s
|
||||
<!-- 数据权限:采购/销售(仅本人 s.purchaser_user_id)/部门经理(本部门 su.dept_id);
|
||||
@@ -124,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="cooperationStartDate != null">cooperation_start_date,</if>
|
||||
<if test="contractEndDate != null">contract_end_date,</if>
|
||||
<if test="cooperationStatus != null">cooperation_status,</if>
|
||||
<if test="dataSource != null">data_source,</if>
|
||||
<if test="channelIds != null">channel_ids,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
@@ -157,6 +159,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="cooperationStartDate != null">#{cooperationStartDate},</if>
|
||||
<if test="contractEndDate != null">#{contractEndDate},</if>
|
||||
<if test="cooperationStatus != null">#{cooperationStatus},</if>
|
||||
<if test="dataSource != null">#{dataSource},</if>
|
||||
<if test="channelIds != null">#{channelIds},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
@@ -194,6 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="cooperationStartDate != null">cooperation_start_date = #{cooperationStartDate},</if>
|
||||
contract_end_date = #{contractEndDate},
|
||||
<if test="cooperationStatus != null">cooperation_status = #{cooperationStatus},</if>
|
||||
data_source = #{dataSource},
|
||||
<if test="channelIds != null">channel_ids = #{channelIds},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
@@ -203,6 +207,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where supplier_id = #{supplierId}
|
||||
</update>
|
||||
|
||||
<update id="updateSupplierChannels" parameterType="com.bms.customer.supplierinfo.domain.BmsSupplier">
|
||||
update sup_supplier
|
||||
set channel_ids = #{channelIds},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
where supplier_id = #{supplierId}
|
||||
and del_flag = '0'
|
||||
</update>
|
||||
|
||||
<delete id="deleteBmsSupplierBySupplierId" parameterType="Long">
|
||||
delete from sup_supplier where supplier_id = #{supplierId}
|
||||
</delete>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bms.price.mapper.PayOrderListMapper">
|
||||
|
||||
<sql id="orderColumns">
|
||||
select p.bill_id as billId,
|
||||
p.order_no as orderNo,
|
||||
nullif(trim(e.air_no_old), '') as ladingNo,
|
||||
p.tracking_no as trackingNo,
|
||||
p.customer_name as customerName,
|
||||
p.product_name as productName,
|
||||
p.country_name as countryName,
|
||||
p.product_floor as channelName,
|
||||
p.charge_weight as chargeWeight,
|
||||
ifnull(b.pay_total, p.pay_total) as payTotal,
|
||||
p.currency as currency,
|
||||
b.pay_calc_status as payCalcStatus,
|
||||
b.pay_calc_msg as payCalcMsg,
|
||||
p.biz_date as bizDate
|
||||
from prc_order_bill p
|
||||
left join prc_order_bill_ext e on e.bill_id = p.bill_id
|
||||
left join prc_pay_bill b on b.bill_id = p.bill_id
|
||||
</sql>
|
||||
|
||||
<select id="selectList" resultType="com.bms.price.domain.PayOrderRow">
|
||||
<include refid="orderColumns"/>
|
||||
<where>
|
||||
<if test="orderNos != null and orderNos.size() > 0">
|
||||
and p.order_no in
|
||||
<foreach collection="orderNos" item="no" open="(" separator="," close=")">#{no}</foreach>
|
||||
</if>
|
||||
<if test="(orderNos == null or orderNos.size() == 0) and orderNo != null and orderNo != ''">
|
||||
and p.order_no like concat('%', #{orderNo}, '%')
|
||||
</if>
|
||||
<if test="ladingNo != null and ladingNo != ''">
|
||||
and trim(e.air_no_old) like concat('%', #{ladingNo}, '%')
|
||||
</if>
|
||||
<if test="customerName != null and customerName != ''">
|
||||
and (p.customer_name like concat('%', #{customerName}, '%')
|
||||
or p.customer_code like concat('%', #{customerName}, '%'))
|
||||
</if>
|
||||
</where>
|
||||
order by p.create_time desc, p.bill_id desc
|
||||
</select>
|
||||
|
||||
<select id="selectRow" resultType="com.bms.price.domain.PayOrderRow">
|
||||
<include refid="orderColumns"/>
|
||||
where p.bill_id = #{billId}
|
||||
</select>
|
||||
|
||||
<select id="selectByOrderNos" resultType="com.bms.price.domain.PayOrderRow">
|
||||
select p.bill_id as billId,
|
||||
p.order_no as orderNo,
|
||||
nullif(trim(e.air_no_old), '') as ladingNo
|
||||
from prc_order_bill p
|
||||
left join prc_order_bill_ext e on e.bill_id = p.bill_id
|
||||
where p.order_no in
|
||||
<foreach collection="orderNos" item="no" open="(" separator="," close=")">#{no}</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectByLadingNos" resultType="com.bms.price.domain.PayOrderRow">
|
||||
select p.bill_id as billId,
|
||||
p.order_no as orderNo,
|
||||
nullif(trim(e.air_no_old), '') as ladingNo
|
||||
from prc_order_bill p
|
||||
left join prc_order_bill_ext e on e.bill_id = p.bill_id
|
||||
where trim(e.air_no_old) in
|
||||
<foreach collection="ladingNos" item="no" open="(" separator="," close=")">#{no}</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bms.price.mapper.PrcPayBillFeeLogMapper">
|
||||
|
||||
<resultMap type="PrcPayBillFeeLog" id="PrcPayBillFeeLogResult">
|
||||
<id property="logId" column="log_id" />
|
||||
<result property="feeId" column="fee_id" />
|
||||
<result property="billId" column="bill_id" />
|
||||
<result property="feeName" column="fee_name" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="currency" column="currency" />
|
||||
<result property="operationType" column="operation_type" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertBatch">
|
||||
insert into prc_pay_bill_fee_log (
|
||||
fee_id, bill_id, fee_name, amount, currency, operation_type, create_by, create_time
|
||||
) values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.feeId}, #{item.billId}, #{item.feeName}, #{item.amount}, #{item.currency},
|
||||
#{item.operationType}, #{item.createBy}, sysdate())
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="selectByBillId" resultMap="PrcPayBillFeeLogResult">
|
||||
select log_id, fee_id, bill_id, fee_name, amount, currency, operation_type, create_by, create_time
|
||||
from prc_pay_bill_fee_log
|
||||
where bill_id = #{billId}
|
||||
order by log_id desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -19,35 +19,91 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="remark" column="remark" />
|
||||
<result property="sourceId" column="source_id" />
|
||||
<result property="isDeleted" column="is_deleted" />
|
||||
<result property="statementLineId" column="statement_line_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="feeItemName">
|
||||
case
|
||||
when f.fee_source = 'MANUAL' and nullif(trim(f.fee_name), '') is not null then f.fee_name
|
||||
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(f.fee_name), '') is not null then f.fee_name
|
||||
when nullif(trim(dict.dict_label), '') is not null then dict.dict_label
|
||||
else f.fee_type
|
||||
end
|
||||
</sql>
|
||||
|
||||
<sql id="feeItemJoin">
|
||||
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
|
||||
</sql>
|
||||
|
||||
<select id="selectByBillId" parameterType="Long" resultMap="PrcPayBillFeeResult">
|
||||
select fee_id, bill_id, pay_bill_id, fee_type, fee_name, sc_id, fee_level, amount, currency, round_mode, remark,
|
||||
fee_source, source_id, is_deleted, create_time
|
||||
from prc_pay_bill_fee
|
||||
where bill_id = #{billId}
|
||||
and is_deleted = '0'
|
||||
order by field(fee_type, 'BASIC_FREIGHT', 'REGISTRATION_FEE', 'SURCHARGE', 'REFUND'), fee_id
|
||||
select f.fee_id, f.bill_id, f.pay_bill_id, f.fee_type, <include refid="feeItemName"/> as fee_name,
|
||||
f.sc_id, f.fee_level, f.amount, f.currency, f.round_mode, f.remark,
|
||||
f.fee_source, f.source_id, f.is_deleted, f.statement_line_id,
|
||||
f.create_by, f.create_time, f.update_by, f.update_time
|
||||
from prc_pay_bill_fee f
|
||||
<include refid="feeItemJoin"/>
|
||||
where f.bill_id = #{billId}
|
||||
and f.is_deleted = '0'
|
||||
order by field(f.fee_type, 'BASIC_FREIGHT', 'REGISTRATION_FEE', 'SURCHARGE', 'REFUND', 'ADJUST'), f.fee_id
|
||||
</select>
|
||||
|
||||
<select id="selectByFeeId" resultMap="PrcPayBillFeeResult">
|
||||
select f.fee_id, f.bill_id, f.pay_bill_id, f.fee_type, <include refid="feeItemName"/> as fee_name,
|
||||
f.sc_id, f.fee_level, f.amount, f.currency, f.round_mode, f.remark,
|
||||
f.fee_source, f.source_id, f.is_deleted, f.statement_line_id,
|
||||
f.create_by, f.create_time, f.update_by, f.update_time
|
||||
from prc_pay_bill_fee f
|
||||
<include refid="feeItemJoin"/>
|
||||
where f.fee_id = #{feeId}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertManual" parameterType="PrcPayBillFee">
|
||||
insert into prc_pay_bill_fee (
|
||||
fee_id, bill_id, pay_bill_id, fee_type, fee_name, sc_id, fee_level, amount, currency, remark,
|
||||
fee_source, is_deleted, create_by, create_time, update_by, update_time
|
||||
) values (
|
||||
#{feeId}, #{billId}, #{payBillId}, #{feeType}, #{feeName}, #{scId}, #{feeLevel}, #{amount}, #{currency}, #{remark},
|
||||
'MANUAL', '0', #{createBy}, sysdate(), #{updateBy}, sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="markFeeDeleted">
|
||||
update prc_pay_bill_fee
|
||||
set is_deleted = '1',
|
||||
update_by = #{operator},
|
||||
update_time = sysdate()
|
||||
where fee_id = #{feeId}
|
||||
and ifnull(is_deleted, '0') = '0'
|
||||
and statement_line_id is null
|
||||
</update>
|
||||
|
||||
<insert id="insertPrcPayBillFee" parameterType="PrcPayBillFee">
|
||||
insert into prc_pay_bill_fee (
|
||||
fee_id, bill_id, pay_bill_id, fee_type, fee_name, sc_id, fee_level, amount, currency, round_mode, remark,
|
||||
fee_id, bill_id, pay_bill_id, fee_type, sc_id, fee_level, amount, currency, round_mode, remark,
|
||||
fee_source, source_id, is_deleted, create_time
|
||||
) values (
|
||||
#{feeId}, #{billId}, #{payBillId}, #{feeType}, #{feeName}, #{scId}, #{feeLevel}, #{amount}, #{currency}, #{roundMode}, #{remark},
|
||||
#{feeId}, #{billId}, #{payBillId}, #{feeType}, #{scId}, #{feeLevel}, #{amount}, #{currency}, #{roundMode}, #{remark},
|
||||
ifnull(#{feeSource}, 'CALC'), #{sourceId}, ifnull(#{isDeleted}, '0'), sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
insert into prc_pay_bill_fee (
|
||||
fee_id, bill_id, pay_bill_id, fee_type, fee_name, sc_id, fee_level, amount, currency, round_mode, remark,
|
||||
fee_id, bill_id, pay_bill_id, fee_type, sc_id, fee_level, amount, currency, round_mode, remark,
|
||||
fee_source, source_id, is_deleted, create_time
|
||||
) values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.feeId}, #{item.billId}, #{item.payBillId}, #{item.feeType}, #{item.feeName}, #{item.scId}, #{item.feeLevel},
|
||||
(#{item.feeId}, #{item.billId}, #{item.payBillId}, #{item.feeType}, #{item.scId}, #{item.feeLevel},
|
||||
#{item.amount}, #{item.currency}, #{item.roundMode}, #{item.remark}, ifnull(#{item.feeSource}, 'CALC'),
|
||||
#{item.sourceId}, ifnull(#{item.isDeleted}, '0'), sysdate())
|
||||
</foreach>
|
||||
@@ -83,6 +139,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and bill_id is not null
|
||||
</select>
|
||||
|
||||
<select id="selectAliveByLadingFee" resultMap="PrcPayBillFeeResult">
|
||||
select f.fee_id, f.bill_id, f.pay_bill_id, f.fee_type, <include refid="feeItemName"/> as fee_name,
|
||||
f.sc_id, f.fee_level, f.amount, f.currency, f.round_mode, f.remark,
|
||||
f.fee_source, f.source_id, f.is_deleted, f.statement_line_id,
|
||||
f.create_by, f.create_time, f.update_by, f.update_time
|
||||
from prc_pay_bill_fee f
|
||||
<include refid="feeItemJoin"/>
|
||||
where f.fee_source = 'LADING'
|
||||
and f.sc_id = #{feeId}
|
||||
and ifnull(f.is_deleted, '0') = '0'
|
||||
</select>
|
||||
|
||||
<update id="markLadingFeeDeleted">
|
||||
update prc_pay_bill_fee
|
||||
set is_deleted = '1'
|
||||
@@ -91,13 +159,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and ifnull(is_deleted, '0') = '0'
|
||||
</update>
|
||||
|
||||
<update id="fillSourceIdByFeeIds">
|
||||
update prc_pay_bill_fee
|
||||
set source_id = fee_id
|
||||
where (source_id is null or source_id = '')
|
||||
and fee_id in
|
||||
<foreach collection="feeIds" item="feeId" open="(" separator="," close=")">#{feeId}</foreach>
|
||||
</update>
|
||||
<select id="countSettledCalc" resultType="int">
|
||||
select count(1)
|
||||
from prc_pay_bill_fee
|
||||
where bill_id = #{billId}
|
||||
and ifnull(is_deleted, '0') = '0'
|
||||
and (fee_source is null or fee_source = '' or fee_source = 'CALC')
|
||||
and statement_line_id is not null
|
||||
</select>
|
||||
|
||||
<delete id="deleteByBillId" parameterType="Long">
|
||||
delete from prc_pay_bill_fee
|
||||
|
||||
@@ -129,7 +129,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<foreach collection="billIds" item="billId" open="(" separator="," close=")">#{billId}</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="deleteByBillId" parameterType="Long">
|
||||
<update id="markCalcStatus">
|
||||
update prc_pay_bill
|
||||
set pay_calc_status = #{status},
|
||||
pay_calc_msg = #{message},
|
||||
update_by = #{operator},
|
||||
update_time = sysdate()
|
||||
where bill_id = #{billId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByBillId" parameterType="String">
|
||||
delete from prc_pay_bill where bill_id = #{billId}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
<select id="selectPendingFees" resultType="com.bms.price.airbill.domain.SrvBillAirAllocFee">
|
||||
select f.id, f.bill_code as billCode, a.guid as ladingId, f.fee_level as feeLevel,
|
||||
f.bill_fee_status as billFeeStatus, sc.sc_name as feeName, f.price, f.currency,
|
||||
f.bill_fee_status as billFeeStatus, f.fee_type as feeType, sc.sc_name as feeName, f.price, f.currency,
|
||||
f.alloc_dim as allocDim
|
||||
from srv_bill_air_fee f
|
||||
left join srv_bill_air a on a.bill_code = f.bill_code
|
||||
left join prc_surcharge sc on sc.sc_id = f.fee_type and ifnull(sc.is_del, '0') = '0'
|
||||
left join prc_surcharge sc on sc.sc_id = f.sc_id and ifnull(sc.is_del, '0') = '0'
|
||||
where f.del_flag = '0'
|
||||
and f.bill_fee_status = '0'
|
||||
and f.bill_code in
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
<mapper namespace="com.bms.price.mapper.SrvBillAirFeeMapper">
|
||||
|
||||
<select id="selectByBillCode" resultType="com.bms.price.airbill.domain.SrvBillAirFee">
|
||||
select f.id, f.bill_code as billCode, f.fee_type as feeType, sc.sc_name as feeName,
|
||||
select f.id, f.bill_code as billCode, f.fee_type as feeType, f.sc_id as scId, sc.sc_name as feeName,
|
||||
f.fee_level as feeLevel, f.bill_fee_status as billFeeStatus,
|
||||
f.alloc_flag as allocFlag, f.alloc_dim as allocDim, f.price, f.currency, f.remark,
|
||||
f.create_by as createBy, f.create_time as createTime, f.update_by as updateBy,
|
||||
f.update_time as updateTime, f.del_flag as delFlag
|
||||
from srv_bill_air_fee f
|
||||
left join prc_surcharge sc on sc.sc_id = f.fee_type and ifnull(sc.is_del, '0') = '0'
|
||||
left join prc_surcharge sc on sc.sc_id = f.sc_id and ifnull(sc.is_del, '0') = '0'
|
||||
where f.bill_code = #{billCode}
|
||||
and f.del_flag = '0'
|
||||
and ifnull(f.bill_fee_status, '0') <> '2'
|
||||
@@ -28,13 +28,13 @@
|
||||
</sql>
|
||||
|
||||
<select id="selectRoleFees" parameterType="com.bms.price.airbill.domain.SrvBillAirRoleFeeQuery" resultType="com.bms.price.airbill.domain.SrvBillAirFee">
|
||||
select f.id, f.bill_code as billCode, f.fee_type as feeType, sc.sc_name as feeName,
|
||||
select f.id, f.bill_code as billCode, f.fee_type as feeType, f.sc_id as scId, sc.sc_name as feeName,
|
||||
f.fee_level as feeLevel, f.fee_scene as feeScene, f.bill_fee_status as billFeeStatus,
|
||||
f.alloc_flag as allocFlag, f.alloc_dim as allocDim, f.price, f.currency, f.remark,
|
||||
f.create_by as createBy, f.create_time as createTime, f.update_by as updateBy,
|
||||
f.update_time as updateTime, f.del_flag as delFlag
|
||||
from srv_bill_air_fee f
|
||||
left join prc_surcharge sc on sc.sc_id = f.fee_type and ifnull(sc.is_del, '0') = '0'
|
||||
left join prc_surcharge sc on sc.sc_id = f.sc_id and ifnull(sc.is_del, '0') = '0'
|
||||
where f.del_flag = '0'
|
||||
and ifnull(f.bill_fee_status, '0') <> '2'
|
||||
and f.fee_scene = #{feeScene}
|
||||
@@ -64,13 +64,13 @@
|
||||
</select>
|
||||
|
||||
<select id="selectLive" resultType="com.bms.price.airbill.domain.SrvBillAirFee">
|
||||
select f.id, f.bill_code as billCode, f.fee_type as feeType, sc.sc_name as feeName,
|
||||
select f.id, f.bill_code as billCode, f.fee_type as feeType, f.sc_id as scId, sc.sc_name as feeName,
|
||||
f.fee_level as feeLevel, f.bill_fee_status as billFeeStatus,
|
||||
f.alloc_flag as allocFlag, f.alloc_dim as allocDim, f.price, f.currency, f.remark,
|
||||
f.create_by as createBy, f.create_time as createTime, f.update_by as updateBy,
|
||||
f.update_time as updateTime, f.del_flag as delFlag
|
||||
from srv_bill_air_fee f
|
||||
left join prc_surcharge sc on sc.sc_id = f.fee_type and ifnull(sc.is_del, '0') = '0'
|
||||
left join prc_surcharge sc on sc.sc_id = f.sc_id and ifnull(sc.is_del, '0') = '0'
|
||||
where f.id = #{id}
|
||||
and f.bill_code = #{billCode}
|
||||
and f.del_flag = '0'
|
||||
@@ -79,10 +79,10 @@
|
||||
|
||||
<insert id="insertFee" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into srv_bill_air_fee (
|
||||
bill_code, fee_type, fee_level, fee_scene, bill_fee_status, alloc_flag, alloc_dim, price, currency, remark,
|
||||
bill_code, fee_type, sc_id, fee_level, fee_scene, bill_fee_status, alloc_flag, alloc_dim, price, currency, remark,
|
||||
create_by, create_time, update_by, update_time, del_flag
|
||||
) values (
|
||||
#{billCode}, #{feeType}, #{feeLevel}, #{feeScene}, '0', #{allocFlag}, #{allocDim}, #{price}, #{currency}, #{remark},
|
||||
#{billCode}, #{feeType}, #{scId}, #{feeLevel}, #{feeScene}, '0', #{allocFlag}, #{allocDim}, #{price}, #{currency}, #{remark},
|
||||
#{createBy}, #{createTime}, #{updateBy}, #{updateTime}, '0'
|
||||
)
|
||||
</insert>
|
||||
@@ -90,6 +90,7 @@
|
||||
<update id="updateFee">
|
||||
update srv_bill_air_fee
|
||||
set fee_type = #{feeType},
|
||||
sc_id = #{scId},
|
||||
fee_level = #{feeLevel},
|
||||
alloc_flag = #{allocFlag},
|
||||
alloc_dim = #{allocDim},
|
||||
|
||||
Reference in New Issue
Block a user