From 8e881058f75c400ffb7ec418635ccce53aaad204 Mon Sep 17 00:00:00 2001 From: zhangzhuo <512464164@qq.com> Date: Mon, 17 Mar 2025 02:52:27 +0800 Subject: [PATCH] 123 --- Seyounth.Hyosung.Data/ServiceExtensions.cs | 22 +++++++++---------- .../Services/Hyosung/HyosungWmsService.cs | 2 ++ .../Views/Pages/HomeViewPage.xaml | 2 +- .../Views/Pages/HomeViewPage.xaml.cs | 5 ++++- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/Seyounth.Hyosung.Data/ServiceExtensions.cs b/Seyounth.Hyosung.Data/ServiceExtensions.cs index c8c2cc1..413c45f 100644 --- a/Seyounth.Hyosung.Data/ServiceExtensions.cs +++ b/Seyounth.Hyosung.Data/ServiceExtensions.cs @@ -16,7 +16,7 @@ public static class ServiceExtensions var connectionString = configuration.GetConnectionString("DefaultConnection"); services.AddSingleton(s => { -#if RELEASE +//#if RELEASE SqlSugarScope sqlSugar = new SqlSugarScope(new ConnectionConfig() { DbType = DbType.SqlServer, @@ -24,16 +24,16 @@ public static class ServiceExtensions IsAutoCloseConnection = true, } ); -#elif DEBUG - SqlSugarScope sqlSugar = new SqlSugarScope(new ConnectionConfig() - { - DbType = DbType.Sqlite, - ConnectionString = "Data Source=hyosung.db", - IsAutoCloseConnection = true, - InitKeyType = InitKeyType.Attribute - } - ); -#endif +//#elif DEBUG + //SqlSugarScope sqlSugar = new SqlSugarScope(new ConnectionConfig() + // { + // DbType = DbType.Sqlite, + // ConnectionString = "Data Source=hyosung.db", + // IsAutoCloseConnection = true, + // InitKeyType = InitKeyType.Attribute + // } + //); +//#endif return sqlSugar; }); services.AddScoped(typeof(IRepository<>), typeof(Repository<>)); diff --git a/Seyounth.Hyosung.Data/Services/Hyosung/HyosungWmsService.cs b/Seyounth.Hyosung.Data/Services/Hyosung/HyosungWmsService.cs index 3774b92..75bf340 100644 --- a/Seyounth.Hyosung.Data/Services/Hyosung/HyosungWmsService.cs +++ b/Seyounth.Hyosung.Data/Services/Hyosung/HyosungWmsService.cs @@ -16,6 +16,8 @@ public class HyosungWmsService : IHyosungWmsService public async Task GetControlNo(Variety variety, string grade) { + if (grade == "AA") + grade = "1"; var checkCode = $"02025{grade}{variety.Lot.ToString().Substring(1, 3)}"; var x = await _db.Queryable().Where(x => x.BeId == "2240" && x.ItemCode == variety.Code && x.CheckCode == checkCode).FirstAsync(); diff --git a/Seyounth.Hyosung/Views/Pages/HomeViewPage.xaml b/Seyounth.Hyosung/Views/Pages/HomeViewPage.xaml index b80be84..51a90f1 100644 --- a/Seyounth.Hyosung/Views/Pages/HomeViewPage.xaml +++ b/Seyounth.Hyosung/Views/Pages/HomeViewPage.xaml @@ -182,7 +182,7 @@ - +