|
|
@ -16,9 +16,7 @@ public class CsmLargeBufferTubeManager { |
|
|
|
this.device = device; |
|
|
|
for ( int i=0; i<6; i++ ) { |
|
|
|
CsmLargeBufferTube tube = new CsmLargeBufferTube(this); |
|
|
|
tube.position = i; |
|
|
|
tube.index = i; |
|
|
|
tube.status = CsmLargeBufferTube.STATUS_NOT_LOADED; |
|
|
|
this.largeBufferTubes.add(tube); |
|
|
|
} |
|
|
|
} |
|
|
@ -50,12 +48,10 @@ public class CsmLargeBufferTubeManager { |
|
|
|
} |
|
|
|
|
|
|
|
CsmLargeBufferTube box = this.largeBufferTubes.get(index); |
|
|
|
box.projectName = project.name; |
|
|
|
box.projectId = project.id; |
|
|
|
box.projectColor = project.color; |
|
|
|
box.setProject(project); |
|
|
|
box.lotCode = lotCode; |
|
|
|
box.amount = 25; |
|
|
|
box.isLoaded = true; |
|
|
|
box.status = CsmLargeBufferTube.STATUS_LOADED; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -99,9 +95,9 @@ public class CsmLargeBufferTubeManager { |
|
|
|
public CsmLargeBufferTube getTubeByProjectName( String projectName ) { |
|
|
|
CsmLargeBufferTube tube = null; |
|
|
|
for ( CsmLargeBufferTube tmp : this.largeBufferTubes ) { |
|
|
|
if ( !tmp.projectName.equals(projectName) ) { |
|
|
|
continue ; |
|
|
|
} |
|
|
|
// if ( !tmp.projectName.equals(projectName) ) { |
|
|
|
// continue ; |
|
|
|
// } |
|
|
|
if ( tmp.isEmpty() ) { |
|
|
|
continue; |
|
|
|
} |
|
|
@ -117,11 +113,11 @@ public class CsmLargeBufferTubeManager { |
|
|
|
// update large buffer tube |
|
|
|
public void update(ParamLargeBufferTubeUpdate param ) { |
|
|
|
// delete all large buffer tubes with matched position |
|
|
|
this.largeBufferTubes.removeIf(largeBufferTube -> largeBufferTube.position.equals(param.position)); |
|
|
|
// this.largeBufferTubes.removeIf(largeBufferTube -> largeBufferTube.position.equals(param.position)); |
|
|
|
|
|
|
|
CsmLargeBufferTube largeBufferTube = new CsmLargeBufferTube(this); |
|
|
|
largeBufferTube.position = param.position; |
|
|
|
// CsmLargeBufferTube largeBufferTube = new CsmLargeBufferTube(this); |
|
|
|
// largeBufferTube.position = param.position; |
|
|
|
// largeBufferTube.projectName = param.projectName; |
|
|
|
this.largeBufferTubes.add(largeBufferTube); |
|
|
|
// this.largeBufferTubes.add(largeBufferTube); |
|
|
|
} |
|
|
|
} |