Пример #1
0
        /// <summary>
        /// 电池数据上传
        /// </summary>
        public static MesResponse UploadBatteryInfo(MesRequest request)
        {
            MesResponse response = new MesResponse();

            try
            {
                var jsonResponse = wsProxy.PassStationCheck(request.Barcode, request.Flag, request.Terminal, request.UserId);
                response = JsonHelper.DeserializeJsonToObject <MesResponse>(jsonResponse);
            }
            catch (Exception ex)
            {
                response.Code  = -1;
                response.RtMsg = ex.Message;
                LogHelper.WriteError(ex);
            }
            return(response);
        }
Пример #2
0
        public static string CheckBattery(string code)
        {
            if (!Current.mes.IsEnable)
            {
                return("OK");
            }
            var request = new MesRequest()
            {
                Barcode  = code,
                Flag     = "1",
                Terminal = Current.mes.Terminal,
                UserId   = Current.mes.UserId
            };
            var response = UploadBatteryInfo(request);

            LogHelper.WriteInfo(string.Format("【校验MES结果】条码:{0}, 结果:{1}", code, response.RtMsg));
            return(response.RtMsg);
        }