java110
2023-05-16 63bfc2543ee5b52d03bfcd215d9958ba8e2fb755
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
package com.java110.report.dao.impl;
 
import com.alibaba.fastjson.JSONObject;
import com.java110.core.base.dao.BaseServiceDao;
import com.java110.core.log.LoggerFactory;
import com.java110.dto.report.ReportCarDto;
import com.java110.dto.report.ReportRoomDto;
import com.java110.report.dao.IReportCommunityServiceDao;
import com.java110.report.dao.IReportFeeStatisticsServiceDao;
import org.slf4j.Logger;
import org.springframework.stereotype.Service;
 
import java.util.List;
import java.util.Map;
 
/**
 * @ClassName ReportCommunityServiceDaoImpl
 * @Description TODO
 * @Author wuxw
 * @Date 2020/10/15 22:15
 * @Version 1.0
 * add by wuxw 2020/10/15
 **/
@Service("reportFeeStatisticsServiceDaoImpl")
public class ReportFeeStatisticsServiceDaoImpl extends BaseServiceDao implements IReportFeeStatisticsServiceDao {
 
    private static Logger logger = LoggerFactory.getLogger(ReportFeeStatisticsServiceDaoImpl.class);
 
    @Override
    public double getHisMonthOweFee(Map info) {
        logger.debug("查询历史欠费 入参 info : {}", JSONObject.toJSONString(info));
 
        List<Map> infos = sqlSessionTemplate.selectList("reportFeeStatisticsServiceDaoImpl.getHisMonthOweFee", info);
 
        if (infos == null || infos.size() < 1) {
            return 0;
        }
 
        return Double.parseDouble(infos.get(0).get("hisOweFee").toString());
    }
 
    @Override
    public double getCurMonthOweFee(Map info) {
        logger.debug("查询单月欠费 入参 info : {}", JSONObject.toJSONString(info));
 
        List<Map> infos = sqlSessionTemplate.selectList("reportFeeStatisticsServiceDaoImpl.getCurMonthOweFee", info);
 
        if (infos == null || infos.size() < 1) {
            return 0;
        }
 
        return Double.parseDouble(infos.get(0).get("curOweFee").toString());
    }
 
    @Override
    public double getCurReceivableFee(Map info) {
        logger.debug("查询单月欠费 入参 info : {}", JSONObject.toJSONString(info));
 
        List<Map> infos = sqlSessionTemplate.selectList("reportFeeStatisticsServiceDaoImpl.getCurReceivableFee", info);
 
        if (infos == null || infos.size() < 1) {
            return 0;
        }
 
        return Double.parseDouble(infos.get(0).get("curReceivableFee").toString());
    }
 
 
    /**
     * 查询欠费追回
     * @param info
     * @return
     */
    @Override
    public double getHisReceivedFee(Map info) {
        logger.debug("查询 欠费追回 入参 info : {}", JSONObject.toJSONString(info));
 
        List<Map> infos = sqlSessionTemplate.selectList("reportFeeStatisticsServiceDaoImpl.getHisReceivedFee", info);
 
        if (infos == null || infos.size() < 1) {
            return 0;
        }
 
        return Double.parseDouble(infos.get(0).get("hisReceivedFee").toString());
    }
 
    /**
     * 查询预交费用
     * @param info
     * @return
     */
    @Override
    public double getPreReceivedFee(Map info) {
        logger.debug("查询 预交费用 入参 info : {}", JSONObject.toJSONString(info));
 
        List<Map> infos = sqlSessionTemplate.selectList("reportFeeStatisticsServiceDaoImpl.getPreReceivedFee", info);
 
        if (infos == null || infos.size() < 1) {
            return 0;
        }
 
        return Double.parseDouble(infos.get(0).get("preReceivedFee").toString());
    }
 
    /**
     * 实收费用
     * @param info
     * @return
     */
    @Override
    public double getReceivedFee(Map info) {
        logger.debug("查询 预交费用 入参 info : {}", JSONObject.toJSONString(info));
 
        List<Map> infos = sqlSessionTemplate.selectList("reportFeeStatisticsServiceDaoImpl.getReceivedFee", info);
 
        if (infos == null || infos.size() < 1) {
            return 0;
        }
 
        return Double.parseDouble(infos.get(0).get("receivedFee").toString());
    }
 
    @Override
    public int getOweRoomCount(Map info) {
        logger.debug("查询 欠费户数 入参 info : {}", JSONObject.toJSONString(info));
 
        List<Map> infos = sqlSessionTemplate.selectList("reportFeeStatisticsServiceDaoImpl.getOweRoomCount", info);
 
        if (infos == null || infos.size() < 1) {
            return 0;
        }
 
        return Integer.parseInt(infos.get(0).get("oweRoomCount").toString());
    }
 
 
    @Override
    public int getFeeRoomCount(Map info) {
        logger.debug("查询 收费户数 入参 info : {}", JSONObject.toJSONString(info));
 
        List<Map> infos = sqlSessionTemplate.selectList("reportFeeStatisticsServiceDaoImpl.getFeeRoomCount", info);
 
        if (infos == null || infos.size() < 1) {
            return 0;
        }
 
        return Integer.parseInt(infos.get(0).get("feeRoomCount").toString());
    }
 
    @Override
    public List<Map> getFloorFeeSummary(Map info) {
        logger.debug("查询 楼栋收费率 入参 info : {}", JSONObject.toJSONString(info));
 
        List<Map> infos = sqlSessionTemplate.selectList("reportFeeStatisticsServiceDaoImpl.getFloorFeeSummary", info);
 
 
        return infos;
    }
 
    @Override
    public List<Map> getConfigFeeSummary(Map info) {
        logger.debug("查询 费用项收费率 入参 info : {}", JSONObject.toJSONString(info));
 
        List<Map> infos = sqlSessionTemplate.selectList("reportFeeStatisticsServiceDaoImpl.getConfigFeeSummary", info);
 
 
        return infos;
    }
 
 
}