From 66d031eb7381ad8dd04d71a2730e4c22464a015a Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <xltys1995> Date: 星期五, 28 八月 2020 15:56:01 +0800 Subject: [PATCH] #v2.1.1 --- 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