将记录操作日志改为统一方法,操作日志表实体类增加文件pk、文件父级pk、文件名字段,增加查询操作日志接口

master
孙亮 10 months ago
parent 2667bb38d6
commit ae1c60aa4a

@ -45,7 +45,9 @@ namespace IBKLinker_Minio.Common
public class MinioBusinessLogic public class MinioBusinessLogic
{ {
private static readonly ILog logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>
/// 异步处理取minio文件流数据方法
/// </summary>
public async Task<string> Download(string bucketName, string path) public async Task<string> Download(string bucketName, string path)
{ {
@ -68,5 +70,22 @@ namespace IBKLinker_Minio.Common
throw; throw;
} }
} }
/// <summary>
/// 文件上传操作日志记录
/// </summary>
public void MinioOperationLog(string OperateUser, string FileName, string Operate, string FilePk, string FileUPk, IDbContext db) //传参为操作人、文件名、操作、数据库连接上下文对象
{
MinioOperationlog MOdata = new MinioOperationlog();
DateTime time = DateTime.Now;//时间
MOdata.Pk = Convert.ToInt32(db.QueryScalar("select S_MINIO_OPERATIONLOG.nextval from dual"));///拿到表自增长的值赋值给自增长主键pk;
MOdata.OperateUser = OperateUser;//操作者
MOdata.OperateTime = time;//操作时间
MOdata.FilePk = FilePk.ToString();//文件pk
MOdata.FileUPk = FileUPk.ToString();//文件父级pk
MOdata.FileName = FileName;//文件名
MOdata.Operater = OperateUser + Operate + FileName + " " + time.ToString();//操作
MOdata.CreationTime = time;//创建时间
db.Insert<MinioOperationlog>(MOdata);//写入数据库
}
} }
} }

