|
@@ -323,149 +323,15 @@
|
|
|
acc.is_deleted = '0'
|
|
acc.is_deleted = '0'
|
|
|
AND fee.is_deleted = '0'
|
|
AND fee.is_deleted = '0'
|
|
|
and bill.is_deleted = '0'
|
|
and bill.is_deleted = '0'
|
|
|
- <if test="acc.auditStatus != null and acc.auditStatus !=''">
|
|
|
|
|
- and fee.audit_status = #{acc.auditStatus}
|
|
|
|
|
|
|
+ <if test='acc.type != null and acc.type != "" and acc.type == "2"'>
|
|
|
|
|
+ and acc.amount_dr_loc != acc.stl_amount_dr_loc
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="acc.corpCnName != null and acc.corpCnName != ''">
|
|
|
|
|
- and fee.corp_id = #{acc.corpCnName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.isSignfor != null">
|
|
|
|
|
- and fee.is_signfor = #{acc.isSignfor}
|
|
|
|
|
|
|
+ <if test='acc.type != null and acc.type != "" and acc.type == "3"'>
|
|
|
|
|
+ and acc.amount_cr_loc != acc.stl_amount_cr_loc
|
|
|
</if>
|
|
</if>
|
|
|
<if test="acc.dc != null and acc.dc != ''">
|
|
<if test="acc.dc != null and acc.dc != ''">
|
|
|
and fee.dc = #{acc.dc}
|
|
and fee.dc = #{acc.dc}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="acc.curCode != null and acc.curCode != ''">
|
|
|
|
|
- and fee.cur_code = #{acc.curCode}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.srcType != null and acc.srcType != ''">
|
|
|
|
|
- and fee.src_type = #{acc.srcType}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.srcCnName != null and acc.srcCnName != ''">
|
|
|
|
|
- and fee.src_id = #{acc.srcCnName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.isCleared != null">
|
|
|
|
|
- and acc.is_cleared = #{acc.isCleared}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.billNo != null and acc.billNo != ''">
|
|
|
|
|
- and fee.bill_no like concat('%', #{acc.billNo}, '%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.accBillNo != null and acc.accBillNo != ''">
|
|
|
|
|
- and fee.acc_bill_no like concat('%', #{acc.accBillNo}, '%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.mblno != null and acc.mblno != ''">
|
|
|
|
|
- and fee.mblno like concat('%', #{acc.mblno}, '%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.hblno != null and acc.hblno != ''">
|
|
|
|
|
- and fee.hblno like concat('%', #{acc.hblno}, '%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.isChecked != null">
|
|
|
|
|
- and acc.is_checked = #{acc.isChecked}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.billDateList != null and acc.billDateList != '' and acc.billDateList[0] != ''">
|
|
|
|
|
- and acc.bill_date >= #{acc.billDateList[0]}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.billDateList != null and acc.billDateList != '' and acc.billDateList[1] != ''">
|
|
|
|
|
- and acc.bill_date <= #{acc.billDateList[1]}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.approveTimeList != null and acc.approveTimeList != '' and acc.approveTimeList[0] != ''">
|
|
|
|
|
- and fee.approve_time >= #{acc.approveTimeList[0]}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.approveTimeList != null and acc.approveTimeList != '' and acc.approveTimeList[1] != ''">
|
|
|
|
|
- and fee.approve_time <= #{acc.approveTimeList[1]}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.queryAmount != null and acc.queryAmount != ''">
|
|
|
|
|
- and (acc.amount_dr_loc = #{acc.queryAmount} or acc.amount_cr_loc = #{acc.queryAmount})
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.businessType != null and acc.businessType != ''">
|
|
|
|
|
- and fee.business_type = #{acc.businessType}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.invoiceStatus != null">
|
|
|
|
|
- and fee.invoice_status = #{acc.invoiceStatus}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.vesselCnName != null and acc.vesselCnName != ''">
|
|
|
|
|
- and ( acc.vessel_cn_name like concat('%', #{acc.vesselCnName}, '%') or acc.vessel_en_name like concat('%',
|
|
|
|
|
- #{acc.vesselCnName}, '%') )
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.voyageNo != null and acc.voyageNo != ''">
|
|
|
|
|
- and acc.voyage_no like concat('%', #{acc.voyageNo}, '%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.threeInspectionsNo != null and acc.threeInspectionsNo != ''">
|
|
|
|
|
- and acc.three_inspections_no like concat('%', #{acc.threeInspectionsNo}, '%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.receivableAdvance != null">
|
|
|
|
|
- and (acc.amount_dr_loc = #{acc.receivableAdvance} or acc.amount_cr_loc = #{acc.receivableAdvance})
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.invoiceNo != null and acc.invoiceNo != ''">
|
|
|
|
|
- and fee.invoice_no like concat('%', #{acc.invoiceNo}, '%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.createUserName != null and acc.createUserName != ''">
|
|
|
|
|
- and acc.create_user = #{acc.createUserName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="acc.bookingNo != null and acc.bookingNo != ''">
|
|
|
|
|
- and acc.booking_no like concat('%', #{acc.bookingNo}, '%')
|
|
|
|
|
- </if>
|
|
|
|
|
- GROUP BY acc.bill_no
|
|
|
|
|
- ORDER BY acc.create_time
|
|
|
|
|
- </select>
|
|
|
|
|
- <select id="listAccBillV2" resultType="org.springblade.los.finance.fee.vo.FinAccBillsVO">
|
|
|
|
|
- SELECT DISTINCT
|
|
|
|
|
- acc.*,
|
|
|
|
|
- fee.business_type as businessType,
|
|
|
|
|
- fee.bill_type as billType,
|
|
|
|
|
- fee.cur_code as curCode,
|
|
|
|
|
- fee.id as sourceId,
|
|
|
|
|
- fee.account_year as accountYear,
|
|
|
|
|
- fee.account_month as accountMonth,
|
|
|
|
|
- fee.account_day as accountDay,
|
|
|
|
|
- fee.src_type as srcType,
|
|
|
|
|
- fee.src_id as srcId,
|
|
|
|
|
- fee.src_cn_name as srcCnName,
|
|
|
|
|
- fee.src_en_name as srcEnName,
|
|
|
|
|
- fee.line_id as lineId,
|
|
|
|
|
- fee.line_cn_name as lineCnName,
|
|
|
|
|
- fee.line_en_name as lineEnName,
|
|
|
|
|
- fee.cntr_no as cntrNo,
|
|
|
|
|
- SUM(fee.quantity) as quantity,
|
|
|
|
|
- fee.unit_no as unitNo,
|
|
|
|
|
- SUM(fee.price) as price,
|
|
|
|
|
- fee.fee_id as feeId,
|
|
|
|
|
- fee.fee_code as feeCode,
|
|
|
|
|
- fee.fee_cn_name as feeCnName,
|
|
|
|
|
- fee.fee_en_name as feeEnName,
|
|
|
|
|
- fee.exrate as exrate,
|
|
|
|
|
- fee.is_tax as isTax,
|
|
|
|
|
- fee.tax_type as taxType,
|
|
|
|
|
- fee.tax_rate as taxRate,
|
|
|
|
|
- fee.surcharge_rate as surchargeRate,
|
|
|
|
|
- SUM(fee.amount_discount) as amountDiscount,
|
|
|
|
|
- SUM(fee.amount_net) as amountNet,
|
|
|
|
|
- SUM(fee.amount_tax) as amountTax,
|
|
|
|
|
- SUM(fee.amount) as amount,
|
|
|
|
|
- SUM(fee.amount_tax_loc) as amountTaxLoc,
|
|
|
|
|
- SUM(fee.amount_net_loc) as amountNetLoc,
|
|
|
|
|
- SUM(fee.amount_discount_loc) as amountDiscountLoc,
|
|
|
|
|
- SUM(fee.amount_loc) as amountLoc,
|
|
|
|
|
- SUM(fee.stl_ttl_amount) as stlTtlAmount,
|
|
|
|
|
- IF(SUM(fee.unsettled_amount),SUM(fee.unsettled_amount),0.00) as unsettledAmount,
|
|
|
|
|
- fee.is_signfor as isSignfor,
|
|
|
|
|
- fee.signfor_id as signforId,
|
|
|
|
|
- fee.signfor_name as signforName,
|
|
|
|
|
- fee.signfor_date as signforDate,
|
|
|
|
|
- bill.operator_id as operatorId,
|
|
|
|
|
- bill.operator_name as operatorName,
|
|
|
|
|
- bill.quantity_packing_descr as quantityPackingDescr,
|
|
|
|
|
- bill.quantity_cntr_types_descr as quantityCntrTypesDescr,
|
|
|
|
|
- corp.account_period_type as accountPeriodType
|
|
|
|
|
- FROM
|
|
|
|
|
- los_fee_center fee
|
|
|
|
|
- JOIN los_sea_bills bill ON bill.id = fee.pid
|
|
|
|
|
- LEFT JOIN los_b_corps corp ON corp.id = fee.corp_id
|
|
|
|
|
- LEFT JOIN los_fin_acc_bills acc ON acc.id = fee.acc_bill_id
|
|
|
|
|
- WHERE
|
|
|
|
|
- acc.is_deleted = '0'
|
|
|
|
|
- AND fee.is_deleted = '0'
|
|
|
|
|
- and bill.is_deleted = '0'
|
|
|
|
|
<if test="acc.auditStatus != null and acc.auditStatus !=''">
|
|
<if test="acc.auditStatus != null and acc.auditStatus !=''">
|
|
|
and fee.audit_status = #{acc.auditStatus}
|
|
and fee.audit_status = #{acc.auditStatus}
|
|
|
</if>
|
|
</if>
|
|
@@ -475,9 +341,6 @@
|
|
|
<if test="acc.isSignfor != null">
|
|
<if test="acc.isSignfor != null">
|
|
|
and fee.is_signfor = #{acc.isSignfor}
|
|
and fee.is_signfor = #{acc.isSignfor}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="acc.dc != null and acc.dc != ''">
|
|
|
|
|
- and fee.dc = #{acc.dc}
|
|
|
|
|
- </if>
|
|
|
|
|
<if test="acc.curCode != null and acc.curCode != ''">
|
|
<if test="acc.curCode != null and acc.curCode != ''">
|
|
|
and fee.cur_code = #{acc.curCode}
|
|
and fee.cur_code = #{acc.curCode}
|
|
|
</if>
|
|
</if>
|
|
@@ -517,6 +380,12 @@
|
|
|
<if test="acc.approveTimeList != null and acc.approveTimeList != '' and acc.approveTimeList[1] != ''">
|
|
<if test="acc.approveTimeList != null and acc.approveTimeList != '' and acc.approveTimeList[1] != ''">
|
|
|
and fee.approve_time <= #{acc.approveTimeList[1]}
|
|
and fee.approve_time <= #{acc.approveTimeList[1]}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="acc.signforDateList != null and acc.signforDateList != '' and acc.signforDateList[0] != ''">
|
|
|
|
|
+ and fee.signfor_date >= #{acc.signforDateList[0]}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="acc.signforDateList != null and acc.signforDateList != '' and acc.signforDateList[1] != ''">
|
|
|
|
|
+ and fee.signfor_date <= #{acc.signforDateList[1]}
|
|
|
|
|
+ </if>
|
|
|
<if test="acc.queryAmount != null and acc.queryAmount != ''">
|
|
<if test="acc.queryAmount != null and acc.queryAmount != ''">
|
|
|
and (acc.amount_dr_loc = #{acc.queryAmount} or acc.amount_cr_loc = #{acc.queryAmount})
|
|
and (acc.amount_dr_loc = #{acc.queryAmount} or acc.amount_cr_loc = #{acc.queryAmount})
|
|
|
</if>
|
|
</if>
|
|
@@ -533,6 +402,9 @@
|
|
|
<if test="acc.voyageNo != null and acc.voyageNo != ''">
|
|
<if test="acc.voyageNo != null and acc.voyageNo != ''">
|
|
|
and acc.voyage_no like concat('%', #{acc.voyageNo}, '%')
|
|
and acc.voyage_no like concat('%', #{acc.voyageNo}, '%')
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="acc.checkBillNo != null and acc.checkBillNo != ''">
|
|
|
|
|
+ and fee.check_bill_no like concat('%', #{acc.checkBillNo}, '%')
|
|
|
|
|
+ </if>
|
|
|
<if test="acc.threeInspectionsNo != null and acc.threeInspectionsNo != ''">
|
|
<if test="acc.threeInspectionsNo != null and acc.threeInspectionsNo != ''">
|
|
|
and acc.three_inspections_no like concat('%', #{acc.threeInspectionsNo}, '%')
|
|
and acc.three_inspections_no like concat('%', #{acc.threeInspectionsNo}, '%')
|
|
|
</if>
|
|
</if>
|
|
@@ -548,7 +420,7 @@
|
|
|
<if test="acc.bookingNo != null and acc.bookingNo != ''">
|
|
<if test="acc.bookingNo != null and acc.bookingNo != ''">
|
|
|
and acc.booking_no like concat('%', #{acc.bookingNo}, '%')
|
|
and acc.booking_no like concat('%', #{acc.bookingNo}, '%')
|
|
|
</if>
|
|
</if>
|
|
|
- GROUP BY fee.id
|
|
|
|
|
|
|
+ GROUP BY acc.bill_no
|
|
|
ORDER BY acc.create_time
|
|
ORDER BY acc.create_time
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|