zhaohe 1 year ago
parent
commit
ea2f8e05f4
  1. 4
      src/main/java/a8k/appbean/cfg/LargeBottleBufferPos.java
  2. 2
      src/main/java/a8k/appbean/cfg/Plates2dCodeScanPos.java
  3. 5
      src/main/java/a8k/appbean/cfg/Pos2d.java
  4. 6
      src/main/java/a8k/appbean/cfg/Pos3d.java
  5. 4
      src/main/java/a8k/appbean/cfg/SmallBottleBufferPos.java
  6. 4
      src/main/java/a8k/appbean/cfg/TipPickUpPosInfo.java
  7. 24
      src/main/java/a8k/hardware/controler/Controler.java
  8. 87
      src/main/java/a8k/service/db/dao/HbotControlParamsDao.java
  9. 3
      src/main/java/a8k/service/db/entity/HardwareServiceSetting.java
  10. 3
      src/main/resources/static/test/css/app.0f7de753.css
  11. 2
      src/main/resources/static/test/index.html
  12. 2
      src/main/resources/static/test/js/app.8bcb0102.js
  13. 1
      src/main/resources/static/test/js/app.8bcb0102.js.map
  14. 33
      src/main/resources/static/test/js/chunk-vendors.d235939b.js
  15. 1
      src/main/resources/static/test/js/chunk-vendors.d235939b.js.map

4
src/main/java/a8k/appbean/cfg/LargeBottleBufferPos.java

@ -6,8 +6,8 @@ package a8k.appbean.cfg;
public class LargeBottleBufferPos {
public Pos2d topLelf;
public Integer xinterval; //x间隔
public Integer yinterval; //y间隔
public Integer xSpacing; //x间隔
public Integer ySpacing; //y间隔
public Integer scancodeRelaPos; //扫码相对每个大屏缓冲液的位置第一排 -dy第二排dy
public Integer sampleZPos; //取样开始位置

2
src/main/java/a8k/appbean/cfg/Plates2dCodeScanPos.java

@ -5,7 +5,7 @@ package a8k.appbean.cfg;
*/
public class Plates2dCodeScanPos {
public Pos2d ch0ScanPos; //通道1扫码位置
public Integer scanYInterval; //扫码间隔
public Integer scanYSpacing; //扫码间隔
}

5
src/main/java/a8k/appbean/cfg/Pos2d.java

@ -10,4 +10,9 @@ public class Pos2d {
this.y = y;
}
public Pos2d() {
this.x = 0;
this.y = 0;
}
}

6
src/main/java/a8k/appbean/cfg/Pos3d.java

@ -4,10 +4,4 @@ public class Pos3d {
public Integer x;
public Integer y;
public Integer z;
public Pos3d(Integer x, Integer y, Integer z) {
this.x = x;
this.y = y;
this.z = z;
}
}

4
src/main/java/a8k/appbean/cfg/SmallBottleBufferPos.java

