diff --git a/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs b/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs index 854e5ed..1a6d414 100644 --- a/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs +++ b/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs @@ -814,7 +814,7 @@ namespace IBKLinker_Minio.Controller.MinioController date.ClearFlag = "0";//删除标记 0未删除 1删除 datebase.Add(date); } - db.Update(data); + db.Update(datebase); db.Commit();//提交事务 request.code = "0"; request.msg = "修改成功!"; @@ -1159,8 +1159,8 @@ namespace IBKLinker_Minio.Controller.MinioController } #endregion #region 标准清单 - [HttpGet, Route("StandardListGeneration")] - public HttpResponseMessage StandardListGeneration(string InventoryName, string InventoryType, string BeginTime, string EndTime) + [HttpPost, Route("StandardListGeneration")] + public HttpResponseMessage StandardListGeneration(StandardListGenerationModel master) { RequestEntity request = new RequestEntity(); IList date = new List(); @@ -1169,84 +1169,84 @@ namespace IBKLinker_Minio.Controller.MinioController { try { - if (InventoryName != null && InventoryType != null) + if (master.InventoryName != null && master.InventoryType != null) { string ExcelName = "";//定义导出Excel文件名称 FileStream file = new FileStream("D:/linshi/" + "清单模板.xlsx", FileMode.Open, FileAccess.Read); XSSFWorkbook hssfworkbook = new XSSFWorkbook(file); string sql = "select * from MINIO_STORAGE_PATH where 1=1 and FILE_TYPE='1' "; - if (InventoryType == "0")//标准类型 + if (master.InventoryType == "0")//标准类型 { - if (!string.IsNullOrEmpty(BeginTime)) + if (!string.IsNullOrEmpty(master.BeginTime)) { - sql += string.Format(" and CREATE_TIME >= to_date('{0}', 'yyyy/mm/dd hh24:mi:ss')", BeginTime);//开始时间 + sql += string.Format(" and CREATE_TIME >= to_date('{0}', 'yyyy/mm/dd hh24:mi:ss')", master.BeginTime);//开始时间 } - if (!string.IsNullOrEmpty(EndTime)) + if (!string.IsNullOrEmpty(master.EndTime)) { - sql += string.Format(" and CREATE_TIME <= to_date('{0}', 'yyyy/mm/dd hh24:mi:ss')", EndTime);//结束时间 + sql += string.Format(" and CREATE_TIME <= to_date('{0}', 'yyyy/mm/dd hh24:mi:ss')", master.EndTime);//结束时间 } - sql += string.Format(" and FILE_PATH like'%{0}%'", InventoryName);//直接添加文件加名称 + sql += string.Format(" and FILE_PATH like'%{0}%'", master.InventoryName);//直接添加文件加名称 ExcelName = "标准清单"; } else { #region 清单判断 - if (InventoryName == "HY企业标准清单") + if (master.InventoryName == "HY企业标准清单") { sql += "and FILE_PATH like'%HY%'"; ExcelName = "HY企业标准清单"; } - if (InventoryName == "Q-HY企业标准清单") + if (master.InventoryName == "Q-HY企业标准清单") { sql += "and (FILE_PATH like'%Q/HY%'"; ExcelName = "Q-HY企业标准清单"; } - if (InventoryName == "新产品标准清单") + if (master.InventoryName == "新产品标准清单") { sql += "and (FILE_PATH like'%XYGN%' or FILE_PATH like'%XYGW%')"; ExcelName = "新产品标准清单"; } - if (InventoryName == "标准目录有效清单") + if (master.InventoryName == "标准目录有效清单") { sql += "and (FILE_PATH like'企业标准'"; ExcelName = "标准目录有效清单"; } - if (InventoryName == "企业标准明细表") + if (master.InventoryName == "企业标准明细表") { sql += "and (FILE_PATH like'企业标准'"; ExcelName = "企业标准明细表"; } - if (InventoryName == "过期标准清单") + if (master.InventoryName == "过期标准清单") { sql += "and (FILE_PATH like'%过期标准%'"; ExcelName = "过期标准清单"; } - if (InventoryName == "参考标准清单") + if (master.InventoryName == "参考标准清单") { sql += "and (FILE_PATH like'%参考标准%'"; ExcelName = "参考标准清单"; } - if (InventoryName == "工艺卡清单") + if (master.InventoryName == "工艺卡清单") { sql += "and (FILE_PATH like'%170钢管厂工艺卡%' or FILE_PATH like'%219钢管厂工艺卡%' or FILE_PATH like'%460钢管厂工艺卡%' or FILE_PATH like'%170热处理工艺卡%' or FILE_PATH like'%连模铸系列工艺卡/转炉厂%' or FILE_PATH like'%连模铸系列工艺卡/特冶厂%' or FILE_PATH like'%连模铸系列工艺卡/电炉厂%' or FILE_PATH like'%电炉厂工艺卡%' or FILE_PATH like'%转炉厂工艺卡%' or FILE_PATH like'%特冶厂工艺卡%' or FILE_PATH like'%大棒厂工艺卡%' or FILE_PATH like'%小棒厂工艺卡%' or FILE_PATH like'%中棒厂工艺卡%'or FILE_PATH like'%锻造厂工艺卡%' or FILE_PATH like'%扁棒厂工艺卡%')"; ExcelName = "工艺卡清单"; } - if (InventoryName == "工艺规程清单") + if (master.InventoryName == "工艺规程清单") { sql += "and FILE_PATH like'%工艺规程%'"; ExcelName = "工艺规程清单"; } - if (InventoryName == "技术制度清单") + if (master.InventoryName == "技术制度清单") { sql += "and FILE_PATH like'%技术制度%'"; ExcelName = "技术制度清单"; } - if (InventoryName == "艺字工艺清单") + if (master.InventoryName == "艺字工艺清单") { sql += "and FILE_PATH like'%艺字工艺%'"; ExcelName = "艺字工艺清单"; } - if (InventoryName == "技字通知清单") + if (master.InventoryName == "技字通知清单") { sql += "and FILE_PATH like'%技字通知%'"; ExcelName = "技字通知清单";