|
|
@ -1515,33 +1515,32 @@ namespace ICSSoft.DataProject |
|
|
|
#region 出库检验是否符合源头单据
|
|
|
|
string msg = string.Empty; |
|
|
|
bool isLimit = false; |
|
|
|
if (isOut&& TransType != TransTypeEnum.TransferLibrary.GetDescription()) // && TransType != TransTypeEnum.LOTSplit.GetDescription()
|
|
|
|
{ |
|
|
|
//string Lot ="";
|
|
|
|
//if (TransType == TransTypeEnum.TransferLibrary.GetDescription())
|
|
|
|
//{
|
|
|
|
// foreach (DataRow drLot in table.Rows)
|
|
|
|
// {
|
|
|
|
// Lot = drLot["LotNo"].ToString();
|
|
|
|
// string sql = @"SELECT WarehouseCode FROM ICSWareHouseLotInfo a WHERE LotNo='{0}' AND WorkPoint='{1}'";
|
|
|
|
// sql = string.Format(sql, Lot, WorkPoint);
|
|
|
|
// DataTable dt = DBHelper.SQlReturnData(sql, cmd);
|
|
|
|
// if (dt == null || dt.Rows.Count <= 0)
|
|
|
|
// {
|
|
|
|
// throw new Exception(string.Format(language.GetNameByCode("WMSAPIInfo171"), LotNo));
|
|
|
|
// }
|
|
|
|
// string whcode = dt.Rows[0]["WarehouseCode"].ToString();
|
|
|
|
// IF("+whcode+@" != '{8}')
|
|
|
|
//BEGIN
|
|
|
|
|
|
|
|
// RAISERROR('" + string.Format(language.GetNameByCode("WMSAPIInfo394"), "{8}",whcode) + @"', 16, 1);
|
|
|
|
// RETURN
|
|
|
|
// END
|
|
|
|
// }
|
|
|
|
|
|
|
|
//}
|
|
|
|
//else
|
|
|
|
//{
|
|
|
|
if (isOut) // && TransType != TransTypeEnum.LOTSplit.GetDescription()
|
|
|
|
{//&& TransType != TransTypeEnum.TransferLibrary.GetDescription()
|
|
|
|
string Lot = ""; |
|
|
|
string workP = ""; |
|
|
|
if (TransType == TransTypeEnum.TransferLibrary.GetDescription()) |
|
|
|
{ |
|
|
|
foreach (DataRow drLot in table.Rows) |
|
|
|
{ |
|
|
|
Lot = drLot["LotNo"].ToString(); |
|
|
|
sql = @"SELECT WarehouseCode FROM ICSWareHouseLotInfo a WHERE LotNo='{0}' AND WorkPoint='{1}'"; |
|
|
|
sql = string.Format(sql, Lot, JsonData.WorkPoint); |
|
|
|
DataTable dt = DBHelper.SQlReturnData(sql, cmd); |
|
|
|
if (dt == null || dt.Rows.Count <= 0) |
|
|
|
{ |
|
|
|
throw new Exception(string.Format(language.GetNameByCode("WMSAPIInfo171"), Lot)); |
|
|
|
} |
|
|
|
string whcode = dt.Rows[0]["WarehouseCode"].ToString(); |
|
|
|
if (!JsonData.WHCode.Equals(whcode)) |
|
|
|
{ |
|
|
|
throw new Exception(string.Format(language.GetNameByCode("WMSAPIInfo395"), JsonData.WHCode, whcode)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (string.IsNullOrEmpty(JsonData.TransCode)) |
|
|
|
{ |
|
|
|
throw new Exception(language.GetNameByCode("WMSAPIInfo001"));//"单据号不能为空!"
|
|
|
@ -1554,7 +1553,7 @@ namespace ICSSoft.DataProject |
|
|
|
DataView dataView = TransData.DefaultView; |
|
|
|
foreach (DataRow drLot in table.Rows) |
|
|
|
{ |
|
|
|
string Lot = drLot["LotNo"].ToString(); |
|
|
|
Lot = drLot["LotNo"].ToString(); |
|
|
|
//盘点不需要对比以下属性
|
|
|
|
if (TransType == TransTypeEnum.Check.GetDescription()) |
|
|
|
continue; |
|
|
@ -1622,8 +1621,8 @@ namespace ICSSoft.DataProject |
|
|
|
isLimit = true; |
|
|
|
} |
|
|
|
} |
|
|
|
//}
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
#endregion
|
|
|
|
//return table;
|
|
|
|