10 changed files with 62 additions and 204 deletions
-
36src/main/java/a8k/service/db/dao/A8KGeneralConsumablesPropertyDao.java
-
59src/main/java/a8k/service/db/dao/A8kDirectCtrlPosDao.java
-
17src/main/java/a8k/service/db/dao/ModulerParameterDao.java
-
13src/main/java/a8k/service/db/dao/MotorTubeRackMoveCtrlServiceParameterDao.java
-
27src/main/java/a8k/service/db/entity/A8kDirectCtrlPos.java
-
20src/main/java/a8k/service/db/entity/A8kGeneralConsumablesProperty.java
-
10src/main/java/a8k/service/db/entity/A8kTubeInfo.java
-
34src/main/java/a8k/service/db/entity/ModuleParameter.java
-
40src/main/java/a8k/service/db/entity/MotorTubeRackMoveCtrlServiceParameter.java
-
10src/main/java/a8k/service/hardware/MotorTubeRackMoveCtrlService.java
@ -1,36 +0,0 @@ |
|||||
package a8k.service.db.dao; |
|
||||
|
|
||||
import a8k.service.db.entity.A8kGeneralConsumablesProperty; |
|
||||
import com.iflytop.uf.UfActiveRecord; |
|
||||
import org.springframework.stereotype.Component; |
|
||||
|
|
||||
import java.util.Map; |
|
||||
|
|
||||
/** |
|
||||
* 用于存储耗材的一些属性信息 |
|
||||
*/ |
|
||||
@Component |
|
||||
public class A8KGeneralConsumablesPropertyDao { |
|
||||
|
|
||||
|
|
||||
|
|
||||
public float getValAsFloat(String propertyKey) { |
|
||||
A8kGeneralConsumablesProperty val = UfActiveRecord.findOne(A8kGeneralConsumablesProperty.class, Map.of("propertyKey", propertyKey)); |
|
||||
assert val != null; |
|
||||
return Float.parseFloat(val.val); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
public int getValAsInt(String propertyKey) { |
|
||||
A8kGeneralConsumablesProperty val = UfActiveRecord.findOne(A8kGeneralConsumablesProperty.class, Map.of("propertyKey", propertyKey)); |
|
||||
assert val != null; |
|
||||
return Integer.parseInt(val.val); |
|
||||
} |
|
||||
|
|
||||
public String getValAsString(String propertyKey) { |
|
||||
A8kGeneralConsumablesProperty val = UfActiveRecord.findOne(A8kGeneralConsumablesProperty.class, Map.of("propertyKey", propertyKey)); |
|
||||
assert val != null; |
|
||||
return val.val; |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,59 +0,0 @@ |
|||||
package a8k.service.db.dao; |
|
||||
|
|
||||
import a8k.appbean.PosBean; |
|
||||
import a8k.service.db.entity.A8kDirectCtrlPos; |
|
||||
import com.iflytop.uf.UfActiveRecord; |
|
||||
import org.springframework.stereotype.Component; |
|
||||
|
|
||||
import java.util.Map; |
|
||||
|
|
||||
/** |
|
||||
* |
|
||||
* 用于设备运行中的关键位置信息 |
|
||||
* |
|
||||
* |
|
||||
*/ |
|
||||
@Component |
|
||||
public class A8kDirectCtrlPosDao { |
|
||||
|
|
||||
// |
|
||||
// 试管架移动相关坐标 |
|
||||
// 1.零点参考点为零点光电。 |
|
||||
// 2.移动坐标参考点为从左往右数第一个试管 |
|
||||
// 3.正方向为执行机构的正方向 |
|
||||
// |
|
||||
public static final String MotorTubeRackMotor_tubeScanPos = "MotorTubeRackMotor_tubeScanPos"; //扫码位置 |
|
||||
public static final String MotorTubeRackMotor_tubeHeighJudgmentPos = "MotorTubeRackMotor_tubeHeighJudgmentPos"; //高低试管判断位置 |
|
||||
public static final String MotorTubeRackMotor_tubePreProcessPos = "MotorTubeRackMotor_tubePreProcessPos"; //试管预处理位置 |
|
||||
public static final String MotorTubeRackMotor_tubeExistJudgmentPos = "MotorTubeRackMotor_tubeExistJudgmentPos";//试管有无 |
|
||||
public static final String MotorTubeRackMotor_tubeRackEnterPos = "MotorTubeRackMotor_tubeRackEnterPos"; //入料位置 |
|
||||
public static final String MotorTubeRackMotor_tubeRackExitPos = "MotorTubeRackMotor_tubeRackExitPos"; //出料位置 |
|
||||
public static final String MotorTubeRackMotor_tubeRackScanCodePos = "MotorTubeRackMotor_tubeRackScanCodePos"; //出料位置 |
|
||||
|
|
||||
// |
|
||||
// 试管扫码夹紧模块 |
|
||||
// |
|
||||
|
|
||||
public static final String MotorTubeScanClampModule_clampPos = "MotorTubeScanClampModule_clampPos";//试管扫码夹紧模组 夹紧位置 |
|
||||
public static final String MotorTubeScanClampModule_releasePos = "MotorTubeScanClampModule_releasePos";//试管扫码夹紧模组 释放位置 |
|
||||
|
|
||||
|
|
||||
// |
|
||||
// 试管预处理模块 |
|
||||
// |
|
||||
|
|
||||
|
|
||||
PosBean getPosBean(String posName) { |
|
||||
A8kDirectCtrlPos pos = UfActiveRecord.findOne(A8kDirectCtrlPos.class, Map.of("posName", posName)); |
|
||||
assert pos != null; |
|
||||
return new PosBean(pos.posX, pos.posY, pos.posZ); |
|
||||
} |
|
||||
|
|
||||
A8kDirectCtrlPos getPos(String posName) { |
|
||||
A8kDirectCtrlPos pos = UfActiveRecord.findOne(A8kDirectCtrlPos.class, Map.of("posName", posName)); |
|
||||
assert pos != null; |
|
||||
return pos; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,17 +0,0 @@ |
|||||
package a8k.service.db.dao; |
|
||||
|
|
||||
import a8k.service.db.entity.ModuleParameter; |
|
||||
|
|
||||
import com.iflytop.uf.UfActiveRecord; |
|
||||
import org.springframework.stereotype.Component; |
|
||||
|
|
||||
import java.util.Map; |
|
||||
|
|
||||
@Component |
|
||||
public class ModulerParameterDao { |
|
||||
ModuleParameter getMotorParameter(int mid) { |
|
||||
var param = UfActiveRecord.findOne(ModuleParameter.class, Map.of("mid", mid)); |
|
||||
assert param != null; |
|
||||
return param; |
|
||||
} |
|
||||
} |
|
@ -0,0 +1,13 @@ |
|||||
|
package a8k.service.db.dao; |
||||
|
|
||||
|
import a8k.service.db.entity.MotorTubeRackMoveCtrlServiceParameter; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
@Component |
||||
|
public class MotorTubeRackMoveCtrlServiceParameterDao { |
||||
|
|
||||
|
public MotorTubeRackMoveCtrlServiceParameter getParameter() { |
||||
|
//TODO: |
||||
|
return null; |
||||
|
} |
||||
|
} |
@ -1,27 +0,0 @@ |
|||||
package a8k.service.db.entity; |
|
||||
|
|
||||
import com.iflytop.uf.UfActiveRecord; |
|
||||
import com.iflytop.uf.UfActiveRecordField; |
|
||||
|
|
||||
/** |
|
||||
* A8kDirectCtrlPos |
|
||||
*/ |
|
||||
public class A8kDirectCtrlPos extends UfActiveRecord { |
|
||||
|
|
||||
@UfActiveRecordField |
|
||||
public String posName; //位置名称 |
|
||||
@UfActiveRecordField |
|
||||
public Integer mid;//模块ID |
|
||||
@UfActiveRecordField |
|
||||
public String midName; //模块ID |
|
||||
@UfActiveRecordField |
|
||||
public Integer posX; //位置X,如果只有一个位置,则使用位置X |
|
||||
@UfActiveRecordField |
|
||||
public Integer posY; //位置Y,如果有两个位置,则使用位置X,Y |
|
||||
@UfActiveRecordField |
|
||||
public Integer posZ; //位置Z,如果有三个位置,则使用位置X,Y,Z |
|
||||
|
|
||||
public static String getTableName() { |
|
||||
return "A8kDirectCtrlPos" + "Table"; |
|
||||
} |
|
||||
} |
|
@ -1,20 +0,0 @@ |
|||||
package a8k.service.db.entity; |
|
||||
|
|
||||
import com.iflytop.uf.UfActiveRecord; |
|
||||
import com.iflytop.uf.UfActiveRecordField; |
|
||||
|
|
||||
/** |
|
||||
* A8kDirectCtrlPos |
|
||||
*/ |
|
||||
public class A8kGeneralConsumablesProperty extends UfActiveRecord { |
|
||||
|
|
||||
@UfActiveRecordField |
|
||||
public String propertyKey; |
|
||||
@UfActiveRecordField |
|
||||
public String val; |
|
||||
|
|
||||
|
|
||||
public static String getTableName() { |
|
||||
return "A8kGeneralConsumablesProperty" + "Table"; |
|
||||
} |
|
||||
} |
|
@ -1,34 +0,0 @@ |
|||||
package a8k.service.db.entity; |
|
||||
|
|
||||
import com.iflytop.uf.UfActiveRecord; |
|
||||
import com.iflytop.uf.UfActiveRecordField; |
|
||||
|
|
||||
public class ModuleParameter extends UfActiveRecord { |
|
||||
@UfActiveRecordField |
|
||||
Integer mid; //模块ID |
|
||||
|
|
||||
@UfActiveRecordField |
|
||||
String moduleName; //模块名称 |
|
||||
|
|
||||
@UfActiveRecordField |
|
||||
Integer zeroPosOff; //零点偏移 |
|
||||
|
|
||||
@UfActiveRecordField |
|
||||
Integer moveToZeroOvertime;// 回零超时时间 |
|
||||
|
|
||||
@UfActiveRecordField |
|
||||
Integer actionOvertime;// 执行动作的超时时间,该超时时间适用于当前模块在当前产品中所有动作的最大时间。 |
|
||||
|
|
||||
@UfActiveRecordField |
|
||||
Integer defaultVelocity; //默认速度 |
|
||||
|
|
||||
@UfActiveRecordField |
|
||||
Integer backToZeroVelocity; //回零速度 |
|
||||
|
|
||||
@UfActiveRecordField |
|
||||
Integer loseStepWarningJudgeDistance; //丢步异常警告距离 |
|
||||
|
|
||||
public static String getTableName() { |
|
||||
return "MotorParameter" + "Table"; |
|
||||
} |
|
||||
} |
|
@ -0,0 +1,40 @@ |
|||||
|
package a8k.service.db.entity; |
||||
|
|
||||
|
import com.iflytop.uf.UfActiveRecord; |
||||
|
import com.iflytop.uf.UfActiveRecordField; |
||||
|
|
||||
|
public class MotorTubeRackMoveCtrlServiceParameter { |
||||
|
@UfActiveRecordField |
||||
|
Integer moveToZeroOvertime;// 回零超时时间 |
||||
|
|
||||
|
@UfActiveRecordField |
||||
|
Integer actionOvertime;// 执行动作的超时时间,该超时时间适用于当前模块在当前产品中所有动作的最大时间。 |
||||
|
|
||||
|
@UfActiveRecordField |
||||
|
Integer tubeScanPos; //试管扫码位置 |
||||
|
|
||||
|
@UfActiveRecordField |
||||
|
Integer tubeHeighJudgmentPos; //高低试管判断位置 |
||||
|
|
||||
|
@UfActiveRecordField |
||||
|
Integer tubePreProcessPos; //试管预处理位置 |
||||
|
|
||||
|
@UfActiveRecordField |
||||
|
Integer tubeExistJudgmentPos; //入料位置 |
||||
|
|
||||
|
@UfActiveRecordField |
||||
|
Integer tubeRackEnterPos; //出料位置 |
||||
|
|
||||
|
@UfActiveRecordField |
||||
|
Integer tubeRackExitPos; //出料位置 |
||||
|
|
||||
|
@UfActiveRecordField |
||||
|
Integer tubeRackScanCodePos; //试管架扫码位置 |
||||
|
|
||||
|
@UfActiveRecordField |
||||
|
Integer horizontalMotorOffset; //水平移动电机位置偏移 |
||||
|
|
||||
|
public static String getTableName() { |
||||
|
return "MotorTubeRackMoveCtrlServiceParameter" + "Table"; |
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue