diff --git a/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs b/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs
index 0eeb085..a5ac32f 100644
--- a/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs
+++ b/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs
@@ -990,22 +990,43 @@ namespace IBKLinker_Minio.Controller.MinioController
///
///
[HttpPost, Route("GetStoragePath")]
- public RequestEntity GetStoragePath(string FileName)
+ public RequestEntity GetStoragePath(GetStoragePathModel PathData)
{
- RequestEntity request = new RequestEntity();
+ RequestEntity request = new RequestEntity();//定义返回集合
try
{
using (IDbContext db = ObjectContainer.GetObject("db"))
{
string sql = string.Empty;
- IList result = new List();
- if (!string.IsNullOrEmpty(FileName.ToString()))
+ IList result = new List();//定义查询到的list
+ if (PathData != null)//传输数据不为空
{
- sql += " and FILE_NAME like'%" + FileName + "%'";
+ if (!string.IsNullOrEmpty(PathData.FileName.ToString()))//如果有名称模糊查询
+ {
+ sql += " and FILE_NAME like'%" + PathData.FileName + "%'";
+ }
+ if (PathData.Upk >0) //如果在子文件夹内
+ {
+ sql += " and UPK = '"+ PathData .Upk+ "'";
+ }
+ if (!string.IsNullOrEmpty(PathData.BeginTime))//如果有开始时间
+ {
+ sql += string.Format(" and CREATE_TIME >= to_date('{0}', 'yyyy/mm/dd hh24:mi:ss')", PathData.BeginTime);//开始时间
+ }
+ if (!string.IsNullOrEmpty(PathData.EndTime))//如果有结束时间
+ {
+ sql += string.Format(" and CREATE_TIME <= to_date('{0}', 'yyyy/mm/dd hh24:mi:ss')", PathData.EndTime);//结束时间
+ }
+
+ request.data = db.Query("select * from MINIO_STORAGE_PATH where 1=1 " + sql + " and CLEAR_FLAG='0' ORDER BY PK");
+ request.code = "0";
}
+ else
+ {
+ request.code = "1";
+ request.msg = "查询失败,请检查查询条件!";
- request.data = db.Query("select * from MINIO_STORAGE_PATH where 1=1 " + sql + " and CLEAR_FLAG='0' ORDER BY PK");
- request.code = "0";
+ }
}
}
catch (Exception ex)