quickfixes for FAI DN 50
This commit is contained in:
@@ -176,13 +176,15 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
query.AppendLine(" apsn.PositionNr, ");
|
||||
query.AppendLine(" apsn.SerienNr, ");
|
||||
query.AppendLine(" pg.PruefgangNr, ");
|
||||
query.AppendLine(" pg.PruefstationNr, ");
|
||||
query.AppendLine(" pg.Datum, ");
|
||||
|
||||
query.AppendLine(" pg.Pruefzeit, ");
|
||||
|
||||
query.AppendLine(" apsn.Wiederholungen, ");
|
||||
query.AppendLine(" apsn.Einbauplatz, ");
|
||||
query.AppendLine(" pg.Nennweite, ");
|
||||
|
||||
query.AppendLine(" idt.Baulaenge, ");
|
||||
|
||||
|
||||
|
||||
query.AppendLine(" PP1_Soll,PP1_Ist,PP1_Ist_V, ");
|
||||
@@ -206,6 +208,16 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
query.AppendLine(" PP10_Soll,PP10_Ist,PP10_Ist_V, ");
|
||||
query.AppendLine(" pf.PP10_Fehler ");
|
||||
|
||||
|
||||
for (int p = 1; p <= 3; p++)
|
||||
{
|
||||
for (int f = 1; f <= 10 ; f++)
|
||||
{
|
||||
query.AppendLine($",pf{p}.PP{f}_Fehler");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
query.AppendLine(" from [Auftrag].[dbo].[AuftragPositionSerienNr] apsn ");
|
||||
query.AppendLine(" inner join [Auftrag].[dbo].[AuftragPosition_Gesamt] apg on apg.AuftragNr = apsn.AuftragNr and apg.PositionNr = apsn.PositionNr and apg.Ort = 'L2' ");
|
||||
|
||||
@@ -213,6 +225,13 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
|
||||
query.AppendLine(" inner join [Auftrag].[dbo].Prueffehler pf on pg.[Pruefgangnr] = pf.PruefgangNr and pf.SerienNr = apsn.SerienNr ");
|
||||
|
||||
query.AppendLine(" left join [Auftrag].[dbo].PrueffehlerGenesisPfade pf1 on pg.[Pruefgangnr] = pf.PruefgangNr and pf.SerienNr = apsn.SerienNr and pf1.[Pfad] = 1 ");
|
||||
|
||||
query.AppendLine(" left join [Auftrag].[dbo].PrueffehlerGenesisPfade pf2 on pg.[Pruefgangnr] = pf.PruefgangNr and pf.SerienNr = apsn.SerienNr and pf2.[Pfad] = 2 ");
|
||||
|
||||
query.AppendLine(" left join [Auftrag].[dbo].PrueffehlerGenesisPfade pf3 on pg.[Pruefgangnr] = pf.PruefgangNr and pf.SerienNr = apsn.SerienNr and pf3.[Pfad] = 3 ");
|
||||
|
||||
query.AppendLine(" left outer join Identnr idt on idt.IdentNr = apg.Identnr ");
|
||||
|
||||
query.AppendLine(" where apsn.SerienNr in ( ");
|
||||
query.AppendLine(" SELECT ");
|
||||
@@ -227,7 +246,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
query.AppendLine(" group by [MapPcbIdToSerialNumber_SerialNumber] ");
|
||||
query.AppendLine(" having Count(*) < 5) ");
|
||||
query.AppendLine(" ");
|
||||
query.AppendLine(" and PP3_Fehler is not null ");
|
||||
query.AppendLine(" and pf.PP3_Fehler is not null ");
|
||||
query.AppendLine(" ");
|
||||
query.AppendLine(" order by apsn.SerienNr desc, apsn.Wiederholungen asc ");
|
||||
|
||||
@@ -238,7 +257,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
var sb = new StringBuilder();
|
||||
|
||||
|
||||
sb.Append("AuftragNr;PositionNr;SerienNr;PruefgangNr;Datum;Wiederholungen;Einbauplatz;Nennweite;");
|
||||
sb.Append("AuftragNr;PositionNr;SerienNr;PruefgangNr;PruefstationNr;Datum;Pruefzeit;Wiederholungen;Einbauplatz;Nennweite;Baulaenge");
|
||||
|
||||
|
||||
|
||||
@@ -246,6 +265,17 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
{
|
||||
sb.Append($"PP{i}_Soll [m3/h];PP{i}_Ist[m3/h];PP{i}_Ist_V[l];PP{i}_Fehler[%];");
|
||||
}
|
||||
|
||||
|
||||
for (int p = 1; p <= 3; p++)
|
||||
{
|
||||
for (int f = 1; f <= 10; f++)
|
||||
{
|
||||
query.AppendLine($",PP{f}_Fehler");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sb.AppendLine();
|
||||
foreach (var item in dt.Select())
|
||||
{
|
||||
|
||||
@@ -853,7 +853,7 @@ namespace Service.MeterProcessState.Controllers
|
||||
|
||||
dt = dataAccess.ExecuteQuery(sb.ToString());
|
||||
|
||||
if (dt.Rows.Count == 1 )
|
||||
if (dt.Rows.Count == 0 )
|
||||
{
|
||||
var stat = new GenesisStatus
|
||||
{
|
||||
@@ -882,10 +882,10 @@ namespace Service.MeterProcessState.Controllers
|
||||
ret.SkipRadioParametersCheck = (Boolean)item["SkipRadioParametersCheck"];
|
||||
ret.OverrideFwCheck = (int)item["OverrideFwCheck"];
|
||||
ret.OverrideLutCheck = (int)item["OverrideLutCheck"];
|
||||
ret.RequiredLifeTimeYearsAssembly = (Double)item["RequiredLifeTimeYearsAssembly"];
|
||||
ret.RequiredLifeTimeYearsShipping = (Double)item["RequiredLifeTimeYearsShipping"];
|
||||
ret.MaxDrainedBatteryLoadPercent = (Double)item["MaxDrainedBatteryLoadPercent"];
|
||||
ret.KitronProductionDate = (DateTime)item["KitronProductionDate"];
|
||||
//ret.RequiredLifeTimeYearsAssembly = (Double)item["RequiredLifeTimeYearsAssembly"];
|
||||
//ret.RequiredLifeTimeYearsShipping = (Double)item["RequiredLifeTimeYearsShipping"];
|
||||
//ret.MaxDrainedBatteryLoadPercent = (Double)item["MaxDrainedBatteryLoadPercent"];
|
||||
//ret.KitronProductionDate = (DateTime)item["KitronProductionDate"];
|
||||
var maxStorageMonths = (Int32)item["MaxStorageMonths"];
|
||||
ret.ProductionDueDate = ret.KitronProductionDate + TimeSpan.FromDays(30.0 * maxStorageMonths);
|
||||
ret.ApprovalDate = (DateTime)item["ApprovalDate"];
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
using Xylem.Common.Logic.ServiceCore;
|
||||
|
||||
|
||||
namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
{
|
||||
[RoutePrefix("api/PushData")]
|
||||
public class PushDataController : ApiController
|
||||
{
|
||||
public static class GlobalConfig
|
||||
{
|
||||
public static Lazy<String> connectionString = new Lazy<String>(()
|
||||
=>
|
||||
System.Configuration.ConfigurationManager.ConnectionStrings["default"].ConnectionString
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Route("SetOrderisFinish")]
|
||||
public async Task<HttpResponseMessage> SetOrderisFinish(int Auftrag, int Pos)
|
||||
{
|
||||
try
|
||||
{
|
||||
throw new NotImplementedException("TODO Roland");
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Request.CreateResponse(HttpStatusCode.InternalServerError, ex.ToString() + "<br >" + ex.InnerException.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -221,6 +221,7 @@
|
||||
<Compile Include="Areas\HelpPage\SampleGeneration\SampleDirection.cs" />
|
||||
<Compile Include="Areas\HelpPage\SampleGeneration\TextSample.cs" />
|
||||
<Compile Include="Areas\HelpPage\XmlDocumentationProvider.cs" />
|
||||
<Compile Include="Controllers\PushControler.cs" />
|
||||
<Compile Include="Controllers\FinalCheckController.cs" />
|
||||
<Compile Include="Controllers\FileUpToDateController.cs" />
|
||||
<Compile Include="Controllers\LUTController.cs" />
|
||||
|
||||
Reference in New Issue
Block a user