入库和出库
This commit is contained in:
61
ZR.Service/mes/wms-u8/ERP_WMS_interactiveService.cs
Normal file
61
ZR.Service/mes/wms-u8/ERP_WMS_interactiveService.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using Infrastructure;
|
||||
using Infrastructure.Attribute;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using U8Server.Util;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
using ZR.Service.mes.wms_u8.IService;
|
||||
|
||||
namespace ZR.Service.mes.wms_u8
|
||||
{
|
||||
[AppService(ServiceType = typeof(IERP_WMS_interactive), ServiceLifetime = LifeTime.Transient)]
|
||||
public class ERP_WMS_interactiveService : IERP_WMS_interactive
|
||||
{
|
||||
public ERP_WMS_interactiveModelResult inbounded(string urlBase,List<ERP_WMS_interactiveModelQuery> eRP_WMS_InteractiveModels)
|
||||
{
|
||||
string url = urlBase + "/wms/mes/inbounded";
|
||||
|
||||
string contentType = "application/json";
|
||||
Dictionary<string, string> headers = new Dictionary<string, string>();
|
||||
headers.Add("appid", "gN9yId!!lfwaRoi3");
|
||||
headers.Add("timestamp", DateTime.Now.ToString("yyyyMMddHHmmss", CultureInfo.InvariantCulture));
|
||||
headers.Add("sign", GetSign.GetBy16Md5());
|
||||
|
||||
string postData = JsonConvert.SerializeObject(eRP_WMS_InteractiveModels);
|
||||
Object result = HttpHelper.HttpPost(url, postData, contentType, 30, headers);
|
||||
if (result != null && result is ERP_WMS_interactiveModelResult)
|
||||
{
|
||||
return (ERP_WMS_interactiveModelResult)result;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
public ERP_WMS_interactiveModelResult outbounded(string urlBase, List<ERP_WMS_interactiveModelQuery> eRP_WMS_InteractiveModels)
|
||||
{
|
||||
string url = urlBase + "/wms/mes/outbounded";
|
||||
|
||||
string contentType = "application/json";
|
||||
Dictionary<string, string> headers = new Dictionary<string, string>();
|
||||
headers.Add("appid", "gN9yId!!lfwaRoi3");
|
||||
headers.Add("timestamp", DateTime.Now.ToString("yyyyMMddHHmmss", CultureInfo.InvariantCulture));
|
||||
headers.Add("sign", GetSign.GetBy16Md5());
|
||||
|
||||
string postData = JsonConvert.SerializeObject(eRP_WMS_InteractiveModels);
|
||||
Object result = HttpHelper.HttpPost(url, postData, contentType, 30, headers);
|
||||
if (result != null && result is ERP_WMS_interactiveModelResult)
|
||||
{
|
||||
return (ERP_WMS_interactiveModelResult)result;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
27
ZR.Service/mes/wms-u8/IService/IERP_WMS_interactive.cs
Normal file
27
ZR.Service/mes/wms-u8/IService/IERP_WMS_interactive.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Model.MES.wms;
|
||||
|
||||
namespace ZR.Service.mes.wms_u8.IService
|
||||
{
|
||||
/// <summary>
|
||||
/// 用友U8和WMS 交互接口
|
||||
/// </summary>
|
||||
public interface IERP_WMS_interactive
|
||||
{
|
||||
/// <summary>
|
||||
/// 入库
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ERP_WMS_interactiveModelResult inbounded(string urlBase, List<ERP_WMS_interactiveModelQuery> eRP_WMS_InteractiveModels);
|
||||
|
||||
/// <summary>
|
||||
/// 出库
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ERP_WMS_interactiveModelResult outbounded(string urlBase, List<ERP_WMS_interactiveModelQuery> eRP_WMS_InteractiveModels);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user