using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Ys.Core.Common; using FreeSql.DataAnnotations; namespace djy.Paas.Model { /// /// GVm箱体数据 /// public class tb_vgm_SendBoxInfo : DataBase { /// /// Vgm订单 Guid /// public Guid? VgmGid { get; set; } /// /// 请求源类型 0 自身客户的客户 1 来源对接系统 /// public int Rootin { get; set; } /// /// 序号 /// public int Index { get; set; } /// /// 提交日志code /// public string LogsCode { get; set; } /// /// 主日志 用于存储返回数据状态等信息 /// public bool IsMain { get; set; } = false; /// /// 箱子类型尺寸 /// public string BoxType { get; set; } /// /// 箱量 /// public int BoxCount { get; set; } /// /// 箱号 /// public string Code { get; set; } /// /// 封号 /// public string SealCode { get; set; } /// /// 毛重 /// public double Weigth { get; set; } /// /// 皮重 /// public double WeigthTare { get; set; } /// /// 称重重量 VGM /// public double WeigthTotal{ get; set; } /// /// 件数 /// public int Pkgs { get; set; } /// /// 尺寸 立方米 /// [Column(Scale =4)] public decimal Cbm { get; set; } /// /// 称重方式 /// public string WeigthType { get; set; } private string _WeigthTypeName = ""; /// /// 请求返回URl多个 ,间隔 /// [Column(StringLength =2000)] public string RetrunUrl { get; set; } /// /// 称重方名称 /// [Column(IsIgnore =true)] public string WeigthTypeName { set { _WeigthTypeName = value; } get { return _WeigthTypeName.IsNull() ? GetWegthType(WeigthType, 1):_WeigthTypeName; } } /// /// 请求返回的数据 /// [Column(StringLength =500)] public string Gethtml { get; set; } /// /// 称重方式转换 /// /// /// 默认1 1 key to name, 2 key to code /// public string GetWegthType(string obj, int type=1) { var str = ""; var list =new Dictionary(); list.Add("SM2", "累加(SM2)"); list.Add("SM1", "称重(SM1)"); try { str = type == 1?list[obj] : list.Where(w => w.Value == obj).First().Key; } catch { } return str; } #region /// /// 提单编号 /// [Column(IsIgnore =true)] public string SendOrderCode { get; set; } /// /// 客户名称 /// [Column(IsIgnore = true)] public string CustomerName { get; set; } /// /// 订舱代理名称 /// [Column(IsIgnore = true)] public string AgentName { get; set; } #endregion } }