| | |
| | | </div> |
| | | <div style="display:flex;justify-content: space-around;width: 95%;margin: 0 auto;"> |
| | | <el-button type="primary" @click="showform(1)" :disabled="SoftEmergencyStopState" |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''"> |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''" style="z-index: 999;"> |
| | | {{ $t('Import order') }}</el-button> |
| | | |
| | | <el-button type="primary" @click="showform(2)" :disabled="SoftEmergencyStopState" |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''"> |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''" style="z-index: 999;"> |
| | | {{ $t('Measure') }}</el-button> |
| | | |
| | | <el-button type="primary" @click="showform(3)" :disabled="SoftEmergencyStopState" |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''"> |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''" style="z-index: 999;"> |
| | | {{ $t('StorageCage') }}</el-button> |
| | | <el-button type="primary" @click="showform(4)" :disabled="SoftEmergencyStopState" |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''"> |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''" style="z-index: 999;"> |
| | | {{ $t('Task queue') }}</el-button> |
| | | </div> |
| | | <div style="display: flex;align-items: center;"> |
| | |
| | | double width = 402; |
| | | double height = 402; |
| | | |
| | | //获取匹配设置 |
| | | //匹配 |
| | | if ("1".equals(PlcRequest)) { |
| | | List<GlassInfo> Result=HomeService.NormalGlassInfo(width, height, "1"); |
| | | if(Result.size()==1){ |
| | | //匹配成功 就一种类型 添加数据 |
| | | GlassInfo GlassInfo=Result.get(0); |
| | | QueueMapper.insert(GlassInfo.getGlassid(),width,height,1); |
| | | System.out.println("匹配成功"); |
| | | //S7control.getinstance().WriteWord(plcmes.getPlcParameter("GaToMES").getAddress(), (short) 1); |
| | | System.out.println(GlassInfo.getGlassid()); |
| | | }else if(Result.size()>1){ |
| | | //匹配失败 匹配到多条符合的数据 添加数据 |
| | | QueueMapper.insert(null,width,height,2); |
| | | System.out.println("匹配失败"); |
| | | } |
| | | else{ |
| | | //匹配失败 未找到符合的数据 添加数据 |
| | | QueueMapper.insert(null,width,height,3); |
| | | System.out.println("未找到符合的数据"); |
| | | } |
| | | |
| | | boolean Result=HomeService.Normal(width, height, "1"); |
| | | } |
| | | // String E01id = new String( S7controlLK.getinstance().ReadByte("DB17.0",16)); |
| | | // String J01id = new String( S7controlLK.getinstance().ReadByte("DB17.22",14)); |
| | |
| | | private Double thickness;// 厚 |
| | | private Integer number;// 数量 |
| | | private Integer finishnumber;// 完成数量 |
| | | private Integer measurenumber;// 测量完成数量 |
| | | } |
| | |
| | | private Double thickness;// 厚 |
| | | private Integer number;// 数量 |
| | | private Integer finishnumber;// 完成数量 |
| | | private Integer measurenumber;// 测量完成数量 |
| | | } |
| | |
| | | @Repository |
| | | public interface GlassInfoMapper extends BaseMapper<GlassInfo> { |
| | | |
| | | @Select("SELECT * FROM glassinfo where width<=#{maxwidth} and width>=#{minwidth} and height<=#{maxheight} and height>=#{minheight}") |
| | | @Select("SELECT * FROM glassinfo where width<=#{maxwidth} and width>=#{minwidth} and height<=#{maxheight} and height>=#{minheight} and measurenumber<number") |
| | | List<GlassInfo> selectGlassInfos(@Param("maxwidth") double maxwidth, @Param("minwidth") double minwidth, @Param("maxheight") double maxheight, @Param("minheight") double minheight); |
| | | |
| | | // @Select("SELECT COUNT(*) FROM role_permission WHERE role_id = #{roleId} AND permission_id = #{permissionId}") |
| | | // boolean checkExists(@Param("roleId") int roleId, @Param("permissionId") int permissionId); |
| | | |
| | | |
| | | // @Update("UPDATE role_permission SET state = #{state} WHERE role_id = #{roleId} AND permission_id = #{permissionId}") |
| | | // void updateState(@Param("roleId") int roleId, @Param("permissionId") int permissionId, @Param("state") int state); |
| | | @Update("UPDATE glassinfo SET measurenumber = measurenumber+1 WHERE id = #{id}") |
| | | void updatemeasurenumber(@Param("id") int roleId); |
| | | |
| | | // @Insert("INSERT INTO role_permission (role_id, permission_id, state) VALUES (#{roleId}, #{permissionId}, #{state})") |
| | | // void insert(@Param("roleId") int roleId, @Param("permissionId") int permissionId, @Param("state") int state); |
| | |
| | | return Results; |
| | | } |
| | | |
| | | // 匹配逻辑 |
| | | public boolean Normal(double width, double height, String line) { |
| | | List<GlassInfo> Result = NormalGlassInfo(width, height, "1"); |
| | | if (Result.size() == 1) { |
| | | // 匹配成功 就一种类型 添加数据 |
| | | GlassInfo GlassInfo = Result.get(0); |
| | | QueueMapper.insert(GlassInfo.getGlassid(), width, height, 1); |
| | | GlassInfoMapper.updatemeasurenumber(GlassInfo.getId()); |
| | | System.out.println("匹配成功"); |
| | | |
| | | // S7control.getinstance().WriteWord(plcmes.getPlcParameter("GaToMES").getAddress(), |
| | | // (short) 1); |
| | | System.out.println(GlassInfo.getGlassid()); |
| | | return true; |
| | | } else if (Result.size() > 1) { |
| | | // 匹配失败 匹配到多条符合的数据 添加数据 |
| | | QueueMapper.insert(null, width, height, 2); |
| | | System.out.println("匹配失败"); |
| | | return false; |
| | | } else { |
| | | // 匹配失败 未找到符合的数据 添加数据 |
| | | QueueMapper.insert(null, width, height, 3); |
| | | System.out.println("未找到符合的数据"); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //Execl表格 传入文件路径 |
| | | public List ReadExecl(String filename) { |
| | | try { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |