update 统计金额修改

This commit is contained in:
邝凯兴
2022-07-28 15:50:32 +08:00
parent dd4b029371
commit 93e048c30d
3 changed files with 69 additions and 49 deletions
@@ -133,15 +133,16 @@
<!-- 工作组统计-->
<select id="queryPageListForStatistics" resultType="com.jero.project.entity.PayWorkingGroupStatistics">
select *,
CONCAT(CAST(ROUND((confirmAmount/allMoney)*100,2) AS CHAR),'%') AS moneyRate
CONCAT(CAST(ROUND((confirmAmount1/allMoney)*100,2) AS CHAR),'%') AS moneyRate
from (
select
superId as id,
projectName as workGroup,
sum(allMoney) as allMoney,
sum(comeAllMoney) as comeAllMoney,
sum(billMoney) as billMoney,
sum(confirmAmount) as confirmAmount
sum(paidNoTaxAmount) as comeAllMoney,
sum(invoiceNoTaxAmount) as billMoney,
sum(confirmNoTaxAmount) as confirmAmount,
sum(confirmAmount) as confirmAmount1
from
v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
@@ -222,9 +223,9 @@
select superId as id,
projectName as workGroup,
sum(allMoney) as allMoney,
sum(comeAllMoney) as comeAllMoney,
sum(billMoney) as billMoney,
sum(confirmAmount) as confirmAmount
sum(paidNoTaxAmount) as comeAllMoney,
sum(invoiceNoTaxAmount) as billMoney,
sum(confirmNoTaxAmount) as confirmAmount
from v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
<where>
@@ -365,14 +366,14 @@
principalName,
chargeCompanyTemporaryName,
allMoney,
comeAllMoney,
paidNoTaxAmount as comeAllMoney,
chargeUse,
depart,
createTime,
packText,
pack,
billMoney,
confirmAmount
invoiceNoTaxAmount as billMoney,
confirmNoTaxAmount as confirmAmount
from v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
<where>
@@ -463,12 +464,13 @@
</if>
</if>
</select>
<!-- 全所统计总金额统计-->
<select id="queryPageList33" resultType="com.jero.statistics.entity.AllMoney">
select sum(allMoney) as allMoney,
sum(comeAllMoney) as comeAllMoney,
sum(billMoney) as billMoney,
sum(confirmAmount) as confirmAmount
sum(paidNoTaxAmount) as comeAllMoney,
sum(invoiceNoTaxAmount) as billMoney,
sum(confirmNoTaxAmount) as confirmAmount
from v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
<where>
@@ -1081,17 +1083,19 @@
allMoney,
comeAllMoney,
createTime,
CONCAT(CAST(ROUND((confirmAmount / allMoney) * 100, 2) AS CHAR), '%') AS finishRate,
CONCAT(CAST(ROUND((confirmAmount1 / allMoney) * 100, 2) AS CHAR), '%') AS finishRate,
billMoney,
confirmAmount
confirmAmount,
confirmAmount1
from
(select principalNameId as principalId,
principalName,
SUM(allMoney) as allMoney,
sum(comeAllMoney) as comeAllMoney,
sum(paidNoTaxAmount) as comeAllMoney,
createTime,
sum(billMoney) as billMoney,
sum(confirmAmount) as confirmAmount
sum(invoiceNoTaxAmount) as billMoney,
sum(confirmNoTaxAmount) as confirmAmount,
sum(confirmAmount) as confirmAmount1
from v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
<where>
@@ -1172,10 +1176,10 @@
(select principalNameId as principalId,
principalName,
SUM(allMoney) as allMoney,
sum(comeAllMoney) as comeAllMoney,
sum(paidNoTaxAmount) as comeAllMoney,
createTime,
sum(billMoney) as billMoney,
sum(confirmAmount) as confirmAmount
sum(invoiceNoTaxAmount) as billMoney,
sum(confirmNoTaxAmount) as confirmAmount
from v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
<where>
@@ -1344,13 +1348,13 @@
projectName,
principalNameId as principalId,
allMoney,
comeAllMoney,
paidNoTaxAmount as comeAllMoney,
packText,
pack,
chargeUse,
chargeCompanyTemporaryName,
billMoney,
confirmAmount
invoiceNoTaxAmount as billMoney,
confirmNoTaxAmount as confirmAmount
from v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
<where>
@@ -1402,13 +1406,13 @@
projectName,
principalNameId as principalId,
allMoney,
comeAllMoney,
paidNoTaxAmount as comeAllMoney,
packText,
pack,
chargeUse,
chargeCompanyTemporaryName,
billMoney,
confirmAmount
invoiceNoTaxAmount as billMoney,
confirmNoTaxAmount as confirmAmount
from v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
<where>
@@ -1725,16 +1729,18 @@
allMoney,
comeAllMoney,
createTime,
CONCAT(CAST(ROUND((confirmAmount / allMoney) * 100, 2) AS CHAR), '%') AS finishRate,
CONCAT(CAST(ROUND((confirmAmount1 / allMoney) * 100, 2) AS CHAR), '%') AS finishRate,
billMoney,
confirmAmount from
confirmAmount,
confirmAmount1 from
(select chargeCompanyId as chargeCompanyTemporaryId,
chargeCompanyTemporaryName,
SUM(allMoney) as allMoney,
sum(comeAllMoney) as comeAllMoney,
sum(paidNoTaxAmount) as comeAllMoney,
createTime,
sum(billMoney) as billMoney,
sum(confirmAmount) as confirmAmount
sum(invoiceNoTaxAmount) as billMoney,
sum(confirmNoTaxAmount) as confirmAmount,
sum(confirmAmount) as confirmAmount1
from v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
<where>
@@ -1814,10 +1820,10 @@
(select chargeCompanyTemporaryId,
chargeCompanyTemporaryName,
SUM(allMoney) as allMoney,
sum(comeAllMoney) as comeAllMoney,
sum(paidNoTaxAmount) as comeAllMoney,
createTime,
sum(billMoney) as billMoney,
sum(confirmAmount) as confirmAmount
sum(invoiceNoTaxAmount) as billMoney,
sum(confirmNoTaxAmount) as confirmAmount
from v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
<where>
@@ -1976,9 +1982,10 @@
<!-- 企业来款详情统计-->
<select id="queryPageListForCompanyDetail" resultType="com.jero.statistics.entity.CompanyComeMoneyDetail">
select * from(
select projectId,projectName,allMoney,comeAllMoney,chargeUse,packText,pack,
billMoney,
confirmAmount
select projectId,projectName,allMoney,chargeUse,packText,pack,
paidNoTaxAmount as comeAllMoney,
invoiceNoTaxAmount as billMoney,
confirmNoTaxAmount as confirmAmount
from v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
<where>
@@ -2064,12 +2071,12 @@
select projectId,
projectName,
allMoney,
comeAllMoney,
paidNoTaxAmount as comeAllMoney,
chargeUse,
packText,
pack,
billMoney,
confirmAmount
invoiceNoTaxAmount as billMoney,
confirmNoTaxAmount as confirmAmount
from v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
<where>
@@ -2128,15 +2135,17 @@
comeAllMoney,
departName,
billMoney,
CONCAT(CAST(ROUND((confirmAmount / allMoney) * 100, 2) AS CHAR), '%') AS finishRate,
confirmAmount
CONCAT(CAST(ROUND((confirmAmount1 / allMoney) * 100, 2) AS CHAR), '%') AS finishRate,
confirmAmount,
confirmAmount1
from
(select
sum(allMoney) as allMoney,
sum(comeAllMoney) as comeAllMoney,
sum(paidNoTaxAmount) as comeAllMoney,
depart as departName,
sum(billMoney) as billMoney,
sum(confirmAmount) as confirmAmount
sum(invoiceNoTaxAmount) as billMoney,
sum(confirmNoTaxAmount) as confirmAmount,
sum(confirmAmount) as confirmAmount1
from v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
<where>
@@ -2185,9 +2194,9 @@
<select id="queryPageListDepartment33" resultType="com.jero.statistics.entity.AllMoney">
select sum(allMoney) as allMoney,
sum(comeAllMoney) as comeAllMoney,
sum(billMoney) as billMoney,
sum(confirmAmount) as confirmAmount
sum(paidNoTaxAmount) as comeAllMoney,
sum(invoiceNoTaxAmount) as billMoney,
sum(confirmNoTaxAmount) as confirmAmount
from v_statistical v
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
<where>
@@ -2206,4 +2215,5 @@
</if>
</where>
</select>
</mapper>
@@ -7,11 +7,15 @@ import org.jeecgframework.poi.excel.annotation.Excel;
@Data
public class AllMoney {
private String allMoney;
@ApiModelProperty("到账金额未税")
private String comeAllMoney;
@ApiModelProperty("开票金额未税")
private String billMoney;
@ApiModelProperty("确认金额未税")
private String confirmAmount;
}
@@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.util.Date;
/**
* @author zql
* @date 2021/9/17 18:04
@@ -61,4 +63,8 @@ public class AllProjectStatistics {
@Excel(name = "项目负责人", width = 15)
@ApiModelProperty(value = "项目负责人")
private String principalName;
@Excel(name = "到账时间", width = 15)
@ApiModelProperty(value = "到账时间")
private Date paymentDate;
}