分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-03-06 5662395113163ac87425f23aa0bff8853be92462
优化逻辑
已修改11个文件
已添加1个文件
354 ■■■■ 文件已修改
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/dt_stationinfo.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/Gantry.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/PipelineJob.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/OutboundTask.cs 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/StationTask.cs 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Client/src/views/widesea_wms/system/dt_inventory.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Client/src/views/widesea_wms/system/dt_stationinfo.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/DomainModels/System/dt_stationinfo.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/Gantry/QueryData.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_stationinfoService.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/新增设备协议/太重交互-库口状态_V1.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/dt_stationinfo.cs
@@ -144,5 +144,12 @@
        [Column(TypeName = "nvarchar(50)")]
        public string heatNumber { get; set; }
        /// <summary>
        ///托盘类型
        /// </summary>
        [Display(Name = "托盘类型")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        public string tray_type { get; set; }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Common/Gantry.cs
@@ -221,37 +221,44 @@
                    if (!Request) continue;
                    var Stations = stationinfoRepository.Find(x => x.area == PipelineJob.area_code(name));
                    foreach (var station in Stations)
                    {
                        if (!station.enable)
                            client.WriteByOrder("W_Enabl_Load", false, name);//信号为false桁架停止进入
                    }
                    var NGStation = "X01001003";
                    if (name == "2单元下料区") NGStation = "X02001003";
                    if (name == "3单元下料区") NGStation = "X03001002";
                    var Wheel_Type = (Int32)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Wheel_Type").First(), client);//车轮类型
                    var Wheel_id = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Wheel_id").First(), client).ToString();//车轮SN号
                    foreach (var station in Stations)
                    {
                        if (!station.enable || station.location_state == LocationStateEnum.Empty.ToString())
                            client.WriteByOrder("W_Enabl_Load", false, name);//信号为false桁架停止进入
                    }
                    var Wheel_Type = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Wheel_Type").First(), client);//车轮类型
                    var Wheel_id = client.ReadByOrder<string>("R_Wheel_id", name);//车轮SN号
                    //var Wheel_id = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Wheel_id").First(), client).ToString();
                    var mes_Detail = mes_DetailRepository.FindFirst(x => x.SN == Wheel_id);
                    var mes_Head = mes_HeadRepository.FindFirst(x => x.jobID == mes_Detail.jobID);
                    var wheel = PipelineJob.QueryMateriel(mes_Head.drawingNo);
                    var PartStatus = (Int32)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_PartStatus").First(), client);//1:ok;2:nok
                    if (PartStatus == 1)
                    var PartStatus = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_PartStatus").First(), client);//1:ok;2:nok
                    if ((Int16)PartStatus == 1)
                    {
                        var Stationinfo = Stations
                        .Where(x => x.enable
                        && x.stationCode != NGStation
                        && x.location_state == LocationStateEnum.Stroge.ToString()
                        && x.quantity < 5
                        && x.stationType == PipelineJob.QueryMateriel(Wheel_Type)
                        && x.stationType == mes_Head.drawingNo
                        && x.tray_type == (wheel.e < 1100 ? "SmallTray" : "LargeTray")
                        && x.Number == mes_Detail.jobID
                        && x.heatNumber == mes_Detail.heatID).FirstOrDefault();
                        && x.heatNumber == mes_Detail.heatID)
                        .OrderByDescending(x => x.quantity)
                        .FirstOrDefault();
                        if (Stationinfo == null)
                            Stationinfo = Stations.Where(x => x.enable && x.stationCode != NGStation && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity == 0).FirstOrDefault();
                        if (Stationinfo != null)
                        {
                            var Pipelinedetails = plcRepository.Find(x => x.plcdetail_iotype == Pipelineplc.plcinfo_iotyep && x.plcdetail_number == Stationinfo.stationCode).ToList();
                            var PalletSignal = (Int16)DBExtension.Read(Pipelinedetails.Where(x => x.plcdetail_name == "R_PalletSignal").First(), client);//读取托盘信号:1:有,2无
                            var PalletSignal = (Int16)DBExtension.Read(Pipelinedetails.Where(x => x.plcdetail_name == "R_PalletSignal").First(), Pipeline_client);//读取托盘信号:1:有,2无
                            //var Wheel_id = client.ReadByOrder<string>("R_Wheel_id", name);
                            if (PalletSignal == 1)
                            {
                                var SNS = Stationinfo.bindSN.Split(",");
@@ -271,21 +278,22 @@
                                }
                                var area = Convert.ToInt16(Stationinfo.stationCode.Substring(Stationinfo.stationCode.Length - 1, 1));
                                client.WriteByOrder("W_AreaNr", (Int16)area, name);//区域货位号
                                client.WriteByOrder("W_IndexNr", (Int16)Stationinfo.quantity + 1, name);//托盘上的第几个车轮
                                client.WriteByOrder("W_IndexNr", (Int16)(Stationinfo.quantity + 1), name);//托盘上的第几个车轮
                                client.WriteByOrder("W_Storage_Type", (Int16)1, name);//托盘类型1-横放;2-竖放(暂时只有横放托盘)
                                client.WriteByOrder("W_Enabl_Load", true, name);//是否允许
                                return;
                            }
                        }
                    }
                    else if (PartStatus == 2)
                    else if ((Int16)PartStatus == 2)
                    {
                        var Stationinfo = Stations
                        .Where(x => x.enable
                        && x.stationCode == NGStation
                        && x.location_state == LocationStateEnum.Stroge.ToString()
                        && x.quantity < 5
                        && x.stationType == PipelineJob.QueryMateriel(Wheel_Type)
                        && x.stationType == mes_Head.drawingNo
                        && x.tray_type == (wheel.e < 1100 ? "SmallTray" : "LargeTray")
                        && x.Number == mes_Detail.jobID
                        && x.heatNumber == mes_Detail.heatID).FirstOrDefault();
                        if (Stationinfo != null)
@@ -311,7 +319,7 @@
                                }
                                var area = Convert.ToInt16(Stationinfo.stationCode.Substring(Stationinfo.stationCode.Length - 1, 1));
                                client.WriteByOrder("W_AreaNr", (Int16)area, name);//区域货位号
                                client.WriteByOrder("W_IndexNr", (Int16)Stationinfo.quantity + 1, name);//托盘上的第几个车轮
                                client.WriteByOrder("W_IndexNr", (Int16)(Stationinfo.quantity + 1), name);//托盘上的第几个车轮
                                client.WriteByOrder("W_Storage_Type", (Int16)1, name);//托盘类型1-横放;2-竖放(暂时只有横放托盘)
                                client.WriteByOrder("W_Enabl_Load", true, name);//是否允许
                                return;
