149 lines
3.7 KiB
C#
149 lines
3.7 KiB
C#
using System;
|
|
|
|
namespace RGD.MdsAPI.WMS
|
|
{
|
|
public class getInStackLocation : PlatformBase
|
|
{
|
|
/// <summary>入参定义
|
|
/// 入参定义
|
|
/// </summary>
|
|
[Serializable]
|
|
public class PARA : Base.InPara
|
|
{
|
|
private string _wh_id;
|
|
|
|
private string _task_no;
|
|
|
|
private string _oper_no;
|
|
|
|
private string _pallet_code;
|
|
|
|
private string _lane_no;
|
|
|
|
public string WH_ID
|
|
{
|
|
get { return this._wh_id; }
|
|
set { this._wh_id = value; }
|
|
}
|
|
|
|
public string TASK_NO
|
|
{
|
|
get { return this._task_no; }
|
|
set { this._task_no = value; }
|
|
}
|
|
|
|
public string OPER_NO
|
|
{
|
|
get { return this._oper_no; }
|
|
set { this._oper_no = value; }
|
|
}
|
|
|
|
public string PALLET_CODE
|
|
{
|
|
get { return this._pallet_code; }
|
|
set { this._pallet_code = value; }
|
|
}
|
|
|
|
public string LANE_NO
|
|
{
|
|
get { return this._lane_no; }
|
|
set { this._lane_no = value; }
|
|
}
|
|
}
|
|
|
|
/// <summary>出参定义
|
|
/// 出参定义
|
|
/// </summary>
|
|
[Serializable]
|
|
public class DATA : Base.OutPara
|
|
{
|
|
private string _loc_no;
|
|
|
|
public string LOC_NO
|
|
{
|
|
get { return this._loc_no; }
|
|
set { this._loc_no = getWCS_LOC_NO(value); }
|
|
}
|
|
}
|
|
|
|
/// <summary>入参实体
|
|
/// 入参实体
|
|
/// </summary>
|
|
private PARA _inPara;
|
|
|
|
/// <summary>出参实体
|
|
/// 出参实体
|
|
/// </summary>
|
|
private DATA _outPara;
|
|
/// <summary>
|
|
/// 入参序列化后
|
|
/// </summary>
|
|
private string _strXmlIn;
|
|
|
|
/// <summary>
|
|
/// 入参序列化查询接口
|
|
/// </summary>
|
|
public string XML_IN
|
|
{
|
|
get { return this._strXmlIn; }
|
|
set { this._strXmlIn = value; }
|
|
}
|
|
public getInStackLocation()
|
|
{
|
|
this._inPara = new PARA();
|
|
}
|
|
|
|
/// <summary>通知
|
|
/// 通知
|
|
/// </summary>
|
|
/// <param name="IO_TASK_NO">任务单号</param>
|
|
/// <param name="ePLAN_STATUS">任务状态</param>
|
|
/// <param name="sResult">返回结果</param>
|
|
/// <returns></returns>
|
|
public bool Notify(string TASK_NO, string PALLET_CODE, string LANE_NO, out string sResult)
|
|
{
|
|
bool bResult = true;
|
|
|
|
sResult = string.Empty;
|
|
|
|
string sXmlOut = string.Empty;
|
|
|
|
try
|
|
{
|
|
this._inPara.WH_ID = GetWarehouseIndex();
|
|
|
|
this._inPara.TASK_NO = TASK_NO;
|
|
|
|
this._inPara.OPER_NO = GetOperNo();
|
|
|
|
this._inPara.PALLET_CODE = PALLET_CODE;
|
|
|
|
this._inPara.LANE_NO = LANE_NO;
|
|
|
|
string sXmlIn = this.Serializer<PARA>(this._inPara);
|
|
XML_IN = sXmlIn + "\r\n";
|
|
bResult = this.getInStackLocation(sXmlIn, out sXmlOut);
|
|
|
|
//调用服务成功
|
|
if (bResult)
|
|
{
|
|
this._outPara = this.DeSerialize<DATA>(sXmlOut);
|
|
|
|
bResult = this._outPara.RESULT_FLAG.Equals(Enum.RESULT_FLAG.Success.ToString("d"));
|
|
|
|
sResult = sXmlOut;
|
|
}
|
|
|
|
return bResult;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
bResult = false;
|
|
|
|
sResult = string.Format(ex.Message);
|
|
}
|
|
|
|
return bResult;
|
|
}
|
|
}
|
|
} |