| | |
| | | }*/ |
| | | |
| | | progData.setProgramName(packageName); |
| | | String statusLine; |
| | | Optional<String> optFilename = fileEntryNameList.stream().filter(n -> n.startsWith(entryName)).findFirst(); |
| | | if(optFilename.isPresent()){ |
| | | entry = zipFile.getEntry(optFilename.get()); |
| | |
| | | progData.setFileBackTime(DateUtil.fromInstant(entry.getLastModifiedTime().toInstant())); |
| | | |
| | | AnnotationProperties defAnnoProperties =AnnotationProperties.getDefault(); |
| | | statusLine = FileContentUtil.readLineAt(bais,defAnnoProperties.getStatusLineIndex());//状态注释行 |
| | | String statusLine = FileContentUtil.readLineAt(bais,defAnnoProperties.getStatusLineIndex());//状态注释行 |
| | | bais.reset(); |
| | | String sendPathLine = FileContentUtil.readLineAt(bais,defAnnoProperties.getSendPathLineIndex());//状态注释行 |
| | | bais.reset(); |
| | | |
| | | |
| | | if(statusLine.contains("GH")){ |
| | | //固化,不应回传,忽略 |
| | | log.warn("状态{},不应回传,忽略",statusLine); |
| | | continue; |
| | | } |
| | | |
| | | Machine machine = this.machineService.getMachineBySendPathAnnotation(sendPathLine); |
| | | if(machine == null){ |
| | | throw new ServiceException("根据下发路径未找到程序对应的机床:"+sendPathLine); |
| | | } |
| | | |
| | | if(statusLine.contains("SQ")){ |
| | | //试切 |
| | | programPackageNode = ncNodeService.getLastEditionTryingProgramPackage(packageName);//TODO 还需根据机床组(如何获取?根据下发路径获取机床,进而获取),,processEdition |
| | | }else if(statusLine.contains("GH")){ |
| | | //TODO 固化,根本不需要回传,应该提示报错。或者不进入列表,或列表中不可选则入库 |
| | | programPackageNode = ncNodeService.getLastEditionCuredProgramPackage(packageName); |
| | | }else if(statusLine.contains("PL")){ |
| | | //偏离 |
| | | programPackageNode =ncNodeService.getLastEditionDeviationProgramPackage(packageName); |
| | |
| | | //TODO 现场编制的程序,打包时必须在文件中增加下发路径(加入后) |
| | | programPackageNode = ncNodeService.getLastEditionTryingProgramPackage(packageName); |
| | | if(programPackageNode!=null){ |
| | | Machine machine = machineService.getByCode(programPackageNode.getMachineCode()); |
| | | String chechuangVal = paramService.turninngValue(); |
| | | if(StringUtils.equals(machine.getMachineSpec(),chechuangVal)){ |
| | | //车床 |