123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649 |
- using Newtonsoft.Json;
- using Newtonsoft.Json.Converters;
- using SqlSugar;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace WCS.Data.Models
- {
- public enum TASK_COMTYPEEnum
- {
- 入库 = 1,
- 出库 = 2,
- 移库 = 3,
- 搬运 = 4,
- 移动 = 5
- }
- public class WCS_TASK
- {
- /// <summary>
- /// WCS任务号
- /// </summary>
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
- public int TASK_NO { get; set; }
- /// <summary>
- /// WMS任务号
- /// </summary>
- public string TASK_WMSNO { get; set; }
- public int TASK_COMTYPE { get; set; }
- [SugarColumn(IsIgnore = true)]
- public TASK_COMTYPEEnum TASK_COMTYPECh
- {
- get
- {
- return (TASK_COMTYPEEnum)TASK_COMTYPE;
- }
- }
- /// <summary>
- /// 生成系统
- /// </summary>
- public string TASK_SYSTYPE { get; set; }
- /// <summary>
- /// 起始地址
- /// </summary>
- public string TASK_POSIDFROM { get; set; }
- /// <summary>
- /// 当前地址
- /// </summary>
- public string TASK_POSIDCUR { get; set; }
- /// <summary>
- /// 下一个地址
- /// </summary>
- public string TASK_POSIDNEXT { get; set; }
- /// <summary>
- /// 目标地址
- /// </summary>
- public string TASK_POSIDTO { get; set; }
- public string TASK_POSIDMOVE { get; set; }
- public int TASK_PRIORITY { get; set; }
- /// <summary>
- /// 状态
- /// </summary>
- public int TASK_WKSTATUS { get; set; }
- public string TASK_WHID { get; set; }
- public string TASK_ADDUSERNO { get; set; }
- /// <summary>
- /// 任务生成时间
- /// </summary>
- public DateTime TASK_ADDDATETIME { get; set; }
- public string TASK_EDITUSERNO { get; set; }
- /// <summary>
- /// 任务结束时间
- /// </summary>
- public DateTime TASK_EDITDATETIME { get; set; }
- /// <summary>
- /// 是否缠膜(1.缠膜;0.不缠膜)
- /// </summary>
- public string TASK_NOTES { get; set; }
- public string TASK_SRMNO { get; set; }
- /// <summary>
- /// rgv编号
- /// </summary>
- public string TASK_RGVNO { get; set; }
- public int TASK_ORDERTYPE { get; set; }
- /// <summary>
- /// 条码
- /// </summary>
- public string TASK_BOXBARCODE { get; set; }
- /// <summary>
- /// 起始巷道号
- /// </summary>
- public string TASK_FromTunnelNum { get; set; }
- /// <summary>
- /// 目标巷道号
- /// </summary>
- public string TASK_EndTunnelNum { get; set; }
- /// <summary>
- /// 熟化类型(0=不需熟化、1=熟化房熟化、2=小烘房熟化)
- /// </summary>
- public int TASK_MatureType { get; set; }
- /// <summary>
- /// 熟化时间
- /// </summary>
- public decimal TASK_MatureDate { get; set; }
- /// <summary>
- /// 重量
- /// </summary>
- public decimal TASK_WEIGHT { get; set; }
- /// <summary>
- /// 垛型
- /// </summary>
- public int TASK_STACKINGTYPE { get; set; }
- /// <summary>
- /// 熟化次数
- /// </summary>
- public int? MatureNum { get; set; }
- //{
- // get
- // {
- // if (TASK_MatureDate == 48)
- // {
- // return Convert.ToInt32(TASK_MatureDate) / 12;
- // }
- // else
- // {
- // return 1;
- // }
- // }
- //}
- /// <summary>
- /// 熟化温度(小数)
- /// </summary>
- public decimal TASK_MatureTemperat { get; set; }
- /// <summary>
- /// 进入熟化房时间
- /// </summary>
- public DateTime? TASK_InMatureRoomDate { get; set; }
- /// <summary>
- /// 离开熟化房时间
- /// </summary>
- public DateTime? TASK_OutMatureRoomDate { get; set; }
- /// <summary>
- /// 重量
- /// </summary>
- public decimal TASK_GrossWeight { get; set; }
- /// <summary>
- /// 是否缠膜(1.缠膜;0.不缠膜)
- /// </summary>
- public bool TASK_IsWrapFilm { get; set; }
- /// <summary>
- /// 预分配堆垛机出口输送线编号
- /// </summary>
- //public string TASK_SRMOUTCONVNO { get; set; }
- /// <summary>
- /// 机械手:子托盘的尺寸编码
- /// </summary>
- public string PalletizingSonTraySize { get; set; }
- /// <summary>
- /// 机械手:码垛的箱子尺寸编码
- /// </summary>
- public string PalletizingBoxSize { get; set; }
- /// <summary>
- /// 子托盘颜色编号(1蓝:,2:白,3:绿)
- /// </summary>
- public int? SonTrayColorNo { get; set; }
- /// <summary>
- /// 分组编号
- /// </summary>
- public string TASK_ITEM1 { get; set; }
- /// <summary>
- /// 托盘类型(1.原膜托盘 2.熟化架 3.成品托盘 4.空托盘组)
- /// </summary>
- public string TASK_ITEM2 { get; set; }
- /// <summary>
- /// 是否空盘(1.空盘 2.非空盘)
- /// </summary>
- public string TASK_ITEM3 { get; set; }
- /// <summary>
- /// RGV起点地址
- /// </summary>
- public string TASK_ITEM4 { get; set; }
- /// <summary>
- /// 原膜托盘上卷一条码(领料)
- /// </summary>
- public string TASK_ITEM5 { get; set; }
- /// <summary>
- /// 原膜托盘上卷二条码(领料)
- /// </summary>
- public string TASK_ITEM6 { get; set; }
- /// <summary>
- /// 预分配堆垛机巷道列表
- /// </summary>
- public string TASK_ITEM7 { get; set; }
- /// <summary>
- /// AGV任务Id
- /// </summary>
- public string TASK_ITEM8 { get; set; }
- /// <summary>
- /// 退料原膜卷条码一,(机械手:码垛的箱子尺寸编码)
- /// </summary>
- public string TASK_ITEM9 { get; set; }
- /// <summary>
- /// 退料原膜卷条码二,(机械手:子托盘的尺寸编码)
- /// </summary>
- public string TASK_ITEM10 { get; set; }
- ///// <summary>
- /////
- ///// </summary>
- //public string TASK_ITEM11 { get; set; }
- //public string TASK_ITEM12 { get; set; }
- //public string TASK_ITEM13 { get; set; }
- //public string TASK_ITEM14 { get; set; }
- //public string TASK_ITEM15 { get; set; }
- //public string TASK_ITEM16 { get; set; }
- [SugarColumn(IsIgnore = true)]
- public List<string> FromLocation
- {
- get
- {
- return TASK_POSIDFROM.Split('-').ToList();
- }
- }
- [SugarColumn(IsIgnore = true)]
- public string FromNo
- {
- get
- {
- return FromLocation[0];
- }
- }
- [SugarColumn(IsIgnore = true)]
- public int FromRow
- {
- get
- {
- try
- {
- return Convert.ToInt32(FromLocation[1]);
- }
- catch (Exception ex)
- {
- throw new Exception(string.Format("任务[{0}]起点地址[{1}]不正确,堆垛机无法执行。", TASK_NO, TASK_POSIDFROM));
- }
- }
- }
- [SugarColumn(IsIgnore = true)]
- public string TASK_POSIDTO_SHORT
- {
- get
- {
- if (TASK_POSIDTO.Length > 4)
- {
- return TASK_POSIDTO.Substring(0, 4);
- }
- else
- {
- return TASK_POSIDTO;
- }
- }
- }
- [SugarColumn(IsIgnore = true)]
- public int FromCol
- {
- get
- {
- try
- {
- return Convert.ToInt32(FromLocation[2]);
- }
- catch (Exception ex)
- {
- throw new Exception(string.Format("任务[{0}]起点地址[{1}]不正确,堆垛机无法执行。", TASK_NO, TASK_POSIDFROM));
- }
- }
- }
- [SugarColumn(IsIgnore = true)]
- public int FromLayer
- {
- get
- {
- try
- {
- return Convert.ToInt32(FromLocation[3]);
- }
- catch (Exception ex)
- {
- throw new Exception(string.Format("任务[{0}]起点地址[{1}]不正确,堆垛机无法执行。", TASK_NO, TASK_POSIDFROM));
- }
- }
- }
- [SugarColumn(IsIgnore = true)]
- public int FromDepth
- {
- get
- {
- try
- {
- return Convert.ToInt32(FromLocation[4]);
- }
- catch (Exception ex)
- {
- throw new Exception(string.Format("任务[{0}]起点地址[{1}]不正确,堆垛机无法执行。", TASK_NO, TASK_POSIDFROM));
- }
- }
- }
- [SugarColumn(IsIgnore = true)]
- public int FromSingleDepthRow
- {
- get
- {
- return 1;
- }
- }
- [SugarColumn(IsIgnore = true)]
- public List<string> ToLocation
- {
- get
- {
- return TASK_POSIDTO.Split('-').ToList();
- }
- }
- [SugarColumn(IsIgnore = true)]
- public string ToNo
- {
- get
- {
- return FromLocation[0];
- }
- }
- [SugarColumn(IsIgnore = true)]
- public int ToRow
- {
- get
- {
- try
- {
- return Convert.ToInt32(ToLocation[1]);
- }
- catch (Exception ex)
- {
- throw new Exception(string.Format("任务[{0}]目标地址[{1}]不正确,堆垛机无法执行。", TASK_NO, TASK_POSIDTO));
- }
- }
- }
- [SugarColumn(IsIgnore = true)]
- public int ToCol
- {
- get
- {
- try
- {
- return Convert.ToInt32(ToLocation[2]);
- }
- catch (Exception ex)
- {
- throw new Exception(string.Format("任务[{0}]目标地址[{1}]不正确,堆垛机无法执行。", TASK_NO, TASK_POSIDTO));
- }
- }
- }
- [SugarColumn(IsIgnore = true)]
- public int ToLayer
- {
- get
- {
- try
- {
- return Convert.ToInt32(ToLocation[3]);
- }
- catch (Exception ex)
- {
- throw new Exception(string.Format("任务[{0}]目标地址[{1}]不正确,堆垛机无法执行。", TASK_NO, TASK_POSIDTO));
- }
- }
- }
- [SugarColumn(IsIgnore = true)]
- public int ToDepth
- {
- get
- {
- try
- {
- return Convert.ToInt32(ToLocation[4]);
- }
- catch (Exception)
- {
- throw new Exception(string.Format("任务[{0}]目标地址[{1}]不正确,堆垛机无法执行。", TASK_NO, TASK_POSIDTO));
- }
- }
- }
-
- public WCS_TASK QainClone()
- {
- return MemberwiseClone() as WCS_TASK;
- }
- }
- public class WCS_TASK_DTL
- {
- [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
- public string ID { get; set; }
- public int PARENTID { get; set; }
- public int TASKNO { get; set; }
- public string POSIDCUR { get; set; }
- public string POSIDNEXT { get; set; }
- public string DESCRIPTION { get; set; }
- public string NOTES { get; set; }
- public DateTime EXECUTEDATE { get; set; }
- }
- public class WCS_TASK_DIS
- {
- /// <summary>
- /// WCS任务号
- /// </summary>
- [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
- public int TASK_NO { get; set; }
- /// <summary>
- /// WMS任务号
- /// </summary>
- public string TASK_WMSNO { get; set; }
- public int TASK_COMTYPE { get; set; }
- public string TASK_SYSTYPE { get; set; }
- public string TASK_POSIDFROM { get; set; }
- public string TASK_POSIDCUR { get; set; }
- public string TASK_POSIDNEXT { get; set; }
- public string TASK_POSIDTO { get; set; }
- public string TASK_POSIDMOVE { get; set; }
- public int TASK_PRIORITY { get; set; }
- public int TASK_WKSTATUS { get; set; }
- public string TASK_WHID { get; set; }
- public string TASK_SRMNO { get; set; }
- /// <summary>
- /// rgv工位
- /// </summary>
- public string TASK_RGVNO { get; set; }
- public int TASK_ORDERTYPE { get; set; }
- public string TASK_BOXBARCODE { get; set; }
- /// <summary>
- /// 起始巷道号
- /// </summary>
- public string TASK_FromTunnelNum { get; set; }
- /// <summary>
- /// 目标巷道号
- /// </summary>
- public string TASK_EndTunnelNum { get; set; }
- /// <summary>
- /// 熟化类型(0=不需熟化、1=熟化房熟化、2=小烘房熟化)
- /// </summary>
- public int TASK_MatureType { get; set; }
- /// <summary>
- /// 熟化时间(小时:10,16)
- /// </summary>
- public decimal TASK_MatureDate { get; set; }
- /// <summary>
- /// 熟化温度(小数)
- /// </summary>
- public decimal TASK_MatureTemperat { get; set; }
- /// <summary>
- /// 进入熟化房时间
- /// </summary>
- public DateTime? TASK_InMatureRoomDate { get; set; }
- /// <summary>
- /// 离开熟化房时间
- /// </summary>
- public DateTime? TASK_OutMatureRoomDate { get; set; }
- /// <summary>
- /// 重量
- /// </summary>
- public decimal TASK_GrossWeight { get; set; }
- /// <summary>
- /// 是否缠膜(1.缠膜;0.不缠膜)
- /// </summary>
- public bool TASK_IsWrapFilm { get; set; }
- public string TASK_ADDUSERNO { get; set; }
- public DateTime TASK_ADDDATETIME { get; set; }
- public string TASK_EDITUSERNO { get; set; }
- public DateTime TASK_EDITDATETIME { get; set; }
- public string TASK_DELETEUSER { get; set; }
- public DateTime TASK_DELETEDATE { get; set; }
- public string TASK_NOTES { get; set; }
- /// <summary>
- /// 机械手:子托盘的尺寸编码
- /// </summary>
- public string PalletizingSonTraySize { get; set; }
- /// <summary>
- /// 机械手:码垛的箱子尺寸编码
- /// </summary>
- public string PalletizingBoxSize { get; set; }
- /// <summary>
- /// 子托盘颜色编号(1,2,3)
- /// </summary>
- public int? SonTrayColorNo { get; set; }
- /// <summary>
- /// 预分配堆垛机出口输送线编号
- /// </summary>
- //public string TASK_SRMOUTCONVNO { get; set; }
- public string TASK_ITEM1 { get; set; }
- public string TASK_ITEM2 { get; set; }
- public string TASK_ITEM3 { get; set; }
- public string TASK_ITEM4 { get; set; }
- public string TASK_ITEM5 { get; set; }
- public string TASK_ITEM6 { get; set; }
- public string TASK_ITEM7 { get; set; }
- public string TASK_ITEM8 { get; set; }
- public string TASK_ITEM9 { get; set; }
- public string TASK_ITEM10 { get; set; }
- }
- public class WCS_TASK_DIS_DTL
- {
- [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
- public string ID { get; set; }
- public int PARENTID { get; set; }
- public int TASKNO { get; set; }
- public string POSIDCUR { get; set; }
- public string POSIDNEXT { get; set; }
- public string DESCRIPTION { get; set; }
- public string NOTES { get; set; }
- public DateTime EXECUTEDATE { get; set; }
- }
- /// <summary>
- /// json属性值转为日期
- /// </summary>
- public class DateConverter : IsoDateTimeConverter
- {
- /// <summary>
- /// 类构造
- /// </summary>
- public DateConverter()
- {
- base.DateTimeFormat = "yyyy-MM-dd HH:mm:ss";
- }
- }
- public class WCS_TASKTIMEPOINT
- {
- public WCS_TASKTIMEPOINT()
- {
- }
- /// <summary>
- /// Desc:站台号
- /// Default:
- /// Nullable:True
- /// </summary>
- [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
- public string F_NO { get; set; }
- /// <summary>
- /// Desc:是否暂停
- /// Default:
- /// Nullable:False
- /// </summary>
- public int F_ISSTOP { get; set; }
- /// <summary>
- /// Desc:是否删除
- /// Default:
- /// Nullable:False
- /// </summary>
- public int F_ISDELETE { get; set; }
- /// <summary>
- /// Desc:容器条码
- /// Default:
- /// Nullable:True
- /// </summary>
- public string F_BOXBARCODE { get; set; }
- /// <summary>
- /// Desc:去处(1:入库 2.移动至收货口 3.堆垛机码盘)
- /// Default:
- /// Nullable:True
- /// </summary>
- public int? F_POSIDTOTYPE { get; set; }
- /// <summary>
- /// Desc:超时时长S
- /// Default:
- /// Nullable:True
- /// </summary>
- public string F_OVERTIME { get; set; }
- /// <summary>
- /// Desc:创建用户编码
- /// Default:
- /// Nullable:True
- /// </summary>
- public string F_ADDUSERNO { get; set; }
- /// <summary>
- /// Desc:创建用户姓名
- /// Default:
- /// Nullable:True
- /// </summary>
- public string F_ADDUSERNAME1 { get; set; }
- /// <summary>
- /// Desc:创建日期
- /// Default:
- /// Nullable:True
- /// </summary>
- public DateTime? F_ADDDATETIME { get; set; }
- /// <summary>
- /// Desc:编辑用户
- /// Default:
- /// Nullable:True
- /// </summary>
- public string F_EDIUSERNO { get; set; }
- /// <summary>
- /// Desc:编辑用户姓名
- /// Default:
- /// Nullable:True
- /// </summary>
- public string F_EDIUSERNAME { get; set; }
- /// <summary>
- /// Desc:编辑日期
- /// Default:
- /// Nullable:True
- /// </summary>
- public DateTime? F_EDITDATETIME { get; set; }
- /// <summary>
- /// 目标地址列表(逗号分隔)
- /// </summary>
- public string F_POSIDTO { get; set; }
- /// <summary>
- /// 生产线下料位置
- /// </summary>
- public string F_PROLINEUPMATPOS { get; set; }
- /// <summary>
- /// 是否回库
- /// </summary>
- public bool F_ISBACK { get; set; }
- /// <summary>
- /// 是否钢平台拣选位置
- /// </summary>
- public string F_ITEM1 { get; set; }
- public string F_ITEM2 { get; set; }
- public string F_ITEM3 { get; set; }
- public string F_ITEM4 { get; set; }
- public string F_ITEM5 { get; set; }
- }
- }
|