You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.5 KiB
61 lines
1.5 KiB
package com.mh.user; |
|
|
|
import com.mh.user.entity.EnergyEntity; |
|
import com.mh.user.mapper.EnergyMapper; |
|
import com.mh.user.mapper.DealDataMapper; |
|
import com.mh.user.service.HistoryDataPreService; |
|
import com.mh.user.service.NowDataService; |
|
import org.junit.jupiter.api.Test; |
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import java.util.List; |
|
|
|
/** |
|
* @author ljf |
|
* @title : |
|
* @description : |
|
* @updateTime 2020-07-28 |
|
* @throws : |
|
*/ |
|
public class DealDataTest extends UserServiceApplicationTests { |
|
|
|
@Autowired |
|
private DealDataMapper dealDataMapper; |
|
@Autowired |
|
private NowDataService nowDataService; |
|
|
|
@Autowired |
|
private EnergyMapper energyMapper; |
|
|
|
@Test |
|
public void dealChillersData() { |
|
// dealDataMapper.dealChillersData(); |
|
} |
|
|
|
@Test |
|
public void testSetTemp(){ |
|
nowDataService.upTempSet2("33","48","2"); |
|
} |
|
|
|
@Test |
|
public void getDataTest(){ |
|
List<EnergyEntity> list = energyMapper.queryEnergyMonth("2-3", "2023-03", "2023-03", 1, 10); |
|
System.out.println(list); |
|
} |
|
|
|
@Autowired |
|
private HistoryDataPreService historyDataPreService; |
|
|
|
@Test |
|
public void testPre() { |
|
try { |
|
// 训练数据 |
|
historyDataPreService.startTrainData("21"); |
|
// 预测数据 |
|
historyDataPreService.startPredictData("21", "2024-03-21"); |
|
} catch (Exception e) { |
|
e.printStackTrace(); |
|
System.out.println(e.getMessage()); |
|
} |
|
} |
|
}
|
|
|