LEIYI 3 months ago
parent
commit
a161d5f3bf
1 changed files with 8 additions and 2 deletions
  1. 8 2
      OASystem/OASystem.Api/Controllers/FinancialController.cs

+ 8 - 2
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -4302,7 +4302,7 @@ Group by PriceType ", dto.diId);
         /// <returns></returns>
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> PostCreditCardBill(IFormFile file, int cardType, string beginDt, string endDt)
+        public async Task<IActionResult> PostCreditCardBill(IFormFile file, int cardType,  string beginDt,  string endDt)
         {
             if (file == null || file.Length < 1)
             {
@@ -4683,7 +4683,13 @@ Group by PriceType ", dto.diId);
 
                         if (item["TradingDay"] != null)
                         {
-                            ExcelDt = DateTime.Parse(item["TradingDay"].ToString()).ToString("MMdd");
+                            var dtBool = DateTime.TryParse(item["TradingDay"].ToString(), out DateTime _ExcelDt);
+
+                            if (dtBool)
+                            {
+                                ExcelDt = _ExcelDt.ToString("MMdd");
+                            }
+                            
                         }
 
                         //加一获取金额区间