首页统计修改
This commit is contained in:
@@ -112,6 +112,18 @@ public class IndexService {
|
|||||||
List<String> billMoneyMap = cumulativeProcesZero(list.stream().map(AllProjectStatistics::getBillMoney).collect(Collectors.toList()));
|
List<String> billMoneyMap = cumulativeProcesZero(list.stream().map(AllProjectStatistics::getBillMoney).collect(Collectors.toList()));
|
||||||
List<String> confirmAmountMap = cumulativeProcesZero(list.stream().map(AllProjectStatistics::getConfirmAmount).collect(Collectors.toList()));
|
List<String> confirmAmountMap = cumulativeProcesZero(list.stream().map(AllProjectStatistics::getConfirmAmount).collect(Collectors.toList()));
|
||||||
List<String> allMoneyMap = cumulativeProcesZero(list.stream().map(AllProjectStatistics::getAllMoney).collect(Collectors.toList()));
|
List<String> allMoneyMap = cumulativeProcesZero(list.stream().map(AllProjectStatistics::getAllMoney).collect(Collectors.toList()));
|
||||||
|
// 预计到账金额
|
||||||
|
List<AllProjectStatistics> listEstimatedArrivalMoney = payWorkingGroupMapper.cumulativeListEstimatedArrivalMoney(allProjectStatisticsSearch.getPaymentYear());
|
||||||
|
// 累加金额
|
||||||
|
for (int i = 1; i < listEstimatedArrivalMoney.size(); i++) {
|
||||||
|
AllProjectStatistics obj = listEstimatedArrivalMoney.get(i);
|
||||||
|
AllProjectStatistics objLast = listEstimatedArrivalMoney.get(i-1);
|
||||||
|
BigDecimal n = new BigDecimal(obj.getEstimatedArrivalMoney());
|
||||||
|
BigDecimal l = new BigDecimal(objLast.getEstimatedArrivalMoney());
|
||||||
|
obj.setEstimatedArrivalMoney(n.add(l).toPlainString());
|
||||||
|
listEstimatedArrivalMoney.set(i,obj);
|
||||||
|
}
|
||||||
|
|
||||||
List<String> date = list.stream().map(AllProjectStatistics::getPaymentDate).collect(Collectors.toList());
|
List<String> date = list.stream().map(AllProjectStatistics::getPaymentDate).collect(Collectors.toList());
|
||||||
List<String> dateList = new ArrayList<>(12);
|
List<String> dateList = new ArrayList<>(12);
|
||||||
for (String d : date) {
|
for (String d : date) {
|
||||||
@@ -170,6 +182,9 @@ public class IndexService {
|
|||||||
if (lineChartListVO.getComeAllMoney().equals("0.00")) {
|
if (lineChartListVO.getComeAllMoney().equals("0.00")) {
|
||||||
lineChartListVO.setComeAllMoney(old.getComeAllMoney());
|
lineChartListVO.setComeAllMoney(old.getComeAllMoney());
|
||||||
}
|
}
|
||||||
|
if (lineChartListVO.getEstimatedArrivalMoney().equals("0.00")) {
|
||||||
|
lineChartListVO.setEstimatedArrivalMoney(old.getEstimatedArrivalMoney());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -2525,14 +2525,14 @@
|
|||||||
<!-- 统计预计到账金额(应收金额) 预计到账日期 -->
|
<!-- 统计预计到账金额(应收金额) 预计到账日期 -->
|
||||||
<select id="cumulativeListEstimatedArrivalMoney"
|
<select id="cumulativeListEstimatedArrivalMoney"
|
||||||
resultType="com.jero.statistics.entity.AllProjectStatistics">
|
resultType="com.jero.statistics.entity.AllProjectStatistics">
|
||||||
select DATE_FORMAT(paymentDate, '%Y-%m') as paymentDate,sum(comeAllMoney) as comeAllMoney from (
|
select DATE_FORMAT(paymentDate, '%Y-%m') as paymentDate,sum(estimatedArrivalMoney) as estimatedArrivalMoney from (
|
||||||
select receivable_amount as comeAllMoney,estimated_arrival_date as paymentDate from pay_common_project where DATE_FORMAT(estimated_arrival_date, '%Y') = '2023'
|
select receivable_amount as estimatedArrivalMoney,estimated_arrival_date as paymentDate from pay_common_project where DATE_FORMAT(estimated_arrival_date, '%Y') = #{paymentYear}
|
||||||
union all
|
union all
|
||||||
select receivable_amount as comeAllMoney,estimated_arrival_date as paymentDate from pay_working_group_subitem where DATE_FORMAT(estimated_arrival_date, '%Y') = '2023'
|
select receivable_amount as estimatedArrivalMoney,estimated_arrival_date as paymentDate from pay_working_group_subitem where DATE_FORMAT(estimated_arrival_date, '%Y') = #{paymentYear}
|
||||||
union all
|
union all
|
||||||
select amount_receivable as comeAllMoney,estimated_arrival_date as paymentDate from pay_meeting_situation where DATE_FORMAT(estimated_arrival_date, '%Y') = '2023'
|
select amount_receivable as estimatedArrivalMoney,estimated_arrival_date as paymentDate from pay_meeting_situation where DATE_FORMAT(estimated_arrival_date, '%Y') = #{paymentYear}
|
||||||
union all
|
union all
|
||||||
select amount_receivable as comeAllMoney,estimated_arrival_date as paymentDate from pay_member_project_subitem where DATE_FORMAT(estimated_arrival_date, '%Y') = '2023'
|
select amount_receivable as estimatedArrivalMoney,estimated_arrival_date as paymentDate from pay_member_project_subitem where DATE_FORMAT(estimated_arrival_date, '%Y') = #{paymentYear}
|
||||||
) dataAll group by DATE_FORMAT(paymentDate, '%Y-%m') order by paymentDate
|
) dataAll group by DATE_FORMAT(paymentDate, '%Y-%m') order by paymentDate
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+10
-1
@@ -619,6 +619,15 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl<PayWorkingGroupMappe
|
|||||||
List<AllProjectStatistics> listComeAllMoney = payWorkingGroupMapper.cumulativeListComeAllMoney(allProjectStatisticsSearch.getPaymentYear());
|
List<AllProjectStatistics> listComeAllMoney = payWorkingGroupMapper.cumulativeListComeAllMoney(allProjectStatisticsSearch.getPaymentYear());
|
||||||
// 预计到账金额
|
// 预计到账金额
|
||||||
List<AllProjectStatistics> listEstimatedArrivalMoney = payWorkingGroupMapper.cumulativeListEstimatedArrivalMoney(allProjectStatisticsSearch.getPaymentYear());
|
List<AllProjectStatistics> listEstimatedArrivalMoney = payWorkingGroupMapper.cumulativeListEstimatedArrivalMoney(allProjectStatisticsSearch.getPaymentYear());
|
||||||
|
// 累加金额
|
||||||
|
for (int i = 1; i < listEstimatedArrivalMoney.size(); i++) {
|
||||||
|
AllProjectStatistics obj = listEstimatedArrivalMoney.get(i);
|
||||||
|
AllProjectStatistics objLast = listEstimatedArrivalMoney.get(i-1);
|
||||||
|
BigDecimal n = new BigDecimal(obj.getEstimatedArrivalMoney());
|
||||||
|
BigDecimal l = new BigDecimal(objLast.getEstimatedArrivalMoney());
|
||||||
|
obj.setEstimatedArrivalMoney(n.add(l).toPlainString());
|
||||||
|
listEstimatedArrivalMoney.set(i,obj);
|
||||||
|
}
|
||||||
return getAllProjectMoneyStatistics(allProjectStatisticsSearch,allMoneyList,listConfirmAmount, listBillMoney,listComeAllMoney,listEstimatedArrivalMoney);
|
return getAllProjectMoneyStatistics(allProjectStatisticsSearch,allMoneyList,listConfirmAmount, listBillMoney,listComeAllMoney,listEstimatedArrivalMoney);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -689,7 +698,7 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl<PayWorkingGroupMappe
|
|||||||
Map<String, String> confirmAmountMap = listConfirmAmount.stream().collect(Collectors.toMap(AllProjectStatistics::getPaymentDate, AllProjectStatistics::getConfirmAmount));
|
Map<String, String> confirmAmountMap = listConfirmAmount.stream().collect(Collectors.toMap(AllProjectStatistics::getPaymentDate, AllProjectStatistics::getConfirmAmount));
|
||||||
Map<String, String> billMoneyMap = listBillMoney.stream().collect(Collectors.toMap(AllProjectStatistics::getPaymentDate, AllProjectStatistics::getBillMoney));
|
Map<String, String> billMoneyMap = listBillMoney.stream().collect(Collectors.toMap(AllProjectStatistics::getPaymentDate, AllProjectStatistics::getBillMoney));
|
||||||
Map<String, String> comeAllMoneyMap = listComeAllMoney.stream().collect(Collectors.toMap(AllProjectStatistics::getPaymentDate, AllProjectStatistics::getComeAllMoney));
|
Map<String, String> comeAllMoneyMap = listComeAllMoney.stream().collect(Collectors.toMap(AllProjectStatistics::getPaymentDate, AllProjectStatistics::getComeAllMoney));
|
||||||
Map<String, String> estimatedArrivalMoneyMap = listEstimatedArrivalMoney.stream().collect(Collectors.toMap(AllProjectStatistics::getPaymentDate, AllProjectStatistics::getComeAllMoney));
|
Map<String, String> estimatedArrivalMoneyMap = listEstimatedArrivalMoney.stream().collect(Collectors.toMap(AllProjectStatistics::getPaymentDate, AllProjectStatistics::getEstimatedArrivalMoney));
|
||||||
|
|
||||||
String paymentYear=allProjectStatisticsSearch.getPaymentYear();
|
String paymentYear=allProjectStatisticsSearch.getPaymentYear();
|
||||||
List<String> yearMonth = getYearMonth(paymentYear);
|
List<String> yearMonth = getYearMonth(paymentYear);
|
||||||
|
|||||||
Reference in New Issue
Block a user