22
schangxiang@126.com
2024-12-08 6ea3f5dcad1614af00761744842ebfb70cdab276
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using Admin.NET.Application;
using iWareCC.SrmService;
using iWareCC.StationService;
using iWareCommon.Common.Globle;
using iWareCommon.Utils;
using iWareModel;
using iWareModel.EnumType.XiGangPublicCommon;
using iWareSql.DataAccess;
using iWareSql.DBModel;
using iWareSql.WmsDBModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using XiGang.Core.Model;
 
 
namespace iWareCC.Common.Helper
{
    /// <summary>
    /// 增补创建的扩展帮助类 【EditBy shaocx,2022-02-05】
    /// </summary>
    public class PlcHelper
    {
        /// <summary>
        /// 获取模式名
        /// </summary>
        /// <param name="_task"></param>
        /// <returns></returns>
        public static string GetModeName(short mode)
        {
            switch (mode) {
                case 1:
                    return "手动模式";
                case 2:
                    return "自动模式";
                case 3:
                    return "自动运行中";
                case 4:
                    return "立即停止";
                case 5:
                    return "循环停止";
                default:
                    return "未知";
            }
        }
 
        /// <summary>
        /// 获取报警类型
        /// </summary>
        /// <param name="_task"></param>
        /// <returns></returns>
        public static string GetWarningTypeName(short warn)
        {
            switch (warn)
            {
                case 1:
                    return "安全报警";
                case 2:
                    return "硬件报警";
                case 3:
                    return "超时报警";
                case 4:
                    return "警告信息";
                default:
                    return "未知";
            }
        }
    }
}