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
| | |
| | | // 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; |
| | |
| | | |
| | | |
| | | |
| | | 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) { |
| | |
| | | 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;// 状态 |
| | | |
| | | |
| | | } |
| | |
| | | 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;// 完成数量 |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | private Integer number; |
| | | |
| | | } |
| | | } |
| | |
| | | package com.example.springboot.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | //报警信息表 |
| | | public class alarmmg { |
| | | private Integer id;//自增id |
New file |
| | |
| | | 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;// 状态 |
| | | |
| | | |
| | | } |
New file |
| | |
| | | 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;// 完成数量 |
| | | |
| | | } |
New file |
| | |
| | | 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(); |
| | | |
| | | |
| | | } |
| | |
| | | private SpianMapper spianMapper; |
| | | |
| | | // @GetMapping("/all") |
| | | public Short selectAll(String glassid) { |
| | | public Short selectAll(String glassid) { |
| | | //读取DB105区文件 |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | //读106 |
New file |
| | |
| | | { |
| | | "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" |
| | | } |
| | | |
| | | |
| | | ] |
| | | } |