物消息路由模块、物解析模块提供接口
This commit is contained in:
@@ -26,4 +26,7 @@ public interface CsLineFeignClient {
|
|||||||
|
|
||||||
@PostMapping("/addList")
|
@PostMapping("/addList")
|
||||||
HttpResult<String> addLineList(@RequestBody List<CsLinePO> list);
|
HttpResult<String> addLineList(@RequestBody List<CsLinePO> list);
|
||||||
|
|
||||||
|
@PostMapping("/findByNdid")
|
||||||
|
HttpResult<List<CsLinePO>> findByNdid(@RequestParam("id") String id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.csdevice.api;
|
|||||||
import com.njcn.common.pojo.constant.ServerInfo;
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.csdevice.api.fallback.DataArrayFeignClientFallbackFactory;
|
import com.njcn.csdevice.api.fallback.DataArrayFeignClientFallbackFactory;
|
||||||
|
import com.njcn.csdevice.pojo.param.DataArrayParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsDataArray;
|
import com.njcn.csdevice.pojo.po.CsDataArray;
|
||||||
import com.njcn.csdevice.pojo.po.CsDataSet;
|
import com.njcn.csdevice.pojo.po.CsDataSet;
|
||||||
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
||||||
@@ -31,4 +32,7 @@ public interface DataArrayFeignClient {
|
|||||||
@PostMapping("/getDataArrayByIds")
|
@PostMapping("/getDataArrayByIds")
|
||||||
HttpResult<List<CsDataArray>> getDataArrayByIds(@RequestParam("ids") List<String> ids);
|
HttpResult<List<CsDataArray>> getDataArrayByIds(@RequestParam("ids") List<String> ids);
|
||||||
|
|
||||||
|
@PostMapping("/findListByParam")
|
||||||
|
HttpResult<List<CsDataArray>> findListByParam(@RequestBody DataArrayParam param);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,12 @@ public class CsLineClientFallbackFactory implements FallbackFactory<CsLineFeignC
|
|||||||
log.error("{}异常,降级处理,异常为:{}","批量新增加监测点",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","批量新增加监测点",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<CsLinePO>> findByNdid(String id) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","根据ndid查询监测点",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
|||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.csdevice.api.DataArrayFeignClient;
|
import com.njcn.csdevice.api.DataArrayFeignClient;
|
||||||
|
import com.njcn.csdevice.pojo.param.DataArrayParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsDataArray;
|
import com.njcn.csdevice.pojo.po.CsDataArray;
|
||||||
import com.njcn.csdevice.pojo.po.CsDataSet;
|
import com.njcn.csdevice.pojo.po.CsDataSet;
|
||||||
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
||||||
@@ -57,6 +58,12 @@ public class DataArrayFeignClientFallbackFactory implements FallbackFactory<Data
|
|||||||
log.error("{}异常,降级处理,异常为:{}","根据id集合称获取详细数据",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","根据id集合称获取详细数据",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<CsDataArray>> findListByParam(DataArrayParam param) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","根据条件查询详细数据",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.njcn.csdevice.pojo.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/8/14 15:30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DataArrayParam {
|
||||||
|
|
||||||
|
@ApiModelProperty("设备识别码")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty("逻辑设备id")
|
||||||
|
private Integer did;
|
||||||
|
|
||||||
|
@ApiModelProperty("逻辑子设备id")
|
||||||
|
private Integer cldId;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据类型")
|
||||||
|
private String statMethod;
|
||||||
|
}
|
||||||
@@ -63,7 +63,7 @@ public class CsDataSet extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 逻辑子设备id(从模板获取,主设备此字段没有值)
|
* 逻辑子设备id(从模板获取,主设备此字段没有值)
|
||||||
*/
|
*/
|
||||||
private String clDev;
|
private Integer clDev;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据集类型(0:主设备 1:模块 2:监测设备)
|
* 数据集类型(0:主设备 1:模块 2:监测设备)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.njcn.common.pojo.enums.common.LogEnum;
|
|||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.csdevice.pojo.param.DataArrayParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsDataArray;
|
import com.njcn.csdevice.pojo.po.CsDataArray;
|
||||||
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
||||||
import com.njcn.csdevice.pojo.vo.DeviceManagerDetailVO;
|
import com.njcn.csdevice.pojo.vo.DeviceManagerDetailVO;
|
||||||
@@ -18,6 +19,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -95,5 +97,16 @@ public class CsDataArrayController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/findListByParam")
|
||||||
|
@ApiOperation("根据条件查询详细数据")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数集合", required = true)
|
||||||
|
@ApiIgnore
|
||||||
|
public HttpResult<List<CsDataArray>> findListByParam(@RequestBody DataArrayParam param){
|
||||||
|
String methodDescribe = getMethodDescribe("findListByParam");
|
||||||
|
List<CsDataArray> list = csDataArrayService.findListByParam(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import com.njcn.common.pojo.enums.common.LogEnum;
|
|||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.csdevice.pojo.param.CsLineParm;
|
|
||||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||||
import com.njcn.csdevice.service.CsLinePOService;
|
import com.njcn.csdevice.service.CsLinePOService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
@@ -15,6 +14,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -74,4 +74,15 @@ public class CslineController extends BaseController {
|
|||||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/findByNdid")
|
||||||
|
@ApiOperation("根据ndid查询监测点")
|
||||||
|
@ApiImplicitParam(name = "id", value = "ndid", required = true)
|
||||||
|
@ApiIgnore
|
||||||
|
public HttpResult<List<CsLinePO>> findByNdid(@RequestParam String id){
|
||||||
|
String methodDescribe = getMethodDescribe("findByNdid");
|
||||||
|
List<CsLinePO> lineList= csLinePOService.findByNdid(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineList, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.njcn.csdevice.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.njcn.csdevice.pojo.dto.DataArrayDTO;
|
import com.njcn.csdevice.pojo.dto.DataArrayDTO;
|
||||||
|
import com.njcn.csdevice.pojo.param.DataArrayParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsDataArray;
|
import com.njcn.csdevice.pojo.po.CsDataArray;
|
||||||
import com.njcn.csdevice.pojo.vo.EnergyTemplateVO;
|
import com.njcn.csdevice.pojo.vo.EnergyTemplateVO;
|
||||||
import com.njcn.csdevice.pojo.vo.LineTargetVO;
|
import com.njcn.csdevice.pojo.vo.LineTargetVO;
|
||||||
@@ -28,4 +29,6 @@ public interface CsDataArrayMapper extends BaseMapper<CsDataArray> {
|
|||||||
List<CsDataArray> getGroupData(@Param("id") String id);
|
List<CsDataArray> getGroupData(@Param("id") String id);
|
||||||
|
|
||||||
List<EnergyTemplateVO> getArrayByGroup(@Param("list") List<String> list);
|
List<EnergyTemplateVO> getArrayByGroup(@Param("list") List<String> list);
|
||||||
|
|
||||||
|
List<CsDataArray> findListByParam(@Param("param") DataArrayParam param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ package com.njcn.csdevice.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -12,4 +15,6 @@ import com.njcn.csdevice.pojo.po.CsLinePO;
|
|||||||
* @version V1.0.0
|
* @version V1.0.0
|
||||||
*/
|
*/
|
||||||
public interface CsLinePOMapper extends BaseMapper<CsLinePO> {
|
public interface CsLinePOMapper extends BaseMapper<CsLinePO> {
|
||||||
|
|
||||||
|
List<CsLinePO> findByNdid(@Param("id") String id);
|
||||||
}
|
}
|
||||||
@@ -89,4 +89,22 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
order by t1.sort
|
order by t1.sort
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findListByParam" resultType="CsDataArray">
|
||||||
|
select
|
||||||
|
t4.*
|
||||||
|
from
|
||||||
|
cs_equipment_delivery t0
|
||||||
|
left join
|
||||||
|
cs_dev_model_relation t1 on t0.id = t1.dev_id
|
||||||
|
left join
|
||||||
|
cs_dev_model t2 on t1.model_id = t2.id
|
||||||
|
left join cs_data_set t3 on t3.pid = t2.id
|
||||||
|
left join cs_data_array t4 on t3.id = t4.pid
|
||||||
|
where
|
||||||
|
t0.ndid = #{param.id}
|
||||||
|
and t1.did = #{param.did}
|
||||||
|
and t3.cl_dev = #{param.cldId}
|
||||||
|
and t4.stat_method = #{param.statMethod}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -22,4 +22,18 @@
|
|||||||
line_id, dev_id, `name`, `position`, vol_grade, pt_ratio, ct_ratio, `status`, create_by,
|
line_id, dev_id, `name`, `position`, vol_grade, pt_ratio, ct_ratio, `status`, create_by,
|
||||||
create_time, update_by, update_time
|
create_time, update_by, update_time
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
<select id="findByNdid" resultType="CsLinePO">
|
||||||
|
select
|
||||||
|
t3.*
|
||||||
|
from
|
||||||
|
cs_equipment_delivery t0
|
||||||
|
left join cs_ledger t1 on
|
||||||
|
t0.id = t1.Id
|
||||||
|
left join cs_ledger t2 on
|
||||||
|
t1.Id = t2.Pid
|
||||||
|
left join cs_line t3 on t2.Id = t3.line_id
|
||||||
|
where
|
||||||
|
t0.ndid = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -1,11 +1,7 @@
|
|||||||
package com.njcn.csdevice.service;
|
package com.njcn.csdevice.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.njcn.csdevice.pojo.param.CsMarketDataParam;
|
|
||||||
import com.njcn.csdevice.pojo.po.CsLedger;
|
|
||||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||||
import com.njcn.csdevice.pojo.po.CsMarketData;
|
|
||||||
import com.njcn.csdevice.pojo.vo.CsMarketDataVO;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -30,4 +26,11 @@ public interface CsLinePOService extends IService<CsLinePO>{
|
|||||||
List<CsLinePO> queryByDevId(String devId);
|
List<CsLinePO> queryByDevId(String devId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ndid获取监测点
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<CsLinePO> findByNdid(String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.csdevice.service;
|
package com.njcn.csdevice.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.csdevice.pojo.param.DataArrayParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsDataArray;
|
import com.njcn.csdevice.pojo.po.CsDataArray;
|
||||||
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
||||||
import com.njcn.csdevice.pojo.vo.DeviceManagerDetailVO;
|
import com.njcn.csdevice.pojo.vo.DeviceManagerDetailVO;
|
||||||
@@ -42,4 +43,11 @@ public interface ICsDataArrayService extends IService<CsDataArray> {
|
|||||||
List<CsDataArray> getDataArrayById(String pid, String name);
|
List<CsDataArray> getDataArrayById(String pid, String name);
|
||||||
|
|
||||||
List<CsDataArray> getDataArrayByIds(List<String> ids);
|
List<CsDataArray> getDataArrayByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据条件获取详细数据集
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<CsDataArray> findListByParam(DataArrayParam param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.njcn.csdevice.enums.AlgorithmResponseEnum;
|
import com.njcn.csdevice.enums.AlgorithmResponseEnum;
|
||||||
import com.njcn.csdevice.mapper.CsDataArrayMapper;
|
import com.njcn.csdevice.mapper.CsDataArrayMapper;
|
||||||
import com.njcn.csdevice.pojo.dto.DataArrayDTO;
|
import com.njcn.csdevice.pojo.dto.DataArrayDTO;
|
||||||
|
import com.njcn.csdevice.pojo.param.DataArrayParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsDataArray;
|
import com.njcn.csdevice.pojo.po.CsDataArray;
|
||||||
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
||||||
import com.njcn.csdevice.pojo.vo.DeviceManagerDetailVO;
|
import com.njcn.csdevice.pojo.vo.DeviceManagerDetailVO;
|
||||||
@@ -169,5 +170,8 @@ public class CsDataArrayServiceImpl extends ServiceImpl<CsDataArrayMapper, CsDat
|
|||||||
return this.lambdaQuery().in(CsDataArray::getId,ids).list();
|
return this.lambdaQuery().in(CsDataArray::getId,ids).list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CsDataArray> findListByParam(DataArrayParam param) {
|
||||||
|
return this.baseMapper.findListByParam(param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
public List<CsLedgerVO> getLineTree() {
|
public List<CsLedgerVO> getLineTree() {
|
||||||
List<CsLedgerVO> engineeringList = new ArrayList<>();
|
List<CsLedgerVO> engineeringList = new ArrayList<>();
|
||||||
List<CsLedgerVO> allList = this.baseMapper.getAll();
|
List<CsLedgerVO> allList = this.baseMapper.getAll();
|
||||||
//fixme 这边先根据登录的用户名称来区分是否展示所有的台账信息
|
|
||||||
/*获取用户工程,设备信息过滤*/
|
/*获取用户工程,设备信息过滤*/
|
||||||
List<String> roleengineer = roleEngineerDevService.getRoleengineer();
|
List<String> roleengineer = roleEngineerDevService.getRoleengineer();
|
||||||
List<String> device = roleEngineerDevService.getDevice();
|
List<String> device = roleEngineerDevService.getDevice();
|
||||||
@@ -103,7 +102,6 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
List<String> roleengineer = roleEngineerDevService.getRoleengineer();
|
List<String> roleengineer = roleEngineerDevService.getRoleengineer();
|
||||||
List<String> device = roleEngineerDevService.getDevice();
|
List<String> device = roleEngineerDevService.getDevice();
|
||||||
engineeringList = allList.stream().filter(item->roleengineer.contains(item.getId())).collect(Collectors.toList());
|
engineeringList = allList.stream().filter(item->roleengineer.contains(item.getId())).collect(Collectors.toList());
|
||||||
//fixme 这边先根据登录的用户名称来区分是否展示所有的台账信息
|
|
||||||
// if (Objects.equals(RequestUtil.getUsername(),"root")){
|
// if (Objects.equals(RequestUtil.getUsername(),"root")){
|
||||||
// engineeringList = allList.stream().filter(item -> item.getLevel().equals(LineBaseEnum.ENGINEERING_LEVEL.getCode())).sorted(Comparator.comparing(CsLedgerVO::getSort)).collect(Collectors.toList());
|
// engineeringList = allList.stream().filter(item -> item.getLevel().equals(LineBaseEnum.ENGINEERING_LEVEL.getCode())).sorted(Comparator.comparing(CsLedgerVO::getSort)).collect(Collectors.toList());
|
||||||
// } else {
|
// } else {
|
||||||
@@ -168,7 +166,6 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
public List<CsLedgerVO> getProjectTree() {
|
public List<CsLedgerVO> getProjectTree() {
|
||||||
List<CsLedgerVO> engineeringList = new ArrayList<>();
|
List<CsLedgerVO> engineeringList = new ArrayList<>();
|
||||||
List<CsLedgerVO> allList = this.baseMapper.getAll();
|
List<CsLedgerVO> allList = this.baseMapper.getAll();
|
||||||
//fixme 这边先根据登录的用户名称来区分是否展示所有的台账信息
|
|
||||||
// if (Objects.equals(RequestUtil.getUsername(),"root") || Objects.equals(RequestUtil.getUsername(),"njcnser")){
|
// if (Objects.equals(RequestUtil.getUsername(),"root") || Objects.equals(RequestUtil.getUsername(),"njcnser")){
|
||||||
// engineeringList = allList.stream().filter(item -> item.getLevel().equals(LineBaseEnum.ENGINEERING_LEVEL.getCode())).sorted(Comparator.comparing(CsLedgerVO::getSort)).collect(Collectors.toList());
|
// engineeringList = allList.stream().filter(item -> item.getLevel().equals(LineBaseEnum.ENGINEERING_LEVEL.getCode())).sorted(Comparator.comparing(CsLedgerVO::getSort)).collect(Collectors.toList());
|
||||||
// } else {
|
// } else {
|
||||||
|
|||||||
@@ -5,15 +5,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.csdevice.mapper.CsLedgerMapper;
|
import com.njcn.csdevice.mapper.CsLedgerMapper;
|
||||||
import com.njcn.csdevice.mapper.CsLinePOMapper;
|
import com.njcn.csdevice.mapper.CsLinePOMapper;
|
||||||
import com.njcn.csdevice.pojo.param.CsLineParm;
|
|
||||||
import com.njcn.csdevice.pojo.po.AppLineTopologyDiagramPO;
|
|
||||||
import com.njcn.csdevice.pojo.po.CsLedger;
|
import com.njcn.csdevice.pojo.po.CsLedger;
|
||||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||||
import com.njcn.csdevice.service.CsLinePOService;
|
import com.njcn.csdevice.service.CsLinePOService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -56,6 +52,11 @@ public class CsLinePOServiceImpl extends ServiceImpl<CsLinePOMapper, CsLinePO> i
|
|||||||
return csLinePOS;
|
return csLinePOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CsLinePO> findByNdid(String id) {
|
||||||
|
return this.baseMapper.findByNdid(id);
|
||||||
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 1.平台端默认配置拓扑图模板,包含拓扑图信息(cs_topology_diagram_template)和拓扑图上监测点的点位信息(cs_line_topology_template)
|
// * 1.平台端默认配置拓扑图模板,包含拓扑图信息(cs_topology_diagram_template)和拓扑图上监测点的点位信息(cs_line_topology_template)
|
||||||
// *
|
// *
|
||||||
|
|||||||
Reference in New Issue
Block a user