package com.dy.pipIrrStatistics.stClient;
|
|
import com.dy.common.webUtil.QueryResultVo;
|
import com.dy.pipIrrGlobal.daoSt.StClientAmountDayMapper ;
|
import com.dy.pipIrrGlobal.daoSt.StClientAmountMonthMapper ;
|
import com.dy.pipIrrGlobal.daoSt.StClientAmountYearMapper ;
|
import com.dy.pipIrrGlobal.voSt.VoStClientAmountDay;
|
import lombok.extern.slf4j.Slf4j;
|
import org.apache.dubbo.common.utils.PojoUtils;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import java.text.ParseException;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* @Author: liurunyu
|
* @Date: 2024/12/30 15:22
|
* @Description
|
*/
|
|
@Slf4j
|
@Service
|
public class StClientSv {
|
|
private StClientAmountDayMapper stClientAmountDayDao ;
|
private StClientAmountMonthMapper stClientAmountMonthDao ;
|
private StClientAmountYearMapper stClientAmountYearDao ;
|
@Autowired
|
private void setDao(StClientAmountDayMapper dao){
|
this.stClientAmountDayDao = dao ;
|
}
|
@Autowired
|
private void setDao(StClientAmountMonthMapper dao){
|
this.stClientAmountMonthDao = dao ;
|
}
|
@Autowired
|
private void setDao(StClientAmountYearMapper dao){
|
this.stClientAmountYearDao = dao ;
|
}
|
|
|
public QueryResultVo<List<VoStClientAmountDay>> selectStClientAmountDay(StClientQo qo) throws ParseException {
|
QueryResultVo<List<VoStClientAmountDay>> rsVo = new QueryResultVo<>() ;
|
// 生成查询参数
|
Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ;
|
// 获取符合条件的记录数
|
Long itemTotal = stClientAmountDayDao.selectCountDayStatistics(params) ;
|
|
if(itemTotal != null && itemTotal > 0) {
|
rsVo.pageSize = qo.pageSize;
|
rsVo.pageCurr = qo.pageCurr;
|
rsVo.calculateAndSet(itemTotal, params);
|
|
rsVo.obj = stClientAmountDayDao.selectDayStatistics(params);
|
}
|
return rsVo ;
|
}
|
}
|