SystemVariable.cs 5.44 KB
using Hh.Mes.POJO.Entity;
using Hh.Mes.POJO.EnumEntitys;
using System;
using System.Collections.Generic;
using System.Text;

namespace Hh.Mes.Pojo.System
{
    /// <summary>
    /// 系统变量 定义一下全局的 值
    /// </summary>
    public class SystemVariable
    {

        /// <summary>
        /// 删除=0
        /// </summary>
        public static int DeleteFlag = (int)EnumDeleteOrAdd.删除;

        /// <summary>
        /// 新增或更新1
        /// </summary>
        public static int AddOrUpdateFlag = (int)EnumDeleteOrAdd.新增或更新;

        /// <summary>
        /// 默认操作人
        /// </summary>
        public static string DefaultCreated = "System";

        /// <summary>
        /// 默认操作人 API
        /// </summary>
        public static string DefaultCreatedApi = "API";


        /// <summary>
        /// 未查询到符合条件的数据
        /// </summary>
        public static string queryNotData = "未查询到符合条件的数据!";


        public static string excelDataOk = "Excel 数据导入成功,请在对应的模块刷新查看数据!";


        public static string excelDataError = "Excel 数据导入失败,请核对数据正确、或者刷新页面重试,反复出现请联系管理员查看logs文件!";

        /// <summary>
        /// 服务器业务数据操作失败出现异常,反复出现请联系管理员!
        /// </summary>
        public static string dataActionError = "服务器业务数据操作失败出现异常,反复出现请联系管理员!";

        /// <summary>
        /// 服务器业务数据处理成功
        /// </summary>
        public static string dataActionOk = "服务器业务数据处理成功!";

        /// <summary>
        /// ECS提交的PLC检测无料框的料点编码
        /// </summary>
        public static Tuple<DateTime, List<string>> noneGoodsLocationCodes = new Tuple<DateTime, List<string>>(DateTime.Now, new List<string>());
        public static DateTime StartTime;

        /// <summary>
        /// 料点字典集合
        /// </summary>
        public static List<base_location> locationList = new List<base_location>();

        /// <summary>
        ///  false 不写入数据库日志
        /// </summary>
        public static Dictionary<string, Tuple<string, bool>> apiList = new Dictionary<string, Tuple<string, bool>>();

        public static void InitApiList()
        {
            apiList.Add("/api/Upstream/Mes/V1/SendUser", new Tuple<string, bool>(EnumLog.API人员接口.ToString(), true));
            apiList.Add("/api/Upstream/Mes/V1/SendMaterial", new Tuple<string, bool>(EnumLog.API物料主数据接口.ToString(), true));
            apiList.Add("/api/Upstream/Mes/V1/SendProcessRoute", new Tuple<string, bool>(EnumLog.API工艺路线接口.ToString(), true));
            apiList.Add("/api/Upstream/Mes/V1/SendSupplier", new Tuple<string, bool>(EnumLog.API供应商接口.ToString(), true));
            apiList.Add("/api/Upstream/Mes/V1/SendWorkOrder", new Tuple<string, bool>(EnumLog.API生产订单接口.ToString(), true));

            apiList.Add("/api/Upstream/Mes/V1/SendCalendar", new Tuple<string, bool>(EnumLog.API工作日历接口.ToString(), true));
            apiList.Add("/api/Upstream/Mes/V1/SendCheck", new Tuple<string, bool>(EnumLog.API质量问题状态接口.ToString(), true));
            apiList.Add("/api/Upstream/Mes/V1/ProcessRouteUpMom", new Tuple<string, bool>(EnumLog.API工序执行信息反馈接口.ToString(), true));
            apiList.Add("/api/Upstream/Mes/V1/AndonUpMom", new Tuple<string, bool>(EnumLog.APIANDON报警接口.ToString(), true));
            apiList.Add("/api/Upstream/Mes/V1/GetMomToken", new Tuple<string, bool>(EnumLog.API获取MOM请求Token接口.ToString(), true));
            apiList.Add("/api/System/Mes/V1/base/AppCheckVerByAppNameAndVer", new Tuple<string, bool>(EnumLog.API检查APP更新接口.ToString(), false));

            apiList.Add("/api/System/Mes/V1/Login/Logout", new Tuple<string, bool>(EnumLog.API退出登入接口.ToString(), false));
            apiList.Add("/api/System/Mes/V1/Login", new Tuple<string, bool>(EnumLog.API登入接口.ToString(), false));
            apiList.Add("/api/System/Mes/V1/AppCheckToken", new Tuple<string, bool>(EnumLog.API判断token是否存在or过期接口.ToString(), false));
            apiList.Add("/api/System/Mes/V1/GetPDAModules", new Tuple<string, bool>(EnumLog.API获取PDA用户可访问的模块列表接口.ToString(), true));
            apiList.Add("/api/System/Mes/V1/Login/OtherLogin", new Tuple<string, bool>(EnumLog.API第三方登入接口.ToString(), true));

            apiList.Add("/api/System/Mes/V1/GetState", new Tuple<string, bool>(EnumLog.API枚举对象.ToString(), false));
            apiList.Add("/api/PDA/Mes/V1/GetMaterialByPDABarCode", new Tuple<string, bool>(EnumLog.API物料追溯查询接口.ToString(), true));

            apiList.Add("/api/PDA/Mes/V1/AgvCollectingStart", new Tuple<string, bool>(EnumLog.APIAGV呼叫接口.ToString(), true));
            apiList.Add("/api/PDA/Mes/V1/AgvCollectingEnd", new Tuple<string, bool>(EnumLog.APIAGV呼叫接口.ToString(), true));
            apiList.Add("/api/PDA/Mes/V1/GetEquipmentByCode", new Tuple<string, bool>(EnumLog.APIAGV呼叫接口.ToString(), true));
            apiList.Add("/api/Mes/V1/CutWeld/SendIWPTechnologylineProcess", new Tuple<string, bool>(EnumLog.调用上游MES工序完工反馈.ToString(), true));
        }
    }
}