Compare commits

..

No commits in common. "9a6cff1514d484e11fc6db0f4f31b41902496d46" and "1a110afcf8a87106b76c194431c77e8bb5b0be69" have entirely different histories.

3 changed files with 8 additions and 53 deletions

View File

@ -10,12 +10,14 @@ import com.yfd.platform.modules.algorithm.service.IAlgorithmArrangeService;
import com.yfd.platform.utils.SecurityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* <p>
@ -47,7 +49,6 @@ public class AlgorithmArrangeController {
Page<AlgorithmArrange> arrangePage = algorithmArrangeService.page(page, queryWrapper);
return ResponseResult.successData(arrangePage);
}
@GetMapping("/getAlgorithmArrangeById")
@ApiOperation("根据Id查询算法布点")
public ResponseResult getAlgorithmArrangeById (String id){
@ -58,13 +59,6 @@ public class AlgorithmArrangeController {
@PostMapping("/saveAlgorithmArrange")
@ApiOperation("新增算法布点")
public ResponseResult saveAlgorithmArrange(AlgorithmArrange algorithmArrange, MultipartFile file) {
// 判断是否存在相同的方案
LambdaQueryWrapper<AlgorithmArrange> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(AlgorithmArrange::getArrangeName, algorithmArrange.getArrangeName());
if (algorithmArrangeService.getOne(queryWrapper) != null) {
return ResponseResult.error("方案名称已存在");
}
algorithmArrange.setLastmodifier("admin");
algorithmArrange.setLastmodifydate(LocalDateTime.now());
algorithmArrange.setDatastatus("1");
@ -91,13 +85,6 @@ public class AlgorithmArrangeController {
@PostMapping("/updateAlgorithmArrange")
@ApiOperation("修改算法布点")
public ResponseResult updateAlgorithmArrange(AlgorithmArrange algorithmArrange, MultipartFile file) {
// 判断是否存在相同的方案
LambdaQueryWrapper<AlgorithmArrange> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.ne(AlgorithmArrange::getId, algorithmArrange.getId()).eq(AlgorithmArrange::getArrangeName,
algorithmArrange.getArrangeName());
if (algorithmArrangeService.getOne(queryWrapper) != null) {
return ResponseResult.error("方案名称已存在");
}
algorithmArrange.setLastmodifier(SecurityUtils.getCurrentUsername());
algorithmArrange.setLastmodifydate(LocalDateTime.now());
// 文件上传逻辑
@ -118,28 +105,6 @@ public class AlgorithmArrangeController {
return ResponseResult.success();
}
@PostMapping("/deleteAlgorithmArrange")
@ApiOperation("删除布点数据")
public ResponseResult deleteAlgorithmArrange(String id) {
boolean b = algorithmArrangeService.removeById(id);
if (b) {
return ResponseResult.success();
} else {
return ResponseResult.error();
}
}
@PostMapping("/deleteAlgorithmArrange")
@ApiOperation("删除布点数据")
public ResponseResult deleteAlgorithmArrange(@RequestBody List<String> ids) {
boolean b = algorithmArrangeService.removeByIds(ids);
if (b) {
return ResponseResult.success();
} else {
return ResponseResult.error();
}
}
@PostMapping("/callAlgorithmArrange")
@ApiOperation("调用算法布点API")
public ResponseResult callAlgorithmArrange(String id) {
@ -147,4 +112,5 @@ public class AlgorithmArrangeController {
return ResponseResult.successData(algorithmArrange);
}
}

View File

@ -1,8 +1,6 @@
package com.yfd.platform.modules.algorithm.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yfd.platform.config.ResponseResult;
import com.yfd.platform.modules.algorithm.domain.AlgorithmArrangeDevice;
import com.yfd.platform.modules.algorithm.service.IAlgorithmArrangeDeviceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -36,13 +34,4 @@ public class AlgorithmArrangeDeviceController {
List<Map<String, Object>> maps = algorithmArrangeDeviceService.getArrangeDeviceInfo(arrangeId);
return ResponseResult.successData(maps);
}
@GetMapping("/getArrangeDeviceById")
@ApiOperation("根据ID查询当前布点详情")
public ResponseResult getArrangeDeviceById(String arrangeId) {
LambdaQueryWrapper<AlgorithmArrangeDevice> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(AlgorithmArrangeDevice::getArrangeId, arrangeId);
List<Map<String, Object>> maps = algorithmArrangeDeviceService.listMaps(queryWrapper);
return ResponseResult.successData(maps);
}
}

View File

@ -115,7 +115,7 @@ public class SubstationMaindeviceController {
}
LambdaQueryWrapper<SubstationMaindevice> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(StrUtil.isNotBlank(stationCode), SubstationMaindevice::getStationCode, stationCode);
queryWrapper.in(StrUtil.isNotBlank(deviceTypeList), SubstationMaindevice::getDeviceType, StrUtil.split(deviceTypeList
queryWrapper.eq(StrUtil.isNotBlank(deviceTypeList), SubstationMaindevice::getDeviceType, StrUtil.split(deviceTypeList
, ","));
queryWrapper.select(SubstationMaindevice::getMainDeviceId, SubstationMaindevice::getMainDeviceName,
SubstationMaindevice::getDeviceType, SubstationMaindevice::getFileUrl);