| | |
| | | byteStream.reset(); |
| | | |
| | | //AnnotationProcessor processor = annoProcessHelper.getProcessor(machine.getControlSystem()); |
| | | String lgLine = FileContentUtil.readLineAt(byteStream,annoProps.getDeviationLineIndex()); |
| | | String textWithoutAnno = AnnotationUtil.removeAnnotation(machine.getControlSystem(),lgLine,programAnnotationService.getAnnotionDictList()); |
| | | String[] strArr = Func.split(textWithoutAnno,":");//临时更改单是冒号分隔,后面是单号 |
| | | |
| | | String planStatusLine = AnnotationUtil.removeAnnotation(machine.getControlSystem(),FileContentUtil.readLineAt(byteStream,annoProps.getStatusLineIndex()),programAnnotationService.getAnnotionDictList()); |
| | | |
| | | String lgNo;//更改单号 |
| | | if(AnnotationUtil.LG.equals(planStatusLine)) {//是更改单 |
| | | String lgLine = FileContentUtil.readLineAt(byteStream, annoProps.getDeviationLineIndex()); |
| | | lgNo = AnnotationUtil.removeAnnotation(machine.getControlSystem(), lgLine, programAnnotationService.getAnnotionDictList()); |
| | | }else{ |
| | | lgNo = null; |
| | | } |
| | | |
| | | long progOnMachineCount = programOnMachineService.lambdaQuery() |
| | | .eq(ProgramOnMachine::getDrawingNo,progNameVO.getDrawingNo()) |
| | | .eq(ProgramOnMachine::getProcessNo,progNameVO.getProcessNo()) |
| | | .eq(ProgramOnMachine::getProcessEdition,progNameVO.getProcessEdition()) |
| | | .eq(strArr.length==2,ProgramOnMachine::getDeviation,strArr[1])//临时更改单匹配 |
| | | .eq(lgNo != null,ProgramOnMachine::getDeviation,lgNo)//临时更改单匹配 |
| | | |
| | | .eq(ProgramOnMachine::getMachineCode,machineFile.getMachineCode()).count(); |
| | | |