From 7be83034022d9f3b12b198a3ed820bdd7e0900ad Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期一, 25 十二月 2023 18:33:41 +0800
Subject: [PATCH] 模具清单查看履历接口修改
---
VueWebCoreApi/appsettings.json | 2 +-
VueWebCoreApi/Controllers/DeviceManagerController.cs | 2 ++
VueWebCoreApi/DLL/DAL/MouldManagerDAL.cs | 29 ++++++++++++++++-------------
3 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/VueWebCoreApi/Controllers/DeviceManagerController.cs b/VueWebCoreApi/Controllers/DeviceManagerController.cs
index 90a46b1..5b32f7e 100644
--- a/VueWebCoreApi/Controllers/DeviceManagerController.cs
+++ b/VueWebCoreApi/Controllers/DeviceManagerController.cs
@@ -614,6 +614,8 @@
/// <param name="repairdate">淇濆吇鏃堕棿</param>
/// <param name="repairresult">淇濆吇缁撴灉</param>
/// <returns></returns>
+ [Route(template: "DeviceRepairTakeSearch")]
+ [HttpGet]
public JsonResult DeviceRepairTakeSearch(int page, int rows, string prop, string order, string wkshopcode = null, string eqpcode = null,string eqpname=null, string stanedname = null, string repairuser = null, string repairdate = null, string repairresult = null)
{
var token = HttpContext.Request.Headers["Token"].ToString();
diff --git a/VueWebCoreApi/DLL/DAL/MouldManagerDAL.cs b/VueWebCoreApi/DLL/DAL/MouldManagerDAL.cs
index 713538e..de5c511 100644
--- a/VueWebCoreApi/DLL/DAL/MouldManagerDAL.cs
+++ b/VueWebCoreApi/DLL/DAL/MouldManagerDAL.cs
@@ -250,6 +250,7 @@
string search = "";
try
{
+ dynamicParams.Add("@mouldcode", mouldcode);
if (opendate != "" && opendate != null)
{
search += "and AA.operdate between @opendate and @closedate ";
@@ -258,44 +259,46 @@
}
// --------------鏌ヨ鎸囧畾鏁版嵁--------------
var total = 0; //鎬绘潯鏁�
- var sql = @"select * from (
+ var sql = @"select top 100 percent AA.*,U.username as operusername from (
select '鐐规' as opertype,chk_user as operuser,chk_date as operdate,chk_result as operresult
- from TMouldchk_Proc_Main where mould_code='001'
+ from TMouldchk_Proc_Main where mould_code=@mouldcode
union all
select '淇濆吇' as opertype,maint_user as operuser,maint_date as operdate,maint_result as operresult
- from TMouldmaint_Proc_Main where mould_code='001'
+ from TMouldmaint_Proc_Main where mould_code=@mouldcode
union all
select '寰呯淮淇�' as opertype,request_person as operuser,request_date as operdate,'缁翠慨鐢宠' as operresult
- from TMould_RepairRequest where mould_code='001'
+ from TMould_RepairRequest where mould_code=@mouldcode
union all
select '宸茬淮淇�' as opertype,repair_person as operuser,repair_date as operdate,'缁翠慨瀹屾垚' as operresult
from TMould_RepairRequest A
inner join TMould_Repair B on A.docu_code=B.source_wo
- where A.mould_code='001' and B.repair_person<>''
+ where A.mould_code=@mouldcode and B.repair_person<>''
union all
select '宸查獙璇�' as opertype,verify_person as operuser,verify_date as operdate,B.verify_result as operresult
from TMould_RepairRequest A
inner join TMould_Repair B on A.docu_code=B.source_wo
- where A.mould_code='001' and B.verify_person<>''
+ where A.mould_code=@mouldcode and B.verify_person<>''
union all
select '宸蹭笂鏈�' as opertype,lm_user as operuser,lm_date as operdate,eqp_code as operresult
- from TMould_UpDownReord where mould_code='001' and type='UP'
+ from TMould_UpDownReord where mould_code=@mouldcode and type='UP'
union all
select '宸蹭笅鏈�' as opertype,lm_user as operuser,lm_date as operdate,eqp_code as operresult
- from TMould_UpDownReord where mould_code='001' and type='DOWN'
+ from TMould_UpDownReord where mould_code=@mouldcode and type='DOWN'
union all
select '宸插叆搴�' as opertype,lm_user as operuser,lm_date as operdate,warehouse_code as operresult
- from TMould_InOutReord where mould_code='001' and type='IN'
+ from TMould_InOutReord where mould_code=@mouldcode and type='IN'
union all
select '宸插嚭搴�' as opertype,lm_user as operuser,lm_date as operdate,warehouse_code as operresult
- from TMould_InOutReord where mould_code='001' and type='OUT'
+ from TMould_InOutReord where mould_code=@mouldcode and type='OUT'
union all
select '宸插鍊�' as opertype,lm_user as operuser,lm_date as operdate,description as operresult
- from TMould_LendOutReord where mould_code='001' and type='OUT'
+ from TMould_LendOutReord where mould_code=@mouldcode and type='OUT'
union all
select '宸插綊杩�' as opertype,lm_user as operuser,lm_date as operdate,description as operresult
- from TMould_LendOutReord where mould_code='001' and type='IN'
- ) as AA where 1=1 "+search+" order by AA.operdate desc ";
+ from TMould_LendOutReord where mould_code=@mouldcode and type='IN'
+ ) as AA
+ left join TUser U on AA.operuser=U.usercode
+ where 1=1 " + search+" order by AA.operdate desc ";
var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total);
mes.code = "200";
mes.message = "鏌ヨ鎴愬姛!";
diff --git a/VueWebCoreApi/appsettings.json b/VueWebCoreApi/appsettings.json
index 9b7ac9f..ba8ed33 100644
--- a/VueWebCoreApi/appsettings.json
+++ b/VueWebCoreApi/appsettings.json
@@ -25,7 +25,7 @@
//session澶辨晥鏃堕棿
"InProc": "240",
//Excel瀵煎嚭妯℃澘閰嶇疆IP
- "FileIP": "http://121.196.36.24:8021/",
+ "FileIP": "http://121.196.36.24:8025/",
//jwtkey
"SigningKey": "Hello World"
}
--
Gitblit v1.9.3