ZengTao
2024-03-07 4931e26b417299dff0e23f1bfa4915b323922b4c
Merge branch 'master' of http://10.153.19.25:10101/r/Albania_Mes

# Conflicts:
# springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java
6个文件已修改
4个文件已添加
267 ■■■■■ 已修改文件
springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/FlowCard.java 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/GlassInfo.java 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/flowcard.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/glassinfo.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/resources/JsonFile/Albania.json 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java
@@ -36,7 +36,6 @@
      // if (S7control.getinstance().CheckConnected() == false) {
      spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
      spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
      jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
      //读取DB105区文件
      PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
@@ -49,7 +48,7 @@
      
     
      S7control.getinstance().WriteWord( plcmes.getPlcParameter("1231").getAddress(plcmes.getPlcParameter("1231").getAddressIndex()), (short) 0);
      //S7control.getinstance().WriteWord( plcmes.getPlcParameter("1231").getAddress(plcmes.getPlcParameter("1231").getAddressIndex()), (short) 0);
      // 出片任务
      
      if (OutActivate.equals("1") == false&&OutRequest.equals("1")==true) {
springboot-vue3/src/main/java/com/example/springboot/entity/FlowCard.java
@@ -1,43 +1,19 @@
package com.example.springboot.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
 * 流程卡表
 */
@Data
@TableName("flowcard")
public class FlowCard {
    /**
     * 主键,自动生成
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 流程卡
     */
    private String flowcard;
    /**
     * 总层数
     */
    private Integer totaltier;
    /**
     * 玻璃数量
     */
    private Integer number;
    /**
     * 任务线路
     */
    private Integer line;
    /**
     * 状态
     */
    private Integer state;
@TableName("`flowcard`")
public class flowcard {
  private Integer id;// 自增id
  private String flowcard;// 流程卡id
  private Integer number;// 玻璃数量
  private Integer line;// 任务路线
  private Integer state;// 状态
}
springboot-vue3/src/main/java/com/example/springboot/entity/GlassInfo.java
@@ -1,69 +1,25 @@
package com.example.springboot.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
 * 玻璃表
 */
@Data
@TableName("glassinfo")
public class GlassInfo {
    /**
     * 主键,自动生成
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 流程卡id
     */
    private Integer flowcard;
    /**
     * 玻璃类型
     */
    private Integer glasstype;
    /**
     * 配片id
     */
    private Integer mateid;
    /**
     * 玻璃id
     */
    private String glassid;
    /**
     * 层
     */
    private Integer tier;
    /**
     * 膜系
     */
    private String films;
    /**
     * 宽
     */
    private Double width;
    /**
     * 高
     */
    private Double height;
    /**
     * 厚度
     */
    private Double thickness;
    /**
     * 数量
     */
    private Integer number;
    /**
     * 完成数量
     */
    private Integer finishnumber;
@TableName("`glassinfo`")
public class glassinfo {
  private Integer id;// 自增id
  private String flowcard;// 流程卡id
  private Integer glasstype;// 玻璃类型
  private Integer mateid;// 配片id
  private Integer glassid;// 玻璃id
  private Integer tier;// 层
  private String films;// 膜系
  private Double width;// 宽
  private Double height;// 高
  private String thickness;// 厚
  private Integer number;// 数量
  private Integer finishnumber;// 完成数量
}
springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java
@@ -85,4 +85,4 @@
     */
    private Integer number;
}
}
springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java
@@ -1,6 +1,7 @@
package com.example.springboot.entity;
import java.util.Date;
//报警信息表
public class alarmmg {
  private Integer id;//自增id
springboot-vue3/src/main/java/com/example/springboot/entity/flowcard.java
New file
@@ -0,0 +1,19 @@
package com.example.springboot.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName("`flowcard`")
public class flowcard {
  private Integer id;// 自增id
  private String flowcard;// 流程卡id
  private Integer number;// 玻璃数量
  private Integer line;// 任务路线
  private Integer state;// 状态
}
springboot-vue3/src/main/java/com/example/springboot/entity/glassinfo.java
New file
@@ -0,0 +1,25 @@
package com.example.springboot.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName("`glassinfo`")
public class glassinfo {
  private Integer id;// 自增id
  private String flowcard;// 流程卡id
  private Integer glasstype;// 玻璃类型
  private Integer mateid;// 配片id
  private Integer glassid;// 玻璃id
  private Integer tier;// 层
  private String films;// 膜系
  private Double width;// 宽
  private Double height;// 高
  private String thickness;// 厚
  private Integer number;// 数量
  private Integer finishnumber;// 完成数量
}
springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java
New file
@@ -0,0 +1,44 @@
package com.example.springboot.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.north_glass_buffer1;
@Mapper
@Repository
public interface AlbaniaMapper  {
    // 获取判断该格子是否需要把外片推入内片位置
    @Select("select state from storage_cage where  cage=#{cage} and cell=#{cell} and tier=1;")
    int selectcell(int cage, int cell);
     // 判断该笼子是否有合适宽度空格
    @Select("select cage,cell,tier,id,ROUND(id/2)as prcId,width from storage_cage where cage=#{cage1} and cell=#{cell} and state=0 and disabled=0 and width>=#{width} ORDER BY cell asc,tier asc LIMIT 1")
    StorageCage selectCage1(int cage1, int cell, double width);
    // 判断笼子内玻璃数
    @Select("select COUNT(tier)as tier from storage_cage where  cage=#{cage} and cell=#{cell} and state!=0 and state!=3;")
    int selectsum(int cage, int cell);
    // 完成出片中的玻璃状态
    @Update("update storage_cage set state=#{state} where glass_id=#{glassid} and state=3;")
    void UpdateCageOver(String glassid, int state);
    // 完成进片中的玻璃状态
    @Update("update storage_cage set state=#{state} where glass_id=#{glassid} and state=2;")
    void UpdateCageadd(String glassid, int state);
    //查询是否有该类型的任务还未完成
     // 判断出片为1时,是否可直接出片
    @Select("select COUNT(state) from storage_cage where state=#{state}")
    int SelectCageState(int state);
    // 获取玻璃信息
    @Select("select *,ordernumber ,glasslength_mm as glasslengthmm,glassheight_mm as glassheightmm,barcode,listnumber,boxnumber,glasslength,glassheight,FrameBarcode from north_glass_buffer1 where barcode=#{glassid}")
    north_glass_buffer1 selectGlass(String glassid);
    //判断笼内是否有合适的类型空格
    @Select("select id from storage_cage where glasstype=#{glasstype} and width>=#{width}+#{widths} and state=0 order by id limit 1")
    int SelectCage(int glasstype,int width,int widths);
    //判断笼内没有玻璃的空格
    @Select("select id from storage_cage where state=0 and number=0 order by id limit 1")
    int SelectNewCell();
}
springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java
@@ -22,7 +22,7 @@
    private SpianMapper spianMapper;
   
    // @GetMapping("/all")
    public Short selectAll(String glassid) {
public Short selectAll(String glassid) {
 //读取DB105区文件
 PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
 //读106
springboot-vue3/src/main/resources/JsonFile/Albania.json
New file
@@ -0,0 +1,51 @@
{
   "plcAddressBegin":"DB17.0",
   "plcAddressLenght":"272",
   "dataType":"word",
   "parameteInfor":[
      {
         "codeId": "PLCToMesIn",
         "addressIndex":"0",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"m/min"
      },
      {
          "codeId": "PLCINID",
          "addressIndex":"16",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"m/min"
       },
       {
          "codeId": "InIdState",
          "addressIndex":"18",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"m/min"
       },
       {
          "codeId": "J01Quest",
          "addressIndex":"20",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "J01id",
          "addressIndex":"22",
          "addressLenght":"14",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "J01TurnGo",
          "addressIndex":"38",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       }
   ]
}