ZengTao
2024-04-10 73033f1d691ef89f39b175ffb96f800076975d5c
Merge branch 'master' of http://10.153.19.25:10101/r/Albania_Mes

# Conflicts:
# Albania_Mes-ui/src/views/home/index.vue
10个文件已修改
85 ■■■■■ 已修改文件
Albania_Mes-ui/src/lang/locales/en-US.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Albania_Mes-ui/src/lang/locales/zh-CN.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Albania_Mes-ui/src/views/Electrical/Sign.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Albania_Mes-ui/src/views/home/index.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcAlbaniaServo.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/resources/application.properties 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/resources/config.properties 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Albania_Mes-ui/src/lang/locales/en-US.json
@@ -42,7 +42,7 @@
  "Clear":"Clear",
  "ip":"localhost",
  "ip":"192.168.10.97",
  "systemTitle": "Login System",
  "usernamePlaceholder": "Please enter username",
  "passwordPlaceholder": "Please enter password",
Albania_Mes-ui/src/lang/locales/zh-CN.json
@@ -40,7 +40,7 @@
  "Thickness":"厚度",
  "Clear":"清除",
  "ip":"localhost",
  "ip":"192.168.10.97",
  "systemTitle": "登录系统",
  "usernamePlaceholder": "请输入用户名",
  "passwordPlaceholder": "请输入密码",
Albania_Mes-ui/src/views/Electrical/Sign.vue
@@ -78,8 +78,6 @@
 },
  methods: {
    showdata () {
      console.log(1111);
      console.log(this.jsonData.sign[0].name);
      // console.log(this.record.xyData);
    },
@@ -128,7 +126,6 @@
          this.record.params[0] = obj.sig[0];
          this.record.xyData = this.jsonData.sign;
          console.log(this.jsonData.sign)
          for (let a = 0; a < this.record.xyData.length; a++) {
            this.record.xyData[a].value = this.record.params[0][a];
@@ -164,12 +161,12 @@
    //语言转换
    replaceChineseWithEnglish () {
      const translation = this.$t('Signlang');
      // const translation = this.$t('Signlang');
      if (translation != null) {
        this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value,unit:item.unit }; });
        //console.log(translation);
      }
      // if (translation != null) {
      //   this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value,unit:item.unit }; });
      //   //console.log(translation);
      // }
    }
  }
Albania_Mes-ui/src/views/home/index.vue
@@ -488,13 +488,12 @@
                <!--显示-->
                <div style="width:1000px;height: 720px;border: 2px solid #d1d1d1;float: left;">
                    <!--玻璃图  #81b337-->
                    <div :style="'top:10px;bottom: 10px;left: 10px;right: 10px;margin:'+((1000-(this.LastQueue.glasswidth / 25 * 7))/2)+'px auto;'+
                        'width:'+ (this.LastQueue.glasswidth / 25 * 7) + 'px;'+
                        'height:'+ (this.LastQueue.glassheight / 25 * 7) + 'px;'+
                        'line-height: '+ (this.LastQueue.glassheight / 25 * 7) + 'px;'+
                        'background-color: '+ (this.LastQueue.state>0?'#4CCCE4':(this.LastQueue.state==0?'#E4CA4C':'#E4CA4C'))+
                        ';text-align: center;'">
                        {{ this.LastQueue.glasswidth!=null?(this.LastQueue.glasswidth+"*"+this.LastQueue.glassheight):"" }}
                    <div :style="'top:10px;bottom: 10px;left: 10px;right: 10px;margin:'+((720-(this.LastQueue.glassheight / 25 * 7))/2)+'px auto;width:'
                        + (this.LastQueue.glasswidth / 25 * 7) + 'px;height:'
                        + (this.LastQueue.glassheight / 25 * 7) + 'px;line-height: '
                        + (this.LastQueue.glassheight / 25 * 7) + 'px; background-color: '
                        + (this.LastQueue.state>0?'#4CCCE4':(this.LastQueue.state==0?'#E4CA4C':'#E4CA4C'))+';text-align: center;'">
                        {{ (this.LastQueue.glasswidth+this.LastQueue.glassheight)!=0?(this.LastQueue.glasswidth+"*"+this.LastQueue.glassheight):"" }}
                    </div>
                </div>
