Merge branch 'master' of http://10.153.19.25:10101/r/Albania_Mes
# Conflicts:
# Albania_Mes-ui/src/views/home/index.vue
# springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
| | |
| | | </div> |
| | | <div style="display:flex;justify-content: space-around;width: 95%;margin: 0 auto;"> |
| | | <el-button type="primary" @click="showform(1)" :disabled="SoftEmergencyStopState" style="z-index: 999;" |
| | | :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" style="z-index: 999;" |
| | | :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" style="z-index: 999;" |
| | | :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" style="z-index: 999;" |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''"> |
| | | :class="SoftEmergencyStopState == true ? 'hide' : ''" style="z-index: 999;"> |
| | | {{ $t('Task queue') }}</el-button> |
| | | |
| | | </div> |
| | |
| | | |
| | | |
| | | |
| | | // String PlcRequest = "1"; |
| | | // double width = 0; |
| | | // double height = 0; |
| | | String PlcRequest = "1"; |
| | | 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("未找到符合的数据"); |
| | | // } |
| | | |
| | | // } |
| | | //匹配 |
| | | if ("1".equals(PlcRequest)) { |
| | | 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); |
| | |
| | | @Update("update flowcard set method=#{method} where flowcard=#{flowcard}") |
| | | void ModeChange(String flowcard, int method); |
| | | |
| | | @Update("update queue set flowcard=#{flowcard},glasswidth=#{width},glassheight=#{height},glasstype=#{glasstype} where state=0") |
| | | @Update("update queue set flowcard=#{flowcard},glasswidth=#{width},glassheight=#{height},glasstype=#{glasstype},state=1 where state=0") |
| | | void UpdateQueue(String flowcard,double width,double height,Integer glasstype); |
| | | |
| | | @Update("update glassinfo set finishnumber=finishnumber+1 where flowcard=#{flowcard} and mateid=#{mateid} and tier=#{geTier}") |
| | |
| | | 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 { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |