Initial commit: JDE Scoping Tool migration project
Set up repository with legacy .NET Framework 4.8 source (OLD/), new .NET 10 Blazor solution (NEW/), OpenSpec specifications, documentation, and project configuration.
This commit is contained in:
Executable
+36
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Dapper;
|
||||
using DataModel.Helpers;
|
||||
using DataModel.Models;
|
||||
|
||||
namespace DataModel.Process
|
||||
{
|
||||
/// <summary>
|
||||
/// Status codes tracking functionality for JDE interface
|
||||
/// </summary>
|
||||
public partial class JDE
|
||||
{
|
||||
/// <summary>
|
||||
/// Fetches updated status codes
|
||||
/// </summary>
|
||||
/// <param name="lastUpdateDT">Timestamp of last updated record already imported</param>
|
||||
/// <returns>Streaming updated status codes</returns>
|
||||
public static IEnumerable<StatusCode> GetStatusCodes(DateTime? lastUpdateDT = null)
|
||||
{
|
||||
using (DDTek.Oracle.OracleConnection connection = new DDTek.Oracle.OracleConnection(Config.GIWCS))
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
var results = lastUpdateDT.HasValue ?
|
||||
connection.Query<StatusCode>(queries["SQL_GET_STATUS_CODES_FILTERED"], new { dateUpdated = lastUpdateDT.Value.Date, timeUpdated = lastUpdateDT.Value.ToJDETime() }, buffered: false, commandTimeout: Config.QueryTimeout) :
|
||||
connection.Query<StatusCode>(queries["SQL_GET_STATUS_CODES"], buffered: false, commandTimeout: Config.QueryTimeout);
|
||||
|
||||
foreach (var result in results)
|
||||
{
|
||||
yield return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user