schangxiang@126.com
2025-03-27 71e1322fa3f5879b9d71930b783ed1a393477451
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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";
        /// <summary>
        /// 同步库存发送给MES
        /// </summary>
        public static void SendSysnStockToMes()
        {
            //Task.Run(() =>
            //{
            //    #region 新增异常信息表  【EditBy shaocx,2020-01-20】
            //    IDictionary<string, object> logDict = new Dictionary<string, object>();
            //    UDT_SYS_ExceptionInfo exception = ExceptionHandels222.GetExceptionInfo<IDictionary<string, object>>(LogType.DataProcess_BZ39_IssueInboundTask, _namespace, "SendSysnStockToMes", logDict);
            //    #endregion
            //    try
            //    {
            //        //List<SyncStockToMesEntity> list = StockHandels.GetSyncStockToMesEntityList();
            //        ////发送给MES,现在还没做
            //        //using (var service = new MesWebService.MesWebServiceSoapClient())
            //        //{
            //        //    string result = service.SendSynchroMatPlaceToMes(JsonConvert.SerializeObject(list));
            //        //    ResEntity rs = JsonConvert.DeserializeObject<ResEntity>(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);
            //    }
            //});
 
 
        }
    }
}