apzl_leasing/报表/传统类报表/逾期统计表.xml
2019-12-24 15:17:14 +08:00

334 lines
16 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TenwaReport>
<datasources>
<datasource>
<id>2c9023815726a036015726a496b00001</id>
<dataSourceName>eleasing_mysql</dataSourceName>
<dataSourceType>SPRING</dataSourceType>
<jndi>dataSourceJDBC</jndi>
<url></url>
<username></username>
<driverName></driverName>
<password></password>
<dialect>com.tenwa.report.query.dialect.MysqlDialect</dialect>
<dialectName>Mysql</dialectName>
</datasource>
</datasources>
<reports>
<report>
<id>402882355da074c8015da0a4db50000a</id>
<name>逾期统计表</name>
<enname>overdue_statistics</enname>
<code>REPORT_CODE_1501638744912</code>
<isActived>true</isActived>
<position>7</position>
<reportType>REPORT</reportType>
<parentReport>2c9c81b7685efbbc01693228cee6000e</parentReport>
<children/>
<layouts>
<layout>402882355da22990015da22a47560001</layout>
</layouts>
</report>
</reports>
<tables>
<table>
<id>402882355da074c8015da0b31aaf0017</id>
<name>逾期统计表</name>
<enname>overdue_statistics</enname>
<reportDataSource>2c9023815726a036015726a496b00001</reportDataSource>
<queryType>COMPLEXSQL</queryType>
<sql>SELECT
oilist.orgname,
paymentlist.paymentnum,
overlist.overnum,
vlrplist.rentover,
vlrplist.overduerent,
vlrplist.over30rent,
vlrplist.over90rent,
vlrplist.over180rent,
vlrplist.over360rent,
vlrplist.overthan360rent,
CASE WHEN vlrplist.rentover=0 THEN 0.00 ELSE CONCAT(ROUND(vlrplist.overduerent/vlrplist.rentover*100,2),'%') END AS overduerate
FROM
(SELECT oi.orgid,oi.orgname FROM org_info oi WHERE EXISTS(SELECT lci.project_dept FROM lb_contract_info lci WHERE lci.project_dept=oi.orgid)) oilist
LEFT JOIN
(SELECT lci.project_dept,COUNT(*) AS paymentnum FROM LC_CALC_CONDITION lcc LEFT JOIN lb_contract_info lci ON lci.id=lcc.contract_id WHERE EXISTS (SELECT lccs.payment_number FROM LC_CALC_CONDITION_STATUS lccs WHERE lcc.payment_number=lccs.payment_number) AND lci.contract_status&lt;100 GROUP BY lci.project_dept) paymentlist ON paymentlist.project_dept=oilist.orgid
LEFT JOIN
(SELECT lci.project_dept,COUNT(*) AS overnum FROM LC_CALC_CONDITION lcc LEFT JOIN lb_contract_info lci ON lci.id=lcc.contract_id WHERE EXISTS (SELECT vlrp.payment_number FROM vi_lc_rent_plan vlrp WHERE vlrp.payment_number=lcc.payment_number AND vlrp.plan_date&lt;CURDATE() AND vlrp.rent_over&gt;0) GROUP BY lci.project_dept) overlist ON oilist.orgid=overlist.project_dept
LEFT JOIN
(SELECT
lci.project_dept,
SUM(vlrp.rent_over) AS rentover,
SUM(CASE WHEN vlrp.plan_date&lt;CURDATE() AND vlrp.rent_over&gt;0 THEN vlrp.rent_over ELSE 0.00 END) AS overduerent,
SUM(CASE WHEN vlrp.plan_date&gt;DATE_SUB(CURDATE(),INTERVAL 30 DAY) AND vlrp.plan_date&lt;CURDATE() AND vlrp.rent_over&gt;0 THEN vlrp.rent_over ELSE 0.00 END) AS over30rent,
SUM(CASE WHEN vlrp.plan_date&gt;DATE_SUB(CURDATE(),INTERVAL 90 DAY) AND vlrp.plan_date&lt;=DATE_SUB(CURDATE(),INTERVAL 30 DAY) AND vlrp.rent_over&gt;0 THEN vlrp.rent_over ELSE 0.00 END) AS over90rent,
SUM(CASE WHEN vlrp.plan_date&gt;DATE_SUB(CURDATE(),INTERVAL 180 DAY) AND vlrp.plan_date&lt;=DATE_SUB(CURDATE(),INTERVAL 90 DAY) AND vlrp.rent_over&gt;0 THEN vlrp.rent_over ELSE 0.00 END) AS over180rent,
SUM(CASE WHEN vlrp.plan_date&gt;DATE_SUB(CURDATE(),INTERVAL 360 DAY) AND vlrp.plan_date&lt;=DATE_SUB(CURDATE(),INTERVAL 180 DAY) AND vlrp.rent_over&gt;0 THEN vlrp.rent_over ELSE 0.00 END) AS over360rent,
SUM(CASE WHEN vlrp.plan_date&lt;=DATE_SUB(CURDATE(),INTERVAL 360 DAY) AND vlrp.rent_over&gt;0 THEN vlrp.rent_over ELSE 0.00 END) AS overthan360rent
FROM
vi_lc_rent_plan vlrp
LEFT JOIN
lb_contract_info lci ON vlrp.contract_id=lci.id
GROUP BY lci.project_dept
)vlrplist ON paymentlist.project_dept=vlrplist.project_dept
LEFT JOIN
org_info oi ON oi.orgid=paymentlist.project_dept</sql>
<sqlParamValue></sqlParamValue>
<columns>
<column>
<id>402882355da22990015da22b24300024</id>
<name>orgname</name>
<columnDataType>STRING</columnDataType>
<formater></formater>
<label>部门</label>
<enLabel>orgname</enLabel>
<width>100</width>
<position>11</position>
<isVisible>true</isVisible>
<color></color>
<isCountTotal>false</isCountTotal>
<isCountSubTotal>false</isCountSubTotal>
<isGroupby>false</isGroupby>
<isMerge>false</isMerge>
<action></action>
<actionParamters></actionParamters>
<actionCondition></actionCondition>
</column>
<column>
<id>402882355da22990015da22b242f0021</id>
<name>paymentnum</name>
<columnDataType>NUMBER</columnDataType>
<formater></formater>
<label>在执行合同数</label>
<enLabel>paymentnum</enLabel>
<width>100</width>
<position>12</position>
<isVisible>true</isVisible>
<color></color>
<isCountTotal>false</isCountTotal>
<isCountSubTotal>false</isCountSubTotal>
<isGroupby>false</isGroupby>
<isMerge>false</isMerge>
<action></action>
<actionParamters></actionParamters>
<actionCondition></actionCondition>
</column>
<column>
<id>402882355da22990015da22b24300025</id>
<name>overnum</name>
<columnDataType>NUMBER</columnDataType>
<formater></formater>
<label>发生逾期合同数</label>
<enLabel>overnum</enLabel>
<width>100</width>
<position>13</position>
<isVisible>true</isVisible>
<color></color>
<isCountTotal>false</isCountTotal>
<isCountSubTotal>false</isCountSubTotal>
<isGroupby>false</isGroupby>
<isMerge>false</isMerge>
<action></action>
<actionParamters></actionParamters>
<actionCondition></actionCondition>
</column>
<column>
<id>402882355da22990015da22b24300023</id>
<name>rentover</name>
<columnDataType>NUMBER</columnDataType>
<formater>#,##0.00</formater>
<label>合同租金余额</label>
<enLabel>rentover</enLabel>
<width>100</width>
<position>14</position>
<isVisible>true</isVisible>
<color></color>
<isCountTotal>false</isCountTotal>
<isCountSubTotal>false</isCountSubTotal>
<isGroupby>false</isGroupby>
<isMerge>false</isMerge>
<alignType>RIGHT</alignType>
<action></action>
<actionParamters></actionParamters>
<actionCondition></actionCondition>
</column>
<column>
<id>402882355da22990015da22b242f0020</id>
<name>overduerent</name>
<columnDataType>NUMBER</columnDataType>
<formater>#,##0.00</formater>
<label>逾期租金</label>
<enLabel>overduerent</enLabel>
<width>100</width>
<position>15</position>
<isVisible>true</isVisible>
<color></color>
<isCountTotal>false</isCountTotal>
<isCountSubTotal>false</isCountSubTotal>
<isGroupby>false</isGroupby>
<isMerge>false</isMerge>
<alignType>RIGHT</alignType>
<action></action>
<actionParamters></actionParamters>
<actionCondition></actionCondition>
</column>
<column>
<id>402882355da22990015da22b242f0022</id>
<name>over30rent</name>
<columnDataType>NUMBER</columnDataType>
<formater>#,##0.00</formater>
<label>30天内逾期租金</label>
<enLabel>over30rent</enLabel>
<width>100</width>
<position>16</position>
<isVisible>true</isVisible>
<color></color>
<isCountTotal>false</isCountTotal>
<isCountSubTotal>false</isCountSubTotal>
<isGroupby>false</isGroupby>
<isMerge>false</isMerge>
<alignType>RIGHT</alignType>
<action></action>
<actionParamters></actionParamters>
<actionCondition></actionCondition>
</column>
<column>
<id>402882355da22990015da22b242e001e</id>
<name>over90rent</name>
<columnDataType>NUMBER</columnDataType>
<formater>#,##0.00</formater>
<label>30-90天逾期租金</label>
<enLabel>over90rent</enLabel>
<width>100</width>
<position>17</position>
<isVisible>true</isVisible>
<color></color>
<isCountTotal>false</isCountTotal>
<isCountSubTotal>false</isCountSubTotal>
<isGroupby>false</isGroupby>
<isMerge>false</isMerge>
<alignType>RIGHT</alignType>
<action></action>
<actionParamters></actionParamters>
<actionCondition></actionCondition>
</column>
<column>
<id>402882355da22990015da22b242f001f</id>
<name>over180rent</name>
<columnDataType>NUMBER</columnDataType>
<formater>#,##0.00</formater>
<label>90-180天逾期租金</label>
<enLabel>over180rent</enLabel>
<width>100</width>
<position>18</position>
<isVisible>true</isVisible>
<color></color>
<isCountTotal>false</isCountTotal>
<isCountSubTotal>false</isCountSubTotal>
<isGroupby>false</isGroupby>
<isMerge>false</isMerge>
<alignType>RIGHT</alignType>
<action></action>
<actionParamters></actionParamters>
<actionCondition></actionCondition>
</column>
<column>
<id>402882355da22990015da22b24300029</id>
<name>over360rent</name>
<columnDataType>NUMBER</columnDataType>
<formater>#,##0.00</formater>
<label>180-360天逾期租金</label>
<enLabel>over360rent</enLabel>
<width>100</width>
<position>19</position>
<isVisible>true</isVisible>
<color></color>
<isCountTotal>false</isCountTotal>
<isCountSubTotal>false</isCountSubTotal>
<isGroupby>false</isGroupby>
<isMerge>false</isMerge>
<alignType>RIGHT</alignType>
<action></action>
<actionParamters></actionParamters>
<actionCondition></actionCondition>
</column>
<column>
<id>402882355da22990015da22b24300028</id>
<name>overthan360rent</name>
<columnDataType>NUMBER</columnDataType>
<formater>#,##0.00</formater>
<label>360天以上逾期租金</label>
<enLabel>overthan360rent</enLabel>
<width>100</width>
<position>20</position>
<isVisible>true</isVisible>
<color></color>
<isCountTotal>false</isCountTotal>
<isCountSubTotal>false</isCountSubTotal>
<isGroupby>false</isGroupby>
<isMerge>false</isMerge>
<alignType>RIGHT</alignType>
<action></action>
<actionParamters></actionParamters>
<actionCondition></actionCondition>
</column>
<column>
<id>402882355da22990015da22b24300026</id>
<name>overduerate</name>
<columnDataType>STRING</columnDataType>
<formater></formater>
<label>逾期率</label>
<enLabel>overduerate</enLabel>
<width>100</width>
<position>21</position>
<isVisible>true</isVisible>
<color></color>
<isCountTotal>false</isCountTotal>
<isCountSubTotal>false</isCountSubTotal>
<isGroupby>false</isGroupby>
<isMerge>false</isMerge>
<action></action>
<actionParamters></actionParamters>
<actionCondition></actionCondition>
</column>
</columns>
<controls/>
<searchs/>
<searchExpress></searchExpress>
<filters>
<filter>
<id>402882355da22990015da2330950002a</id>
<name>orgname</name>
<label>部门</label>
<filterType>FILTER</filterType>
<dbType>STRING</dbType>
<htmlType>COMBOBOX</htmlType>
<filterDataRequestType>SQL</filterDataRequestType>
<comboBoxDataSource>SELECT orgname FROM org_info WHERE orgid LIKE '800090002%'</comboBoxDataSource>
<position>0</position>
</filter>
</filters>
<filterExpress></filterExpress>
<pageSize>20</pageSize>
<showRowNumber>false</showRowNumber>
<showTotalTitle>false</showTotalTitle>
<isScale>false</isScale>
<isCache>false</isCache>
<isExcel>false</isExcel>
</table>
</tables>
<charts/>
<pages/>
<layouts>
<layout>
<id>402882355da22990015da22a47560001</id>
<divHeight>0</divHeight>
<divWidth>0</divWidth>
<position>0</position>
<contentId>TABLE#402882355da074c8015da0b31aaf0017</contentId>
<report>402882355da074c8015da0a4db50000a</report>
<contentType>TABLE</contentType>
</layout>
</layouts>
</TenwaReport>