0
This commit is contained in:
@@ -21,31 +21,26 @@ namespace Gatedge.NewOrientLandMark.BOS.PlugIn.PUR_PurchaseOrder.ConvertPlugIn
|
|||||||
public class ToStkInStock : AbstractConvertPlugIn
|
public class ToStkInStock : AbstractConvertPlugIn
|
||||||
{
|
{
|
||||||
private bool IsConvertByScanCode = false;
|
private bool IsConvertByScanCode = false;
|
||||||
private readonly Dictionary<string, object> CustomParams = new Dictionary<string, object>();
|
private string FBarRecordNo = string.Empty;
|
||||||
|
private Dictionary<string, PushCustomParam> PushCustomParams;
|
||||||
|
|
||||||
|
class PushCustomParam
|
||||||
|
{
|
||||||
|
public decimal InStockQty { get; set; }
|
||||||
|
public string InStockId { get; set; }
|
||||||
|
public DateTime FStockDate { get; set; }
|
||||||
|
public DateTime FExpirationDate { get; set; }
|
||||||
|
public int FLot_Id { get; set; }
|
||||||
|
public string FLot_Text { get; set; }
|
||||||
|
}
|
||||||
public override void OnInitVariable(InitVariableEventArgs e)
|
public override void OnInitVariable(InitVariableEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnInitVariable(e);
|
base.OnInitVariable(e);
|
||||||
this.Option.TryGetVariableValue<bool>("IsConvertByScanCode", out IsConvertByScanCode);
|
this.Option.TryGetVariableValue<bool>("IsConvertByScanCode", out IsConvertByScanCode);
|
||||||
if (IsConvertByScanCode)
|
if (IsConvertByScanCode)
|
||||||
{
|
{
|
||||||
string InStockId;
|
this.Option.TryGetVariableValue<Dictionary<string, PushCustomParam>>("PushCustomParams", out PushCustomParams);
|
||||||
this.Option.TryGetVariableValue<string>("InStockId", out InStockId);
|
this.Option.TryGetVariableValue<string>("FBarRecordNo", out FBarRecordNo);
|
||||||
CustomParams.Add("InStockId", InStockId);
|
|
||||||
object InStockQty;
|
|
||||||
this.Option.TryGetVariableValue("InStockQty", out InStockQty);
|
|
||||||
CustomParams.Add("InStockQty", InStockQty);
|
|
||||||
string FStockDate;
|
|
||||||
this.Option.TryGetVariableValue("FStockDate", out FStockDate);
|
|
||||||
CustomParams.Add("FStockDate", FStockDate);
|
|
||||||
string FExpirationDate;
|
|
||||||
this.Option.TryGetVariableValue("FExpirationDate", out FExpirationDate);
|
|
||||||
CustomParams.Add("FExpirationDate", FExpirationDate);
|
|
||||||
string FLot_Id;
|
|
||||||
this.Option.TryGetVariableValue("FLot_Id", out FLot_Id);
|
|
||||||
CustomParams.Add("FLot_Id", FLot_Id);
|
|
||||||
string FLot_Text;
|
|
||||||
this.Option.TryGetVariableValue("FLot_Text", out FLot_Text);
|
|
||||||
CustomParams.Add("FLot_Text", FLot_Text);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override void AfterConvert(AfterConvertEventArgs e)
|
public override void AfterConvert(AfterConvertEventArgs e)
|
||||||
@@ -134,12 +129,6 @@ namespace Gatedge.NewOrientLandMark.BOS.PlugIn.PUR_PurchaseOrder.ConvertPlugIn
|
|||||||
item["Lot_Text"] = lotText;
|
item["Lot_Text"] = lotText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//throw new Exception("1111");
|
|
||||||
//if (snUnitId != 0)
|
|
||||||
//{
|
|
||||||
// var snQty = unitService.GetQtyByUtilConverRate(materialId, unitId, snUnitId, qty);
|
|
||||||
// item["SNQty"] = snQty;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user