首页修改
This commit is contained in:
+11
-6
@@ -1,6 +1,7 @@
|
||||
package com.jero.home.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.service.ProjectDetailService;
|
||||
import com.jero.home.vo.DataStatisticsVO;
|
||||
import com.jero.mail.service.IPayMailBillService;
|
||||
import com.jero.payment.service.IPayPaymentRecordService;
|
||||
@@ -35,6 +36,8 @@ public class HomeController {
|
||||
|
||||
@Resource
|
||||
private IPayMailBillService payMailBillService;
|
||||
@Resource
|
||||
private ProjectDetailService projectDetailService;
|
||||
|
||||
/**
|
||||
* 首页-数据统计
|
||||
@@ -50,18 +53,20 @@ public class HomeController {
|
||||
// 本月
|
||||
String d1 = formatters.format(today);
|
||||
// 上月
|
||||
String d2 = formatters.format(today.minusMonths(1));
|
||||
// String d2 = formatters.format(today.minusMonths(1));
|
||||
// 本月应收总额
|
||||
BigDecimal b1 = payPaymentRecordService.getMonthAmountCount(d1);
|
||||
if(Objects.isNull(b1)){
|
||||
b1 = new BigDecimal("0.00");
|
||||
}
|
||||
int count = projectDetailService.getMonthProjectCount(d1);
|
||||
// 上月应收总额
|
||||
BigDecimal b2 = payPaymentRecordService.getMonthAmountCount(d2);
|
||||
if(Objects.isNull(b2)){
|
||||
b2 = new BigDecimal("0.00");
|
||||
}
|
||||
dataStatisticsVO.setNowMonthAddAmount(b1.subtract(b2));
|
||||
// BigDecimal b2 = payPaymentRecordService.getMonthAmountCount(d2);
|
||||
// if(Objects.isNull(b2)){
|
||||
// b2 = new BigDecimal("0.00");
|
||||
// }
|
||||
//
|
||||
dataStatisticsVO.setNowMonthAddAmount(count);
|
||||
dataStatisticsVO.setNowMonthAmount((b1.divide(new BigDecimal("10000"))).setScale(2, BigDecimal.ROUND_DOWN));
|
||||
int m = payMailBillService.getMonthMailCount(d1);
|
||||
dataStatisticsVO.setNowMonthMail(m);
|
||||
|
||||
@@ -14,9 +14,7 @@ public class DataStatisticsVO implements Serializable {
|
||||
* 本月新增收款项
|
||||
*/
|
||||
@ApiModelProperty(value = "本月新增收款项")
|
||||
@DecimalMax(value = "9999999999.99",message = "本月新增收款项格式错误")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal nowMonthAddAmount;
|
||||
private Integer nowMonthAddAmount;
|
||||
/**
|
||||
* 本月到账(万元)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user