|
@ -0,0 +1,72 @@ |
|
|
|
|
|
package com.qyft.gd.device.service; |
|
|
|
|
|
|
|
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 设备步骤操作 |
|
|
|
|
|
*/ |
|
|
|
|
|
@Service |
|
|
|
|
|
@RequiredArgsConstructor |
|
|
|
|
|
public class DeviceOperationService { |
|
|
|
|
|
|
|
|
|
|
|
private final DeviceService deviceService; |
|
|
|
|
|
|
|
|
|
|
|
//抬起托盘 |
|
|
|
|
|
public void upTray(int heaterId){ |
|
|
|
|
|
deviceService.raiseTray("11"); |
|
|
|
|
|
} |
|
|
|
|
|
//降下托盘 |
|
|
|
|
|
public void downTray(int heaterId){ |
|
|
|
|
|
deviceService.lowerTray("11"); |
|
|
|
|
|
} |
|
|
|
|
|
//添加溶液(先固定16个试管全进行加液) |
|
|
|
|
|
public void addLiquid(){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
//移至加液 |
|
|
|
|
|
public void moveToSol(){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
//移至加热 |
|
|
|
|
|
public void moveToHeater(int heaterId){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
//摇匀 |
|
|
|
|
|
public void shaking(){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
//开始加热 |
|
|
|
|
|
public void startHeating(int heaterId){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
//停止加热 |
|
|
|
|
|
public void stopHeating(int heaterId){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
//拍照 |
|
|
|
|
|
public void takePhoto(){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
//移至异常 |
|
|
|
|
|
public void moveToExc(){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
//移除异常 |
|
|
|
|
|
public void moveOutToExc(){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
/** |
|
|
|
|
|
* 等待 |
|
|
|
|
|
* @param millis 毫秒 |
|
|
|
|
|
*/ |
|
|
|
|
|
private boolean delay(int millis) { |
|
|
|
|
|
try { |
|
|
|
|
|
Thread.sleep(millis); |
|
|
|
|
|
return true; |
|
|
|
|
|
} catch (InterruptedException e) { |
|
|
|
|
|
Thread.currentThread().interrupt(); |
|
|
|
|
|
} |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
} |