Browse Source

add:遥控鉴权接口

zhongwei
haungxing 6 months ago
parent
commit
69cacf370a
  1. 1
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FuncRouteEnum.java
  2. 15
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ExtraResolveStrategyService.java
  3. 3
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataVO.java

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

@ -20,6 +20,7 @@ public enum FuncRouteEnum {
CHOOSE_CANVAS("choose_canvas","选择画面",null), CHOOSE_CANVAS("choose_canvas","选择画面",null),
CHOOSE_FAULT("choose_fault","选择故障",null), CHOOSE_FAULT("choose_fault","选择故障",null),
CONFIRM_YK("confirm_yk","遥控确认", FunctionConstants.TypeEnum.PARAMS), CONFIRM_YK("confirm_yk","遥控确认", FunctionConstants.TypeEnum.PARAMS),
SHOW_PARAM("show_param","设备参数查询", FunctionConstants.TypeEnum.PARAMS),
; ;
@Getter @Getter
private String funcCode; private String funcCode;

15
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ExtraResolveStrategyService.java

@ -69,6 +69,8 @@ public class ExtraResolveStrategyService {
return this.resolveChooseFault(extra); return this.resolveChooseFault(extra);
case CONFIRM_YK: case CONFIRM_YK:
return this.resolveConfirmRemote(extra); return this.resolveConfirmRemote(extra);
case SHOW_PARAM:
return this.resolveShowParam(extra);
default: default:
break; break;
} }
@ -77,6 +79,17 @@ public class ExtraResolveStrategyService {
return JSONObject.parseObject(JSON.toJSONString(extra),ExtraVO.class); return JSONObject.parseObject(JSON.toJSONString(extra),ExtraVO.class);
} }
private ExtraVO resolveShowParam(Map<String,Object> extra) {
ExtraVO result = new ExtraVO();
result.setFuncCode(FuncRouteEnum.SHOW_PARAM.getFuncCode());
result.setType(FuncRouteEnum.SHOW_PARAM.getType().getType());
Map<String,Object> param = new HashMap(1);
DataVO data = JSONObject.parseObject(JSON.toJSONString(extra.get("data")),DataVO.class);
param.put("data", data);
result.setParams(param);
return result;
}
private ExtraVO resolveConfirmRemote(Map<String,Object> extra) { private ExtraVO resolveConfirmRemote(Map<String,Object> extra) {
ExtraVO result = new ExtraVO(); ExtraVO result = new ExtraVO();
RemoteParamVO remoteParam = JSONObject.parseObject(JSON.toJSONString(extra.get("data")), RemoteParamVO.class); RemoteParamVO remoteParam = JSONObject.parseObject(JSON.toJSONString(extra.get("data")), RemoteParamVO.class);
@ -86,6 +99,8 @@ public class ExtraResolveStrategyService {
if(funcVOR.isSuccess()) { if(funcVOR.isSuccess()) {
Map<String,Object> param = new HashMap(1); Map<String,Object> param = new HashMap(1);
param.put("control",funcVOR.getData()); param.put("control",funcVOR.getData());
param.put("deviceName",remoteParam.getDeviceName());
param.put("projectName",remoteParam.getProjectName());
param.put("value",remoteParam.getValue()); param.put("value",remoteParam.getValue());
result.setParams(param); result.setParams(param);
} }

3
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataVO.java

@ -1,5 +1,6 @@
package com.hnac.hzims.bigmodel.interactive.vo; package com.hnac.hzims.bigmodel.interactive.vo;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -15,8 +16,10 @@ public class DataVO implements Serializable {
/**数据查询类型:实时、历史**/ /**数据查询类型:实时、历史**/
private String type; private String type;
@JSONField(name = "time_begin")
private String startTime; private String startTime;
@JSONField(name = "time_end")
private String endTime; private String endTime;
/**包括:"其它"、"最大值"、"最小值"、"总和值"、"平均值"**/ /**包括:"其它"、"最大值"、"最小值"、"总和值"、"平均值"**/

Loading…
Cancel
Save