lxw
2023-08-15 160e150009b51a39fa95d9462c3798ba28d51a09
src/main/java/com/whyc/dto/BattTestData.java
@@ -9,9 +9,9 @@
public class BattTestData {
    final public static int BATT_MON_COUNT_MAX = 512;
   final public static int AppServer_Reinit_BattGroupData_EN=1;//修改删除添加电池组信息时识别信号
   final public static byte BATTDATA_NULL = 0;
   final public static byte BATTDATA_FLOAT = 1;
   final public static byte BATTDATA_CHARGE = 2;
@@ -22,17 +22,17 @@
   final public static byte BATTDATA_TMP = 7;
   final public static byte BATTDATA_CONNRES = 8;
   final public static byte BATTDATA_MONITOR = 9;
   final public static byte BATTSTATE_NULL = 0;
   final public static byte BATTSTATE_FLOAT = 1;
   final public static byte BATTSTATE_CHARGE = 2;
   final public static byte BATTSTATE_DISCHARGE = 3;
   final public static byte BATTSTATE_JUNCHARGE = 4;
   final public static byte TEST_LOADER_REALLOADER = 1;
   final public static byte TEST_LOADER_FBI_IDCE = 2;
   final public static byte TEST_LOADER_FBS9100S =3;
   public static final byte MonData_CapVol = 0;
   public static final byte MonData_RealCap = 1;
   public static final byte MonData_RestCap = 2;
@@ -43,11 +43,11 @@
   public static final byte MonData_Tmp = 7;
   public static final byte MonData_ConnRes = 8;
   public static final byte MonData_SerPercent = 9;
   public static final String CM="_CM";//移动
   public static final String CT="_CT";//电信
   public static final String CU="_CU";//联通
   public static final String  test_type0 ="无";//无
   public static final String  test_type1 ="浮充";
   public static final String   test_type2 ="充电";
@@ -58,20 +58,20 @@
   public static final String  test_type7 ="温度";
   public static final String  test_type8 ="连接条";
   public static final String  test_type9 ="在线监测";
   //放电计划状态的对应关系
   public static final int  test_plan0 = 0;//未放电
   public static final int  test_plan1 = 1;//放电延时
   public static final int  test_plan2 = 2;//放电完成
   public static final int  test_plan3 = 3;//放电进行中
   public static final int  test_plan4 = 4;//放电失败
   public static final int  hoursBetween = 72;//俩次放电计划相隔时间
   public static final int RC_NUM_PARAM=1000;//最多一千笔
   public static final int RC_NUM_Real=5000;//最多一千笔
   public static final int RC_NUM_Real = 1000;//最多一千笔
   //电池放电测试弹出框中显示排行前几个内阻数据
   public static final int mon_res_num=10;
   //启动创建数据库的jar文件
@@ -100,9 +100,9 @@
        }
        ps.destroy();  //销毁子进程
        ps = null;
        ps = null;
    }
   //启动创建数据库的jar文件
   public static void run_cmd() {
      //String path=System.getProperty("user.dir");            //myeclipse中获取的目录(获取到的是tomcat/bin)和分离项目获取到的路径(tomcat)不一样
@@ -153,111 +153,216 @@
         //System.out.println("Run Bat OK....");
      } catch (IOException e) {
         e.printStackTrace();
      }
      }
    }
   //落后单体参数(组端电压>标称*test_stop)
   public static final float test_stop = 0.9f;
   //判断电池组的当前状态
   public static String battState(int num){
   /*public static String battState(int num){
      String state="";
      switch (num) {
      case 0:state= BattTestData.test_type0;break;
      case 1:state= BattTestData.test_type1;break;
      case 2:state= BattTestData.test_type2;break;
      case 3:state= BattTestData.test_type3;break;
      case 4:state= BattTestData.test_type4;break;
      case 5:state= BattTestData.test_type5;break;
      case 6:state= BattTestData.test_type6;break;
      case 7:state= BattTestData.test_type7;break;
      case 8:state= BattTestData.test_type8;break;
      case 9:state= BattTestData.test_type9;break;
         case 3:
            state = BattTestData.test_type3;
            break;
         case 4:
            state = BattTestData.test_type4;
            break;
         case 5:
            state = BattTestData.test_type5;
            break;
         case 6:
            state = BattTestData.test_type6;
            break;
         case 7:
            state = BattTestData.test_type7;
            break;
         case 8:
            state = BattTestData.test_type8;
            break;
         case 9:
            state = BattTestData.test_type9;
            break;
      }
      return state;
   }*/
   //判断电池组的当前状态
   public static String battState(int num) {
      String state = "";
      switch (num) {
         case 0:
            state = "test_type0";
            break;
         case 1:
            state = "test_type1";
            break;
         case 2:
            state = "test_type2";
            break;
         case 3:
            state = "test_type3";
            break;
         case 4:
            state = "test_type4";
            break;
         case 5:
            state = "test_type5";
            break;
         case 6:
            state = "test_type6";
            break;
         case 7:
            state = "test_type7";
            break;
         case 8:
            state = "test_type8";
            break;
         case 9:
            state = "test_type9";
            break;
      }
      return state;
   }
   //bts放电终止原因
   public static String getStopType(int dev_type, int stop_type_t)
   {
      String stop_type = "未知";
      if(BattTestData.TEST_LOADER_FBI_IDCE == dev_type) {
         switch(stop_type_t)
              {
                   case 0 : stop_type = "手动停止"; break;
                   case 1 : stop_type = "放电时间到"; break;
                   case 2 : stop_type = "放电容量到"; break;
                   case 3 : stop_type = "单体下限到"; break;
                   case 4 : stop_type = "组端下限到"; break;
                   case 5 : stop_type = "市电中断"; break;
                   case 6 : stop_type = "内存不足"; break;
                   case 7 : stop_type = "温度异常"; break;
              }
      } else if(BattTestData.TEST_LOADER_FBS9100S == dev_type){
         switch(stop_type_t)
              {
                   case 0 : stop_type = "手动停止"; break;
                   case 1 : stop_type = "暂停"; break;
                   case 2 : stop_type = "正在放电测试"; break;
                   case 3 : stop_type = "正在等待放电"; break;
                   case 4 : stop_type = "正在限流充电"; break;
                   case 5 : stop_type = "正在直连充电"; break;
                   case 6 : stop_type = "正在等待充电"; break;
                   case 7 : stop_type = "放电时间到"; break;
                   case 8 : stop_type = "放电容量到"; break;
                   case 9 : stop_type = "单体下限到"; break;
                   case 10 : stop_type = "组端下限到"; break;
                   case 11 : stop_type = "市电中断停止"; break;
                   case 12 : stop_type = "存储数据满"; break;
                   case 13 : stop_type = "机内温度异常"; break;
                   case 14 : stop_type = "放电电流过流"; break;
                   case 15 : stop_type = "后台通信中断"; break;
                   case 16 : stop_type = "负载模块中断"; break;
                   case 17 : stop_type = "在线模块中断"; break;
                   case 18 : stop_type = "负载模块过功率"; break;
                   case 19 : stop_type = "内部程序异常"; break;
              }
      } else {
         stop_type = "手动停止";
      }
      return stop_type;
   public static String getStopType(int dev_type, int stop_type_t) {
      String stop_type = "未知";
      if (BattTestData.TEST_LOADER_FBI_IDCE == dev_type) {
         switch (stop_type_t) {
            case 0:
               stop_type = "手动停止";
               break;
            case 1:
               stop_type = "放电时间到";
               break;
            case 2:
               stop_type = "放电容量到";
               break;
            case 3:
               stop_type = "单体下限到";
               break;
            case 4:
               stop_type = "组端下限到";
               break;
            case 5:
               stop_type = "市电中断";
               break;
            case 6:
               stop_type = "内存不足";
               break;
            case 7:
               stop_type = "温度异常";
               break;
         }
      } else if (BattTestData.TEST_LOADER_FBS9100S == dev_type) {
         switch (stop_type_t) {
            case 0:
               stop_type = "手动停止";
               break;
            case 1:
               stop_type = "暂停";
               break;
            case 2:
               stop_type = "正在放电测试";
               break;
            case 3:
               stop_type = "正在等待放电";
               break;
            case 4:
               stop_type = "正在限流充电";
               break;
            case 5:
               stop_type = "正在直连充电";
               break;
            case 6:
               stop_type = "正在等待充电";
               break;
            case 7:
               stop_type = "放电时间到";
               break;
            case 8:
               stop_type = "放电容量到";
               break;
            case 9:
               stop_type = "单体下限到";
               break;
            case 10:
               stop_type = "组端下限到";
               break;
            case 11:
               stop_type = "市电中断停止";
               break;
            case 12:
               stop_type = "存储数据满";
               break;
            case 13:
               stop_type = "机内温度异常";
               break;
            case 14:
               stop_type = "放电电流过流";
               break;
            case 15:
               stop_type = "后台通信中断";
               break;
            case 16:
               stop_type = "负载模块中断";
               break;
            case 17:
               stop_type = "在线模块中断";
               break;
            case 18:
               stop_type = "负载模块过功率";
               break;
            case 19:
               stop_type = "内部程序异常";
               break;
              }
      } else {
         stop_type = "手动停止";
      }
      return stop_type;
   }
   //61850放电终止原因
   public static String getStopType_6185(int stop_type_t)
   {
      String stop_type = "其他";
      switch(stop_type_t)
              {
                   case 0 : stop_type = "设备掉电终止"; break;
                   case 1 : stop_type = "手动终止"; break;
                   case 2 : stop_type = "放电时间到终止"; break;
                   case 3 : stop_type = "放电容量到终止"; break;
                   case 4 : stop_type = "单体电压下限到终止"; break;
                   case 5 : stop_type = "单体温度上限到终止"; break;
                   case 6 : stop_type = "组端电压下限到终止"; break;
                   case 7 : stop_type = "市电中断终止"; break;
                   case 8 : stop_type = "单体模块通讯异常终止"; break;
                   case 9 : stop_type = "存储数据满终止"; break;
                   case 10 : stop_type = "机内温度异常终止"; break;
                   case 11 : stop_type = "放电电流异常终止"; break;
                   case 12 : stop_type = "后台通讯中断终止"; break;
                   case 13 : stop_type = "内部程序异常终止"; break;
                   case 14 : stop_type = "电源电压高终止"; break;
                   case 15 : stop_type = "协转通讯异常"; break;
                   case 16 : stop_type = "其他"; break;
                   case 27 : stop_type = "其他设备在工作"; break;
                   case 28 : stop_type = "其他设备故障停止"; break;
                   case 29 : stop_type = "电压过高或过低"; break;
                   case 30 : stop_type = "干接点故障"; break;
                   case 31 : stop_type = "单体异常"; break;
                   case 32 : stop_type = "电压输入过高或过低"; break;
   public static String getStopType_6185(int stop_type_t)
   {
      String stop_type = "其他";
      switch(stop_type_t)
              {
                   case 0 : stop_type = "设备掉电终止"; break;
                   case 1 : stop_type = "手动终止"; break;
                   case 2 : stop_type = "放电时间到终止"; break;
                   case 3 : stop_type = "放电容量到终止"; break;
                   case 4 : stop_type = "单体电压下限到终止"; break;
                   case 5 : stop_type = "单体温度上限到终止"; break;
                   case 6 : stop_type = "组端电压下限到终止"; break;
                   case 7 : stop_type = "市电中断终止"; break;
                   case 8 : stop_type = "单体模块通讯异常终止"; break;
                   case 9 : stop_type = "存储数据满终止"; break;
                   case 10 : stop_type = "机内温度异常终止"; break;
                   case 11 : stop_type = "放电电流异常终止"; break;
                   case 12 : stop_type = "后台通讯中断终止"; break;
                   case 13 : stop_type = "内部程序异常终止"; break;
                   case 14 : stop_type = "电源电压高终止"; break;
                   case 15 : stop_type = "协转通讯异常"; break;
                   case 16 : stop_type = "其他"; break;
                   case 27 : stop_type = "其他设备在工作"; break;
                   case 28 : stop_type = "其他设备故障停止"; break;
                   case 29 : stop_type = "电压过高或过低"; break;
                   case 30 : stop_type = "干接点故障"; break;
                   case 31 : stop_type = "单体异常"; break;
                   case 32 : stop_type = "电压输入过高或过低"; break;
                   case 33 : stop_type = "电池电流异常"; break;
                case 34 : stop_type = "kd测试故障"; break;
                case 35 : stop_type = "切换装置通信异常"; break;
                case 36 : stop_type = "切换装置故障"; break;
                case 37 : stop_type = "切换装置接触器异常"; break;
                   case 100 : stop_type = "未知"; break;
              }
      return stop_type;
              }
      return stop_type;
   }
   public static String getStopType_9110(int stop_type_t){
@@ -298,27 +403,27 @@
   }
   //4016放电终止原因
   public static String getStopType_4016(int stop_type_t)
   {
      String stop_type = "其他";
      switch(stop_type_t)
           {
                case 0 : stop_type = "无"; break;
                case 1 : stop_type = "手动终止"; break;
                case 2 : stop_type = "核容测试时间到"; break;
                case 3 : stop_type = "核容测试组端下限到"; break;
                case 4 : stop_type = "核容测试单体下限到"; break;
                case 5 : stop_type = "核容测试容量低于阀值"; break;
                case 6 : stop_type = "应急供电组端下限到"; break;
                case 7 : stop_type = "应急供电单体下限到"; break;
                case 8 : stop_type = "市电恢复停止应急供电"; break;
                case 9 : stop_type = "停止自动应急供电"; break;
                case 10 : stop_type = "无法启动核容测试"; break;
                case 11 : stop_type = "模块故障"; break;
                case 12 : stop_type = "电池开路故障"; break;
                case 16 : stop_type = "其他"; break;
           }
      return stop_type;
   public static String getStopType_4016(int stop_type_t)
   {
      String stop_type = "其他";
      switch(stop_type_t)
           {
                case 0 : stop_type = "无"; break;
                case 1 : stop_type = "手动终止"; break;
                case 2 : stop_type = "核容测试时间到"; break;
                case 3 : stop_type = "核容测试组端下限到"; break;
                case 4 : stop_type = "核容测试单体下限到"; break;
                case 5 : stop_type = "核容测试容量低于阀值"; break;
                case 6 : stop_type = "应急供电组端下限到"; break;
                case 7 : stop_type = "应急供电单体下限到"; break;
                case 8 : stop_type = "市电恢复停止应急供电"; break;
                case 9 : stop_type = "停止自动应急供电"; break;
                case 10 : stop_type = "无法启动核容测试"; break;
                case 11 : stop_type = "模块故障"; break;
                case 12 : stop_type = "电池开路故障"; break;
                case 16 : stop_type = "其他"; break;
           }
      return stop_type;
   }
   //4019(LD9)放电终止原因
@@ -340,129 +445,949 @@
      String stop_type = "未知";
      switch(stop_type_t)
      {
         case 0 : stop_type = "无"; break;
         case 1 : stop_type = "手动终止"; break;
         case 2 : stop_type = "单体下限到"; break;
         case 3 : stop_type = "充电完成停止"; break;
         case 4 : stop_type = "测试完成停止"; break;
         case 5 : stop_type = "远程停止"; break;
         case 6 : stop_type = "在线电压低"; break;
         case 7 : stop_type = "温度异常高"; break;
         case 8 : stop_type = "电流异常"; break;
         case 9 : stop_type = "系统正在工作"; break;
         case 10 : stop_type = "正在均衡测试"; break;
         case 11 : stop_type = "正在内阻测试"; break;
         case 12 : stop_type = "汇集器通信异常"; break;
         case 13 : stop_type = "功率电缆异常"; break;
         case 14 : stop_type = "主机停止(ld-18)"; break;
         case 15 : stop_type = "从机通讯异常(ld-18)"; break;
         case 0:
            stop_type = "无";
            break;
         case 1:
            stop_type = "手动终止";
            break;
         case 2:
            stop_type = "单体下限到";
            break;
         case 3:
            stop_type = "充电完成停止";
            break;
         case 4:
            stop_type = "测试完成停止";
            break;
         case 5:
            stop_type = "远程停止";
            break;
         case 6:
            stop_type = "在线电压低";
            break;
         case 7:
            stop_type = "温度异常高";
            break;
         case 8:
            stop_type = "电流异常";
            break;
         case 9:
            stop_type = "系统正在工作";
            break;
         case 10:
            stop_type = "正在均衡测试";
            break;
         case 11:
            stop_type = "正在内阻测试";
            break;
         case 12:
            stop_type = "汇集器通信异常";
            break;
         case 13:
            stop_type = "功率电缆异常";
            break;
         case 14:
            stop_type = "主机停止(ld-18)";
            break;
         case 15:
            stop_type = "从机通讯异常(ld-18)";
            break;
      }
      return stop_type;
   }
   // 逆变设备放电终止原因
   public static String getStopType_9120(int stop_type_t)
   // 逆变设备放电终止原因9120和9140
   public static String getStopType_9120(int stop_type_t) {
      String stop_type = "其他";
      switch (stop_type_t) {
         case 0:
            stop_type = "手动停止";
            break;
         case 1:
            stop_type = "暂停";
            break;
         case 2:
            stop_type = "正在放电测试";
            break;
         case 3:
            stop_type = "正在等待放电";
            break;
         case 4:
            stop_type = "正在限流充电";
            break;
         case 5:
            stop_type = "正在直流充电";
            break;
         case 6:
            stop_type = "正在等待充电";
            break;
         case 7:
            stop_type = "放电时间到停止";
            break;
         case 8:
            stop_type = "放电容量到停止";
            break;
         case 9:
            stop_type = "单体电压下限到停止";
            break;
         case 10:
            stop_type = "组端电压下限到停止";
            break;
         case 11:
            stop_type = "市电中断停止";
            break;
         case 12:
            stop_type = "存储数据满停止";
            break;
         case 13:
            stop_type = "机内温度异常停止";
            break;
         case 14:
            stop_type = "放电电流过流停止";
            break;
         case 15:
            stop_type = "后台通信中断停止";
            break;
         case 16:
            stop_type = "负载模块通信中断停止";
            break;
         case 17:
            stop_type = "选择模块通信中断停止";
            break;
         case 18:
            stop_type = "负载模块放电过功率停止";
            break;
         case 19:
            stop_type = "内部程序异常停止";
            break;
         case 20:
            stop_type = "市电恢复停止升压放电";
            break;
         case 21:
            stop_type = "充电过程中市电中断";
            break;
         case 22:
            stop_type = "合路器放电功能组端电压下限到";
            break;
         case 23:
            stop_type = "单体温度上限到停止";
            break;
         case 24:
            stop_type = "在线电压异常高停止";
            break;
         case 25:
            stop_type = "协转通信异常停止";
            break;
         case 26:
            stop_type = "单体通信异常停止";
            break;
         case 27:
            stop_type = "未知";
            break;
         case 28:
            stop_type = "切换装置通信故障";
            break;
         case 29:
            stop_type = "切换装置故障";
            break;
         case 30:
            stop_type = "DCAC模块故障";
            break;
         case 31:
            stop_type = "负载功率小";
            break;
         case 32:
            stop_type = "干接点输入故障";
            break;
         case 33:
            stop_type = "母联通信异常";
            break;
         case 34:
            stop_type = "母联手动关闭";
            break;
      }
      return stop_type;
   }
   // 并联电源放电终止原因9149
   public static String getStopType_9149(int stop_type_t) {
      String stop_type = "其他";
      switch (stop_type_t) {
         case 0:
            stop_type = "核容中模块内部通信故障,核容失败";
            break;
         case 1:
            stop_type = "手动停止核容,核容失败";
            break;
         case 2:
            stop_type = "时长过短,核容失败";
            break;
         case 3:
            stop_type = "达到最长核容时间,核容失败";
            break;
         case 4:
            stop_type = "电池电压低于核容终止电压,核容成功";
            break;
         case 5:
            stop_type = "核容放电电流过小,核容失败";
            break;
         case 6:
            stop_type = "手动停止";
            break;
         case 7:
            stop_type = "时间到停止";
            break;
         case 8:
            stop_type = "单体下限停止";
            break;
         case 9:
            stop_type = "电池电压下限到";
            break;
         case 10:
            stop_type = "单体温度上限到";
            break;
      }
      return stop_type;
   }
   // 一体机设备放电终止原因
   public static String getStopType_8059(int stop_type_t) {
      String stop_type = "其他";
      switch (stop_type_t) {
         case 0x00:
            stop_type = "手动停止";
            break;
         case 0x01:
            stop_type = "放电时间到";
            break;
         case 0x02:
            stop_type = "放电容量到";
            break;
         case 0x03:
            stop_type = "单体下限到";
            break;
         case 0x04:
            stop_type = "组端下限到";
            break;
         case 0x05:
            stop_type = "市电中断";
            break;
         case 0x06:
            stop_type = "内存不足";
            break;
         case 0x07:
            stop_type = "温度异常高";
            break;
         case 0x08:
            stop_type = "正在放电";
            break;
         case 0x09:
            stop_type = "手动暂停";
            break;
         case 0x0A:
            stop_type = "暂停放电";
            break;
         case 0x0B:
            stop_type = "通信故障";
            break;
         case 0x0C:
            stop_type = "电流故障";
            break;
         case 0x0D:
            stop_type = "压差上限到";
            break;
         case 0x0E:
            stop_type = "组端电压异常";
            break;
         case 0x0F:
            stop_type = "风扇异常";
            break;
         case 0x10:
            stop_type = "整流器电压异常";
            break;
         case 0x11:
            stop_type = "IGBT异常";
            break;
         case 0x12:
            stop_type = "辅助电源异常";
            break;
         case 0x13:
            stop_type = "CSV文件太大,请删除";
            break;
         case 0x14:
            stop_type = "BMS通信异常";
            break;
         case 0x15:
            stop_type = "存储异常";
            break;
         case 0x16:
            stop_type = "从机断开或通讯异常";
            break;
         case 0x17:
            stop_type = "从机状态异常";
            break;
         case 0x18:
            stop_type = "紧急停止";
            break;
         case 0x19:
            stop_type = "单体温度异常高";
            break;
         case 0x40:
            stop_type = "停止充电";
            break;
         case 0x41:
            stop_type = "暂停充电";
            break;
         case 0x42:
            stop_type = "正在充电";
            break;
         case 0x43:
            stop_type = "充电时间到";
            break;
         case 0x44:
            stop_type = "充电容量到";
            break;
         case 0x45:
            stop_type = "单体上限到";
            break;
         case 0x46:
            stop_type = "充电已完成";
            break;
         case 0x47:
            stop_type = "市电中断";
            break;
         case 0x48:
            stop_type = "温度异常高";
            break;
         case 0x49:
            stop_type = "通信故障";
            break;
         case 0x4A:
            stop_type = "充电模块异常";
            break;
         case 0x4B:
            stop_type = "组端上限到";
            break;
         case 0x4C:
            stop_type = "压差上限到";
            break;
         case 0x4D:
            stop_type = "电流异常";
            break;
         case 0x4E:
            stop_type = "组端电压异常";
            break;
         case 0x4F:
            stop_type = "风扇异常";
            break;
         case 0x50:
            stop_type = "整流器电压异常";
            break;
         case 0x51:
            stop_type = "IGBT异常";
            break;
         case 0x52:
            stop_type = "辅助电源异常";
            break;
         case 0x53:
            stop_type = "CSV文件太大,请删除";
            break;
         case 0x54:
            stop_type = "BMS通信异常";
            break;
         case 0x55:
            stop_type = "存储异常";
            break;
         case 0x56:
            stop_type = "从机断开或通讯异常";
            break;
         case 0x57:
            stop_type = "从机状态异常";
            break;
         case 0x58:
            stop_type = "紧急停止";
            break;
      }
      return stop_type;
   }
   // 电操核容放电终止原因
   public static String getStopType_6087(int stop_type_t)
   {
      String stop_type = "其他";
      switch(stop_type_t)
      {
         case 0 : stop_type = "手动停止"; break;
         case 1 : stop_type = "暂停"; break;
         case 2 : stop_type = "正在放电测试"; break;
         case 3 : stop_type = "正在等待放电"; break;
         case 4 : stop_type = "正在限流充电"; break;
         case 5 : stop_type = "正在直流充电"; break;
         case 6 : stop_type = "正在等待充电"; break;
         case 7 : stop_type = "放电时间到停止"; break;
         case 8 : stop_type = "放电容量到停止"; break;
         case 9 : stop_type = "单体电压下限到停止"; break;
         case 0: stop_type = "无"; break;
         case 1: stop_type = "暂停"; break;
         case 2: stop_type = "正在放电测试"; break;
         case 3: stop_type =   "正在等待放电"; break;
         case 4: stop_type = "正在限流充电"; break;
         case 5: stop_type = "正在直连充电"; break;
         case 6: stop_type = "正在等待充电"; break;
         case 7: stop_type =   "放电时间到停止"; break;
         case 8: stop_type =   "放电容量到停止"; break;
         case 9: stop_type =   "单体电压下限到停止"; break;
         case 10: stop_type = "组端电压下限到停止"; break;
         case 11: stop_type = "市电中断停止"; break;
         case 12: stop_type = "存储数据满停止"; break;
         case 13: stop_type = "机内温度异常停止"; break;
         case 14: stop_type = "放电电流过流停止"; break;
         case 15:stop_type = "后台通信中断停止"; break;
         case 14: stop_type = "放电电流异常停止"; break;
         case 15: stop_type = "后台通信中断停止"; break;
         case 16: stop_type = "负载模块通信中断停止"; break;
         case 17: stop_type = "选择模块通信中断停止"; break;
         case 18: stop_type = "负载模块放电过功率停止"; break;
         case 19: stop_type = "内部程序异常停止"; break;
         case 20: stop_type = "市电恢复停止升压放电"; break;
         case 21: stop_type = "充电过程中市电中断"; break;
         case 22: stop_type = "合路器放电功能组端电压下限到"; break;
         case 19: stop_type = "(内部)程序异常停止"; break;
         case 23: stop_type = "单体温度上限到停止"; break;
         case 24: stop_type = "在线电压异常高停止"; break;
         case 25: stop_type = "协转通信异常停止"; break;
         case 26: stop_type = "单体通信异常停止"; break;
         case 27: stop_type = "未知"; break;
         case 28: stop_type = "切换装置通信故障"; break;
         case 29: stop_type = "切换装置故障"; break;
         case 30: stop_type = "DCAC模块故障"; break;
         case 26: stop_type = "单体通信异常停止(汇集器通信异常)"; break;
         case 30: stop_type = "逆变器模块故障"; break;
         case 31: stop_type = "负载功率小"; break;
         case 32: stop_type = "干接点输入故障"; break;
         case 33: stop_type = "母联通信异常"; break;
         case 34: stop_type = "母联手动关闭"; break;
         case 35: stop_type = "逆变模块通信故障"; break;
         case 36: stop_type = "防雷器故障"; break;
         case 37: stop_type = "机柜表头通信故障"; break;
         case 38: stop_type = "开关故障"; break;
         case 39: stop_type = "开关量模块通信故障"; break;
         case 40: stop_type = "母线压差大"; break;
         case 41: stop_type = "继电器状态错误"; break;
         case 42: stop_type = "远程闭锁"; break;
         case 43: stop_type = "紧急停止"; break;
         case 44: stop_type = "充电停止"; break;
         case 45: stop_type = "蓄电池对外放电"; break;
         case 46: stop_type = "空开故障"; break;
         case 47: stop_type = "充电机故障"; break;
      }
      return stop_type;
   }
   // 一体机设备放电终止原因
   public static String getStopType_8059(int stop_type_t)
   // FBO4830放电终止原因
   public static String getStopType_4830(int stop_type_t)
   {
      String stop_type = "其他";
      switch(stop_type_t)
      {
         case 0x00: stop_type = "手动停止"; break;
         case 0x01: stop_type = "放电时间到"; break;
         case 0x02: stop_type = "放电容量到"; break;
         case 0x03: stop_type =   "单体下限到"; break;
         case 0x04: stop_type =    "组端下限到"; break;
         case 0x05: stop_type =    "市电中断"; break;
         case 0x06: stop_type =    "内存不足"; break;
         case 0x07: stop_type =   "温度异常高"; break;
         case 0x08: stop_type =   "正在放电"; break;
         case 0x09: stop_type =   "手动暂停"; break;
         case 0x0A: stop_type =   "暂停放电"; break;
         case 0x0B: stop_type =   "通信故障"; break;
         case 0x0C: stop_type =   "电流故障"; break;
         case 0x0D: stop_type =   "压差上限到"; break;
         case 0x0E: stop_type =   "组端电压异常"; break;
         case 0x0F: stop_type =   "风扇异常"; break;
         case 0x10: stop_type =   "整流器电压异常"; break;
         case 0x11: stop_type =   "IGBT异常"; break;
         case 0x12: stop_type =   "辅助电源异常"; break;
         case 0x13: stop_type = "CSV文件太大,请删除"; break;
         case 0x14: stop_type =   "BMS通信异常"; break;
         case 0x15: stop_type =   "存储异常"; break;
         case 0x16: stop_type =   "从机断开或通讯异常"; break;
         case 0x17: stop_type =   "从机状态异常"; break;
         case 0x18: stop_type =   "紧急停止"; break;
         case 0x19: stop_type =   "单体温度异常高"; break;
         case 0x40: stop_type =   "停止充电"; break;
         case 0x41: stop_type =   "暂停充电"; break;
         case 0x42: stop_type =   "正在充电"; break;
         case 0x43: stop_type =   "充电时间到"; break;
         case 0x44: stop_type =   "充电容量到"; break;
         case 0x45: stop_type =   "单体上限到"; break;
         case 0x46: stop_type =   "充电已完成"; break;
         case 0x47: stop_type =   "市电中断"; break;
         case 0x48: stop_type =   "温度异常高"; break;
         case 0x49: stop_type =   "通信故障"; break;
         case 0x4A: stop_type =   "充电模块异常"; break;
         case 0x4B: stop_type =   "组端上限到"; break;
         case 0x4C: stop_type =   "压差上限到"; break;
         case 0x4D: stop_type =   "电流异常"; break;
         case 0x4E: stop_type =   "组端电压异常"; break;
         case 0x4F: stop_type =   "风扇异常"; break;
         case 0x50: stop_type =   "整流器电压异常"; break;
         case 0x51: stop_type =   "IGBT异常"; break;
         case 0x52: stop_type =   "辅助电源异常"; break;
         case 0x53: stop_type =   "CSV文件太大,请删除"; break;
         case 0x54: stop_type =   "BMS通信异常"; break;
         case 0x55: stop_type =   "存储异常"; break;
         case 0x56: stop_type =   "从机断开或通讯异常"; break;
         case 0x57: stop_type =   "从机状态异常"; break;
         case 0x58: stop_type =   "紧急停止"; break;
         // 放电停止原因
         case 0x00:
            stop_type = "手动停止";
            break;
         case 0x01:
            stop_type = "放电时间到";
            break;
         case 0x02:
            stop_type = "放电容量到";
            break;
         case 0x03:
            stop_type = "单体下限到";
            break;
         case 0x04:
            stop_type = "组端下限到";
            break;
         case 0x05:
            stop_type = "市电中断";
            break;
         case 0x06:
            stop_type = "内存不足";
            break;
         case 0x07:
            stop_type = "温度异常高";
            break;
         case 0x08:
            stop_type = "正在放电";
            break;
         case 0x09:
            stop_type = "手动暂停";
            break;
         case 0x0A:
            stop_type = "暂停放电";
            break;
         case 0x0B:
            stop_type = "通信故障";
            break;
         case 0x0C:
            stop_type = "电流故障";
            break;
         case 0x0D:
            stop_type = "压差上限到";
            break;
         case 0x0E:
            stop_type = "组端电压异常";
            break;
         case 0x0F:
            stop_type = "风扇异常";
            break;
         case 0x10:
            stop_type = "整流器电压异常";
            break;
         case 0x11:
            stop_type = "IGBT异常";
            break;
         case 0x12:
            stop_type = "辅助电源异常";
            break;
         case 0x13:
            stop_type = "单体温度异常高";
            break;
         case 0x14:
            stop_type = "BMS通信异常";
            break;
         case 0x15:
            stop_type = "存储异常";
            break;
         case 0x16:
            stop_type = "从机断开或通讯异常";
            break;
         case 0x17:
            stop_type = "从机状态异常";
            break;
         case 0x18:
            stop_type = "紧急停止";
            break;
         case 0x19:
            stop_type = "SOC下限到";
            break;
         // 充电停止原因
         case 0x40:
            stop_type = "停止充电";
            break;
         case 0x41:
            stop_type = "暂停充电";
            break;
         case 0x42:
            stop_type = "正在充电";
            break;
         case 0x43:
            stop_type = "充电时间到";
            break;
         case 0x44:
            stop_type = "充电容量到";
            break;
         case 0x45:
            stop_type = "单体上限到";
            break;
         case 0x46:
            stop_type = "充电已完成";
            break;
         case 0x47:
            stop_type = "市电中断";
            break;
         case 0x48:
            stop_type = "温度异常高";
            break;
         case 0x49:
            stop_type = "通信故障";
            break;
         case 0x4A:
            stop_type = "充电模块异常";
            break;
         case 0x4B:
            stop_type = "组端上限到";
            break;
         case 0x4C:
            stop_type = "压差上限到";
            break;
         case 0x4D:
            stop_type = "电流异常";
            break;
         case 0x4E:
            stop_type = "组端电压异常";
            break;
         case 0x4F:
            stop_type = "风扇异常";
            break;
         case 0x50:
            stop_type = "整流器电压异常";
            break;
         case 0x51:
            stop_type = "IGBT异常";
            break;
         case 0x52:
            stop_type = "辅助电源异常";
            break;
         case 0x53:
            stop_type = "单体温度异常高";
            break;
         case 0x54:
            stop_type = "BMS通信异常";
            break;
         case 0x55:
            stop_type = "存储异常";
            break;
         case 0x56:
            stop_type = "从机断开或通讯异常";
            break;
         case 0x57:
            stop_type = "从机状态异常";
            break;
         case 0x58:
            stop_type = "紧急停止";
            break;
         case 0x59:
            stop_type = "SOC上限到";
            break;
         case 0x5A:
            stop_type = "直充充电";
            break;
         case 0x5B:
            stop_type = "正在充电监测";
            break;
      }
      return stop_type;
   }
   /*// FBO4831放电终止原因
   public static String getStopType_4831(int stop_type_t) {
      String stop_type = "其他";
      switch (stop_type_t) {
         // 放电停止原因
         case 0:
            stop_type = "手动停止";
            break;
         case 1:
            stop_type = "放电时间到";
            break;
         case 2:
            stop_type = "放电容量到";
            break;
         case 3:
            stop_type = "单体下限到";
            break;
         case 4:
            stop_type = "组端下限到";
            break;
         case 5:
            stop_type = "市电中断";
            break;
         case 6:
            stop_type = "存储异常";
            break;
         case 7:
            stop_type = "温度异常";
            break;
         case 8:
            stop_type = "正在放电";
            break;
         case 9:
            stop_type = "手动暂停";
            break;
         case 10:
            stop_type = "自动暂停";
            break;
         case 11:
            stop_type = "通信异常";
            break;
         case 12:
            stop_type = "电流异常";
            break;
         case 13:
            stop_type = "压差上限到";
            break;
         case 14:
            stop_type = "组端电压异常";
            break;
         case 15:
            stop_type = "风扇异常";
            break;
         case 16:
            stop_type = "整流器电压异常";
            break;
         case 17:
            stop_type = "IGBT异常";
            break;
         case 18:
            stop_type = "辅助电源异常";
            break;
         case 19:
            stop_type = "CSV文件太大,请删除";
            break;
         case 20:
            stop_type = "从机通信异常";
            break;
         case 21:
            stop_type = "从机状态异常";
            break;
         case 22:
            stop_type = "主机通信异常";
            break;
         case 23:
            stop_type = "紧急停止";
            break;
         case 24:
            stop_type = "硬件并机失败";
            break;
         case 25:
            stop_type = "操作频繁";
            break;
         case 26:
            stop_type = "未知";
            break;
      }
      return stop_type;
   }*/
   // FBO4831放电终止原因
   public static String getStopType_4831(int stop_type_t) {
      String stop_type = "NONE";
      switch (stop_type_t) {
         // 放电停止原因
         case 0:
            stop_type = "ManualStop";
            break;
         case 1:
            stop_type = "DischargeTimeTo";
            break;
         case 2:
            stop_type = "DischargeCapacityTo";
            break;
         case 3:
            stop_type = "LowerLimitOfMonomerTo";
            break;
         case 4:
            stop_type = "GroupEndLowerLimitTo";
            break;
         case 5:
            stop_type = "MainsPowerOutage";
            break;
         case 6:
            stop_type = "StorageException";
            break;
         case 7:
            stop_type = "AbnormalTemperature";
            break;
         case 8:
            stop_type = "Discharging";
            break;
         case 9:
            stop_type = "ManualPause";
            break;
         case 10:
            stop_type = "AutoPause";
            break;
         case 11:
            stop_type = "AbnormalCommunication";
            break;
         case 12:
            stop_type = "AbnormalCurrent";
            break;
         case 13:
            stop_type = "UpperLimitOfPressureDifferenceTo";
            break;
         case 14:
            stop_type = "AbnormalGroupTerminalVoltage";
            break;
         case 15:
            stop_type = "FanAbnormal";
            break;
         case 16:
            stop_type = "RectifierVoltageAbnormality";
            break;
         case 17:
            stop_type = "IGBTAbnormality";
            break;
         case 18:
            stop_type = "AbnormalAuxiliaryPowerSupply";
            break;
         case 19:
            stop_type = "CSVFileIsTooLargePleaseDeleteIt";
            break;
         case 20:
            stop_type = "AbnormalSlaveCommunication";
            break;
         case 21:
            stop_type = "AbnormalSlaveState";
            break;
         case 22:
            stop_type = "HostCommunicationAbnormality";
            break;
         case 23:
            stop_type = "EmergencyStop";
            break;
         case 24:
            stop_type = "HardwareParallelFailure";
            break;
         case 25:
            stop_type = "FrequentOperations";
            break;
         case 26:
            stop_type = "NONE";
            break;
      }
      return stop_type;
   }
   // FBO4815放电终止原因
   public static String getStopType_4815(int stop_type_t) {
      String stop_type = "其他";
      switch (stop_type_t) {
         // 放电停止原因
         case 0x00:
            stop_type = "手动停止";
            break;
         case 0x01:
            stop_type = "放电时间到";
            break;
         case 0x02:
            stop_type = "放电容量到";
            break;
         case 0x03:
            stop_type = "单体下限到";
            break;
         case 0x04:
            stop_type = "组端下限到";
            break;
         case 0x05:
            stop_type = "市电中断";
            break;
         case 0x06:
            stop_type = "内存不足";
            break;
         case 0x07:
            stop_type = "温度异常高";
            break;
         case 0x08:
            stop_type = "正在放电";
            break;
         case 0x09:
            stop_type = "手动暂停";
            break;
         case 0x0A:
            stop_type = "暂停放电";
            break;
         case 0x0B:
            stop_type = "通信故障";
            break;
         case 0x0C:
            stop_type = "电流故障";
            break;
         case 0x0D:
            stop_type = "压差上限到";
            break;
         case 0x0E:
            stop_type = "组端电压异常";
            break;
         case 0x0F:
            stop_type = "风扇异常";
            break;
         case 0x10:
            stop_type = "整流器电压异常";
            break;
         case 0x11:
            stop_type = "IGBT异常";
            break;
         case 0x12:
            stop_type = "辅助电源异常";
            break;
         case 0x13:
            stop_type = "单体温度异常高";
            break;
         case 0x14:
            stop_type = "BMS通信异常";
            break;
         case 0x15:
            stop_type = "存储异常";
            break;
         case 0x16:
            stop_type = "从机断开或通讯异常";
            break;
         case 0x17:
            stop_type = "从机状态异常";
            break;
         case 0x18:
            stop_type = "紧急停止";
            break;
         case 0x19:
            stop_type = "SOC下限到";
            break;
         // 充电停止原因
         case 0x40:
            stop_type = "停止充电";
            break;
         case 0x41:
            stop_type = "暂停充电";
            break;
         case 0x42:
            stop_type = "正在充电";
            break;
         case 0x43:
            stop_type = "充电时间到";
            break;
         case 0x44:
            stop_type = "充电容量到";
            break;
         case 0x45:
            stop_type = "单体上限到";
            break;
         case 0x46:
            stop_type = "充电已完成";
            break;
         case 0x47:
            stop_type = "市电中断";
            break;
         case 0x48:
            stop_type = "温度异常高";
            break;
         case 0x49:
            stop_type = "通信故障";
            break;
         case 0x4A:
            stop_type = "充电模块异常";
            break;
         case 0x4B:
            stop_type = "组端上限到";
            break;
         case 0x4C:
            stop_type = "压差上限到";
            break;
         case 0x4D:
            stop_type = "电流异常";
            break;
         case 0x4E:
            stop_type = "组端电压异常";
            break;
         case 0x4F:
            stop_type = "风扇异常";
            break;
         case 0x50:
            stop_type = "整流器电压异常";
            break;
         case 0x51:
            stop_type = "IGBT异常";
            break;
         case 0x52:
            stop_type = "辅助电源异常";
            break;
         case 0x53:
            stop_type = "单体温度异常高";
            break;
         case 0x54:
            stop_type = "BMS通信异常";
            break;
         case 0x55:
            stop_type = "存储异常";
            break;
         case 0x56:
            stop_type = "从机断开或通讯异常";
            break;
         case 0x57:
            stop_type = "从机状态异常";
            break;
         case 0x58:
            stop_type = "紧急停止";
            break;
         case 0x59:
            stop_type = "SOC上限到";
            break;
         case 0x5A:
            stop_type = "直充充电";
            break;
         case 0x5B:
            stop_type = "正在充电监测";
            break;
      }
      return stop_type;
   }
    //设备状态变换对应关系
   public static String getFbsdev_Statechange(int state){
      String state_name="停止";