1.自定义报表,模板选择修改
2.自定义报告调度,更具部门绑定来选择监测点 3.技术监督附件代码更新
This commit is contained in:
@@ -3,6 +3,8 @@ package com.njcn.device.pq.api;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.pq.api.fallback.DeptLineFeignClientFallbackFactory;
|
||||
import com.njcn.device.pq.pojo.po.DeptLine;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
@@ -34,4 +36,7 @@ public interface DeptLineFeignClient {
|
||||
*/
|
||||
@PostMapping("getLineByDeptRelation")
|
||||
HttpResult<Map<String,List<String>>> getLineByDeptRelation(@RequestParam("devDataType") Integer devDataType);
|
||||
|
||||
@PostMapping("/getLineByLineIds")
|
||||
HttpResult<DeptLine> getLineByLineIds(@RequestParam("id") String ids);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.pq.api.DeptLineFeignClient;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import com.njcn.device.pq.pojo.po.DeptLine;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -55,6 +56,12 @@ public class DeptLineFeignClientFallbackFactory implements FallbackFactory<DeptL
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取部门和监测点的关系(分稳态暂态)", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<DeptLine> getLineByLineIds(String ids) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据监测点id集合查询部门信息id", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.device.pq.pojo.po.DeptLine;
|
||||
import com.njcn.device.pq.service.DeptLineService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import com.njcn.web.pojo.param.DeptLineParam;
|
||||
@@ -117,5 +118,11 @@ public class DeptLineController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, map, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getLineByLineIds")
|
||||
@ApiOperation("根据监测点获取部门id")
|
||||
public HttpResult<DeptLine> getLineByLineIds(@RequestParam("id") String ids) {
|
||||
String methodDescribe = getMethodDescribe("getLineByLineIds");
|
||||
DeptLine lineByLineIds = deptLineService.getLineByLineIds(ids);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineByLineIds, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,4 +92,10 @@ public interface DeptLineService extends IService<DeptLine> {
|
||||
Map<String, List<String>> orgSubStationGet(List<Integer> devType);
|
||||
|
||||
|
||||
/**
|
||||
* 根据监测点id集合查询部门信息id
|
||||
* @param ids 部门ids
|
||||
* @return 查询结果
|
||||
*/
|
||||
DeptLine getLineByLineIds(String ids);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.device.pq.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.device.biz.pojo.dto.TerminalGetBase;
|
||||
@@ -103,6 +104,12 @@ public class DeptLineServiceImpl extends ServiceImpl<DeptLineMapper, DeptLine> i
|
||||
return deptLines.stream ().collect (Collectors.groupingBy (TerminalGetBase::getUnitId, Collectors.mapping (TerminalGetBase::getLedgerId,Collectors.toList ())));
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeptLine getLineByLineIds(String ids) {
|
||||
return this.getOne(new LambdaQueryWrapper<DeptLine>()
|
||||
.eq(DeptLine::getLineId,ids)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user