Browse Source

倒推表
日期去0及模板格式调整

leiy 10 months ago
parent
commit
3796495387

+ 1 - 1
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -9084,7 +9084,7 @@ namespace OASystem.API.Controllers
         public async Task<IActionResult> PostInvertedListFileDownload(InvertedListFileDownloadDto dto)
         {
 
-            var info1 = await _invertedListRep._sqlSugar.Queryable<Grp_InvertedList>().Where(it => it.DiId == dto.DiId).FirstAsync();
+            var info1 = await _invertedListRep._sqlSugar.Queryable<Grp_InvertedList>().Where(it => it.IsDel == 0 && it.DiId == dto.DiId).FirstAsync();
             if (info1 == null)
             {
                 return Ok(JsonView(false, "倒推表数据未生成,请先生成倒退表数据!"));

+ 3 - 2
OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs

@@ -1355,14 +1355,15 @@ namespace OASystem.API.OAMethodLib
         /// <summary>
         /// 验证数字字符串
         /// </summary>
-        /// <param name="num"></param>
+        /// <param name="str"></param>
         /// <returns></returns>
         public static string ConvertToDatetime(this string str)
         {
             if (!string.IsNullOrEmpty(str))
             {
+                DateTime currentDate = Convert.ToDateTime(str);
 
-                return Convert.ToDateTime(str).ToString("yyyy年MM月dd日");
+                return $"{currentDate.Year}年{currentDate.Month}月{currentDate.Day}日";
             }
 
             return "";