Merge branch 'main' into Dev_CUST
This commit is contained in:
@@ -1,101 +1,117 @@
|
|||||||
namespace CommonConsole
|
namespace CommonConsole
|
||||||
{
|
{
|
||||||
using OmniPlus;
|
|
||||||
using OmniPlus.Features;
|
|
||||||
using OmniPlus.Features.Enums;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Text;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
{
|
{
|
||||||
var optionalUniDir = BitConverter.ToInt16(new byte[] { 0xFC, 0x01 }, 0);
|
var hexString = "5E-CC-02-1A-00-00-00-00-5E-CC-02-1A-00-00-00-00-5E-CC-02-1A-00-00-00-00-5E-CC-02-1A-00-00-00-00";
|
||||||
var protokoll = new StringBuilder();
|
var bytes = new List<byte>();
|
||||||
var connection = new OmniIrdaConnection("COM36");
|
var hex = string.Empty;
|
||||||
connection.StateChenged += x => protokoll.AppendLine(x.ToString());
|
|
||||||
connection.StateChenged += Console.WriteLine;
|
|
||||||
connection.Open();
|
|
||||||
|
|
||||||
if (connection.FactorySeal().Sealed)
|
foreach (var @char in hexString)
|
||||||
{
|
{
|
||||||
var _sealed = connection.FactorySeal(false);
|
if (('0' <= @char && @char <= '9') || ('A' <= @char && @char <= 'F') || ('a' <= @char && @char <= 'f'))
|
||||||
|
{
|
||||||
|
hex += @char;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hex.Length == 2)
|
||||||
|
{
|
||||||
|
bytes.Add(Convert.ToByte(hex, 16));
|
||||||
|
|
||||||
|
hex = string.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var system = connection.ViewSystemParameters();
|
|
||||||
var register = connection.ViewRegisterSettings();
|
|
||||||
var configuration = connection.ViewConfigurationParameters();
|
|
||||||
var systemReset = connection.Set(new SystemTime());
|
|
||||||
|
|
||||||
Thread.Sleep(10000);
|
Console.WriteLine(BitConverter.ToString(bytes.ToArray()));
|
||||||
|
|
||||||
var response = connection.Set(new RegisterSettings
|
//var optionalUniDir = BitConverter.ToInt16(new byte[] { 0xFC, 0x01 }, 0);
|
||||||
{
|
//var protokoll = new StringBuilder();
|
||||||
IntPart = register.IntPart,
|
//var connection = new OmniIrdaConnection("COM36");
|
||||||
Fraction = register.Fraction,
|
//connection.StateChenged += x => protokoll.AppendLine(x.ToString());
|
||||||
Size = register.Size,
|
//connection.StateChenged += Console.WriteLine;
|
||||||
Range = register.Range,
|
//connection.Open();
|
||||||
VolumePerPulseUnit = 0x00,
|
|
||||||
MeterUnits = (byte)MessurementUnits.USGallons,
|
|
||||||
FlowUnits = (byte)MessurementUnits.USGallons,
|
|
||||||
FlowRate = (byte)TimeUnits.Minutes,
|
|
||||||
FactoryCorrection = 0x00,
|
|
||||||
FieldCorrection = 0x00,
|
|
||||||
PulseWeight = 1,
|
|
||||||
PulseWidth = 2,
|
|
||||||
PulseUpdate = 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
response = connection.Set(new ConfigurationParametersSet
|
//if (connection.FactorySeal().Sealed)
|
||||||
{
|
//{
|
||||||
BuildInfo = "816232411982",
|
// var _sealed = connection.FactorySeal(false);
|
||||||
ProgrammableID = "816232411982",
|
//}
|
||||||
FactoryID = "816232411982",
|
|
||||||
AlarmPercistancePeriodDays = 31,
|
|
||||||
DataLogIntervalMinutes = 60,
|
|
||||||
ManifacturingTime = system.ManifacturingTime.SecondsSince,
|
|
||||||
NumberOfReadingDigits = 8,
|
|
||||||
OptionalUniDirFields = 0x01FC,
|
|
||||||
ReadingPreset = "000000010",
|
|
||||||
RebootCount = 0,
|
|
||||||
SystemTime = Epoch20000101.UTCNow,
|
|
||||||
DeviceID = "OMNI-02"
|
|
||||||
});
|
|
||||||
|
|
||||||
response = connection.ClearDisplay();
|
//var system = connection.ViewSystemParameters();
|
||||||
response = connection.Set(new LeakAlarm
|
//var register = connection.ViewRegisterSettings();
|
||||||
{
|
//var configuration = connection.ViewConfigurationParameters();
|
||||||
FlowRateGPM = 0.25F,
|
//var systemReset = connection.Set(new SystemTime());
|
||||||
TimeLimit = 24 * 60 * 60
|
|
||||||
});
|
|
||||||
response = connection.Set(new HighFlowAlarm
|
|
||||||
{
|
|
||||||
FlowRateGPM = 25F,
|
|
||||||
TimeLimit = 1 * 60 * 60
|
|
||||||
});
|
|
||||||
response = connection.Set(new ReverseFlowAlarm
|
|
||||||
{
|
|
||||||
FlowRateGPM = -1F,
|
|
||||||
TimeLimit = 60
|
|
||||||
});
|
|
||||||
response = connection.ClearAlarms();
|
|
||||||
response = connection.EnableNFC();
|
|
||||||
var alarmsState = connection.ViewAlarmsState();
|
|
||||||
response = connection.ViewAlarmSettings(0x01);
|
|
||||||
response = connection.ViewAlarmSettings(0x02);
|
|
||||||
response = connection.ViewAlarmSettings(0x04);
|
|
||||||
response = connection.FactorySeal(true);
|
|
||||||
response = connection.FactorySeal();
|
|
||||||
system = connection.ViewSystemParameters();
|
|
||||||
register = connection.ViewRegisterSettings();
|
|
||||||
configuration = connection.ViewConfigurationParameters();
|
|
||||||
|
|
||||||
connection.Close();
|
//Thread.Sleep(10000);
|
||||||
|
|
||||||
Console.WriteLine();
|
//var response = connection.Set(new RegisterSettings
|
||||||
Console.WriteLine(protokoll.ToString());
|
//{
|
||||||
|
// IntPart = register.IntPart,
|
||||||
|
// Fraction = register.Fraction,
|
||||||
|
// Size = register.Size,
|
||||||
|
// Range = register.Range,
|
||||||
|
// VolumePerPulseUnit = 0x00,
|
||||||
|
// MeterUnits = (byte)MessurementUnits.USGallons,
|
||||||
|
// FlowUnits = (byte)MessurementUnits.USGallons,
|
||||||
|
// FlowRate = (byte)TimeUnits.Minutes,
|
||||||
|
// FactoryCorrection = 0x00,
|
||||||
|
// FieldCorrection = 0x00,
|
||||||
|
// PulseWeight = 1,
|
||||||
|
// PulseWidth = 2,
|
||||||
|
// PulseUpdate = 0,
|
||||||
|
//});
|
||||||
|
|
||||||
|
//response = connection.Set(new ConfigurationParametersSet
|
||||||
|
//{
|
||||||
|
// BuildInfo = "816232411982",
|
||||||
|
// ProgrammableID = "816232411982",
|
||||||
|
// FactoryID = "816232411982",
|
||||||
|
// AlarmPercistancePeriodDays = 31,
|
||||||
|
// DataLogIntervalMinutes = 60,
|
||||||
|
// ManifacturingTime = system.ManifacturingTime.SecondsSince,
|
||||||
|
// NumberOfReadingDigits = 8,
|
||||||
|
// OptionalUniDirFields = 0x01FC,
|
||||||
|
// ReadingPreset = "000000010",
|
||||||
|
// RebootCount = 0,
|
||||||
|
// SystemTime = Epoch20000101.UTCNow,
|
||||||
|
// DeviceID = "OMNI-02"
|
||||||
|
//});
|
||||||
|
|
||||||
|
//response = connection.ClearDisplay();
|
||||||
|
//response = connection.Set(new LeakAlarm
|
||||||
|
//{
|
||||||
|
// FlowRateGPM = 0.25F,
|
||||||
|
// TimeLimit = 24 * 60 * 60
|
||||||
|
//});
|
||||||
|
//response = connection.Set(new HighFlowAlarm
|
||||||
|
//{
|
||||||
|
// FlowRateGPM = 25F,
|
||||||
|
// TimeLimit = 1 * 60 * 60
|
||||||
|
//});
|
||||||
|
//response = connection.Set(new ReverseFlowAlarm
|
||||||
|
//{
|
||||||
|
// FlowRateGPM = -1F,
|
||||||
|
// TimeLimit = 60
|
||||||
|
//});
|
||||||
|
//response = connection.ClearAlarms();
|
||||||
|
//response = connection.EnableNFC();
|
||||||
|
//var alarmsState = connection.ViewAlarmsState();
|
||||||
|
//response = connection.ViewAlarmSettings(0x01);
|
||||||
|
//response = connection.ViewAlarmSettings(0x02);
|
||||||
|
//response = connection.ViewAlarmSettings(0x04);
|
||||||
|
//response = connection.FactorySeal(true);
|
||||||
|
//response = connection.FactorySeal();
|
||||||
|
//system = connection.ViewSystemParameters();
|
||||||
|
//register = connection.ViewRegisterSettings();
|
||||||
|
//configuration = connection.ViewConfigurationParameters();
|
||||||
|
|
||||||
|
//connection.Close();
|
||||||
|
|
||||||
|
//Console.WriteLine();
|
||||||
|
//Console.WriteLine(protokoll.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
|||||||
public String PcbId { get; set; }
|
public String PcbId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Date time UTC at EOL - Production
|
/// Date time UTC at EOL - Production
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? ProductionDateTimeUtc { get; set; }
|
public DateTime? ProductionDateTimeUtc { get; set; }
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
|||||||
public Byte? ProductionRadioSystemState { get; set; }
|
public Byte? ProductionRadioSystemState { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pulse adapter was installed during at EOL - Production
|
/// Pulse adapter was installed during at EOL - Production VAKO
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Boolean ProductionPulseAdapterIsInstalled { get; set; }
|
public Boolean ProductionPulseAdapterIsInstalled { get; set; }
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
8fbe991b217e7692af4817ad205b768685aa5a72
|
bf6bb8fceb3db5a9977dadc407cf576684bf7127
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
|
|
||||||
public T GetValue<T>(int index = -1)
|
public T GetValue<T>(int index = -1)
|
||||||
{
|
{
|
||||||
if (index > 0)
|
if (index >= 0)
|
||||||
{
|
{
|
||||||
if (!this.sqlDataReader.IsDBNull(index))
|
if (!this.sqlDataReader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Newtonsoft.Json;
|
using Common.SqlExtensions;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -7,10 +8,12 @@ using System.Linq;
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using Xylem.Common.Cryptology.Security;
|
using Xylem.Common.Cryptology.Security;
|
||||||
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||||
using Xylem.Common.Logic.ServiceCore;
|
using Xylem.Common.Logic.ServiceCore;
|
||||||
@@ -891,6 +894,178 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
|||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[Route("api/fwupdate/databaseateol/{pcbid}")]
|
||||||
|
public IHttpActionResult DataBaseAtEOL(string pcbid)
|
||||||
|
{
|
||||||
|
var databaseAtEOL = SQLConnection
|
||||||
|
.CreateSQLConnection(GlobalConfig.connectionString.Value, error =>
|
||||||
|
{
|
||||||
|
throw new Exception(error);
|
||||||
|
})
|
||||||
|
.CreateCommand($@"
|
||||||
|
DECLARE @pcb AS VARCHAR(15) = @{nameof(pcbid)};
|
||||||
|
DECLARE @latestRegisters AS TABLE (
|
||||||
|
[PcbId] VARCHAR(10)
|
||||||
|
, [Address] VARCHAR(10)
|
||||||
|
, [Value] VARCHAR(250)
|
||||||
|
, [Date] DATETIME);
|
||||||
|
|
||||||
|
INSERT INTO @latestRegisters
|
||||||
|
SELECT [h].[PcbId]
|
||||||
|
, [h].[Address]
|
||||||
|
, [h].[Value]
|
||||||
|
, [h].[Date]
|
||||||
|
FROM (SELECT [PcbId]
|
||||||
|
, [Address]
|
||||||
|
, [Value]
|
||||||
|
, [date] AS [Date]
|
||||||
|
, RANK() OVER (PARTITION BY [Address] ORDER BY [Id] DESC) AS [Row]
|
||||||
|
FROM [GenesisMeterRegisterHistory]
|
||||||
|
WHERE [PcbId] = @pcb)
|
||||||
|
AS [h]
|
||||||
|
WHERE [h].[Row] = 1;
|
||||||
|
|
||||||
|
SELECT (SELECT MAX([PcbId]) FROM @latestRegisters) AS [PcbId]
|
||||||
|
, (SELECT MAX([Date]) FROM @latestRegisters) AS [ProductionDate]
|
||||||
|
, (SELECT [Value] FROM @latestRegisters WHERE [Address] = '01-0A') AS [TotalUsedSeconds]
|
||||||
|
, (SELECT [Value] FROM @latestRegisters WHERE [Address] = '01-09') AS [TotalUsedCharge]
|
||||||
|
, (SELECT [Value] FROM @latestRegisters WHERE [Address] = '10-09') AS [RadioSystemState]
|
||||||
|
, (SELECT [Value] FROM @latestRegisters WHERE [Address] = '12-03') AS [PulseMode]
|
||||||
|
, (SELECT [Value] FROM @latestRegisters WHERE [Address] = '14-02') AS [PulseSequenceCounter]
|
||||||
|
, (SELECT [Value] FROM @latestRegisters WHERE [Address] = '12-11') AS [PulseEvenDistribution]
|
||||||
|
, (SELECT CAST(CASE WHEN COUNT(1) > 0 THEN 1 ELSE 0 END AS BIT)
|
||||||
|
FROM [MapPcbIdToSerialNumber] AS [pcb2sn]
|
||||||
|
LEFT JOIN [AlleAuftragPositionen] AS [aap]
|
||||||
|
ON [aap].[SerienNrVon] <= [pcb2sn].[MapPcbIdToSerialNumber_SerialNumber]
|
||||||
|
AND [aap].[SerienNrBis] >= [pcb2sn].[MapPcbIdToSerialNumber_SerialNumber]
|
||||||
|
LEFT JOIN [Identnr] AS [idnr]
|
||||||
|
ON [idnr].[IdentNr] = [aap].[IdentNr]
|
||||||
|
WHERE [pcb2sn].[MapPcbIdToSerialNumber_PcbId] = @pcb
|
||||||
|
AND [idnr].[Typ] = 'GNS'
|
||||||
|
AND SUBSTRING([idnr].[VakoCode], 48, 1) IN ('K', 'Q')) AS [PulseAdapterIsInstalled];")
|
||||||
|
.SetParameter(nameof(pcbid), pcbid)
|
||||||
|
.FirstOrDefault(x =>
|
||||||
|
{
|
||||||
|
var model = new PowerCorrection();
|
||||||
|
|
||||||
|
model.PcbId = x.GetValue<string>(0);
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(model.PcbId))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
model.ProductionDateTimeUtc = x.GetValue<DateTime>(1);
|
||||||
|
model.ProductionTotalUsedSeconds_s = x.GetValue<string>(2).ToUint();
|
||||||
|
model.ProductionTotalUsedCharge_uAs = x.GetValue<string>(3).ToUlong();
|
||||||
|
model.ProductionRadioSystemState = x.GetValue<string>(4).ToNullableByte();
|
||||||
|
model.ProductionPulseMode = x.GetValue<string>(5).ToByte();
|
||||||
|
model.ProductionPulseSequenceCounter = x.GetValue<string>(6).ToByte();
|
||||||
|
model.ProductionPulseEvenDistribution = x.GetValue<string>(7).ToBool();
|
||||||
|
model.ProductionPulseAdapterIsInstalled = x.GetValue<bool>(8);
|
||||||
|
|
||||||
|
return model;
|
||||||
|
});
|
||||||
|
|
||||||
|
return this.Json(databaseAtEOL, new JsonSerializerSettings
|
||||||
|
{
|
||||||
|
DefaultValueHandling = DefaultValueHandling.Ignore,
|
||||||
|
NullValueHandling = NullValueHandling.Ignore
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class BitConverterExtensions
|
||||||
|
{
|
||||||
|
public static bool ToBool(this string hexString)
|
||||||
|
{
|
||||||
|
var bytes = hexString.ToByteArray();
|
||||||
|
|
||||||
|
if (bytes.Length >= 1)
|
||||||
|
{
|
||||||
|
return BitConverter.ToBoolean(bytes, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return default(bool);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte ToByte(this string hexString)
|
||||||
|
{
|
||||||
|
var bytes = hexString.ToByteArray();
|
||||||
|
|
||||||
|
if (bytes.Length >= 1)
|
||||||
|
{
|
||||||
|
return bytes[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return default(byte);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte? ToNullableByte(this string hexString)
|
||||||
|
{
|
||||||
|
var bytes = hexString.ToByteArray();
|
||||||
|
|
||||||
|
if (bytes.Length >= 1)
|
||||||
|
{
|
||||||
|
return bytes[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return default(byte?);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static uint ToUint(this string hexString)
|
||||||
|
{
|
||||||
|
var bytes = hexString.ToByteArray();
|
||||||
|
|
||||||
|
if (bytes.Length >= 4)
|
||||||
|
{
|
||||||
|
return BitConverter.ToUInt32(bytes, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return default(uint);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ulong ToUlong(this string hexString)
|
||||||
|
{
|
||||||
|
var bytes = hexString.ToByteArray();
|
||||||
|
|
||||||
|
if (bytes.Length >= 8)
|
||||||
|
{
|
||||||
|
return BitConverter.ToUInt64(bytes, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return default(ulong);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] ToByteArray(this string hexString)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(hexString))
|
||||||
|
{
|
||||||
|
var bytes = new List<byte>();
|
||||||
|
var hex = string.Empty;
|
||||||
|
|
||||||
|
foreach (var @char in hexString)
|
||||||
|
{
|
||||||
|
if (('0' <= @char && @char <= '9') || ('A' <= @char && @char <= 'F') || ('a' <= @char && @char <= 'f'))
|
||||||
|
{
|
||||||
|
hex += @char;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hex.Length == 2)
|
||||||
|
{
|
||||||
|
bytes.Add(Convert.ToByte(hex, 16));
|
||||||
|
|
||||||
|
hex = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return bytes.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Array.Empty<Byte>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
namespace Xylem.Common.Service.MeterProcessState.Controllers
|
namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||||
{
|
{
|
||||||
using LaaProductionSQL;
|
using global::Common.SqlExtensions;
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
|
|||||||
@@ -50,9 +50,6 @@
|
|||||||
<LangVersion>7</LangVersion>
|
<LangVersion>7</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="LaaProductionSQL, Version=1.0.4.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\LaaProductionSQL.1.0.4\lib\netstandard2.0\LaaProductionSQL.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.4.1.0\lib\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.4.1.0\lib\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -347,12 +344,6 @@
|
|||||||
<Content Include="Web.config">
|
<Content Include="Web.config">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="Web.Debug.config">
|
|
||||||
<DependentUpon>Web.config</DependentUpon>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Web.Release.config">
|
|
||||||
<DependentUpon>Web.config</DependentUpon>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Areas\HelpPage\Views\_ViewStart.cshtml" />
|
<Content Include="Areas\HelpPage\Views\_ViewStart.cshtml" />
|
||||||
<Content Include="Content\Site.css" />
|
<Content Include="Content\Site.css" />
|
||||||
<Content Include="Scripts\_references.js" />
|
<Content Include="Scripts\_references.js" />
|
||||||
@@ -434,6 +425,10 @@
|
|||||||
<Project>{f7e3df42-4d35-4a0c-9182-90438f9956e1}</Project>
|
<Project>{f7e3df42-4d35-4a0c-9182-90438f9956e1}</Project>
|
||||||
<Name>ServiceCore</Name>
|
<Name>ServiceCore</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\OmniPlus\SqlExtensions\SqlExtensions.csproj">
|
||||||
|
<Project>{B8523894-2C40-4FF0-A399-B7A91FAE45EA}</Project>
|
||||||
|
<Name>SqlExtensions</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\SoftwareAccessHelper\SoftwareAccessHelper.csproj">
|
<ProjectReference Include="..\..\SoftwareAccessHelper\SoftwareAccessHelper.csproj">
|
||||||
<Project>{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}</Project>
|
<Project>{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}</Project>
|
||||||
<Name>SoftwareAccessHelper</Name>
|
<Name>SoftwareAccessHelper</Name>
|
||||||
@@ -524,7 +519,8 @@
|
|||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PreBuildEvent>copy $(SolutionDir)Hardware\WaterMeter\Genesis\GenesisCore\configuration.json $(ProjectDir)</PreBuildEvent>
|
<PreBuildEvent>
|
||||||
|
</PreBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
<package id="EntityFramework" version="6.1.3" targetFramework="net46" />
|
<package id="EntityFramework" version="6.1.3" targetFramework="net46" />
|
||||||
<package id="jQuery" version="1.10.2" targetFramework="net46" />
|
<package id="jQuery" version="1.10.2" targetFramework="net46" />
|
||||||
<package id="jQuery.Validation" version="1.11.1" targetFramework="net46" />
|
<package id="jQuery.Validation" version="1.11.1" targetFramework="net46" />
|
||||||
<package id="LaaProductionSQL" version="1.0.4" targetFramework="net472" />
|
|
||||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net46" />
|
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net46" />
|
||||||
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net46" />
|
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net46" />
|
||||||
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net46" />
|
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net46" />
|
||||||
|
|||||||
@@ -17,10 +17,13 @@
|
|||||||
this.sqlConnection = new SQLConnection(connectionString, errorsCallback);
|
this.sqlConnection = new SQLConnection(connectionString, errorsCallback);
|
||||||
this.SpecialRequirements = new SpecialRequirementsRepository(this.sqlConnection);
|
this.SpecialRequirements = new SpecialRequirementsRepository(this.sqlConnection);
|
||||||
this.StandardRequirements = new StandardRequirementsRepository(this.sqlConnection);
|
this.StandardRequirements = new StandardRequirementsRepository(this.sqlConnection);
|
||||||
|
this.ProductionOrders = new ProductionOrdersRepository(this.sqlConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IRepository<CordonelSpecialRequirement> SpecialRequirements { get; }
|
public IRepository<CordonelSpecialRequirement> SpecialRequirements { get; }
|
||||||
|
|
||||||
public IRepository<CordonelStandardRequirement> StandardRequirements { get; }
|
public IRepository<CordonelStandardRequirement> StandardRequirements { get; }
|
||||||
|
|
||||||
|
public IFilterRepository<CordonelProductionOrder> ProductionOrders { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace LaaProduction.Data.Cordonel.Interfaces
|
||||||
|
{
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public interface IFilterRepository<T> : IRepositoryEnumerable<T>
|
||||||
|
{
|
||||||
|
IEnumerable<T> Like(string pattern);
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
namespace LaaProduction.Data.Cordonel.Interfaces
|
||||||
|
{
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public interface IRepositoryEnumerable<T> : IEnumerable<T>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
namespace LaaProduction.Data.Cordonel.Interfaces
|
namespace LaaProduction.Data.Cordonel.Interfaces
|
||||||
{
|
{
|
||||||
using System.Collections.Generic;
|
public interface IRepository<T> : IRepositoryEnumerable<T>
|
||||||
|
|
||||||
public interface IRepository<T> : IEnumerable<T>
|
|
||||||
{
|
{
|
||||||
T Add(T model);
|
T Add(T model);
|
||||||
|
|
||||||
|
|||||||
@@ -42,12 +42,16 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="CordonelDbContext.cs" />
|
<Compile Include="CordonelDbContext.cs" />
|
||||||
|
<Compile Include="Interfaces\IFilterRepository[T].cs" />
|
||||||
|
<Compile Include="Interfaces\IRepositoryEnumerable[T].cs" />
|
||||||
|
<Compile Include="Models\CordonelProductionOrder.cs" />
|
||||||
<Compile Include="Models\CordonelSpecialRequirement.cs" />
|
<Compile Include="Models\CordonelSpecialRequirement.cs" />
|
||||||
<Compile Include="Models\CordonelSpecialRequirementChange.cs" />
|
<Compile Include="Models\CordonelSpecialRequirementChange.cs" />
|
||||||
<Compile Include="Models\CordonelStandardRequirement.cs" />
|
<Compile Include="Models\CordonelStandardRequirement.cs" />
|
||||||
<Compile Include="Interfaces\IRepository[T].cs" />
|
<Compile Include="Interfaces\IRepository[T].cs" />
|
||||||
<Compile Include="Models\CordonelStandardRequirementChange.cs" />
|
<Compile Include="Models\CordonelStandardRequirementChange.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Repositories\ProductionOrdersRepository.cs" />
|
||||||
<Compile Include="Repositories\SpecialRequirementsRepository.cs" />
|
<Compile Include="Repositories\SpecialRequirementsRepository.cs" />
|
||||||
<Compile Include="Repositories\StandardRequirementsRepository.cs" />
|
<Compile Include="Repositories\StandardRequirementsRepository.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
namespace LaaProduction.Data.Cordonel.Models
|
||||||
|
{
|
||||||
|
public class CordonelProductionOrder
|
||||||
|
{
|
||||||
|
public string Key { get; set; }
|
||||||
|
|
||||||
|
public string Region { get; set; }
|
||||||
|
|
||||||
|
public string Size { get; set; }
|
||||||
|
|
||||||
|
public string IdentNr { get; set; }
|
||||||
|
|
||||||
|
public string AuftragNr { get; set; }
|
||||||
|
|
||||||
|
public string PositionNr { get; set; }
|
||||||
|
|
||||||
|
public string FertigungsauftragNr { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+40
-4
@@ -7,6 +7,10 @@
|
|||||||
public class CordonelSpecialRequirement
|
public class CordonelSpecialRequirement
|
||||||
{
|
{
|
||||||
private int? standardId;
|
private int? standardId;
|
||||||
|
private int? standardNr;
|
||||||
|
private string key;
|
||||||
|
private string region;
|
||||||
|
private string meterSize;
|
||||||
private string fwVersion;
|
private string fwVersion;
|
||||||
private string lutVersion;
|
private string lutVersion;
|
||||||
private double? requiredLifeTimeYearsAssembly;
|
private double? requiredLifeTimeYearsAssembly;
|
||||||
@@ -23,7 +27,7 @@
|
|||||||
[Display(Name = "Versionsnr.", Description = "Die in der Datenbank zugewiesene Versionsnr. Nicht änderbar!")]
|
[Display(Name = "Versionsnr.", Description = "Die in der Datenbank zugewiesene Versionsnr. Nicht änderbar!")]
|
||||||
public int Nr { get; set; }
|
public int Nr { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required(ErrorMessage = "Standard requirement ist erforderlich!")]
|
||||||
[Display(Name = "Standard Id", Description = "...")]
|
[Display(Name = "Standard Id", Description = "...")]
|
||||||
public int? StandardId
|
public int? StandardId
|
||||||
{
|
{
|
||||||
@@ -31,8 +35,40 @@
|
|||||||
set => this.standardId = value;
|
set => this.standardId = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Required]
|
[Required(ErrorMessage = "Standard requirement ist erforderlich!")]
|
||||||
[Display(Name = "Fertigungsauftragnr.", Description = "...")]
|
[Display(Name = "Standard Nr", Description = "...")]
|
||||||
|
public int? StandardNr
|
||||||
|
{
|
||||||
|
get => this.standardNr ?? this.StandardRequirement?.Nr;
|
||||||
|
set => this.standardNr = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "Standard requirement ist erforderlich!")]
|
||||||
|
[Display(Name = "Key", Description = "Eindeutiger Schlüssel für Region und Zählergröße. Nicht änderbar!")]
|
||||||
|
public string Key
|
||||||
|
{
|
||||||
|
get => this.key ?? this.StandardRequirement?.Key;
|
||||||
|
set => this.key = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "Standard requirement ist erforderlich!")]
|
||||||
|
[Display(Name = "Region", Description = "Der Region für den Zähler wird gebaut. Nicht änderbar!")]
|
||||||
|
public string Region
|
||||||
|
{
|
||||||
|
get => this.region ?? this.StandardRequirement?.Region;
|
||||||
|
set => this.region = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "Standard requirement ist erforderlich!")]
|
||||||
|
[Display(Name = "Nennweite bezeichnung", Description = "Die Bezeichnung des Nenndurchmessers basierend auf der Region. Nicht änderbar!")]
|
||||||
|
public string MeterSize
|
||||||
|
{
|
||||||
|
get => this.meterSize ?? this.StandardRequirement?.MeterSize;
|
||||||
|
set => this.meterSize = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "Fertigungsauftragnr. ist erforderlich!")]
|
||||||
|
[Display(Name = "Fertigungsauftragnr.", Description = "Fertigungsauftragnr. ist erforderlich!")]
|
||||||
public int? ProductionOrderNr { get; set; }
|
public int? ProductionOrderNr { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Pcb Id", Description = "...")]
|
[Display(Name = "Pcb Id", Description = "...")]
|
||||||
@@ -103,7 +139,7 @@
|
|||||||
public string CreatedBy { get; set; }
|
public string CreatedBy { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Kommentar", Description = "Kommentar über die änderungen.")]
|
[Display(Name = "Kommentar", Description = "Kommentar über die änderungen.")]
|
||||||
[Required]
|
[Required(ErrorMessage = "Kommentar ist erforderlich!")]
|
||||||
public string Comment
|
public string Comment
|
||||||
{
|
{
|
||||||
get => this.comment ?? this.StandardRequirement?.Comment;
|
get => this.comment ?? this.StandardRequirement?.Comment;
|
||||||
|
|||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
namespace LaaProduction.Data.Cordonel.Repositories
|
||||||
|
{
|
||||||
|
using LaaProduction.Data.Cordonel.Interfaces;
|
||||||
|
using LaaProduction.Data.Cordonel.Models;
|
||||||
|
using LaaProduction.Data.SQL.Interfaces;
|
||||||
|
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public class ProductionOrdersRepository : IFilterRepository<CordonelProductionOrder>
|
||||||
|
{
|
||||||
|
private readonly ISQLConnection sqlConnection;
|
||||||
|
|
||||||
|
public ProductionOrdersRepository(ISQLConnection sqlConnection)
|
||||||
|
=> this.sqlConnection = sqlConnection;
|
||||||
|
|
||||||
|
public IEnumerator<CordonelProductionOrder> GetEnumerator()
|
||||||
|
=> this.sqlConnection
|
||||||
|
.CreateCommand(@"
|
||||||
|
SELECT DISTINCT
|
||||||
|
[VMM].[Charcode] AS [Key]
|
||||||
|
, [REG].[Wert] AS [Region]
|
||||||
|
, [CMS].[Dn_Name] AS [Size]
|
||||||
|
, [IDN].[IdentNr] AS [IdentNr]
|
||||||
|
, [AAP].[AuftragNr] AS [AuftragNr]
|
||||||
|
, [AAP].[PositionNr] AS [PositionNr]
|
||||||
|
, [AAP].[FertigungsauftragNr] AS [FertigungsauftragNr]
|
||||||
|
FROM [VAKO_Merkmale] AS [VMM]
|
||||||
|
LEFT JOIN (SELECT [Charcode]
|
||||||
|
, [Wert]
|
||||||
|
FROM [VAKO_Merkmale]
|
||||||
|
WHERE [Basis] = 'GNS'
|
||||||
|
AND [Stelle] = 5)
|
||||||
|
AS [REG]
|
||||||
|
ON [VMM].[Charcode] LIKE '_' + [REG].[Charcode]
|
||||||
|
LEFT JOIN [Identnr] AS [IDN]
|
||||||
|
ON [VMM].[Charcode] = SUBSTRING([IDN].[VakoCode], [VMM].[Stelle], [VMM].[Laenge])
|
||||||
|
LEFT JOIN [CordonelMeterSizes] AS [CMS]
|
||||||
|
ON [CMS].[Dn_VakoID] = [VMM].[Charcode]
|
||||||
|
JOIN [AlleAuftragPositionen] AS [AAP]
|
||||||
|
ON [AAP].[IdentNr] = [IDN].[IdentNr]
|
||||||
|
WHERE [VMM].[Basis] = 'GNS'
|
||||||
|
AND [VMM].[Bezeichnung] = 'NW')
|
||||||
|
ORDER BY [AAP].[IdentNr] DESC
|
||||||
|
, [AAP].[FertigungsauftragNr] DESC
|
||||||
|
, [AAP].[AuftragNr] DESC")
|
||||||
|
.ExecuteReader(x => new CordonelProductionOrder
|
||||||
|
{
|
||||||
|
Key = x.GetValue<string>(0),
|
||||||
|
Region = x.GetValue<string>(1),
|
||||||
|
Size = x.GetValue<string>(2),
|
||||||
|
IdentNr = x.GetValue<string>(3),
|
||||||
|
AuftragNr = x.GetValue<string>(4),
|
||||||
|
PositionNr = x.GetValue<string>(5),
|
||||||
|
FertigungsauftragNr = x.GetValue<string>(6),
|
||||||
|
})
|
||||||
|
.GetEnumerator();
|
||||||
|
|
||||||
|
public IEnumerable<CordonelProductionOrder> Like(string pattern)
|
||||||
|
=> this.sqlConnection
|
||||||
|
.CreateCommand($@"
|
||||||
|
SELECT DISTINCT
|
||||||
|
[VMM].[Charcode] AS [Key]
|
||||||
|
, [REG].[Wert] AS [Region]
|
||||||
|
, [CMS].[Dn_Name] AS [Size]
|
||||||
|
, [IDN].[IdentNr] AS [IdentNr]
|
||||||
|
, [AAP].[AuftragNr] AS [AuftragNr]
|
||||||
|
, [AAP].[PositionNr] AS [PositionNr]
|
||||||
|
, [AAP].[FertigungsauftragNr] AS [FertigungsauftragNr]
|
||||||
|
FROM [VAKO_Merkmale] AS [VMM]
|
||||||
|
LEFT JOIN (SELECT [Charcode]
|
||||||
|
, [Wert]
|
||||||
|
FROM [VAKO_Merkmale]
|
||||||
|
WHERE [Basis] = 'GNS'
|
||||||
|
AND [Stelle] = 5)
|
||||||
|
AS [REG]
|
||||||
|
ON [VMM].[Charcode] LIKE '_' + [REG].[Charcode]
|
||||||
|
LEFT JOIN [Identnr] AS [IDN]
|
||||||
|
ON [VMM].[Charcode] = SUBSTRING([IDN].[VakoCode], [VMM].[Stelle], [VMM].[Laenge])
|
||||||
|
LEFT JOIN [CordonelMeterSizes] AS [CMS]
|
||||||
|
ON [CMS].[Dn_VakoID] = [VMM].[Charcode]
|
||||||
|
JOIN [AlleAuftragPositionen] AS [AAP]
|
||||||
|
ON [AAP].[IdentNr] = [IDN].[IdentNr]
|
||||||
|
WHERE [VMM].[Basis] = 'GNS'
|
||||||
|
AND [VMM].[Bezeichnung] = 'NW'
|
||||||
|
AND ([AAP].[FertigungsauftragNr] LIKE @{nameof(pattern)}
|
||||||
|
OR [AAP].[AuftragNr] LIKE @{nameof(pattern)}
|
||||||
|
OR [AAP].[IdentNr] LIKE @{nameof(pattern)})
|
||||||
|
ORDER BY [AAP].[IdentNr] DESC
|
||||||
|
, [AAP].[FertigungsauftragNr] DESC
|
||||||
|
, [AAP].[AuftragNr] DESC")
|
||||||
|
.SetParameter(nameof(pattern), $"%{pattern}%")
|
||||||
|
.ExecuteReader(x => new CordonelProductionOrder
|
||||||
|
{
|
||||||
|
Key = x.GetValue<string>(0),
|
||||||
|
Region = x.GetValue<string>(1),
|
||||||
|
Size = x.GetValue<string>(2),
|
||||||
|
IdentNr = x.GetValue<string>(3),
|
||||||
|
AuftragNr = x.GetValue<string>(4),
|
||||||
|
PositionNr = x.GetValue<string>(5),
|
||||||
|
FertigungsauftragNr = x.GetValue<string>(6),
|
||||||
|
});
|
||||||
|
|
||||||
|
IEnumerator IEnumerable.GetEnumerator()
|
||||||
|
=> this.GetEnumerator();
|
||||||
|
}
|
||||||
|
}
|
||||||
+61
-4
@@ -37,7 +37,66 @@
|
|||||||
|
|
||||||
public IEnumerator<CordonelSpecialRequirement> GetEnumerator()
|
public IEnumerator<CordonelSpecialRequirement> GetEnumerator()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return this.sqlConnection
|
||||||
|
.CreateCommand(@"
|
||||||
|
SELECT [Latest].[Id]
|
||||||
|
, [Latest].[Nr]
|
||||||
|
, [Latest].[StandardId]
|
||||||
|
, [Latest].[StandardNr]
|
||||||
|
, [Standards].[Key]
|
||||||
|
, [Standards].[Region]
|
||||||
|
, [Standards].[MeterSize]
|
||||||
|
, [Latest].[ProductionOrderNo]
|
||||||
|
, [Latest].[PcbId]
|
||||||
|
, [Latest].[FwVersion]
|
||||||
|
, [Latest].[LutVersion]
|
||||||
|
, [Latest].[RequiredLifeTimeYearsAssembly]
|
||||||
|
, [Latest].[RequiredLifeTimeYearsShipping]
|
||||||
|
, [Latest].[MaxDrainedBatteryLoadPercentAssembly]
|
||||||
|
, [Latest].[MaxDrainedBatteryLoadPercentShipping]
|
||||||
|
, [Latest].[MaxStorageMonths]
|
||||||
|
, [Latest].[MaxStorageMonthsBigOrders]
|
||||||
|
, [Latest].[Timestamp]
|
||||||
|
, [Latest].[CreatedBy]
|
||||||
|
, [Latest].[Comment]
|
||||||
|
, [Latest].[IsActive]
|
||||||
|
FROM (SELECT *, RANK() OVER (PARTITION BY [Id]
|
||||||
|
ORDER BY [Nr] DESC) AS [RowNr]
|
||||||
|
FROM [Cordonel_Special_Requirements])
|
||||||
|
AS [Latest]
|
||||||
|
LEFT JOIN [Cordonel_Standard_Requirements]
|
||||||
|
AS [Standards]
|
||||||
|
ON [Standards].[Id] = [Latest].[StandardId]
|
||||||
|
AND [Standards].[Nr] = [Latest].[StandardNr]
|
||||||
|
WHERE [Latest].[RowNr] = 1
|
||||||
|
ORDER BY [Standards].[Region] ASC
|
||||||
|
, LEN([Standards].[MeterSize]) ASC
|
||||||
|
, [Standards].[MeterSize] ASC")
|
||||||
|
.ExecuteReader(x => new CordonelSpecialRequirement
|
||||||
|
{
|
||||||
|
Id = x.GetValue<int>(0),
|
||||||
|
Nr = x.GetValue<int>(1),
|
||||||
|
StandardId = x.GetValue<int>(2),
|
||||||
|
StandardNr = x.GetValue<int>(3),
|
||||||
|
Key = x.GetValue<string>(4),
|
||||||
|
Region = x.GetValue<string>(5),
|
||||||
|
MeterSize = x.GetValue<string>(6),
|
||||||
|
ProductionOrderNr = x.GetValue<int?>(7),
|
||||||
|
PcbId = x.GetValue<int?>(8),
|
||||||
|
FwVersion = x.GetValue<string>(9),
|
||||||
|
LutVersion = x.GetValue<string>(10),
|
||||||
|
RequiredLifeTimeYearsAssembly = x.GetValue<double?>(11),
|
||||||
|
RequiredLifeTimeYearsShipping = x.GetValue<double?>(12),
|
||||||
|
MaxDrainedBatteryLoadPercentAssembly = x.GetValue<double?>(13),
|
||||||
|
MaxDrainedBatteryLoadPercentShipping = x.GetValue<double?>(14),
|
||||||
|
MaxStorageMonths = x.GetValue<double?>(15),
|
||||||
|
MaxStorageMonthsBigOrders = x.GetValue<double?>(16),
|
||||||
|
Timestamp = x.GetValue<DateTime>(17),
|
||||||
|
CreatedBy = x.GetValue<string>(18),
|
||||||
|
Comment = x.GetValue<string>(19),
|
||||||
|
IsActive = x.GetValue<bool>(20),
|
||||||
|
})
|
||||||
|
.GetEnumerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
public CordonelSpecialRequirement Update(CordonelSpecialRequirement model)
|
public CordonelSpecialRequirement Update(CordonelSpecialRequirement model)
|
||||||
@@ -46,8 +105,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator IEnumerable.GetEnumerator()
|
IEnumerator IEnumerable.GetEnumerator()
|
||||||
{
|
=> this.GetEnumerator();
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,83 +8,89 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
public class HttpClient : IHttpClient
|
public class HttpClient : IHttpClient
|
||||||
{
|
{
|
||||||
private static readonly System.Net.Http.HttpClient http = new System.Net.Http.HttpClient();
|
private static readonly System.Net.Http.HttpClient http = new System.Net.Http.HttpClient();
|
||||||
|
|
||||||
public HttpResponse<T> DELETE<T>(string pathAndQuery, string bearer = null)
|
public HttpResponse<T> DELETE<T>(string requestUri, string bearer = null)
|
||||||
=> this.HttpRequestHandler<T>(HttpMethod.Delete, pathAndQuery, bearer: bearer);
|
=> this.HttpRequestHandler<T>(HttpMethod.Delete, requestUri, bearer: bearer);
|
||||||
|
|
||||||
public HttpResponse<T> DELETE<T>(string pathAndQuery)
|
public HttpResponse<T> DELETE<T>(string requestUri)
|
||||||
=> this.HttpRequestHandler<T>(HttpMethod.Delete, pathAndQuery);
|
=> this.HttpRequestHandler<T>(HttpMethod.Delete, requestUri);
|
||||||
|
|
||||||
public HttpResponse<T> GET<T>(string pathAndQuery, string bearer = null)
|
public HttpResponse<T> GET<T>(string requestUri, string bearer = null)
|
||||||
=> this.HttpRequestHandler<T>(HttpMethod.Get, pathAndQuery, bearer: bearer);
|
=> this.HttpRequestHandler<T>(HttpMethod.Get, requestUri, bearer: bearer);
|
||||||
|
|
||||||
public HttpResponse<T> GET<T>(string pathAndQuery)
|
public HttpResponse<T> GET<T>(string requestUri)
|
||||||
=> this.HttpRequestHandler<T>(HttpMethod.Get, pathAndQuery);
|
=> this.HttpRequestHandler<T>(HttpMethod.Get, requestUri);
|
||||||
|
|
||||||
public HttpResponse<T> POST<T>(string pathAndQuery, string bearer = null, object body = null)
|
public HttpResponse<T> POST<T>(string requestUri, string bearer = null, object body = null)
|
||||||
=> this.HttpRequestHandler<T>(HttpMethod.Post, pathAndQuery, bearer: bearer, body: body);
|
=> this.HttpRequestHandler<T>(HttpMethod.Post, requestUri, bearer: bearer, body: body);
|
||||||
|
|
||||||
public HttpResponse<T> POST<T>(string pathAndQuery)
|
public HttpResponse<T> POST<T>(string requestUri)
|
||||||
=> this.HttpRequestHandler<T>(HttpMethod.Post, pathAndQuery);
|
=> this.HttpRequestHandler<T>(HttpMethod.Post, requestUri);
|
||||||
|
|
||||||
public HttpResponse<T> POST<T>(string pathAndQuery, object body)
|
public HttpResponse<T> POST<T>(string requestUri, object body)
|
||||||
=> this.HttpRequestHandler<T>(HttpMethod.Post, pathAndQuery, body: body);
|
=> this.HttpRequestHandler<T>(HttpMethod.Post, requestUri, body: body);
|
||||||
|
|
||||||
public HttpResponse<T> POST<T>(string pathAndQuery, string bearer)
|
public HttpResponse<T> POST<T>(string requestUri, string bearer)
|
||||||
=> this.HttpRequestHandler<T>(HttpMethod.Post, pathAndQuery, bearer: bearer);
|
=> this.HttpRequestHandler<T>(HttpMethod.Post, requestUri, bearer: bearer);
|
||||||
|
|
||||||
public HttpResponse<T> PUT<T>(string pathAndQuery, string bearer = null, object body = null)
|
public HttpResponse<T> PUT<T>(string requestUri, string bearer = null, object body = null)
|
||||||
=> this.HttpRequestHandler<T>(HttpMethod.Put, pathAndQuery, bearer: bearer, body: body);
|
=> this.HttpRequestHandler<T>(HttpMethod.Put, requestUri, bearer: bearer, body: body);
|
||||||
|
|
||||||
public HttpResponse<T> PUT<T>(string pathAndQuery)
|
public HttpResponse<T> PUT<T>(string requestUri)
|
||||||
=> this.HttpRequestHandler<T>(HttpMethod.Post, pathAndQuery);
|
=> this.HttpRequestHandler<T>(HttpMethod.Post, requestUri);
|
||||||
|
|
||||||
public HttpResponse<T> PUT<T>(string pathAndQuery, object body)
|
public HttpResponse<T> PUT<T>(string requestUri, object body)
|
||||||
=> this.HttpRequestHandler<T>(HttpMethod.Post, pathAndQuery, body: body);
|
=> this.HttpRequestHandler<T>(HttpMethod.Put, requestUri, body: body);
|
||||||
|
|
||||||
public HttpResponse<T> PUT<T>(string pathAndQuery, string bearer)
|
public HttpResponse<T> PUT<T>(string requestUri, string bearer)
|
||||||
=> this.HttpRequestHandler<T>(HttpMethod.Post, pathAndQuery, bearer: bearer);
|
=> this.HttpRequestHandler<T>(HttpMethod.Put, requestUri, bearer: bearer);
|
||||||
|
|
||||||
private HttpResponse<T> HttpRequestHandler<T>(HttpMethod method, string url, string bearer = null, object body = null)
|
private HttpResponse<T> HttpRequestHandler<T>(HttpMethod method, string url, string bearer = null, object body = null)
|
||||||
{
|
{
|
||||||
var result = default(HttpResponse<T>);
|
var result = default(HttpResponse<T>);
|
||||||
|
|
||||||
using (var request = new HttpRequestMessage(method, new Uri(url)))
|
try
|
||||||
{
|
{
|
||||||
if (body != null)
|
using (var request = new HttpRequestMessage(method, new Uri(url)))
|
||||||
{
|
{
|
||||||
request.Content = new StringContent(JsonConvert.SerializeObject(body));
|
if (body != null)
|
||||||
request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(bearer))
|
|
||||||
{
|
|
||||||
http.DefaultRequestHeaders
|
|
||||||
.Authorization = new AuthenticationHeaderValue("Bearer", bearer);
|
|
||||||
}
|
|
||||||
|
|
||||||
using (var response = http.SendAsync(request).Result)
|
|
||||||
{
|
|
||||||
using (var content = response.Content)
|
|
||||||
{
|
{
|
||||||
var text = content.ReadAsStringAsync().Result;
|
request.Content = new StringContent(JsonConvert.SerializeObject(body));
|
||||||
|
request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
|
||||||
|
}
|
||||||
|
|
||||||
if (response.IsSuccessStatusCode)
|
if (!string.IsNullOrWhiteSpace(bearer))
|
||||||
|
{
|
||||||
|
http.DefaultRequestHeaders
|
||||||
|
.Authorization = new AuthenticationHeaderValue("Bearer", bearer);
|
||||||
|
}
|
||||||
|
|
||||||
|
using (var response = http.SendAsync(request).Result)
|
||||||
|
{
|
||||||
|
using (var content = response.Content)
|
||||||
{
|
{
|
||||||
result = JsonConvert.DeserializeObject<T>(text);
|
var text = content.ReadAsStringAsync().Result;
|
||||||
}
|
|
||||||
else
|
if (response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
result = JsonConvert.DeserializeObject<Dictionary<string, string>>(text);
|
result = JsonConvert.DeserializeObject<T>(text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = JsonConvert.DeserializeObject<Dictionary<string, string>>(text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
result = e;
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,28 +2,28 @@
|
|||||||
{
|
{
|
||||||
public interface IHttpClient
|
public interface IHttpClient
|
||||||
{
|
{
|
||||||
HttpResponse<T> DELETE<T>(string pathAndQuery);
|
HttpResponse<T> DELETE<T>(string requestUri);
|
||||||
|
|
||||||
HttpResponse<T> DELETE<T>(string pathAndQuery, string bearer);
|
HttpResponse<T> DELETE<T>(string requestUri, string bearer);
|
||||||
|
|
||||||
HttpResponse<T> GET<T>(string pathAndQuery);
|
HttpResponse<T> GET<T>(string requestUri);
|
||||||
|
|
||||||
HttpResponse<T> GET<T>(string pathAndQuery, string bearer);
|
HttpResponse<T> GET<T>(string requestUri, string bearer);
|
||||||
|
|
||||||
HttpResponse<T> POST<T>(string route);
|
HttpResponse<T> POST<T>(string requestUri);
|
||||||
|
|
||||||
HttpResponse<T> POST<T>(string route, object body);
|
HttpResponse<T> POST<T>(string requestUri, object body);
|
||||||
|
|
||||||
HttpResponse<T> POST<T>(string route, string bearer);
|
HttpResponse<T> POST<T>(string requestUri, string bearer);
|
||||||
|
|
||||||
HttpResponse<T> POST<T>(string route, string bearer, object body);
|
HttpResponse<T> POST<T>(string requestUri, string bearer, object body);
|
||||||
|
|
||||||
HttpResponse<T> PUT<T>(string route);
|
HttpResponse<T> PUT<T>(string requestUri);
|
||||||
|
|
||||||
HttpResponse<T> PUT<T>(string route, object body);
|
HttpResponse<T> PUT<T>(string requestUri, object body);
|
||||||
|
|
||||||
HttpResponse<T> PUT<T>(string route, string bearer);
|
HttpResponse<T> PUT<T>(string requestUri, string bearer);
|
||||||
|
|
||||||
HttpResponse<T> PUT<T>(string route, string bearer, object body);
|
HttpResponse<T> PUT<T>(string requestUri, string bearer, object body);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
|
|
||||||
[RoutePrefix(RoutePrefixes.API_CORDONEL_EOL_EOLPROGRESS)]
|
[RoutePrefix(RoutePrefixes.API_CORDONEL_EOL_PROGRESS)]
|
||||||
public class EOLProgressController : ControllerBase
|
public class EOLProgressController : ControllerBase
|
||||||
{
|
{
|
||||||
private readonly IEOLProgressService eolProgress;
|
private readonly IEOLProgressService eolProgress;
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
namespace LaaProductionWeb.API.Cordonel
|
||||||
|
{
|
||||||
|
using LaaProduction.Data.Cordonel;
|
||||||
|
using LaaProductionDI;
|
||||||
|
using LaaProductionWeb.App_Infrastructure;
|
||||||
|
|
||||||
|
using System.Web.Http;
|
||||||
|
|
||||||
|
[RoutePrefix(RoutePrefixes.API_CORDONEL_PRODUCTIONORDERS)]
|
||||||
|
public class ProductionOrdersController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly CordonelDbContext cordonels;
|
||||||
|
|
||||||
|
public ProductionOrdersController()
|
||||||
|
=> this.cordonels = LaaServiceProvider.GetService<CordonelDbContext>();
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[Route("{pattern}")]
|
||||||
|
public IHttpActionResult Get(string pattern)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(pattern))
|
||||||
|
{
|
||||||
|
this.ModelState.AddModelError(nameof(pattern), $"{nameof(pattern)} is required.");
|
||||||
|
|
||||||
|
return this.BadRequest();
|
||||||
|
}
|
||||||
|
else if (3 > pattern.Length || pattern.Length > 10)
|
||||||
|
{
|
||||||
|
this.ModelState.AddModelError(nameof(pattern), $"'{{{nameof(pattern)}}}' should be between 3 and 10 charachters.");
|
||||||
|
|
||||||
|
return this.BadRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.Json(this.cordonels.ProductionOrders.Like(pattern));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -357,4 +357,23 @@ td .field-validation-error {
|
|||||||
|
|
||||||
.popover {
|
.popover {
|
||||||
box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .35) !important;
|
box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .35) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.field-validation-error {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -.5rem;
|
||||||
|
left: .85rem;
|
||||||
|
background: white;
|
||||||
|
padding: 0 5px;
|
||||||
|
font-size: 75%;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.li-card-header {
|
||||||
|
position: absolute;
|
||||||
|
top: -.2rem;
|
||||||
|
padding: 0 .3rem;
|
||||||
|
background: white;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: .6rem;
|
||||||
}
|
}
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
public static int SMTPPort => int.TryParse(ConfigurationManager.AppSettings.Get(nameof(SMTPPort)), out int port) ? port : 587;
|
public static int SMTPPort => int.TryParse(ConfigurationManager.AppSettings.Get(nameof(SMTPPort)), out int port) ? port : 587;
|
||||||
|
|
||||||
public static string ToURL(this string path, string pathAndQuery)
|
public static string ToURL(this string path, string pathAndQuery)
|
||||||
=> $"{APIURL.TrimEnd('/')}/{APIPrefix.Trim('/')}/{path.Trim('/')}/{pathAndQuery.Trim('/')}".Trim('/');
|
=> $"{APIURL?.TrimEnd('/')}/{APIPrefix?.Trim('/')}/{path?.Trim('/')}/{pathAndQuery?.Trim('/')}".Trim('/');
|
||||||
|
|
||||||
public static string ToURL(this string path)
|
public static string ToURL(this string path)
|
||||||
=> $"{APIURL.TrimEnd('/')}/{APIPrefix.Trim('/')}/{path.Trim('/')}".Trim('/');
|
=> $"{APIURL.TrimEnd('/')}/{APIPrefix.Trim('/')}/{path.Trim('/')}".Trim('/');
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
public static class RazorExtensions
|
public static class RazorExtensions
|
||||||
{
|
{
|
||||||
public static MvcHtmlString PopoverFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression, double top = 30, double right = 10)
|
public static MvcHtmlString PopoverFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression, double top = 15, double right = 10)
|
||||||
{
|
{
|
||||||
var title = "(title is missing)";
|
var title = "(title is missing)";
|
||||||
var content = "(content is missing)";
|
var content = "(content is missing)";
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
buttonBuilder.Attributes["data-bs-toggle"] = "popover";
|
buttonBuilder.Attributes["data-bs-toggle"] = "popover";
|
||||||
buttonBuilder.Attributes["title"] = title;
|
buttonBuilder.Attributes["title"] = title;
|
||||||
buttonBuilder.Attributes["data-bs-content"] = content;
|
buttonBuilder.Attributes["data-bs-content"] = content;
|
||||||
buttonBuilder.Attributes["style"] = $"top: {top}%; right: {right}px;";
|
buttonBuilder.Attributes["style"] = $"top: {top}px; right: {right}px;";
|
||||||
|
|
||||||
var iconBuilder = new TagBuilder("i");
|
var iconBuilder = new TagBuilder("i");
|
||||||
iconBuilder.Attributes["class"] = "bi bi-info-circle text-primary";
|
iconBuilder.Attributes["class"] = "bi bi-info-circle text-primary";
|
||||||
|
|||||||
@@ -8,11 +8,13 @@ namespace LaaProductionWeb.App_Infrastructure
|
|||||||
|
|
||||||
public const string API_SEND = "api/send";
|
public const string API_SEND = "api/send";
|
||||||
|
|
||||||
|
public const string API_CORDONEL_PRODUCTIONORDERS = "api/cordonel/productionorders";
|
||||||
|
|
||||||
public const string API_CORDONEL_SPECIALREQUIREMENTS = "api/cordonel/specialrequirements";
|
public const string API_CORDONEL_SPECIALREQUIREMENTS = "api/cordonel/specialrequirements";
|
||||||
|
|
||||||
public const string API_CORDONEL_STANDARDREQUIREMENTS = "api/cordonel/standardrequirements";
|
public const string API_CORDONEL_STANDARDREQUIREMENTS = "api/cordonel/standardrequirements";
|
||||||
|
|
||||||
public const string API_CORDONEL_EOL_EOLPROGRESS = "api/cordonel/eol/eolprogress";
|
public const string API_CORDONEL_EOL_PROGRESS = "api/cordonel/eol/progress";
|
||||||
|
|
||||||
public const string API_PERSONALIZATION_EMPLOYEES = "api/personalization/employees";
|
public const string API_PERSONALIZATION_EMPLOYEES = "api/personalization/employees";
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
using LaaProductionWeb.App_Infrastructure;
|
using LaaProductionWeb.App_Infrastructure;
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
|
||||||
[AllowedRoles(EmployeesRoles.WEB_Approvals)]
|
[AllowedRoles(EmployeesRoles.WEB_Approvals)]
|
||||||
@@ -18,11 +20,28 @@
|
|||||||
=> this.http = LaaServiceProvider.GetService<IHttpClient>();
|
=> this.http = LaaServiceProvider.GetService<IHttpClient>();
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public ActionResult Index()
|
public ActionResult Index()
|
||||||
=> this.View();
|
{
|
||||||
|
var requirements = this.http
|
||||||
|
.GET<IEnumerable<CordonelSpecialRequirement>>(RoutePrefixes.API_CORDONEL_SPECIALREQUIREMENTS.ToURL())
|
||||||
|
.Value ?? new List<CordonelSpecialRequirement>();
|
||||||
|
|
||||||
|
return this.View(requirements);
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public ActionResult Create(string id)
|
public ActionResult Create()
|
||||||
|
{
|
||||||
|
return this.PartialView(new CordonelSpecialRequirement
|
||||||
|
{
|
||||||
|
Timestamp = DateTime.Now,
|
||||||
|
CreatedBy = this.User.FullName()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[Route("SpecialRequirements/Create/{id}/{nr}")]
|
||||||
|
public ActionResult Create(string id, string nr)
|
||||||
{
|
{
|
||||||
var requirement = new CordonelSpecialRequirement
|
var requirement = new CordonelSpecialRequirement
|
||||||
{
|
{
|
||||||
@@ -31,7 +50,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
requirement.StandardRequirement = this.http
|
requirement.StandardRequirement = this.http
|
||||||
.GET<CordonelStandardRequirement>(RoutePrefixes.API_CORDONEL_STANDARDREQUIREMENTS.ToURL($"{id}"));
|
.GET<CordonelStandardRequirement>(RoutePrefixes.API_CORDONEL_STANDARDREQUIREMENTS.ToURL($"{id}/{nr}"))
|
||||||
|
.Value;
|
||||||
|
|
||||||
return this.PartialView(requirement);
|
return this.PartialView(requirement);
|
||||||
}
|
}
|
||||||
@@ -41,9 +61,37 @@
|
|||||||
{
|
{
|
||||||
var requirement = this.http
|
var requirement = this.http
|
||||||
.POST<CordonelSpecialRequirement>(RoutePrefixes.API_CORDONEL_SPECIALREQUIREMENTS.ToURL(), model)
|
.POST<CordonelSpecialRequirement>(RoutePrefixes.API_CORDONEL_SPECIALREQUIREMENTS.ToURL(), model)
|
||||||
?? new CordonelSpecialRequirement();
|
.Value ?? model;
|
||||||
|
|
||||||
|
requirement.StandardRequirement = this.http
|
||||||
|
.GET<CordonelStandardRequirement>(RoutePrefixes.API_CORDONEL_STANDARDREQUIREMENTS.ToURL($"{model.StandardId}/{model.StandardNr}"))
|
||||||
|
.Value;
|
||||||
|
|
||||||
return this.PartialView(requirement);
|
return this.PartialView(requirement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public ActionResult Standards()
|
||||||
|
{
|
||||||
|
var requirements = (this.http
|
||||||
|
.GET<List<CordonelStandardRequirement>>(RoutePrefixes.API_CORDONEL_STANDARDREQUIREMENTS.ToURL())
|
||||||
|
.Value ?? new List<CordonelStandardRequirement>())
|
||||||
|
.Where(x => x.IsActive);
|
||||||
|
|
||||||
|
return this.PartialView(requirements);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[Route("SpecialRequirements/ProductionOrders/{pattern}")]
|
||||||
|
public ActionResult ProductionOrders(string pattern)
|
||||||
|
{
|
||||||
|
var productionOrders = this.http
|
||||||
|
.GET<List<CordonelProductionOrder>>(RoutePrefixes.API_CORDONEL_PRODUCTIONORDERS.ToURL(pattern))
|
||||||
|
.Value ?? new List<CordonelProductionOrder>();
|
||||||
|
|
||||||
|
return this.PartialView(productionOrders);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
public ActionResult Index()
|
public ActionResult Index()
|
||||||
{
|
{
|
||||||
var requirements = this.http
|
var requirements = this.http
|
||||||
.GET<IEnumerable<CordonelStandardRequirement>>(RoutePrefixes.API_CORDONEL_STANDARDREQUIREMENTS.ToURL())
|
.GET<List<CordonelStandardRequirement>>(RoutePrefixes.API_CORDONEL_STANDARDREQUIREMENTS.ToURL())
|
||||||
.Value ?? new List<CordonelStandardRequirement>();
|
.Value ?? new List<CordonelStandardRequirement>();
|
||||||
|
|
||||||
return this.View(requirements);
|
return this.View(requirements);
|
||||||
@@ -32,7 +32,6 @@
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
public ActionResult Update(string id)
|
public ActionResult Update(string id)
|
||||||
{
|
{
|
||||||
Console.WriteLine(id);
|
|
||||||
var requirement = this.http
|
var requirement = this.http
|
||||||
.GET<CordonelStandardRequirement>(RoutePrefixes.API_CORDONEL_STANDARDREQUIREMENTS.ToURL($"{id}"))
|
.GET<CordonelStandardRequirement>(RoutePrefixes.API_CORDONEL_STANDARDREQUIREMENTS.ToURL($"{id}"))
|
||||||
.Value ?? new CordonelStandardRequirement();
|
.Value ?? new CordonelStandardRequirement();
|
||||||
@@ -60,7 +59,7 @@
|
|||||||
{
|
{
|
||||||
var requirement = this.http
|
var requirement = this.http
|
||||||
.PUT<CordonelStandardRequirement>(RoutePrefixes.API_CORDONEL_STANDARDREQUIREMENTS.ToURL(), model)
|
.PUT<CordonelStandardRequirement>(RoutePrefixes.API_CORDONEL_STANDARDREQUIREMENTS.ToURL(), model)
|
||||||
?? new CordonelStandardRequirement();
|
.Value ?? model;
|
||||||
|
|
||||||
return this.PartialView(requirement);
|
return this.PartialView(requirement);
|
||||||
}
|
}
|
||||||
@@ -70,20 +69,9 @@
|
|||||||
{
|
{
|
||||||
var requirement = this.http
|
var requirement = this.http
|
||||||
.GET<CordonelStandardRequirement>(RoutePrefixes.API_CORDONEL_STANDARDREQUIREMENTS.ToURL($"{id}"))
|
.GET<CordonelStandardRequirement>(RoutePrefixes.API_CORDONEL_STANDARDREQUIREMENTS.ToURL($"{id}"))
|
||||||
?? new CordonelStandardRequirement();
|
.Value ?? new CordonelStandardRequirement();
|
||||||
|
|
||||||
return this.PartialView(requirement);
|
return this.PartialView(requirement);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
public ActionResult Standards()
|
|
||||||
{
|
|
||||||
var requirements = (this.http
|
|
||||||
.GET<IEnumerable<CordonelStandardRequirement>>(RoutePrefixes.API_CORDONEL_STANDARDREQUIREMENTS.ToURL())
|
|
||||||
.Value ?? new List<CordonelStandardRequirement>())
|
|
||||||
.Where(x => x.IsActive);
|
|
||||||
|
|
||||||
return this.PartialView(requirements);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -179,6 +179,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="API\APIExtensions.cs" />
|
<Compile Include="API\APIExtensions.cs" />
|
||||||
<Compile Include="API\ControllerBase.cs" />
|
<Compile Include="API\ControllerBase.cs" />
|
||||||
|
<Compile Include="API\Cordonel\ProductionOrdersController.cs" />
|
||||||
<Compile Include="API\Cordonel\SpecialRequirementsController.cs" />
|
<Compile Include="API\Cordonel\SpecialRequirementsController.cs" />
|
||||||
<Compile Include="API\Cordonel\StandardRequirementsController.cs" />
|
<Compile Include="API\Cordonel\StandardRequirementsController.cs" />
|
||||||
<Compile Include="API\Cordonel\EOL\ProgressController.cs" />
|
<Compile Include="API\Cordonel\EOL\ProgressController.cs" />
|
||||||
@@ -277,7 +278,9 @@
|
|||||||
<Content Include="Views\StandardRequirements\TrContent.cshtml" />
|
<Content Include="Views\StandardRequirements\TrContent.cshtml" />
|
||||||
<Content Include="Views\SpecialRequirements\Index.cshtml" />
|
<Content Include="Views\SpecialRequirements\Index.cshtml" />
|
||||||
<Content Include="Views\SpecialRequirements\Create.cshtml" />
|
<Content Include="Views\SpecialRequirements\Create.cshtml" />
|
||||||
<Content Include="Views\StandardRequirements\Standards.cshtml" />
|
<Content Include="Views\SpecialRequirements\Standards.cshtml" />
|
||||||
|
<Content Include="Views\SpecialRequirements\TrContent.cshtml" />
|
||||||
|
<Content Include="Views\SpecialRequirements\ProductionOrders.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="App_Content\css\bootstrap.min.css.map" />
|
<Content Include="App_Content\css\bootstrap.min.css.map" />
|
||||||
@@ -400,7 +403,7 @@
|
|||||||
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.4.1.0\build\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.4.1.0\build\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.targets'))" />
|
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.4.1.0\build\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.4.1.0\build\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PreBuildEvent>$(SolutionDir)RoutesBuilder\bin\Debug\RoutesBuilder.exe LaaProductionWeb.App_Infrastructure RoutePrefixes $(ProjectDir)App_Infrastructure</PreBuildEvent>
|
<PreBuildEvent>$(SolutionDir)RoutesBuilder\bin\Debug\RoutesBuilder.exe</PreBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|||||||
@@ -3,11 +3,13 @@
|
|||||||
@model LaaProduction.Data.Cordonel.Models.CordonelSpecialRequirement
|
@model LaaProduction.Data.Cordonel.Models.CordonelSpecialRequirement
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="~/StandardRequirements/Update" method="post" autocomplete="off">
|
<form action="~/SpecialRequirements/Create" method="post" autocomplete="off">
|
||||||
@if (Model.StandardRequirement != null)
|
@if (Model.StandardRequirement != null)
|
||||||
{
|
{
|
||||||
@Html.HiddenFor(x => x.StandardId)
|
@Html.HiddenFor(x => x.StandardId)
|
||||||
|
@Html.HiddenFor(x => x.StandardNr)
|
||||||
}
|
}
|
||||||
|
@Html.HiddenFor(x => x.ProductionOrderNr)
|
||||||
<div class="modal-header border-0 px-0 pt-0">
|
<div class="modal-header border-0 px-0 pt-0">
|
||||||
<h5 class="modal-title text-smallcaps">New special requirement</h5>
|
<h5 class="modal-title text-smallcaps">New special requirement</h5>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
@@ -15,25 +17,33 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="dropdown form-floating mb-3 position-relative">
|
<div class="dropdown form-floating mb-3 position-relative">
|
||||||
<button class="form-control cursor-pointer text-start text-decoration-none position-relative" data-bs-toggle="dropdown" aria-expanded="false" id="StandardRequirement">
|
<button class="form-control cursor-pointer text-start text-decoration-none position-relative" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
@if (Model.StandardRequirement != null)
|
@if (Model.StandardRequirement != null)
|
||||||
{
|
{
|
||||||
<span class="text-decoration-none">Version: @(Model?.StandardRequirement?.Id).@(Model?.StandardRequirement?.Nr)</span>
|
<span class="text-decoration-none">@(Model.StandardRequirement?.Id).@(Model.StandardRequirement?.Nr)</span>
|
||||||
}
|
}
|
||||||
<i class="bi bi-chevron-expand ms-3" style="position: absolute; right: 15px; top: 30%; "></i>
|
<i class="bi bi-chevron-expand ms-3" style="position: absolute; right: 15px; top: 30%; "></i>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu w-100 mt-1 overflow-auto" style="max-height: 300px; box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .35) !important;">
|
<ul class="dropdown-menu w-100 mt-1 overflow-auto" style="max-height: 300px; box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .35) !important;" id="StandardRequirements"></ul>
|
||||||
@Html.Action("Standards", "StandardRequirements")
|
|
||||||
</ul>
|
|
||||||
<label for="StandardRequirement">
|
<label for="StandardRequirement">
|
||||||
Standard-Requirement auswählen
|
Standard-Requirement auswählen
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-floating mb-3">
|
<div class="dropdown form-floating mb-3">
|
||||||
@Html.TextBoxFor(x => x.ProductionOrderNr, new { @class = "form-control", placeholder = "...", autocomplete = "off" })
|
<button class="form-control cursor-pointer text-start text-decoration-none position-relative"
|
||||||
|
data-bs-toggle="dropdown" aria-expanded="false" data-bs-auto-close="outside">
|
||||||
|
@if (Model.StandardRequirement != null)
|
||||||
|
{
|
||||||
|
<span class="text-decoration-none">@Model.ProductionOrderNr</span>
|
||||||
|
}
|
||||||
|
<i class="bi bi-chevron-expand ms-3" style="position: absolute; right: 15px; top: 30%; "></i>
|
||||||
|
</button>
|
||||||
@Html.LabelFor(x => x.ProductionOrderNr)
|
@Html.LabelFor(x => x.ProductionOrderNr)
|
||||||
@Html.PopoverFor(x => x.ProductionOrderNr)
|
|
||||||
@Html.ValidationMessageFor(x => x.ProductionOrderNr, null, new { @class = "small text-danger" })
|
@Html.ValidationMessageFor(x => x.ProductionOrderNr, null, new { @class = "small text-danger" })
|
||||||
|
<div class="dropdown-menu w-100 mt-1 p-2" id="ponr_menu">
|
||||||
|
<input class="form-control mb-3" value="@Model.ProductionOrderNr" id="ProductionOrderIn" placeholder="prod-ordernr. | auftrag/pos. | identnr." />
|
||||||
|
<ul id="ProductionOrders" style="max-height: 300px;" class="m-0 ps-0 pe-2 py-2 overflow-auto"></ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-floating mb-3">
|
<div class="form-floating mb-3">
|
||||||
@Html.TextBoxFor(x => x.PcbId, new { @class = "form-control", placeholder = "...", autocomplete = "off" })
|
@Html.TextBoxFor(x => x.PcbId, new { @class = "form-control", placeholder = "...", autocomplete = "off" })
|
||||||
|
|||||||
@@ -14,9 +14,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("Version")</th>
|
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("Version")</th>
|
||||||
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("Standard version")</th>
|
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("Standard")</th>
|
||||||
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("Fertigungsauftragnr.")</th>
|
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("Key")</th>
|
||||||
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("PcbId")</th>
|
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("Region")</th>
|
||||||
|
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("Meter size")</th>
|
||||||
|
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("Prod-orderno.")</th>
|
||||||
|
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("Pcb Id")</th>
|
||||||
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("Is Active")</th>
|
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("Is Active")</th>
|
||||||
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("FW Version")</th>
|
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("FW Version")</th>
|
||||||
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("LUT Vesion")</th>
|
<th class="text-nowrap text-smallcaps small p-2">@Html.DisplayName("LUT Vesion")</th>
|
||||||
@@ -58,42 +61,89 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
@section scripts {
|
@section scripts {
|
||||||
<script>
|
<script>
|
||||||
function createRequirement() {
|
|
||||||
fetch(`@this.Url.Action("Create", "SpecialRequirements")`)
|
|
||||||
.then(response => response.text())
|
|
||||||
.then(function handleContent(text) {
|
|
||||||
let modal = document.getElementById('modal');
|
|
||||||
|
|
||||||
let content = modal.querySelector('.modal-content');
|
function loadStandardRequirements(ul) {
|
||||||
content.innerHTML = text;
|
fetch(`@this.Url.Action("Standards", "SpecialRequirements")`)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(function handleStandards(text) {
|
||||||
|
ul.innerHTML = text;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
let trigger = document.getElementById('modal_toggler');
|
function loadModalContent(text, show) {
|
||||||
trigger.click();
|
let modal = document.getElementById('modal');
|
||||||
|
|
||||||
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
|
let content = modal.querySelector('.modal-content');
|
||||||
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
|
content.innerHTML = text;
|
||||||
return new bootstrap.Popover(popoverTriggerEl)
|
|
||||||
|
let form = content.querySelector('form');
|
||||||
|
form.onsubmit = submitCreateSpecialRequirement;
|
||||||
|
|
||||||
|
let standardsUL = form.querySelector('#StandardRequirements');
|
||||||
|
loadStandardRequirements(standardsUL);
|
||||||
|
|
||||||
|
let productionOrderIn = form.querySelector('#ProductionOrderIn');
|
||||||
|
productionOrderIn.oninput = function autocompleteProductionOrders(e) {
|
||||||
|
const value = `${e.target.value}`;
|
||||||
|
let productionOrdersUL = form.querySelector('#ProductionOrders');
|
||||||
|
if (value && value.length >= 3) {
|
||||||
|
fetch(`@this.Url.Action("ProductionOrders", "SpecialRequirements")/${value}`)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(text => {
|
||||||
|
productionOrdersUL.innerHTML = text;
|
||||||
});
|
});
|
||||||
});
|
} else {
|
||||||
|
productionOrdersUL.innerHTML = '';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (show) {
|
||||||
|
let trigger = document.getElementById('modal_toggler');
|
||||||
|
trigger.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateStandard(li) {
|
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
|
||||||
const id = li.id;
|
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
|
||||||
fetch(`@this.Url.Action("Create", "SpecialRequirements")/${id}`)
|
return new bootstrap.Popover(popoverTriggerEl)
|
||||||
.then(response => response.text())
|
});
|
||||||
.then(function handleContent(text) {
|
}
|
||||||
let modal = document.getElementById('modal');
|
|
||||||
|
|
||||||
let content = modal.querySelector('.modal-content');
|
function updatePO(ponr, key) {
|
||||||
content.innerHTML = text;
|
let ponrMenu = document.getElementById('ponr_menu');
|
||||||
|
ponrMenu.classList.remove('show');
|
||||||
|
let ponrin = document.getElementById('ProductionOrderNr');
|
||||||
|
ponrin.value = ponr;
|
||||||
|
let keyin = document.getElementById('Key');
|
||||||
|
keyin.value = key;
|
||||||
|
|
||||||
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
|
fetch(`@this.Url.Action("UpdatePO", "SpecialRequirements")`, { method: 'POST', body: new FormData(e.target) })
|
||||||
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
|
.then(response => response.text())
|
||||||
return new bootstrap.Popover(popoverTriggerEl)
|
.then(text => loadModalContent(text, false));
|
||||||
});
|
}
|
||||||
});
|
|
||||||
}
|
function submitCreateSpecialRequirement(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
|
console.log(e);
|
||||||
|
|
||||||
|
fetch(`@this.Url.Action("Create", "SpecialRequirements")`, { method: 'POST', body: new FormData(e.target) })
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(text => loadModalContent(text, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
function createRequirement() {
|
||||||
|
fetch(`@this.Url.Action("Create", "SpecialRequirements")`)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(text => loadModalContent(text, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateStandard(id, nr) {
|
||||||
|
fetch(`@this.Url.Action("Create", "SpecialRequirements")/${id}/${nr}`)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(text => loadModalContent(text, false));
|
||||||
|
}
|
||||||
|
|
||||||
@*function reloadStandardRequirementRow(id) {
|
@*function reloadStandardRequirementRow(id) {
|
||||||
if (id) {
|
if (id) {
|
||||||
@@ -108,39 +158,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitStandardRequirement(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
|
|
||||||
fetch(`@this.Url.Action("Update", "StandardRequirements")`, { method: 'POST', body: new FormData(e.target) })
|
|
||||||
.then(function responseHandler(response) {
|
|
||||||
const text = response.text();
|
|
||||||
|
|
||||||
return text;
|
|
||||||
})
|
|
||||||
.then(function contentHandler(text) {
|
|
||||||
console.log(text);
|
|
||||||
|
|
||||||
let modal = document.getElementById('modal');
|
|
||||||
|
|
||||||
let content = modal.querySelector('.modal-content');
|
|
||||||
content.innerHTML = text;
|
|
||||||
|
|
||||||
let form = content.querySelector('form');
|
|
||||||
form.onsubmit = submitStandardRequirement;
|
|
||||||
|
|
||||||
let inputId = form.querySelector('input[name=@nameof(LaaProduction.Data.Cordonel.Models.CordonelStandardRequirement.Id)]');
|
|
||||||
if (inputId) {
|
|
||||||
reloadStandardRequirementRow(inputId.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
|
|
||||||
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
|
|
||||||
return new bootstrap.Popover(popoverTriggerEl)
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function loadStandardRequirement(id) {
|
function loadStandardRequirement(id) {
|
||||||
fetch(`@this.Url.Action("Update", "StandardRequirements")/${id}`)
|
fetch(`@this.Url.Action("Update", "StandardRequirements")/${id}`)
|
||||||
.then(response => response.text())
|
.then(response => response.text())
|
||||||
@@ -182,5 +199,5 @@
|
|||||||
});
|
});
|
||||||
}*@
|
}*@
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
@model List<LaaProduction.Data.Cordonel.Models.CordonelProductionOrder>
|
||||||
|
|
||||||
|
@if (Model != null)
|
||||||
|
{
|
||||||
|
foreach (var po in Model)
|
||||||
|
{
|
||||||
|
<li class="dropdown-item small standard container-fluid card card-body mb-2 p-2 position-relative" onclick="updatePO('@po.FertigungsauftragNr', '@po.Key');">
|
||||||
|
<span class="li-card-header">@po.FertigungsauftragNr</span>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<div class="smaller">Auftragnr/Pos</div>
|
||||||
|
<div class="small">@po.AuftragNr/@po.PositionNr</div>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<div class="smaller">Identnr.</div>
|
||||||
|
<div class="small">@po.IdentNr</div>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<div class="smaller">Region</div>
|
||||||
|
<div class="small">@po.Region - @po.Size (@po.Key)</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
@foreach (var requirement in Model)
|
@foreach (var requirement in Model)
|
||||||
{
|
{
|
||||||
<li class="dropdown-item small standard container-fluid" id="@requirement.Id" onclick="updateStandard(this)">
|
<li class="dropdown-item small standard container-fluid" onclick="updateStandard('@requirement.Id', '@requirement.Nr')">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="text-smallcaps fw-bold col-5 text-start">@requirement.Region</div>
|
<div class="text-smallcaps fw-bold col-5 text-start">@requirement.Region</div>
|
||||||
<div class="text-smallcaps fw-bold col-3 text-start">@requirement.MeterSize</div>
|
<div class="text-smallcaps fw-bold col-3 text-start">@requirement.MeterSize</div>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
@model LaaProduction.Data.Cordonel.Models.CordonelSpecialRequirement
|
||||||
|
|
||||||
|
<th class="text-nowrap small p-2">@($"{Model.Id}.{Model.Nr}")</th>
|
||||||
|
<td class="text-nowrap small p-2">@($"{Model.StandardId}.{Model.StandardNr}")</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.Key</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.Region</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.MeterSize</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.ProductionOrderNr</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.PcbId</td>
|
||||||
|
|
||||||
|
<td class="text-nowrap small p-2 text-center">
|
||||||
|
@if (Model.IsActive)
|
||||||
|
{
|
||||||
|
<i class="bi bi-bold bi-check text-success"></i>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<i class="bi bi-bold bi-x text-danger"></i>
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="text-nowrap small p-2">@Model.FwVersion</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.LutVersion</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.RequiredLifeTimeYearsAssembly</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.RequiredLifeTimeYearsShipping</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.MaxDrainedBatteryLoadPercentAssembly</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.MaxDrainedBatteryLoadPercentShipping</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.MaxStorageMonths</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.MaxStorageMonthsBigOrders</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.Timestamp.ToString("dd-MM-yyyy HH:mm")</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.CreatedBy</td>
|
||||||
|
<td class="text-nowrap small p-2">@Model.Comment</td>
|
||||||
@@ -1,74 +1,58 @@
|
|||||||
namespace RoutesBuilder
|
namespace RoutesBuilder
|
||||||
{
|
{
|
||||||
using LaaProductionWeb;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Web.Http;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
|
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
const string PROJECT = "LaaProductionWeb";
|
public static void Main()
|
||||||
|
|
||||||
public static void Main(params string[] args)
|
|
||||||
{
|
{
|
||||||
if (args is null || args.Length != 3)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var ns = args[0];
|
|
||||||
var cs = args[1];
|
|
||||||
var location = args[2];
|
|
||||||
|
|
||||||
var prefixes = new StringBuilder();
|
var prefixes = new StringBuilder();
|
||||||
prefixes.AppendLine($"namespace {ns}");
|
|
||||||
|
var solutionDirectory = new DirectoryInfo(@"..\..\..\").FullName;
|
||||||
|
var laaProductionWeb = Path.Combine(solutionDirectory, @"LaaProductionWeb\LaaProductionWeb");
|
||||||
|
var appInfrastructure = Path.Combine(laaProductionWeb, "App_Infrastructure");
|
||||||
|
var apiControllers = new DirectoryInfo(Path.Combine(laaProductionWeb, "API"));
|
||||||
|
var controllers = apiControllers
|
||||||
|
.GetFiles("*Controller.cs", SearchOption.AllDirectories)
|
||||||
|
.Select(x => x.FullName);
|
||||||
|
|
||||||
|
prefixes.AppendLine($"namespace LaaProductionWeb.App_Infrastructure");
|
||||||
prefixes.AppendLine("{");
|
prefixes.AppendLine("{");
|
||||||
prefixes.AppendLine($"\tpublic class {cs}");
|
prefixes.AppendLine($"\tpublic class RoutePrefixes");
|
||||||
prefixes.AppendLine("\t{");
|
prefixes.AppendLine("\t{");
|
||||||
prefixes.AppendLine("\t\tprivate static readonly string BaseURL = Appsettings.APIURL.TrimEnd('/');");
|
prefixes.AppendLine("\t\tprivate static readonly string BaseURL = Appsettings.APIURL.TrimEnd('/');");
|
||||||
|
|
||||||
try
|
foreach (var controllerFile in controllers)
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(location);
|
var @namespace = File.ReadLines(controllerFile).FirstOrDefault();
|
||||||
}
|
@namespace = @namespace
|
||||||
catch (Exception e)
|
.Replace(nameof(@namespace), string.Empty)
|
||||||
{
|
|
||||||
Console.WriteLine(location);
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
|
|
||||||
var controllers = typeof(WebApiApplication)
|
|
||||||
.Assembly
|
|
||||||
.GetTypes()
|
|
||||||
.Where(x => !x.IsAbstract && typeof(ApiController).IsAssignableFrom(x))
|
|
||||||
.OrderBy(x => x.Namespace)
|
|
||||||
.ThenBy(x => x.Name);
|
|
||||||
|
|
||||||
foreach (var controller in controllers)
|
|
||||||
{
|
|
||||||
var @namespace = controller
|
|
||||||
.Namespace
|
|
||||||
.Replace("LaaProductionWeb", string.Empty)
|
.Replace("LaaProductionWeb", string.Empty)
|
||||||
|
.Trim();
|
||||||
|
var controllerName = Path
|
||||||
|
.GetFileNameWithoutExtension(controllerFile)
|
||||||
|
.Replace("Controller", string.Empty)
|
||||||
|
.Trim();
|
||||||
|
var route = $"{@namespace}.{controllerName}"
|
||||||
|
.Trim()
|
||||||
.Trim('.');
|
.Trim('.');
|
||||||
var name = controller
|
var routeName = route
|
||||||
.Name
|
.Replace('.', '_')
|
||||||
.Replace(nameof(Controller), string.Empty);
|
.ToUpper();
|
||||||
|
var routePrefix = route
|
||||||
var constName = string.Join("_", @namespace.Replace(".", "_").ToUpper(), name.ToUpper());
|
.Replace('.', '/')
|
||||||
var constValue = string.Join("/", @namespace.Replace(".", "/").ToLower(), name.ToLower());
|
.ToLower();
|
||||||
|
|
||||||
prefixes.AppendLine();
|
prefixes.AppendLine();
|
||||||
prefixes.AppendLine($"\t\tpublic const string {constName} = \"{constValue}\";");
|
prefixes.AppendLine($"\t\tpublic const string {routeName} = \"{routePrefix}\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
prefixes.AppendLine("\t}");
|
prefixes.AppendLine("\t}");
|
||||||
prefixes.AppendLine("}");
|
prefixes.AppendLine("}");
|
||||||
|
|
||||||
File.WriteAllText(Path.Combine(location, $"{cs}.cs"), prefixes.ToString());
|
File.WriteAllText(Path.Combine(appInfrastructure, $"RoutePrefixes.cs"), prefixes.ToString());
|
||||||
Console.WriteLine(prefixes);
|
Console.WriteLine(prefixes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,96 +37,10 @@
|
|||||||
<StartupObject />
|
<StartupObject />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.Web.Infrastructure, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.2.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Newtonsoft.Json.Bson, Version=1.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Newtonsoft.Json.Bson.1.0.3-beta1\lib\net45\Newtonsoft.Json.Bson.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Net.Http.Formatting, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.6.0.0\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Numerics" />
|
<Reference Include="System.Numerics" />
|
||||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Runtime.4.3.1\lib\net462\System.Runtime.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.3.0\lib\net45\System.Web.Helpers.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Web.Http, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.3.0\lib\net45\System.Web.Http.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Web.Http.WebHost, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.3.0\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Web.Mvc, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.3.0\lib\net45\System.Web.Mvc.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.3.0\lib\net45\System.Web.Razor.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.3.0\lib\net45\System.Web.WebPages.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.3.0\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.3.0\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
@@ -139,13 +53,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="app.config" />
|
<None Include="app.config" />
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\LaaProductionWeb\LaaProductionWeb.csproj">
|
|
||||||
<Project>{dbbfba08-138c-4115-85f6-fe6da4e190ac}</Project>
|
|
||||||
<Name>LaaProductionWeb</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,51 +1,51 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1"/></startup>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" /></startup>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral"/>
|
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral"/>
|
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.3.0.0" newVersion="5.3.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-5.3.0.0" newVersion="5.3.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Web.Infrastructure" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
<assemblyIdentity name="Microsoft.Web.Infrastructure" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930"/>
|
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral"/>
|
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2"/>
|
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="Microsoft.AspNet.Mvc" version="5.3.0" targetFramework="net48" />
|
|
||||||
<package id="Microsoft.AspNet.Razor" version="3.3.0" targetFramework="net48" />
|
|
||||||
<package id="Microsoft.AspNet.WebApi" version="5.3.0" targetFramework="net48" />
|
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net48" />
|
|
||||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.3.0" targetFramework="net48" />
|
|
||||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.3.0" targetFramework="net48" />
|
|
||||||
<package id="Microsoft.AspNet.WebPages" version="3.3.0" targetFramework="net48" />
|
|
||||||
<package id="Microsoft.Web.Infrastructure" version="2.0.0" targetFramework="net48" />
|
|
||||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
|
||||||
<package id="Newtonsoft.Json.Bson" version="1.0.3-beta1" targetFramework="net48" />
|
|
||||||
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
|
|
||||||
<package id="System.IO" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
|
|
||||||
<package id="System.Net.Http" version="4.3.4" targetFramework="net48" />
|
|
||||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
|
|
||||||
<package id="System.Runtime" version="4.3.1" targetFramework="net48" />
|
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
|
|
||||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net48" />
|
|
||||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net48" />
|
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
|
|
||||||
</packages>
|
|
||||||
@@ -198,6 +198,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GenesisStatus", "GenesisSta
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GenesisStatus", "..\Common\Hardware\WaterMeter\Genesis\GenesisStatus\GenesisStatus.csproj", "{0F646872-D8DC-4EE5-989F-D4C73F0ACE3F}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GenesisStatus", "..\Common\Hardware\WaterMeter\Genesis\GenesisStatus\GenesisStatus.csproj", "{0F646872-D8DC-4EE5-989F-D4C73F0ACE3F}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Service", "Service", "{7C0CC530-F1C6-4906-873C-D94041F4D4A2}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeterProcessState", "..\Common\Service\MeterProcessState\MeterProcessState.csproj", "{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||||
..\Common\Utils\FileIoShared\FileIoShared.projitems*{200f4f65-47df-47c6-876f-e91c48799aff}*SharedItemsImports = 13
|
..\Common\Utils\FileIoShared\FileIoShared.projitems*{200f4f65-47df-47c6-876f-e91c48799aff}*SharedItemsImports = 13
|
||||||
@@ -1669,6 +1673,48 @@ Global
|
|||||||
{0F646872-D8DC-4EE5-989F-D4C73F0ACE3F}.XP32bit|x64.Build.0 = Release|Any CPU
|
{0F646872-D8DC-4EE5-989F-D4C73F0ACE3F}.XP32bit|x64.Build.0 = Release|Any CPU
|
||||||
{0F646872-D8DC-4EE5-989F-D4C73F0ACE3F}.XP32bit|x86.ActiveCfg = Release|Any CPU
|
{0F646872-D8DC-4EE5-989F-D4C73F0ACE3F}.XP32bit|x86.ActiveCfg = Release|Any CPU
|
||||||
{0F646872-D8DC-4EE5-989F-D4C73F0ACE3F}.XP32bit|x86.Build.0 = Release|Any CPU
|
{0F646872-D8DC-4EE5-989F-D4C73F0ACE3F}.XP32bit|x86.Build.0 = Release|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}._MANUAL_CONTROL|Any CPU.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}._MANUAL_CONTROL|x64.ActiveCfg = _MANUAL_CONTROL|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}._MANUAL_CONTROL|x64.Build.0 = _MANUAL_CONTROL|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}._MANUAL_CONTROL|x86.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}._MANUAL_CONTROL|x86.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.COM|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.COM|Any CPU.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.COM|x64.ActiveCfg = _MANUAL_CONTROL|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.COM|x64.Build.0 = _MANUAL_CONTROL|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.COM|x86.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.COM|x86.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.PerformTest|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.PerformTest|Any CPU.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.PerformTest|x64.ActiveCfg = _MANUAL_CONTROL|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.PerformTest|x64.Build.0 = _MANUAL_CONTROL|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.PerformTest|x86.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.PerformTest|x86.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.Release|x64.Build.0 = Release|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.ReleaseTest|x64.ActiveCfg = Release|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.ReleaseTest|x64.Build.0 = Release|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.ReleaseTest|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.ReleaseTest|x86.Build.0 = Release|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|Any CPU.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|x64.ActiveCfg = _MANUAL_CONTROL|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|x64.Build.0 = _MANUAL_CONTROL|x64
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|x86.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|x86.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -1760,6 +1806,8 @@ Global
|
|||||||
{8BDD2789-96D4-43EA-AAD7-0F49D0347998} = {D3C60972-33C8-41DE-AB17-6CA6F02FBD7A}
|
{8BDD2789-96D4-43EA-AAD7-0F49D0347998} = {D3C60972-33C8-41DE-AB17-6CA6F02FBD7A}
|
||||||
{1B2609F4-4440-4EB5-AB2B-E3F0B77F59DF} = {C2DC6B5F-DB49-49D8-86D6-B72B5586C167}
|
{1B2609F4-4440-4EB5-AB2B-E3F0B77F59DF} = {C2DC6B5F-DB49-49D8-86D6-B72B5586C167}
|
||||||
{0F646872-D8DC-4EE5-989F-D4C73F0ACE3F} = {1B2609F4-4440-4EB5-AB2B-E3F0B77F59DF}
|
{0F646872-D8DC-4EE5-989F-D4C73F0ACE3F} = {1B2609F4-4440-4EB5-AB2B-E3F0B77F59DF}
|
||||||
|
{7C0CC530-F1C6-4906-873C-D94041F4D4A2} = {C28B184B-7AE7-4FDC-A9DE-2B9B6577384F}
|
||||||
|
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A} = {7C0CC530-F1C6-4906-873C-D94041F4D4A2}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {A3EA9D1C-40DE-43F8-9EC8-7657B0D78A00}
|
SolutionGuid = {A3EA9D1C-40DE-43F8-9EC8-7657B0D78A00}
|
||||||
|
|||||||
@@ -4564,8 +4564,10 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
|||||||
InfoProcessActive(lblLutFileCheck, Resources.StrLutFileRestoreActive, false);
|
InfoProcessActive(lblLutFileCheck, Resources.StrLutFileRestoreActive, false);
|
||||||
|
|
||||||
//1. If InstalledFwVersion is below 1.2.xxx a LUT file is NOT required
|
//1. If InstalledFwVersion is below 1.2.xxx a LUT file is NOT required
|
||||||
if ((_currentGenesis.Region == "EMEA" && _currentGenesis.InstalledFwVersion < MeterLutUpdate.EmeaFwThresholdForLutFile) ||
|
if ((_currentGenesis.Region == "EMEA"
|
||||||
(_currentGenesis.Region == "NA" && _currentGenesis.InstalledFwVersion < MeterLutUpdate.NaFwThresholdForLutFile))
|
&& _currentGenesis.InstalledFwVersion < MeterLutUpdate.EmeaFwThresholdForLutFile) ||
|
||||||
|
(_currentGenesis.Region == "NA"
|
||||||
|
&& _currentGenesis.InstalledFwVersion < MeterLutUpdate.NaFwThresholdForLutFile))
|
||||||
{
|
{
|
||||||
InfoProcessSuccess(lblLutFileCheck, Resources.StrLutFileNotNeeded);
|
InfoProcessSuccess(lblLutFileCheck, Resources.StrLutFileNotNeeded);
|
||||||
_processState = successExitState;
|
_processState = successExitState;
|
||||||
@@ -4573,8 +4575,10 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2. LUT file is needed but invalid indicated by CRC or cannot be observed in file list
|
// 2. LUT file is needed but invalid indicated by CRC or cannot be observed in file list
|
||||||
if ((!string.IsNullOrEmpty(_currentGenesis.LutCrc) && _currentGenesis.LutCrc.Contains(MeterLutFile.StrLutFileInvalidCrc))
|
if ( (!string.IsNullOrEmpty(_currentGenesis.LutCrc)
|
||||||
|| (_readMeterFiles != null && !_readMeterFiles.Any(f => f.Contains(MeterLutFile.StrLutMeterFileName))))
|
&& _currentGenesis.LutCrc.Contains(MeterLutFile.StrLutFileInvalidCrc))
|
||||||
|
|| (_readMeterFiles != null
|
||||||
|
&& !_readMeterFiles.Any(f => f.Contains(MeterLutFile.StrLutMeterFileName))))
|
||||||
{
|
{
|
||||||
InfoProcessFailed(lblLutFileCheck, Resources.StrLutFileNotInstalled);
|
InfoProcessFailed(lblLutFileCheck, Resources.StrLutFileNotInstalled);
|
||||||
_processState = errorExitState;
|
_processState = errorExitState;
|
||||||
|
|||||||
Reference in New Issue
Block a user