| | |
| | | using HH.WCS.JiaTong.device; |
| | | using HH.WCS.JiaTong.dispatch; |
| | | using HH.WCS.JiaTong.LISTA.models; |
| | | using HH.WCS.JiaTong.process; |
| | | using HH.WCS.JiaTong.util; |
| | | using HH.WCS.JiaTong.wms; |
| | | using HH.WCS.JiaTong_DCJ.device; |
| | | using HH.WCS.JiaTong_DCJ.dispatch; |
| | | using HH.WCS.JiaTong_DCJ.LISTA.models; |
| | | using HH.WCS.JiaTong_DCJ.process; |
| | | using HH.WCS.JiaTong_DCJ.util; |
| | | using HH.WCS.JiaTong_DCJ.wms; |
| | | using Newtonsoft.Json; |
| | | using NLog.Fluent; |
| | | using S7.Net; |
| | |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | | using System.Web.UI.WebControls; |
| | | using static HH.WCS.JiaTong.api.ApiModel; |
| | | using static HH.WCS.JiaTong.api.OtherModel; |
| | | using static HH.WCS.JiaTong.LISTA.process.HttpModel; |
| | | using static HH.WCS.JiaTong.util.Settings; |
| | | using static HH.WCS.JiaTong_DCJ.api.ApiModel; |
| | | using static HH.WCS.JiaTong_DCJ.api.OtherModel; |
| | | using static HH.WCS.JiaTong_DCJ.LISTA.process.HttpModel; |
| | | using static HH.WCS.JiaTong_DCJ.util.Settings; |
| | | |
| | | namespace HH.WCS.JiaTong.api |
| | | namespace HH.WCS.JiaTong_DCJ.api |
| | | { |
| | | /// <summary> |
| | | /// apiæ¥å£è¾
å©ç±» |
| | |
| | | // AddErrorInfo("寻æ¾åºåºåºå¤±è´¥", result.msg); |
| | | // return result; |
| | | //} |
| | | |
| | | string state = "çå¾
"; |
| | | int n_type = 0; //任塿¥æº 1.å¯ç¼ç«åº 3.é¢å¤åº ,4.åææåº |
| | | string Source = ""; |
| | | switch (taskData.source) |
| | |
| | | case "YBK": |
| | | n_type = 2; |
| | | Source = "é¢å¤åº"; |
| | | state = "çå¾
æ¨é"; |
| | | break; |
| | | |
| | | |
| | | } |
| | | Console.WriteLine($"Createtask==>任塿¥æº:{n_type}"); |
| | | if (n_type == 0) |
| | |
| | | Location startloc = null; |
| | | lock (_lockCreateTask) |
| | | { |
| | | if (taskData.taskType == 1) //åºåºæµç¨ï¼éè¿ç©ææºå°è®¡ç®çº¿è¾¹è´§ä½ |
| | | note = "åºåº"; |
| | | //å建æçç©æç»å®ä¿¡æ¯ï¼å¹¶è®¡ç®ç»ç¹è´§ä½ |
| | | startloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == taskData.pickStation).First(); |
| | | if (startloc != null) |
| | | { |
| | | note = "åºåº"; |
| | | startloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == taskData.pickStation).First(); |
| | | if (startloc != null) |
| | | { |
| | | //å建æçç©æç»å®ä¿¡æ¯ï¼å¹¶è®¡ç®ç»ç¹è´§ä½ |
| | | Start = taskData.pickStation; |
| | | if (CreateCntrIteminfo(partData, taskData)) |
| | | { |
| | | endloc = Computeloc(CntrCode, taskData.dropStation, taskData.carrierType); |
| | | if (endloc != null) |
| | | { |
| | | End = endloc.S_CODE; |
| | | } |
| | | else |
| | | { |
| | | result.code = "1"; |
| | | result.msg = $"æºå°ç¼ç :{taskData.dropStation}ï¼æªæ¾å°å¯ç¨è´§ä½"; |
| | | AddErrorInfo("寻æ¾åºåºè´§ä½å¤±è´¥", result.msg, Source); |
| | | return result; |
| | | } |
| | | |
| | | //endloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == taskData.dropStation).First(); |
| | | //if (endloc != null) |
| | | //{ |
| | | // End = taskData.dropStation; |
| | | //} |
| | | //else |
| | | //{ |
| | | // result.code = "1"; |
| | | // result.msg = $"æ ¹æ®ç»ç¹{End},æ¾ä¸å°å¯¹åºè´§ä½ï¼è¯·æ£æ¥è´§ä½è¡¨"; |
| | | // AddErrorInfo("è´§ä½æ¥æ¾å¤±è´¥", result.msg, Source); |
| | | // return result; |
| | | //} |
| | | } |
| | | else |
| | | { |
| | | result.code = "1"; |
| | | result.msg = "å建æçç©æä¿¡æ¯å¤±è´¥"; |
| | | AddErrorInfo("å建æç失败", result.msg, Source); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | result.code = "1"; |
| | | result.msg = $"Putin==> ä»»å¡èµ·ç¹:{taskData.pickStation}æ¾ä¸å°å¯¹åºè´§ä½ï¼è¯·æ£æ¥è´§ä½è¡¨"; |
| | | LogHelper.Info($"Putin==> {result.msg}"); |
| | | AddErrorInfo("è´§ä½æ¥æ¾å¤±è´¥", result.msg, Source); |
| | | return result; |
| | | } |
| | | Start = taskData.pickStation; |
| | | } |
| | | else if (taskData.taskType == 2)//å
¥åºæµç¨ï¼ç´æ¥ä½¿ç¨èµ·ç¹è´§ä½åç»ç¹è´§ä½çæä»»å¡ï¼èµ·ç¹éè¦ææç |
| | | { |
| | | note = "å
¥åº"; |
| | | startloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == taskData.pickStation).First(); |
| | | if (startloc != null) |
| | | { |
| | | Start = startloc.S_CODE; |
| | | var CntrRel = LocationHelper.GetLocCntrRel(startloc.S_CODE).OrderBy(a => a.T_CREATE).FirstOrDefault(); |
| | | if (CntrRel != null) |
| | | { |
| | | if (CntrRel.S_CNTR_CODE != partData.rfid) |
| | | { |
| | | result.code = "1"; |
| | | result.msg = $"æ ¹æ®èµ·ç¹ï¼{Start}è·åæç:{CntrRel.S_CNTR_CODE}ä¸ä¸åæçï¼{partData.rfid}ä¸ä¸è´ï¼è¯·æ£æ¥æçç æ¯å¦æ£ç¡®"; |
| | | AddErrorInfo("æçç æ ¡æ£å¤±è´¥", result.msg, Source); |
| | | return result; |
| | | } |
| | | else |
| | | { |
| | | CntrCode = CntrRel.S_CNTR_CODE; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | result.code = "1"; |
| | | result.msg = $"æ ¹æ®èµ·ç¹{taskData.pickStation},æ¾ä¸å°å¯¹åºè´§ä½ï¼è¯·æ£æ¥è´§ä½è¡¨"; |
| | | AddErrorInfo("è´§ä½æ¥æ¾å¤±è´¥", result.msg, Source); |
| | | return result; |
| | | } |
| | | |
| | | endloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == taskData.dropStation).First(); |
| | | if (endloc != null) |
| | | { |
| | | End = taskData.dropStation; |
| | | } |
| | | else |
| | | { |
| | | result.code = "1"; |
| | | result.msg = $"æ ¹æ®ç»ç¹{End},æ¾ä¸å°å¯¹åºè´§ä½ï¼è¯·æ£æ¥è´§ä½è¡¨"; |
| | | AddErrorInfo("è´§ä½æ¥æ¾å¤±è´¥", result.msg, Source); |
| | | return result; |
| | | } |
| | | } |
| | | else if (taskData.taskType == 3)//ç§»åºæµç¨ï¼ç´æ¥ä½¿ç¨èµ·ç¹è´§ä½åç»ç¹è´§ä½çæä»»å¡ï¼ |
| | | { |
| | | note = "åºåº"; |
| | | //å建æçç©æç»å®ä¿¡æ¯ï¼å¹¶è®¡ç®ç»ç¹è´§ä½ |
| | | startloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == taskData.pickStation).First(); |
| | | if (startloc != null) |
| | | { |
| | | Start = taskData.pickStation; |
| | | } |
| | | else |
| | | { |
| | | result.code = "1"; |
| | | result.msg = $"æ ¹æ®èµ·ç¹{taskData.pickStation},æ¾ä¸å°å¯¹åºè´§ä½ï¼è¯·æ£æ¥è´§ä½è¡¨"; |
| | | AddErrorInfo("è´§ä½æ¥æ¾å¤±è´¥", result.msg, Source); |
| | | return result; |
| | | } |
| | | endloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == taskData.dropStation).First(); |
| | | if (endloc != null) |
| | | { |
| | | End = taskData.dropStation; |
| | | } |
| | | else |
| | | { |
| | | result.code = "1"; |
| | | result.msg = $"æ ¹æ®ç»ç¹{taskData.dropStation},æ¾ä¸å°å¯¹åºè´§ä½ï¼è¯·æ£æ¥è´§ä½è¡¨"; |
| | | AddErrorInfo("è´§ä½æ¥æ¾å¤±è´¥", result.msg, Source); |
| | | return result; |
| | | } |
| | | } |
| | | |
| | | else |
| | | { |
| | | LogHelper.Info($"Createtask==> ä»»å¡ç±»åæè¯¯"); |
| | | result.code = "1"; |
| | | result.msg = "ä»»å¡ç±»åï¼{taskData.taskType}ä¸å¨è§å®èå´å
"; |
| | | AddErrorInfo("ä»»å¡ç±»åé误", result.msg, Source); |
| | | result.msg = $"æ ¹æ®èµ·ç¹{taskData.pickStation},æ¾ä¸å°å¯¹åºè´§ä½ï¼è¯·æ£æ¥è´§ä½è¡¨"; |
| | | AddErrorInfo("è´§ä½æ¥æ¾å¤±è´¥", result.msg, Source); |
| | | return result; |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(Start) && !string.IsNullOrEmpty(End)) |
| | | { |
| | | if (startloc.N_LOCK_STATE != 0) |
| | | { |
| | | result.code = "1"; |
| | | result.msg = $"å建任å¡å¤±è´¥ï¼èµ·ç¹{Start}æé"; |
| | | AddErrorInfo("è´§ä½æé", result.msg); |
| | | return result; |
| | | } |
| | | var startArea = db.Queryable<Area>().Where(a => a.S_CODE.Trim() == startloc.S_AREA_CODE.Trim()).First(); |
| | | var endArea = db.Queryable<Area>().Where(a => a.S_CODE.Trim() == endloc.S_AREA_CODE.Trim()).First(); |
| | | if (startArea == null || endArea == null) |
| | | { |
| | | LogHelper.Info($"èµ·ç¹ï¼{JsonConvert.SerializeObject(startArea)}"); |
| | | LogHelper.Info($"ç»ç¹ï¼{JsonConvert.SerializeObject(endArea)}"); |
| | | result.code = "1"; |
| | | result.msg = $"å建任å¡å¤±è´¥ï¼èµ·ç¹:{startloc.S_AREA_CODE},ç»ç¹{endloc.S_AREA_CODE}æªæ¾å°å¯¹åºåºåº"; |
| | | AddErrorInfo("åºåºæ¥æ¾å¤±è´¥", result.msg); |
| | | return result; |
| | | } |
| | | int pri = 1; |
| | | var area = Settings.wareLoc.Where(a => a.AreaCode == endloc.S_WH_CODE).First(); |
| | | if (area != null) |
| | | { |
| | | if (area.XbAreaCodes.Contains(endloc.S_AREA_CODE)) |
| | | { |
| | | pri = 2; |
| | | } |
| | | } |
| | | //å建wcsä»»å¡ |
| | | var wcsTask = new WCSTask |
| | | { |
| | | S_CODE = WCSHelper.GenerateTaskNo(), |
| | | S_TYPE = startArea.S_NAME + "->" + endArea.S_NAME, |
| | | S_EQ_NO = taskData.taskNum, |
| | | S_START_LOC = Start, |
| | | S_END_LOC = End, |
| | | N_CNTR_COUNT = 1, |
| | | S_START_WH = startloc.S_WH_CODE, |
| | | S_END_WH = endloc.S_WH_CODE, |
| | | S_END_AREA = endloc.S_AREA_CODE, |
| | | N_SCHEDULE_TYPE = 1, |
| | | S_CNTR_CODE = CntrCode, |
| | | N_PRIORITY = pri, |
| | | Z_TYPE = n_type, |
| | | N_START_LAYER = 1, |
| | | N_END_LAYER = 1, |
| | | S_WMS_NO = taskData.wmsTaskNo, |
| | | S_NOTE = note, |
| | | S_MES_NO = taskData.mesTaskNo |
| | | endloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == taskData.dropStation).First(); |
| | | if (endloc != null) |
| | | { |
| | | End = taskData.dropStation; |
| | | } |
| | | else |
| | | { |
| | | result.code = "1"; |
| | | result.msg = $"æ ¹æ®ç»ç¹{taskData.dropStation},æ¾ä¸å°å¯¹åºè´§ä½ï¼è¯·æ£æ¥è´§ä½è¡¨"; |
| | | AddErrorInfo("è´§ä½æ¥æ¾å¤±è´¥", result.msg, Source); |
| | | return result; |
| | | } |
| | | |
| | | }; |
| | | LogHelper.Info("å建任å¡ï¼" + JsonConvert.SerializeObject(wcsTask), "CreateTask"); |
| | | if (WCSHelper.CreateTask(wcsTask)) |
| | | { |
| | | // LocationHelper.LockLoc(Start, 2); |
| | | //LocationHelper.LockLoc(End, 1); |
| | | LogHelper.Info("åå»ºä»»å¡æå"); |
| | | } |
| | | else |
| | | { |
| | | result.code = "1"; |
| | | result.msg = $"ä»»å¡å建失败"; |
| | | AddErrorInfo("ä»»å¡å建失败", result.msg, Source); |
| | | return result; |
| | | } |
| | | if (!string.IsNullOrEmpty(Start) && !string.IsNullOrEmpty(End)) |
| | | { |
| | | if (startloc.N_LOCK_STATE != 0) |
| | | { |
| | | result.code = "1"; |
| | | result.msg = $"å建任å¡å¤±è´¥ï¼èµ·ç¹{Start}æé"; |
| | | AddErrorInfo("è´§ä½æé", result.msg); |
| | | return result; |
| | | } |
| | | var startArea = db.Queryable<Area>().Where(a => a.S_CODE.Trim() == startloc.S_AREA_CODE.Trim()).First(); |
| | | var endArea = db.Queryable<Area>().Where(a => a.S_CODE.Trim() == endloc.S_AREA_CODE.Trim()).First(); |
| | | if (startArea == null || endArea == null) |
| | | { |
| | | LogHelper.Info($"èµ·ç¹ï¼{JsonConvert.SerializeObject(startArea)}"); |
| | | LogHelper.Info($"ç»ç¹ï¼{JsonConvert.SerializeObject(endArea)}"); |
| | | result.code = "1"; |
| | | result.msg = $"å建任å¡å¤±è´¥ï¼èµ·ç¹:{startloc.S_AREA_CODE},ç»ç¹{endloc.S_AREA_CODE}æªæ¾å°å¯¹åºåºåº"; |
| | | AddErrorInfo("åºåºæ¥æ¾å¤±è´¥", result.msg); |
| | | return result; |
| | | } |
| | | |
| | | //å建wcsä»»å¡ |
| | | var wcsTask = new WCSTask |
| | | { |
| | | S_CODE = WCSHelper.GenerateTaskNo(), |
| | | S_TYPE = startArea.S_NAME + "->" + endArea.S_NAME, |
| | | S_EQ_NO = taskData.taskNum, |
| | | S_START_LOC = Start, |
| | | S_END_LOC = End, |
| | | N_CNTR_COUNT = 1, |
| | | S_START_WH = startloc.S_WH_CODE, |
| | | S_END_WH = endloc.S_WH_CODE, |
| | | S_END_AREA = endloc.S_AREA_CODE, |
| | | N_SCHEDULE_TYPE = 1, |
| | | S_CNTR_CODE = CntrCode, |
| | | N_PRIORITY = 1, |
| | | Z_TYPE = n_type, |
| | | N_START_LAYER = 1, |
| | | N_END_LAYER = 1, |
| | | S_WMS_NO = taskData.wmsTaskNo, |
| | | S_NOTE = note, |
| | | S_B_STATE = state, |
| | | S_MES_NO = taskData.mesTaskNo |
| | | |
| | | }; |
| | | LogHelper.Info("å建任å¡ï¼" + JsonConvert.SerializeObject(wcsTask), "CreateTask"); |
| | | if (WCSHelper.CreateTask(wcsTask)) |
| | | { |
| | | // LocationHelper.LockLoc(Start, 2); |
| | | //LocationHelper.LockLoc(End, 1); |
| | | LogHelper.Info("åå»ºä»»å¡æå"); |
| | | } |
| | | else |
| | | { |
| | | result.code = "1"; |
| | | result.msg = "å建任å¡å¤±è´¥ï¼æªæ¾å°å¯¹åºçåè´§ç¹æå¸è´§ç¹"; |
| | | result.msg = $"ä»»å¡å建失败"; |
| | | AddErrorInfo("ä»»å¡å建失败", result.msg, Source); |
| | | return result; |
| | | } |
| | | |
| | | } |
| | | } |
| | | else |
| | | { |
| | | result.code = "1"; |
| | | result.msg = "å建任å¡å¤±è´¥ï¼æªæ¾å°å¯¹åºçåè´§ç¹æå¸è´§ç¹"; |
| | | return result; |
| | | } |
| | | |
| | | } |
| | | |
| | | return result; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// é¢å¤åºä»»å¡ç¶æä¸å |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | internal static Result MstStateInquire(MstStateInquire model) |
| | | { |
| | | Result result = new Result() { code = "200", msg = "ç¶æä¸åæå" }; |
| | | var db = new SqlHelper<object>().GetInstance(); |
| | | if (model == null) |
| | | { |
| | | LogHelper.Info($"MstStateInquire==> åæ°ä¸ºnull"); |
| | | result.code = "1"; |
| | | result.msg = "åæ°ä¸ºnullå¼ï¼è¯·æ£æ¥åæ°æ ¼å¼"; |
| | | AddErrorInfo("åæ°ä¸ºç©º", result.msg); |
| | | return result; |
| | | } |
| | | try |
| | | { |
| | | //æ¾å°ä»»å¡ï¼ä¿®æ¹ä»»å¡ç¶æ |
| | | var task = db.Queryable<WCSTask>().Where(a => a.S_EQ_NO.Trim() == model.taskNum).First(); |
| | | if (task != null) |
| | | { |
| | | task.S_B_STATE ="çå¾
"; |
| | | db.Updateable(task).UpdateColumns(a => new { a.S_B_STATE}).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | result.code = "1"; |
| | | result.msg = $"æ ¹æ®ä¸åä»»å¡å·{model.taskNum}æªæ¾å°å¯¹åºä»»å¡"; |
| | | AddErrorInfo("æªæ¾å°ä»»å¡", result.msg); |
| | | return result; |
| | | } |
| | | return result; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | result.code = "1"; |
| | | result.msg = ex.ToString(); |
| | | LogHelper.Error("TrayItembind Errorï¼" + ex.ToString(), ex); |
| | | return result; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | public static object _Point = new object(); |
| | |
| | | /// <returns></returns> |
| | | internal static Result Point(PointModel model) |
| | | { |
| | | Result result = new Result() { code = "200", msg = "å
¥å¹³åºä»»å¡ä¸åæå" }; |
| | | Result result = new Result() { code = "200", msg = "ä»»å¡ä¸åæå" }; |
| | | string Source = "Mes"; |
| | | |
| | | if (model == null) |
| | |
| | | AddErrorInfo("è´§ä½æ¥æ¾å¤±è´¥", result.msg, Source); |
| | | return result; |
| | | } |
| | | else |
| | | { |
| | | //å¤æèµ·ç¹æ¯å¦ç»å®å
¶ä»æç |
| | | var CntrRel = LocationHelper.GetLocCntrRel(startloc.S_CODE).OrderBy(a => a.T_CREATE).FirstOrDefault(); |
| | | if (CntrRel != null) |
| | | { |
| | | if (CntrRel.S_CNTR_CODE != model.Rfid) |
| | | { |
| | | result.code = "1"; |
| | | result.msg = $"æ ¹æ®èµ·ç¹ï¼{model.InitialLocation}è·åæç:{CntrRel.S_CNTR_CODE}ä¸ä¸åæçï¼{model.Rfid}ä¸ä¸è´ï¼è¯·æ£æ¥æçç æ¯å¦æ£ç¡®"; |
| | | AddErrorInfo("æçç æ ¡æ£å¤±è´¥", result.msg, Source); |
| | | return result; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | LocationHelper.BindingLoc(startloc.S_CODE, new List<string> { model.Rfid }); |
| | | } |
| | | } |
| | | //else |
| | | //{ |
| | | // //å¤æèµ·ç¹æ¯å¦ç»å®å
¶ä»æç |
| | | // var CntrRel = LocationHelper.GetLocCntrRel(startloc.S_CODE).OrderBy(a => a.T_CREATE).FirstOrDefault(); |
| | | // if (CntrRel != null) |
| | | // { |
| | | // if (CntrRel.S_CNTR_CODE != model.Rfid) |
| | | // { |
| | | // result.code = "1"; |
| | | // result.msg = $"æ ¹æ®èµ·ç¹ï¼{model.InitialLocation}è·åæç:{CntrRel.S_CNTR_CODE}ä¸ä¸åæçï¼{model.Rfid}ä¸ä¸è´ï¼è¯·æ£æ¥æçç æ¯å¦æ£ç¡®"; |
| | | // AddErrorInfo("æçç æ ¡æ£å¤±è´¥", result.msg, Source); |
| | | // return result; |
| | | // } |
| | | // } |
| | | // else |
| | | // { |
| | | // LocationHelper.BindingLoc(startloc.S_CODE, new List<string> { model.Rfid }); |
| | | // } |
| | | //} |
| | | endloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == model.TargetLocation).First(); |
| | | if (endloc == null) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// è´§ä½ä¿¡æ¯ä¸ä¼ |
| | | /// </summary> |
| | |
| | | result1.UseToken = "iFQ5fExGrLYLXliHYWzs"; |
| | | upload.LocationNum = loc.S_CODE; |
| | | upload.Type = loc.S_TYPE; |
| | | upload.LockState =loc.S_LOCK_STATE; |
| | | upload.LockState = loc.S_LOCK_STATE; |
| | | upload.WorkCenter = loc.S_AREA_CODE; |
| | | upload.Warehouse = loc.S_AREA_CODE; |
| | | listuploadloc.Add(upload); |
| | |
| | | var url = Settings.tableUrls.Find(a => a.id == 3); |
| | | if (url != null) |
| | | { |
| | | LogHelper.Info($"è´§ä½ä¸æ¥ä¸æ¥ï¼å°å:{url}ï¼å
容ï¼{date}"); |
| | | LogHelper.Info($"è´§ä½ä¸æ¥ä¸æ¥ï¼å°å:{url.url}ï¼å
容ï¼{date}"); |
| | | var r = httpHelper.MesWebPost(url.url, date); |
| | | result = JsonConvert.DeserializeObject<Result>(r); |
| | | if (result.code == "200") |
| | |
| | | result.code = "1"; |
| | | result.msg = result.msg; |
| | | } |
| | | ApiHelper.AddInfo("Mes", "Mesç¹å¯¹ç¹ä»»å¡ä¸å", JsonConvert.SerializeObject(date), JsonConvert.SerializeObject(result), "Post", url.url); |
| | | ApiHelper.AddInfo("Mes", "è´§ä½åæ¥", JsonConvert.SerializeObject(date), JsonConvert.SerializeObject(result), "Post", url.url); |
| | | |
| | | } |
| | | else |
| | |
| | | var db = new SqlHelper<HangChaAGV>().GetInstance(); |
| | | DeviceInfoModel device = new DeviceInfoModel(); |
| | | |
| | | // List<DeviceInfos> deviceInfos = new List<DeviceInfos>();//å çæºæ¥éä¿¡æ¯ |
| | | // List<AgvInfos> agvInfos = new List<AgvInfos>();//agvæ¥éä¿¡æ¯ |
| | | // List<DeviceInfos> deviceInfos = new List<DeviceInfos>();//å çæºæ¥éä¿¡æ¯ |
| | | // List<AgvInfos> agvInfos = new List<AgvInfos>();//agvæ¥éä¿¡æ¯ |
| | | |
| | | //è·åå
åä¸å çæºçæ¥éä¿¡æ¯ |
| | | //foreach (var dpjInfo in DeviceProcess.DpjInfoDirectory) |
| | |
| | | // deviceInfos.Add(new DeviceInfos() { AgvNo = agv.agvNo, AgvInfo = agvErrorInfo }); |
| | | //} |
| | | } |
| | | // device.DeviceInfos = deviceInfos; |
| | | // device.DeviceInfos = deviceInfos; |
| | | |
| | | return device; |
| | | } |
| | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //internal static bool CreateCntrLoc(taskData taskData) |
| | | //{ |