首页修改

This commit is contained in:
梁琦涛
2021-11-02 16:45:32 +08:00
parent 03716104c7
commit f15afeb3ca
5 changed files with 29 additions and 2 deletions
@@ -59,7 +59,7 @@ public class HomeController {
if(Objects.isNull(b1)){
b1 = new BigDecimal("0.00");
}
int count = projectDetailService.getMonthProjectCount(d1);
int count = payPaymentRecordService.getMonthProjectCount(d1);
// 上月应收总额
// BigDecimal b2 = payPaymentRecordService.getMonthAmountCount(d2);
// if(Objects.isNull(b2)){
@@ -67,7 +67,7 @@ public class HomeController {
// }
//
dataStatisticsVO.setNowMonthAddAmount(count);
dataStatisticsVO.setNowMonthAmount((b1.divide(new BigDecimal("10000"))).setScale(2, BigDecimal.ROUND_DOWN));
dataStatisticsVO.setNowMonthAmount((b1.divide(new BigDecimal("10000"),2,BigDecimal.ROUND_DOWN)));
int m = payMailBillService.getMonthMailCount(d1);
dataStatisticsVO.setNowMonthMail(m);
return Result.OK(dataStatisticsVO);
@@ -48,4 +48,14 @@ public interface PayPaymentRecordMapper extends BaseMapper<PayPaymentRecord> {
* @Exception
*/
BigDecimal getMonthAmountCount(String time);
/**
* @Description 查询月份收款项目个数
* @Author lqt
* @Date 2021/11/2
* @Param
* @Return
* @Exception
*/
Integer getMonthProjectCount(String time);
}
@@ -207,4 +207,7 @@
<select id="getMonthAmountCount" resultType="java.math.BigDecimal">
SELECT sum(amount_received) AS nowMonthAmount FROM pay_payment_record WHERE DATE_FORMAT(payment_date,'%Y-%m') = #{time}
</select>
<select id="getMonthProjectCount" resultType="java.lang.Integer">
select count(*) from (select * from pay_payment_record WHERE DATE_FORMAT(payment_date,'%Y-%m') = #{time} group by project_id) aa
</select>
</mapper>
@@ -74,6 +74,15 @@ public interface IPayPaymentRecordService extends IService<PayPaymentRecord> {
* @Exception
*/
BigDecimal getMonthAmountCount(String time);
/**
* @Description 查询月份收款项目个数
* @Author lqt
* @Date 2021/11/2
* @Param
* @Return
* @Exception
*/
Integer getMonthProjectCount(String time);
}
@@ -792,6 +792,11 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
return payPaymentRecordMapper.getMonthAmountCount(time);
}
@Override
public Integer getMonthProjectCount(String time) {
return payPaymentRecordMapper.getMonthProjectCount(time);
}
/**
* 获取对象ID
*