优化逻辑
This commit is contained in:
parent
90254b22bb
commit
4aff06ac8b
@ -22,7 +22,7 @@ public class AlgorithmTaskManager {
|
||||
private static final String JOB_GROUP_PREFIX = "STATION_";
|
||||
|
||||
// 存储每个 stationCode 对应的 Scheduler
|
||||
private Map<String, Scheduler> schedulers = new HashMap<>();
|
||||
private final Map<String, Scheduler> schedulers = new HashMap<>();
|
||||
|
||||
/**
|
||||
* 添加定时任务
|
||||
|
@ -25,10 +25,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -113,6 +110,9 @@ public class SubstationMaindeviceController {
|
||||
@GetMapping("/getMainDeviceByType")
|
||||
@ApiOperation("根据主设备类型获取主设备")
|
||||
public ResponseResult getMainDeviceByType(String stationCode, String deviceType) {
|
||||
if (StrUtil.isBlank(stationCode) || StrUtil.isBlank(deviceType)) {
|
||||
return ResponseResult.successData(new ArrayList<>());
|
||||
}
|
||||
LambdaQueryWrapper<SubstationMaindevice> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(StrUtil.isNotBlank(stationCode), SubstationMaindevice::getStationCode, stationCode);
|
||||
queryWrapper.eq(StrUtil.isNotBlank(deviceType), SubstationMaindevice::getDeviceType, StrUtil.split(deviceType
|
||||
|
Loading…
Reference in New Issue
Block a user