springboot-vue3/src/main/java/com/example/springboot/component/PlcAlbaniaServo.java
@@ -2,10 +2,8 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import org.apache.commons.io.FileUtils;
import java.io.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -13,7 +11,7 @@
public class PlcAlbaniaServo extends Thread {
    private Configuration config;
    public PlcAlbaniaServo() throws IOException {
    public  PlcAlbaniaServo() throws IOException {
        config = new Configuration("config.properties");
    }
springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
@@ -88,7 +88,6 @@
      // 根据地址读取PCL数据
      List<Boolean> plclist = S7control.getinstance().ReadBits("DB15.0.0", Plccount);
//      List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount);
      System.out.println(plclist);
      // Boolean[] values = { false, false, true, false, true, false, true, false,
      // true, false, true, false, true, false,
      // true, false, true, false, true, false, true, false, true, false, true, false,
@@ -128,10 +127,6 @@
            alarmMapper = WebSocketServer.applicationContext.getBean(AlarmMapper.class);
            for (short i = 0; i < array1.length; i++) {
              // 查询对应报警信息结束时间为null的条数
              if(i==48){
                short result = alarmMapper.selectnullti(array1[i]);
                System.out.println(result+"-"+array1[i]);
              }
              short result = alarmMapper.selectnullti(array1[i]);
              // 读取到PLC的值为1并且对应报警信息结束时间为null的条数的条数为0
    //System.out.println(result);
springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java
@@ -17,6 +17,11 @@
  // 用于存储应用程序的配置信息
  private Configuration config;
    public Plcsign() throws IOException {
        config = new Configuration("config.properties");
    }
  String name = "";
  Integer count = 0;
@@ -63,33 +68,16 @@
  public void run() {
    while (this != null) {
      try {
        Thread.sleep(1000);
        Thread.sleep(100);
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
//      this.readValue();
//      String PlcAddress = this.name;
//      Integer Plccount = this.count;
      // System.out.println(PlcAddress);
//      List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount);
      //  List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.0.0", 112);
       List<String> addressList21 = Arrays.asList(config.getProperty("PlcIO.State").split(","));
       List<Boolean> plclist = S7control.getinstance().readBits(addressList21);
       List<String> addressListName = Arrays.asList(config.getProperty("PlcIO.Name").split(","));
//       Boolean[] values = { true, true, true, true, true, false, true, false,
//       true, false, true, false, true, false,
//       true, false, true, false, true, false, true, false, true, false, true, false,
//       true, false, true, false, true,
//       false, true, false, true, false,
//       true, false, true, false, true, false, true, false, null,
//       true, false,
//       true, false, true, false, true, false,
//       true, false, true, false, true, };
//       List<Boolean> plclist = new ArrayList<>(Arrays.asList(values));
      //  System.out.println("急停"+S7control.getinstance().ReadBits("DB10.0.5", 1));
      if (plclist != null) {
        // 将获取的布尔类型转换为整数类型
        List<Integer> Intlist = new ArrayList<>();
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -17,12 +17,12 @@
        //
        System.out.println("启动完成");
        // new Plcalarm().start();
        // new PLCAutoMes().start();
        //  new PlcHoldNew().start();
         new Plchome().start();
        // new PlcAlbaniaServo().start();
        // new Plcsign().start();
        new Plcalarm().start();
        new PLCAutoMes().start();
        new PlcHoldNew().start();
        new Plchome().start();
        new PlcAlbaniaServo().start();
        new Plcsign().start();
       
    }
springboot-vue3/src/main/resources/application.properties
@@ -6,8 +6,8 @@
#\u6570\u636E\u5E93\u9A71\u52A8
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#\u6570\u636E\u5E93\u8FDE\u63A5\u5730\u5740
#spring.datasource.url=jdbc:mysql://localhost:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
spring.datasource.url=jdbc:mysql://10.153.19.150:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
spring.datasource.url=jdbc:mysql://localhost:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
#spring.datasource.url=jdbc:mysql://10.153.19.150:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
#\u6570\u636E\u5E93\u7528\u6237\u540D
spring.datasource.username=root
#\u6570\u636E\u5E93\u7528\u6237\u5BC6\u7801  
springboot-vue3/src/main/resources/config.properties
@@ -225,7 +225,7 @@
#IO状态
PlcIO.State=DB10.2.1,DB10.2.2,DB10.2.5,DB10.10.6,DB10.11.1,DB10.11.2,DB10.11.3,DB10.11.4,DB10.11.5,DB10.11.6,DB10.12.1,DB10.12.3,DB10.10.0,DB10.10.2,DB10.10.3,DB10.10.5,DB10.26.6,DB10.30.4,DB10.33.0,DB10.30.5,DB10.33.1,DB10.30.0,DB10.30.1,DB10.30.2,DB10.30.3,DB10.32.4,DB10.32.5,DB10.32.6,DB10.32.7,DB10.32.0,DB10.32.1,DB10.32.2,DB10.32.3,DB10.27.7,DB10.24.6,DB10.38.4,DB10.41.0,DB10.38.5,DB10.41.1,DB10.35.7,DB10.38.0,DB10.38.1,DB10.38.2,DB10.38.3,DB10.40.4,DB10.40.5,DB10.40.6,DB10.40.7,DB10.40.0,DB10.40.1,DB10.40.2,DB10.40.3,DB10.0.0,DB10.0.1,DB10.0.5,DB10.0.2,DB10.0.7,DB10.0.3,DB10.28.0,DB10.36.0,DB10.1.0,DB10.18.2,DB10.18.4,DB10.19.7,DB10.18.3,DB10.18.5,DB10.20.0,DB10.18.6,DB10.19.5,DB10.19.6
PLCIO.Name=A01Sr.Low-E,A01Sr.dec,A01Sr.Pos,A02Sr.YZero,A02Sr.YH1,A02Sr.YH2,A02Sr.YH3,A02Sr.YH4,A02Sr.LimitTop,A02Sr.LimiBottom,A02Sr.Check,A02Sr.YDec,A02Sr.Xin,A02Sr.XCheck,A02Sr.XDec,A02Sr.XPos,C01Sr.Zero,C01YV1.Bas1,C01YV1.Work1,C01.YV1.Bas2,C01.YV1.Work2,C01.YV2.Bas1,C01.YV2.Bas2,C01.YV2.Bas3,C01.YV2.Bas4,C01.YV2.Work1,C01.YV2.Work2,C01.YV2.Work3,C01.YV2.Work4,C01.YV.Blow1,C01.YV.Blow2,C01.YV.Blow3,C01.YV.Blow4,C01.SR.Limit1,C02.Sr.Zero,C02.YV1.Bas1,C02.YV1.Work1,C02.YV1.Bas2,C02.YV1.Work2,C02.Sr.limit1,C02.YV2.Bas1,C02.YV2.Bas2,C02.YV2.Bas3,C02.YV2.Bas4,C02.YV2.Work1,C02.YV2.Work2,C02.YV2.Work3,C02.YV2.Work4,C02.YV.Blow1,C02.YV.Blow2,C02.YV.Blow3,C02.YV.Blow4,bStart,bStop,bEstop,bReset,bAuto/Manual,bPause,C01.Sr.Limit2,C02.Sr.Limit2,A01.FootControl,B01.Sr.DecLeft,B01.Sr.PosLeft,B01.Sr.SafetyLeft,B01.Sr.DecRight,B01.Sr.PosRight,B01.Sr.SafetyRight,B01.Sr.TurnZero,B01.Sr.TurnLimitTop,B01.Sr.TurnLimitBottom
PlcIO.Name=A01Sr.Low-E,A01Sr.dec,A01Sr.Pos,A02Sr.YZero,A02Sr.YH1,A02Sr.YH2,A02Sr.YH3,A02Sr.YH4,A02Sr.LimitTop,A02Sr.LimiBottom,A02Sr.Check,A02Sr.YDec,A02Sr.Xin,A02Sr.XCheck,A02Sr.XDec,A02Sr.XPos,C01Sr.Zero,C01YV1.Bas1,C01YV1.Work1,C01.YV1.Bas2,C01.YV1.Work2,C01.YV2.Bas1,C01.YV2.Bas2,C01.YV2.Bas3,C01.YV2.Bas4,C01.YV2.Work1,C01.YV2.Work2,C01.YV2.Work3,C01.YV2.Work4,C01.YV.Blow1,C01.YV.Blow2,C01.YV.Blow3,C01.YV.Blow4,C01.SR.Limit1,C02.Sr.Zero,C02.YV1.Bas1,C02.YV1.Work1,C02.YV1.Bas2,C02.YV1.Work2,C02.Sr.limit1,C02.YV2.Bas1,C02.YV2.Bas2,C02.YV2.Bas3,C02.YV2.Bas4,C02.YV2.Work1,C02.YV2.Work2,C02.YV2.Work3,C02.YV2.Work4,C02.YV.Blow1,C02.YV.Blow2,C02.YV.Blow3,C02.YV.Blow4,bStart,bStop,bEstop,bReset,bAuto/Manual,bPause,C01.Sr.Limit2,C02.Sr.Limit2,A01.FootControl,B01.Sr.DecLeft,B01.Sr.PosLeft,B01.Sr.SafetyLeft,B01.Sr.DecRight,B01.Sr.PosRight,B01.Sr.SafetyRight,B01.Sr.TurnZero,B01.Sr.TurnLimitTop,B01.Sr.TurnLimitBottom
#A01参数
PlcA01.param=DB10.1664,DB10.1668,DB10.1672,DB10.1676,DB10.1680