|
@@ -3,11 +3,14 @@ package com.miniframe.bisiness.system;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
+import java.util.stream.Stream;
|
|
|
|
|
|
import com.alibaba.nacos.shaded.com.google.gson.JsonArray;
|
|
import com.alibaba.nacos.shaded.com.google.gson.JsonArray;
|
|
import com.alibaba.nacos.shaded.com.google.gson.JsonObject;
|
|
import com.alibaba.nacos.shaded.com.google.gson.JsonObject;
|
|
|
|
+import com.alibaba.nacos.shaded.io.grpc.netty.shaded.io.netty.util.internal.StringUtil;
|
|
import com.miniframe.aftercure.ActionMsg;
|
|
import com.miniframe.aftercure.ActionMsg;
|
|
import com.miniframe.aftercure.SliceMsg;
|
|
import com.miniframe.aftercure.SliceMsg;
|
|
|
|
+import com.miniframe.aftercure.StreamMsg;
|
|
import com.miniframe.constant.MFConstant;
|
|
import com.miniframe.constant.MFConstant;
|
|
import com.miniframe.core.ExecProcessFlow;
|
|
import com.miniframe.core.ExecProcessFlow;
|
|
import com.miniframe.core.exception.BusinessException;
|
|
import com.miniframe.core.exception.BusinessException;
|
|
@@ -197,7 +200,6 @@ public class AFT001Service extends AFT001BaseModel implements ExecProcessFlow {
|
|
msg.setParamJson(obj.toString());
|
|
msg.setParamJson(obj.toString());
|
|
}else if(action.equals("SliceDisplayUpdate")){
|
|
}else if(action.equals("SliceDisplayUpdate")){
|
|
|
|
|
|
-
|
|
|
|
}else if(action.equals("SliceDisplayDel")){
|
|
}else if(action.equals("SliceDisplayDel")){
|
|
String index = this.getA_aft001().getIndex();
|
|
String index = this.getA_aft001().getIndex();
|
|
JSONObject obj = new JSONObject();
|
|
JSONObject obj = new JSONObject();
|
|
@@ -207,11 +209,68 @@ public class AFT001Service extends AFT001BaseModel implements ExecProcessFlow {
|
|
try {
|
|
try {
|
|
List<SliceMsg> list = XiJsonUtil.jsonToList(paramJson,SliceMsg.class);
|
|
List<SliceMsg> list = XiJsonUtil.jsonToList(paramJson,SliceMsg.class);
|
|
msg.setParamJson(paramJson);
|
|
msg.setParamJson(paramJson);
|
|
- System.out.println(XiJsonUtil.objectToJson(list));
|
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
throw new BusinessException("EB4000014");
|
|
throw new BusinessException("EB4000014");
|
|
}
|
|
}
|
|
|
|
+ }else if(action.equals("StreamDisplayCreate")){
|
|
|
|
+ try {
|
|
|
|
+
|
|
|
|
+ String x = this.getA_aft001().getX();
|
|
|
|
+ String y = this.getA_aft001().getY();
|
|
|
|
+ String z = this.getA_aft001().getZ();
|
|
|
|
+ String u=this.getA_aft001().getDataU();
|
|
|
|
+ String v=this.getA_aft001().getDataV();
|
|
|
|
+ String w=this.getA_aft001().getDataW();
|
|
|
|
+ if(StringUtil.isNullOrEmpty(x)
|
|
|
|
+ ||StringUtil.isNullOrEmpty(y)
|
|
|
|
+ ||StringUtil.isNullOrEmpty(z)
|
|
|
|
+ ||StringUtil.isNullOrEmpty(w)
|
|
|
|
+ ||StringUtil.isNullOrEmpty(u)
|
|
|
|
+ ||StringUtil.isNullOrEmpty(v)
|
|
|
|
+ ){
|
|
|
|
+ throw new BusinessException("EB4000016");
|
|
|
|
+ }
|
|
|
|
+ JSONObject obj = new JSONObject();
|
|
|
|
+ obj.put("x",x);
|
|
|
|
+ obj.put("y",y);
|
|
|
|
+ obj.put("z",z);
|
|
|
|
+ obj.put("u",u);
|
|
|
|
+ obj.put("v",v);
|
|
|
|
+ obj.put("w",w);
|
|
|
|
+ msg.setParamJson(obj.toString());
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ throw new BusinessException("EB4000016");
|
|
|
|
+ }
|
|
|
|
+ }else if(action.equals("StreamDisplayDeleteAll")){
|
|
|
|
+
|
|
|
|
+ }else if(action.equals("StreamDisplayApply")){
|
|
|
|
+ try{
|
|
|
|
+ StreamMsg streamMsg= XiJsonUtil.jsonToPojo(paramJson, StreamMsg.class);
|
|
|
|
+ if(StringUtil.isNullOrEmpty(streamMsg.getDirection())){
|
|
|
|
+ throw new BusinessException("EB4000014");
|
|
|
|
+ }
|
|
|
|
+ //Both,Forward,Backward
|
|
|
|
+ if(!"Both".equals(streamMsg.getDirection())
|
|
|
|
+ &&!"Forward".equals(streamMsg.getDirection())
|
|
|
|
+ &&!"Backward".equals(streamMsg.getDirection())){
|
|
|
|
+ throw new BusinessException("EB4000014");
|
|
|
|
+ }
|
|
|
|
+ if(StringUtil.isNullOrEmpty(streamMsg.getStreamstyle())){
|
|
|
|
+ throw new BusinessException("EB4000014");
|
|
|
|
+ }
|
|
|
|
+ //(Line,Ribbon,Tube)
|
|
|
|
+ if(!"Line".equals(streamMsg.getStreamstyle())
|
|
|
|
+ &&!"Ribbon".equals(streamMsg.getStreamstyle())
|
|
|
|
+ &&!"Tube".equals(streamMsg.getStreamstyle())){
|
|
|
|
+ throw new BusinessException("EB4000014");
|
|
|
|
+ }
|
|
|
|
+ msg.setParamJson(paramJson);
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ throw new BusinessException("EB4000014");
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+
|
|
MFMqUtils.get(CaeMQ.class).sendCaein(XiJsonUtil.objectToJson(msg));
|
|
MFMqUtils.get(CaeMQ.class).sendCaein(XiJsonUtil.objectToJson(msg));
|
|
|
|
|
|
}
|
|
}
|