From dabfdd9dbf0364b1134daaad86af7e13f6437295 Mon Sep 17 00:00:00 2001
From: xwt <2740516069@qq.com>
Date: 星期四, 30 十月 2025 12:40:30 +0800
Subject: [PATCH] XJ,SJ,RKJ检验项目序号,LLJ单个检验项目FTP附件信息
---
StandardInterface/MESApplication/Controllers/QC/LljController.cs | 58 ++++++++++++++++++++--------------------------------------
1 files changed, 20 insertions(+), 38 deletions(-)
diff --git a/StandardInterface/MESApplication/Controllers/QC/LljController.cs b/StandardInterface/MESApplication/Controllers/QC/LljController.cs
index 2aa6f2a..6c6bea7 100644
--- a/StandardInterface/MESApplication/Controllers/QC/LljController.cs
+++ b/StandardInterface/MESApplication/Controllers/QC/LljController.cs
@@ -366,10 +366,21 @@
public ResponseResult GetAttachments([FromBody] JObject data)
{
var itemNo = data["itemNo"]?.ToString();
+ var fversion = data["fversion"]?.ToString();
+ var fromPage = data["fromPage"]?.ToString();
+
+ // 鏍规嵁鏉ユ簮椤甸潰鍐冲畾鏄惁杩囨护
+ string filterFversion = null;
+ if (fromPage == "Detail" && !string.IsNullOrEmpty(fversion))
+ {
+ filterFversion = fversion; // Detail椤甸潰闇�瑕佽繃婊�
+ }
+ // Add椤甸潰涓嶄紶閫抐ilterFversion锛屾樉绀烘墍鏈夐檮浠�
+
try
{
dynamic resultInfos = new System.Dynamic.ExpandoObject();
- var tbBillList = new LljService().GetAttachments(itemNo);
+ var tbBillList = new LljService().GetAttachments(itemNo, filterFversion);
if (tbBillList == null || tbBillList.Count == 0)
{
return new ResponseResult
@@ -394,7 +405,7 @@
}
[HttpGet("PreviewFtpFile")]
- public IActionResult PreviewFtpFile([FromQuery] string itemNo, [FromQuery] string fileName, [FromQuery] string ftpServer)
+ public IActionResult PreviewFtpFile([FromQuery] string itemNo, [FromQuery] string fileName, [FromQuery] string ftpServer, [FromQuery] string fversion = null)
{
try
{
@@ -405,7 +416,7 @@
Response.Headers.Add("Access-Control-Expose-Headers", "Content-Type, Content-Length");
var service = new LljService();
- var fileBytes = service.GetFtpFile(itemNo, fileName, ftpServer);
+ var fileBytes = service.GetFtpFile(itemNo, fileName, ftpServer, fversion);
if (fileBytes == null || fileBytes.Length == 0)
{
@@ -424,7 +435,7 @@
}
[HttpGet("DownloadFtpFile")]
- public IActionResult DownloadFtpFile([FromQuery] string itemNo, [FromQuery] string fileName, [FromQuery] string ftpServer)
+ public IActionResult DownloadFtpFile([FromQuery] string itemNo, [FromQuery] string fileName, [FromQuery] string ftpServer, [FromQuery] string fversion = null)
{
try
{
@@ -435,7 +446,7 @@
Response.Headers.Add("Access-Control-Expose-Headers", "Content-Disposition, Content-Length, Content-Type");
var service = new LljService();
- var fileBytes = service.GetFtpFile(itemNo, fileName, ftpServer);
+ var fileBytes = service.GetFtpFile(itemNo, fileName, ftpServer, fversion);
if (fileBytes == null || fileBytes.Length == 0)
{
@@ -559,10 +570,9 @@
data = null
};
}
-
dynamic resultInfos = new System.Dynamic.ExpandoObject();
var materialInfo = new LljService().GetMaterialByBarcode(data.itemBarcode, data.currentBillNo);
-
+
if (materialInfo == null || materialInfo.Count == 0)
{
return new ResponseResult
@@ -572,7 +582,6 @@
data = null
};
}
-
resultInfos.tbBillList = materialInfo;
return new ResponseResult
{
@@ -591,7 +600,6 @@
};
}
}
-
/// <summary>
/// 鏌ヨ鐮村潖瀹為獙璁板綍鏄惁瀛樺湪
/// </summary>
@@ -611,7 +619,6 @@
data = null
};
}
-
if (string.IsNullOrEmpty(data.releaseNo))
{
return new ResponseResult
@@ -621,12 +628,9 @@
data = null
};
}
-
var exists = new LljService().CheckPhsyRecordExists(data.billNo, data.releaseNo);
-
dynamic resultInfos = new System.Dynamic.ExpandoObject();
resultInfos.exists = exists;
-
return new ResponseResult
{
status = 0,
@@ -644,7 +648,6 @@
};
}
}
-
/// <summary>
/// 璋冪敤鐮村潖瀹為獙瀛樺偍杩囩▼
/// </summary>
@@ -664,7 +667,6 @@
data = null
};
}
-
if (string.IsNullOrEmpty(data.billNo))
{
return new ResponseResult
@@ -674,7 +676,6 @@
data = null
};
}
-
if (data.yqty <= 0)
{
return new ResponseResult
@@ -684,7 +685,6 @@
data = null
};
}
-
if (data.cqty <= 0)
{
return new ResponseResult
@@ -694,7 +694,6 @@
data = null
};
}
-
if (string.IsNullOrEmpty(data.releaseNo))
{
return new ResponseResult
@@ -704,20 +703,17 @@
data = null
};
}
-
var (result, message) = new LljService().CallPhsyUpdateProcedure(
- data.itemBarcode,
- data.yqty,
- data.cqty,
+ data.itemBarcode,
+ data.yqty,
+ data.cqty,
data.billNo,
data.lx,
data.releaseNo,
data.itemId);
-
dynamic resultInfos = new System.Dynamic.ExpandoObject();
resultInfos.result = result;
resultInfos.message = message;
-
return new ResponseResult
{
status = result,
@@ -735,7 +731,6 @@
};
}
}
-
public class GetWomdabRequest
{
public string daa001 { get; set; }
@@ -747,7 +742,6 @@
public string itemBarcode { get; set; }
public string currentBillNo { get; set; }
}
-
public class PhsyUpdateRequest
{
public string itemBarcode { get; set; }
@@ -758,13 +752,11 @@
public string releaseNo { get; set; } // 妫�楠屽崟鍙�
public decimal? itemId { get; set; } // 鐗╂枡ID
}
-
public class CheckPhsyRecordRequest
{
public string billNo { get; set; }
public string releaseNo { get; set; }
}
-
[HttpPost("GetPhsyRecordInfo")]
public ResponseResult GetPhsyRecordInfo([FromBody] CheckPhsyRecordRequest data)
{
@@ -779,7 +771,6 @@
data = null
};
}
-
if (string.IsNullOrEmpty(data.releaseNo))
{
return new ResponseResult
@@ -789,9 +780,7 @@
data = null
};
}
-
var records = new LljService().GetPhsyRecordInfo(data.billNo, data.releaseNo);
-
return new ResponseResult
{
status = 0,
@@ -809,7 +798,6 @@
};
}
}
-
/// <summary>
/// 璁剧疆鍫电┐淇℃伅
/// </summary>
@@ -829,7 +817,6 @@
data = null
};
}
-
if (string.IsNullOrEmpty(data.blockedHoles))
{
return new ResponseResult
@@ -839,7 +826,6 @@
data = null
};
}
-
if (data.itemId <= 0)
{
return new ResponseResult
@@ -849,9 +835,7 @@
data = null
};
}
-
var (result, message) = new LljService().SetBlockedHoles(data.releaseNo, data.blockedHoles, data.itemId);
-
return new ResponseResult
{
status = result,
@@ -869,8 +853,6 @@
};
}
}
-
-
public class SetBlockedHolesRequest
{
public string releaseNo { get; set; }
--
Gitblit v1.9.3