From 06e64ef2631cd81ee5c34724a4c52e5f3785d301 Mon Sep 17 00:00:00 2001
From: gengby <858962040@qq.com>
Date: Fri, 16 Dec 2022 19:13:35 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../HailiangFlatDeviceDriver.java             |  18 +-
 .../hailiang/hailiang_flat/ItemProtocol.java  |  68 +++-
 .../nl/hand/service/impl/HandServiceImpl.java | 356 +++++++++---------
 3 files changed, 253 insertions(+), 189 deletions(-)

diff --git a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_flat/HailiangFlatDeviceDriver.java b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_flat/HailiangFlatDeviceDriver.java
index abed6db..5cd858c 100644
--- a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_flat/HailiangFlatDeviceDriver.java
+++ b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_flat/HailiangFlatDeviceDriver.java
@@ -25,11 +25,11 @@ public class HailiangFlatDeviceDriver extends AbstractOpcDeviceDriver implements
     int is_auto = 0;
     int is_running = 0;
     int mode = 0;
-    int a_pressure = 0;
-    int b_pressure = 0;
-    int outer_diameter = 0;
-    int length = 0;
-    int wall_thickness = 0;
+    float a_pressure = 0.00f;
+    float b_pressure = 0.00f;
+    float outer_diameter = 0.00f;
+    float length = 0.00f;
+    float wall_thickness = 0.00f;
     int color = 0;
     int jackup_num = 0;
     int strap_number = 0;
@@ -96,6 +96,10 @@ public class HailiangFlatDeviceDriver extends AbstractOpcDeviceDriver implements
     int wrap_control = 0;
     int strapping_finish = 0;
     int error_clear = 0;
+    float motor_frequency_setting= 0.00f;
+    float nip_setting= 0.00f;
+    int cowl_pass_jacking_need_num = 0;
+    int cowl_pass_jacking_has_num = 0;
 
     String device_code;
 
@@ -186,6 +190,10 @@ public class HailiangFlatDeviceDriver extends AbstractOpcDeviceDriver implements
             wrap_control = this.itemProtocol.getwrap_control();
             strapping_finish = this.itemProtocol.getstrapping_finish();
             error_clear = this.itemProtocol.geterror_clear();
+            motor_frequency_setting= this.itemProtocol.getmotor_frequency_setting();
+            nip_setting= this.itemProtocol.getnip_setting();
+            cowl_pass_jacking_need_num = this.itemProtocol.getcowl_pass_jacking_need_num();
+            cowl_pass_jacking_has_num = this.itemProtocol.getcowl_pass_jacking_has_num();
         } catch (Exception var17) {
             return;
         }
