소스 검색

搅拌焊参数

day01-init 1 일 전
부모
커밋
39b7f8cc31
4개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 1 1
      src/com/mes/ui/DataUtil.java
  2. 3 3
      src/com/mes/ui/MesClient.java
  3. 3 3
      src/com/mes/util/Test.java
  4. 1 1
      src/resources/config/config.properties

+ 1 - 1
src/com/mes/ui/DataUtil.java

@@ -340,7 +340,7 @@ public class DataUtil {
             BufferedReader br = new BufferedReader(new InputStreamReader(is, enconding));
             pro.load(br);
             String mes_server_ip = pro.getProperty("mes.server_ip");
-            String url = "http://"+mes_server_ip+":8980/js/a/mes/mesDeviceParam/batchsave";
+            String url = "http://"+mes_server_ip+":8980/js/a/mes/mesProductFsw/batchsave";
             String params = "__ajax=json&params="+upparams;
             System.out.println("params="+params);
             String result = doPost(url,params);

+ 3 - 3
src/com/mes/ui/MesClient.java

@@ -191,6 +191,7 @@ public class MesClient extends JFrame {
 
                     getMaterailData();
 
+                    startUpDeviceParamsTimer();
 //                    startUpdateQualityTimer();
 
 //                    S7Util.sendStartSignal(true);
@@ -335,7 +336,7 @@ public class MesClient extends JFrame {
                         final String currentSn = product_sn.getText();
                         if(currentSn != null && !currentSn.isEmpty()) {
                             String record_time = DateLocalUtils.getCurrentTime();
-                            deviceParams.add(actSpindleSpeed + "|" + feedRate + "|" + record_time);
+                            deviceParams.add(actSpindleSpeed + "|" + feedRate + "|" + torque + "|" + record_time);
                             if(deviceParams.size() == 60) {
                                 try {
                                     JdbcUtils.insertDeviceParamData(mes_gw, mes_line_sn, currentSn, JSON.toJSONString(deviceParams));
@@ -578,7 +579,7 @@ public class MesClient extends JFrame {
             //刷新界面
             mesClientFrame.repaint();
 
-            if(!tcp_connect_flag) {
+            if(!tcp_connect_flag) {
                 MesClient.setMenuStatus("设备未连接Mes服务器",-1);
 //                JOptionPane.showMessageDialog(mesClientFrame,"设备未连接Mes服务器","提示窗口", JOptionPane.INFORMATION_MESSAGE);
                 return;
@@ -590,7 +591,6 @@ public class MesClient extends JFrame {
                 MesClient.setMenuStatus("请扫正确的工装二维码",-1);
                 return;
             }
-
             // 查询工件质量
             Boolean sendret = DataUtil.checkQuality(nettyClient,barcode36,user20);
             if(!sendret){

+ 3 - 3
src/com/mes/util/Test.java

@@ -25,9 +25,9 @@ public class Test {
 //        Map<String, Boolean> stringBooleanMap2 = readBits();
 //        System.out.println(stringBooleanMap2);
         System.out.println("读取主轴转速:"+S7Util.readActSpindleSpeed(s7PLC));
-        System.out.println("读取进给速度:"+S7Util.readFeedRate(s7PLC));
-        System.out.println("读取X位移:"+S7Util.readXPosition(s7PLC));
-        System.out.println("读取y位移:"+S7Util.readYPosition(s7PLC));
+//        System.out.println("读取进给速度:"+S7Util.readFeedRate(s7PLC));
+//        System.out.println("读取X位移:"+S7Util.readXPosition(s7PLC));
+//        System.out.println("读取y位移:"+S7Util.readYPosition(s7PLC));
 
 
     }

+ 1 - 1
src/resources/config/config.properties

@@ -1,4 +1,4 @@
-mes.gw=OP280B
+/mes.gw=OP280A*******
 #mes.server_ip=127.0.0.1
 mes.server_ip=192.168.18.99
 mes.tcp_port=3000