|
|
@ -9,6 +9,7 @@ using ICSSoft.Frame.Data.Entity; |
|
|
|
using ICSSoft.Base.Config.AppConfig; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.IO; |
|
|
|
using Newtonsoft.Json; |
|
|
|
|
|
|
|
namespace ICSSoft.FromERP |
|
|
|
{ |
|
|
@ -58,6 +59,7 @@ namespace ICSSoft.FromERP |
|
|
|
foreach (var data in manufactureReceives) |
|
|
|
{ |
|
|
|
|
|
|
|
log.Info(JsonConvert.SerializeObject(data)); |
|
|
|
|
|
|
|
|
|
|
|
string invCode = data.InvCode; |
|
|
@ -67,8 +69,11 @@ namespace ICSSoft.FromERP |
|
|
|
string sequence = data.Sequence; |
|
|
|
var warehouse = db.ICSWarehouse.SingleOrDefault(e => e.WarehouseCode == data.WHCode && e.WorkPoint == data.WorkPoint); |
|
|
|
string location = db.ICSLocation.Where(e => e.WHID == warehouse.ID && e.WorkPoint == workPoint).FirstOrDefault()?.LocationCode; |
|
|
|
log.Info(location); |
|
|
|
string sql = $@"EXEC Addins_GetSerialCode '{workPoint}','ICSInventoryLot','LotNO','KCP{rcvCode}{sequence}',5;"; |
|
|
|
log.Info(sql); |
|
|
|
string lotNo; |
|
|
|
log.Info(data.IsSerialNumber); |
|
|
|
if (data.IsSerialNumber == "ZS01") |
|
|
|
{ |
|
|
|
var extention = db.ICSExtension.Where(e => e.ID == data.ExtensionID)?.SingleOrDefault(); |
|
|
@ -83,8 +88,10 @@ namespace ICSSoft.FromERP |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
log.Info("111"); |
|
|
|
lotNo = ICSHelper.ExecuteScalar(CommandType.Text, sql).ToString(); |
|
|
|
} |
|
|
|
log.Info(lotNo); |
|
|
|
//条码
|
|
|
|
var inventoryLot = new ICSInventoryLot() |
|
|
|
{ |
|
|
|