add 统计增模块导出完成
This commit is contained in:
+8
@@ -34,6 +34,14 @@ public class PayWorkGroupSubletStatistics {
|
||||
@ApiModelProperty(value = "实收总金额")
|
||||
private String comeAllMoney;
|
||||
|
||||
@Excel(name = "开票金额", width = 15)
|
||||
@ApiModelProperty(value = "开票金额")
|
||||
private String billMoney;
|
||||
|
||||
@Excel(name = "确认金额", width = 15)
|
||||
@ApiModelProperty(value = "确认金额")
|
||||
private String confirmAmount;
|
||||
|
||||
@Excel(name = "来款用途", width = 15, dicCode="payment_charge_use")
|
||||
@Dict(dicCode = "payment_charge_use")
|
||||
@ApiModelProperty(value = "来款用途")
|
||||
|
||||
+3
@@ -32,6 +32,9 @@ public class PayWorkingGroupSubletSearch {
|
||||
@ApiModelProperty(value = "来款年份")
|
||||
private String year;
|
||||
|
||||
@ApiModelProperty(value = "开票年份")
|
||||
private String billYear;
|
||||
|
||||
@ApiModelProperty(value = "来款用途")
|
||||
private String chargeUse;
|
||||
|
||||
|
||||
+40
-65
@@ -257,12 +257,7 @@
|
||||
CONCAT(CAST(ROUND((pwgs.comeAllMoney/pwgs.allMoney)*100,2) AS CHAR),'%') AS moneyRate
|
||||
FROM pay_working_group pwg left join (select pwg1s.id,pwg1s.create_time AS createTime,working_group_id,SUM(receivable_amount) AS
|
||||
allMoney,SUM(paid_amount) AS comeAllMoney
|
||||
from pay_working_group_subitem pwg1s
|
||||
<!-- left join pay_payment_record ppr on(pwg1s.id=ppr.project_id)-->
|
||||
<!-- <if test="payWorkingGroupSearch.year !='' and payWorkingGroupSearch.year !=null">-->
|
||||
<!-- WHERE ppr.payment_date like concat('%',#{payWorkingGroupSearch.year},'%')-->
|
||||
<!-- </if>-->
|
||||
<!-- group by pwg1s.working_group_id-->
|
||||
from pay_working_group_subitem pwg1
|
||||
)
|
||||
pwgs on(pwg.id=pwgs.working_group_id)
|
||||
<where>
|
||||
@@ -884,60 +879,6 @@
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>) pp where pp.allMoney is not null and pp.allMoney !=0
|
||||
<!-- left join-->
|
||||
<!-- (-->
|
||||
<!-- select pwgs.id as id,max(ppr.payment_date) as payment_date-->
|
||||
<!-- from pay_working_group_subitem pwgs-->
|
||||
<!-- inner join pay_payment_record ppr on(pwgs.id=ppr.project_id)-->
|
||||
<!-- <if test="allProjectStatisticsSearch.year != null and allProjectStatisticsSearch.year != ''">-->
|
||||
<!-- WHERE ppr.payment_date like-->
|
||||
<!-- concat('%',#{allProjectStatisticsSearch.year},'%')-->
|
||||
<!-- </if>-->
|
||||
<!-- GROUP BY pwgs.id-->
|
||||
<!-- union ALL-->
|
||||
<!-- SELECT-->
|
||||
<!-- pcp.id as id,max(ppr.payment_date) as payment_date-->
|
||||
<!-- FROM pay_common_project pcp inner JOIN pay_payment_record ppr on(pcp.id=ppr.project_id)-->
|
||||
<!-- <if test="allProjectStatisticsSearch.year != null and allProjectStatisticsSearch.year != ''">-->
|
||||
<!-- WHERE ppr.payment_date like-->
|
||||
<!-- concat('%',#{allProjectStatisticsSearch.year},'%')-->
|
||||
<!-- </if>-->
|
||||
<!-- group by pcp.id-->
|
||||
<!-- union all-->
|
||||
<!-- SELECT-->
|
||||
<!-- pmps.id as id,max(ppr.payment_date) as payment_date from-->
|
||||
<!-- pay_member_project_subitem pmps inner join pay_payment_record ppr on(pmps.id=ppr.project_id)-->
|
||||
<!-- <if test="allProjectStatisticsSearch.year != null and allProjectStatisticsSearch.year != ''">-->
|
||||
<!-- WHERE ppr.payment_date like-->
|
||||
<!-- concat('%',#{allProjectStatisticsSearch.year},'%')-->
|
||||
<!-- </if>-->
|
||||
<!-- group by pmps.id-->
|
||||
<!-- union all-->
|
||||
<!-- SELECT-->
|
||||
<!-- pms.id,max(ppr.payment_date) as payment_date from pay_meeting_situation pms inner join pay_payment_record ppr on(pms.id=ppr.project_id)-->
|
||||
<!-- <if test="allProjectStatisticsSearch.year != null and allProjectStatisticsSearch.year != ''">-->
|
||||
<!-- WHERE ppr.payment_date like-->
|
||||
<!-- concat('%',#{allProjectStatisticsSearch.year},'%')-->
|
||||
<!-- </if>-->
|
||||
<!-- group by pms.id-->
|
||||
<!-- union all-->
|
||||
<!-- SELECT-->
|
||||
<!-- tmps.id,max(ppr.payment_date) as payment_date from tb_member_project_subitem tmps inner join pay_payment_record ppr on(tmps.id=ppr.project_id)-->
|
||||
<!-- <if test="allProjectStatisticsSearch.year != null and allProjectStatisticsSearch.year != ''">-->
|
||||
<!-- WHERE ppr.payment_date like-->
|
||||
<!-- concat('%',#{allProjectStatisticsSearch.year},'%')-->
|
||||
<!-- </if>-->
|
||||
<!-- group by tmps.id-->
|
||||
<!-- union all-->
|
||||
<!-- SELECT-->
|
||||
<!-- tcp.id,max(ppr.payment_date) as payment_date from tb_certificate_payment tcp inner join pay_payment_record ppr on(tcp.id=ppr.project_id)-->
|
||||
<!-- <if test="allProjectStatisticsSearch.year != null and allProjectStatisticsSearch.year != ''">-->
|
||||
<!-- WHERE ppr.payment_date like-->
|
||||
<!-- concat('%',#{allProjectStatisticsSearch.year},'%')-->
|
||||
<!-- </if>-->
|
||||
<!-- group by tcp.id-->
|
||||
<!-- ) pprr on(pp.id=pprr.id) group by pp.id order by pp.createTime-->
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 统计-->
|
||||
@@ -1103,6 +1044,9 @@
|
||||
AND departCode = #{principalPeopleSearch.departCode}
|
||||
</if>
|
||||
</where>
|
||||
<if test="principalPeopleSearch.billYear != null and principalPeopleSearch.billYear != ''">
|
||||
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{principalPeopleSearch.billYear}, '%')
|
||||
</if>
|
||||
group by principalId ) ppp
|
||||
<where>
|
||||
<choose>
|
||||
@@ -1176,6 +1120,9 @@
|
||||
AND departCode = #{principalPeopleSearch.departCode}
|
||||
</if>
|
||||
</where>
|
||||
<if test="principalPeopleSearch.billYear != null and principalPeopleSearch.billYear != ''">
|
||||
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{principalPeopleSearch.billYear}, '%')
|
||||
</if>
|
||||
group by principalId ) ppp
|
||||
<where>
|
||||
<choose>
|
||||
@@ -1322,8 +1269,12 @@
|
||||
packText,
|
||||
pack,
|
||||
chargeUse,
|
||||
chargeCompanyTemporaryName
|
||||
from v_statistical
|
||||
chargeCompanyTemporaryName,
|
||||
if(pmb.invoice_amount is null, 0.00, pmb.invoice_amount) as billMoney,
|
||||
confirmAmount
|
||||
from v_statistical v
|
||||
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
|
||||
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
|
||||
<where>
|
||||
principalNameId = #{principalPeopleDetailSearch.principalNameId}
|
||||
<if test="principalPeopleDetailSearch.projectName != null and principalPeopleDetailSearch.projectName != ''">
|
||||
@@ -1355,11 +1306,16 @@
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="principalPeopleDetailSearch.billYear != null and principalPeopleDetailSearch.billYear != ''">
|
||||
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{principalPeopleDetailSearch.billYear}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<!-- 个人来款详情总金额-->
|
||||
<select id="queryPageListForPrincipalDetail33" resultType="com.jero.statistics.entity.AllMoney">
|
||||
select sum(allMoney) as allMoney, sum(comeAllMoney) as comeAllMoney
|
||||
select sum(allMoney) as allMoney, sum(comeAllMoney) as comeAllMoney,
|
||||
sum(billMoney) as billMoney,
|
||||
sum(confirmAmount) as confirmAmount
|
||||
from (
|
||||
select projectId as id,
|
||||
projectName,
|
||||
@@ -1369,8 +1325,12 @@
|
||||
packText,
|
||||
pack,
|
||||
chargeUse,
|
||||
chargeCompanyTemporaryName
|
||||
from v_statistical
|
||||
chargeCompanyTemporaryName,
|
||||
if(pmb.invoice_amount is null, 0.00, pmb.invoice_amount) as billMoney,
|
||||
confirmAmount
|
||||
from v_statistical v
|
||||
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
|
||||
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
|
||||
<where>
|
||||
principalNameId = #{principalPeopleDetailSearch.principalNameId}
|
||||
<if test="principalPeopleDetailSearch.projectName != null and principalPeopleDetailSearch.projectName != ''">
|
||||
@@ -1402,6 +1362,9 @@
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="principalPeopleDetailSearch.billYear != null and principalPeopleDetailSearch.billYear != ''">
|
||||
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{principalPeopleDetailSearch.billYear}, '%')
|
||||
</if>
|
||||
</where>
|
||||
) pp
|
||||
</select>
|
||||
@@ -1697,6 +1660,9 @@
|
||||
<if test="companyComeMoneySearch.chargeCompanyId != null and companyComeMoneySearch.chargeCompanyId != ''">
|
||||
AND chargeCompanyId = #{companyComeMoneySearch.chargeCompanyId}
|
||||
</if>
|
||||
<if test="companyComeMoneySearch.billYear != null and companyComeMoneySearch.billYear != ''">
|
||||
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{companyComeMoneySearch.billYear}, '%')
|
||||
</if>
|
||||
</where>
|
||||
group by chargeCompanyId
|
||||
) ppp
|
||||
@@ -1769,6 +1735,9 @@
|
||||
<if test="companyComeMoneySearch.chargeCompanyId != null and companyComeMoneySearch.chargeCompanyId != ''">
|
||||
AND chargeCompanyId = #{companyComeMoneySearch.chargeCompanyId}
|
||||
</if>
|
||||
<if test="companyComeMoneySearch.billYear != null and companyComeMoneySearch.billYear != ''">
|
||||
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{companyComeMoneySearch.billYear}, '%')
|
||||
</if>
|
||||
</where>
|
||||
group by chargeCompanyId
|
||||
) ppp
|
||||
@@ -1950,6 +1919,9 @@
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="CompanyComeMoneyDetailSearch.billYear != null and CompanyComeMoneyDetailSearch.billYear != ''">
|
||||
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{CompanyComeMoneyDetailSearch.billYear}, '%')
|
||||
</if>
|
||||
</where>) p
|
||||
<if test="CompanyComeMoneyDetailSearch.column != null and CompanyComeMoneyDetailSearch.column != ''">
|
||||
<if test="CompanyComeMoneyDetailSearch.column == 'allMoney' and CompanyComeMoneyDetailSearch.order == 'desc'">
|
||||
@@ -2030,6 +2002,9 @@
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="CompanyComeMoneyDetailSearch.billYear != null and CompanyComeMoneyDetailSearch.billYear != ''">
|
||||
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{CompanyComeMoneyDetailSearch.billYear}, '%')
|
||||
</if>
|
||||
</where>
|
||||
) pp
|
||||
</select>
|
||||
|
||||
+21
-15
@@ -76,8 +76,12 @@
|
||||
chargeUse,
|
||||
packText,
|
||||
pack,
|
||||
projectId as id
|
||||
FROM v_statistical
|
||||
projectId as id,
|
||||
if(pmb.invoice_amount is null, 0.00, pmb.invoice_amount) as billMoney,
|
||||
confirmAmount
|
||||
FROM v_statistical v
|
||||
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
|
||||
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
|
||||
<where>
|
||||
superId = #{id}
|
||||
<if test="payWorkingGroupSubletSearch.projectName != null and payWorkingGroupSubletSearch.projectName != ''">
|
||||
@@ -114,12 +118,17 @@
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="payWorkingGroupSubletSearch.billYear != null and payWorkingGroupSubletSearch.billYear != ''">
|
||||
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{payWorkingGroupSubletSearch.billYear}, '%')
|
||||
</if>
|
||||
</where>
|
||||
group by id
|
||||
</select>
|
||||
<!--工作组详情总金额-->
|
||||
<select id="queryPageList233" resultType="com.jero.statistics.entity.AllMoney">
|
||||
select sum(allMoney) as allMoney,sum(comeAllMoney) as comeAllMoney from (
|
||||
select sum(allMoney) as allMoney,sum(comeAllMoney) as comeAllMoney,
|
||||
sum(billMoney) as billMoney,
|
||||
sum(confirmAmount) as confirmAmount from (
|
||||
SELECT
|
||||
principalNameId as principalId,
|
||||
principalName,
|
||||
@@ -129,8 +138,12 @@
|
||||
chargeUse,
|
||||
packText,
|
||||
pack,
|
||||
projectId as id
|
||||
FROM v_statistical
|
||||
projectId as id,
|
||||
if(pmb.invoice_amount is null, 0.00, pmb.invoice_amount) as billMoney,
|
||||
confirmAmount
|
||||
FROM v_statistical v
|
||||
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
|
||||
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
|
||||
<where>
|
||||
superId = #{id}
|
||||
<if test="payWorkingGroupSubletSearch.projectName != null and payWorkingGroupSubletSearch.projectName != ''">
|
||||
@@ -167,6 +180,9 @@
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="payWorkingGroupSubletSearch.billYear != null and payWorkingGroupSubletSearch.billYear != ''">
|
||||
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{payWorkingGroupSubletSearch.billYear}, '%')
|
||||
</if>
|
||||
</where>
|
||||
group by id) p
|
||||
</select>
|
||||
@@ -225,16 +241,6 @@
|
||||
</choose>
|
||||
</where>
|
||||
group by pwgs.id) pwg1 where pwg1.allMoney is not null and pwg1.allMoney !=0 order by pwg1.create_time desc
|
||||
<!-- inner join-->
|
||||
<!-- (select pwgs.id as id,working_group_id,max(ppr.payment_date) as payment_date-->
|
||||
<!-- from pay_working_group_subitem pwgs-->
|
||||
<!-- left join pay_payment_record ppr on(pwgs.id=ppr.project_id)-->
|
||||
<!-- <if test="payWorkingGroupSubletSearch.year !='' and payWorkingGroupSubletSearch.year !=null">-->
|
||||
<!-- WHERE ppr.payment_date like concat('%',#{payWorkingGroupSubletSearch.year},'%')-->
|
||||
<!-- </if>-->
|
||||
<!-- GROUP BY pwgs.id-->
|
||||
<!-- ) pwg2 on (pwg2.id=pwg1.id)-->
|
||||
<!-- order by pwg2.payment_date-->
|
||||
</select>
|
||||
<select id="queryCompanyPageList" resultType="com.jero.project.entity.PayWorkingGroupSubItem">
|
||||
select pwgs.*,pwg.working_group_project as chargeProject from pay_working_group_subitem pwgs
|
||||
|
||||
+16
@@ -15,25 +15,41 @@ public class PrincipalPeopleDetail {
|
||||
|
||||
@ApiModelProperty(value = "项目id")
|
||||
private String id;
|
||||
|
||||
@Excel(name = "来款企业", width = 15)
|
||||
@ApiModelProperty(value = "来款企业")
|
||||
private String chargeCompanyTemporaryName;
|
||||
|
||||
@Excel(name = "来款项目", width = 15)
|
||||
@ApiModelProperty(value = "来款项目")
|
||||
private String projectName;
|
||||
|
||||
@Excel(name = "应收总金额", width = 15)
|
||||
@ApiModelProperty(value = "应收总金额")
|
||||
private String allMoney;
|
||||
|
||||
@Excel(name = "实收总金额", width = 15)
|
||||
@ApiModelProperty(value = "实收总金额")
|
||||
private String comeAllMoney;
|
||||
|
||||
@Excel(name = "开票金额", width = 15)
|
||||
@ApiModelProperty(value = "开票金额")
|
||||
private String billMoney;
|
||||
|
||||
@Excel(name = "确认金额", width = 15)
|
||||
@ApiModelProperty(value = "确认金额")
|
||||
private String confirmAmount;
|
||||
|
||||
@ApiModelProperty(value = "打包")
|
||||
private Integer pack;
|
||||
|
||||
@Excel(name = "打包", width = 15)
|
||||
@ApiModelProperty(value = "打包")
|
||||
private String packText;
|
||||
|
||||
@ApiModelProperty(value = "来款用途编码")
|
||||
private String chargeUse;
|
||||
|
||||
@Excel(name = "来款用途", width = 15)
|
||||
@ApiModelProperty(value = "来款用途")
|
||||
private String chargeUse_text;
|
||||
|
||||
Reference in New Issue
Block a user