add 全所统计增加 增加预估到账年份,预估到账月份筛选条件
This commit is contained in:
@@ -114,17 +114,6 @@ public class IndexService {
|
||||
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> 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> dateList = new ArrayList<>(12);
|
||||
|
||||
+22
-4
@@ -522,6 +522,15 @@
|
||||
<if test="allProjectStatisticsSearch.estimatedArrivalDateHasFlag != null and allProjectStatisticsSearch.estimatedArrivalDateHasFlag == '0'.toString()">
|
||||
AND estimatedArrivalDate is not null
|
||||
</if>
|
||||
<choose>
|
||||
<when test="allProjectStatisticsSearch.estimatedArrivalMonth != null and allProjectStatisticsSearch.estimatedArrivalMonth != ''">
|
||||
and estimatedArrivalDate like
|
||||
concat('%',#{allProjectStatisticsSearch.estimatedArrivalYear},'-',#{allProjectStatisticsSearch.estimatedArrivalMonth},'%')
|
||||
</when>
|
||||
<when test="allProjectStatisticsSearch.estimatedArrivalYear != null and allProjectStatisticsSearch.estimatedArrivalYear != ''">
|
||||
and estimatedArrivalDate like concat('%',#{allProjectStatisticsSearch.estimatedArrivalYear},'%')
|
||||
</when>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND allMoney >= #{allProjectStatisticsSearch.allMoney}
|
||||
@@ -648,6 +657,15 @@
|
||||
<if test="allProjectStatisticsSearch.estimatedArrivalDateHasFlag != null and allProjectStatisticsSearch.estimatedArrivalDateHasFlag == '0'.toString()">
|
||||
AND estimatedArrivalDate is not null
|
||||
</if>
|
||||
<choose>
|
||||
<when test="allProjectStatisticsSearch.estimatedArrivalMonth != null and allProjectStatisticsSearch.estimatedArrivalMonth != ''">
|
||||
and estimatedArrivalDate like
|
||||
concat('%',#{allProjectStatisticsSearch.estimatedArrivalYear},'-',#{allProjectStatisticsSearch.estimatedArrivalMonth},'%')
|
||||
</when>
|
||||
<when test="allProjectStatisticsSearch.estimatedArrivalYear != null and allProjectStatisticsSearch.estimatedArrivalYear != ''">
|
||||
and estimatedArrivalDate like concat('%',#{allProjectStatisticsSearch.estimatedArrivalYear},'%')
|
||||
</when>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND allMoney >= #{allProjectStatisticsSearch.allMoney}
|
||||
@@ -2539,13 +2557,13 @@
|
||||
<select id="cumulativeListEstimatedArrivalMoney"
|
||||
resultType="com.jero.statistics.entity.AllProjectStatistics">
|
||||
select DATE_FORMAT(paymentDate, '%Y-%m') as paymentDate,sum(estimatedArrivalMoney) as estimatedArrivalMoney from (
|
||||
select receivable_amount as estimatedArrivalMoney,estimated_arrival_date as paymentDate from pay_common_project where DATE_FORMAT(estimated_arrival_date, '%Y') = #{paymentYear}
|
||||
select no_tax_amount as estimatedArrivalMoney,estimated_arrival_date as paymentDate from pay_common_project where DATE_FORMAT(estimated_arrival_date, '%Y') = #{paymentYear}
|
||||
union all
|
||||
select receivable_amount as estimatedArrivalMoney,estimated_arrival_date as paymentDate from pay_working_group_subitem where DATE_FORMAT(estimated_arrival_date, '%Y') = #{paymentYear}
|
||||
select no_tax_amount as estimatedArrivalMoney,estimated_arrival_date as paymentDate from pay_working_group_subitem where DATE_FORMAT(estimated_arrival_date, '%Y') = #{paymentYear}
|
||||
union all
|
||||
select amount_receivable as estimatedArrivalMoney,estimated_arrival_date as paymentDate from pay_meeting_situation where DATE_FORMAT(estimated_arrival_date, '%Y') = #{paymentYear}
|
||||
select no_tax_amount as estimatedArrivalMoney,estimated_arrival_date as paymentDate from pay_meeting_situation where DATE_FORMAT(estimated_arrival_date, '%Y') = #{paymentYear}
|
||||
union all
|
||||
select amount_receivable as estimatedArrivalMoney,estimated_arrival_date as paymentDate from pay_member_project_subitem where DATE_FORMAT(estimated_arrival_date, '%Y') = #{paymentYear}
|
||||
select no_tax_amount 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
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+6
@@ -67,4 +67,10 @@ public class AllProjectStatisticsSearch {
|
||||
/**预估到账日期是否为空*/
|
||||
@ApiModelProperty(value = "预估到账日期是否为空")
|
||||
private String estimatedArrivalDateHasFlag;
|
||||
/**预估到账日期是否为空*/
|
||||
@ApiModelProperty(value = "预估到账年份")
|
||||
private String estimatedArrivalYear;
|
||||
/**预估到账日期是否为空*/
|
||||
@ApiModelProperty(value = "预估到账月份")
|
||||
private String estimatedArrivalMonth;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user