From c464f72ac383e8dbc98d8a43f05098fbaff64a19 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期二, 19 八月 2025 11:05:40 +0800
Subject: [PATCH] 工序委外发出单获取工序信息添加序列号

---
 WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBill_TKController.cs |   42 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 41 insertions(+), 1 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..0418cb5 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++)
@@ -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