@@ -352,9 +360,9 @@
                        station.bindSN = station.bindSN == string.Empty ? Wheel_id : station.bindSN + "," + Wheel_id;
                        if (station.quantity == 0)
                        {
                            station.stationType = Wheel_id;
                            station.Number = Wheel_id;
                            station.heatNumber = Wheel_id;
                            station.stationType = mes_Head.drawingNo;
                            station.Number = mes_Head.jobID;
                            station.heatNumber = mes_Detail.heatID;
                        }
                        var count = stationinfoRepository.Update(station);
                        if (count < 1)
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs
@@ -34,7 +34,8 @@
            //Creation.HCJCreation();
            //Creation.PLCinfodetail();
            StationTask.CreateTask();
            //StationTask.CreateTask();
            //OutboundTask.CreateOutboundTask();
        }
    }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/PipelineJob.cs
@@ -121,7 +121,7 @@
                        Gantry_client.WriteByOrder("W_AreaNr", (Int16)area, number);//区域货位号
                        Gantry_client.WriteByOrder("W_IndexNr", (Int16)SNS.Length, number);//托盘上的第几个车轮
                        Gantry_client.WriteByOrder("W_Storage_Type", (Int16)1, number); //托盘类型1-横放;2-竖放
                        Gantry_client.WriteByOrder("W_Wheel_Type", (Int16)Convert.ToInt16(QueryMateriel(Station.stationType)), number);//车轮类型
                        Gantry_client.WriteByOrder("W_Wheel_Type", (Int16)Convert.ToInt16(QueryMateriel(Station.stationType).TypeId), number);//车轮类型
                        Gantry_client.WriteByOrder("W_Wheel_id", SNS[SNS.Length - 1], number);//车轮SN号
                        Gantry_client.WriteByOrder("W_RequestUnload", true, number);
                    }
