duhe
2025-07-22 f5941ccb8e8f857cc0587013d2968509145fa4f3
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/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
    }
}