|
|
@ -68,7 +68,23 @@ namespace ICSSoft.FromERP |
|
|
|
var warehouse = db.ICSWarehouse.SingleOrDefault(e=>e.WarehouseCode==data.WHCode); |
|
|
|
string location = db.ICSLocation.Where(e=>e.WHID== warehouse.ID&&e.WorkPoint==workPoint).FirstOrDefault()?.LocationCode; |
|
|
|
string sql = $@"EXEC Addins_GetSerialCode '{workPoint}','ICSInventoryLot','LotNO','KCP{rcvCode}{sequence}',5;"; |
|
|
|
string lotNo = ICSHelper.ExecuteScalar(CommandType.Text, sql).ToString(); |
|
|
|
string lotNo; |
|
|
|
if (data.IsSerialNumber == "ZS01") |
|
|
|
{ |
|
|
|
var extention = db.ICSExtension.Where(e => e.ID==data.ExtensionID)?.SingleOrDefault(); |
|
|
|
if (extention!=null) |
|
|
|
{ |
|
|
|
lotNo = extention.BatchCode; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
lotNo = ICSHelper.ExecuteScalar(CommandType.Text, sql).ToString(); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
lotNo = ICSHelper.ExecuteScalar(CommandType.Text, sql).ToString(); |
|
|
|
} |
|
|
|
//条码
|
|
|
|
var inventoryLot = new ICSInventoryLot() |
|
|
|
{ |
|
|
|