This commit is contained in:
2020-08-26 19:56:45 +08:00
parent 7ff6b2ec35
commit 3ece010fc1
208 changed files with 14753 additions and 637 deletions

View File

@@ -40,15 +40,17 @@ function DBAttachment.releaseTimeout()
end
-- 删掉超时的文件
local files = FileEx.GetFiles(downloadDir)
local count = files.Length
for i = 0, count - 1 do
---@type System.IO.FileInfo
local fi = FileInfo(files[i])
if fi then
local diff = (DateTime.Now:ToFileTime() - fi.LastAccessTime:ToFileTime()) / 10000
if diff > _TimeOutSec then
FileEx.Delete(files[i])
if Directory.Exists(downloadDir) then
local files = FileEx.GetFiles(downloadDir)
local count = files.Length
for i = 0, count - 1 do
---@type System.IO.FileInfo
local fi = FileInfo(files[i])
if fi then
local diff = (DateTime.Now:ToFileTime() - fi.LastAccessTime:ToFileTime()) / 10000
if diff > _TimeOutSec then
FileEx.Delete(files[i])
end
end
end
end

View File

@@ -91,6 +91,15 @@ DBCust.onGetFilter = function(data)
]]
end
DBCust.getTaskName = function(taskId)
local list = DBCust.getFilter(DBCust.FilterGroup.taskList)
for i, v in ipairs(list) do
if tostring(v.value) == tostring(taskId) then
return v.name
end
end
end
DBCust.getFieldsByTask = function(taskValue)
if not taskValue then
return {}