diff --git a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReport.java b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReport.java index 122ed7fba6..7df231ca34 100644 --- a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReport.java +++ b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReport.java @@ -142,5 +142,10 @@ public class DailyReport { @ApiModelProperty("前三个月销售台数之和") private int saleAllToThree; + @ApiModelProperty("金融未放款-数量(已信审终审)") + private int loan_not_counts; + @ApiModelProperty("金融未放款-金额(已信审终审)") + private String loan_not_amounts; + } diff --git a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportAppPagerVo.java b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportAppPagerVo.java index 050f524f3a..bed992d299 100644 --- a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportAppPagerVo.java +++ b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportAppPagerVo.java @@ -28,8 +28,10 @@ public class DailyReportAppPagerVo { private int sale_subtotal_day; @ApiModelProperty("欠款出库金额") private int arrears_carry_veh_amount; - @ApiModelProperty("金融未放款金额") + @ApiModelProperty("金融未放款金额-已出库") private int loan_not_amount; + //金融未放款金额-已信审终审 + private int loan_not_amounts; @ApiModelProperty("本日买断") private int buyout_day; diff --git a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportAppVo.java b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportAppVo.java index 9bbf443121..f2b2cfe37c 100644 --- a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportAppVo.java +++ b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportAppVo.java @@ -110,10 +110,14 @@ public class DailyReportAppVo { private List row46 = new ArrayList<>(); @ApiModelProperty("欠款出库金额") private List row47 = new ArrayList<>(); - @ApiModelProperty("金融未放款数量") + @ApiModelProperty("金融未放款数量(已出库)") private List row48 = new ArrayList<>(); - @ApiModelProperty("金融未放款金额") + @ApiModelProperty("金融未放款金额(已出库)") private List row49 = new ArrayList<>(); + @ApiModelProperty("金融未放款金额(已过终审)") + private List row50 = new ArrayList<>(); + @ApiModelProperty("金融未放款金额(已过终审)") + private List row51 = new ArrayList<>(); @JsonIgnore private List dynamicRows = new ArrayList<>(); diff --git a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportListVo.java b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportListVo.java index c7cd1aed13..0434d1f9f2 100644 --- a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportListVo.java +++ b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportListVo.java @@ -27,8 +27,10 @@ public class DailyReportListVo { private int sale_subtotal_day; @ApiModelProperty("欠款出库金额") private String arrears_carry_veh_amount; - @ApiModelProperty("金融未放款金额") + @ApiModelProperty("金融未放款金额-已出库") private String loan_not_amount; + //金融未放款金额-已信审终审 + private String loan_not_amounts; @ApiModelProperty("本日买断") private int buyout_day; diff --git a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportVo.java b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportVo.java index 436f7191be..e43c03deb3 100644 --- a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportVo.java +++ b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReportVo.java @@ -143,6 +143,10 @@ public class DailyReportVo implements Vo { private int deliver_subtotal_year; @ApiModelProperty("前三个月的销售台数之和") private int saleAllToThree; + @ApiModelProperty("金融未放款-数量-已信审终审") + private int loan_not_counts; + @ApiModelProperty("金融未放款-金额-已信审终审") + private String loan_not_amounts; //=========================================================车型配置相关参数 @ApiModelProperty("车身颜色") private String carColor; diff --git a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/ReportVo.java b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/ReportVo.java index dab2045c14..5c01956a37 100644 --- a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/ReportVo.java +++ b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/ReportVo.java @@ -121,5 +121,10 @@ public class ReportVo implements Vo { @ApiModelProperty("分公司名称") private String useOrgName; + @ApiModelProperty("金融未放款-数量-已信审终审") + private int loan_not_counts; + @ApiModelProperty("金融未放款-金额-已信审终审") + private String loan_not_amounts; + private List list; } diff --git a/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/dailyreport/DailyReportMapper.xml b/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/dailyreport/DailyReportMapper.xml index 9b6048e889..4e451c353d 100644 --- a/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/dailyreport/DailyReportMapper.xml +++ b/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/dailyreport/DailyReportMapper.xml @@ -58,6 +58,8 @@ ifnull(sum(dr.deliver_subtotal_year), 0) as deliver_subtotal_year, ifnull(sum(dr.saleAllToThree), 0) as saleAllToThree , + ifnull(sum(dr.loan_not_counts), 0) as loan_not_counts, + ifnull(sum(dr.loan_not_amounts), 0) as loan_not_amounts, dr.busOrgName, dr.brandName, dr.busOrgSid, @@ -168,6 +170,8 @@ ifnull(sum(dr.deliver_subtotal_year), 0) as deliver_subtotal_year, ifnull(sum(dr.saleAllToThree), 0) as saleAllToThree , + ifnull(sum(dr.loan_not_counts), 0) as loan_not_counts, + ifnull(sum(dr.loan_not_amounts), 0) as loan_not_amounts, bm.fuelTypeValue, bm.emissionStandardValue, dr.busOrgName, @@ -214,6 +218,7 @@ sum(sale_subtotal_day) as sale_subtotal_day, sum(arrears_carry_veh_amount) as arrears_carry_veh_amount, sum(loan_not_amount) as loan_not_amount, + sum(loan_not_amounts) as loan_not_amounts, sum(buyout_day) as buyout_day, useOrgSid, sum(saleAllToThree) as saleAllToThree, @@ -350,7 +355,9 @@ ifnull(sum(dr.saleAllToThree), 0) as saleAllToThree , bm.fuelTypeValue, - bm.emissionStandardValue + bm.emissionStandardValue, + ifnull(sum(dr.loan_not_counts), 0) as loan_not_counts, + ifnull(sum(dr.loan_not_amounts), 0) as loan_not_amounts from daily_report dr left join anrui_base.base_vehicle_model bm on bm.sid = dr.vehModelSid left join anrui_base.base_model_config bmc on bmc.sid = dr.vehMConfigSid @@ -376,6 +383,7 @@ sum(sale_subtotal_day) as sale_subtotal_day, sum(arrears_carry_veh_amount) as arrears_carry_veh_amount, sum(loan_not_amount) as loan_not_amount, + sum(loan_not_amounts) as loan_not_amounts, sum(buyout_day) as buyout_day, sum(saleAllToThree) as saleAllToThree, SUM(stock_total) as stock_total, @@ -397,6 +405,7 @@ sum(sale_subtotal_day) as sale_subtotal_day, sum(arrears_carry_veh_amount) as arrears_carry_veh_amount, sum(loan_not_amount) as loan_not_amount, + sum(loan_not_amounts) as loan_not_amounts, sum(buyout_day) as buyout_day, sum(saleAllToThree) as saleAllToThree, SUM(stock_total) as stock_total, @@ -463,6 +472,8 @@ ifnull(sum(loan_not_count), 0) as loan_not_count, ifnull(sum(loan_not_amount), 0) as loan_not_amount, ifnull(sum(saleAllToThree), 0) as saleAllToThree, + ifnull(sum(loan_not_counts), 0) as loan_not_counts, + ifnull(sum(loan_not_amounts), 0) as loan_not_amounts, busOrgSid, useOrgSid, busOrgName, @@ -524,7 +535,9 @@ ifnull(sum(arrears_carry_veh_amount), 0) as arrears_carry_veh_amount, ifnull(sum(loan_not_count), 0) as loan_not_count, ifnull(sum(loan_not_amount), 0) as loan_not_amount, - ifnull(sum(saleAllToThree), 0) as saleAllToThree + ifnull(sum(saleAllToThree), 0) as saleAllToThree, + ifnull(sum(loan_not_counts), 0) as loan_not_counts, + ifnull(sum(loan_not_amounts), 0) as loan_not_amounts from daily_report where createTime like concat('%', #{date}, '%') group by busOrgSid @@ -599,7 +612,9 @@ ifnull(sum(arrears_carry_veh_amount), 0) as arrears_carry_veh_amount, ifnull(sum(loan_not_count), 0) as loan_not_count, ifnull(sum(loan_not_amount), 0) as loan_not_amount, - ifnull(sum(saleAllToThree), 0) as saleAllToThree + ifnull(sum(saleAllToThree), 0) as saleAllToThree, + ifnull(sum(loan_not_counts), 0) as loan_not_counts, + ifnull(sum(loan_not_amounts), 0) as loan_not_amounts from daily_report where createTime like concat('%', #{date}, '%') and busOrgSid = #{busOrgSid} @@ -733,6 +748,8 @@ ifnull(sum(dr.deliver_subtotal_year), 0) as deliver_subtotal_year, ifnull(sum(dr.saleAllToThree), 0) as saleAllToThree , + ifnull(sum(dr.loan_not_counts), 0) as loan_not_counts, + ifnull(sum(dr.loan_not_amounts), 0) as loan_not_amounts, bm.fuelTypeValue, bm.emissionStandardValue, bmc.carColor, diff --git a/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/dailyreport/DailyReportService.java b/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/dailyreport/DailyReportService.java index 2297fd6dc4..49b3e70056 100644 --- a/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/dailyreport/DailyReportService.java +++ b/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/dailyreport/DailyReportService.java @@ -733,6 +733,17 @@ public class DailyReportService extends MybatisBaseService row50 = dailyReportVoList.stream().map(v -> String.valueOf(v.getLoan_not_counts())).collect(Collectors.toList()); + BigDecimal row50All = row50.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); + row50.add(row50All.toString()); + dailyReportAppVo.setRow50(row50); + //金融未放款-金额-已信审终审 + List row51 = dailyReportVoList.stream().map(v -> String.valueOf(v.getLoan_not_amounts())).collect(Collectors.toList()); + BigDecimal row51All = row51.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); + row51.add(row51All.toString()); + dailyReportAppVo.setRow51(row51); + return rb.success().setData(dailyReportAppVo); } @@ -1091,6 +1102,17 @@ public class DailyReportService extends MybatisBaseService row50 = dailyReportVoList.stream().map(v -> String.valueOf(v.getLoan_not_counts())).collect(Collectors.toList()); + BigDecimal row50All = row50.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); + row50.add(row50All.toString()); + dailyReportAppVo.setRow50(row50); + //金融未放款-金额-已信审终审 + List row51 = dailyReportVoList.stream().map(v -> String.valueOf(v.getLoan_not_amounts())).collect(Collectors.toList()); + BigDecimal row51All = row51.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); + row51.add(row51All.toString()); + dailyReportAppVo.setRow51(row51); return rb.success().setData(dailyReportAppVo); } @@ -1378,6 +1400,16 @@ public class DailyReportService extends MybatisBaseService row50 = dailyReportVoList.stream().map(v -> String.valueOf(v.getLoan_not_counts())).collect(Collectors.toList()); + BigDecimal row50All = row50.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); + row50.add(row50All.toString()); + dailyReportAppVo.setRow50(row50); + //金融未放款-金额-已信审终审 + List row51 = dailyReportVoList.stream().map(v -> String.valueOf(v.getLoan_not_amounts())).collect(Collectors.toList()); + BigDecimal row51All = row51.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); + row51.add(row51All.toString()); + dailyReportAppVo.setRow51(row51); return rb.success().setData(dailyReportAppVo); } @@ -1692,6 +1724,16 @@ public class DailyReportService extends MybatisBaseService row50 = dailyReportVoList.stream().map(v -> String.valueOf(v.getLoan_not_counts())).collect(Collectors.toList()); + BigDecimal row50All = row50.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); + row50.add(row50All.toString()); + dailyReportAppVo.setRow50(row50); + //金融未放款-金额-已信审终审 + List row51 = dailyReportVoList.stream().map(v -> String.valueOf(v.getLoan_not_amounts())).collect(Collectors.toList()); + BigDecimal row51All = row51.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); + row51.add(row51All.toString()); + dailyReportAppVo.setRow51(row51); List dynamicRows = new ArrayList<>(); diff --git a/anrui-riskcenter-ui/src/views/repaymentschedule/repaymentscheduleByBikeInfo.vue b/anrui-riskcenter-ui/src/views/repaymentschedule/repaymentscheduleByBikeInfo.vue index 84be8828d2..8d17810791 100644 --- a/anrui-riskcenter-ui/src/views/repaymentschedule/repaymentscheduleByBikeInfo.vue +++ b/anrui-riskcenter-ui/src/views/repaymentschedule/repaymentscheduleByBikeInfo.vue @@ -15,7 +15,7 @@ {{ item.borrowerName }} -
车架号
+
涉及车架号
{{ item.vinNo }}
diff --git a/anrui-riskcenter-ui/src/views/repaymentschedule/repaymentscheduleInfo.vue b/anrui-riskcenter-ui/src/views/repaymentschedule/repaymentscheduleInfo.vue index f5c2f08946..27c362249d 100644 --- a/anrui-riskcenter-ui/src/views/repaymentschedule/repaymentscheduleInfo.vue +++ b/anrui-riskcenter-ui/src/views/repaymentschedule/repaymentscheduleInfo.vue @@ -30,7 +30,7 @@ {{ formobj.bankName }} -
车架号
+
涉及车架号
{{ formobj.vinNo }}
@@ -95,7 +95,7 @@ export default { }, methods: { showInfo(row) { - this.viewTitle = '还款计划表' + this.viewTitle = '单车还款计划表' req.viewVinsSchedule({ salesOrderSid: row.salesOrderSid }).then((res) => { if (res.success) { this.formobj = res.data diff --git a/doc/databases/统计报表更新.sql b/doc/databases/统计报表更新.sql index 44c027b51f..671fa2a033 100644 --- a/doc/databases/统计报表更新.sql +++ b/doc/databases/统计报表更新.sql @@ -1087,5 +1087,123 @@ BEGIN SET r.`manufacturer_invoicing_year`=s.scount WHERE DATE_FORMAT(createTime, '%Y-%m-%d') = CURDATE(); +-- 金融未放款数量已信审终审--- 截止当日贷款业务已信审终审且融资放款未认款的台数。 + update daily_report r inner join ( + SELECT count(a.id) AS scount, + a.useOrgSid, + a.NAME, + a.contractNo, + a.vehMConfigSid, + a.vehModelSid + FROM (SELECT bv.id, + bo.useOrgSid, + bm.modelConfigSid AS vehMConfigSid, + bm.modelSid AS vehModelSid, + so.NAME, + SUM(s.reveivableMoney), + SUM(s.subscriptionMoney), + bo.contractNo + from anrui_buscenter.bus_sales_order_vehicle bv + left join anrui_buscenter.bus_sales_order bo on bo.sid = bv.salesOrderSid + left join anrui_base.base_vehicle bbv on bbv.sid = bv.linkSid + left join anrui_buscenter.bus_sales_order_model bm on bm.salesOrderSid = bv.salesOrderSid + LEFT JOIN ( + SELECT fd.reveivableMoney, + fd.busVinSid, + IFNULL(SUM(fs.subscriptionMoney), 0) AS subscriptionMoney + FROM anrui_fin.fin_uncollected_receivables_detailed fd + LEFT JOIN anrui_fin.fin_selected_receivables_detailed fs ON fs.receivablesSid = fd.sid + WHERE fd.kxState = '01' + AND fs.auditState = 3 + and fd.receivablesName = '融资放款' + GROUP BY fd.sid + UNION ALL + SELECT fd.reveivableMoney, + fd.busVinSid, + 0 AS subscriptionMoney + FROM anrui_fin.fin_uncollected_receivables_detailed fd + WHERE fd.kxState = '01' + AND fd.receivablesName = '融资放款' + AND fd.sid NOT IN (SELECT fs.`receivablesSid` + FROM anrui_fin.fin_selected_receivables_detailed fs + WHERE fs.`auditState` = 3 + AND fs.`receivablesName` = '融资放款') + GROUP BY fd.sid + ) s ON s.busVinSid = bv.sid + LEFT JOIN anrui_portal.sys_organization so ON so.sid = bo.useOrgSid + left join anrui_riskcenter.loan_capital_credit_result lr + on lr.loanContractSid = bv.loanContractSid + where bo.payTypeKey = 2 + + and lr.capCarefulResult = '通过' + group by bv.sid, bo.useOrgSid, bm.modelSid, bm.modelConfigSid + HAVING SUM(s.reveivableMoney) > SUM(s.subscriptionMoney)) a + GROUP BY a.useOrgSid, + a.vehMConfigSid, + a.vehModelSid) as s on + r.useOrgSid = s.useOrgSid AND r.vehModelSid = s.vehModelSid AND r.vehMConfigSid = s.vehMConfigSid + SET r.`loan_not_counts`=s.scount + WHERE DATE_FORMAT(createTime, '%Y-%m-%d') = CURDATE(); + +-- 金融未放款金额已信审终审-- 截止当日贷款业务已信审终审且融资放款未认款的台数融资放款金额之和 + + update daily_report r inner join ( + SELECT SUM(a.scount) AS scount, + a.useOrgSid, + a.NAME, + a.contractNo, + a.vehMConfigSid, + a.vehModelSid + FROM (SELECT bv.id, + bo.useOrgSid, + bm.modelConfigSid AS vehMConfigSid, + bm.modelSid AS vehModelSid, + so.NAME, + SUM(s.reveivableMoney), + SUM(s.subscriptionMoney), + bo.contractNo, + ( + SUM(s.reveivableMoney) - SUM(s.subscriptionMoney)) AS scount + FROM anrui_buscenter.bus_sales_order_vehicle bv + LEFT JOIN anrui_buscenter.bus_sales_order bo ON bo.sid = bv.salesOrderSid + LEFT JOIN anrui_base.base_vehicle bbv ON bbv.sid = bv.linkSid + LEFT JOIN anrui_buscenter.bus_sales_order_model bm ON bm.salesOrderSid = bv.salesOrderSid + LEFT JOIN ( + SELECT fd.reveivableMoney, + fd.busVinSid, + IFNULL(SUM(fs.subscriptionMoney), 0) AS subscriptionMoney + FROM anrui_fin.fin_uncollected_receivables_detailed fd + LEFT JOIN anrui_fin.fin_selected_receivables_detailed fs ON fs.receivablesSid = fd.sid + WHERE fd.kxState = '01' + AND fs.auditState = 3 + AND fd.receivablesName = '融资放款' + GROUP BY fd.sid + UNION ALL + SELECT fd.reveivableMoney, + fd.busVinSid, + 0 AS subscriptionMoney + FROM anrui_fin.fin_uncollected_receivables_detailed fd + WHERE fd.kxState = '01' + AND fd.receivablesName = '融资放款' + AND fd.sid NOT IN (SELECT fs.`receivablesSid` + FROM anrui_fin.fin_selected_receivables_detailed fs + WHERE fs.`auditState` = 3 + AND fs.`receivablesName` = '融资放款') + GROUP BY fd.sid + ) s ON s.busVinSid = bv.sid + LEFT JOIN anrui_portal.sys_organization so ON so.sid = bo.useOrgSid + left join anrui_riskcenter.loan_capital_credit_result lr + on lr.loanContractSid = bv.loanContractSid + WHERE bo.payTypeKey = 2 + AND lr.capCarefulResult = '通过' + GROUP BY bv.sid, bo.useOrgSid, bm.modelSid, bm.modelConfigSid + HAVING SUM(s.reveivableMoney) > SUM(s.subscriptionMoney)) a + GROUP BY a.useOrgSid, + a.vehMConfigSid, + a.vehModelSid) as s on + r.useOrgSid = s.useOrgSid AND r.vehModelSid = s.vehModelSid AND r.vehMConfigSid = s.vehMConfigSid + SET r.`loan_not_amounts`=ROUND(s.scount / 10000, 2) + WHERE DATE_FORMAT(createTime, '%Y-%m-%d') = CURDATE(); + END \ No newline at end of file