diff --git a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_flat/ItemProtocol.java b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_flat/ItemProtocol.java
index a2a3830..a89d665 100644
--- a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_flat/ItemProtocol.java
+++ b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_flat/ItemProtocol.java
@@ -137,6 +137,15 @@ public class ItemProtocol {
     public static String item_strapping_finish = "strapping_finish";
     //故障复位
     public static String item_error_clear = "error_clear";
+    //主、反向输送电机频率设定
+    public static String item_motor_frequency_setting = "motor_frequency_setting";
+    //捆扎时夹紧开度设定
+    public static String item_nip_setting = "nip_setting";
+    //套帽合格顶升需要根数
+    public static String item_cowl_pass_jacking_need_num = "cowl_pass_jacking_need_num";
+    //套帽合格顶升已有根数
+    public static String item_cowl_pass_jacking_has_num = "cowl_pass_jacking_has_num";
+
 
     private HailiangFlatDeviceDriver driver;
 
@@ -156,24 +165,24 @@ public class ItemProtocol {
         return this.getOpcIntegerValue(item_mode);
     }
 
-    public int geta_pressure() {
-        return this.getOpcIntegerValue(item_a_pressure);
+    public float geta_pressure() {
+        return this.getOpcFloatValue(item_a_pressure);
     }
 
-    public int getb_pressure() {
-        return this.getOpcIntegerValue(item_b_pressure);
+    public float getb_pressure() {
+        return this.getOpcFloatValue(item_b_pressure);
     }
 
-    public int getouter_diameter() {
-        return this.getOpcIntegerValue(item_outer_diameter);
+    public float getouter_diameter() {
+        return this.getOpcFloatValue(item_outer_diameter);
     }
 
-    public int getlength() {
-        return this.getOpcIntegerValue(item_length);
+    public float getlength() {
+        return this.getOpcFloatValue(item_length);
     }
 
-    public int getwall_thickness() {
-        return this.getOpcIntegerValue(item_wall_thickness);
+    public float getwall_thickness() {
+        return this.getOpcFloatValue(item_wall_thickness);
     }
 
     public int getcolor() {
@@ -440,6 +449,22 @@ public class ItemProtocol {
         return this.getOpcIntegerValue(item_error_clear);
     }
 
+    public float getmotor_frequency_setting() {
+        return this.getOpcFloatValue(item_motor_frequency_setting);
+    }
+
+    public float getnip_setting() {
+        return this.getOpcFloatValue(item_nip_setting);
+    }
+
+    public int getcowl_pass_jacking_need_num() {
+        return this.getOpcIntegerValue(item_cowl_pass_jacking_need_num);
+    }
+
+    public int getcowl_pass_jacking_has_num() {
+        return this.getOpcIntegerValue(item_cowl_pass_jacking_has_num);
+    }
+
 
     //是否有货
     public int hasGoods(int move) {
@@ -458,7 +483,6 @@ public class ItemProtocol {
             return value;
         }
         return 0;
-
     }
 
     public String getOpcStringValue(String protocol) {
@@ -471,6 +495,18 @@ public class ItemProtocol {
         return "0";
     }
 
+    public Float getOpcFloatValue(String protocol) {
+        Float value = this.driver.getFloatValue(protocol);
+        if (value == null) {
+            log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!");
+            setIsonline(false);
+        } else {
+            setIsonline(true);
+            return value;
+        }
+        return 0.00f;
+    }
+
     public static List<ItemDto> getReadableItemDtos() {
         ArrayList list = new ArrayList();
         list.add(new ItemDto(item_is_auto, "手自动", "I18.1"));
@@ -492,7 +528,7 @@ public class ItemProtocol {
         list.add(new ItemDto(item_ink_jet, "喷墨-一段出料完成", "DB14.X3.6"));
         list.add(new ItemDto(item_ink_jet_seat1, "喷墨-占位1", "I23.5"));
         list.add(new ItemDto(item_ink_jet_seat2, "喷墨-占位2", "I23.4"));
-        list.add(new ItemDto(item_ink_jet_seat3, "喷墨-占位3", "I39.6"));
+        list.add(new ItemDto(item_ink_jet_seat3, "喷墨-占位3", "I38.6"));
         list.add(new ItemDto(item_main_convey2, "主输送二段—有料", "DB14.X4.1"));
         list.add(new ItemDto(item_main_convey2_seat1, "主输送二段—占位1", "I22.6"));
         list.add(new ItemDto(item_main_convey3_has_pass, "主输送三段-有料合格", "DB14.X4.2"));
@@ -547,6 +583,10 @@ public class ItemProtocol {
         list.add(new ItemDto(item_wrap_control, "裹膜机控制权", "DB360.X2.3"));
         list.add(new ItemDto(item_strapping_finish, "捆扎完成", "M4.5"));
         list.add(new ItemDto(item_error_clear, "故障复位", "M5.2"));
+        list.add(new ItemDto(item_motor_frequency_setting, "主、反向输送电机频率设定", "DB260.D6"));
+        list.add(new ItemDto(item_nip_setting, "捆扎时夹紧开度设定", "DB3.D40"));
+        list.add(new ItemDto(item_cowl_pass_jacking_need_num, "套帽合格顶升需要根数", "DB2.W26"));
+        list.add(new ItemDto(item_cowl_pass_jacking_has_num, "套帽合格顶升已有根数", "DB2.W14"));
         return list;
     }
 
@@ -626,6 +666,10 @@ public class ItemProtocol {
         list.add(new ItemDto(item_wrap_control, "裹膜机控制权", "DB360.X2.3"));
         list.add(new ItemDto(item_strapping_finish, "捆扎完成", "M4.5"));
         list.add(new ItemDto(item_error_clear, "故障复位", "M5.2"));
+        list.add(new ItemDto(item_motor_frequency_setting, "主、反向输送电机频率设定", "DB260.D6"));
+        list.add(new ItemDto(item_nip_setting, "捆扎时夹紧开度设定", "DB3.D40"));
+        list.add(new ItemDto(item_cowl_pass_jacking_need_num, "套帽合格顶升需要根数", "DB2.W26"));
+        list.add(new ItemDto(item_cowl_pass_jacking_has_num, "套帽合格顶升已有根数", "DB2.W14"));
         return list;
     }
 
diff --git a/nladmin-system/src/main/java/org/nl/hand/service/impl/HandServiceImpl.java b/nladmin-system/src/main/java/org/nl/hand/service/impl/HandServiceImpl.java
index b80be98..70a1174 100644
--- a/nladmin-system/src/main/java/org/nl/hand/service/impl/HandServiceImpl.java
+++ b/nladmin-system/src/main/java/org/nl/hand/service/impl/HandServiceImpl.java
@@ -25,6 +25,8 @@ import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.stereotype.Service;
 
 import java.io.IOException;
+import java.math.RoundingMode;
+import java.text.DecimalFormat;
 import java.util.Map;
 
 @Service
@@ -415,21 +417,21 @@ public class HandServiceImpl implements HandService {
         //Device device = deviceAppService.findDeviceByCode("PB01");
         //HailiangFlatDeviceDriver hailiangFlatDeviceDriver;
         //if (device.getDeviceDriver() instanceof HailiangFlatDeviceDriver){
-         //   hailiangFlatDeviceDriver = (HailiangFlatDeviceDriver) device.getDeviceDriver();
-            if (type.equals("1")){
-                hailiangFlatDeviceDriver.writing(name,value);
-            }else if (type.equals("2")){
-                int realValue = hailiangFlatDeviceDriver.getItemProtocol().getOpcIntegerValue(name);
-                if (realValue == 0){
-                    realValue = 1;
-                } else if (realValue == 1){
-                    realValue = 0;
-                }
-                hailiangFlatDeviceDriver.writing(name,String.valueOf(realValue));
-            } else {
-                hailiangFlatDeviceDriver.writing(name,value);
+        //   hailiangFlatDeviceDriver = (HailiangFlatDeviceDriver) device.getDeviceDriver();
+        if (type.equals("1")) {
+            hailiangFlatDeviceDriver.writing(name, value);
+        } else if (type.equals("2")) {
+            int realValue = hailiangFlatDeviceDriver.getItemProtocol().getOpcIntegerValue(name);
+            if (realValue == 0) {
+                realValue = 1;
+            } else if (realValue == 1) {
+                realValue = 0;
             }
-      //  }
+            hailiangFlatDeviceDriver.writing(name, String.valueOf(realValue));
+        } else {
+            hailiangFlatDeviceDriver.writing(name, value);
+        }
+        //  }
         // 返回
         resultJSON.put("code", "1");
         resultJSON.put("desc", "下发成功");
@@ -441,165 +443,175 @@ public class HandServiceImpl implements HandService {
         HailiangFlatDeviceDriver hailiangFlatDeviceDriver = deviceAppService.findDeviceDriver(HailiangFlatDeviceDriver.class).get(0);
         //Device device = deviceAppService.findDeviceByCode("PB01");
         JSONObject resp = new JSONObject();
+        DecimalFormat hisFormat = new DecimalFormat("########.##");
+        hisFormat.setRoundingMode(RoundingMode.DOWN);
         //HailiangFlatDeviceDriver hailiangFlatDeviceDriver;
         //if (device.getDeviceDriver() instanceof HailiangFlatDeviceDriver){
-         //   hailiangFlatDeviceDriver = (HailiangFlatDeviceDriver) device.getDeviceDriver();
-            int is_auto = hailiangFlatDeviceDriver.getIs_auto();
-            int is_running = hailiangFlatDeviceDriver.getIs_running();
-            int mode = hailiangFlatDeviceDriver.getMode();
-            int a_pressure = hailiangFlatDeviceDriver.getA_pressure();
-            int b_pressure = hailiangFlatDeviceDriver.getB_pressure();
-            int outer_diameter = hailiangFlatDeviceDriver.getOuter_diameter();
-            int length = hailiangFlatDeviceDriver.getLength();
-            int wall_thickness = hailiangFlatDeviceDriver.getWall_thickness();
-            int color = hailiangFlatDeviceDriver.getColor();
-            int jackup_num = hailiangFlatDeviceDriver.getJackup_num();
-            int strap_number = hailiangFlatDeviceDriver.getStrap_number();
-            int start = hailiangFlatDeviceDriver.getStart();
-            int stop = hailiangFlatDeviceDriver.getStop();
-            int main_convey1 = hailiangFlatDeviceDriver.getMain_convey1();
-            int main_convey1_seat1 = hailiangFlatDeviceDriver.getMain_convey1_seat1();
-            int main_convey1_seat2 = hailiangFlatDeviceDriver.getMain_convey1_seat2();
-            int ink_jet = hailiangFlatDeviceDriver.getInk_jet();
-            int ink_jet_seat1 = hailiangFlatDeviceDriver.getInk_jet_seat1();
-            int ink_jet_seat2 = hailiangFlatDeviceDriver.getInk_jet_seat2();
-            int ink_jet_seat3 = hailiangFlatDeviceDriver.getInk_jet_seat3();
-            int main_convey2 = hailiangFlatDeviceDriver.getMain_convey2();
-            int main_convey2_seat1 = hailiangFlatDeviceDriver.getMain_convey2_seat1();
-            int main_convey3_has_pass = hailiangFlatDeviceDriver.getMain_convey3_has_pass();
-            int main_convey3_has_noPass = hailiangFlatDeviceDriver.getMain_convey3_has_noPass();
-            int main_convey3_seat1 = hailiangFlatDeviceDriver.getMain_convey3_seat1();
-            int main_convey3_seat2 = hailiangFlatDeviceDriver.getMain_convey3_seat2();
-            int cowl_a_cache = hailiangFlatDeviceDriver.getCowl_a_cache();
-            int cowl_a_cache_seat1 = hailiangFlatDeviceDriver.getCowl_a_cache_seat1();
-            int cowl_a_cache_seat2 = hailiangFlatDeviceDriver.getCowl_a_cache_seat2();
-            int cowl_a_cowl = hailiangFlatDeviceDriver.getCowl_a_cowl();
-            int cowl_a_cowl_seat1 = hailiangFlatDeviceDriver.getCowl_a_cowl_seat1();
-            int cowl_a_cowl_seat2 = hailiangFlatDeviceDriver.getCowl_a_cowl_seat2();
-            int cowl_a_cowl_pass = hailiangFlatDeviceDriver.getCowl_a_cowl_pass();
-            int reverse_convey = hailiangFlatDeviceDriver.getReverse_convey();
-            int reverse_convey_seat1 = hailiangFlatDeviceDriver.getReverse_convey_seat1();
-            int reverse_convey_seat2 = hailiangFlatDeviceDriver.getReverse_convey_seat2();
-            int reverse_convey_seat3 = hailiangFlatDeviceDriver.getReverse_convey_seat3();
-            int reverse_convey_pass = hailiangFlatDeviceDriver.getReverse_convey_pass();
-            int cowl_b_cache = hailiangFlatDeviceDriver.getCowl_b_cache();
-            int cowl_b_cache_seat1 = hailiangFlatDeviceDriver.getCowl_b_cache_seat1();
-            int cowl_b_cache_seat2 = hailiangFlatDeviceDriver.getCowl_b_cache_seat2();
-            int cowl_b_cache_pass = hailiangFlatDeviceDriver.getCowl_b_cache_pass();
-            int cowl_b_cowl = hailiangFlatDeviceDriver.getCowl_b_cowl();
-            int cowl_b_cowl_seat1 = hailiangFlatDeviceDriver.getCowl_b_cowl_seat1();
-            int cowl_b_cowl_seat2 = hailiangFlatDeviceDriver.getCowl_b_cowl_seat2();
-            int cowl_b_cowl_aPass = hailiangFlatDeviceDriver.getCowl_b_cowl_aPass();
-            int cowl_b_cowl_bPass = hailiangFlatDeviceDriver.getCowl_b_cowl_bPass();
-            int no_pass_convey_cache_num = hailiangFlatDeviceDriver.getNo_pass_convey_cache_num();
-            int wrap_ago = hailiangFlatDeviceDriver.getWrap_ago();
-            int wrap_ago_seat1 = hailiangFlatDeviceDriver.getWrap_ago_seat1();
-            int wrap_ago_seat2 = hailiangFlatDeviceDriver.getWrap_ago_seat2();
-            int wrap_after = hailiangFlatDeviceDriver.getWrap_after();
-            int wrap_after_seat1 = hailiangFlatDeviceDriver.getWrap_after_seat1();
-            int wrap_after_seat2 = hailiangFlatDeviceDriver.getWrap_after_seat2();
-            int strapping_current_step = hailiangFlatDeviceDriver.getStrapping_current_step();
-            int strapping_seat1 = hailiangFlatDeviceDriver.getStrapping_seat1();
-            int strapping_seat2 = hailiangFlatDeviceDriver.getStrapping_seat2();
-            int strapping_seat3 = hailiangFlatDeviceDriver.getStrapping_seat3();
-            int strapping_seat4 = hailiangFlatDeviceDriver.getStrapping_seat4();
-            int strapping_seat5 = hailiangFlatDeviceDriver.getStrapping_seat5();
-            int strapping_seat6 = hailiangFlatDeviceDriver.getStrapping_seat6();
-            int strapping_seat7 = hailiangFlatDeviceDriver.getStrapping_seat7();
-            int strapping_seat8 = hailiangFlatDeviceDriver.getStrapping_seat8();
-            int strapping_seat9 = hailiangFlatDeviceDriver.getStrapping_seat9();
-            int strapping_seat10 = hailiangFlatDeviceDriver.getStrapping_seat10();
-            int strapping_seat11 = hailiangFlatDeviceDriver.getStrapping_seat11();
-            int strapping_seat12 = hailiangFlatDeviceDriver.getStrapping_seat12();
-            int a_error1_clear = hailiangFlatDeviceDriver.getA_error1_clear();
-            int b_error1_clear = hailiangFlatDeviceDriver.getB_error1_clear();
-            int a_error2_clear = hailiangFlatDeviceDriver.getA_error2_clear();
-            int b_error2_clear = hailiangFlatDeviceDriver.getB_error2_clear();
-            int wrap_control = hailiangFlatDeviceDriver.getWrap_control();
-            int strapping_finish = hailiangFlatDeviceDriver.getStrapping_finish();
-            int error_clear = hailiangFlatDeviceDriver.getError_clear();
-            resp.put("code","1");
-            resp.put("desc","查询成功");
-            JSONObject result = new JSONObject();
-            result.put("is_auto",is_auto);
-            result.put("is_running",is_running);
-            result.put("mode",mode);
-            result.put("a_pressure",a_pressure);
-            result.put("b_pressure",b_pressure);
-            result.put("outer_diameter",outer_diameter);
-            result.put("length",length);
-            result.put("wall_thickness",wall_thickness);
-            result.put("color",color);
-            result.put("jackup_num",jackup_num);
-            result.put("strap_number",strap_number);
-            result.put("start",start);
-            result.put("stop",stop);
-            result.put("main_convey1",main_convey1);
-            result.put("main_convey1_seat1",main_convey1_seat1);
-            result.put("main_convey1_seat2",main_convey1_seat2);
-            result.put("ink_jet",ink_jet);
-            result.put("ink_jet_seat1",ink_jet_seat1);
-            result.put("ink_jet_seat2",ink_jet_seat2);
-            result.put("ink_jet_seat3",ink_jet_seat3);
-            result.put("main_convey2",main_convey2);
-            result.put("main_convey2_seat1",main_convey2_seat1);
-            result.put("main_convey3_has_pass",main_convey3_has_pass);
-            result.put("main_convey3_has_noPass",main_convey3_has_noPass);
-            result.put("main_convey3_seat1",main_convey3_seat1);
-            result.put("main_convey3_seat2",main_convey3_seat2);
-            result.put("cowl_a_cache",cowl_a_cache);
-            result.put("cowl_a_cache_seat1",cowl_a_cache_seat1);
-            result.put("cowl_a_cache_seat2",cowl_a_cache_seat2);
-            result.put("cowl_a_cowl",cowl_a_cowl);
-            result.put("cowl_a_cowl_seat1",cowl_a_cowl_seat1);
-            result.put("cowl_a_cowl_seat2",cowl_a_cowl_seat2);
-            result.put("cowl_a_cowl_pass",cowl_a_cowl_pass);
-            result.put("reverse_convey",reverse_convey);
-            result.put("reverse_convey_seat1",reverse_convey_seat1);
-            result.put("reverse_convey_seat2",reverse_convey_seat2);
-            result.put("reverse_convey_seat3",reverse_convey_seat3);
-            result.put("reverse_convey_pass",reverse_convey_pass);
-            result.put("cowl_b_cache",cowl_b_cache);
-            result.put("cowl_b_cache_seat1",cowl_b_cache_seat1);
-            result.put("cowl_b_cache_seat2",cowl_b_cache_seat2);
-            result.put("cowl_b_cache_pass",cowl_b_cache_pass);
-            result.put("cowl_b_cowl",cowl_b_cowl);
-            result.put("cowl_b_cowl_seat1",cowl_b_cowl_seat1);
-            result.put("cowl_b_cowl_seat2",cowl_b_cowl_seat2);
-            result.put("cowl_b_cowl_aPass",cowl_b_cowl_aPass);
-            result.put("cowl_b_cowl_bPass",cowl_b_cowl_bPass);
-            result.put("no_pass_convey_cache_num",no_pass_convey_cache_num);
-            result.put("wrap_ago",wrap_ago);
-            result.put("wrap_ago_seat1",wrap_ago_seat1);
-            result.put("wrap_ago_seat2",wrap_ago_seat2);
-            result.put("wrap_after",wrap_after);
-            result.put("wrap_after_seat1",wrap_after_seat1);
-            result.put("wrap_after_seat2",wrap_after_seat2);
-            result.put("strapping_current_step",strapping_current_step);
-            result.put("strapping_seat1",strapping_seat1);
-            result.put("strapping_seat2",strapping_seat2);
-            result.put("strapping_seat3",strapping_seat3);
-            result.put("strapping_seat4",strapping_seat4);
-            result.put("strapping_seat5",strapping_seat5);
-            result.put("strapping_seat6",strapping_seat6);
-            result.put("strapping_seat7",strapping_seat7);
-            result.put("strapping_seat8",strapping_seat8);
-            result.put("strapping_seat9",strapping_seat9);
-            result.put("strapping_seat10",strapping_seat10);
-            result.put("strapping_seat11",strapping_seat11);
-            result.put("strapping_seat12",strapping_seat12);
-            result.put("a_error1_clear",a_error1_clear);
-            result.put("b_error1_clear",b_error1_clear);
-            result.put("a_error2_clear",a_error2_clear);
-            result.put("b_error2_clear",b_error2_clear);
-            result.put("wrap_control",wrap_control);
-            result.put("strapping_finish",strapping_finish);
-            result.put("error_clear",error_clear);
-            resp.put("result",result);
-            return resp;
-      //  }
-       // resp.put("code","0");
-      //  resp.put("desc","查询失败");
-     //   return resp;
+        //   hailiangFlatDeviceDriver = (HailiangFlatDeviceDriver) device.getDeviceDriver();
+        int is_auto = hailiangFlatDeviceDriver.getIs_auto();
+        int is_running = hailiangFlatDeviceDriver.getIs_running();
+        int mode = hailiangFlatDeviceDriver.getMode();
+        float a_pressure = hailiangFlatDeviceDriver.getA_pressure();
+        float b_pressure = hailiangFlatDeviceDriver.getB_pressure();
+        float outer_diameter = hailiangFlatDeviceDriver.getOuter_diameter();
+        float length = hailiangFlatDeviceDriver.getLength();
+        float wall_thickness = hailiangFlatDeviceDriver.getWall_thickness();
+        int color = hailiangFlatDeviceDriver.getColor();
+        int jackup_num = hailiangFlatDeviceDriver.getJackup_num();
+        int strap_number = hailiangFlatDeviceDriver.getStrap_number();
+        int start = hailiangFlatDeviceDriver.getStart();
+        int stop = hailiangFlatDeviceDriver.getStop();
+        int main_convey1 = hailiangFlatDeviceDriver.getMain_convey1();
+        int main_convey1_seat1 = hailiangFlatDeviceDriver.getMain_convey1_seat1();
+        int main_convey1_seat2 = hailiangFlatDeviceDriver.getMain_convey1_seat2();
+        int ink_jet = hailiangFlatDeviceDriver.getInk_jet();
+        int ink_jet_seat1 = hailiangFlatDeviceDriver.getInk_jet_seat1();
+        int ink_jet_seat2 = hailiangFlatDeviceDriver.getInk_jet_seat2();
+        int ink_jet_seat3 = hailiangFlatDeviceDriver.getInk_jet_seat3();
+        int main_convey2 = hailiangFlatDeviceDriver.getMain_convey2();
+        int main_convey2_seat1 = hailiangFlatDeviceDriver.getMain_convey2_seat1();
+        int main_convey3_has_pass = hailiangFlatDeviceDriver.getMain_convey3_has_pass();
+        int main_convey3_has_noPass = hailiangFlatDeviceDriver.getMain_convey3_has_noPass();
+        int main_convey3_seat1 = hailiangFlatDeviceDriver.getMain_convey3_seat1();
+        int main_convey3_seat2 = hailiangFlatDeviceDriver.getMain_convey3_seat2();
+        int cowl_a_cache = hailiangFlatDeviceDriver.getCowl_a_cache();
+        int cowl_a_cache_seat1 = hailiangFlatDeviceDriver.getCowl_a_cache_seat1();
+        int cowl_a_cache_seat2 = hailiangFlatDeviceDriver.getCowl_a_cache_seat2();
+        int cowl_a_cowl = hailiangFlatDeviceDriver.getCowl_a_cowl();
+        int cowl_a_cowl_seat1 = hailiangFlatDeviceDriver.getCowl_a_cowl_seat1();
+        int cowl_a_cowl_seat2 = hailiangFlatDeviceDriver.getCowl_a_cowl_seat2();
+        int cowl_a_cowl_pass = hailiangFlatDeviceDriver.getCowl_a_cowl_pass();
+        int reverse_convey = hailiangFlatDeviceDriver.getReverse_convey();
+        int reverse_convey_seat1 = hailiangFlatDeviceDriver.getReverse_convey_seat1();
+        int reverse_convey_seat2 = hailiangFlatDeviceDriver.getReverse_convey_seat2();
+        int reverse_convey_seat3 = hailiangFlatDeviceDriver.getReverse_convey_seat3();
+        int reverse_convey_pass = hailiangFlatDeviceDriver.getReverse_convey_pass();
+        int cowl_b_cache = hailiangFlatDeviceDriver.getCowl_b_cache();
+        int cowl_b_cache_seat1 = hailiangFlatDeviceDriver.getCowl_b_cache_seat1();
+        int cowl_b_cache_seat2 = hailiangFlatDeviceDriver.getCowl_b_cache_seat2();
+        int cowl_b_cache_pass = hailiangFlatDeviceDriver.getCowl_b_cache_pass();
+        int cowl_b_cowl = hailiangFlatDeviceDriver.getCowl_b_cowl();
+        int cowl_b_cowl_seat1 = hailiangFlatDeviceDriver.getCowl_b_cowl_seat1();
+        int cowl_b_cowl_seat2 = hailiangFlatDeviceDriver.getCowl_b_cowl_seat2();
+        int cowl_b_cowl_aPass = hailiangFlatDeviceDriver.getCowl_b_cowl_aPass();
+        int cowl_b_cowl_bPass = hailiangFlatDeviceDriver.getCowl_b_cowl_bPass();
+        int no_pass_convey_cache_num = hailiangFlatDeviceDriver.getNo_pass_convey_cache_num();
+        int wrap_ago = hailiangFlatDeviceDriver.getWrap_ago();
+        int wrap_ago_seat1 = hailiangFlatDeviceDriver.getWrap_ago_seat1();
+        int wrap_ago_seat2 = hailiangFlatDeviceDriver.getWrap_ago_seat2();
+        int wrap_after = hailiangFlatDeviceDriver.getWrap_after();
+        int wrap_after_seat1 = hailiangFlatDeviceDriver.getWrap_after_seat1();
+        int wrap_after_seat2 = hailiangFlatDeviceDriver.getWrap_after_seat2();
+        int strapping_current_step = hailiangFlatDeviceDriver.getStrapping_current_step();
+        int strapping_seat1 = hailiangFlatDeviceDriver.getStrapping_seat1();
+        int strapping_seat2 = hailiangFlatDeviceDriver.getStrapping_seat2();
+        int strapping_seat3 = hailiangFlatDeviceDriver.getStrapping_seat3();
+        int strapping_seat4 = hailiangFlatDeviceDriver.getStrapping_seat4();
+        int strapping_seat5 = hailiangFlatDeviceDriver.getStrapping_seat5();
+        int strapping_seat6 = hailiangFlatDeviceDriver.getStrapping_seat6();
+        int strapping_seat7 = hailiangFlatDeviceDriver.getStrapping_seat7();
+        int strapping_seat8 = hailiangFlatDeviceDriver.getStrapping_seat8();
+        int strapping_seat9 = hailiangFlatDeviceDriver.getStrapping_seat9();
+        int strapping_seat10 = hailiangFlatDeviceDriver.getStrapping_seat10();
+        int strapping_seat11 = hailiangFlatDeviceDriver.getStrapping_seat11();
+        int strapping_seat12 = hailiangFlatDeviceDriver.getStrapping_seat12();
+        int a_error1_clear = hailiangFlatDeviceDriver.getA_error1_clear();
+        int b_error1_clear = hailiangFlatDeviceDriver.getB_error1_clear();
+        int a_error2_clear = hailiangFlatDeviceDriver.getA_error2_clear();
+        int b_error2_clear = hailiangFlatDeviceDriver.getB_error2_clear();
+        int wrap_control = hailiangFlatDeviceDriver.getWrap_control();
+        int strapping_finish = hailiangFlatDeviceDriver.getStrapping_finish();
+        int error_clear = hailiangFlatDeviceDriver.getError_clear();
+        float motor_frequency_setting= hailiangFlatDeviceDriver.getMotor_frequency_setting();
+        float nip_setting= hailiangFlatDeviceDriver.getNip_setting();
+        int cowl_pass_jacking_need_num = hailiangFlatDeviceDriver.getCowl_pass_jacking_need_num();
+        int cowl_pass_jacking_has_num = hailiangFlatDeviceDriver.getCowl_pass_jacking_has_num();
+        resp.put("code", "1");
+        resp.put("desc", "查询成功");
+        JSONObject result = new JSONObject();
+        result.put("is_auto", is_auto + "");
+        result.put("is_running", is_running + "");
+        result.put("mode", mode + "");
+        result.put("a_pressure", hisFormat.format(a_pressure) + "");
+        result.put("b_pressure", hisFormat.format(b_pressure) + "");
+        result.put("outer_diameter", hisFormat.format(outer_diameter) + "");
+        result.put("length", hisFormat.format(length) + "");
+        result.put("wall_thickness", hisFormat.format(wall_thickness) + "");
+        result.put("color", color + "");
+        result.put("jackup_num", jackup_num + "");
+        result.put("strap_number", strap_number + "");
+        result.put("start", start + "");
+        result.put("stop", stop + "");
+        result.put("main_convey1", main_convey1 + "");
+        result.put("main_convey1_seat1", main_convey1_seat1 + "");
+        result.put("main_convey1_seat2", main_convey1_seat2 + "");
+        result.put("ink_jet", ink_jet + "");
+        result.put("ink_jet_seat1", ink_jet_seat1 + "");
+        result.put("ink_jet_seat2", ink_jet_seat2 + "");
+        result.put("ink_jet_seat3", ink_jet_seat3 + "");
+        result.put("main_convey2", main_convey2 + "");
+        result.put("main_convey2_seat1", main_convey2_seat1 + "");
+        result.put("main_convey3_has_pass", main_convey3_has_pass + "");
+        result.put("main_convey3_has_noPass", main_convey3_has_noPass + "");
+        result.put("main_convey3_seat1", main_convey3_seat1 + "");
+        result.put("main_convey3_seat2", main_convey3_seat2 + "");
+        result.put("cowl_a_cache", cowl_a_cache + "");
+        result.put("cowl_a_cache_seat1", cowl_a_cache_seat1 + "");
+        result.put("cowl_a_cache_seat2", cowl_a_cache_seat2 + "");
+        result.put("cowl_a_cowl", cowl_a_cowl + "");
+        result.put("cowl_a_cowl_seat1", cowl_a_cowl_seat1 + "");
+        result.put("cowl_a_cowl_seat2", cowl_a_cowl_seat2 + "");
+        result.put("cowl_a_cowl_pass", cowl_a_cowl_pass + "");
+        result.put("reverse_convey", reverse_convey + "");
+        result.put("reverse_convey_seat1", reverse_convey_seat1 + "");
+        result.put("reverse_convey_seat2", reverse_convey_seat2 + "");
+        result.put("reverse_convey_seat3", reverse_convey_seat3 + "");
+        result.put("reverse_convey_pass", reverse_convey_pass + "");
+        result.put("cowl_b_cache", cowl_b_cache + "");
+        result.put("cowl_b_cache_seat1", cowl_b_cache_seat1 + "");
+        result.put("cowl_b_cache_seat2", cowl_b_cache_seat2 + "");
+        result.put("cowl_b_cache_pass", cowl_b_cache_pass + "");
+        result.put("cowl_b_cowl", cowl_b_cowl + "");
+        result.put("cowl_b_cowl_seat1", cowl_b_cowl_seat1 + "");
+        result.put("cowl_b_cowl_seat2", cowl_b_cowl_seat2 + "");
+        result.put("cowl_b_cowl_aPass", cowl_b_cowl_aPass + "");
+        result.put("cowl_b_cowl_bPass", cowl_b_cowl_bPass + "");
+        result.put("no_pass_convey_cache_num", no_pass_convey_cache_num + "");
+        result.put("wrap_ago", wrap_ago + "");
+        result.put("wrap_ago_seat1", wrap_ago_seat1 + "");
+        result.put("wrap_ago_seat2", wrap_ago_seat2 + "");
+        result.put("wrap_after", wrap_after + "");
+        result.put("wrap_after_seat1", wrap_after_seat1 + "");
+        result.put("wrap_after_seat2", wrap_after_seat2 + "");
+        result.put("strapping_current_step", strapping_current_step + "");
+        result.put("strapping_seat1", strapping_seat1 + "");
+        result.put("strapping_seat2", strapping_seat2 + "");
+        result.put("strapping_seat3", strapping_seat3 + "");
+        result.put("strapping_seat4", strapping_seat4 + "");
+        result.put("strapping_seat5", strapping_seat5 + "");
+        result.put("strapping_seat6", strapping_seat6 + "");
+        result.put("strapping_seat7", strapping_seat7 + "");
+        result.put("strapping_seat8", strapping_seat8 + "");
+        result.put("strapping_seat9", strapping_seat9 + "");
+        result.put("strapping_seat10", strapping_seat10 + "");
+        result.put("strapping_seat11", strapping_seat11 + "");
+        result.put("strapping_seat12", strapping_seat12 + "");
+        result.put("a_error1_clear", a_error1_clear + "");
+        result.put("b_error1_clear", b_error1_clear + "");
+        result.put("a_error2_clear", a_error2_clear + "");
+        result.put("b_error2_clear", b_error2_clear + "");
+        result.put("wrap_control", wrap_control + "");
+        result.put("strapping_finish", strapping_finish + "");
+        result.put("error_clear", error_clear + "");
+        result.put("motor_frequency_setting", hisFormat.format(motor_frequency_setting) + "");
+        result.put("nip_setting", hisFormat.format(nip_setting) + "");
+        result.put("cowl_pass_jacking_need_num", cowl_pass_jacking_need_num + "");
+        result.put("cowl_pass_jacking_has_num", cowl_pass_jacking_has_num + "");
+        resp.put("result", result);
+        return resp;
+        //  }
+        // resp.put("code","0");
+        //  resp.put("desc","查询失败");
+        //   return resp;
     }
 }