@@ -196,12 +196,12 @@
            return Newsn;
        }
        private int QueryMateriel(string type)
        {
        public static dt_geometry_data QueryMateriel(string type)
        {
            VOLContext Context = new VOLContext();
            Idt_geometry_dataRepository dataRepository = new dt_geometry_dataRepository(Context);
            var materielinfo = dataRepository.FindFirst(x => x.Description == type);
            return materielinfo.TypeId;
            return materielinfo;
        }
        public static string QueryMateriel(int  typeId)
        {
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/OutboundTask.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,106 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.Xml;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Comm;
using WIDESEA_Comm.TaskNo;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.FreeDB;
using WIDESEA_Entity.DomainModels;
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.Repositories;
using static FreeSql.Internal.GlobalFilter;
using static System.Collections.Specialized.BitVector32;
namespace WIDESEA_WCS.JobsPart.Common
{
    public class OutboundTask
    {
        static FreeDB freeDB = new FreeDB();
        /// <summary>
        /// åˆ›å»ºå‡ºåº“任务
        /// </summary>
        public static void CreateOutboundTask()
        {
            try
            {
                VOLContext context = new VOLContext();
                Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(context);
                var mes_heads = freeDB.Select<dt_mes_head>().Where(x => x.processCode == "28").OrderBy(x => x.expectedStartTime).ToList();
                foreach (var mes_head in mes_heads)
                {
                    //var inventorys = freeDB.Select<dt_inventory>().Where(x => x.FigureNumber == mes_head.drawingNo).OrderBy.ToList();
                    var station = stationinfoRepository.Find(x => x.stationType == mes_head.drawingNo && x.line != x.line).OrderBy(x => x.line).ThenByDescending(x => x.column).FirstOrDefault();
                    bool ok = false;
                    List<string> list = new List<string>();
                    if (station != null && station.location_state == LocationStateEnum.Stroge.ToString() && station.enable)
                    {
                        var SNS = station.bindSN.Split(",");
                        foreach (var SN in SNS)
                        {
                            if (!string.IsNullOrEmpty(SN))
                                list.Add(SN);
                        }
                    }
                    foreach (var SN in list)
                    {
                        if (ok = freeDB.Select<dt_mes_detail>().Where(x => x.jobID == mes_head.jobID && x.SN == SN).Any()) continue;
                    }
                    if (ok)
                    {
                        dt_agvtask agvtask = new dt_agvtask()
                        {
                            agv_fromaddress = station.stationCode,
                            agv_id = Guid.NewGuid(),
                            agv_tasknum = IdenxManager.GetTaskNo("KH-", "WMS"),
                            agv_grade = 1,
                            agv_createtime = DateTime.Now,
                            agv_taskstate = "Queue",
                            agv_materielid = station.stationType,
                            agv_qty = station.quantity,
                            agv_tasktype = "TaskType_Outbound",
                            agv_toaddress = "",
                            agv_userid = "系统",
                            bindSN = station.bindSN,
                            agv_worktype = Convert.ToInt32(mes_head.processCode),
                            agv_materbarcode = mes_head.materialCode,
                            agv_barcode = station.tray_type
                        };
                        dt_stationinfo TargetLocation = GetEmptyLocation(stationinfoRepository);
                        if (TargetLocation != null)
                        {
                            agvtask.agv_taskstate = "Create";
                            agvtask.agv_toaddress = TargetLocation.stationCode;
                            TargetLocation.location_state = LocationStateEnum.Busy.ToString();
                            freeDB.Update(TargetLocation);
                        }
                        freeDB.Add(agvtask);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
        private static dt_stationinfo GetEmptyLocation(Idt_stationinfoRepository stationinfoRepository)
        {
            dt_stationinfo TargetLocation = null;
            var stations = stationinfoRepository.Find(x => x.stationCode.Contains("S01001"));
            foreach (var station in stations)
            {
                TargetLocation = stationinfoRepository.FindFirst(x => x.stationCode == station.stationCode && x.location_state == LocationStateEnum.Empty.ToString() && x.enable);
                if (TargetLocation != null) continue;
            }
            if (TargetLocation == null)
            {
                throw new Exception("检测线上料位已满");
            }
            return TargetLocation;
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/StationTask.cs
@@ -10,6 +10,7 @@
using WIDESEA_Entity.DomainModels;
using WIDESEA_Comm;
using static System.Collections.Specialized.BitVector32;
using WIDESEA_Comm.TaskNo;
namespace WIDESEA_WCS.JobsPart.Common
{
@@ -17,73 +18,105 @@
    {
        static FreeDB freeDB = new FreeDB();
        /// <summary>
        /// åˆ›å»ºå…¥åº“任务
        /// </summary>
        public static void CreateTask()
        {
            VOLContext context = new VOLContext();
            Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(context);
            Idt_WorkinfoRepository workinfoRepository = new dt_WorkinfoRepository(context);
            List<dt_stationinfo> stationinfos = stationinfoRepository.Find(x => x.stationCode.Contains('X'));
            foreach (var item in stationinfos)
            try
            {
                //根据下料口的绑定信息查询对应工单,检测此工单是否已完成  å®Œæˆå³å¯å°†å…¶é€å…¥åº“
                VOLContext context = new VOLContext();
                Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(context);
                Idt_WorkinfoRepository workinfoRepository = new dt_WorkinfoRepository(context);
                dt_mes_head mesinfo = freeDB.Select<dt_mes_head>().Where(x => x.jobID == item.Number).First();
                dt_geometry_data dt_Geometry_Data = freeDB.Select<dt_geometry_data>().Where(x => x.Description == mesinfo.drawingNo).First();
                int CompeletedNum = Convert.ToInt32(mesinfo.quantity) - Convert.ToInt32(mesinfo.finishNum);
                List<dt_stationinfo> stationinfos = stationinfoRepository.Find(x => x.stationCode.Contains('X'));
                //判定任务是否已创建//如已存在
                if (freeDB.Select<dt_agvtask>().Where(x => x.agv_fromaddress == item.stationCode).Count() > 0)
                    continue;
                if (item.quantity == 5 || CompeletedNum == 0)  //循环读取车轮数为5或者订单已完成数量的下料口    â†’工单人工关闭的工单
                foreach (var item in stationinfos)
                {
                    //根据下料口的绑定信息查询对应工单,检测此工单是否已完成  å®Œæˆå³å¯å°†å…¶é€å…¥åº“
                    dt_mes_head mesinfo = freeDB.Select<dt_mes_head>().Where(x => x.jobID == item.Number).First();
                    dt_geometry_data dt_Geometry_Data = freeDB.Select<dt_geometry_data>().Where(x => x.Description == mesinfo.drawingNo).First();
                    int CompeletedNum = Convert.ToInt32(mesinfo.quantity) - Convert.ToInt32(mesinfo.finishNum);
                    if (mesinfo.quantity <= 50 || item.stationCode.Contains("3"))    //小于50件直接出库
                    //判定任务是否已创建//如已存在
                    if (freeDB.Select<dt_agvtask>().Where(x => x.agv_fromaddress == item.stationCode).Count() > 0)
                        continue;
                    if (item.quantity == 5 || CompeletedNum == 0)  //循环读取车轮数为5或者订单已完成数量的下料口    â†’工单人工关闭的工单
                    {
                        //var station =
                        //todo å¯»æ‰¾å¯æ”¾è´§å¤–协放货台
                        dt_agvtask agvtask = new dt_agvtask()
                        {
                            agv_fromaddress = item.stationCode,
                            agv_id = Guid.NewGuid(),
                            agv_grade = 0,
                            agv_barcode = "",
                            agv_createtime = DateTime.Now,
                            agv_taskstate = TaskStatus.Created.ToString(),
                            //agv_toaddress = ,
                        };
                        freeDB.Add(agvtask);
                    }
                    else
                    {
                        dt_stationinfo TargetLocation = GetEmptyLocation(stationinfoRepository, mesinfo, item, CompeletedNum, dt_Geometry_Data.e);
                        if (TargetLocation != null)
                        if (mesinfo.quantity <= 50 || item.stationCode.Contains("3"))    //小于50件直接出库
                        {
                            //todo:  è°ƒç”¨WMS接口创建任务
                            dt_agvtask agvtask = new dt_agvtask()
                            dt_stationinfo TargetLocation = GetEmptyLocation(stationinfoRepository);
                            //todo å¯»æ‰¾å¯æ”¾è´§å¤–协放货台
                            if (TargetLocation != null)
                            {
                                agv_fromaddress = item.stationCode,
                                agv_id = Guid.NewGuid(),
                                agv_grade = 0,
                                agv_barcode = "",
                                agv_createtime = DateTime.Now,
                                agv_taskstate = TaskStatus.Created.ToString(),
                                agv_toaddress = TargetLocation.stationCode,
                            };
                                dt_agvtask agvtask = new dt_agvtask()
                                {
                                    agv_fromaddress = item.stationCode,
                                    agv_id = Guid.NewGuid(),
                                    agv_tasknum = IdenxManager.GetTaskNo("KH-", "WMS"),
                                    agv_grade = 1,
                                    agv_createtime = DateTime.Now,
                                    agv_taskstate = "Create",
                                    agv_materielid = item.stationType,
                                    agv_qty = item.quantity,
                                    agv_tasktype = "TaskType_OutsourceInbound",
                                    agv_toaddress = TargetLocation.stationCode,
                                    agv_userid = "系统",
                                    bindSN = item.bindSN,
                                    agv_worktype = Convert.ToInt32(mesinfo.processCode),
                                    agv_materbarcode = mesinfo.materialCode,
                                    agv_barcode=item.tray_type
                                };
                            freeDB.Add(agvtask);
                            TargetLocation.location_state = LocationStateEnum.Busy.ToString();
                            freeDB.Update(TargetLocation);
                                freeDB.Add(agvtask);
                                TargetLocation.location_state = LocationStateEnum.Busy.ToString();
                                freeDB.Update(TargetLocation);
                            }
                        }
                        else
                        {
                            dt_stationinfo TargetLocation = GetEmptyLocation(stationinfoRepository, mesinfo, item, CompeletedNum, dt_Geometry_Data.e);
                            if (TargetLocation != null)
                            {
                                //todo:  è°ƒç”¨WMS接口创建任务
                                dt_agvtask agvtask = new dt_agvtask()
                                {
                                    agv_fromaddress = item.stationCode,
                                    agv_id = Guid.NewGuid(),
                                    agv_tasknum = IdenxManager.GetTaskNo("KH-", "WMS"),
                                    agv_grade = 1,
                                    agv_createtime = DateTime.Now,
                                    agv_taskstate = "Create",
                                    agv_materielid = item.stationType,
                                    agv_qty = item.quantity,
                                    agv_tasktype = "TaskType_Inbound",
                                    agv_toaddress = TargetLocation.stationCode,
                                    agv_userid = "系统",
                                    bindSN = item.bindSN,
                                    agv_worktype = Convert.ToInt32(mesinfo.processCode),
                                    agv_materbarcode = mesinfo.materialCode,
                                    agv_barcode=item.tray_type
                                };
                                freeDB.Add(agvtask);
                                TargetLocation.location_state = LocationStateEnum.Busy.ToString();
                                freeDB.Update(TargetLocation);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
        /// <summary>
@@ -248,6 +281,22 @@
            return TargetLocation;
        }
        private static dt_stationinfo GetEmptyLocation(Idt_stationinfoRepository stationinfoRepository)
        {
            dt_stationinfo TargetLocation = null;
            List<string> target = new List<string>() { "W01001001", "W01001002", "W01001003" };
            foreach (var item in target)
            {
                TargetLocation = stationinfoRepository.FindFirst(x => x.stationCode == item && x.location_state == LocationStateEnum.Empty.ToString() && x.enable);
                if (TargetLocation != null) continue;
            }
            if (TargetLocation == null)
            {
                throw new Exception("外协入库口已满");
            }
            return TargetLocation;
        }
        /// <summary>
        /// æ ¹æ®è®¢å•数量返回库区(暂时弃用)   //更换为库位类型匹配
        /// </summary>
´úÂë¹ÜÀí/WMS/WMS_Client/src/views/widesea_wms/system/dt_inventory.vue
@@ -36,7 +36,7 @@
            const columns = ref([{field:'SN',title:'车轮SN号',type:'string',width:220,align:'left',sort:true},
                       {field:'Name',title:'产品名称',type:'string',width:220,align:'left'},
                       {field:'FigureNumber',title:'产品图号',type:'string',width:220,align:'left'},
                       {field:'HearthNumber',title:'熔炼炉号',type:'string',width:220,align:'left'},
                       {field:'area',title:'区域代码',type:'string',width:220,align:'left'},
                       {field:'HeatNumber',title:'炉代号',type:'string',width:110,align:'left'},
                       {field:'BilletNumber',title:'钢坯号',type:'int',width:110,align:'left'},
                       {field:'OnlineTime',title:'入库时间',type:'datetime',width:150,align:'left',sort:true},
´úÂë¹ÜÀí/WMS/WMS_Client/src/views/widesea_wms/system/dt_stationinfo.vue
@@ -34,7 +34,7 @@
                              [{"title":"图号","field":"stationType"}],
                              [{"dataKey":"location_states","data":[],"title":"货位状态","field":"location_state","type":"select"}],
                              [{"title":"车轮SN号","field":"bindSN"}],
                              [{"dataKey":"tray_status","data":[],"title":"托盘状态","field":"tray_status","type":"select"}],
                              [{"dataKey":"tray_types","data":[],"title":"托盘类型","field":"tray_type","type":"select"}],
                              [{"title":"工单编号","field":"Number"}],
                              [{"title":"炉号","field":"heatNumber","type":"text"}],
                              [{"title":"备注","field":"remark"}]]);
@@ -49,7 +49,8 @@
                    //    {field:'lastUpdateTime',title:'最后状态改变时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'quantity',title:'车轮数量',type:'int',width:80,align:'left'},
                       {field:'bindSN',title:'车轮SN号',type:'string',width:220,align:'left'},
                       {field:'tray_status',title:'托盘类型',type:'string',bind:{ key:'tray_status',data:[]},width:110,align:'left'},
                       {field:'tray_status',title:'托盘状态',type:'string',bind:{ key:'tray_status',data:[]},width:110,align:'left'},
                       {field:'tray_type',title:'托盘类型',type:'string',bind:{ key:'tray_types',data:[]},width:110,align:'left'},
                    //    {field:'line',title:'行',type:'int',width:80,align:'left'},
                    //    {field:'column',title:'列',type:'int',width:80,align:'left'},
                    {field:'heatNumber',title:'炉号',type:'int',width:80,align:'left'},
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/DomainModels/System/dt_stationinfo.cs
@@ -143,6 +143,12 @@
        [Column(TypeName = "nvarchar(50)")]
        public string heatNumber { get; set; }
        /// <summary>
        ///托盘类型
        /// </summary>
        [Display(Name = "托盘类型")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        public string tray_type { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/Gantry/QueryData.cs
@@ -18,7 +18,7 @@
        /// <returns></returns>
        public static dt_geometry_data QueryMateriel(string type)
        {
            var materielinfo = freeDB.Select<dt_geometry_data>().Where(x => x.Description.ToString() == type).First();
            var materielinfo = freeDB.Select<dt_geometry_data>().Where(x => x.Description == type).First();
            return materielinfo;
        }
        /// <summary>
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_stationinfoService.cs
@@ -120,7 +120,25 @@
            station.heatNumber = saveModel.MainData["heatNumber"].ToString();
            station.Number = saveModel.MainData["Number"].ToString();
            station.remark = saveModel.MainData["remark"].ToString();
            station.tray_status= saveModel.MainData["tray_status"].ToString();
            station.tray_type = saveModel.MainData["tray_type"].ToString();
            if (list.Count == 0)
            {
                //station.tray_status = "EmptyTray";
                station.stationType = string.Empty;
                station.heatNumber = string.Empty;
                station.Number = string.Empty;
            }
            station.tray_status = list.Count == 0 ? "EmptyTray" : "StrogeTray";
            if (station.location_state == "Empty")
            {
                station.stationType = string.Empty;
                station.heatNumber = string.Empty;
                station.Number = string.Empty;
                station.tray_status = string.Empty;
                station.bindSN = string.Empty;
                station.quantity = 0;
                station.tray_type=string.Empty;
            }
            var count = _repository.Update(station, true);
            if (count > 0)
                webResponse.OK();
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/ÐÂÔöÉ豸ЭÒé/Ì«ÖØ½»»¥-¿â¿Ú״̬_V1.xlsx
Binary files differ