From 1db2fb1739982ce77e16c04fccb200f04467bb22 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期三, 20 十一月 2024 14:59:23 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/domain/enums/SiteStatusType.java | 30 ++++++++++++++++++++++++++++-- 1 files changed, 28 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..ccf96a7 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,10 @@ package com.zy.asrs.domain.enums; +import com.zy.core.enums.DevpType.DevpStateType; +import com.zy.core.enums.DevpType.DevpWorkType; +import com.zy.core.model.protocol.StaProtocol; + /** * 绔欑偣鐘舵�佹灇涓� */ @@ -8,15 +12,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.stateType == DevpStateType.AUTO && staProtocol.workType == DevpWorkType.BUSY && staProtocol.getWorkNo() > 0) { + return SITE_AUTO_RUN_ID; + } + if (staProtocol.stateType == DevpStateType.AUTO && staProtocol.workType == DevpWorkType.BUSY) { + return SITE_AUTO_RUN; + } + if (staProtocol.stateType == DevpStateType.AUTO && staProtocol.getWorkNo() > 0) { + return SITE_AUTO_ID; + } + if (staProtocol.stateType == DevpStateType.AUTO) { + return SITE_AUTO; + } + if (staProtocol.stateType != DevpStateType.AUTO) { + return SITE_UNAUTO; + } + return null; + } + } -- Gitblit v1.9.1