Merge branch 'develop' into SDK
This commit is contained in:
+59
-38
@@ -376,8 +376,9 @@ namespace AppData
|
||||
public static bool sendMaterials()
|
||||
{
|
||||
bool answ = false;
|
||||
// leggo tab MNATERIALS da DB
|
||||
var table = DataLayer.man.taMat.GetData();
|
||||
// leggo tab MATERIALS da DB
|
||||
DataLayer DLMan = new DataLayer();
|
||||
var table = DLMan.taMat.GetData();
|
||||
// serializzo
|
||||
string redVal = JsonConvert.SerializeObject(table);
|
||||
// salvo
|
||||
@@ -457,13 +458,14 @@ namespace AppData
|
||||
/// <returns></returns>
|
||||
public static bool sendFirstValidationBatch()
|
||||
{
|
||||
bool answ = false;
|
||||
DataLayer DLMan = new DataLayer();
|
||||
bool answ = false;
|
||||
// verifico se NON CI SIANO GIA' validazioni in corso...
|
||||
var tabBatchRunning = DataLayer.man.taBL.getByStatus(1, "", 0);
|
||||
var tabBatchRunning = DLMan.taBL.getByStatus(1, "", 0);
|
||||
if (tabBatchRunning.Count == 0)
|
||||
{
|
||||
// ora verifico, se ci sono batch in stato 8 (da validare) --> metto in coda!
|
||||
var tabBatch = DataLayer.man.taBL.getByStatus(8, "", 1);
|
||||
var tabBatch = DLMan.taBL.getByStatus(8, "", 1);
|
||||
bool hasValReq = tabBatch.Count > 0;
|
||||
if (hasValReq)
|
||||
{
|
||||
@@ -482,7 +484,7 @@ namespace AppData
|
||||
// richiedo!
|
||||
sendBatchReq(nextBatchId, "Estimation", 1);
|
||||
// registro su DB nesting iniziato... QUANDO MI RISPONDE dovrò verificare che era un batch x VALIDAZIONE
|
||||
DataLayer.man.taBL.updateStatus(nextBatchId, (int)BatchStatus.EstimationRequested, "", 0);
|
||||
DLMan.taBL.updateStatus(nextBatchId, (int)BatchStatus.EstimationRequested, "", 0);
|
||||
answ = true;
|
||||
}
|
||||
}
|
||||
@@ -499,6 +501,7 @@ namespace AppData
|
||||
/// <returns></returns>
|
||||
public static bool sendBatchReq(int BatchID, string note, int pType)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
bool answ = false;
|
||||
// per prima cosa mi serve una "nuova busta" per inviare i messaggi
|
||||
string nextEnv = getNextEnv(BatchID, note);
|
||||
@@ -506,7 +509,7 @@ namespace AppData
|
||||
try
|
||||
{
|
||||
// in base allo stato del BATCH corrente determino il tempo e le opzioni da inviare...
|
||||
var batch = DataLayer.man.taBL.getByKey(BatchID);
|
||||
var batch = DLMan.taBL.getByKey(BatchID);
|
||||
int mTime = 1;
|
||||
if (batch[0].STATUS < (int)BatchStatus.EstimationDone)
|
||||
{
|
||||
@@ -526,11 +529,11 @@ namespace AppData
|
||||
List<Part> listPart = new List<Part>();
|
||||
|
||||
// leggo tab ORDINI da DB
|
||||
var tblOrd = DataLayer.man.taOL.getByBatch(BatchID);
|
||||
var tblOrd = DLMan.taOL.getByBatch(BatchID);
|
||||
// leggo tab KIT da DB
|
||||
var tblKit = DataLayer.man.taKL.getByBatch(BatchID);
|
||||
var tblKit = DLMan.taKL.getByBatch(BatchID);
|
||||
// leggo tab ITEMS da DB
|
||||
var tblItm = DataLayer.man.taIL.getByBatch(BatchID);
|
||||
var tblItm = DLMan.taIL.getByBatch(BatchID);
|
||||
|
||||
// ciclo per comporre oggetto con cicli annidiati ext --> int
|
||||
foreach (var rigaOrd in tblOrd)
|
||||
@@ -618,6 +621,7 @@ namespace AppData
|
||||
{
|
||||
get
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
bool answ = false;
|
||||
bool valido = false;
|
||||
// cerco in redis
|
||||
@@ -629,10 +633,10 @@ namespace AppData
|
||||
if (!valido)
|
||||
{
|
||||
// in primis controllo SE ci siano task running, nel qual caso è false e basta...
|
||||
int numEst = DataLayer.man.taBL.getByStatus((int)BatchStatus.EstimationRequested, "", 0).Count;
|
||||
int numNest = DataLayer.man.taBL.getByStatus((int)BatchStatus.NestRequested, "", 0).Count;
|
||||
int numEst = DLMan.taBL.getByStatus((int)BatchStatus.EstimationRequested, "", 0).Count;
|
||||
int numNest = DLMan.taBL.getByStatus((int)BatchStatus.NestRequested, "", 0).Count;
|
||||
// ora controllo anche offline orders...
|
||||
int numOffOrd = DataLayer.man.taOffOL.getRunning().Count;
|
||||
int numOffOrd = DLMan.taOffOL.getRunning().Count;
|
||||
// ora la somma di tutti DEVE essere zero...
|
||||
answ = ((numEst + numNest + numOffOrd) == 0);
|
||||
// salvo in redis
|
||||
@@ -690,7 +694,7 @@ namespace AppData
|
||||
{
|
||||
// aggiorno su DB il disegno...
|
||||
string disegno = sheets[0].Drawing;
|
||||
DataLayer.man.taOffOL.updateDrawing(OffOrderID, disegno);
|
||||
DLMan.taOffOL.updateDrawing(OffOrderID, disegno);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -717,6 +721,7 @@ namespace AppData
|
||||
/// <returns></returns>
|
||||
public static bool sendOfflineOrderReq(int OffOrderID, string note)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
bool answ = false;
|
||||
// per prima cosa mi serve una "nuova busta" per inviare i messaggi
|
||||
string nextEnv = getNextEnv(OffOrderID, note);
|
||||
@@ -727,7 +732,7 @@ namespace AppData
|
||||
// FIX pType a ESTIM
|
||||
int pType = 1;
|
||||
// ora ITEMS
|
||||
var tblItm = DataLayer.man.taIL.getByOfflineOrder(OffOrderID);
|
||||
var tblItm = DLMan.taIL.getByOfflineOrder(OffOrderID);
|
||||
|
||||
// init oggetti x fare cicli...
|
||||
Order currOrder = null;
|
||||
@@ -811,6 +816,7 @@ namespace AppData
|
||||
/// <returns></returns>
|
||||
public static bool checkOfflineOrderReq(int OffOrderID)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
bool answ = false;
|
||||
string typeSearch = "OffOrdCalculation";
|
||||
string keyEnv = "";
|
||||
@@ -840,7 +846,7 @@ namespace AppData
|
||||
// se ho in risposta drawing
|
||||
if (!string.IsNullOrEmpty(offOrder.DrawingPath))
|
||||
{
|
||||
DataLayer.man.taOffOL.updateDrawing(OffOrderID, offOrder.DrawingPath, offOrder.CncPath);
|
||||
DLMan.taOffOL.updateDrawing(OffOrderID, offOrder.DrawingPath, offOrder.CncPath);
|
||||
}
|
||||
}
|
||||
// restituisco ok
|
||||
@@ -854,7 +860,8 @@ namespace AppData
|
||||
public static void resetPrevDataFromNesting(int BatchID)
|
||||
{
|
||||
//elimino dati child MA NON il batch...
|
||||
DataLayer.man.taBL.deleteTree(BatchID, 0);
|
||||
DataLayer DLMan = new DataLayer();
|
||||
DLMan.taBL.deleteTree(BatchID, 0);
|
||||
}
|
||||
/// <summary>
|
||||
/// Salvo dati Bunks/Sheets/Parts ricevuti da Nesting (COMPETATO)
|
||||
@@ -863,13 +870,14 @@ namespace AppData
|
||||
/// <param name="BunkList"></param>
|
||||
public static void updateBunksFromNesting(int BatchID, List<NestBunk> BunkList)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
// inizio a processare... bunks!
|
||||
if (BunkList != null)
|
||||
{
|
||||
foreach (var bunk in BunkList)
|
||||
{
|
||||
// creo il BUNK!
|
||||
var newBunk = DataLayer.man.taSTL.insertAndReturn(bunk.BunkIndex, BatchID);
|
||||
var newBunk = DLMan.taSTL.insertAndReturn(bunk.BunkIndex, BatchID);
|
||||
// se ho un bunk in risposta...
|
||||
if (newBunk.Count == 1)
|
||||
{
|
||||
@@ -880,7 +888,7 @@ namespace AppData
|
||||
foreach (var sheet in bunk.SheetList)
|
||||
{
|
||||
// creo lo sheet...
|
||||
var newSheet = DataLayer.man.taSHL.insertAndReturn(sheet.SheetIndex, sheet.MatId, (decimal)sheet.EstimatedWorktime, currBunk.StackID, sheet.PrintProgram, sheet.MachiningProgram, sheet.Drawing);
|
||||
var newSheet = DLMan.taSHL.insertAndReturn(sheet.SheetIndex, sheet.MatId, (decimal)sheet.EstimatedWorktime, currBunk.StackID, sheet.PrintProgram, sheet.MachiningProgram, sheet.Drawing);
|
||||
// se ho 1 sheet in risposta
|
||||
if (newSheet.Count == 1)
|
||||
{
|
||||
@@ -891,13 +899,13 @@ namespace AppData
|
||||
foreach (var part in sheet.PartList)
|
||||
{
|
||||
// aggiungo part a sheet (in tab nesting)
|
||||
DataLayer.man.taNest.insertAndReturn(currSheet.SheetID, part.PartId);
|
||||
DLMan.taNest.insertAndReturn(currSheet.SheetID, part.PartId);
|
||||
}
|
||||
}
|
||||
// ora salvo ANCHE i remnants dello sheet... SE ci sono
|
||||
if (sheet.Remnant != null)
|
||||
{
|
||||
DataLayer.man.taRem.insertAndReturn(BatchID, sheet.MatId, currSheet.SheetID, sheet.Remnant.L_mm, sheet.Remnant.W_mm, false);
|
||||
DLMan.taRem.insertAndReturn(BatchID, sheet.MatId, currSheet.SheetID, sheet.Remnant.L_mm, sheet.Remnant.W_mm, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -913,13 +921,14 @@ namespace AppData
|
||||
/// <param name="BinList"></param>
|
||||
public static void updateBinsFromNesting(int BatchID, List<NestBin> BinList)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
// inizio a processare... bunks!
|
||||
if (BinList != null)
|
||||
{
|
||||
foreach (var item in BinList)
|
||||
{
|
||||
// creo il BIN!
|
||||
var newBin = DataLayer.man.taBN.insertAndReturn(item.BinIndex);
|
||||
var newBin = DLMan.taBN.insertAndReturn(item.BinIndex);
|
||||
// se ho un BIN in risposta...
|
||||
if (newBin.Count == 1)
|
||||
{
|
||||
@@ -930,7 +939,7 @@ namespace AppData
|
||||
foreach (var part in item.PartList)
|
||||
{
|
||||
// creo lo sheet...
|
||||
var newB2I = DataLayer.man.taBNLS.insertAndReturn(currBin.BinID, part.PartId);
|
||||
var newB2I = DLMan.taBNLS.insertAndReturn(currBin.BinID, part.PartId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -944,13 +953,14 @@ namespace AppData
|
||||
/// <param name="CartList"></param>
|
||||
public static void updateCartsFromNesting(int BatchID, List<NestCart> CartList)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
// inizio a processare... bunks!
|
||||
if (CartList != null)
|
||||
{
|
||||
foreach (var item in CartList)
|
||||
{
|
||||
// creo il CART!
|
||||
var newCart = DataLayer.man.taCR.insertAndReturn(item.CartIndex);
|
||||
var newCart = DLMan.taCR.insertAndReturn(item.CartIndex);
|
||||
// se ho un CART in risposta...
|
||||
if (newCart.Count == 1)
|
||||
{
|
||||
@@ -961,7 +971,7 @@ namespace AppData
|
||||
foreach (var kit in item.KitList)
|
||||
{
|
||||
// creo lo sheet...
|
||||
var updKit = DataLayer.man.taKL.updateCart(kit.KitId, currCart.CartID);
|
||||
var updKit = DLMan.taKL.updateCart(kit.KitId, currCart.CartID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -974,6 +984,7 @@ namespace AppData
|
||||
/// <param name="PartList"></param>
|
||||
public static void updatePartsFromNesting(List<Part> PartList)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
string PostProcList = "";
|
||||
string ProcessesReq = "";
|
||||
string pdfFilePath = "";
|
||||
@@ -984,7 +995,7 @@ namespace AppData
|
||||
PostProcList = getPostProcList(currItem.OptParameters);
|
||||
ProcessesReq = getProcessesReq(currItem.OptParameters);
|
||||
pdfFilePath = getPdfFilePath(currItem.OptParameters);
|
||||
DataLayer.man.taIL.updateFromNesting(currItem.PartId, currItem.MatId, PostProcList, ProcessesReq, pdfFilePath);
|
||||
DLMan.taIL.updateFromNesting(currItem.PartId, currItem.MatId, PostProcList, ProcessesReq, pdfFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1416,8 +1427,9 @@ namespace AppData
|
||||
/// <returns></returns>
|
||||
public static void updateBatchPosition(int BatchID)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
// chiamo stored x checkPosition
|
||||
DataLayer.man.taBL.checkPosition(BatchID);
|
||||
DLMan.taBL.checkPosition(BatchID);
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiorna la POSITION del BATCH a partire dallo stato dei bunk/stack selezionato
|
||||
@@ -1427,8 +1439,9 @@ namespace AppData
|
||||
/// <returns></returns>
|
||||
public static void updateBatchPositionByBunk(int BunkID)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
// recupero il BatchID
|
||||
DS_App.StackListDataTable tabBunk = DataLayer.man.taSTL.getByKey(BunkID);
|
||||
DS_App.StackListDataTable tabBunk = DLMan.taSTL.getByKey(BunkID);
|
||||
if (tabBunk.Count > 0)
|
||||
{
|
||||
try
|
||||
@@ -1491,10 +1504,11 @@ namespace AppData
|
||||
/// <returns></returns>
|
||||
public static SheetWorkList prodGetSheetWorkList(string codPost)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
// init out
|
||||
SheetWorkList answ = null;
|
||||
// recupero batch corrente
|
||||
DS_App.BatchListDataTable currBatch = DataLayer.man.taBL.getCurrentByMachine(codPost);
|
||||
DS_App.BatchListDataTable currBatch = DLMan.taBL.getCurrentByMachine(codPost);
|
||||
try
|
||||
{
|
||||
if (currBatch != null)
|
||||
@@ -1502,7 +1516,7 @@ namespace AppData
|
||||
// come batch DOVREI averne solo 1 in corso...
|
||||
DS_App.BatchListRow batchRow = currBatch[0];
|
||||
// recupero i vari SHEETS del batch...
|
||||
DS_App.SheetListDataTable sheetTable = DataLayer.man.taSHL.getCurrentByBatch(batchRow.BatchID);
|
||||
DS_App.SheetListDataTable sheetTable = DLMan.taSHL.getCurrentByBatch(batchRow.BatchID);
|
||||
List<DS_App.SheetListRow> sheetList = new List<DS_App.SheetListRow>();
|
||||
// controllo che SIA NULL la data di unload --> NON ancora scaricato
|
||||
foreach (var item in sheetTable)
|
||||
@@ -1600,12 +1614,13 @@ namespace AppData
|
||||
/// <returns></returns>
|
||||
public static ProdBunk prodGetFirstBunk()
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
// cerco prima su REDIS...
|
||||
ProdBunk answ = redisFirstBunk;
|
||||
if (answ == null)
|
||||
{
|
||||
// vado sul DB e leggo ...
|
||||
DS_App.StackListDataTable tabBunks = DataLayer.man.taSTL.getLoaded();
|
||||
DS_App.StackListDataTable tabBunks = DLMan.taSTL.getLoaded();
|
||||
// controllo di averne almeno 1...
|
||||
if (tabBunks.Count > 0)
|
||||
{
|
||||
@@ -1691,8 +1706,9 @@ namespace AppData
|
||||
/// <returns></returns>
|
||||
public static DS_App.PackListRow getCurrPackList()
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
DS_App.PackListRow answ = null;
|
||||
var tabPLD = DataLayer.man.taPL.getRunning();
|
||||
var tabPLD = DLMan.taPL.getRunning();
|
||||
if (tabPLD.Count > 0)
|
||||
{
|
||||
answ = tabPLD[0];
|
||||
@@ -1788,11 +1804,12 @@ namespace AppData
|
||||
/// <returns></returns>
|
||||
public static ProdBunk prodGetNextBunk(int BunkID)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
ProdBunk answ = getRedisNextBunk(BunkID);
|
||||
if (answ == null)
|
||||
{
|
||||
// vado sul DB e leggo ...
|
||||
DS_App.StackListDataTable tabBunks = DataLayer.man.taSTL.getLoaded();
|
||||
DS_App.StackListDataTable tabBunks = DLMan.taSTL.getLoaded();
|
||||
// controllo di averne almeno 1...
|
||||
if (tabBunks.Count > 0)
|
||||
{
|
||||
@@ -1830,6 +1847,7 @@ namespace AppData
|
||||
/// <returns></returns>
|
||||
private static ProdBunk getBunkFromDb(DS_App.StackListRow currBunk)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
ProdBunk answ;
|
||||
// calcolo attributi oggetti
|
||||
CStatus currSt = CStatus.Programmed;
|
||||
@@ -1843,7 +1861,7 @@ namespace AppData
|
||||
}
|
||||
List<ProdSheet> elSheet = new List<ProdSheet>();
|
||||
// recupero gli sheets di questo stack...
|
||||
DS_App.SheetListDataTable tabSheets = DataLayer.man.taSHL.getByStack(currBunk.StackID);
|
||||
DS_App.SheetListDataTable tabSheets = DLMan.taSHL.getByStack(currBunk.StackID);
|
||||
DateTime dataStart = DateTime.Now;
|
||||
ProdSheet currPanel;
|
||||
string nestBasePath = memLayer.ML.CRS("nestBasePath").ToLower();
|
||||
@@ -1910,9 +1928,10 @@ namespace AppData
|
||||
/// <returns></returns>
|
||||
public static ProdBunk prodGetBunk(int StackID)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
ProdBunk answ = null;
|
||||
List<ProdSheet> elSheet = new List<ProdSheet>();
|
||||
var tabBunks = DataLayer.man.taSTL.getByKey(StackID);
|
||||
var tabBunks = DLMan.taSTL.getByKey(StackID);
|
||||
if (tabBunks.Count == 1)
|
||||
{
|
||||
DS_App.StackListRow currBunk = tabBunks[0];
|
||||
@@ -1927,7 +1946,7 @@ namespace AppData
|
||||
currSt = CStatus.Done;
|
||||
}
|
||||
// recupero gli sheets di questo stack...
|
||||
DS_App.SheetListDataTable tabSheets = DataLayer.man.taSHL.getByStack(StackID);
|
||||
DS_App.SheetListDataTable tabSheets = DLMan.taSHL.getByStack(StackID);
|
||||
DateTime dataStart = DateTime.Now;
|
||||
ProdSheet currPanel;
|
||||
string nestBasePath = memLayer.ML.CRS("nestBasePath").ToLower();
|
||||
@@ -2124,6 +2143,7 @@ namespace AppData
|
||||
/// <returns></returns>
|
||||
public static string getCurrentCss(int sheetID)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
// area REDIS!
|
||||
string redKeyBase = $"{machineUnloadArea(sheetID)}";
|
||||
// TTL standard
|
||||
@@ -2138,7 +2158,7 @@ namespace AppData
|
||||
try
|
||||
{
|
||||
// elenco items da foglio!!!
|
||||
var tabItems = DataLayer.man.taIL.getBySheet(sheetID);
|
||||
var tabItems = DLMan.taIL.getBySheet(sheetID);
|
||||
List<string> itemsAll = new List<string>();
|
||||
List<string> itemsDepo = new List<string>();
|
||||
List<string> itemsCart = new List<string>();
|
||||
@@ -2402,10 +2422,11 @@ namespace AppData
|
||||
{
|
||||
get
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
var currData = DataLayer.man.taBL.getNextAvailable();
|
||||
var currData = DLMan.taBL.getNextAvailable();
|
||||
if (currData.Count > 0)
|
||||
{
|
||||
answ = currData[0].BatchID;
|
||||
|
||||
@@ -140,11 +140,6 @@ namespace AppData
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// oggetto static/singleton per fare chiamate sul datalayer
|
||||
/// </summary>
|
||||
public static DataLayer man = new DataLayer();
|
||||
|
||||
public string CodSoggCurrUser
|
||||
{
|
||||
get
|
||||
@@ -337,7 +332,8 @@ namespace AppData
|
||||
// recupero da DB...
|
||||
try
|
||||
{
|
||||
var tabPost = DataLayer.man.taElPos.getByKey(codPost);
|
||||
DataLayer DLMan = new DataLayer();
|
||||
var tabPost = DLMan.taElPos.getByKey(codPost);
|
||||
if (tabPost.Count == 1)
|
||||
{
|
||||
printer = tabPost[0].stampante;
|
||||
|
||||
+20
-15
@@ -18,6 +18,11 @@ namespace AppData
|
||||
{
|
||||
#region area codice da non modificare
|
||||
|
||||
/// <summary>
|
||||
/// oggetto static/singleton per fare chiamate sul datalayer
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
|
||||
private int m_currentPageIndex;
|
||||
protected int logLevel = 0;
|
||||
protected bool doPdfCopy = false;
|
||||
@@ -150,31 +155,31 @@ namespace AppData
|
||||
{
|
||||
case reportRichiesto.binPost:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepBin.GetData(intIdx, true, imagePath, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepBin.GetData(intIdx, true, imagePath, qrCodeBaseUrl);
|
||||
break;
|
||||
case reportRichiesto.binPre:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepBin.GetData(intIdx, false, imagePath, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepBin.GetData(intIdx, false, imagePath, qrCodeBaseUrl);
|
||||
break;
|
||||
case reportRichiesto.bunkGroup:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepBunkGroup.GetData(intIdx, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepBunkGroup.GetData(intIdx, qrCodeBaseUrl);
|
||||
break;
|
||||
case reportRichiesto.bunkList:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepBunkList.GetData(intIdx, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepBunkList.GetData(intIdx, qrCodeBaseUrl);
|
||||
break;
|
||||
case reportRichiesto.cart:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepCart.GetData(intIdx, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepCart.GetData(intIdx, qrCodeBaseUrl);
|
||||
break;
|
||||
case reportRichiesto.offline:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepPart.GetData(intIdx, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepPart.GetData(intIdx, qrCodeBaseUrl);
|
||||
break;
|
||||
case reportRichiesto.part:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepPart.GetData(intIdx, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepPart.GetData(intIdx, qrCodeBaseUrl);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -285,7 +290,7 @@ namespace AppData
|
||||
}
|
||||
else
|
||||
{
|
||||
DataLayer.man.taPJQ.insertQuery(documento.ToString(), keyParam, printerName);
|
||||
DLMan.taPJQ.insertQuery(documento.ToString(), keyParam, printerName);
|
||||
}
|
||||
if (queueOnly)
|
||||
{
|
||||
@@ -303,7 +308,7 @@ namespace AppData
|
||||
}
|
||||
else
|
||||
{
|
||||
nextJob = DataLayer.man.taPJQ.getNext()[0].KeyParam;
|
||||
nextJob = DLMan.taPJQ.getNext()[0].KeyParam;
|
||||
}
|
||||
}
|
||||
catch
|
||||
@@ -317,7 +322,7 @@ namespace AppData
|
||||
}
|
||||
else
|
||||
{
|
||||
DataLayer.man.taPJQ.chiudiZoombie(DateTime.Now.AddMilliseconds(-memLayer.ML.CRI("zombieMsTime")));
|
||||
DLMan.taPJQ.chiudiZoombie(DateTime.Now.AddMilliseconds(-memLayer.ML.CRI("zombieMsTime")));
|
||||
}
|
||||
// ora inizio a fare le mie stampe...
|
||||
Random rand = new Random();
|
||||
@@ -331,7 +336,7 @@ namespace AppData
|
||||
}
|
||||
else
|
||||
{
|
||||
DataLayer.man.taPJQ.updateLastTry(keyParam);
|
||||
DLMan.taPJQ.updateLastTry(keyParam);
|
||||
}
|
||||
// aspetto...
|
||||
msWait = rand.Next(memLayer.ML.confReadInt("minWait"), memLayer.ML.confReadInt("maxWait"));
|
||||
@@ -343,7 +348,7 @@ namespace AppData
|
||||
}
|
||||
else
|
||||
{
|
||||
nextJob = DataLayer.man.taPJQ.getNext()[0].KeyParam;
|
||||
nextJob = DLMan.taPJQ.getNext()[0].KeyParam;
|
||||
}
|
||||
}
|
||||
// salvo idx job...
|
||||
@@ -355,7 +360,7 @@ namespace AppData
|
||||
}
|
||||
else
|
||||
{
|
||||
idxPrintJob = DataLayer.man.taPJQ.getNext()[0].IdxPrintJob;
|
||||
idxPrintJob = DLMan.taPJQ.getNext()[0].IdxPrintJob;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -417,7 +422,7 @@ namespace AppData
|
||||
}
|
||||
else
|
||||
{
|
||||
DataLayer.man.taPJQ.updateStato(idxPrintJob, 1);
|
||||
DLMan.taPJQ.updateStato(idxPrintJob, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -429,7 +434,7 @@ namespace AppData
|
||||
}
|
||||
else
|
||||
{
|
||||
DataLayer.man.taPJQ.updateStato(idxPrintJob, -1);
|
||||
DLMan.taPJQ.updateStato(idxPrintJob, -1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -11,7 +11,7 @@ pipeline {
|
||||
steps {
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=346']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=347']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.versionNumberBeta = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
|
||||
+6
-1
@@ -1,4 +1,5 @@
|
||||
using SteamWare;
|
||||
using AppData;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Web.UI;
|
||||
@@ -7,6 +8,10 @@ namespace NKC_WF
|
||||
{
|
||||
public class BasePage : System.Web.UI.Page
|
||||
{
|
||||
/// <summary>
|
||||
/// Membro gestione accessi al datalayer (istanza x ogni classe controllo)
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
/// <summary>
|
||||
/// Wrapper traduzione termini
|
||||
/// </summary>
|
||||
|
||||
@@ -8,6 +8,10 @@ namespace NKC_WF
|
||||
{
|
||||
public class BaseUserControl : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Membro gestione accessi al datalayer (istanza x ogni classe controllo)
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
/// <summary>
|
||||
/// Generico evento di richiesta refresh a aprent
|
||||
/// </summary>
|
||||
@@ -67,7 +71,7 @@ namespace NKC_WF
|
||||
// sennò nel DB e salvo in redis...
|
||||
else
|
||||
{
|
||||
var tabMat = DataLayer.man.taMat.GetData();
|
||||
var tabMat = DLMan.taMat.GetData();
|
||||
foreach (var item in tabMat)
|
||||
{
|
||||
answ.Add(item.MatID, item.MatDesc);
|
||||
|
||||
@@ -11,6 +11,11 @@ namespace NKC_WF.Controllers
|
||||
public class BatchProcController : ApiController
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// oggetto static/singleton per fare chiamate sul datalayer
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce SE C'E' la richiesta di elaborazione BATCH corrente
|
||||
/// </summary>
|
||||
@@ -105,7 +110,7 @@ namespace NKC_WF.Controllers
|
||||
// deserializzo.
|
||||
baseNestAnsw batchProcAnsw = JsonConvert.DeserializeObject<baseNestAnsw>(content);
|
||||
// procedura idempotente: elimino eventuali dati della "busta" precedente...
|
||||
DataLayer.man.taEL.deteteByParent("", batchProcAnsw.EnvNum);
|
||||
DLMan.taEL.deteteByParent("", batchProcAnsw.EnvNum);
|
||||
// se ho errori inizio a salvarli...
|
||||
if (batchProcAnsw.ErrorList.Count > 0)
|
||||
{
|
||||
@@ -113,7 +118,7 @@ namespace NKC_WF.Controllers
|
||||
foreach (var item in batchProcAnsw.ErrorList)
|
||||
{
|
||||
// salvo log errore...
|
||||
DataLayer.man.taEL.insertQuery(DateTime.Now, item.ErrType, $"{batchProcAnsw.EnvNum}", $"{item.Uid}", $"{item.Description}");
|
||||
DLMan.taEL.insertQuery(DateTime.Now, item.ErrType, $"{batchProcAnsw.EnvNum}", $"{item.Uid}", $"{item.Description}");
|
||||
}
|
||||
}
|
||||
// se non nullo...
|
||||
@@ -139,7 +144,7 @@ namespace NKC_WF.Controllers
|
||||
|
||||
// recupero info sul batch / KIT specifico x capire se sia di tipo "validation"
|
||||
bool isValidation = false;
|
||||
var tabOrd = DataLayer.man.taOL.getByBatch(rispStima.BatchID);
|
||||
var tabOrd = DLMan.taOL.getByBatch(rispStima.BatchID);
|
||||
if (tabOrd.Count > 0)
|
||||
{
|
||||
isValidation = tabOrd[0].OrdType == "V";
|
||||
@@ -205,19 +210,19 @@ namespace NKC_WF.Controllers
|
||||
break;
|
||||
}
|
||||
// SALVO info riguardo al batch running
|
||||
DataLayer.man.taBL.updateStatus(rispStima.BatchID, bStatus, rispStima.EnvNum, (decimal)rispStima.EstimatedWorktime / 60);
|
||||
DLMan.taBL.updateStatus(rispStima.BatchID, bStatus, rispStima.EnvNum, (decimal)rispStima.EstimatedWorktime / 60);
|
||||
// salvo udpate elenco ITEMS
|
||||
ComLib.updatePartsFromNesting(rispStima.PartList);
|
||||
// aggiorno cadPath x items che non abbiano valorizzato...
|
||||
string cadBasePath = $"{memLayer.ML.CRS("nestBasePath")}{memLayer.ML.CRS("drawingFolder")}/";
|
||||
DataLayer.man.taIL.updateCadPath(cadBasePath, rispStima.BatchID, false);
|
||||
DLMan.taIL.updateCadPath(cadBasePath, rispStima.BatchID, false);
|
||||
// verifico IN CASO di validazione andata a buon fine --> valorizzo tabella!
|
||||
if (bStatus > 7)
|
||||
{
|
||||
// recupero ordine da batch
|
||||
if (tabOrd.Count > 0)
|
||||
{
|
||||
DataLayer.man.taIV.upsertQuery(tabOrd[0].OrderExtCode, rispStima.BatchID, bStatus, rispStima.EstimatedWorktime);
|
||||
DLMan.taIV.upsertQuery(tabOrd[0].OrderExtCode, rispStima.BatchID, bStatus, rispStima.EstimatedWorktime);
|
||||
}
|
||||
}
|
||||
// registro OK
|
||||
@@ -260,9 +265,9 @@ namespace NKC_WF.Controllers
|
||||
if (rispNest.ProcessStatus == procStatus.completed || rispNest.ProcessStatus == procStatus.error)
|
||||
{
|
||||
// resetto le precedenti elaborazioni: elimino dati child MA NON il batch...
|
||||
DataLayer.man.taBL.resetTree(rispNest.BatchID);
|
||||
DLMan.taBL.resetTree(rispNest.BatchID);
|
||||
// SALVO info riguardo al batch completato
|
||||
DataLayer.man.taBL.updateStatus(rispNest.BatchID, bStatus, rispNest.EnvNum, (decimal)rispNest.EstimatedWorktime / 60);
|
||||
DLMan.taBL.updateStatus(rispNest.BatchID, bStatus, rispNest.EnvNum, (decimal)rispNest.EstimatedWorktime / 60);
|
||||
// salvo info riguardo ai vari Bunk / Sheets / Items...
|
||||
ComLib.updateBunksFromNesting(rispNest.BatchID, rispNest.BunkList);
|
||||
// salvo info x CART & BINS previsti
|
||||
@@ -301,7 +306,7 @@ namespace NKC_WF.Controllers
|
||||
if (rispOffOrd.ProcessStatus == procStatus.error)
|
||||
{
|
||||
// status -1 --> ERRORE!!!
|
||||
DataLayer.man.taOffOL.updateStatus(Math.Abs(rispOffOrd.BatchID), -1);
|
||||
DLMan.taOffOL.updateStatus(Math.Abs(rispOffOrd.BatchID), -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -310,7 +315,7 @@ namespace NKC_WF.Controllers
|
||||
string fixPathDraw = rispOffOrd.DrawingPath.ToLower().Replace(nestBasePath, servBasePath).Replace('/','\\');
|
||||
string fixPathCnc = rispOffOrd.CncPath.ToLower().Replace(nestBasePath, servBasePath).Replace('/', '\\');
|
||||
// segno offline order come processato registrando il disegno e segno ogni PART come lavorata da OffOrd2Item (status 992)
|
||||
DataLayer.man.taOffOL.updateDrawing(Math.Abs(rispOffOrd.BatchID), fixPathDraw, fixPathCnc);
|
||||
DLMan.taOffOL.updateDrawing(Math.Abs(rispOffOrd.BatchID), fixPathDraw, fixPathCnc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,10 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
public class BunkController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// oggetto static/singleton per fare chiamate sul datalayer
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
/// <summary>
|
||||
/// COdice macchina (HARD CODED)
|
||||
/// </summary>
|
||||
@@ -92,14 +96,14 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
foreach (var item in currBunk.SheetList)
|
||||
{
|
||||
DataLayer.man.taSHL.updateDate(item.SheetId, item.Printing.DtStart, item.Printing.DtEnd, item.Machining.DtStart, item.Machining.DtEnd, item.Unloading.DtStart, item.Unloading.DtEnd, (int)item.Status);
|
||||
DLMan.taSHL.updateDate(item.SheetId, item.Printing.DtStart, item.Printing.DtEnd, item.Machining.DtStart, item.Machining.DtEnd, item.Unloading.DtStart, item.Unloading.DtEnd, (int)item.Status);
|
||||
// verifico SE SIA AVVENUTO CON SUCCESSO lo step di lavorazione...
|
||||
if (item.Machining.Success)
|
||||
{
|
||||
// SE machining completato --> status a LAVORATO!
|
||||
if (item.Machining.DtEnd != null)
|
||||
{
|
||||
DataLayer.man.taIL.updateSheetStatus(item.SheetId, 1, "PROD");
|
||||
DLMan.taIL.updateSheetStatus(item.SheetId, 1, "PROD");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -139,11 +143,11 @@ namespace NKC_WF.Controllers
|
||||
// calcolo stsatus dalle date valide...
|
||||
|
||||
|
||||
DataLayer.man.taSHL.updateDate(item.SheetId, item.Printing.DtStart, item.Printing.DtEnd, item.Machining.DtStart, item.Machining.DtEnd, item.Unloading.DtStart, item.Unloading.DtEnd, (int)item.Status);
|
||||
DLMan.taSHL.updateDate(item.SheetId, item.Printing.DtStart, item.Printing.DtEnd, item.Machining.DtStart, item.Machining.DtEnd, item.Unloading.DtStart, item.Unloading.DtEnd, (int)item.Status);
|
||||
// SE machining completato --> status a LAVORATO!
|
||||
if (item.Machining.DtEnd != null)
|
||||
{
|
||||
DataLayer.man.taIL.updateSheetStatus(item.SheetId, 1, "PROD");
|
||||
DLMan.taIL.updateSheetStatus(item.SheetId, 1, "PROD");
|
||||
}
|
||||
}
|
||||
// segnalo avanzamento su redis x pagina unload
|
||||
|
||||
@@ -7,6 +7,10 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
public class MaterialController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// oggetto static/singleton per fare chiamate sul datalayer
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
/// <summary>
|
||||
/// Restituisce ELENCO materiali
|
||||
/// </summary>
|
||||
@@ -16,7 +20,7 @@ namespace NKC_WF.Controllers
|
||||
public List<Material> Get()
|
||||
{
|
||||
List<Material> answ = new List<Material>();
|
||||
var table = DataLayer.man.taMat.GetData();
|
||||
var table = DLMan.taMat.GetData();
|
||||
Material currMat = new Material();
|
||||
foreach (var item in table)
|
||||
{
|
||||
|
||||
@@ -13,6 +13,11 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
public class PrintQueueController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// oggetto static/singleton per fare chiamate sul datalayer
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
|
||||
#region classi gestione PJQ
|
||||
|
||||
/// <summary>
|
||||
@@ -24,7 +29,7 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
int answ = 0;
|
||||
// resetto conteggio in redis...
|
||||
DS_Report.PrintJobQueueDataTable tabPJQ = DataLayer.man.taPJQ.getWaiting();
|
||||
DS_Report.PrintJobQueueDataTable tabPJQ = DLMan.taPJQ.getWaiting();
|
||||
if (tabPJQ != null)
|
||||
{
|
||||
answ = tabPJQ.Count;
|
||||
@@ -39,7 +44,7 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
int answ = 0;
|
||||
// resetto conteggio in redis...
|
||||
DS_Report.PrintJobQueueDataTable tabPJQ = DataLayer.man.taPJQ.getWaiting();
|
||||
DS_Report.PrintJobQueueDataTable tabPJQ = DLMan.taPJQ.getWaiting();
|
||||
if (tabPJQ != null)
|
||||
{
|
||||
var selQueue = tabPJQ.Where(x => queueSet.Contains($"|{x.prtName}|")).ToList();
|
||||
@@ -68,33 +73,33 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
case reportRichiesto.binPost:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepBin.GetData(intIdx, true, imagePath, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepBin.GetData(intIdx, true, imagePath, qrCodeBaseUrl);
|
||||
answ.Add(memLayer.ML.cdv("ReportDS_DocBin"), tab);
|
||||
break;
|
||||
case reportRichiesto.binPre:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepBin.GetData(intIdx, false, imagePath, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepBin.GetData(intIdx, false, imagePath, qrCodeBaseUrl);
|
||||
answ.Add(memLayer.ML.cdv("ReportDS_DocBin"), tab);
|
||||
break;
|
||||
case reportRichiesto.bunkGroup:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepBunkGroup.GetData(intIdx, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepBunkGroup.GetData(intIdx, qrCodeBaseUrl);
|
||||
answ.Add(memLayer.ML.cdv("ReportDS_DocBunkGroup"), tab);
|
||||
break;
|
||||
case reportRichiesto.bunkList:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepBunkList.GetData(intIdx, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepBunkList.GetData(intIdx, qrCodeBaseUrl);
|
||||
answ.Add(memLayer.ML.cdv("ReportDS_DocBunkList"), tab);
|
||||
break;
|
||||
case reportRichiesto.cart:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepCart.GetData(intIdx, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepCart.GetData(intIdx, qrCodeBaseUrl);
|
||||
answ.Add(memLayer.ML.cdv("ReportDS_DocCart"), tab);
|
||||
break;
|
||||
case reportRichiesto.offline:
|
||||
case reportRichiesto.part:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepPart.GetData(intIdx, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepPart.GetData(intIdx, qrCodeBaseUrl);
|
||||
answ.Add(memLayer.ML.cdv("ReportDS_DocPart"), tab);
|
||||
break;
|
||||
default:
|
||||
@@ -172,7 +177,7 @@ namespace NKC_WF.Controllers
|
||||
answ = countWaitingDb;
|
||||
memLayer.ML.setRSV(ComLib.redQueueCount, answ.ToString(), memLayer.ML.CRI("cacheQueueSec"));
|
||||
// chiudo gli zombie (stampe non chiuse)...
|
||||
DataLayer.man.taPJQ.chiudiZoombie(DateTime.Now.AddMilliseconds(-memLayer.ML.CRI("zombieMsTime")));
|
||||
DLMan.taPJQ.chiudiZoombie(DateTime.Now.AddMilliseconds(-memLayer.ML.CRI("zombieMsTime")));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
@@ -187,7 +192,7 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
List<reportData> answ = new List<reportData>();
|
||||
// recupero da DB...
|
||||
DS_Report.PrintJobQueueDataTable tabPJQ = DataLayer.man.taPJQ.getByQueue(id);
|
||||
DS_Report.PrintJobQueueDataTable tabPJQ = DLMan.taPJQ.getByQueue(id);
|
||||
if (tabPJQ.Count > 0)
|
||||
{
|
||||
reportData currReport = new reportData();
|
||||
@@ -237,7 +242,7 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
int idxPJQ = 0;
|
||||
int.TryParse(printAnsw.ticketNum, out idxPJQ);
|
||||
DataLayer.man.taPJQ.updateStato(idxPJQ, printAnsw.newStatus);
|
||||
DLMan.taPJQ.updateStato(idxPJQ, printAnsw.newStatus);
|
||||
// resetto conteggio in redis...
|
||||
memLayer.ML.setRSV(ComLib.redQueueCount, countWaitingDb.ToString(), memLayer.ML.CRI("cacheQueueSec"));
|
||||
// svuoto code redis salvate..
|
||||
|
||||
@@ -13,6 +13,11 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
public class PrintQueueLenController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// oggetto static/singleton per fare chiamate sul datalayer
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
|
||||
#region classi gestione PJQ
|
||||
|
||||
/// <summary>
|
||||
@@ -24,7 +29,7 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
int answ = 0;
|
||||
// resetto conteggio in redis...
|
||||
DS_Report.PrintJobQueueDataTable tabPJQ = DataLayer.man.taPJQ.getWaiting();
|
||||
DS_Report.PrintJobQueueDataTable tabPJQ = DLMan.taPJQ.getWaiting();
|
||||
if (tabPJQ != null)
|
||||
{
|
||||
answ = tabPJQ.Count;
|
||||
@@ -39,7 +44,7 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
int answ = 0;
|
||||
// resetto conteggio in redis...
|
||||
DS_Report.PrintJobQueueDataTable tabPJQ = DataLayer.man.taPJQ.getWaiting();
|
||||
DS_Report.PrintJobQueueDataTable tabPJQ = DLMan.taPJQ.getWaiting();
|
||||
if (tabPJQ != null)
|
||||
{
|
||||
var selQueue = tabPJQ.Where(x => queueSet.Contains($"|{x.prtName}|")).ToList();
|
||||
@@ -68,33 +73,33 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
case reportRichiesto.binPost:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepBin.GetData(intIdx, true, imagePath, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepBin.GetData(intIdx, true, imagePath, qrCodeBaseUrl);
|
||||
answ.Add(memLayer.ML.cdv("ReportDS_DocBin"), tab);
|
||||
break;
|
||||
case reportRichiesto.binPre:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepBin.GetData(intIdx, false, imagePath, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepBin.GetData(intIdx, false, imagePath, qrCodeBaseUrl);
|
||||
answ.Add(memLayer.ML.cdv("ReportDS_DocBin"), tab);
|
||||
break;
|
||||
case reportRichiesto.bunkGroup:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepBunkGroup.GetData(intIdx, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepBunkGroup.GetData(intIdx, qrCodeBaseUrl);
|
||||
answ.Add(memLayer.ML.cdv("ReportDS_DocBunkGroup"), tab);
|
||||
break;
|
||||
case reportRichiesto.bunkList:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepBunkList.GetData(intIdx, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepBunkList.GetData(intIdx, qrCodeBaseUrl);
|
||||
answ.Add(memLayer.ML.cdv("ReportDS_DocBunkList"), tab);
|
||||
break;
|
||||
case reportRichiesto.cart:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepCart.GetData(intIdx, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepCart.GetData(intIdx, qrCodeBaseUrl);
|
||||
answ.Add(memLayer.ML.cdv("ReportDS_DocCart"), tab);
|
||||
break;
|
||||
case reportRichiesto.offline:
|
||||
case reportRichiesto.part:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
tab = (DataTable)DataLayer.man.taRepPart.GetData(intIdx, qrCodeBaseUrl);
|
||||
tab = (DataTable)DLMan.taRepPart.GetData(intIdx, qrCodeBaseUrl);
|
||||
answ.Add(memLayer.ML.cdv("ReportDS_DocPart"), tab);
|
||||
break;
|
||||
default:
|
||||
@@ -172,7 +177,7 @@ namespace NKC_WF.Controllers
|
||||
answ = countWaitingDb;
|
||||
memLayer.ML.setRSV(ComLib.redQueueCount, answ.ToString(), memLayer.ML.CRI("cacheQueueSec"));
|
||||
// chiudo gli zombie (stampe non chiuse)...
|
||||
DataLayer.man.taPJQ.chiudiZoombie(DateTime.Now.AddMilliseconds(-memLayer.ML.CRI("zombieMsTime")));
|
||||
DLMan.taPJQ.chiudiZoombie(DateTime.Now.AddMilliseconds(-memLayer.ML.CRI("zombieMsTime")));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
@@ -202,7 +207,7 @@ namespace NKC_WF.Controllers
|
||||
answ = countWaitingDbQueueMult(queueList);
|
||||
memLayer.ML.setRSV($"{ComLib.redQueueCountSet}:{queueList}", answ.ToString(), memLayer.ML.CRI("cacheQueueSec"));
|
||||
// chiudo gli zombie (stampe non chiuse)...
|
||||
DataLayer.man.taPJQ.chiudiZoombie(DateTime.Now.AddMilliseconds(-memLayer.ML.CRI("zombieMsTime")));
|
||||
DLMan.taPJQ.chiudiZoombie(DateTime.Now.AddMilliseconds(-memLayer.ML.CRI("zombieMsTime")));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,11 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
public class SheetController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// oggetto static/singleton per fare chiamate sul datalayer
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
|
||||
/// <summary>
|
||||
/// COdice macchina (HARD CODED)
|
||||
/// </summary>
|
||||
@@ -91,7 +96,7 @@ namespace NKC_WF.Controllers
|
||||
// se non nullo...
|
||||
if (currSheet != null)
|
||||
{
|
||||
DataLayer.man.taSHL.updateDate(currSheet.SheetId, currSheet.Printing.DtStart, currSheet.Printing.DtEnd, currSheet.Machining.DtStart, currSheet.Machining.DtEnd, currSheet.Unloading.DtStart, currSheet.Unloading.DtEnd, (int)currSheet.Status);
|
||||
DLMan.taSHL.updateDate(currSheet.SheetId, currSheet.Printing.DtStart, currSheet.Printing.DtEnd, currSheet.Machining.DtStart, currSheet.Machining.DtEnd, currSheet.Unloading.DtStart, currSheet.Unloading.DtEnd, (int)currSheet.Status);
|
||||
// verifico SE SIA AVVENUTO CON SUCCESSO lo step di lavorazione...
|
||||
if (currSheet.Machining.Success)
|
||||
{
|
||||
@@ -99,7 +104,7 @@ namespace NKC_WF.Controllers
|
||||
if (currSheet.Machining.DtEnd != null)
|
||||
{
|
||||
// hard coded su multiax
|
||||
DataLayer.man.taIL.updateSheetStatus(currSheet.SheetId, 1, machine);
|
||||
DLMan.taIL.updateSheetStatus(currSheet.SheetId, 1, machine);
|
||||
}
|
||||
}
|
||||
// segnalo avanzamento su redis x pagina unload
|
||||
@@ -108,7 +113,7 @@ namespace NKC_WF.Controllers
|
||||
BunkId = currSheet.BunkId;
|
||||
}
|
||||
}
|
||||
var tabBunks = DataLayer.man.taSTL.getByKey(BunkId);
|
||||
var tabBunks = DLMan.taSTL.getByKey(BunkId);
|
||||
if (tabBunks.Count > 0)
|
||||
{
|
||||
BatchId = tabBunks[0].BatchID;
|
||||
@@ -158,12 +163,12 @@ namespace NKC_WF.Controllers
|
||||
// se non nullo...
|
||||
if (currSheet != null)
|
||||
{
|
||||
DataLayer.man.taSHL.updateDate(currSheet.SheetId, currSheet.Printing.DtStart, currSheet.Printing.DtEnd, currSheet.Machining.DtStart, currSheet.Machining.DtEnd, currSheet.Unloading.DtStart, currSheet.Unloading.DtEnd, (int)currSheet.Status);
|
||||
DLMan.taSHL.updateDate(currSheet.SheetId, currSheet.Printing.DtStart, currSheet.Printing.DtEnd, currSheet.Machining.DtStart, currSheet.Machining.DtEnd, currSheet.Unloading.DtStart, currSheet.Unloading.DtEnd, (int)currSheet.Status);
|
||||
// SE machining completato --> status a LAVORATO x item!
|
||||
if (currSheet.Machining.DtEnd != null)
|
||||
{
|
||||
// hard coded su multiax
|
||||
DataLayer.man.taIL.updateSheetStatus(currSheet.SheetId, 1, "WRK001");
|
||||
DLMan.taIL.updateSheetStatus(currSheet.SheetId, 1, "WRK001");
|
||||
}
|
||||
// segnalo avanzamento su redis x pagina unload
|
||||
ComLib.advaceSheetRevByBunk(currSheet.BunkId);
|
||||
@@ -172,7 +177,7 @@ namespace NKC_WF.Controllers
|
||||
}
|
||||
}
|
||||
}
|
||||
var tabBunks = DataLayer.man.taSTL.getByKey(BunkId);
|
||||
var tabBunks = DLMan.taSTL.getByKey(BunkId);
|
||||
if (tabBunks.Count > 0)
|
||||
{
|
||||
BatchId = tabBunks[0].BatchID;
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace NKC_WF.WebUserControls
|
||||
lbtAddOne.Visible = false;
|
||||
if (showBtns)
|
||||
{
|
||||
var tabOKIB = DataLayer.man.taOKIB_Sum.getByKey(BinID, CartID);
|
||||
var tabOKIB = DLMan.taOKIB_Sum.getByKey(BinID, CartID);
|
||||
if (tabOKIB.Count > 0)
|
||||
{
|
||||
numMax = tabOKIB[0].NumItems - tabOKIB[0].NumPicked;
|
||||
@@ -167,7 +167,7 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
protected void lbtAddOne_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataLayer.man.taPLog.acquirePaint(BinID, CartID, 1, currIpAddress, user_std.UtSn.userNameAD);
|
||||
DLMan.taPLog.acquirePaint(BinID, CartID, 1, currIpAddress, user_std.UtSn.userNameAD);
|
||||
lgInfo($"cmp_KS_BinCart | taPLog.acquirePaint | BinID : {BinID} | CartID: {CartID} | num: 1 | user: {user_std.UtSn.userNameAD} | IP: {currIpAddress}");
|
||||
// resetto
|
||||
CartID = 0;
|
||||
@@ -178,7 +178,7 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
protected void lbtAddAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataLayer.man.taPLog.acquirePaint(BinID, CartID, numMax, currIpAddress, user_std.UtSn.userNameAD);
|
||||
DLMan.taPLog.acquirePaint(BinID, CartID, numMax, currIpAddress, user_std.UtSn.userNameAD);
|
||||
lgInfo($"cmp_KS_BinCart | taPLog.acquirePaint | BinID : {BinID} | CartID: {CartID} | num: {numMax} | user: {user_std.UtSn.userNameAD} | IP: {currIpAddress}");
|
||||
// resetto
|
||||
CartID = 0;
|
||||
|
||||
@@ -178,7 +178,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (showBtns)
|
||||
{
|
||||
// verifico SE item e cart corrispondono x mostrare button
|
||||
var tabCarts = DataLayer.man.taCR.getByItemID(ItemID);
|
||||
var tabCarts = DLMan.taCR.getByItemID(ItemID);
|
||||
if (tabCarts != null)
|
||||
{
|
||||
if (tabCarts.Count > 0)
|
||||
@@ -211,7 +211,7 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
protected void lbtAddItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataLayer.man.taPLog.acquireItems(ItemID, CartID, currIpAddress, user_std.UtSn.userNameAD);
|
||||
DLMan.taPLog.acquireItems(ItemID, CartID, currIpAddress, user_std.UtSn.userNameAD);
|
||||
lgInfo($"cmp_KS_Items | taPLog.acquireItems | ItemID : {ItemID} | CartID: {CartID} | user: {user_std.UtSn.userNameAD} | IP: {currIpAddress}");
|
||||
// resetto
|
||||
CartID = 0;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace NKC_WF.WebUserControls
|
||||
lbtAddAll.Visible = false;
|
||||
if (showBtns)
|
||||
{
|
||||
var tabOKOI = DataLayer.man.taOKOI_Sum.getByKey(OtherItemID, CartID);
|
||||
var tabOKOI = DLMan.taOKOI_Sum.getByKey(OtherItemID, CartID);
|
||||
if (tabOKOI.Count > 0)
|
||||
{
|
||||
numMax = tabOKOI[0].NumItems - tabOKOI[0].NumPicked;
|
||||
@@ -178,7 +178,7 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
protected void lbtAddAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataLayer.man.taPLog.acquireOtherItems(OtherItemID, CartID, numMax, currIpAddress, user_std.UtSn.userNameAD);
|
||||
DLMan.taPLog.acquireOtherItems(OtherItemID, CartID, numMax, currIpAddress, user_std.UtSn.userNameAD);
|
||||
lgInfo($"cmp_KS_OtherItemsCart | taPLog.acquireOtherItems | OtherItemID : {OtherItemID} | CartID: {CartID} | numMax: {numMax} | user: {user_std.UtSn.userNameAD} | IP: {currIpAddress}");
|
||||
// resetto
|
||||
CartID = 0;
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
currQueue = DataLayer.man.getPrinter("PC-MACHINE-UNLOAD2");
|
||||
currQueue = DLMan.getPrinter("PC-MACHINE-UNLOAD2");
|
||||
}
|
||||
}
|
||||
public void doUpdate()
|
||||
@@ -119,7 +119,7 @@ namespace NKC_WF.WebUserControls
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// invio SINGOLO record in stampa
|
||||
DataLayer.man.stampaDoc(selBinId.ToString(), currQueue, tipoDocumento.docBinPre, Request.UserHostName);
|
||||
DLMan.stampaDoc(selBinId.ToString(), currQueue, tipoDocumento.docBinPre, Request.UserHostName);
|
||||
// reset
|
||||
doReset();
|
||||
}
|
||||
@@ -131,7 +131,7 @@ namespace NKC_WF.WebUserControls
|
||||
protected void lbtPrintAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiamo stored x stampare OGNI cart del BATCH
|
||||
var tabBins = DataLayer.man.taBN.getByBatch(BatchId);
|
||||
var tabBins = DLMan.taBN.getByBatch(BatchId);
|
||||
try
|
||||
{
|
||||
if (tabBins != null && tabBins.Count > 0)
|
||||
@@ -139,7 +139,7 @@ namespace NKC_WF.WebUserControls
|
||||
foreach (var item in tabBins)
|
||||
{
|
||||
// invio SINGOLO record in stampa
|
||||
DataLayer.man.stampaDoc(item.BinID.ToString(), currQueue, tipoDocumento.docBinPre, Request.UserHostName);
|
||||
DLMan.stampaDoc(item.BinID.ToString(), currQueue, tipoDocumento.docBinPre, Request.UserHostName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
if(!Page.IsPostBack)
|
||||
{
|
||||
currQueue= DataLayer.man.getPrinter("PC-MACHINE-UNLOAD");
|
||||
currQueue= DLMan.getPrinter("PC-MACHINE-UNLOAD");
|
||||
}
|
||||
}
|
||||
public void doUpdate()
|
||||
@@ -118,7 +118,7 @@ namespace NKC_WF.WebUserControls
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// invio SINGOLO record in stampa
|
||||
DataLayer.man.stampaDoc(selCartId.ToString(), currQueue, tipoDocumento.docCart, Request.UserHostName);
|
||||
DLMan.stampaDoc(selCartId.ToString(), currQueue, tipoDocumento.docCart, Request.UserHostName);
|
||||
// reset
|
||||
doReset();
|
||||
}
|
||||
@@ -130,7 +130,7 @@ namespace NKC_WF.WebUserControls
|
||||
protected void lbtPrintAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiamo stored x stampare OGNI cart del BATCH
|
||||
var tabCarts = DataLayer.man.taCR.getByBatch(BatchId);
|
||||
var tabCarts = DLMan.taCR.getByBatch(BatchId);
|
||||
try
|
||||
{
|
||||
if (tabCarts != null && tabCarts.Count > 0)
|
||||
@@ -138,7 +138,7 @@ namespace NKC_WF.WebUserControls
|
||||
foreach (var item in tabCarts)
|
||||
{
|
||||
// invio SINGOLO record in stampa
|
||||
DataLayer.man.stampaDoc(item.CartID.ToString(), currQueue, tipoDocumento.docCart, Request.UserHostName);
|
||||
DLMan.stampaDoc(item.CartID.ToString(), currQueue, tipoDocumento.docCart, Request.UserHostName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace NKC_WF.WebUserControls
|
||||
string baseCurr = memLayer.ML.CRS("servBasePath").ToLower();
|
||||
try
|
||||
{
|
||||
var tabSheets = DataLayer.man.taSHL.getBySheetId(SheetId);
|
||||
var tabSheets = DLMan.taSHL.getBySheetId(SheetId);
|
||||
if (tabSheets.Count > 0)
|
||||
{
|
||||
filename = tabSheets[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr);
|
||||
|
||||
@@ -260,7 +260,7 @@ namespace NKC_WF.WebUserControls
|
||||
protected void lbtAccept_Click(object sender, EventArgs e)
|
||||
{
|
||||
// registro accettazione Nesting
|
||||
DataLayer.man.taBL.acceptBatch(BatchId, DataLayer.man.CodSoggCurrUser);
|
||||
DLMan.taBL.acceptBatch(BatchId, DLMan.CodSoggCurrUser);
|
||||
raiseEvent();
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ namespace NKC_WF.WebUserControls
|
||||
// resetto richiesta
|
||||
ComLib.resetBatchReq();
|
||||
// registro su DB nesting iniziato...
|
||||
DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.Imported, "", -1);
|
||||
DLMan.taBL.updateStatus(BatchId, (int)BatchStatus.Imported, "", -1);
|
||||
raiseEvent();
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ namespace NKC_WF.WebUserControls
|
||||
ComLib.sendBatchReq(BatchId, "Estimation", 1);
|
||||
|
||||
// registro su DB nesting iniziato...
|
||||
DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.EstimationRequested, "", 0);
|
||||
DLMan.taBL.updateStatus(BatchId, (int)BatchStatus.EstimationRequested, "", 0);
|
||||
raiseEvent();
|
||||
}
|
||||
protected void lbtStopNesting_Click(object sender, EventArgs e)
|
||||
@@ -288,7 +288,7 @@ namespace NKC_WF.WebUserControls
|
||||
// resetto richiesta
|
||||
ComLib.resetBatchReq();
|
||||
// registro su DB nesting iniziato...
|
||||
DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.EstimationDone, "", -1);
|
||||
DLMan.taBL.updateStatus(BatchId, (int)BatchStatus.EstimationDone, "", -1);
|
||||
raiseEvent();
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ namespace NKC_WF.WebUserControls
|
||||
ComLib.sendBatchReq(BatchId, "Nesting", 2);
|
||||
|
||||
// registro su DB nesting iniziato...
|
||||
DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.NestRequested, "", -1);
|
||||
DLMan.taBL.updateStatus(BatchId, (int)BatchStatus.NestRequested, "", -1);
|
||||
raiseEvent();
|
||||
}
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (!string.IsNullOrEmpty(lbt.CommandArgument))
|
||||
{
|
||||
// eseguo richiesta reset
|
||||
DataLayer.man.taBL.redoPartValid(lbt.CommandArgument);
|
||||
DLMan.taBL.redoPartValid(lbt.CommandArgument);
|
||||
// eventualmente mando primo batch da validare...
|
||||
bool newValidSent = ComLib.sendFirstValidationBatch();
|
||||
// refresh!
|
||||
|
||||
@@ -14,12 +14,12 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
protected void lbtResetStackBuild_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataLayer.man.taSHL.resetPrepared(-9999);
|
||||
DLMan.taSHL.resetPrepared(-9999);
|
||||
}
|
||||
|
||||
protected void lbtResetNest_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataLayer.man.taBL.resetNesting(-9999);
|
||||
DLMan.taBL.resetNesting(-9999);
|
||||
}
|
||||
|
||||
protected void lbtSaveLastAnsw_Click(object sender, EventArgs e)
|
||||
@@ -54,7 +54,7 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
protected void lbtResetProd_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataLayer.man.taBL.resetProdCall();
|
||||
DLMan.taBL.resetProdCall();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,12 +128,12 @@ namespace NKC_WF.WebUserControls
|
||||
try
|
||||
{
|
||||
// chiamo procedura SQL x import BATCH... come test o reale secondo del parametro
|
||||
var tabCount = DataLayer.man.taCount.getNextNum("NumTicket");
|
||||
var tabCount = DLMan.taCount.getNextNum("NumTicket");
|
||||
if (tabCount.Count == 1)
|
||||
{
|
||||
numTask = tabCount[0].LastNum;
|
||||
}
|
||||
var risultati = DataLayer.man.taImpLog.importCsvKit($"{dirImport}", fileName, batchName, ";", "\n", "2", numTask, 0, 0, testOnly);
|
||||
var risultati = DLMan.taImpLog.importCsvKit($"{dirImport}", fileName, batchName, ";", "\n", "2", numTask, 0, 0, testOnly);
|
||||
// se ho delle righe di log processo...
|
||||
bool allCheck = true;
|
||||
foreach (var item in risultati)
|
||||
|
||||
@@ -55,10 +55,10 @@ namespace NKC_WF.WebUserControls
|
||||
switch (task)
|
||||
{
|
||||
case "Appr":
|
||||
DataLayer.man.taPL.updateStatus(packListId, 2);
|
||||
DLMan.taPL.updateStatus(packListId, 2);
|
||||
break;
|
||||
case "Remove":
|
||||
DataLayer.man.taPL.updateStatus(packListId, 5);
|
||||
DLMan.taPL.updateStatus(packListId, 5);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -39,8 +39,8 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
private void fixSchedOrd()
|
||||
{
|
||||
numRows = DataLayer.man.taPL.getToSchedule().Count * 10;
|
||||
DataLayer.man.taPL.fixSched();
|
||||
numRows = DLMan.taPL.getToSchedule().Count * 10;
|
||||
DLMan.taPL.fixSched();
|
||||
}
|
||||
|
||||
|
||||
@@ -74,8 +74,8 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
int.TryParse(lbtBtn.CommandArgument, out PackListId);
|
||||
// avvio il job selezionato e indico status running
|
||||
DataLayer.man.taPL.updateSchedPrior(PackListId, -10);
|
||||
DataLayer.man.taPL.updateStatus(PackListId, 3);
|
||||
DLMan.taPL.updateSchedPrior(PackListId, -10);
|
||||
DLMan.taPL.updateStatus(PackListId, 3);
|
||||
// fix grafico!
|
||||
doRefresh();
|
||||
raiseEvent();
|
||||
@@ -85,7 +85,7 @@ namespace NKC_WF.WebUserControls
|
||||
private void moveBatch(int PackListId, int step)
|
||||
{
|
||||
// aggiorno
|
||||
DataLayer.man.taPL.updateSchedPrior(PackListId, step);
|
||||
DLMan.taPL.updateSchedPrior(PackListId, step);
|
||||
doRefresh();
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (!checkVisible(mode, currPrior))
|
||||
{
|
||||
// (2) che running siano zero,
|
||||
answ = DataLayer.man.taPL.getRunning().Count == 0;
|
||||
answ = DLMan.taPL.getRunning().Count == 0;
|
||||
}
|
||||
|
||||
return answ;
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
if (string.IsNullOrEmpty(lastCmd)) doRaiseEv = true;
|
||||
// processiamo barcode letto
|
||||
decodedData decoData = DataLayer.man.decodeBcode(lastCmd);
|
||||
decodedData decoData = DLMan.decodeBcode(lastCmd);
|
||||
switch (decoData.codeType)
|
||||
{
|
||||
case codeType.UNK:
|
||||
@@ -694,7 +694,7 @@ namespace NKC_WF.WebUserControls
|
||||
string cartDtmx = "-";
|
||||
try
|
||||
{
|
||||
var tabCart = DataLayer.man.taCR.getByItemID(itemRow.ItemID);
|
||||
var tabCart = DLMan.taCR.getByItemID(itemRow.ItemID);
|
||||
if (tabCart != null && tabCart.Count > 0)
|
||||
{
|
||||
cartDtmx = tabCart[0].CartDtmx;
|
||||
@@ -770,14 +770,14 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
get
|
||||
{
|
||||
return DataLayer.man.taBN.getByItemID(itemIdSelected);
|
||||
return DLMan.taBN.getByItemID(itemIdSelected);
|
||||
}
|
||||
}
|
||||
protected DS_App.CartsDataTable currCartTab
|
||||
{
|
||||
get
|
||||
{
|
||||
return DataLayer.man.taCR.getByItemID(itemIdSelected);
|
||||
return DLMan.taCR.getByItemID(itemIdSelected);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -804,12 +804,12 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
protected void lbtResetSel_Click(object sender, EventArgs e)
|
||||
{
|
||||
var tabSheet = DataLayer.man.taSHL.getByItemID(itemIdSelected);
|
||||
var tabSheet = DLMan.taSHL.getByItemID(itemIdSelected);
|
||||
if (tabSheet.Count == 1)
|
||||
{
|
||||
resetShowData();
|
||||
// resetto sheet selezionato...
|
||||
DataLayer.man.taIL.updateSheetStatusPU(tabSheet[0].SheetID, PlaceId);
|
||||
DLMan.taIL.updateSheetStatusPU(tabSheet[0].SheetID, PlaceId);
|
||||
lgInfo($"cmp_kittingSmart | taIL.updateSheetStatusPU | SheetID: {tabSheet[0].SheetID} | PlaceId: {PlaceId}");
|
||||
resetSelection();
|
||||
showItemDetail(false, null, false);
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
if (string.IsNullOrEmpty(lastCmd)) doRaiseEv = true;
|
||||
// processiamo barcode letto
|
||||
decodedData decoData = DataLayer.man.decodeBcode(lastCmd);
|
||||
decodedData decoData = DLMan.decodeBcode(lastCmd);
|
||||
switch (decoData.codeType)
|
||||
{
|
||||
case codeType.Item:
|
||||
@@ -288,9 +288,9 @@ namespace NKC_WF.WebUserControls
|
||||
protected void lbtPrintLabels_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiamo procedura stampa report x etichette dei pezzi lavorati offline
|
||||
string printer = DataLayer.man.getPrinter("PC-MACHINE-PARTS");
|
||||
string printer = DLMan.getPrinter("PC-MACHINE-PARTS");
|
||||
// mando stampa....
|
||||
bool fatto = DataLayer.man.stampaDoc(itemIdSelected.ToString(), printer, tipoDocumento.docPart, Request.UserHostName);
|
||||
bool fatto = DLMan.stampaDoc(itemIdSelected.ToString(), printer, tipoDocumento.docPart, Request.UserHostName);
|
||||
|
||||
lgInfo($"PRINT req for labelsPrint | codeInt : {itemIdSelected} | currQueue: {printer} | tipoDoc: {tipoDocumento.docPart} | user: {Request.UserHostName} | IP: {currIpAddress}");
|
||||
if (fatto)
|
||||
@@ -399,14 +399,14 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
get
|
||||
{
|
||||
return DataLayer.man.taBN.getByItemID(itemIdSelected);
|
||||
return DLMan.taBN.getByItemID(itemIdSelected);
|
||||
}
|
||||
}
|
||||
protected DS_App.CartsDataTable currCartTab
|
||||
{
|
||||
get
|
||||
{
|
||||
return DataLayer.man.taCR.getByItemID(itemIdSelected);
|
||||
return DLMan.taCR.getByItemID(itemIdSelected);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (allOk)
|
||||
{
|
||||
// registro che ho creato CNC... 1!
|
||||
DataLayer.man.taOffOL.updateStatus(OffOrdId, 1);
|
||||
DLMan.taOffOL.updateStatus(OffOrdId, 1);
|
||||
}
|
||||
frmView.DataBind();
|
||||
raiseEvent();
|
||||
@@ -80,7 +80,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (allOk)
|
||||
{
|
||||
// registro che riporto a 0!
|
||||
DataLayer.man.taOffOL.updateStatus(OffOrdId, 0);
|
||||
DLMan.taOffOL.updateStatus(OffOrdId, 0);
|
||||
}
|
||||
frmView.DataBind();
|
||||
raiseEvent();
|
||||
@@ -103,7 +103,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (allOk)
|
||||
{
|
||||
// registro che ho stampato... 2!
|
||||
DataLayer.man.taOffOL.updateStatus(OffOrdId, 2);
|
||||
DLMan.taOffOL.updateStatus(OffOrdId, 2);
|
||||
}
|
||||
frmView.DataBind();
|
||||
raiseEvent();
|
||||
@@ -112,7 +112,7 @@ namespace NKC_WF.WebUserControls
|
||||
protected void lblDone_Click(object sender, EventArgs e)
|
||||
{
|
||||
// registro che ho COMPLETATO... 3! (e di conseguenza aggiorna gli items...)
|
||||
DataLayer.man.taOffOL.updateStatus(OffOrdId, 3);
|
||||
DLMan.taOffOL.updateStatus(OffOrdId, 3);
|
||||
raiseReset();
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace NKC_WF.WebUserControls
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// controllo update... SOLO SE status è 1...
|
||||
var currOrd = DataLayer.man.taOffOL.getByKey(selOrdId);
|
||||
var currOrd = DLMan.taOffOL.getByKey(selOrdId);
|
||||
bool fatto = false;
|
||||
try
|
||||
{
|
||||
|
||||
@@ -31,8 +31,8 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
private void fixSchedOrd()
|
||||
{
|
||||
numRows = DataLayer.man.taBL.getSched().Count * 10;
|
||||
DataLayer.man.taBL.fixSched();
|
||||
numRows = DLMan.taBL.getSched().Count * 10;
|
||||
DLMan.taBL.fixSched();
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace NKC_WF.WebUserControls
|
||||
private void moveBatch(int BatchId, int step)
|
||||
{
|
||||
// aggiorno
|
||||
DataLayer.man.taBL.updateSchedPrior(BatchId, step);
|
||||
DLMan.taBL.updateSchedPrior(BatchId, step);
|
||||
// ricalcolo
|
||||
fixSchedOrd();
|
||||
grView.SelectedIndex = -1;
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace NKC_WF.WebUserControls
|
||||
// verifico il datamatrix dei BIN da pitturare
|
||||
if (string.IsNullOrEmpty(lastCmd)) doRaiseEv = true;
|
||||
// processiamo barcode letto
|
||||
decodedData decoData = DataLayer.man.decodeBcode(lastCmd);
|
||||
decodedData decoData = DLMan.decodeBcode(lastCmd);
|
||||
switch (decoData.codeType)
|
||||
{
|
||||
case codeType.Item:
|
||||
@@ -113,7 +113,7 @@ namespace NKC_WF.WebUserControls
|
||||
doRaiseEv = true;
|
||||
break;
|
||||
case codeType.Bin:
|
||||
var tabBin = DataLayer.man.taBN.getByKey(decoData.codeInt);
|
||||
var tabBin = DLMan.taBN.getByKey(decoData.codeInt);
|
||||
bool allOk = false;
|
||||
// se ne trovo 1 --> OK verde
|
||||
if (tabBin.Count == 1)
|
||||
@@ -173,17 +173,17 @@ namespace NKC_WF.WebUserControls
|
||||
private void printNewLabel(decodedData decoData)
|
||||
{
|
||||
// chiamo procedura stampa report x BIN pitturati
|
||||
string printer = DataLayer.man.getPrinter("PC-MACHINE-PAINT-STATION");
|
||||
DataLayer.man.stampaDoc(decoData.codeInt.ToString(), printer, tipoDocumento.docBinPost, Request.UserHostName);
|
||||
string printer = DLMan.getPrinter("PC-MACHINE-PAINT-STATION");
|
||||
DLMan.stampaDoc(decoData.codeInt.ToString(), printer, tipoDocumento.docBinPost, Request.UserHostName);
|
||||
lgInfo($"PRINT req for BIN | codeInt : {decoData.codeInt} | currQueue: {printer} | tipoDoc: {tipoDocumento.docBinPost} | user: {Request.UserHostName} | IP: {currIpAddress}");
|
||||
}
|
||||
|
||||
private void executePaintConfirm()
|
||||
{
|
||||
// processiamo barcode letto
|
||||
decodedData decoData = DataLayer.man.decodeBcode(lastValidCmd);
|
||||
decodedData decoData = DLMan.decodeBcode(lastValidCmd);
|
||||
// lo indico come painted (update dtPainted)
|
||||
DataLayer.man.taBN.updatePainted(decoData.codeInt, DateTime.Now);
|
||||
DLMan.taBN.updatePainted(decoData.codeInt, DateTime.Now);
|
||||
lgInfo($"cmp_paintingSmart | executePaintConfirm | codeInt: {decoData.codeInt} | raw: {decoData.rawData}");
|
||||
printNewLabel(decoData);
|
||||
// update tabelle!
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
bool doReport = false;
|
||||
// creo NUOVO ordine offline...
|
||||
DS_App.OfflineOrderListDataTable tabOrdini = DataLayer.man.taOffOL.insertNew();
|
||||
DS_App.OfflineOrderListDataTable tabOrdini = DLMan.taOffOL.insertNew();
|
||||
int itemId = 0;
|
||||
// se ho la riga new in risposta...
|
||||
if (tabOrdini.Count == 1)
|
||||
@@ -70,7 +70,7 @@ namespace NKC_WF.WebUserControls
|
||||
// aggiungo ad ordine
|
||||
if (itemId > 0)
|
||||
{
|
||||
DataLayer.man.taOO2I.insertQuery(tabOrdini[0].OrdID, itemId);
|
||||
DLMan.taOO2I.insertQuery(tabOrdini[0].OrdID, itemId);
|
||||
doReport = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace NKC_WF.WebUserControls
|
||||
hlPdfOpener.CssClass = "btn btn-success btn-block";
|
||||
hfItemDtmx.Value = value;
|
||||
// cerco e salvo!
|
||||
var tabItem = DataLayer.man.taIL.getBySearch(0, value, 0, 9999);
|
||||
var tabItem = DLMan.taIL.getBySearch(0, value, 0, 9999);
|
||||
if (tabItem != null && tabItem.Count > 0)
|
||||
{
|
||||
int ItemId = tabItem[0].ItemID;
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace NKC_WF.WebUserControls
|
||||
/// </summary>
|
||||
private void checkPrint()
|
||||
{
|
||||
DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId);
|
||||
DS_App.SheetListDataTable nextTbl = DLMan.taSHL.getNextByStack(StackId);
|
||||
// se tab vuota --> HO FINITO, mostro stampa...
|
||||
divPrint.Visible = (nextTbl.Count == 0);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ namespace NKC_WF.WebUserControls
|
||||
// verifico il datamatrix dei BIN da pitturare
|
||||
if (string.IsNullOrEmpty(lastCmd)) doRaiseEv = true;
|
||||
// processiamo barcode letto
|
||||
decodedData decoData = DataLayer.man.decodeBcode(lastCmd);
|
||||
decodedData decoData = DLMan.decodeBcode(lastCmd);
|
||||
switch (decoData.codeType)
|
||||
{
|
||||
case codeType.UNK:
|
||||
@@ -72,7 +72,7 @@ namespace NKC_WF.WebUserControls
|
||||
break;
|
||||
case codeType.Material:
|
||||
// verifico SE il materiale SIA quello dello sheet richiesto dallo stack/bunk corrente...
|
||||
DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId);
|
||||
DS_App.SheetListDataTable nextTbl = DLMan.taSHL.getNextByStack(StackId);
|
||||
// se tab vuota --> HO FINITO!!!!
|
||||
if (nextTbl.Count == 0)
|
||||
{
|
||||
@@ -86,7 +86,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
cmp_barcode.showOutput("badge badge-success", $"{traduci("SheetRecorded")}: {decoData.description}");
|
||||
// chiamo stored x indicare preparato
|
||||
DataLayer.man.taSHL.setPrepared(nextTbl[0].SheetID);
|
||||
DLMan.taSHL.setPrepared(nextTbl[0].SheetID);
|
||||
lgInfo($"cmpStackBuilding | taSHL.setPrepared | SheetID: {nextTbl[0].SheetID}");
|
||||
}
|
||||
else
|
||||
@@ -146,13 +146,13 @@ namespace NKC_WF.WebUserControls
|
||||
protected void lbtPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiamo procedura stampa report x stack
|
||||
string currQueue = DataLayer.man.getPrinter("PC-MACHINE-STACK-BUILD");
|
||||
string currQueue = DLMan.getPrinter("PC-MACHINE-STACK-BUILD");
|
||||
// se richeisto detail --> coda Detail...
|
||||
if (chkDetail.Checked)
|
||||
{
|
||||
currQueue += "Detail";
|
||||
}
|
||||
DataLayer.man.stampaDoc(StackId.ToString(), currQueue, tipoDocumento.docStack, Request.UserHostName);
|
||||
DLMan.stampaDoc(StackId.ToString(), currQueue, tipoDocumento.docStack, Request.UserHostName);
|
||||
lgInfo($"PRINT req | StackId : {StackId} | currQueue: {currQueue} | tipoDoc: {tipoDocumento.docStack} | user: {Request.UserHostName} | IP: {currIpAddress}");
|
||||
// aggiorno stato BATCH
|
||||
ComLib.updateBatchPositionByBunk(StackId);
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace NKC_WF.WebUserControls
|
||||
doRaiseEv = true;
|
||||
}
|
||||
// processiamo barcode letto
|
||||
decodedData decoData = DataLayer.man.decodeBcode(lastCmd);
|
||||
decodedData decoData = DLMan.decodeBcode(lastCmd);
|
||||
switch (decoData.codeType)
|
||||
{
|
||||
case codeType.Stack:
|
||||
@@ -132,7 +132,7 @@ namespace NKC_WF.WebUserControls
|
||||
DS_App.StackListDataTable tabStack = null;
|
||||
try
|
||||
{
|
||||
tabStack = DataLayer.man.taSTL.getByKey(decoData.codeInt);
|
||||
tabStack = DLMan.taSTL.getByKey(decoData.codeInt);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
@@ -172,7 +172,7 @@ namespace NKC_WF.WebUserControls
|
||||
int stackId = 0;
|
||||
try
|
||||
{
|
||||
var tabStacks = DataLayer.man.taSTL.getByDtmx(decoData.rawData);
|
||||
var tabStacks = DLMan.taSTL.getByDtmx(decoData.rawData);
|
||||
if (tabStack.Count == 1)
|
||||
{
|
||||
stackId = tabStack[0].StackID;
|
||||
@@ -183,7 +183,7 @@ namespace NKC_WF.WebUserControls
|
||||
// SE HO uno stackId valido (>0)...
|
||||
if (stackId > 0)
|
||||
{
|
||||
DataLayer.man.taSTL.updatePos(stackId, 5);
|
||||
DLMan.taSTL.updatePos(stackId, 5);
|
||||
lgInfo($"cmp_stackLoading| taSTL.updatePos | POS --> 5 | stackId: {stackId}");
|
||||
|
||||
// controllo status del bunk nel suo insieme...
|
||||
@@ -222,7 +222,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
bool answ = false;
|
||||
// leggo i dati del bunk...
|
||||
var currBunks = DataLayer.man.taSTL.getCurrByBatch(BatchIdCurr);
|
||||
var currBunks = DLMan.taSTL.getCurrByBatch(BatchIdCurr);
|
||||
if (currBunks.Count > 0)
|
||||
{
|
||||
// verifico x ogni bunk corrente
|
||||
@@ -243,7 +243,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
bool answ = true;
|
||||
// leggo i dati del bunk...
|
||||
var currBunks = DataLayer.man.taSTL.getCurrByBatch(BatchIdCurr);
|
||||
var currBunks = DLMan.taSTL.getCurrByBatch(BatchIdCurr);
|
||||
if (currBunks.Count > 0)
|
||||
{
|
||||
// verifico x ogni bunk corrente
|
||||
@@ -266,7 +266,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
bool answ = false;
|
||||
// leggo i dati del bunk...
|
||||
var currBunk = DataLayer.man.taSTL.getByKey(BunkId);
|
||||
var currBunk = DLMan.taSTL.getByKey(BunkId);
|
||||
if (currBunk.Count == 1)
|
||||
{
|
||||
answ = currBunk[0].Position == 4;
|
||||
@@ -303,13 +303,13 @@ namespace NKC_WF.WebUserControls
|
||||
protected void lbtAdvanceProd_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiama stored x cambiare dt dei vari processi governati dal prod...
|
||||
var currStack = DataLayer.man.taSTL.getCurrByBatch(BatchIdCurr);
|
||||
var currStack = DLMan.taSTL.getCurrByBatch(BatchIdCurr);
|
||||
if (currStack != null)
|
||||
{
|
||||
if (currStack.Count > 0)
|
||||
{
|
||||
int stackIdCurr = currStack[0].StackID;
|
||||
DataLayer.man.taSHL.advanceInStack(stackIdCurr);
|
||||
DLMan.taSHL.advanceInStack(stackIdCurr);
|
||||
lgInfo($"cmp_unloadSmart | MANUAL FORCED DATA | taSHL.advanceInStack | stackIdCurr: {stackIdCurr}");
|
||||
}
|
||||
doUpdate();
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
// mostra button x collezionare Redo SOLO SE ci sono fogli da rilavorare...
|
||||
int numRedo = 0;
|
||||
var stList = DataLayer.man.taSTL.getByBatch(BatchId);
|
||||
var stList = DLMan.taSTL.getByBatch(BatchId);
|
||||
foreach (var item in stList)
|
||||
{
|
||||
numRedo += item.NumSheetsToRedo;
|
||||
@@ -64,7 +64,7 @@ namespace NKC_WF.WebUserControls
|
||||
protected void lbtCollectRedo_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiamo stored x sistemare
|
||||
DataLayer.man.taBL.fixRedoSheet(BatchId);
|
||||
DLMan.taBL.fixRedoSheet(BatchId);
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace NKC_WF.WebUserControls
|
||||
protected void lbtCollectRedoOnEnd_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiamo stored x sistemare
|
||||
DataLayer.man.taBL.fixRedoSheetOnEnd(BatchId);
|
||||
DLMan.taBL.fixRedoSheetOnEnd(BatchId);
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
if (SheetId > 0)
|
||||
{
|
||||
var tabSheets = DataLayer.man.taSHL.getBySheetId(SheetId);
|
||||
var tabSheets = DLMan.taSHL.getBySheetId(SheetId);
|
||||
if (tabSheets.Count > 0)
|
||||
{
|
||||
filename = tabSheets[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr);
|
||||
|
||||
@@ -210,7 +210,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
if (string.IsNullOrEmpty(lastCmd)) doRaiseEv = true;
|
||||
// processiamo barcode letto
|
||||
decodedData decoData = DataLayer.man.decodeBcode(lastCmd);
|
||||
decodedData decoData = DLMan.decodeBcode(lastCmd);
|
||||
switch (decoData.codeType)
|
||||
{
|
||||
case codeType.UNK:
|
||||
@@ -533,11 +533,11 @@ namespace NKC_WF.WebUserControls
|
||||
try
|
||||
{
|
||||
// SE item esiste...
|
||||
var tabItem = DataLayer.man.taIL.getBySearch(itemIdSelected, itemIdSelected.ToString(), 0, 999);
|
||||
var tabItem = DLMan.taIL.getBySearch(itemIdSelected, itemIdSelected.ToString(), 0, 999);
|
||||
if (tabItem.Count == 1)
|
||||
{
|
||||
// riposto item a status 1...
|
||||
DataLayer.man.taIL.updateStatus(itemIdSelected, 1, PlaceId);
|
||||
DLMan.taIL.updateStatus(itemIdSelected, 1, PlaceId);
|
||||
lgDebug($"cmp_unloadSmart | resetSelection | Status --> 1 | itemIdSelected: {itemIdSelected} | PlaceId: {PlaceId}");
|
||||
}
|
||||
}
|
||||
@@ -580,7 +580,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (string.IsNullOrEmpty(rawVal))
|
||||
{
|
||||
// se non trovo --> DB
|
||||
answ = DataLayer.man.taBN.getByItemID(itemIdSelected);
|
||||
answ = DLMan.taBN.getByItemID(itemIdSelected);
|
||||
string rawData = JsonConvert.SerializeObject(answ);
|
||||
//salvo in redis... TTL 2 sec
|
||||
memLayer.ML.setRSV(redKey, rawData, 2);
|
||||
@@ -603,7 +603,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (string.IsNullOrEmpty(rawVal))
|
||||
{
|
||||
// se non trovo --> DB
|
||||
answ = DataLayer.man.taCR.getByItemID(itemIdSelected);
|
||||
answ = DLMan.taCR.getByItemID(itemIdSelected);
|
||||
string rawData = JsonConvert.SerializeObject(answ);
|
||||
//salvo in redis... TTL 2 sec
|
||||
memLayer.ML.setRSV(redKey, rawData, 2);
|
||||
@@ -674,19 +674,19 @@ namespace NKC_WF.WebUserControls
|
||||
protected void lbtCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
// resetto item selezionato...
|
||||
DataLayer.man.taIL.updateStatus(itemIdSelected, 1, PlaceId);
|
||||
DLMan.taIL.updateStatus(itemIdSelected, 1, PlaceId);
|
||||
lgInfo($"cmp_unloadSmart | cancelSelect | Status --> 1 | itemIdSelected: {itemIdSelected} | PlaceId: {PlaceId}");
|
||||
resetSelection(true);
|
||||
showItemDetail(false, null, false);
|
||||
}
|
||||
protected void lbtResetSel_Click(object sender, EventArgs e)
|
||||
{
|
||||
var tabSheet = DataLayer.man.taSHL.getByItemID(itemIdSelected);
|
||||
var tabSheet = DLMan.taSHL.getByItemID(itemIdSelected);
|
||||
if (tabSheet.Count == 1)
|
||||
{
|
||||
resetShowData();
|
||||
// resetto sheet selezionato...
|
||||
DataLayer.man.taIL.updateSheetStatusPU(tabSheet[0].SheetID, PlaceId);
|
||||
DLMan.taIL.updateSheetStatusPU(tabSheet[0].SheetID, PlaceId);
|
||||
lgInfo($"cmp_unloadSmart | updateSheetStatusPU | SheetID: {tabSheet[0].SheetID} | PlaceId: {PlaceId}");
|
||||
resetSelection(true);
|
||||
showItemDetail(false, null, false);
|
||||
@@ -700,7 +700,7 @@ namespace NKC_WF.WebUserControls
|
||||
protected void lbtParkArea_Click(object sender, EventArgs e)
|
||||
{
|
||||
// resetto item selezionato...
|
||||
DataLayer.man.taIL.updateStatus(itemIdSelected, 100, PlaceId);
|
||||
DLMan.taIL.updateStatus(itemIdSelected, 100, PlaceId);
|
||||
lgInfo($"cmp_unloadSmart | parkArea | Status --> 100 | itemIdSelected: {itemIdSelected} | PlaceId: {PlaceId}");
|
||||
resetSelection(true);
|
||||
showItemDetail(false, null, false);
|
||||
@@ -714,7 +714,7 @@ namespace NKC_WF.WebUserControls
|
||||
protected void lbtScrapped_Click(object sender, EventArgs e)
|
||||
{
|
||||
// resetto item selezionato...
|
||||
DataLayer.man.taIL.updateStatus(itemIdSelected, 990, PlaceId);
|
||||
DLMan.taIL.updateStatus(itemIdSelected, 990, PlaceId);
|
||||
lgInfo($"cmp_unloadSmart | SCRAP | Status --> 990 | itemIdSelected: {itemIdSelected} | PlaceId: {PlaceId}");
|
||||
resetSelection(false);
|
||||
showItemDetail(false, null, false);
|
||||
|
||||
@@ -20,9 +20,9 @@ namespace NKC_WF.WebUserControls
|
||||
private void fixVisibility()
|
||||
{
|
||||
// controllo SE HO nuove PARTS da validare...
|
||||
var tabItems2Valid = DataLayer.man.taIL.getNeedValid();
|
||||
var tabItemsUnValid = DataLayer.man.taIL.getUnValid();
|
||||
var tabItems2ReValid = DataLayer.man.taIL.getNeedRevalid();
|
||||
var tabItems2Valid = DLMan.taIL.getNeedValid();
|
||||
var tabItemsUnValid = DLMan.taIL.getUnValid();
|
||||
var tabItems2ReValid = DLMan.taIL.getNeedRevalid();
|
||||
lbtValidateMissing.Visible = tabItems2Valid.Count > 0;
|
||||
lbtRevalidate.Visible = tabItemsUnValid.Count > 0;
|
||||
lbtReValidAll.Visible = tabItems2ReValid.Count > 0;
|
||||
@@ -34,7 +34,7 @@ namespace NKC_WF.WebUserControls
|
||||
try
|
||||
{
|
||||
string cadBasePath = $"{memLayer.ML.CRS("nestBasePath")}{memLayer.ML.CRS("drawingFolder")}/";
|
||||
DataLayer.man.taBL.createPartValBatch(cadBasePath);
|
||||
DLMan.taBL.createPartValBatch(cadBasePath);
|
||||
// eventualmente mando primo batch da validare...
|
||||
bool newValidSent = ComLib.sendFirstValidationBatch();
|
||||
}
|
||||
@@ -49,7 +49,7 @@ namespace NKC_WF.WebUserControls
|
||||
// rimetto da validare tramite stored
|
||||
try
|
||||
{
|
||||
DataLayer.man.taBL.resetPartUnValid();
|
||||
DLMan.taBL.resetPartUnValid();
|
||||
// eventualmente mando primo batch da validare...
|
||||
bool newValidSent = ComLib.sendFirstValidationBatch();
|
||||
}
|
||||
@@ -90,7 +90,7 @@ namespace NKC_WF.WebUserControls
|
||||
// rimetto da validare tramite stored
|
||||
try
|
||||
{
|
||||
DataLayer.man.taBL.redoPartValid("*");
|
||||
DLMan.taBL.redoPartValid("*");
|
||||
// eventualmente mando primo batch da validare...
|
||||
bool newValidSent = ComLib.sendFirstValidationBatch();
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace NKC_WF.site
|
||||
string rawData = memLayer.ML.getRSV(tabSheetKey);
|
||||
if (string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
answ = DataLayer.man.taSHL.getByBatch(BatchId);
|
||||
answ = DLMan.taSHL.getByBatch(BatchId);
|
||||
tabSheets = answ;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace NKC_WF.site
|
||||
private bool processLastCmd(bool doShowResults)
|
||||
{
|
||||
// processiamo barcode letto
|
||||
decodedData decoData = DataLayer.man.decodeBcode(lastCmd);
|
||||
decodedData decoData = DLMan.decodeBcode(lastCmd);
|
||||
switch (decoData.codeType)
|
||||
{
|
||||
case codeType.UNK:
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace NKC_WF
|
||||
string dirImport = $"{_SqlImportDir}{adesso.ToString("yyyy-MM")}\\";
|
||||
int batchID = 0;
|
||||
// recupero elenco parti validate...
|
||||
DS_App.ItemListDataTable ItemValitadion = DataLayer.man.taIL.GetData();
|
||||
DS_App.ItemListDataTable ItemValitadion = DLMan.taIL.GetData();
|
||||
// preporcessing file: leggo e correggo:
|
||||
// - sostituisco "," --> ";" come separatore
|
||||
// - tolgo "" e spazi da stringa
|
||||
@@ -114,28 +114,28 @@ namespace NKC_WF
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{traduci("ErrOrderCsvImp01")}:{Environment.NewLine}{exc}");
|
||||
DataLayer.man.taEL.insertQuery(DateTime.Now, "Copy CSV", $"{e.BatchName}", $"{e.BatchName}.{e.FileName}", $"Exception: {exc}");
|
||||
DLMan.taEL.insertQuery(DateTime.Now, "Copy CSV", $"{e.BatchName}", $"{e.BatchName}.{e.FileName}", $"Exception: {exc}");
|
||||
}
|
||||
// chiamo stored caricamento
|
||||
DS_App.ImportLogDataTable tabDati = null;
|
||||
try
|
||||
{
|
||||
// chiamo procedura SQL x import...
|
||||
tabDati = DataLayer.man.taImpLog.importCsvOrd($"{dirImport}", e.FileName, e.BatchName, ";", "\n", "2", 0, 0, 0);
|
||||
tabDati = DLMan.taImpLog.importCsvOrd($"{dirImport}", e.FileName, e.BatchName, ";", "\n", "2", 0, 0, 0);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{traduci("ErrOrderCsvImp02")}:{Environment.NewLine}{exc}");
|
||||
// salvo log errore...
|
||||
DataLayer.man.taEL.insertQuery(DateTime.Now, "Upload CSV", $"{e.BatchName}", $"{e.BatchName}.{e.FileName}", $"Exception: {exc}");
|
||||
DLMan.taEL.insertQuery(DateTime.Now, "Upload CSV", $"{e.BatchName}", $"{e.BatchName}.{e.FileName}", $"Exception: {exc}");
|
||||
dataValidated = false;
|
||||
}
|
||||
// FIX eventuali cadFilePath...
|
||||
DataLayer.man.taIL.updateCadPath(cadBasePath, 0, false);
|
||||
DLMan.taIL.updateCadPath(cadBasePath, 0, false);
|
||||
// recupero da batch la riga impostata...
|
||||
try
|
||||
{
|
||||
var tabBatch = DataLayer.man.taBL.getLastByTakt(e.BatchName);
|
||||
var tabBatch = DLMan.taBL.getLastByTakt(e.BatchName);
|
||||
if (tabBatch != null)
|
||||
{
|
||||
if (tabBatch.Count > 0)
|
||||
@@ -159,7 +159,7 @@ namespace NKC_WF
|
||||
{
|
||||
var newBatch = tabDati[0];
|
||||
int bStatus = 7;
|
||||
DataLayer.man.taBL.updateStatus(batchID, bStatus, e.BatchName, -1);
|
||||
DLMan.taBL.updateStatus(batchID, bStatus, e.BatchName, -1);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
@@ -177,7 +177,7 @@ namespace NKC_WF
|
||||
// faccio un ciclo su OGNI record Part --> cerco se mancassero dei file dxf...
|
||||
try
|
||||
{
|
||||
var tabParts = DataLayer.man.taIL.getByBatch(batchID);
|
||||
var tabParts = DLMan.taIL.getByBatch(batchID);
|
||||
if (tabParts.Count > 0)
|
||||
{
|
||||
bool fileOk = false;
|
||||
@@ -200,7 +200,7 @@ namespace NKC_WF
|
||||
fileOk = System.IO.File.Exists(localPath);
|
||||
if (!fileOk)
|
||||
{
|
||||
DataLayer.man.taEL.insertQuery(DateTime.Now, "I.1", $"B.{batchID}", $"{item.ItemExtCode}.dxf", $"{traduci("ErrOrderDxfNotFound")} {localPath} | part {item.ItemExtCode} | {item.ItemDesc}");
|
||||
DLMan.taEL.insertQuery(DateTime.Now, "I.1", $"B.{batchID}", $"{item.ItemExtCode}.dxf", $"{traduci("ErrOrderDxfNotFound")} {localPath} | part {item.ItemExtCode} | {item.ItemDesc}");
|
||||
allOk = false;
|
||||
missingDxfList.Add(item.ItemExtCode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user