Browse Source

小缓冲液属性整理

master
sige 2 years ago
parent
commit
892aa7b93b
  1. 2
      src/main/java/com/dreamworks/boditech/controller/DeviceController.java
  2. 15
      src/main/java/com/dreamworks/boditech/driver/consumable/CsmBufferTubeBox.java
  3. 11
      src/main/java/com/dreamworks/boditech/driver/consumable/CsmBufferTubeManager.java

2
src/main/java/com/dreamworks/boditech/controller/DeviceController.java

@ -170,7 +170,7 @@ public class DeviceController extends BaseController {
@ResponseBody
@PostMapping("/api/device/buffer-tube-status-get")
public ApiResponse bufferTubeStatusGet() {
return this.success(this.deviceService.device.bufferTubes.getAll());
return this.success(this.deviceService.device.bufferTubes.getAllBoxes());
}
@ResponseBody

15
src/main/java/com/dreamworks/boditech/driver/consumable/CsmBufferTubeBox.java

@ -1,16 +1,9 @@
package com.dreamworks.boditech.driver.consumable;
public class CsmBufferTubeBox {
public class CsmBufferTubeBox extends ConsumableBase {
// index of buffer tube box : 0 - 5
public Integer index;
public Integer index = -1;
// if the buffer tube box is loaded
public Boolean isLoaded = false;
public Integer projectId;
public String projectName;
public String projectColor;
public Integer tubeAmount;
public static final String STATUS_NOT_LOADED = "NOT_LOADED";
public static final String STATUS_LOADED = "LOADED";
public String status;
// amount of buffer tubes in the box
public Integer tubeAmount = 0;
}

11
src/main/java/com/dreamworks/boditech/driver/consumable/CsmBufferTubeManager.java

@ -1,12 +1,10 @@
package com.dreamworks.boditech.driver.consumable;
import com.dreamworks.boditech.driver.Device;
import com.dreamworks.boditech.driver.entity.ParamBufferTubeUpdateByBox;
import com.dreamworks.boditech.entity.IdChip;
import com.dreamworks.boditech.entity.Project;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public class CsmBufferTubeManager {
// device instance
private final Device device;
@ -24,13 +22,12 @@ public class CsmBufferTubeManager {
for ( int i=0; i<6; i++ ) {
CsmBufferTubeBox box = new CsmBufferTubeBox();
box.index = i;
box.status = CsmBufferTubeBox.STATUS_NOT_LOADED;
this.bufferTubeBoxes.add(box);
}
}
// get all buffer tube boxes
public List<CsmBufferTubeBox> getAll() {
public List<CsmBufferTubeBox> getAllBoxes() {
return this.bufferTubeBoxes;
}
@ -57,12 +54,10 @@ public class CsmBufferTubeManager {
}
CsmBufferTubeBox box = this.bufferTubeBoxes.get(index);
box.projectName = project.name;
box.projectId = project.id;
box.projectColor = project.color;
box.setProject(project);
box.tubeAmount = 25;
box.lotCode = lotCode;
box.isLoaded = true;
box.status = CsmBufferTubeBox.STATUS_LOADED;
}

Loading…
Cancel
Save