5 changed files with 139 additions and 48 deletions
-
33src/main/java/com/qyft/ms/app/controller/SprayTaskController.java
-
50src/main/java/com/qyft/ms/app/device/status/SprayTask.java
-
72src/main/java/com/qyft/ms/app/model/bo/SprayParams.java
-
2src/main/java/com/qyft/ms/app/model/vo/SelfTestVO.java
-
30src/main/java/com/qyft/ms/app/model/vo/SprayTaskStatusVO.java
@ -0,0 +1,33 @@ |
|||||
|
package com.qyft.ms.app.controller; |
||||
|
|
||||
|
import com.qyft.ms.app.device.status.SprayTask; |
||||
|
import com.qyft.ms.app.model.vo.SelfTestVO; |
||||
|
import com.qyft.ms.app.model.vo.SprayTaskStatusVO; |
||||
|
import com.qyft.ms.app.service.SelfTestService; |
||||
|
import com.qyft.ms.system.common.result.Result; |
||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@Tag(name = "喷涂任务接口") |
||||
|
@RestController |
||||
|
@RequestMapping("/api/self-test") |
||||
|
@RequiredArgsConstructor |
||||
|
@Slf4j |
||||
|
public class SprayTaskController { |
||||
|
|
||||
|
@Operation(summary = "获取喷涂状态") |
||||
|
@GetMapping("/") |
||||
|
public Result<SprayTaskStatusVO> getStatus() { |
||||
|
SprayTask sprayTask = SprayTask.getInstance(); |
||||
|
SprayTaskStatusVO sprayTaskStatusVO = new SprayTaskStatusVO(); |
||||
|
sprayTaskStatusVO.setSprayedPoints(sprayTask.getSprayedPoints()); |
||||
|
sprayTaskStatusVO.setSprayParams(sprayTask.getSprayParams()); |
||||
|
return Result.success(sprayTaskStatusVO); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
package com.qyft.ms.app.model.bo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Data |
||||
|
@Schema(description = "喷涂参数") |
||||
|
public class SprayParams { |
||||
|
|
||||
|
/** |
||||
|
* 喷涂路径类型 |
||||
|
*/ |
||||
|
@Schema(description = "喷涂路径类型") |
||||
|
private String matrixPathType; |
||||
|
|
||||
|
/** |
||||
|
* Z轴距离玻片的高度 |
||||
|
*/ |
||||
|
@Schema(description = "Z轴距离玻片的高度") |
||||
|
private Double motorZHeight; |
||||
|
|
||||
|
/** |
||||
|
* Mpa兆帕 不处理 |
||||
|
*/ |
||||
|
@Schema(description = "Mpa兆帕 不处理") |
||||
|
private Double gasPressure; |
||||
|
|
||||
|
/** |
||||
|
* 单位uL微升 基质流速(控制注射泵速度) |
||||
|
*/ |
||||
|
@Schema(description = "单位uL微升 基质流速(控制注射泵速度)") |
||||
|
private Double volume; |
||||
|
|
||||
|
/** |
||||
|
* 是否打开高压 |
||||
|
*/ |
||||
|
@Schema(description = "是否打开高压") |
||||
|
private Boolean highVoltage; |
||||
|
|
||||
|
/** |
||||
|
* 高压值 |
||||
|
*/ |
||||
|
@Schema(description = "高压值") |
||||
|
private Double highVoltageValue; |
||||
|
|
||||
|
/** |
||||
|
* 毫米 喷涂间距 |
||||
|
*/ |
||||
|
@Schema(description = " 喷涂间距(毫米)") |
||||
|
private Double spacing; |
||||
|
|
||||
|
/** |
||||
|
* 移动速度 轴速度 |
||||
|
*/ |
||||
|
@Schema(description = "轴移动速度") |
||||
|
private Double movingSpeed; |
||||
|
|
||||
|
/** |
||||
|
* 喷涂遍数 |
||||
|
*/ |
||||
|
@Schema(description = "喷涂遍数") |
||||
|
private Double times; |
||||
|
|
||||
|
/** |
||||
|
* 喷涂范围 |
||||
|
*/ |
||||
|
@Schema(description = "喷涂范围") |
||||
|
private List<Map<String, Object>> positionList; |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.qyft.ms.app.model.vo; |
||||
|
|
||||
|
import com.qyft.ms.app.model.bo.Point2D; |
||||
|
import com.qyft.ms.app.model.bo.SprayParams; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.concurrent.CopyOnWriteArrayList; |
||||
|
|
||||
|
/** |
||||
|
* 喷涂状态VO |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SprayTaskStatusVO { |
||||
|
|
||||
|
/** |
||||
|
* 已喷涂点位 |
||||
|
*/ |
||||
|
@Schema(description = "已喷涂点位") |
||||
|
private List<List<Point2D>> sprayedPoints = new CopyOnWriteArrayList<>(); |
||||
|
|
||||
|
/** |
||||
|
* 喷涂参数 |
||||
|
*/ |
||||
|
@Schema(description = "喷涂参数") |
||||
|
private SprayParams sprayParams = new SprayParams(); |
||||
|
|
||||
|
|
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue