feiyu02
2023-11-15 45fdeee912088efbd07a748a011682c6c6d1ce51
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
package com.flightfeather.monitor.service.impl;
 
import com.flightfeather.monitor.domain.ds1.entity.RiskValue;
import com.flightfeather.monitor.domain.ds1.mapper.RiskValueMapper;
import com.flightfeather.monitor.domain.ds1.repository.RiskValueRep;
import com.flightfeather.monitor.mapper.RiskAnalysisMapper;
import com.flightfeather.monitor.pojo.RiskValuePojo;
import com.flightfeather.monitor.service.RiskValueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
 
@Service
public class RiskValueServiceImpl implements RiskValueService {
    @Autowired
    private RiskValueMapper riskValueMapper;
    @Autowired
    private RiskValueRep riskValueRep;
 
    @Override
    public List<RiskValuePojo> queryRiskDataByMonth(String mnCode, String month, String type) {
        LocalDate date = LocalDate.parse(month);
        if (date != null) {
            date = date.withDayOfMonth(1);
            List<RiskValuePojo> res = riskValueMapper.queryRiskDataByMonth(mnCode, date, type);
            return res;
//            return riskValueRep.select(mnCode, date, type);
        } else {
            return new ArrayList<>();
        }
    }
}