From debfb742b27f7a5e668e6cd3f52db2ee8ddfe815 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期一, 13 四月 2026 10:08:35 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBill_TKController.cs | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBill_TKController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBill_TKController.cs"
index 92cbdfb..a5ed2d6 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBill_TKController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBill_TKController.cs"
@@ -243,7 +243,20 @@
LogService.Write($"========================1.鎺掍骇涓昏〃澶勭悊鐢ㄦ椂锛�" + sw.Elapsed);
- int SumDay = 180; //鍔ㄦ�佸叚鏈堜箣宸� DateTime.Now.AddMonths(1).AddDays(-1).Subtract(DateTime.Now).Days;
+ int SumDay = 0; //鍔ㄦ�佸叚鏈堜箣宸� DateTime.Now.AddMonths(1).AddDays(-1).Subtract(DateTime.Now).Days;
+
+ // 缁熻鎬诲ぉ鏁�
+ HashSet<DateTime> uniqueDates = new HashSet<DateTime>();
+
+ foreach (var key in list[i].Keys)
+ {
+ if (DateTime.TryParseExact(key, "yyyy-M-d", CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime date))
+ {
+ uniqueDates.Add(date);
+ }
+ }
+
+ SumDay = uniqueDates.Count;
LogService.CustomWriteLog("2.3:" + i, DateTime.Now.ToString("yyyy-MM-dd"));
for (int j = 0; j < SumDay; j++)
@@ -377,7 +390,7 @@
{
try
{
- ds = oCN.RunProcReturn($"select isnull(DATEDIFF(DAY,GETDATE(),CONVERT(varchar(10),max(HMasterDate),20))+1,0) DayNum from Sc_WorkBillSortBillMain a with(nolock) left join Sc_WorkBillSortBillSub b with(nolock) on a.HInterID = b.HInterID where a.HWorkShopID = {sWhere} and HMasterDate>=CONVERT(varchar(10),GETDATE(),20) and HLockedSub=1", "Sc_WorkBillSortBillSub");
+ ds = oCN.RunProcReturn($"select isnull(DATEDIFF(DAY,GETDATE(),CONVERT(varchar(10),max(HMasterDate),20))+1,0) DayNum from Sc_WorkBillSortBillMain a with(nolock) left join Sc_WorkBillSortBillSub b with(nolock) on a.HInterID = b.HInterID where a.HWorkShopID in ({sWhere}) and HMasterDate>=CONVERT(varchar(10),GETDATE(),20) and HLockedSub=1", "Sc_WorkBillSortBillSub");
objJsonResult.code = "1";
objJsonResult.count = 1;
--
Gitblit v1.9.1