Browse Source

fix:open_scada修改为open_canvas

zhongwei
haungxing 7 months ago
parent
commit
27e18383a6
  1. 2
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FuncRouteEnum.java
  2. 4
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/controller/InteractiveController.java
  3. 2
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IInteractiveService.java
  4. 8
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java
  5. 4
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/JumpRouteJoinStrategy.java
  6. 5
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/InteractiveSchedule.java
  7. 2
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/handler/InteractiveHandler.java

2
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FuncRouteEnum.java

@ -12,7 +12,7 @@ import java.util.Optional;
*/
@AllArgsConstructor
public enum FuncRouteEnum {
OPEN_SCADA("open_scada","打开实时画面"),
OPEN_CANVAS("open_canvas","打开实时画面"),
OPEN_VIDEO("open_video","打开视频监控"),
DIAGNOSE("diagnose","智能诊断"),
CHOOSE_STATION("choose_station","选择站点"),

4
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/controller/InteractiveController.java

@ -48,8 +48,8 @@ public class InteractiveController {
@RequestMapping(value = "/authentication",method = {RequestMethod.GET,RequestMethod.POST})
public R authentication(@RequestParam(required = false) @ApiParam("站点编号") String stationId,
@RequestParam @ApiParam("用户ID") String userId,
@RequestParam(required = false) @ApiParam("菜单ID") String funcCode) {
return R.status(interactiveService.authentication(stationId,userId,funcCode));
@RequestParam(required = false) @ApiParam("菜单ID") String func) {
return R.status(interactiveService.authentication(stationId,userId,func));
}
@ApiOperation("获取问答sessionId")

2
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IInteractiveService.java

@ -30,7 +30,7 @@ public interface IInteractiveService {
List<AnswerVO> getAnswerBySessionIds(String sessionIds);
Boolean authentication(String stationId, String userId, String funcCode);
Boolean authentication(String stationId, String userId, String func);
Boolean removeSessionId(String sessionId);
}

8
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java

@ -194,7 +194,7 @@ public class InteractiveServiceImpl implements IInteractiveService {
}
@Override
public Boolean authentication(String stationId, String userId, String funcCode) {
public Boolean authentication(String stationId, String userId, String func) {
// 站点鉴权
if(StringUtil.isNotBlank(stationId)) {
List<String> stations = this.getStationPermissionsById(userId).stream().map(DeptStationDTO::getStationId)
@ -204,9 +204,9 @@ public class InteractiveServiceImpl implements IInteractiveService {
});
}
// 菜单鉴权
if(StringUtil.isNotBlank(funcCode) && StringUtil.isNotBlank(userId)) {
FunctionEntity function = functionService.getFunctionByCode(funcCode);
if(Func.isNotEmpty(function.getRoute()) && StringUtil.isNotBlank(function.getRoute())) {
if(StringUtil.isNotBlank(func) && StringUtil.isNotBlank(userId)) {
FunctionEntity function = functionService.getFunctionByCode(func);
if(Func.isNotEmpty(function) && Func.isNotEmpty(function.getRoute()) && StringUtil.isNotBlank(function.getRoute())) {
R<Boolean> authenticationR = userClient.permissionMenuById(Long.valueOf(userId), function.getRoute());
Assert.isTrue(authenticationR.isSuccess() && authenticationR.getData(), () -> {
throw new ServiceException("人员菜单鉴权失败!");

4
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/JumpRouteJoinStrategy.java

@ -40,7 +40,7 @@ public class JumpRouteJoinStrategy {
FuncRouteEnum routeEnum = FuncRouteEnum.getEnumByFuncCode(function.getCode());
if(Func.isNotEmpty(routeEnum)) {
switch(routeEnum) {
case OPEN_SCADA:
case OPEN_CANVAS:
return this.getScadaExtra(args,function);
default:
break;
@ -53,7 +53,7 @@ public class JumpRouteJoinStrategy {
// 跳转页面逻辑
ExtraVO extraVO = new ExtraVO();
extraVO.setImmediatelyJump(true);
extraVO.setFuncCode(FuncRouteEnum.OPEN_SCADA.getFuncCode());
extraVO.setFuncCode(FuncRouteEnum.OPEN_CANVAS.getFuncCode());
Map<String, String> params = this.scadaResolve(args);
// 根据hz3000画面版本获取path
Integer picResource = Integer.valueOf(params.get("picResource"));

5
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/InteractiveSchedule.java

@ -193,9 +193,8 @@ public class InteractiveSchedule {
return ReturnT.SUCCESS;
}
//@XxlJob(SYNCHRONOUS_FAULT_INSTRUCT) String params
@Scheduled(cron = "0/10 * * * * ?")
public ReturnT synchronousFaultInstruct() {
@XxlJob(SYNCHRONOUS_FAULT_INSTRUCT)
public ReturnT synchronousFaultInstruct(String params) {
Map<String,Object> request = new HashMap<>(2);
// 获取站点列表
R<List<StationEntity>> stationsR = stationClient.list(new StationEntity());

2
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/handler/InteractiveHandler.java

@ -147,7 +147,7 @@ public class InteractiveHandler extends TextWebSocketHandler {
Map<String,String> param = new HashMap<>(1);
param.put("canvas_id",selection.getId());
IFunctionService functionService = SpringUtil.getBean(IFunctionService.class);
FunctionEntity function = functionService.getFunctionByCode("open_scada");
FunctionEntity function = functionService.getFunctionByCode(FuncRouteEnum.OPEN_CANVAS.getFuncCode());
ExtraVO scadaExtra = strategy.getScadaExtra(param, function);
AnswerVO answerVO = new AnswerVO();
answerVO.setSessionId(sessionId);

Loading…
Cancel
Save