微调
This commit is contained in:
@@ -37,38 +37,10 @@ public class DisPhotovoltaicController {
|
||||
private final IBusinessService businessService;
|
||||
private final DisPhotovoltaicService disPhotovoltaicService;
|
||||
|
||||
@ApiOperation(value = "获取10kv分布式光伏接入情况")
|
||||
@PostMapping("/import10")
|
||||
public void importTakeOrder(MultipartFile file, String startTime, String endTime) throws Exception {
|
||||
List<ExcelData> list = EasyExcel.read(file.getInputStream())
|
||||
.head(ExcelData.class)
|
||||
.headRowNumber(2)
|
||||
.sheet(2).doReadSync();
|
||||
//排重
|
||||
list = list.stream()
|
||||
.filter(t -> StrUtil.isNotBlank(t.getGenerationUserID()))
|
||||
.filter(StreamUtil.distinctByKey(ExcelData::getGenerationUserID))
|
||||
.collect(Collectors.toList());
|
||||
businessService.testInterfaceByUserId(list, startTime, endTime);
|
||||
System.out.println();
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取380kv分布式光伏接入情况")
|
||||
@PostMapping("/import380")
|
||||
public void import380(MultipartFile file, String startTime, String endTime) throws Exception {
|
||||
List<ExcelData> list = EasyExcel.read(file.getInputStream())
|
||||
.head(ExcelData.class)
|
||||
.headRowNumber(2)
|
||||
.sheet(3).doReadSync();
|
||||
//排重
|
||||
list = list.stream()
|
||||
.filter(t -> StrUtil.isNotBlank(t.getGenerationUserID()))
|
||||
.filter(StreamUtil.distinctByKey(ExcelData::getGenerationUserID))
|
||||
.collect(Collectors.toList());
|
||||
businessService.testInterfaceByUserId(list, startTime, endTime);
|
||||
System.out.println();
|
||||
|
||||
@ApiOperation(value = "查询所有用户的遥测数据")
|
||||
@PostMapping("/queryTelemetryData")
|
||||
public void queryTelemetryData(String startTime, String endTime) {
|
||||
businessService.queryTelemetryData(startTime, endTime);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "导入10kv分布式光伏接入情况", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
||||
|
||||
Reference in New Issue
Block a user