liurunyu
2025-01-04 5e12f38583c4a98005618edaa1e1a15507a478a8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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 ;
    }
}