From 9ddec4808631025d36d3c5a816d55ef77a29d4c7 Mon Sep 17 00:00:00 2001 From: lss <2538410689@qq.com> Date: 星期三, 16 七月 2025 17:30:30 +0800 Subject: [PATCH] 111 --- HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/api/ApiHelper.cs | 407 +++++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 334 insertions(+), 73 deletions(-) diff --git a/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/api/ApiHelper.cs b/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/api/ApiHelper.cs index 2600909..68fe676 100644 --- a/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/api/ApiHelper.cs +++ b/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/api/ApiHelper.cs @@ -47,6 +47,7 @@ /// <returns></returns> internal static Result Createtask(CreateTask model) { + Result result = new Result() { code = "0", msg = "鍒涘缓鎴愬姛" }; if (model == null) { @@ -187,13 +188,6 @@ } } - //else - //{ - // result.code = "1"; - // result.msg = $"鏍规嵁璧风偣{Start},鏈壘鍒版墭鐩樿揣浣嶇粦瀹氬叧绯�; - // AddErrorInfo("鎵樼洏鏌ユ壘澶辫触", result.msg, Source); - // return result; - //} } else @@ -589,6 +583,15 @@ 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 { @@ -603,7 +606,7 @@ S_END_AREA = endloc.S_AREA_CODE, N_SCHEDULE_TYPE = 1, S_CNTR_CODE = CntrCode, - N_PRIORITY = taskData.priority, + N_PRIORITY = pri, Z_TYPE = n_type, N_START_LAYER = 1, N_END_LAYER = 1, @@ -768,7 +771,7 @@ { //鍒涘缓鎵樼洏鏁版嵁缁戝畾鍏崇郴 - if (ContainerHelper.CreateCntrItem(model.Rfid, model.PartNumber, model.PartDesc, model.LotNumber, model.Weight, model.Qty, model.ProductionTime, model.MaturityTime)) + if (ContainerHelper.CreateCntrItemTray(model.Rfid, model.PartNumber, model.PartDesc, model.LotNumber, model.Weight, model.Qty, model.ProductionTime, model.MaturityTime, model.PowderType)) { //鍒涘缓鎴愬姛娴佺▼ } @@ -792,6 +795,176 @@ + } + + public static object _Point = new object(); + /// <summary> + /// 鐐瑰鐐规帴鍙�+ /// </summary> + /// <param name="model"></param> + /// <returns></returns> + internal static Result Point(PointModel model) + { + Result result = new Result() { code = "200", msg = "鍏ュ钩搴撲换鍔′笅鍙戞垚鍔� }; + string Source = "Mes"; + + if (model == null) + { + result.code = "1"; + result.msg = "鍙傛暟涓簄ull"; + AddErrorInfo("鍙傛暟涓虹┖", result.msg, Source); + return result; + } + //1.鍑哄钩搴擄紝2鍏ュ钩搴擄紝3骞冲簱绌哄伐瑁呭懠鍙紝4骞冲簱浣欐枡鍥炲簱锛�绮夋枡绌烘墭杩斿洖銆�+ var db = new SqlHelper<object>().GetInstance(); + string type = ""; + Location startloc = null; + Location endloc = null; + switch (model.Status) + { + case "1": + type = "鍑哄钩搴�; + break; + case "2": + type = "鍏ュ钩搴�; + break; + case "3": + type = "骞冲簱绌哄伐瑁呭懠鍙�; + break; + case "4": + type = "骞冲簱浣欐枡鍥炲簱"; + break; + case "5": + type = "绮夋枡绌烘墭杩斿洖"; + break; + } + if (string.IsNullOrEmpty(type)) + { + result.code = "1"; + result.msg = $"浠诲姟绫诲瀷{model.Status},涓嶅湪瑙勫畾鑼冨洿"; + AddErrorInfo("浠诲姟绫诲瀷閿欒", result.msg, Source); + return result; + } + + try + { + lock (_Point) + { + startloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == model.InitialLocation).First(); + if (startloc == null) + { + result.code = "1"; + result.msg = $"鏍规嵁璧风偣{model.InitialLocation},鎵句笉鍒板搴旇揣浣嶏紝璇锋鏌ヨ揣浣嶈〃"; + 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}涓嶄竴鑷达紝璇锋鏌ユ墭鐩樼爜鏄惁姝g‘"; + 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) + { + result.code = "1"; + result.msg = $"鏍规嵁缁堢偣{model.TargetLocation},鎵句笉鍒板搴旇揣浣嶏紝璇锋鏌ヨ揣浣嶈〃"; + AddErrorInfo("璐т綅鏌ユ壘澶辫触", result.msg, Source); + return result; + } + + + #region 鍒涘缓浠诲姟 + if (endloc != null && startloc != null) + { + if (startloc.N_LOCK_STATE != 0) + { + result.code = "1"; + result.msg = $"鍒涘缓浠诲姟澶辫触锛岃捣鐐�{startloc.S_CODE}鏈夐攣"; + AddErrorInfo("璐т綅鏈夐攣", result.msg, Source); + return result; + } + //鍒涘缓wcs浠诲姟 + var wcsTask = new WCSTask + { + S_CODE = WCSHelper.GenerateTaskNo(), + S_TYPE = type, + S_EQ_NO = model.TaskNumber, + S_START_LOC = startloc.S_CODE, + S_END_LOC = endloc.S_CODE, + S_START_WH = startloc.S_WH_CODE, + S_START_AREA = startloc.S_AREA_CODE, + S_END_WH = endloc.S_WH_CODE, + S_END_AREA = endloc.S_AREA_CODE, + N_CNTR_COUNT = 1, + N_SCHEDULE_TYPE = 1, + S_CNTR_CODE = model.Rfid, + N_START_LAYER = 1, + N_END_LAYER = 1, + N_PRIORITY = 1, + Z_TYPE = 5 + }; + LogHelper.Info("鍒涘缓鐐瑰鐐逛换鍔★細" + JsonConvert.SerializeObject(wcsTask)); + if (WCSHelper.CreateTask(wcsTask)) + { + if (type == "骞冲簱浣欐枡鍥炲簱") + { //鍒涘缓浠诲姟鎴愬姛 鏇存柊浣欐枡淇℃伅 + var CntrItem = db.Queryable<CntrItemDetail>().Where(a => a.S_CNTR_CODE.Trim() == model.Rfid).First(); + if (CntrItem != null) + { + CntrItem.F_WEIGHT = model.Weight.ToString(); + CntrItem.S_BS_TYPE = "浣欐枡"; + //CntrItem.F_QTY = float.Parse(model.qty); + //CntrItem.S_ITEM_STATE = model..QualityStatus; + + db.Updateable(CntrItem).UpdateColumns(a => new { a.F_WEIGHT, a.S_BS_TYPE }).ExecuteCommand(); + } + } + + LocationHelper.LockLoc(startloc.S_CODE, 2); + LocationHelper.LockLoc(endloc.S_CODE, 1); + LogHelper.Info("鍒涘缓浠诲姟鎴愬姛"); + } + else + { + result.code = "1"; + result.msg = $"浠诲姟鍒涘缓澶辫触"; + AddErrorInfo("浠诲姟鍒涘缓澶辫触", result.msg, Source); + return result; + } + } + else + { + result.code = "1"; + result.msg = "鍒涘缓浠诲姟澶辫触锛屾湭鎵惧埌瀵瑰簲鐨勫彇璐х偣鎴栧嵏璐х偣"; + return result; + } + #endregion + + } + + return result; + } + catch (Exception ex) + { + result.code = "1"; + result.msg = ex.ToString(); + LogHelper.Error("Putin Error锛� + ex.ToString(), ex); + return result; + } } public static object _Putin = new object(); @@ -961,6 +1134,7 @@ S_CNTR_CODE = model.Rfid, N_START_LAYER = 1, N_END_LAYER = 1, + N_PRIORITY = 1, Z_TYPE = n_type }; LogHelper.Info("鍒涘缓鍏ュ钩搴撲换鍔★細" + JsonConvert.SerializeObject(wcsTask)); @@ -1089,27 +1263,51 @@ #region 鏍规嵁鐗╂枡缂栫爜璁$畻鍑哄簱璐т綅锛岄�寰�嚎杈逛綅缃� Location Endloc = null; + //鏍规嵁鐗╂枡缂栫爜璁$畻鍑哄簱璐т綅 - var loc = airlift(areacode, itemcode, model.PartLevel); + var loc = airlift(areacode, itemcode, model.PartLevel, model.PowderType); if (loc != null) { Start = loc.S_CODE; - //鏍规嵁鍑哄簱璐т綅鎵惧埌缁戝畾鎵樼洏锛岃幏鍙栧叆鏈哄彴璐т綅 + var CntrRel = LocationHelper.GetLocCntrRel(loc.S_CODE).FirstOrDefault(); CntrCode = CntrRel.S_CNTR_CODE; - Endloc = Computeloc(CntrCode, model.WorkCenter, cntrType); - if (Endloc != null) + //缁欑粓鐐圭敤缁堢偣锛屾病缁欑粓鐐圭敤鏈哄彴搴撳尯璁$畻璐т綅 + if (string.IsNullOrEmpty(model.TargetLocation)) { - End = Endloc.S_CODE; + + Endloc = Computeloc(CntrCode, model.WorkCenter, cntrType); + if (Endloc != null) + { + End = Endloc.S_CODE; + } + else + { + result.code = "1"; + result.msg = $"Computeloc==銆嬫牴鎹満鍙扮紪鐮侊細{model.WorkCenter},宸ヨ绫诲瀷锛歿cntrType} 鏈壘鍒扮┖璐т綅鏁版嵁锛岃妫�煡璐т綅琛�; + LogHelper.Info($"ItemBack锛歿result.msg}"); + AddErrorInfo("鏌ユ壘搴撳尯澶辫触", result.msg, Source); + return result; + } } else { - result.code = "1"; - result.msg = $"Computeloc==銆嬫牴鎹満鍙扮紪鐮侊細{model.WorkCenter},宸ヨ绫诲瀷锛歿cntrType} 鏈壘鍒扮┖璐т綅鏁版嵁锛岃妫�煡璐т綅琛�; - LogHelper.Info($"ItemBack锛歿result.msg}"); - AddErrorInfo("鏌ユ壘搴撳尯澶辫触", result.msg, Source); - return result; + + Endloc = db.Queryable<Location>().Where(a => a.S_CODE == model.TargetLocation).First(); + if (Endloc != null) + { + End = Endloc.S_CODE; + } + else + { + result.code = "1"; + result.msg = $"Computeloc==銆嬫牴鎹粓鐐硅揣浣嶏細{model.TargetLocation} 鏈壘鍒拌揣浣嶆暟鎹紝璇锋鏌ヨ揣浣嶈〃"; + LogHelper.Info($"ItemBack锛歿result.msg}"); + AddErrorInfo("鏌ユ壘搴撳尯澶辫触", result.msg, Source); + return result; + } } + } else { @@ -1159,6 +1357,7 @@ S_CNTR_CODE = CntrCode, N_START_LAYER = 1, N_END_LAYER = 1, + N_PRIORITY = 1, Z_TYPE = n_type }; @@ -1418,6 +1617,8 @@ S_CNTR_CODE = model.Rfid, N_START_LAYER = 1, N_END_LAYER = endlayer, + N_PRIORITY = 1, + S_B_STATE = "绛夊緟鎺ㄩ�", Z_TYPE = 5 }; LogHelper.Info("鍒涘缓绌烘墭鍥炲簱浠诲姟锛� + JsonConvert.SerializeObject(wcsTask)); @@ -1597,6 +1798,7 @@ N_START_LAYER = 1, N_END_LAYER = 1, Z_TYPE = 5, + N_PRIORITY = 1, S_NOTE = "绮夋枡" }; LogHelper.Info("鍒涘缓鍛煎彨绌烘墭浠诲姟锛� + JsonConvert.SerializeObject(wcsTask)); @@ -1821,6 +2023,7 @@ S_CNTR_CODE = model.Rfid, N_START_LAYER = 1, N_END_LAYER = 1, + N_PRIORITY = 1, Z_TYPE = 5 }; @@ -2072,6 +2275,7 @@ S_CNTR_CODE = CntrCode, N_START_LAYER = 1, N_END_LAYER = 1, + N_PRIORITY = 1, // N_TYPE = n_type @@ -2208,6 +2412,7 @@ S_CNTR_CODE = cntr.S_CNTR_CODE, N_END_LAYER = 1, Z_TYPE = 6, + N_PRIORITY = 1, S_B_STATE = "鐢垫鎺ㄩ�" }; @@ -2288,7 +2493,7 @@ } try { - if (model.prepare=="1") + if (model.prepare == "1") { var db = new SqlHelper<object>().GetInstance(); //淇敼瀵瑰簲鐢垫浠诲姟杩涜鎺ㄩ� @@ -2300,9 +2505,9 @@ result.msg = $"涓�ゼ鐢垫鎼繍浠诲姟鎺ㄩ�澶辫触 prepare{model.prepare}涓嶄负1"; LogHelper.Info(result.msg); return result; - } + } } - catch(Exception ex) + catch (Exception ex) { result.code = "1"; result.msg = $"鐢垫浠诲姟鎺ㄩ�澶辫触 閿欒淇℃伅锛歿ex}"; @@ -2478,10 +2683,9 @@ var location = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == loc).First(); if (location != null) { - var loccntr = db.Queryable<LocCntrRel>().Where(a => a.S_LOC_CODE.Trim() == loc).ToList(); + var loccntr = db.Queryable<LocCntrRel>().Where(a => a.S_LOC_CODE.Trim() == loc.Trim()).ToList(); if (loccntr.Count > 0) { - var cntrcodes = loccntr.Select(a => a.S_CNTR_CODE.Trim()).ToList(); if (LocationHelper.Clear(loc, cntrcodes)) { @@ -2538,30 +2742,30 @@ var db = new SqlHelper<HangChaAGV>().GetInstance(); DeviceInfoModel device = new DeviceInfoModel(); - List<DeviceInfos> deviceInfos = new List<DeviceInfos>();//鍙犵洏鏈烘姤閿欎俊鎭�+ // List<DeviceInfos> deviceInfos = new List<DeviceInfos>();//鍙犵洏鏈烘姤閿欎俊鎭� // List<AgvInfos> agvInfos = new List<AgvInfos>();//agv鎶ラ敊淇℃伅 //鑾峰彇鍐呭瓨涓彔鐩樻満鐨勬姤閿欎俊鎭�- foreach (var dpjInfo in DeviceProcess.DpjInfoDirectory) - { - deviceInfos.Add(new DeviceInfos() { Device = dpjInfo.Value.DeviceName, DeviceInfo = dpjInfo.Value.ErrorInfo }); - } + //foreach (var dpjInfo in DeviceProcess.DpjInfoDirectory) + //{ + // deviceInfos.Add(new DeviceInfos() { Device = dpjInfo.Value.DeviceName, DeviceInfo = dpjInfo.Value.ErrorInfo }); + //} // device.DeviceInfos = deviceInfos; //鑾峰彇杞﹁締鎶ヨ淇℃伅 var agvDeviceInfo = db.Queryable<HangChaAGV>().ToList(); if (agvDeviceInfo.Count > 0) { device.AgvQty = agvDeviceInfo.Count; - device.AgvErrorQty = agvDeviceInfo.FindAll(a => a.agvErrCode != "0" || a.agvErrCode != "0" || a.faildCode != "0").Count; - device.AgvChargeQty = agvDeviceInfo.FindAll(a => a.agvErrCode == "1").Count; - device.AgvRunQty = agvDeviceInfo.FindAll(a => a.agvErrCode == "1").Count; - foreach (var agv in agvDeviceInfo) - { - string agvErrorInfo = GetAgvAlarmSendCodeTwo(agv.agvErrCode, agv.errCode2, agv.faildCode); - deviceInfos.Add(new DeviceInfos() { AgvNo = agv.agvNo, AgvInfo = agvErrorInfo }); - } + device.AgvErrorQty = agvDeviceInfo.FindAll(a => a.agvErrCode != "0" || int.Parse(a.errCode2) > 1 || int.Parse(a.faildCode) > 1).Count; + device.AgvChargeQty = agvDeviceInfo.FindAll(a => a.errCode2 == "1").Count; + device.AgvRunQty = agvDeviceInfo.FindAll(a => a.agvErrCode == "0" && a.errCode2 == "0" && a.faildCode == "1").Count; + //foreach (var agv in agvDeviceInfo) + //{ + // string agvErrorInfo = GetAgvAlarmSendCodeTwo(agv.agvNo, agv.agvErrCode, agv.errCode2, agv.faildCode); + // deviceInfos.Add(new DeviceInfos() { AgvNo = agv.agvNo, AgvInfo = agvErrorInfo }); + //} } - device.DeviceInfos = deviceInfos; + // device.DeviceInfos = deviceInfos; return device; } @@ -2569,56 +2773,65 @@ /// <summary> /// agv灏忚溅鏁呴殰鐮佸鐞� /// </summary> + ///<param name="agvNo">杞﹀彿</param> /// <param name="errCode1">閿欒鐮�</param> /// <param name="errCode2">閿欒鐮�</param> /// <param name="faildCode">閿欒鐮�</param> /// <returns></returns> - private static string GetAgvAlarmSendCodeTwo(string errCode1, string errCode2, string faildCode) + private static string GetAgvAlarmSendCodeTwo(string agvNo, string errCode1, string errCode2, string faildCode) { string result = ""; //灏嗘姤璀︿俊鎭暣鍚�- string binSW1 = Convert.ToString(int.Parse(errCode1), 2).PadLeft(22, '0'); + string binSW1 = Convert.ToString(int.Parse(errCode1), 2).PadLeft(25, '0'); string binSW2 = Convert.ToString(int.Parse(errCode1), 2).PadLeft(20, '0'); string binFc = Convert.ToString(int.Parse(errCode1), 2).PadLeft(16, '0'); var arr1 = binSW1.ToArray(); var arr2 = binSW2.ToArray(); var arr3 = binFc.ToArray(); - for (int i = 0; i <= arr1.Length; i++) + var AgvError = Settings.agvError.Where(a => a.agvNo.Contains(agvNo)).FirstOrDefault(); + if (AgvError != null) { - if (arr1[i] == '1') + for (int i = 0; i <= arr1.Length; i++) { - var ErrorInfo = Settings.agvErrorCode1.Where(a => a.ErrorCode == i).FirstOrDefault(); - if (ErrorInfo != null) + if (arr1[i] == '1') { - result = result + "," + $"{ErrorInfo.ErrorInfo}"; - } + var ErrorInfo = AgvError.AgvErrorCode1.Find(a => a.ErrorCode == i); + if (ErrorInfo != null) + { + result = result + "," + $"{ErrorInfo.ErrorInfo}"; + } + } + } + for (int i = 0; i <= arr2.Length; i++) + { + if (arr1[i] == '1') + { + var ErrorInfo = AgvError.AgvErrorCode2.Find(a => a.ErrorCode == i); + if (ErrorInfo != null) + { + result = result + "," + $"{ErrorInfo.ErrorInfo}"; + } + + } + } + for (int i = 0; i <= arr3.Length; i++) + { + if (arr1[i] == '1') + { + var ErrorInfo = AgvError.AgvFaildCode.Find(a => a.ErrorCode == i); + if (ErrorInfo != null) + { + result = result + "," + $"{ErrorInfo.ErrorInfo}"; + } + + } } } - for (int i = 0; i <= arr2.Length; i++) + else { - if (arr1[i] == '1') - { - var ErrorInfo = Settings.agvErrorCode2.Where(a => a.ErrorCode == i).FirstOrDefault(); - if (ErrorInfo != null) - { - result = result + "," + $"{ErrorInfo.ErrorInfo}"; - } - } - } - for (int i = 0; i <= arr3.Length; i++) - { - if (arr1[i] == '1') - { - var ErrorInfo = Settings.agvFaildCode.Where(a => a.ErrorCode == i).FirstOrDefault(); - if (ErrorInfo != null) - { - result = result + "," + $"{ErrorInfo.ErrorInfo}"; - } - - } } return result; } @@ -2665,8 +2878,10 @@ /// <param name="areacode"></param> /// <param name="itemcode"></param> /// <param name="level">鐗╂枡绛夌骇</param> + /// <param name="powderType">鏈哄瀷</param> /// <returns></returns> - internal static Location airlift(string areacode, string itemcode, string level = "") + internal static Location + airlift(string areacode, string itemcode, string level, string powderType) { var db = new SqlHelper<object>().GetInstance(); Location result = null; @@ -2723,8 +2938,8 @@ //} #endregion - var loc = LocationHelper.GetLocByItemCode(areacode, itemcode, level); - LogHelper.Info($"airlift=>鏍规嵁搴撳尯缂栫爜:{areacode}锛岀墿鏂欑紪鐮�{itemcode},鐗╂枡绛夌骇璁$畻鍑烘湁鎵樼洏璐т綅{JsonConvert.SerializeObject(loc)}"); + var loc = LocationHelper.GetLocByItemCode(areacode, itemcode, level, powderType); + LogHelper.Info($"airlift=>鏍规嵁搴撳尯缂栫爜:{areacode}锛岀墿鏂欑紪鐮�{itemcode},鏈哄瀷{powderType},鐗╂枡绛夌骇璁$畻鍑烘湁鎵樼洏璐т綅{JsonConvert.SerializeObject(loc)}"); // result = FindStartcolByLoclist(loc); if (loc.Count > 0) { @@ -2806,12 +3021,16 @@ lock (_lockLocation) { - var loc = db.Queryable<Location>().Where(a => a.S_AREA_CODE.Trim() == jtcode.Trim() && a.S_NOTE == cntrType && a.N_CURRENT_NUM == 0 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃�).First(); - if (loc != null) + if (string.IsNullOrEmpty(cntrType)) { - End = loc; + End = db.Queryable<Location>().Where(a => a.S_AREA_CODE.Trim() == jtcode.Trim() && a.N_CURRENT_NUM == 0 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃�).First(); } else + { + End = db.Queryable<Location>().Where(a => a.S_AREA_CODE.Trim() == jtcode.Trim() && a.S_NOTE == cntrType && a.N_CURRENT_NUM == 0 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃�).First(); + } + + if (End == null) { LogHelper.Info($"Computeloc==銆嬫牴鎹満鍙板垎缁勶細{jtcode},宸ヨ绫诲瀷锛歿cntrType} 鏈壘鍒扮┖璐т綅鏁版嵁锛岃妫�煡璐т綅琛�); } @@ -2859,6 +3078,48 @@ } /// <summary> + /// 鍚堣偉浣抽�鎺ュ彛璋冪敤淇℃伅 + /// </summary> + /// <param name="source">绯荤粺鏉ユ簮</param> + /// <param name="name">鎺ュ彛鍚嶇О</param> + /// <param name="type">璇锋眰鍦板潃绫诲瀷</param> + /// <param name="body">璇锋眰鍙傛暟</param> + /// <param name="url">璇锋眰鍦板潃</param> + /// <param name="err">閿欒淇℃伅</param> + /// <returns></returns> + public static bool AddInfo(string source, string name, string body, string err, string type, string url) + { + bool result = false; + var db = new SqlHelper<object>().GetInstance(); + try + { + var error = new GT_Interface_Exc + { + S_SOURCE = source, + S_NAME = name, + S_TYPE = type, + S_URL = url, + S_BODY = body, + S_ERR = err + }; + if (result = db.Insertable<GT_Interface_Exc>(error).ExecuteCommand() > 0) + { + + } + //else + //{ + // //娣诲姞澶辫触閲嶆柊娣诲姞 + // AddErrorInfo(errorInfo, remake, areacode, taskno); + //} + } + catch (Exception ex) + { + LogHelper.Info($"AddInfo Error:{ex.Message}"); + } + return result; + } + + /// <summary> /// 鎵剧粓鐐圭┖璐т綅 /// </summary> /// <param name="locations"></param> -- Gitblit v1.9.1