电价配置-列表加时间范围-暂时只取年份
This commit is contained in:
@ -25,7 +25,7 @@ public interface IEmsEnergyPriceConfigService
|
||||
*
|
||||
* @return 电价配置集合
|
||||
*/
|
||||
public List<EnergyPriceVo> selectEmsEnergyPriceConfigList();
|
||||
public List<EnergyPriceVo> selectEmsEnergyPriceConfigList(String startTime,String endTime);
|
||||
|
||||
/**
|
||||
* 新增电价配置-按月
|
||||
|
||||
@ -61,12 +61,12 @@ public class EmsEnergyPriceConfigServiceImpl implements IEmsEnergyPriceConfigSer
|
||||
* @return 电价配置
|
||||
*/
|
||||
@Override
|
||||
public List<EnergyPriceVo> selectEmsEnergyPriceConfigList()
|
||||
public List<EnergyPriceVo> selectEmsEnergyPriceConfigList(String startTime,String endTime)
|
||||
{
|
||||
List<EnergyPriceVo> responses = new ArrayList<>();
|
||||
// 仅查询当年配置
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
int currentYear = currentDate.getYear();
|
||||
// 根据时间截取年份
|
||||
String[] startTimeArr = startTime.split("-");
|
||||
int currentYear = Integer.valueOf(startTimeArr[0]);
|
||||
|
||||
List<EmsEnergyPriceConfig> priceConfigs = emsEnergyPriceConfigMapper.getCurrentYearConfigList(currentYear);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user