| | |
| | | using System.Web.Http; |
| | | using System.Linq; |
| | | using System.Net.Http; |
| | | using System.Net; |
| | | using System.Text; |
| | | using System.Web.Http; |
| | | |
| | | using Newtonsoft.Json; |
| | | |
| | | using static HH.WCS.Mobox3.AnGang.api.OtherModel; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace HH.WCS.Mobox3.AnGang.api { |
| | | /// <summary> |
| | |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [Route("InboundDataSync")] |
| | | public static ErpResult InboundDataSync(InboundDataSyncInfo model) { |
| | | return ApiHelper.InboundDataSync(model); |
| | | public IHttpActionResult InboundDataSync(InboundDataSyncInfo model) { |
| | | LogHelper.Info("触发API:InboundDataSync:入库数据同步" + JsonConvert.SerializeObject(model), "API"); |
| | | |
| | | var res = ApiHelper.InboundDataSync(model); |
| | | return CreateSuccessResponse(res); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [Route("OutboundDataSync")] |
| | | public static ErpResult OutboundDataSync(OutboundDataSyncInfo model) { |
| | | return ApiHelper.OutboundDataSync(model); |
| | | public IHttpActionResult OutboundDataSync(OutboundDataSyncInfo model) { |
| | | LogHelper.Info("触发API:OutboundDataSync:出库发料同步" + JsonConvert.SerializeObject(model), "API"); |
| | | |
| | | var res = ApiHelper.OutboundDataSync(model); |
| | | return CreateSuccessResponse(res); |
| | | } |
| | | |
| | | private IHttpActionResult CreateSuccessResponse(object data) { |
| | | return ResponseMessage(new HttpResponseMessage(HttpStatusCode.OK) { |
| | | Headers = { { "returnCode", "0" } }, |
| | | Content = new StringContent(JsonConvert.SerializeObject(data), Encoding.UTF8, "application/json") |
| | | }); |
| | | } |
| | | } |
| | | } |