| | |
| | | StorageCage cage; |
| | | String glassid=glassInfo.getGlassid(); |
| | | Double width=glassInfo.getWidth(); |
| | | //int mateid=glassInfo.getMateid(); |
| | | Double height=glassInfo.getHeight(); |
| | | String flowcard=glassInfo.getFlowcard(); |
| | | int glasstype=glassInfo.getGlasstype(); |
| | | //判断是否有同类型的 |
| | |
| | | if(cage!=null){ |
| | | //发送plc任务 |
| | | Mestast(glassid, 1001, cage.getId(), 1,"MESID1",1); |
| | | //任务发送字 |
| | | |
| | | }else{ |
| | | //判断玻璃是否进入大片笼 |
| | |
| | | cage=albaniaMapper.SelectNewCell(3,5); |
| | | }else{ |
| | | cage=albaniaMapper.SelectNewCell(0,5); |
| | | //发送plc任务 |
| | | } |
| | | //当返回的格子号为空时,返回400笼子已满 |
| | | if(cage!=null){ |
| | | albaniaMapper.AddCage(cage.getId(), glassid, cage.getGlassWidth(), cage.getGlassHeight(), cage.getGlassWidthMm(), cage.getGlassHeightMm(), 1, cage.getGlasstype(), 0); |
| | | albaniaMapper.AddCage(cage.getId(), glassid,width, height, cage.getGlassWidthMm(), cage.getGlassHeightMm(), 1, cage.getGlasstype(), 0); |
| | | Mestast(glassid,1001,cage.getId(),1,"MESID1",1); |
| | | albaniaMapper.UpdateStorage(cage.getGlassWidth(),cage.getGlassHeight(),cage.getId()); |
| | | //发送plc任务 |
| | | |
| | | albaniaMapper.UpdateStorage(width,height,cage.getId()); |
| | | albaniaMapper.UpdateQueueState(glassid); |
| | | }else{ |
| | | return(400); |
| | | } |
| | |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLC").getAddress(), (short)1);//出片任务启动 |
| | | return (200);//结束 |
| | | } |
| | | |
| | | //发送配片数据 |
| | | Mestast(glass.getGlassId(), glass.getId(),line, 0,"MESID"+i,i); |
| | | Mestast(glass.getGlassId(), glass.getId(),40, 0,"MESID"+i,i); |
| | | albaniaMapper.AddFinishNumber(glassmate.getFlowcard(), glassmate.getMateid(), glassmate.getTier()); |
| | | albaniaMapper.Inserttask(1, 0, glass.getId(), 2002, glassmate.getGlassid(), glassmate.getGlasstype(),glass.getFlowcard(),glassmate.getMateid(),glassmate.getTier()); |
| | | if(glassmate.getTier()==glassmate.getId()){//当配片数量等于成品小片总片数时 |