杨前锦
2025-06-11 e0d89637030791ce1e7dd46ca5fdec9979977960
HH.WCS.Mobox3/HH.WCS.Mobox3.FJJT/models/Container.cs
New file
@@ -0,0 +1,52 @@
using HH.WCS.Mobox3.FJJT.models;
using SqlSugar;
using System;
using System.Collections.Generic;
namespace HH.WCS.Mobox3.FJJT {
    [SugarTable("TN_Container")]
    public class Container : BaseModel {
        public string S_CODE { get; set; }
        public string S_TYPE { get; set; }  // 1.胎面;2.胎侧;3.内衬;4.帘布;5.环带;6.冠带;7.钢包
        public int N_TYPE { get; set; }
        public string C_ENABLE { get; set; } = "Y";
        public int N_DETAIL_COUNT { get; set; }
        public int N_B_STATE { get; set; }
        public string S_LOCK_OP_CODE { get; set; }
        public string S_LOCK_STATE { get; set; }
        public int N_LOCK_STATE { get; set; }
        // --------------------福建佳通-----------------
        public int N_E_STATE { get; set; } = 0;  // 托盘异常状态  0.默认 1.WCS读码异常 2.AGV读码器读码异常 3.未查询到RFID的MES任务 4.RFID与任务RFID不一致 5.托盘物料不合格
        /// <summary>
        /// 获取容器类型string
        ///  cntrType: 1.胎面;2.胎侧;3.内衬;4.帘布;5.环带;6.冠带;7.钢包
        /// </summary>
        /// <param name="cntrType"></param>
        /// <returns></returns>
        internal static string GetCntrType(int cntrType)
        {
            var str = "";
            switch (cntrType)
            {
                case 1: str = "胎面"; break;
                case 2: str = "胎侧"; break;
                case 3: str = "内衬"; break;
                case 4: str = "帘布"; break;
                case 5: str = "环带"; break;
                case 6: str = "冠带"; break;
                case 7: str = "钢包"; break;
                case 8: str = "异常托盘"; break;
            }
            return str;
        }
        [SugarColumn(IsIgnore = true)]
        [Navigate(NavigateType.OneToMany, nameof(CntrItemRel.S_CNTR_CODE), nameof(S_CODE))]
        public List<CntrItemRel> CntrItemRels { get; set; }
    }
}