From 7636c2cfa97cd3c24070593c899d4e4e5d0caf89 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 10 四月 2026 16:49:10 +0800
Subject: [PATCH] 选择关键件进行解绑
---
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBill_TKController.cs | 44 ++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 42 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 60e0d12..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;
@@ -396,5 +409,32 @@
}
#endregion
+ #region 鐢熶骇鏃ヨ鍒掑钩鍙� 浜ゆ湡鍙戝竷
+ [Route("JIT_DayPlanPlatFormBill/PublishDate")]
+ [HttpGet]
+ public object PublishDate(string HDeptID)
+ {
+ try
+ {
+ //鏇存柊鐢熶骇璁㈠崟鐨勬渶鏃╁紑宸ユ棩鏈�
+ oCN.RunProc($"exec h_p_JIT_PublishDate '{HDeptID}'");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "璁㈠崟瀹屽伐鏃ユ湡鍙戝竷鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
}
}
--
Gitblit v1.9.1