diff --git a/FrontendWebApi/ApiControllers/TenantBillController.cs b/FrontendWebApi/ApiControllers/TenantBillController.cs index e62d20c..b78f3a8 100644 --- a/FrontendWebApi/ApiControllers/TenantBillController.cs +++ b/FrontendWebApi/ApiControllers/TenantBillController.cs @@ -75,7 +75,7 @@ namespace FrontendWebApi.ApiControllers catch (Exception exception) { apiResult.Code = "9999"; - apiResult.Msg = "系統內部錯誤,請聯絡管理者。"; + apiResult.Msg = "讀取不到用戶資料。"; Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); } @@ -106,7 +106,7 @@ namespace FrontendWebApi.ApiControllers catch (Exception exception) { apiResult.Code = "9999"; - apiResult.Msg = "系統內部錯誤,請聯絡管理者。"; + apiResult.Msg = "新增用戶失敗。"; if (exception.Message.Contains($" for key 'PRIMARY'")) { apiResult.Msg = "已有相同使用者。"; @@ -135,12 +135,12 @@ namespace FrontendWebApi.ApiControllers await backendRepository.ExecuteSql(sqlString); apiResult.Code = "0000"; - apiResult.Data = "修改成功"; + apiResult.Data = "修改用戶成功"; } catch (Exception exception) { apiResult.Code = "9999"; - apiResult.Msg = "系統內部錯誤,請聯絡管理者。"; + apiResult.Msg = "修改失敗。"; if (exception.Message.Contains($"a foreign key constraint")) { apiResult.Msg = "水電報表仍有該用戶,無法修改名稱。"; @@ -167,7 +167,7 @@ namespace FrontendWebApi.ApiControllers catch (Exception exception) { apiResult.Code = "9999"; - apiResult.Msg = "系統內部錯誤,請聯絡管理者。"; + apiResult.Msg = "刪除用戶失敗。"; if (exception.Message.Contains($"a foreign key constraint")) { apiResult.Msg = "水電報表仍有該用戶,無法刪除。"; @@ -222,7 +222,7 @@ namespace FrontendWebApi.ApiControllers catch (Exception exception) { apiResult.Code = "9999"; - apiResult.Msg = "系統內部錯誤,請聯絡管理者。"; + apiResult.Msg = "讀取水電參考報表失敗。"; Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); } @@ -248,10 +248,16 @@ namespace FrontendWebApi.ApiControllers startMonth = tb.start_timestamp.Split("-")[0] + tb.start_timestamp.Split("-")[1]; endMonth = tb.end_timestamp.Split("-")[0] + tb.end_timestamp.Split("-")[1]; } - else + if (start_timestamp == "") { apiResult.Code = "9999"; - apiResult.Msg = "請選擇日期。"; + apiResult.Msg = "請選擇起始日期。"; + return apiResult; + } + if (end_timestamp == "") + { + apiResult.Code = "9999"; + apiResult.Msg = "請選擇結束日期。"; return apiResult; } @@ -296,7 +302,7 @@ namespace FrontendWebApi.ApiControllers // $"WHERE device_number = '{tb.device_number}'"; apiResult.Code = "9999"; apiResult.Msg = "請選擇同一個月份"; - + return apiResult; } @@ -309,7 +315,7 @@ namespace FrontendWebApi.ApiControllers catch (Exception exception) { apiResult.Code = "9999"; - apiResult.Msg = "系統內部錯誤,請聯絡管理者。"; + apiResult.Msg = "修改水電參考報表失敗。"; Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); } diff --git a/FrontendWebApi/wwwroot/upload/OutputFormTemplate/import.html b/FrontendWebApi/wwwroot/upload/OutputFormTemplate/import.html index fdb43b5..a69998f 100644 --- a/FrontendWebApi/wwwroot/upload/OutputFormTemplate/import.html +++ b/FrontendWebApi/wwwroot/upload/OutputFormTemplate/import.html @@ -9,13 +9,14 @@