OK x unload con 2 macchine
This commit is contained in:
+9
-7
@@ -1117,7 +1117,7 @@ namespace AppData
|
||||
}
|
||||
else
|
||||
{
|
||||
tabBunk = DLMan.taSTL.getLoaded();
|
||||
tabBunk = DLMan.taSTL.getLoaded(machine);
|
||||
// salvo in redis
|
||||
setCurrBunkTab(machine, tabBunk);
|
||||
}
|
||||
@@ -1790,13 +1790,14 @@ namespace AppData
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce il BUNK che è il primo della lista:
|
||||
/// Restituisce il BUNK che è il primo della lista x la MACCHINA indicata:
|
||||
/// - posizione = 3 (ho letto da webApp il BUNK e preso in carico)
|
||||
/// - NumSheet > NumSheetUnload
|
||||
/// - Ordinato per StackIndex (crescente) x avere il più VECCHIO
|
||||
/// </summary>
|
||||
/// <param name="machine"></param>
|
||||
/// <returns></returns>
|
||||
public static ProdBunk prodGetFirstBunk()
|
||||
public static ProdBunk prodGetFirstBunk(string machine)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
// cerco prima su REDIS...
|
||||
@@ -1804,7 +1805,7 @@ namespace AppData
|
||||
if (answ == null)
|
||||
{
|
||||
// vado sul DB e leggo ...
|
||||
DS_App.StackListDataTable tabBunks = DLMan.taSTL.getLoaded();
|
||||
DS_App.StackListDataTable tabBunks = DLMan.taSTL.getLoaded(machine);
|
||||
// controllo di averne almeno 1...
|
||||
if (tabBunks.Count > 0)
|
||||
{
|
||||
@@ -1818,21 +1819,22 @@ namespace AppData
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce il PROSSIMO bunk secondo criterio:
|
||||
/// Restituisce il PROSSIMO bunk x la MACCHINA indicata secondo criterio:
|
||||
/// - posizione = 5 (ho letto da webApp il BUNK e preso in carico)
|
||||
/// - NumSheet > NumSheetUnload
|
||||
/// - Ordinato per StackIndex (crescente) x avere il più VECCHIO
|
||||
/// - SUCCESSIVO al BunkID(=StackID) ricevuto
|
||||
/// </summary>
|
||||
/// <param name="machine"></param>
|
||||
/// <returns></returns>
|
||||
public static ProdBunk prodGetNextBunk(int BunkID)
|
||||
public static ProdBunk prodGetNextBunk(int BunkID, string machine)
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
ProdBunk answ = getRedisNextBunk(BunkID);
|
||||
if (answ == null)
|
||||
{
|
||||
// vado sul DB e leggo ...
|
||||
DS_App.StackListDataTable tabBunks = DLMan.taSTL.getLoaded();
|
||||
DS_App.StackListDataTable tabBunks = DLMan.taSTL.getLoaded(machine);
|
||||
// controllo di averne almeno 1...
|
||||
if (tabBunks.Count > 0)
|
||||
{
|
||||
|
||||
Generated
+8
-1
@@ -28911,6 +28911,7 @@ namespace AppData.DS_AppTableAdapters {
|
||||
this._commandCollection[5].CommandText = "dbo.stp_Stacks_getLoaded";
|
||||
this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure;
|
||||
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[6].Connection = this.Connection;
|
||||
this._commandCollection[6].CommandText = "dbo.stp_Stacks_getNext";
|
||||
@@ -29029,8 +29030,14 @@ namespace AppData.DS_AppTableAdapters {
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
|
||||
public virtual DS_App.StackListDataTable getLoaded() {
|
||||
public virtual DS_App.StackListDataTable getLoaded(string PlaceCod) {
|
||||
this.Adapter.SelectCommand = this.CommandCollection[5];
|
||||
if ((PlaceCod == null)) {
|
||||
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
else {
|
||||
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(PlaceCod));
|
||||
}
|
||||
DS_App.StackListDataTable dataTable = new DS_App.StackListDataTable();
|
||||
this.Adapter.Fill(dataTable);
|
||||
return dataTable;
|
||||
|
||||
@@ -428,6 +428,7 @@ FROM v_StackList</CommandText>
|
||||
<CommandText>dbo.stp_Stacks_getLoaded</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@PlaceCod" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
|
||||
+43
-43
@@ -4,49 +4,49 @@
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-24" ViewPortY="-53" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-24" ViewPortY="688" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:BatchList" ZOrder="1" X="325" Y="437" Height="457" Width="252" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:StackList" ZOrder="42" X="576" Y="958" Height="381" Width="268" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:SheetList" ZOrder="41" X="246" Y="908" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:OrderList" ZOrder="11" X="284" Y="61" Height="343" Width="198" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:ItemList" ZOrder="40" X="853" Y="87" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:Materials" ZOrder="39" X="1189" Y="105" Height="248" Width="198" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:Bins" ZOrder="9" X="1257" Y="597" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:Carts" ZOrder="38" X="592" Y="408" Height="286" Width="204" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:OfflineOrderList" ZOrder="37" X="921" Y="934" Height="286" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:OffOrd2Item" ZOrder="36" X="1023" Y="728" Height="134" Width="219" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:KitList" ZOrder="10" X="634" Y="129" Height="248" Width="194" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:Nesting" ZOrder="35" X="863" Y="526" Height="153" Width="228" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:ImportLog" ZOrder="34" X="593" Y="701" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:BinList" ZOrder="33" X="1256" Y="391" Height="134" Width="216" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:FinalKit" ZOrder="32" X="15" Y="525" Height="172" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:Order2FinalKit" ZOrder="31" X="5" Y="308" Height="134" Width="234" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:Counters" ZOrder="30" X="-12" Y="716" Height="172" Width="196" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:ErrorsLog" ZOrder="29" X="-14" Y="996" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
|
||||
<Shape ID="DesignTable:ItemValidation" ZOrder="28" X="-10" Y="1301" Height="172" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:PartValidPareto" ZOrder="27" X="316" Y="1303" Height="153" Width="236" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:UnloadStats" ZOrder="26" X="629" Y="1362" Height="172" Width="215" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:Remnants" ZOrder="25" X="904" Y="1256" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:CartOnKit" ZOrder="24" X="1251" Y="993" Height="324" Width="202" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:PackList" ZOrder="23" X="1248" Y="1319" Height="362" Width="297" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
|
||||
<Shape ID="DesignTable:OtherItem" ZOrder="22" X="636" Y="1822" Height="210" Width="204" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
|
||||
<Shape ID="DesignTable:ItemSearchDetail" ZOrder="21" X="1468" Y="105" Height="381" Width="244" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:PackListDet" ZOrder="20" X="931" Y="1520" Height="343" Width="229" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:PackLog" ZOrder="19" X="1224" Y="1751" Height="324" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:PackCheck" ZOrder="18" X="636" Y="1560" Height="229" Width="206" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
|
||||
<Shape ID="DesignTable:OKIB" ZOrder="17" X="33" Y="1493" Height="324" Width="220" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:OKIB_Sum" ZOrder="16" X="42" Y="1891" Height="362" Width="220" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:OKOI" ZOrder="15" X="334" Y="1485" Height="324" Width="246" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:OKOI_sum" ZOrder="14" X="330" Y="1890" Height="362" Width="246" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:Pack2Cart" ZOrder="4" X="911" Y="1873" Height="286" Width="203" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:CartIRK" ZOrder="13" X="640" Y="2064" Height="305" Width="188" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
|
||||
<Shape ID="DesignTable:FileValidation" ZOrder="8" X="499" Y="-21" Height="191" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:SheetsPreview" ZOrder="12" X="65" Y="839" Height="210" Width="228" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:OrderListTree" ZOrder="7" X="3" Y="-43" Height="343" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
|
||||
<Shape ID="DesignTable:Places" ZOrder="2" X="854" Y="2180" Height="153" Width="180" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:StatusLog" ZOrder="5" X="1116" Y="2180" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:StatusDecode" ZOrder="3" X="849" Y="2353" Height="172" Width="224" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:BatchList" ZOrder="2" X="325" Y="437" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:StackList" ZOrder="1" X="576" Y="958" Height="381" Width="268" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:SheetList" ZOrder="42" X="246" Y="908" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:OrderList" ZOrder="12" X="284" Y="61" Height="343" Width="198" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:ItemList" ZOrder="41" X="853" Y="87" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:Materials" ZOrder="40" X="1189" Y="105" Height="248" Width="198" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:Bins" ZOrder="10" X="1257" Y="597" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:Carts" ZOrder="39" X="592" Y="408" Height="286" Width="204" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:OfflineOrderList" ZOrder="38" X="921" Y="934" Height="286" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:OffOrd2Item" ZOrder="37" X="1023" Y="728" Height="134" Width="219" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:KitList" ZOrder="11" X="634" Y="129" Height="248" Width="194" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:Nesting" ZOrder="36" X="863" Y="526" Height="153" Width="228" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:ImportLog" ZOrder="35" X="593" Y="701" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:BinList" ZOrder="34" X="1256" Y="391" Height="134" Width="216" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:FinalKit" ZOrder="33" X="15" Y="525" Height="172" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:Order2FinalKit" ZOrder="32" X="5" Y="308" Height="134" Width="234" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:Counters" ZOrder="31" X="-12" Y="716" Height="172" Width="196" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:ErrorsLog" ZOrder="30" X="-14" Y="996" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
|
||||
<Shape ID="DesignTable:ItemValidation" ZOrder="29" X="-10" Y="1301" Height="172" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:PartValidPareto" ZOrder="28" X="316" Y="1303" Height="153" Width="236" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:UnloadStats" ZOrder="27" X="629" Y="1362" Height="172" Width="215" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:Remnants" ZOrder="26" X="904" Y="1256" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:CartOnKit" ZOrder="25" X="1251" Y="993" Height="324" Width="202" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:PackList" ZOrder="24" X="1248" Y="1319" Height="362" Width="297" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
|
||||
<Shape ID="DesignTable:OtherItem" ZOrder="23" X="636" Y="1822" Height="210" Width="204" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
|
||||
<Shape ID="DesignTable:ItemSearchDetail" ZOrder="22" X="1468" Y="105" Height="381" Width="244" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:PackListDet" ZOrder="21" X="931" Y="1520" Height="343" Width="229" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:PackLog" ZOrder="20" X="1224" Y="1751" Height="324" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:PackCheck" ZOrder="19" X="636" Y="1560" Height="229" Width="206" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
|
||||
<Shape ID="DesignTable:OKIB" ZOrder="18" X="33" Y="1493" Height="324" Width="220" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:OKIB_Sum" ZOrder="17" X="42" Y="1891" Height="362" Width="220" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:OKOI" ZOrder="16" X="334" Y="1485" Height="324" Width="246" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:OKOI_sum" ZOrder="15" X="330" Y="1890" Height="362" Width="246" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:Pack2Cart" ZOrder="5" X="911" Y="1873" Height="286" Width="203" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:CartIRK" ZOrder="14" X="640" Y="2064" Height="305" Width="188" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
|
||||
<Shape ID="DesignTable:FileValidation" ZOrder="9" X="499" Y="-21" Height="191" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
<Shape ID="DesignTable:SheetsPreview" ZOrder="13" X="65" Y="839" Height="210" Width="228" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:OrderListTree" ZOrder="8" X="3" Y="-43" Height="343" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
|
||||
<Shape ID="DesignTable:Places" ZOrder="3" X="854" Y="2180" Height="153" Width="180" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:StatusLog" ZOrder="6" X="1116" Y="2180" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:StatusDecode" ZOrder="4" X="849" Y="2353" Height="172" Width="224" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
</Shapes>
|
||||
<Connectors>
|
||||
<Connector ID="DesignRelation:FK_ItemList_Materials1" ZOrder="53" LineWidth="11">
|
||||
@@ -185,7 +185,7 @@
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_StatusLog_Places" ZOrder="6" LineWidth="11">
|
||||
<Connector ID="DesignRelation:FK_StatusLog_Places" ZOrder="7" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1034</X>
|
||||
|
||||
+10
-10
@@ -29,7 +29,7 @@ namespace NKC_SDK
|
||||
{
|
||||
_baseIp = baseIp;
|
||||
_baseUrl = baseUrl;
|
||||
_machine = codPost;
|
||||
_codPost = codPost;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
@@ -52,7 +52,7 @@ namespace NKC_SDK
|
||||
/// <summary>
|
||||
/// COD macchina x cui si effettua chiamata
|
||||
/// </summary>
|
||||
protected string _machine { get; set; } = "";
|
||||
protected string _codPost { get; set; } = "";
|
||||
|
||||
protected string urlAlive
|
||||
{
|
||||
@@ -82,7 +82,7 @@ namespace NKC_SDK
|
||||
{
|
||||
get
|
||||
{
|
||||
return $"{_baseUrl}api/Sheet/{_machine}";
|
||||
return $"{_baseUrl}api/Sheet/{_codPost}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace NKC_SDK
|
||||
{
|
||||
get
|
||||
{
|
||||
return $"{_baseUrl}api/Sheet/{_machine}";
|
||||
return $"{_baseUrl}api/Sheet/{_codPost}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,14 +209,14 @@ namespace NKC_SDK
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected string urlGetBunk(int currBunkId)
|
||||
protected string urlGetBunk(int currBunkId, string CodPost)
|
||||
{
|
||||
return $"{_baseUrl}api/Bunk/{currBunkId}?showNext=false";
|
||||
return $"{_baseUrl}api/Bunk/{currBunkId}?showNext=false&machine={CodPost}";
|
||||
}
|
||||
|
||||
protected string urlNextBunk(int currBunkId)
|
||||
protected string urlNextBunk(int currBunkId, string CodPost)
|
||||
{
|
||||
return $"{_baseUrl}api/Bunk/{currBunkId}?showNext=true";
|
||||
return $"{_baseUrl}api/Bunk/{currBunkId}?showNext=true&machine={CodPost}";
|
||||
}
|
||||
|
||||
protected string urlPutBunk(int currBunkId)
|
||||
@@ -347,7 +347,7 @@ namespace NKC_SDK
|
||||
try
|
||||
{
|
||||
// aggiungo macchina nel codice dei fogli...
|
||||
updatedInfo.Machine = _machine;
|
||||
updatedInfo.Machine = _codPost;
|
||||
// serializzo oggetto
|
||||
rawdata = JsonConvert.SerializeObject(updatedInfo);
|
||||
// invio con metodo put!
|
||||
@@ -372,7 +372,7 @@ namespace NKC_SDK
|
||||
try
|
||||
{
|
||||
// aggiungo macchina nel codice dei fogli...
|
||||
updatedSheetList.Machine = _machine;
|
||||
updatedSheetList.Machine = _codPost;
|
||||
// serializzo oggetto
|
||||
rawdata = JsonConvert.SerializeObject(updatedSheetList);
|
||||
// invio con metodo put!
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ namespace NKC_WF
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
|
||||
/// <summary>
|
||||
/// Codice macchina (HARD CODED x ora)
|
||||
/// Codice macchina (da v2)
|
||||
/// </summary>
|
||||
protected string machine = "WRK001";
|
||||
|
||||
|
||||
@@ -8,14 +8,22 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
public class BunkController : ApiController
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
/// <summary>
|
||||
/// COdice macchina (HARD CODED)
|
||||
/// </summary>
|
||||
protected string CodPost = "WRK001";
|
||||
|
||||
/// <summary>
|
||||
/// oggetto static/singleton per fare chiamate sul datalayer
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
/// <summary>
|
||||
/// COdice macchina (HARD CODED)
|
||||
/// </summary>
|
||||
protected string machine = "WRK001";
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce il FIRST BUNK da lavorare
|
||||
/// GET: api/Bunk
|
||||
@@ -27,7 +35,7 @@ namespace NKC_WF.Controllers
|
||||
ProdBunk answ = null;
|
||||
try
|
||||
{
|
||||
answ = ComLib.prodGetFirstBunk();
|
||||
answ = ComLib.prodGetFirstBunk(CodPost);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
@@ -42,14 +50,15 @@ namespace NKC_WF.Controllers
|
||||
/// <param name="showNext"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ProdBunk Get(int id, bool showNext)
|
||||
public ProdBunk Get(int id, bool showNext, string machine)
|
||||
{
|
||||
ProdBunk answ = null;
|
||||
CodPost = machine;
|
||||
try
|
||||
{
|
||||
if (showNext)
|
||||
{
|
||||
answ = ComLib.prodGetNextBunk(id);
|
||||
answ = ComLib.prodGetNextBunk(id, CodPost);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -63,9 +72,9 @@ namespace NKC_WF.Controllers
|
||||
|
||||
/************************************
|
||||
* METODI PUT
|
||||
*
|
||||
*
|
||||
* per abilitare è necessario agire sulla conf di IIS:
|
||||
*
|
||||
*
|
||||
* - modificare il file applicationHost.config che si trova in C:\Windows\System32\inetsrv\config
|
||||
* - disinstallare webDav oppure commentare le righe
|
||||
* <!-- <add name="WebDAVModule" /> -->
|
||||
@@ -74,44 +83,9 @@ namespace NKC_WF.Controllers
|
||||
* - aggiungere PUT/DELETE a handler:
|
||||
* <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
* <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="0" />
|
||||
*
|
||||
*
|
||||
**************************************/
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Effettua la chiamata di update
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
// PUT: api/Bunk/5
|
||||
[HttpPut]
|
||||
public void Put(ProdBunk currBunk)
|
||||
{
|
||||
// NB. decodifico direttamente come oggetto, vedere qui:
|
||||
// https://weblog.west-wind.com/posts/2013/dec/13/accepting-raw-request-body-content-with-aspnet-web-api
|
||||
// https://weblog.west-wind.com/posts/2017/sep/14/accepting-raw-request-body-content-in-aspnet-core-api-controllers
|
||||
|
||||
// se non nullo...
|
||||
if (currBunk != null)
|
||||
{
|
||||
foreach (var item in currBunk.SheetList)
|
||||
{
|
||||
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)
|
||||
{
|
||||
DLMan.taIL.updateSheetStatus(item.SheetId, 1, "PROD");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// INVALIDO eventuale valore BUNK in REDIS...
|
||||
ComLib.resetRedisBunkData(machine);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processa una chiamata POST per l'invio in blocco status BUNK
|
||||
/// POST: api/Bunk
|
||||
@@ -142,7 +116,6 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
// calcolo stsatus dalle date valide...
|
||||
|
||||
|
||||
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)
|
||||
@@ -162,5 +135,40 @@ namespace NKC_WF.Controllers
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua la chiamata di update
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
// PUT: api/Bunk/5
|
||||
[HttpPut]
|
||||
public void Put(ProdBunk currBunk)
|
||||
{
|
||||
// NB. decodifico direttamente come oggetto, vedere qui:
|
||||
// https://weblog.west-wind.com/posts/2013/dec/13/accepting-raw-request-body-content-with-aspnet-web-api
|
||||
// https://weblog.west-wind.com/posts/2017/sep/14/accepting-raw-request-body-content-in-aspnet-core-api-controllers
|
||||
|
||||
// se non nullo...
|
||||
if (currBunk != null)
|
||||
{
|
||||
foreach (var item in currBunk.SheetList)
|
||||
{
|
||||
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)
|
||||
{
|
||||
DLMan.taIL.updateSheetStatus(item.SheetId, 1, "PROD");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// INVALIDO eventuale valore BUNK in REDIS...
|
||||
ComLib.resetRedisBunkData(CodPost);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,10 @@
|
||||
<div class="row card-header bg-secondary text-light">
|
||||
<div class="col-5">
|
||||
<uc1:cmp_MachSem runat="server" ID="cmp_MachSem" />
|
||||
<asp:HiddenField ID="hfBatchID" runat="server" />
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<h4 class="mb-0"><i class="fa fa-upload"></i> <%: traduci("MachineLoad") %><%--<sub>(<%: hfBatchID.Value %>)</sub>--%></h4>
|
||||
<h4 class="mb-0"><i class="fa fa-upload"></i> <%: traduci("MachineLoad") %><sub>(<%: hfBatchID.Value %>)</sub></h4>
|
||||
</div>
|
||||
<div class="col-5 text-right">
|
||||
</div>
|
||||
|
||||
@@ -23,10 +23,12 @@ namespace NKC_WF
|
||||
{
|
||||
divMain.Visible = true;
|
||||
cmp_stackLoading.doUpdate();
|
||||
cmp_ML_ShDet.BatchId = cmp_stackLoading.BatchIdCurr;
|
||||
cmp_ML_ShDet1.BatchId = cmp_stackLoading.BatchIdCurr;
|
||||
cmp_ML_ShDet2.BatchId = cmp_stackLoading.BatchIdCurr;
|
||||
cmp_ML_ShDet3.BatchId = cmp_stackLoading.BatchIdCurr;
|
||||
int currBatchId = cmp_stackLoading.BatchIdCurr;
|
||||
hfBatchID.Value = $"{currBatchId}";
|
||||
cmp_ML_ShDet.BatchId = currBatchId;
|
||||
cmp_ML_ShDet1.BatchId = currBatchId;
|
||||
cmp_ML_ShDet2.BatchId = currBatchId;
|
||||
cmp_ML_ShDet3.BatchId = currBatchId;
|
||||
cmp_ML_ShDet.doUpdate();
|
||||
cmp_ML_ShDet1.doUpdate();
|
||||
cmp_ML_ShDet2.doUpdate();
|
||||
|
||||
Generated
+9
@@ -23,6 +23,15 @@ namespace NKC_WF
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_MachSem cmp_MachSem;
|
||||
|
||||
/// <summary>
|
||||
/// hfBatchID control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfBatchID;
|
||||
|
||||
/// <summary>
|
||||
/// divMain control.
|
||||
/// </summary>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<div class="row card-header bg-secondary text-light">
|
||||
<div class="col-5">
|
||||
<uc1:cmp_MachSem runat="server" ID="cmp_MachSem" />
|
||||
<asp:HiddenField ID="hfBatchID" runat="server" />
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<h4 class="mb-0"><i class="fa fa-download"></i> <%: traduci("MachineUnload") %><sub>(<%: hfBatchID.Value %>)</sub></h4>
|
||||
@@ -27,7 +28,6 @@
|
||||
<div class="card-body py-1 bg-dark" id="divMain" runat="server">
|
||||
<asp:UpdatePanel runat="server" ID="upnlStats" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:HiddenField ID="hfBatchID" runat="server" />
|
||||
<asp:HiddenField ID="hfSheetID" runat="server" />
|
||||
<uc1:cmp_MU_stats runat="server" ID="cmp_MU_stats" />
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -127,9 +127,11 @@ namespace NKC_WF
|
||||
if (string.IsNullOrEmpty(cmp_MachSem.currMachine))
|
||||
{
|
||||
divMain.Visible = false;
|
||||
machine = "#";
|
||||
}
|
||||
else
|
||||
{
|
||||
machine = cmp_MachSem.currMachine;
|
||||
divMain.Visible = true;
|
||||
// imposto dati correnti
|
||||
bool doUpdate = setCurrData();
|
||||
@@ -158,7 +160,7 @@ namespace NKC_WF
|
||||
{
|
||||
bool needUpdate = false;
|
||||
// recupero bunk corrente...
|
||||
DS_App.StackListRow currBunk = ComLib.getCurrBunk();
|
||||
DS_App.StackListRow currBunk = ComLib.getCurrBunk(machine);
|
||||
if (currBunk != null)
|
||||
{
|
||||
bool chgBtLocal = BatchId != currBunk.BatchID;
|
||||
|
||||
+9
-9
@@ -32,6 +32,15 @@ namespace NKC_WF
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_MachSem cmp_MachSem;
|
||||
|
||||
/// <summary>
|
||||
/// hfBatchID control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfBatchID;
|
||||
|
||||
/// <summary>
|
||||
/// hlPartMIA control.
|
||||
/// </summary>
|
||||
@@ -59,15 +68,6 @@ namespace NKC_WF
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel upnlStats;
|
||||
|
||||
/// <summary>
|
||||
/// hfBatchID control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfBatchID;
|
||||
|
||||
/// <summary>
|
||||
/// hfSheetID control.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user