wangxinhui
2025-10-26 733c975cd8647f6d006736f1863bad731e32e6fb
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_External/MESService/InvokeMESService.cs
@@ -28,6 +28,70 @@
        {
            ContractResolver = new CamelCasePropertyNamesContractResolver()
        };
        /// <summary>
        /// MES配送出发通知
        /// </summary>
        /// <param name="mESDispatchModel"></param>
        /// <returns></returns>
        public string MESDispatchUp(MESDispatchModel mESDispatchModel)
        {
            Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.MESDispatchUp.ToString());
            string response = HttpMesHelper.Post(apiInfo.ApiAddress, JsonConvert.SerializeObject(mESDispatchModel));
            return response;
        }
        /// <summary>
        /// MES配送到达通知
        /// </summary>
        /// <param name="mESDeliveryModel"></param>
        /// <returns></returns>
        public string MESDelivery(MESDeliveryModel mESDeliveryModel)
        {
            Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.MESDelivery.ToString());
            string response = HttpMesHelper.Post(apiInfo.ApiAddress, JsonConvert.SerializeObject(mESDeliveryModel));
            return response;
        }
        /// <summary>
        /// MES退料空托接收通知
        /// </summary>
        /// <param name="mESRecepNoticeModel"></param>
        /// <returns></returns>
        public string MESRecepNotice(MESRecepNoticeModel mESRecepNoticeModel)
        {
            Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.MESRecepNotice.ToString());
            string response = HttpMesHelper.Post(apiInfo.ApiAddress, JsonConvert.SerializeObject(mESRecepNoticeModel));
            return response;
        }
        /// <summary>
        /// MES小车到达通知
        /// </summary>
        /// <param name="mESAvgArriveNoticeModel"></param>
        /// <returns></returns>
        public string MESAvgArriveNotice(MESAvgArriveNoticeModel mESAvgArriveNoticeModel)
        {
            Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.MESAvgArriveNotice.ToString());
            string response = HttpMesHelper.Post(apiInfo.ApiAddress, JsonConvert.SerializeObject(mESAvgArriveNoticeModel));
            return response;
        }
        /// <summary>
        /// MES产量回传
        /// </summary>
        /// <param name="boxCode">成品箱码</param>
        /// <returns></returns>
        public string MESBoxCodeNotice(string boxCode)
        {
            Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.MESBoxCodeNotice.ToString());
            string response = HttpMesHelper.Post(apiInfo.ApiAddress+ "?boxCode="+boxCode);
            return response;
        }
    }
}