1.pms电能质量综合评估功能兼容

This commit is contained in:
2024-11-06 11:13:18 +08:00
parent 7b6099e2dc
commit a608b3850c
24 changed files with 213 additions and 92 deletions

View File

@@ -8,6 +8,7 @@ import com.njcn.common.utils.HttpResultUtil;
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
import com.njcn.device.biz.pojo.dto.LineDTO;
import com.njcn.device.pms.service.majornetwork.IMonitorService;
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
import com.njcn.web.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -58,4 +59,15 @@ public class CommLineController extends BaseController {
List<LineDTO> result = monitorService.getLineDetailBatch(ids);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getLineInfo")
@ApiOperation("获取监测点信息")
public HttpResult<List<PollutionLineDTO>> getLineInfo(@RequestBody List<String> ids) {
String methodDescribe = getMethodDescribe("getLineInfo");
List<PollutionLineDTO> result = monitorService.getLineInfo(ids);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
}

View File

@@ -9,7 +9,6 @@ import com.njcn.common.utils.HttpResultUtil;
import com.njcn.device.pms.pojo.po.StatationStat;
import com.njcn.device.pms.pojo.vo.StatationStatVO;
import com.njcn.device.pms.service.majornetwork.IStatationStatService;
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
import com.njcn.web.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -19,7 +18,6 @@ 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 retrofit2.http.GET;
import java.util.List;

View File

@@ -18,6 +18,7 @@ import com.njcn.device.pms.pojo.vo.MonitorVO;
import com.njcn.device.pms.pojo.vo.PmsMonitorVO;
import com.njcn.device.biz.pojo.po.Overlimit;
import com.njcn.device.pms.pojo.vo.gw.TypicalSourceOnLine;
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
import com.njcn.user.pojo.po.Dept;
import org.springframework.web.multipart.MultipartFile;
@@ -222,4 +223,7 @@ public interface IMonitorService extends IService<Monitor> {
* @Date: 2024/5/27 13:54
*/
Page<TypicalSourceOnLine> monitorTypicalList(TypicalSourceParam param);
List<PollutionLineDTO> getLineInfo(List<String> ids);
}

View File

@@ -9,10 +9,7 @@ import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
import com.njcn.device.pms.pojo.param.TerminalQueryParam;
import com.njcn.device.pms.pojo.po.PmsMidLedger;
import com.njcn.device.pms.pojo.po.StatationStat;
import com.njcn.device.pms.pojo.po.StatationStat;
import com.njcn.device.pms.pojo.vo.StatationStatVO;
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
import com.njcn.web.pojo.param.BaseParam;
import java.util.List;

View File

@@ -41,6 +41,7 @@ import com.njcn.device.pms.pojo.vo.PmsMonitorVO;
import com.njcn.device.pms.pojo.vo.gw.TypicalSourceOnLine;
import com.njcn.device.pms.service.majornetwork.*;
import com.njcn.device.pq.pojo.bo.excel.OracleTerminalExcel;
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
import com.njcn.device.pq.pojo.po.LineBak;
import com.njcn.poi.excel.ExcelUtil;
import com.njcn.poi.util.PoiUtil;
@@ -58,7 +59,6 @@ import com.njcn.system.pojo.po.DictData;
import com.njcn.user.pojo.dto.DeptDTO;
import com.njcn.user.pojo.po.Dept;
import com.njcn.web.factory.PageFactory;
import com.njcn.web.pojo.dto.PmsPage;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
@@ -891,6 +891,26 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
pmsPage.setRecords(info);
return pmsPage;
}
@Override
public List<PollutionLineDTO> getLineInfo(List<String> ids) {
List<PollutionLineDTO> result = new ArrayList<>();
LambdaQueryWrapper<Monitor> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.in(Monitor::getId,ids).eq(Monitor::getStatus,DataStateEnum.ENABLE.getCode());
List<Monitor> monitors = this.list(lambdaQueryWrapper);
monitors.forEach(item->{
PollutionLineDTO pollutionLineDTO = new PollutionLineDTO();
pollutionLineDTO.setId(item.getId());
pollutionLineDTO.setName(item.getName());
pollutionLineDTO.setBusBar(item.getLineId());
pollutionLineDTO.setSubstationId(item.getPowerrId());
pollutionLineDTO.setSubstation(item.getPowerrName());
pollutionLineDTO.setPowerCompany(item.getOrgName());
result.add(pollutionLineDTO);
});
return result;
}
private String monitorObjectTypeName(String name) {
if(StrUtil.isNotBlank(name)){
switch (name) {