微调
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
package com.njcn.csdevice.api;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.api.fallback.CsLedgerFeignClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
|
||||
import com.njcn.csdevice.pojo.dto.LineParamDTO;
|
||||
@@ -39,4 +43,9 @@ public interface CsLedgerFeignClient {
|
||||
@PostMapping("/deviceTree")
|
||||
@ApiOperation("三层设备树(装置层)")
|
||||
HttpResult<List<CsLedgerVO>> getDeviceTree();
|
||||
}
|
||||
|
||||
@PostMapping("/getAllLedger")
|
||||
HttpResult<List<CsLedgerVO>> getAllLedger();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -62,6 +62,12 @@ public class CsLedgerFeignClientFallbackFactory implements FallbackFactory<CsLed
|
||||
log.error("{}异常,降级处理,异常为:{}","查询设备树",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsLedgerVO>> getAllLedger() {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取台账树所有数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.mapper.CsLedgerMapper;
|
||||
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
|
||||
import com.njcn.csdevice.pojo.dto.LineParamDTO;
|
||||
import com.njcn.csdevice.pojo.param.CsLedgerParam;
|
||||
@@ -39,6 +40,7 @@ import java.util.List;
|
||||
public class CsLedgerController extends BaseController {
|
||||
|
||||
private final ICsLedgerService csLedgerService;
|
||||
private final CsLedgerMapper csLedgerMapper;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/tree")
|
||||
@@ -145,5 +147,14 @@ public class CsLedgerController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, details, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAllLedger")
|
||||
@ApiOperation("获取台账树所有数据")
|
||||
public HttpResult<List<CsLedgerVO>> getAllLedger(){
|
||||
String methodDescribe = getMethodDescribe("getAllLedger");
|
||||
List<CsLedgerVO> allList = csLedgerMapper.getAll();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, allList, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -107,15 +107,15 @@ public class StatisticsDataDataServiceImpl implements IStatisticsDataDataService
|
||||
List<RStatOnlineRateD> list2 = onlineRateFeignClient.list(deviceList,param.getStartTime(),param.getEndTime()).getData();
|
||||
//获取监测点最新数据时间
|
||||
List<CsLineLatestData> list3 = csLineLatestDataFeignClient.listData().getData();
|
||||
|
||||
equipmentDeliveryList.forEach(dev->{
|
||||
List<CsLinePO> list = devMap.get(dev.getId());
|
||||
DevDetailDTO devDetail = csLedgerFeignClient.queryDevDetail(dev.getId()).getData();
|
||||
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
list.forEach(line->{
|
||||
DevDetailDTO dto = csLedgerFeignClient.queryDevDetail(dev.getId()).getData();
|
||||
HalfMonthReportVO vo = new HalfMonthReportVO();
|
||||
vo.setEngineeringName(devDetail.getEngineeringName());
|
||||
vo.setProjectName(devDetail.getProjectName());
|
||||
vo.setEngineeringName(dto.getEngineeringName());
|
||||
vo.setProjectName(dto.getProjectName());
|
||||
vo.setDevName(dev.getName());
|
||||
vo.setDevType(dev.getDevModel());
|
||||
vo.setMac(dev.getMac());
|
||||
|
||||
Reference in New Issue
Block a user