diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js index 7bc73254..d2375943 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js @@ -12,7 +12,7 @@ const defaultCompareSchema = { input: "datetime", rules: [ { - required: false, + required: true }, ], }, @@ -176,6 +176,7 @@ export default function (businessType, type) { }, sorting: { hidden: true, + default: "createdAt", }, }, }, diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs index 160d7afb..380a29d2 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Data; using System.Linq; using System.Text.Json; @@ -28,7 +28,7 @@ namespace Win.Sfs.SettleAccount.Repository public virtual async Task> GetTaskJobsAsync(Job p_task) { string str = string.Empty; - str = "SELECT\n" + + str = "select * from (SELECT\n" + " b.Id,\n" + " isnull( a.StateId, 0 ) StateId,\n" + " b.Type,\n" + @@ -79,7 +79,7 @@ namespace Win.Sfs.SettleAccount.Repository { str += string.Format(" and b.type='{0}'", p_task.Type); } - str += " order by a.CreatedAt desc "; + str += ") c order by c.CreatedAt desc "; var _db = await GetDbConnectionAsync().ConfigureAwait(false); var _query = await _db.QueryAsync(str).ConfigureAwait(false); var _lst = _query.ToList();