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(); |
| | | |
| | | |
| | | } |
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" |
| | | } |
| | | |
| | | |
| | | ] |
| | | } |