master
程志刚 9 months ago
parent e0f381b367
commit 39a0c532b8

@ -39,6 +39,7 @@ using NPOI.POIFS.Crypt.Dsig;
using NPOI.SS.Formula.Atp;
using Org.BouncyCastle.Asn1.Pkcs;
using System.Windows.Forms;
using Org.BouncyCastle.Asn1.Ocsp;
namespace IBKLinker_Minio.Controller.MinioController
{
@ -792,7 +793,7 @@ namespace IBKLinker_Minio.Controller.MinioController
{
foreach (var items in minioStoragePath) //先循环接收数据
{
checkdatelist = db.Query<MinioStoragePath>("select t.* from MINIO_STORAGE_PATH t where 1=1 and t.FILE_NAME='" + items.FileName + "' and t.UPK='" + items.Upk + "'").ToList();//查询上传的文件或新建的文件夹在当前文件夹下是否有重复存在
checkdatelist = db.Query<MinioStoragePath>("select t.* from MINIO_STORAGE_PATH t where 1=1 and t.FILE_NAME='" + items.FileName + "'").ToList();//查询上传的文件或新建的文件夹在当前文件夹下是否有重复存在
if (checkdatelist.Count > 0) //如果有
{
RecordFileName += items.FileName + ",";//记录名称
@ -811,6 +812,7 @@ namespace IBKLinker_Minio.Controller.MinioController
{
if (date.Count > 0)
{
#region 文件文件夹路径表字段赋值
data.Upk = minioStoragePath[0].Upk;//子文件夹的父级id
data.FileName = minioStoragePath[0].FileName;//文件名称
data.FileType = minioStoragePath[0].FileType;//文件类型
@ -820,6 +822,7 @@ namespace IBKLinker_Minio.Controller.MinioController
data.CreatorTime = DateTime.Now;//创建时间
data.FileLevel = date[0].FileLevel + 1;//层级
data.Pk = Convert.ToInt32(db.QueryScalar("select S_MINIO_STORAGE_PATH.nextval from dual"));///拿到表自增长的值赋值给自增长主键pk
#endregion
db.Insert<MinioStoragePath>(data);
#region 记录日志
Operate = " 创建了一个新的文件夹,";
@ -829,6 +832,7 @@ namespace IBKLinker_Minio.Controller.MinioController
}
else
{
#region 文件文件夹路径表字段赋值
data.Pk = Convert.ToInt32(db.QueryScalar("select S_MINIO_STORAGE_PATH.nextval from dual"));///拿到表自增长的值赋值给自增长主键pk
data.Upk = 0;//子文件夹的父级id如果是根目录默认父级id为0
data.FileName = minioStoragePath[0].FileName;//文件名称
@ -838,6 +842,7 @@ namespace IBKLinker_Minio.Controller.MinioController
data.CreatorTime = DateTime.Now;//创建时间
data.ClearFlag = "0";//删除状态为未删除
data.FileLevel = 1;//层级
#endregion
db.Insert<MinioStoragePath>(data);
#region 记录日志
Operate = " 创建了一个新的文件夹,";
@ -860,6 +865,7 @@ namespace IBKLinker_Minio.Controller.MinioController
uploadTask.Wait();
if (uploadTask.Status == TaskStatus.RanToCompletion && !uploadTask.IsFaulted)//判断是否上传成功
{
#region 文件文件夹路径表字段赋值
data.Pk = Convert.ToInt32(db.QueryScalar("select S_MINIO_STORAGE_PATH.nextval from dual"));///拿到表自增长的值赋值给自增长主键pk
data.Upk = item.Upk;//子文件夹的父级id如果是根目录默认父级id为0
data.FileName = item.FileName;//文件名称
@ -870,6 +876,7 @@ namespace IBKLinker_Minio.Controller.MinioController
data.ClearFlag = "0";//删除状态为未删除
data.FileLevel = date[0].FileLevel + 1;//层级
data.DocumentType = item.DocumentType;//文件种类
#endregion
db.Insert<MinioStoragePath>(data);
request.msg = "文件上传成功!";
request.code = "0";
@ -888,7 +895,7 @@ namespace IBKLinker_Minio.Controller.MinioController
}
else
{
request.msg = "文件上传失败,其中" + RecordFileName + "在此文件已经存在!";
request.msg = "文件上传失败,其中" + RecordFileName + "在此文件已经存在!";
request.code = "1";
}
db.Commit();
@ -1525,5 +1532,7 @@ namespace IBKLinker_Minio.Controller.MinioController
return result;
}
#endregion
}
}

Loading…
Cancel
Save