调整命名
This commit is contained in:
+1
-1
@@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="query.params != null and query.params.endTime != null and query.params.endTime != ''">
|
||||
and date_format(w.writeoff_date,'%y%m%d') <= date_format(#{query.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
<include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>
|
||||
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/>
|
||||
</where>
|
||||
order by w.create_time desc, w.writeoff_id desc
|
||||
</select>
|
||||
+1
-1
@@ -102,7 +102,7 @@
|
||||
inner join ar_bill_detail d on d.detail_id = f.detail_id
|
||||
where d.ar_bill_id = #{arBillId}
|
||||
and f.detail_id = #{detailId}
|
||||
AND EXISTS (SELECT 1 FROM ar_bill b WHERE b.ar_bill_id = d.ar_bill_id <include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>)
|
||||
AND EXISTS (SELECT 1 FROM ar_bill b WHERE b.ar_bill_id = d.ar_bill_id <include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/>)
|
||||
order by f.fee_no, f.detail_fee_id
|
||||
</select>
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
product_code, product_name, goods_description, country_code, country_name, dest_postcode,
|
||||
actual_weight, receive_weight, volume_weight, charge_weight, freight_rate, registration_fee, pkg_length, pkg_width, pkg_height,
|
||||
currency, total_amount, product_amount, redline_amount, billing_fail_status, remark, create_by, create_time
|
||||
from ar_bill_detail where ar_bill_id = #{arBillId} AND EXISTS (SELECT 1 FROM ar_bill b WHERE b.ar_bill_id = ar_bill_detail.ar_bill_id <include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>)
|
||||
from ar_bill_detail where ar_bill_id = #{arBillId} AND EXISTS (SELECT 1 FROM ar_bill b WHERE b.ar_bill_id = ar_bill_detail.ar_bill_id <include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/>)
|
||||
order by detail_no
|
||||
</select>
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@
|
||||
where create_by = #{createBy}
|
||||
and status in ('WAITING', 'RUNNING', 'CANCEL_REQUESTED')
|
||||
AND EXISTS (SELECT 1 FROM ar_bill b WHERE b.ar_bill_id = ar_bill_generate_task.ar_bill_id
|
||||
<include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>)
|
||||
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/>)
|
||||
order by create_time desc, task_id desc
|
||||
</select>
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@
|
||||
</if>
|
||||
<if test="query.requestId != null and query.requestId != ''">and l.request_id = #{query.requestId}</if>
|
||||
<if test="query.result != null and query.result != ''">and l.result = #{query.result}</if>
|
||||
<include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>
|
||||
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/>
|
||||
</where>
|
||||
order by l.create_time desc, l.log_id desc
|
||||
</select>
|
||||
+4
-4
@@ -39,7 +39,7 @@
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ArBillSummaryResult" type="com.bms.ar.domain.vo.ArBillSummary">
|
||||
<resultMap id="ArBillSummaryResult" type="com.bms.receivable.domain.vo.ArBillSummary">
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="writtenOffAmount" column="written_off_amount"/>
|
||||
<result property="unwrittenAmount" column="unwritten_amount"/>
|
||||
@@ -106,7 +106,7 @@
|
||||
<if test="query.billDateStart != null">and bill_date >= #{query.billDateStart}</if>
|
||||
<if test="query.billDateEnd != null">and bill_date <= #{query.billDateEnd}</if>
|
||||
<if test="query.billPeriodEnd != null">and bill_period_end = #{query.billPeriodEnd}</if>
|
||||
<include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>
|
||||
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
<select id="selectArBillByIdScoped" resultMap="ArBillResult">
|
||||
select b.* from ar_bill b where b.ar_bill_id = #{arBillId}
|
||||
<include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>
|
||||
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/>
|
||||
</select>
|
||||
|
||||
<select id="selectArBillByBillNo" parameterType="string" resultMap="ArBillResult">
|
||||
@@ -172,7 +172,7 @@
|
||||
and status in ('CONFIRMED', 'PARTIAL_WRITTEN_OFF')
|
||||
and (generation_status is null or generation_status = 'READY')
|
||||
and unwritten_amount > 0
|
||||
<include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>
|
||||
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.billScope"/>
|
||||
order by bill_date asc, ar_bill_id asc
|
||||
</select>
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
<when test="scope != null and scope.all"/>
|
||||
<otherwise>
|
||||
AND EXISTS (SELECT 1 FROM ctr_customer c WHERE c.customer_id = b.customer_id
|
||||
<include refid="com.bms.ar.mapper.ArBillScopeMapper.customerScope"/>
|
||||
<include refid="com.bms.receivable.mapper.ArBillScopeMapper.customerScope"/>
|
||||
)
|
||||
</otherwise>
|
||||
</choose>
|
||||
+7
-7
@@ -1,13 +1,13 @@
|
||||
<?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.ar.mapper.ArCommissionMapper">
|
||||
<resultMap id="rate" type="com.bms.ar.profit.ArCommissionRate">
|
||||
<resultMap id="rate" type="com.bms.receivable.profit.ArCommissionRate">
|
||||
<id property="rateId" column="rate_id"/><result property="salesUserId" column="sales_user_id"/>
|
||||
<result property="salesUserCode" column="sales_user_code"/><result property="salesUserName" column="sales_user_name"/>
|
||||
<result property="rate" column="rate"/><result property="effectiveAt" column="effective_at"/>
|
||||
<result property="createBy" column="create_by"/><result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
<resultMap id="missingRate" type="com.bms.ar.profit.ArWriteoffRate">
|
||||
<resultMap id="missingRate" type="com.bms.receivable.profit.ArWriteoffRate">
|
||||
<id property="writeoffId" column="writeoff_id"/><result property="arBillId" column="ar_bill_id"/>
|
||||
<result property="billNo" column="bill_no"/><result property="customerName" column="customer_name"/>
|
||||
<result property="salesUserId" column="sales_user_id"/><result property="salesUserName" column="sales_user_name"/>
|
||||
@@ -16,7 +16,7 @@
|
||||
<result property="status" column="status"/><result property="confirmedBy" column="confirmed_by"/>
|
||||
<result property="confirmedTime" column="confirmed_time"/><result property="remark" column="confirm_remark"/>
|
||||
</resultMap>
|
||||
<resultMap id="commissionResult" type="com.bms.ar.profit.ArCommissionResult">
|
||||
<resultMap id="commissionResult" type="com.bms.receivable.profit.ArCommissionResult">
|
||||
<id property="resultId" column="result_id"/><result property="arBillId" column="ar_bill_id"/>
|
||||
<result property="detailId" column="detail_id"/><result property="billNo" column="bill_no"/>
|
||||
<result property="orderNo" column="order_no"/><result property="salesUserName" column="sales_user_name"/>
|
||||
@@ -27,7 +27,7 @@
|
||||
<result property="salesUserId" column="sales_user_id"/><result property="weightedRate" column="weighted_rate"/>
|
||||
<result property="billAmount" column="bill_amount"/>
|
||||
</resultMap>
|
||||
<resultMap id="commissionSummary" type="com.bms.ar.profit.ArCommissionSummary">
|
||||
<resultMap id="commissionSummary" type="com.bms.receivable.profit.ArCommissionSummary">
|
||||
<result property="salesUserId" column="sales_user_id"/><result property="salesUserName" column="sales_user_name"/>
|
||||
<result property="currency" column="currency"/><result property="orderCount" column="order_count"/>
|
||||
<result property="pendingCount" column="pending_count"/><result property="commissionAmount" column="commission_amount"/>
|
||||
@@ -44,7 +44,7 @@
|
||||
where sales_user_id = #{salesUserId} and effective_at <= #{at}
|
||||
order by effective_at desc, rate_id desc limit 1 for update
|
||||
</select>
|
||||
<insert id="insertRate" parameterType="com.bms.ar.profit.ArCommissionRate" useGeneratedKeys="true" keyProperty="rateId">
|
||||
<insert id="insertRate" parameterType="com.bms.receivable.profit.ArCommissionRate" useGeneratedKeys="true" keyProperty="rateId">
|
||||
insert into ar_profit_commission_rate(sales_user_id, rate, effective_at, create_by, create_time, remark)
|
||||
values(#{salesUserId}, #{rate}, #{effectiveAt}, #{createBy}, sysdate(), #{remark})
|
||||
</insert>
|
||||
@@ -104,7 +104,7 @@
|
||||
<otherwise>and r.result_status != 'REVERSED' and b.status = 'WRITTEN_OFF' and b.generation_status = 'READY'</otherwise>
|
||||
</choose>
|
||||
<if test="billId != null">and r.ar_bill_id = #{billId}</if>
|
||||
<include refid="com.bms.ar.mapper.ArProfitMapper.scopeCondition"/>
|
||||
<include refid="com.bms.receivable.mapper.ArProfitMapper.scopeCondition"/>
|
||||
order by r.result_id desc
|
||||
</select>
|
||||
<select id="selectCommissionSummary" resultMap="commissionSummary">
|
||||
@@ -121,7 +121,7 @@
|
||||
from ar_profit_commission_result r join ar_bill b on b.ar_bill_id = r.ar_bill_id
|
||||
where r.result_status != 'REVERSED' and b.status = 'WRITTEN_OFF' and b.generation_status = 'READY'
|
||||
<if test="billId != null">and r.ar_bill_id = #{billId}</if>
|
||||
<include refid="com.bms.ar.mapper.ArProfitMapper.scopeCondition"/>
|
||||
<include refid="com.bms.receivable.mapper.ArProfitMapper.scopeCondition"/>
|
||||
group by r.sales_user_id, r.currency
|
||||
order by sales_user_name, r.currency
|
||||
</select>
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
<?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.ar.mapper.ArProfitMapper">
|
||||
<resultMap id="row" type="com.bms.ar.profit.ArProfitRow">
|
||||
<resultMap id="row" type="com.bms.receivable.profit.ArProfitRow">
|
||||
<id property="arBillId" column="ar_bill_id"/>
|
||||
<result property="billNo" column="bill_no"/><result property="billName" column="bill_name"/>
|
||||
<result property="billDate" column="bill_date"/>
|
||||
@@ -13,19 +13,19 @@
|
||||
<result property="salesGrossMarginRate" column="sales_gross_margin_rate"/>
|
||||
<result property="writtenOffAmount" column="written_off_amount"/><result property="unwrittenAmount" column="unwritten_amount"/>
|
||||
</resultMap>
|
||||
<resultMap id="summary" type="com.bms.ar.profit.ArProfitSummary">
|
||||
<resultMap id="summary" type="com.bms.receivable.profit.ArProfitSummary">
|
||||
<result property="currency" column="currency"/><result property="billCount" column="bill_count"/>
|
||||
<result property="salesAmount" column="sales_amount"/><result property="productAmount" column="product_amount"/>
|
||||
<result property="salesGrossProfit" column="sales_gross_profit"/><result property="salesGrossMarginRate" column="sales_gross_margin_rate"/>
|
||||
<result property="commissionAmount" column="commission_amount"/>
|
||||
<result property="writtenOffAmount" column="written_off_amount"/><result property="unwrittenAmount" column="unwritten_amount"/>
|
||||
</resultMap>
|
||||
<resultMap id="detail" type="com.bms.ar.domain.ArBillDetail">
|
||||
<resultMap id="detail" type="com.bms.receivable.domain.ArBillDetail">
|
||||
<id property="detailId" column="detail_id"/><result property="orderNo" column="order_no"/>
|
||||
<result property="productName" column="product_name"/><result property="currency" column="currency"/>
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
</resultMap>
|
||||
<resultMap id="fee" type="com.bms.ar.domain.ArBillDetailFee">
|
||||
<resultMap id="fee" type="com.bms.receivable.domain.ArBillDetailFee">
|
||||
<id property="detailFeeId" column="detail_fee_id"/><result property="detailId" column="detail_id"/>
|
||||
<result property="feeName" column="fee_name"/><result property="feeType" column="fee_type"/>
|
||||
<result property="amount" column="amount"/><result property="productAmount" column="product_amount"/>
|
||||
@@ -133,7 +133,7 @@
|
||||
) commission on commission.currency = t.currency
|
||||
group by t.currency order by t.currency
|
||||
</select>
|
||||
<select id="selectSalesOptions" resultType="com.bms.ar.profit.ArProfitSalesOption">
|
||||
<select id="selectSalesOptions" resultType="com.bms.receivable.profit.ArProfitSalesOption">
|
||||
select u.user_id as userId, u.nick_name as name, u.user_name as code
|
||||
from sys_user u
|
||||
where u.del_flag = '0' and u.status = '0'
|
||||
Reference in New Issue
Block a user