|
@@ -1,58 +0,0 @@
|
|
-package com.huimv.env.device.service;
|
|
|
|
-
|
|
|
|
-import com.alibaba.fastjson.JSONArray;
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * @Project : huimv.shiwan
|
|
|
|
- * @Package : com.huimv.biosafety.uface.controller
|
|
|
|
- * @Description : TODO
|
|
|
|
- * @Version : 1.0
|
|
|
|
- * @Author : ZhuoNing
|
|
|
|
- * @Create : 2020-12-25
|
|
|
|
- **/
|
|
|
|
-@Component
|
|
|
|
-public class Show {
|
|
|
|
- @Value("${push.message.fault.list}")
|
|
|
|
- private String faultList;
|
|
|
|
- @Value("${push.message.act.list}")
|
|
|
|
- private String actList;
|
|
|
|
-
|
|
|
|
- public void show1(){
|
|
|
|
- System.out.println("faultList="+faultList);
|
|
|
|
- String[] faultGroupArray = faultList.split(",");
|
|
|
|
- JSONArray faultJa = new JSONArray();
|
|
|
|
- for(int a=0;a<faultGroupArray.length;a++){
|
|
|
|
- String falutGroup = faultGroupArray[a];
|
|
|
|
- String[] faultArray = falutGroup.split(":");
|
|
|
|
- JSONObject newJo = new JSONObject();
|
|
|
|
- faultJa.add(newJo);
|
|
|
|
- newJo.put("id",faultArray[0]);
|
|
|
|
- newJo.put("fault",faultArray[1]);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- for(int a=0;a<faultJa.size();a++){
|
|
|
|
- System.out.println(faultJa.getJSONObject(a));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public void show2(){
|
|
|
|
- System.out.println("actList="+actList);
|
|
|
|
- String[] actGroupArray = actList.split(",");
|
|
|
|
- JSONArray actJa = new JSONArray();
|
|
|
|
- for(int a=0;a<actGroupArray.length;a++){
|
|
|
|
- String actGroup = actGroupArray[a];
|
|
|
|
- String[] actArray = actGroup.split(":");
|
|
|
|
- JSONObject newJo = new JSONObject();
|
|
|
|
- actJa.add(newJo);
|
|
|
|
- newJo.put("id",actArray[0]);
|
|
|
|
- newJo.put("fault",actArray[1]);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- for(int a=0;a<actJa.size();a++){
|
|
|
|
- System.out.println(actJa.getJSONObject(a));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|