@ -30,8 +30,8 @@ public class SmallBottleBufferPos {
public Pos2d g4TopLelf;
public Pos2d g5TopLelf;
public Integer xInterval; //x间隔
public Integer yInterval; //y间隔
public Integer xSpacing; //x间隔
public Integer ySpacing; //y间隔
public Integer sampleZPos; //取样开始位置
public Integer sampleZDepth; //取样深度

4
src/main/java/a8k/appbean/cfg/TipPickUpPosInfo.java

@ -6,8 +6,8 @@ public class TipPickUpPosInfo {
public Pos2d g1tl;
public Pos2d g2tl;
public Integer xInterval; //x间隔
public Integer yInterval; //y间隔
public Integer xSpacing; //x间隔
public Integer ySpacing; //y间隔
public Integer pickUpZPos; //拾取高度

24
src/main/java/a8k/hardware/controler/Controler.java

@ -74,7 +74,7 @@ public class Controler {
Map<String,Object> param = new HashMap<>();
param.put("key", methodName.substring(3));
param.put("type", method.getReturnType().getSimpleName());
param.put("type", method.getReturnType().getName());
param.put("group", paramAnnotation.group());
param.put("name",paramAnnotation.name());
param.put("value", method.invoke(paramService));
@ -246,4 +246,26 @@ public class Controler {
}
return AppRet.success(actionResult);
}
@PostMapping("/api/service-config/class-struct-info-get")
@ResponseBody
public AppRet<Object> classStructInfoGet( @RequestBody Map<String, Object> params ) throws Exception {
String className = (String)params.get("class");
Class<?> clazz = Class.forName(className);
List<Map<String,Object>> struct = new ArrayList<>();
this.classStructInfoFill(clazz, struct);
return AppRet.success(struct);
}
// fill up struct info
private void classStructInfoFill( Class<?> clazz, List<Map<String,Object>> struct ) {
var fields = clazz.getFields();
for ( var item : fields ) {
var filed = new HashMap<String,Object>();
filed.put("name", item.getName());
filed.put("type", item.getType().getName());
filed.put("typeShort", item.getType().getSimpleName());
struct.add(filed);
}
}
}

87
src/main/java/a8k/service/db/dao/HbotControlParamsDao.java

@ -1,40 +1,55 @@
package a8k.service.db.dao;
import a8k.appbean.cfg.*;
/**
* XY机械臂控制相关参数访问
*/
import a8k.service.db.entity.HardwareServiceSetting;
import a8k.service.hardware.HbotControlService;
import a8k.utils.HardwareServiceParam;
import a8k.utils.HardwareServiceParams;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.stereotype.Component;
@Component
@HardwareServiceParams(service = HbotControlService.class)
public class HbotControlParamsDao {
Pos3d getReactionPos() {
return null;
} //滴液反应位
TipPickUpPosInfo TipPickUpPosInfo() {
return null;
} //TIP组0 位置信息
SmallBottleBufferPos getSmallBottleBufferPosInfo() {
return null;
}//小瓶缓冲液位置
Plates2dCodeScanPos getPlates2dCodeScanPosInfo() {
return null;
}//反应板夹仓位置
LargeBottleBufferPos getLargeBottleBufferPosInfo() {
return null;
}//大瓶缓冲液位置
Pos3d getEmergencyPos() {
return null;
} //急诊位
Pos3d getTipDropPos() {
return null;
} //tip丢弃位置
@HardwareServiceParam(name="滴液反应位", group="滴液反应位")
public Pos3d getReactionPos() throws Exception {
return this.getOption("ReactionPos", Pos3d.class);
}
@HardwareServiceParam(name="TIP组位置信息", group="TIP组位置信息")
public TipPickUpPosInfo getTipPickUpPosInfo() throws Exception {
return this.getOption("TipPickUpPosInfo", TipPickUpPosInfo.class);
}
@HardwareServiceParam(name="小瓶缓冲液位置", group="小瓶缓冲液位置")
public SmallBottleBufferPos getSmallBottleBufferPosInfo() throws Exception {
return this.getOption("SmallBottleBufferPosInfo", SmallBottleBufferPos.class);
}
@HardwareServiceParam(name="反应板夹仓位置", group="反应板夹仓位置")
public Plates2dCodeScanPos getPlates2dCodeScanPosInfo() throws Exception {
return this.getOption("Plates2dCodeScanPosInfo", Plates2dCodeScanPos.class);
}
@HardwareServiceParam(name="大瓶缓冲液位置", group="大瓶缓冲液位置")
public LargeBottleBufferPos getLargeBottleBufferPosInfo() throws Exception {
return this.getOption("LargeBottleBufferPosInfo", LargeBottleBufferPos.class);
}
@HardwareServiceParam(name="急诊位", group="急诊位")
public Pos3d getEmergencyPos() throws Exception {
return this.getOption("EmergencyPos", Pos3d.class);
}
@HardwareServiceParam(name="Tip丢弃位置", group="Tip丢弃位置")
public Pos3d getTipDropPos() throws Exception {
return this.getOption("TipDropPos", Pos3d.class);
}
private <T> T getOption( String key, Class<T> clazz) throws Exception {
var option = HardwareServiceSetting.getOption("HbotControlService", key);
if ( option.isNewRecord ) {
return clazz.getDeclaredConstructor().newInstance();
}
ObjectMapper mapper = new ObjectMapper();
return mapper.readValue(option.val, clazz);
}
}

3
src/main/java/a8k/service/db/entity/HardwareServiceSetting.java

@ -2,6 +2,7 @@ package a8k.service.db.entity;
import com.iflytop.uf.UfActiveRecord;
import com.iflytop.uf.UfActiveRecordField;
import com.iflytop.uf.util.UfJsonHelper;
import java.util.HashMap;
import java.util.Map;
@ -21,6 +22,8 @@ public class HardwareServiceSetting extends UfActiveRecord {
this.val = (String) value;
} else if ( value instanceof Integer ) {
this.val = String.valueOf((Integer)value);
} else if ( value instanceof Map ) {
this.val = UfJsonHelper.objectToJson(value);
} else {
throw new Exception("不支持的配置数据类型");
}

3
src/main/resources/static/test/css/app.0f7de753.css
File diff suppressed because it is too large
View File

2
src/main/resources/static/test/index.html

@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>a8k_webui</title><script defer="defer" src="js/chunk-vendors.feed1d4c.js"></script><script defer="defer" src="js/app.e8dec210.js"></script><link href="css/app.904d7563.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but a8k_webui doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>a8k_webui</title><script defer="defer" src="js/chunk-vendors.d235939b.js"></script><script defer="defer" src="js/app.8bcb0102.js"></script><link href="css/app.0f7de753.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but a8k_webui doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

2
src/main/resources/static/test/js/app.8bcb0102.js
File diff suppressed because it is too large
View File

1
src/main/resources/static/test/js/app.8bcb0102.js.map
File diff suppressed because it is too large
View File

33
src/main/resources/static/test/js/chunk-vendors.d235939b.js
File diff suppressed because it is too large
View File

1
src/main/resources/static/test/js/chunk-vendors.d235939b.js.map
File diff suppressed because it is too large
View File

Loading…
Cancel
Save