using iWareCommon; using iWareCommon.Utils; using iWareModel; using iWareSql; using iWareSql.DataAccess; using iWareSql.Orm; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace iWareCC.BLL { public class MesBLL { private static string _namespace = "iWareCC.BLL.MesBLL"; /// /// 同步库存发送给MES /// public static void SendSysnStockToMes() { //Task.Run(() => //{ // #region 新增异常信息表 【EditBy shaocx,2020-01-20】 // IDictionary logDict = new Dictionary(); // UDT_SYS_ExceptionInfo exception = ExceptionHandels222.GetExceptionInfo>(LogType.SrmTheadService, _namespace, "SendSysnStockToMes", logDict); // #endregion // try // { // //List list = StockHandels.GetSyncStockToMesEntityList(); // ////发送给MES,现在还没做 // //using (var service = new MesWebService.MesWebServiceSoapClient()) // //{ // // string result = service.SendSynchroMatPlaceToMes(JsonConvert.SerializeObject(list)); // // ResEntity rs = JsonConvert.DeserializeObject(result); // // //记录日志 // // Log4NetHelper.WriteInfoLog(LogType.SendStockToMes, "入参:" + JsonConvert.SerializeObject(list) + ",返回:" + result); // // if (rs.resCode == "1") // // {//处理失败 // // exception.exceptionMsg = "同步库存发送给MES,接口返回失败:" + result; // // ExceptionHandels222.InsertExceptionInfo(exception, true); // // } // //} // } // catch (Exception ex) // { // ExceptionHandels222.GetExceptionInfoForError("同步库存发送给MES出现异常:" + ex.Message, ex, ref exception); // ExceptionHandels222.InsertExceptionInfo(exception, true); // } //}); } } }