using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pms.WebHandle
{
    public class SKClentOrder
    {
        public string agvid { get; set; } = "0";//
        public string taskid { get; set; } = "0";//
        
        public string source { get; set; } = "";//取货地址
        public string target { get; set; } = "";//卸货地址str
        //public int tasktype { get; set; } = 0;
        //public int prio { get; set; } = 1;
        //public string WhsId { get; set; } = "";
        //public string OrgId { get; set; } = "";
    }

    public class SKClentOrderResponse
    {
        public string code { get; set; } = "";//0：成功；其他：失败
        public string taskid { get; set; } = "";
    }



    public class ClentOrderCancel
    {
        public string agvid { get; set; } = "0";//
        public string taskid { get; set; } = "0";//
    }
    public class ClentOrderCancelResponse
    {
        public string code { get; set; } = "";//0：成功；其他：失败
    }

    public class ClentOrderRedirection
    {
        public string agvid { get; set; } = "0";//
        public string taskid { get; set; } = "0";//
        public string direction { get; set; } = "0";//变更的下料点
    }
    public class ClentOrderRedirectionResponse
    {
        public string code { get; set; } = "";//0：成功；其他：失败
    }


    public class AGVState
    {
        public int agvid { get; set; } = 0;//
        public int state { get; set; } = 0;
        public string fault { get; set; } = "";//故障
        public int power { get; set; } = 0;//
        public int x { get; set; } = 0;
        public int y { get; set; } = 0;//
        public int angle { get; set; } = 0;
        public string taskid { get; set; } = "0";//
        public string updatetime { get; set; } ="";//DateTime.MinValue
    }
    public class AGVStateResponse
    {
        public string code { get; set; } = "";//0：成功；其他：失败
    }

    public class TaskState
    {
        public string taskid { get; set; } = "0";//
        public int taskstate { get; set; } = 0;//0、未执行，1、下发到NDC,2、绑定AGV，3、前往取货点，4、取货完成，5、前往卸货点，6、卸货完成，7、任务完成,8、任务取消
        public int faultcode{ get; set; } = 0;//0、无异常，1、WCS请求取消任务，2、调度系统手动删除任务，3、NDC系统删除，4、未知原因
        public string  agvid{ get; set; } = "";//errorLocation
        public string updatetime { get; set; } = "";//DateTime.MinValue
    }
    public class TaskStateResponse
    {
        public string code { get; set; } = "";//0：成功；其他：失败
    }



    //以下暂未用到
    public class TCLClientOrderCompleted
    {
        public string FacCode { get; set; } = "";
        public string ShopCode { get; set; } = "";
        public string PalletNo { get; set; } = "";

        //新增
        public string ContainerNo { get; set; } = "";
        public string TpNo { get; set; } = "";
        public string PickingNo { get; set; } = "";
        public string Type { get; set; } = "";
    }
    public class TCLClientOrderCompletedFeedBack
    {
        public string Message { get; set; } = "";
        public string State { get; set; } = "";
    }

    public class TCLClientDownPositionRequest
    {
        public string FacCode { get; set; } = "";
        public string ShopCode { get; set; } = "";
        public string PalletNo { get; set; } = "";
    }
    public class TCLClientDownPositionRequestFeedBack
    {
        public string Message { get; set; } = "";
        public string State { get; set; } = "";
        public DATA[] data;
    }

    public class TCLClentWMSOrder
    {
        public string FacCode { get; set; } = "";//
        public string ShopCode { get; set; } = "";//车间代码 floorID
        public string Type { get; set; } = "";//3
        public string PickingNo { get; set; } = "";//备货单
        public string ContainerNo { get; set; } = "";
        public string TpNo { get; set; } = "";//TP单
        public string PalletNo { get; set; } = "";
        public string OcNo { get; set; } = "";//批次号
        public string FromWhere { get; set; } = "";//源仓库
        public string FromArea { get; set; } = "";//源库区
        public string FromStorage { get; set; } = "";//源库位
        public string WhsCode { get; set; } = "";//目标仓库
        public string AreaCode { get; set; } = "";//目标库区
        public string StorageCode { get; set; } = "";//目标库位
    }

    public class TCLClentWMSOrderResponse
    {
        public int code { get; set; } = 202;//200：成功；202：失败
        public string message { get; set; } = "";
    }

    public class DATA
    {
        public string FacCode { get; set; } = "";
        public string ShopCode { get; set; } = "";
        public string PalletNo { get; set; } = "";
        public string WhsCode { get; set; } = "";
        public string AreaCode { get; set; } = "";
        public string StorageCode { get; set; } = "";
    }
}

