feiyu02
2023-11-15 26cdbc1511eeac6e6d1bb95bb5b1863b4ad7b866
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
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);
            return riskValueMapper.queryRiskDataByMonth(mnCode, date, type);
//            return riskValueRep.select(mnCode, date, type);
        } else {
            return new ArrayList<>();
        }
    }
}