@ -315,7 +315,7 @@ namespace IBKLinker_Minio.Controller.MinioController
{ {
sql += " and a.STATE =" + minioUser.State + ""; sql += " and a.STATE =" + minioUser.State + "";
} }
if (minioUser.RoleId>0) if (minioUser.RoleId > 0)
{ {
sql += " and a.ROLE_ID =" + minioUser.RoleId + ""; sql += " and a.ROLE_ID =" + minioUser.RoleId + "";
} }
@ -424,12 +424,20 @@ namespace IBKLinker_Minio.Controller.MinioController
{ {
try try
{ {
db.BeginTransaction();//启动事务 if (master != null)
db.Delete<MinioFileassociation>(master); {
db.Commit();//提交事务 db.BeginTransaction();//启动事务
request.code = "0"; string sql = string.Format("delete from MINIO_FILEASSOCIATION where 1=1 and PK={0}", master.Pk);
request.msg = "删除成功!"; db.Execute(sql);
db.Commit();//提交事务
request.code = "0";
request.msg = "删除成功!";
}
else
{
request.code = "1";
request.msg = "删除失败!";
}
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -454,11 +462,11 @@ namespace IBKLinker_Minio.Controller.MinioController
{ {
using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db")) using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db"))
{ {
if (FilePk != null) if (FilePk != null)
{ {
string sql = string.Empty; string sql = string.Empty;
//先通过文件ID拿到文件的类型是技术协议还是质量要点或者工艺卡 //先通过文件ID拿到文件的类型是技术协议还是质量要点或者工艺卡
MinioStoragePath ds= db.Query<MinioStoragePath>("select * from MINIO_STORAGE_PATH where PK= " + int.Parse(FilePk) + " and CLEAR_FLAG='0' ORDER BY PK").FirstOrDefault(); MinioStoragePath ds = db.Query<MinioStoragePath>("select * from MINIO_STORAGE_PATH where PK= " + int.Parse(FilePk) + " and CLEAR_FLAG='0' ORDER BY PK").FirstOrDefault();
if (ds != null) if (ds != null)
{ {
if (ds.DocumentType == "1") if (ds.DocumentType == "1")
@ -469,14 +477,14 @@ namespace IBKLinker_Minio.Controller.MinioController
{ {
sql += string.Format(" and FILE_PK ={0} or ASSOCIATION_FILE_PK ={0}", int.Parse(FilePk)); sql += string.Format(" and FILE_PK ={0} or ASSOCIATION_FILE_PK ={0}", int.Parse(FilePk));
} }
else else
{ {
sql += string.Format(" and ASSOCIATION_FILE_PK ={0}", int.Parse(FilePk)); sql += string.Format(" and ASSOCIATION_FILE_PK ={0}", int.Parse(FilePk));
} }
} }
//通过文件类型判断是查文件的下一级还是查文件的上下级 //通过文件类型判断是查文件的下一级还是查文件的上下级
IList<MinioFileassociation> result = new List<MinioFileassociation>(); IList<MinioFileassociation> result = new List<MinioFileassociation>();
request.data = db.Query<MinioFileassociation>("select * from MINIO_FILEASSOCIATION where 1=1 " + sql + " ORDER BY PK"); request.data = db.Query<MinioFileassociation>("select * from MINIO_FILEASSOCIATION where 1=1 " + sql + " ORDER BY PK");
request.code = "0"; request.code = "0";
@ -576,7 +584,7 @@ namespace IBKLinker_Minio.Controller.MinioController
//DateTime time = DateTime.Now; //DateTime time = DateTime.Now;
db.Update<MinioRolePermission>(minioRolePermission.minioRolePermission); db.Update<MinioRolePermission>(minioRolePermission.minioRolePermission);
//删除历史记录加入新的记录 //删除历史记录加入新的记录
db.Query("delete from MINIO_AUTHORITY where LIMITS_AUTHORITY_ID='"+ minioRolePermission.minioRolePermission.LimitsAuthorityId + "' "); db.Query("delete from MINIO_AUTHORITY where LIMITS_AUTHORITY_ID='" + minioRolePermission.minioRolePermission.LimitsAuthorityId + "' ");
db.Insert<MinioAuthority>(AuthorityList); db.Insert<MinioAuthority>(AuthorityList);
db.Commit(); db.Commit();
request.code = "0"; request.code = "0";
@ -608,16 +616,16 @@ namespace IBKLinker_Minio.Controller.MinioController
RequestEntity request = new RequestEntity(); RequestEntity request = new RequestEntity();
IList<MinioUser> MUData = new List<MinioUser>(); IList<MinioUser> MUData = new List<MinioUser>();
IList<MinioUser> UdpData = new List<MinioUser>(); IList<MinioUser> UdpData = new List<MinioUser>();
string sql = ""; string sql = "begin ";
using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db")) using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db"))
{ {
try try
{ {
if (data != null) if (data != null)
{ {
MUData = db.Query<MinioUser>("select * from MINIO_USER where 1=1 and ROLE_ID='"+data.Id+"'");//查询用户表中使用要被删除的角色 MUData = db.Query<MinioUser>("select * from MINIO_USER where 1=1 and ROLE_ID='" + data.Id + "'");//查询用户表中使用要被删除的角色
db.BeginTransaction();//启动事务 db.BeginTransaction();//启动事务
if (MUData.Count > 0) if (MUData.Count > 0)//如果有数据需要同步修改用户表中的角色
{ {
foreach (var item in MUData) foreach (var item in MUData)
{ {
@ -632,8 +640,9 @@ namespace IBKLinker_Minio.Controller.MinioController
} }
db.Update<MinioUser>(UdpData); db.Update<MinioUser>(UdpData);
} }
db.Query("delete from MINIO_AUTHORITY where LIMITS_AUTHORITY_ID='" + data.LimitsAuthorityId + "' "); sql += string.Format("delete from MINIO_AUTHORITY where 1=1 and LIMITS_AUTHORITY_ID={0};", data.LimitsAuthorityId);
sql = string.Format("delete from MINIO_ROLE_PERMISSION where 1=1 and PK={0}", data.Pk); sql = string.Format("delete from MINIO_ROLE_PERMISSION where 1=1 and PK={0};", data.Pk);
sql += "end;";
db.Execute(sql); db.Execute(sql);
db.Commit();//提交事务 db.Commit();//提交事务
request.code = "0"; request.code = "0";
@ -667,7 +676,7 @@ namespace IBKLinker_Minio.Controller.MinioController
IList<MinioRolePermission> result = new List<MinioRolePermission>(); IList<MinioRolePermission> result = new List<MinioRolePermission>();
if (!string.IsNullOrEmpty(minioRolePermission.Id)) if (!string.IsNullOrEmpty(minioRolePermission.Id))
{ {
sql += " and ID ='" + minioRolePermission.Id+"'"; sql += " and ID ='" + minioRolePermission.Id + "'";
} }
request.data = db.Query<MinioRolePermission>("select * from MINIO_ROLE_PERMISSION where 1=1 " + sql + " ORDER BY PK"); request.data = db.Query<MinioRolePermission>("select * from MINIO_ROLE_PERMISSION where 1=1 " + sql + " ORDER BY PK");
request.code = "0"; request.code = "0";
@ -698,6 +707,8 @@ namespace IBKLinker_Minio.Controller.MinioController
{ {
MinioClient minio = new MinioClient("172.15.88.212:9000", "minioadmin", "minioadmin");//连接所需minio所在地址、登录名、密码 MinioClient minio = new MinioClient("172.15.88.212:9000", "minioadmin", "minioadmin");//连接所需minio所在地址、登录名、密码
string buckname = "dayetegang";//桶名称 string buckname = "dayetegang";//桶名称
MinioBusinessLogic bb = new MinioBusinessLogic();//定义业务逻辑方法
string Operate = "";//操作
List<MinioStoragePath> date = new List<MinioStoragePath>(); List<MinioStoragePath> date = new List<MinioStoragePath>();
List<MinioStoragePath> checkdatelist = new List<MinioStoragePath>(); List<MinioStoragePath> checkdatelist = new List<MinioStoragePath>();
string RecordFileName = "";//重复文件名称记录 string RecordFileName = "";//重复文件名称记录
@ -707,10 +718,10 @@ namespace IBKLinker_Minio.Controller.MinioController
{ {
foreach (var items in minioStoragePath) //先循环接收数据 foreach (var items in minioStoragePath) //先循环接收数据
{ {
checkdatelist = db.Query<MinioStoragePath>("select t.FILE_NAME 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 + "' and t.UPK='" + items.Upk + "'").ToList();//查询上传的文件或新建的文件夹在当前文件夹下是否有重复存在
if (checkdatelist.Count >0) //如果有 if (checkdatelist.Count > 0) //如果有
{ {
RecordFileName += items.FileName +",";//记录名称 RecordFileName += items.FileName + ",";//记录名称
} }
} }
if (RecordFileName == "")//如果正常上传 if (RecordFileName == "")//如果正常上传
@ -718,7 +729,7 @@ namespace IBKLinker_Minio.Controller.MinioController
foreach (var item in minioStoragePath) foreach (var item in minioStoragePath)
{ {
MinioStoragePath data = new MinioStoragePath(); MinioStoragePath data = new MinioStoragePath();
MinioOperationlog MOdata = new MinioOperationlog();
date = db.Query<MinioStoragePath>("select * from MINIO_STORAGE_PATH where pk='" + minioStoragePath[0].Upk + "' ORDER BY PK").ToList(); date = db.Query<MinioStoragePath>("select * from MINIO_STORAGE_PATH where pk='" + minioStoragePath[0].Upk + "' ORDER BY PK").ToList();
if (item.FileType == 0) //如果是文件夹 if (item.FileType == 0) //如果是文件夹
{ {
@ -736,6 +747,10 @@ namespace IBKLinker_Minio.Controller.MinioController
data.FileLevel = date[0].FileLevel + 1;//层级 data.FileLevel = date[0].FileLevel + 1;//层级
data.Pk = Convert.ToInt32(db.QueryScalar("select S_MINIO_STORAGE_PATH.nextval from dual"));///拿到表自增长的值赋值给自增长主键pk data.Pk = Convert.ToInt32(db.QueryScalar("select S_MINIO_STORAGE_PATH.nextval from dual"));///拿到表自增长的值赋值给自增长主键pk
db.Insert<MinioStoragePath>(data); db.Insert<MinioStoragePath>(data);
#region 记录日志
Operate = " 创建了一个新的文件夹,";
bb.MinioOperationLog(data.CreatorUser, data.FileName, Operate, data.Pk.ToString(), data.Upk.ToString(), db);
#endregion
} }
} }
else else
@ -750,6 +765,10 @@ namespace IBKLinker_Minio.Controller.MinioController
data.ClearFlag = "0";//删除状态为未删除 data.ClearFlag = "0";//删除状态为未删除
data.FileLevel = 1;//层级 data.FileLevel = 1;//层级
db.Insert<MinioStoragePath>(data); db.Insert<MinioStoragePath>(data);
#region 记录日志
Operate = " 创建了一个新的文件夹,";
bb.MinioOperationLog(data.CreatorUser, data.FileName, Operate, data.Pk.ToString(), data.Upk.ToString(), db);
#endregion
} }
#region minio创建文件夹 #region minio创建文件夹
//var folderName = minioStoragePath[0].FilePath + "/";//取前端发送路径(或单一文件夹名称) //var folderName = minioStoragePath[0].FilePath + "/";//取前端发送路径(或单一文件夹名称)
@ -781,12 +800,8 @@ namespace IBKLinker_Minio.Controller.MinioController
request.msg = "文件上传成功!"; request.msg = "文件上传成功!";
request.code = "0"; request.code = "0";
#region 记录日志 #region 记录日志
MOdata.Pk = Convert.ToInt32(db.QueryScalar("select S_MINIO_OPERATIONLOG.nextval from dual"));///拿到表自增长的值赋值给自增长主键pk; Operate = " 上传了一个新的文档,";
MOdata.OperateUser = item.CreatorUser;//操作者 bb.MinioOperationLog(item.CreatorUser, item.FileName, Operate, data.Pk.ToString(), data.Upk.ToString(), db);
MOdata.OperateTime = DateTime.Now;//操作时间
MOdata.Operater = item.CreatorUser + " 上传了一个新的文档," + item.FileName + " " +DateTime.Now.ToString();//操作
MOdata.CreationTime = DateTime.Now;//创建时间
db.Insert<MinioOperationlog>(MOdata);//写入数据库
#endregion #endregion
} }
else else
@ -797,9 +812,9 @@ namespace IBKLinker_Minio.Controller.MinioController
} }
} }
} }
else else
{ {
request.msg = "文件上传失败,其中" + RecordFileName +"在此文件已经存在!"; request.msg = "文件上传失败,其中" + RecordFileName + "在此文件已经存在!";
request.code = "1"; request.code = "1";
} }
db.Commit(); db.Commit();
@ -837,7 +852,8 @@ namespace IBKLinker_Minio.Controller.MinioController
DateTime time = DateTime.Now;//取当前时间 DateTime time = DateTime.Now;//取当前时间
MinioStoragePath date = new MinioStoragePath(); MinioStoragePath date = new MinioStoragePath();
List<MinioStoragePath> datelist = new List<MinioStoragePath>(); List<MinioStoragePath> datelist = new List<MinioStoragePath>();
MinioOperationlog MOdata = new MinioOperationlog(); MinioBusinessLogic bb = new MinioBusinessLogic();//定义业务逻辑方法
string Operate = "";//操作
if (data.Count > 0) if (data.Count > 0)
{ {
foreach (var item in data) foreach (var item in data)
@ -866,19 +882,15 @@ namespace IBKLinker_Minio.Controller.MinioController
{ {
datelist.Add(date); datelist.Add(date);
#region 记录日志 #region 记录日志
MOdata.Pk = Convert.ToInt32(db.QueryScalar("select S_MINIO_OPERATIONLOG.nextval from dual"));///拿到表自增长的值赋值给自增长主键pk; Operate = " 更新了这个文档, ";
MOdata.OperateUser = item.CreatorUser;//操作者 bb.MinioOperationLog(item.CreatorUser, item.FileName, Operate, item.Pk.ToString(), item.Upk.ToString(), db);
MOdata.OperateTime = DateTime.Now;//操作时间
MOdata.Operater = item.CreatorUser + " 更新了 " + item.FileName +" 这个文档。 " + DateTime.Now.ToString();//操作
MOdata.CreationTime = DateTime.Now;//创建时间
db.Insert<MinioOperationlog>(MOdata);//写入数据库
#endregion #endregion
} }
} }
else //正常修改文件/文件夹名称或移动 else //正常修改文件/文件夹名称或移动
{ {
datelist.Add(date); datelist.Add(date);
} }
} }
if (datelist != null) if (datelist != null)
{ {
@ -887,7 +899,7 @@ namespace IBKLinker_Minio.Controller.MinioController
request.code = "0"; request.code = "0";
request.msg = "修改成功!"; request.msg = "修改成功!";
} }
else else
{ {
request.code = "1"; request.code = "1";
request.msg = "请检查是否符合修改规范!"; request.msg = "请检查是否符合修改规范!";
@ -926,7 +938,10 @@ namespace IBKLinker_Minio.Controller.MinioController
DateTime time = DateTime.Now;//取当前时间 DateTime time = DateTime.Now;//取当前时间
MinioClient minio = new MinioClient("172.15.88.212:9000", "minioadmin", "minioadmin"); MinioClient minio = new MinioClient("172.15.88.212:9000", "minioadmin", "minioadmin");
string buckname = "dayetegang";//桶名称 string buckname = "dayetegang";//桶名称
MinioOperationlog MOdata = new MinioOperationlog(); MinioBusinessLogic bb = new MinioBusinessLogic();//定义业务逻辑方法
string Operate = "";//操作
string FilePk = "";//文件pk
string fileUPk = "";//文件父级pk
db.BeginTransaction(); db.BeginTransaction();
string sql = ""; string sql = "";
//db.Delete<MinioStoragePath>(master); //db.Delete<MinioStoragePath>(master);
@ -944,12 +959,8 @@ namespace IBKLinker_Minio.Controller.MinioController
sql += "end;"; sql += "end;";
db.Execute(sql); db.Execute(sql);
#region 记录日志 #region 记录日志
MOdata.Pk = Convert.ToInt32(db.QueryScalar("select S_MINIO_OPERATIONLOG.nextval from dual"));///拿到表自增长的值赋值给自增长主键pk; Operate = " 删除了这个文档, ";
MOdata.OperateUser = item.ClearUsers;//操作者 bb.MinioOperationLog(item.ClearUsers, item.FileName, Operate, FilePk, fileUPk, db);
MOdata.OperateTime = DateTime.Now;//操作时间
MOdata.Operater = item.ClearUsers + " 删除了 " + item.FileName + " 这个文档。 " + DateTime.Now.ToString();//操作
MOdata.CreationTime = DateTime.Now;//创建时间
db.Insert<MinioOperationlog>(MOdata);//写入数据库
#endregion #endregion
} }
} }
@ -957,12 +968,15 @@ namespace IBKLinker_Minio.Controller.MinioController
{ {
sql = string.Format("delete from MINIO_STORAGE_PATH where 1=1 and PK='{2}' ", item.ClearUsers, time, item.Pk);//更新文件路径表中的删除状态 sql = string.Format("delete from MINIO_STORAGE_PATH where 1=1 and PK='{2}' ", item.ClearUsers, time, item.Pk);//更新文件路径表中的删除状态
db.Execute(sql); db.Execute(sql);
#region 记录日志
Operate = " 删除了这个文件夹, ";
bb.MinioOperationLog(item.ClearUsers, item.FileName, Operate, FilePk, fileUPk, db);
#endregion
} }
} }
request.code = "0"; request.code = "0";
request.msg = "删除成功"; request.msg = "删除成功";
db.Commit(); db.Commit();
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -995,9 +1009,9 @@ namespace IBKLinker_Minio.Controller.MinioController
{ {
sql += " and FILE_NAME like'%" + PathData.FileName + "%'"; sql += " and FILE_NAME like'%" + PathData.FileName + "%'";
} }
if (PathData.Upk >0) //如果在子文件夹内 if (PathData.Upk > 0) //如果在子文件夹内
{ {
sql += " and UPK = '"+ PathData .Upk+ "'"; sql += " and UPK = '" + PathData.Upk + "'";
} }
if (!string.IsNullOrEmpty(PathData.BeginTime))//如果有开始时间 if (!string.IsNullOrEmpty(PathData.BeginTime))//如果有开始时间
{ {
@ -1007,15 +1021,13 @@ namespace IBKLinker_Minio.Controller.MinioController
{ {
sql += string.Format(" and CREATE_TIME <= to_date('{0}', 'yyyy/mm/dd hh24:mi:ss')", PathData.EndTime);//结束时间 sql += string.Format(" and CREATE_TIME <= to_date('{0}', 'yyyy/mm/dd hh24:mi:ss')", PathData.EndTime);//结束时间
} }
request.data = db.Query<MinioStoragePath>("select * from MINIO_STORAGE_PATH where 1=1 " + sql + " and CLEAR_FLAG='0' ORDER BY PK"); request.data = db.Query<MinioStoragePath>("select * from MINIO_STORAGE_PATH where 1=1 " + sql + " and CLEAR_FLAG='0' ORDER BY PK");
request.code = "0"; request.code = "0";
} }
else else
{ {
request.code = "1"; request.code = "1";
request.msg = "查询失败,请检查查询条件!"; request.msg = "查询失败,请检查查询条件!";
} }
} }
} }
@ -1253,6 +1265,32 @@ namespace IBKLinker_Minio.Controller.MinioController
} }
#endregion #endregion
#region 操作日志接口
/// <summary>
/// 查询minio文件操作日志
/// </summary>
/// <returns></returns>
[HttpPost, Route("GetMinioBusinessLogic")]
public RequestEntity GetMinioBusinessLogic()
{
RequestEntity request = new RequestEntity();
try
{
using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db"))
{
request.data = db.Query<MinioOperationlog>("select * from MINIO_OPERATIONLOG where 1=1");
request.code = "0";
}
}
catch (Exception ex)
{
request.code = "1";
logger.ErrorFormat("主表:MINIO_OPERATIONLOG查询minio文件操作日志表失败错误原因:{0}", ex);
}
return request;
}
#endregion
#region 标准清单 #region 标准清单
/// <summary> /// <summary>
/// 标准清单导出接口 /// 标准清单导出接口
@ -1376,7 +1414,7 @@ namespace IBKLinker_Minio.Controller.MinioController
curRow.GetCell(1).SetCellValue(data.FileName.Substring(0, Num).Trim());//协议编号 curRow.GetCell(1).SetCellValue(data.FileName.Substring(0, Num).Trim());//协议编号
curRow.GetCell(2).SetCellValue(data.FileName.Substring(Num, name).Trim());//名称 curRow.GetCell(2).SetCellValue(data.FileName.Substring(Num, name).Trim());//名称
} }
if (data.FilePath.IndexOf("标准通知")>=0) if (data.FilePath.IndexOf("标准通知") >= 0)
{ {
int Num = data.FileName.IndexOf("号");//取文件名称编号位数 int Num = data.FileName.IndexOf("号");//取文件名称编号位数
int name = data.FileName.Length - Num;//取文件名称名称位数 int name = data.FileName.Length - Num;//取文件名称名称位数
@ -1384,7 +1422,7 @@ namespace IBKLinker_Minio.Controller.MinioController
curRow.GetCell(1).SetCellValue(data.FileName.Substring(0, Num).Trim());//编号 curRow.GetCell(1).SetCellValue(data.FileName.Substring(0, Num).Trim());//编号
curRow.GetCell(2).SetCellValue(data.FileName.Substring(Num, name).Replace("", "").Trim());//名称 curRow.GetCell(2).SetCellValue(data.FileName.Substring(Num, name).Replace("", "").Trim());//名称
} }
if(data.FilePath.IndexOf("标准通知") == -1 && data.FilePath.IndexOf("企业标准/XYGN") == -1 || data.FilePath.IndexOf("企业标准/XYGW") == -1) if (data.FilePath.IndexOf("标准通知") == -1 && data.FilePath.IndexOf("企业标准/XYGN") == -1 || data.FilePath.IndexOf("企业标准/XYGW") == -1)
{ {
var filecontent = data.FileName.Split(' ');//以空格进行区分 var filecontent = data.FileName.Split(' ');//以空格进行区分
curRow.GetCell(0).SetCellValue(data.FilePath.Replace(data.FileName, ""));//路径 curRow.GetCell(0).SetCellValue(data.FilePath.Replace(data.FileName, ""));//路径
@ -1483,6 +1521,6 @@ namespace IBKLinker_Minio.Controller.MinioController
} }
} }
#endregion #endregion
} }
} }

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IBKLinker_Minio.Entity.MinioController
{
/// <summary>
/// 查询minio文件文件夹路径model包括模糊查询文件名称以及根据时间查询
/// </summary>
/// <returns></returns>
public class GetStoragePathModel
{
/// <summary>
/// 文件名称
/// </summary>
public string FileName { get; set; }
/// <summary>
///子文件夹的父ID
/// </summary>
public int Upk { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public string BeginTime { set; get; }
/// <summary>
/// 结束时间
/// </summary>
public string EndTime { set; get; }
}
}

@ -55,6 +55,24 @@ namespace IBKLinker_Minio.Entity.MinioController
[Persistent("ALTERNATE_FIELDS"), DisplayName("备用字段")] [Persistent("ALTERNATE_FIELDS"), DisplayName("备用字段")]
public string AlternateFilelds { get; set; } public string AlternateFilelds { get; set; }
/// <summary>
///文件pk
/// </summary>
[Persistent("FILE_PK", IsKey = true), DisplayName("主键")]
public string FilePk { get; set; }
/// <summary>
///文件父级pk
/// </summary>
[Persistent("FILE_UPK", IsKey = true), DisplayName("主键")]
public string FileUPk { get; set; }
/// <summary>
///文件名
/// </summary>
[Persistent("FILE_NAME"), DisplayName("文件名")]
public string FileName { get; set; }
} }
} }

Loading…
Cancel
Save