Browse Source

调整成品自动入库接口

master
lilili 2 years ago
parent
commit
8fe1b8a379
  1. 18
      ICSSoft.FromERP/ICSSoft.FromERP/ICSWareHouseLotInfoDoc.cs

18
ICSSoft.FromERP/ICSSoft.FromERP/ICSWareHouseLotInfoDoc.cs

@ -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()
{

Loading…
Cancel
Save