From fb5b2e35fd234d8f8068c690df1bcbf956e05880 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <xltys1995>
Date: 星期二, 03 十一月 2020 09:35:28 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/domain/enums/SiteStatusType.java | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/zy/asrs/domain/enums/SiteStatusType.java b/src/main/java/com/zy/asrs/domain/enums/SiteStatusType.java
index bc00e16..b3adb37 100644
--- a/src/main/java/com/zy/asrs/domain/enums/SiteStatusType.java
+++ b/src/main/java/com/zy/asrs/domain/enums/SiteStatusType.java
@@ -1,6 +1,8 @@
package com.zy.asrs.domain.enums;
+import com.zy.core.model.protocol.StaProtocol;
+
/**
* 绔欑偣鐘舵�佹灇涓�
*/
@@ -8,15 +10,37 @@
// 鑷姩
SITE_AUTO,
- // 闈炶嚜鍔�/鏀跺埌
+ // 闈炶嚜鍔�
SITE_UNAUTO,
// 鑷姩+鏈夌墿+ID
SITE_AUTO_RUN_ID,
// 鑷姩+鏈夌墿
SITE_AUTO_RUN,
- // 鑷姩+鏈夌墿+ID
+ // 鑷姩+ID
SITE_AUTO_ID,
;
+ public static SiteStatusType process(StaProtocol staProtocol){
+ if (staProtocol == null) {
+ return null;
+ }
+ if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0) {
+ return SITE_AUTO_RUN_ID;
+ }
+ if (staProtocol.isAutoing() && staProtocol.isLoading()) {
+ return SITE_AUTO_RUN;
+ }
+ if (staProtocol.isAutoing() && staProtocol.getWorkNo() > 0) {
+ return SITE_AUTO_ID;
+ }
+ if (staProtocol.isAutoing()) {
+ return SITE_AUTO;
+ }
+ if (!staProtocol.isAutoing()) {
+ return SITE_UNAUTO;
+ }
+ return null;
+ }
+
}
--
Gitblit v1.9.1