From 985f161acf8b2a45ac7e452adee1e2fac5f37439 Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期三, 24 十二月 2025 14:40:20 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 54 ++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 46 insertions(+), 8 deletions(-)
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index 871fe78..e21742b 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -15653,12 +15653,23 @@
[HttpPost]
public object UploadFile_Gy_QCVerification()
{
-
+ string path = "";
string HBillNo = HttpContext.Current.Request.Params["HBillNo"]; //鍗曟嵁鍙�
string HRemark = HttpContext.Current.Request.Params["HRemark"]; //澶囨敞
string HUserName = HttpContext.Current.Request.Params["HUserName"]; //鍒涘缓浜�
- HttpPostedFile files = HttpContext.Current.Request.Files["file"];
- string path = HttpContext.Current.Server.MapPath("~/../Files/Gy_QCVerification/" + HBillNo);
+ HttpPostedFile files = HttpContext.Current.Request.Files["file"];
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍑礉濂堢壒")
+ {
+ path = "D:/缃戠珯鍙戝竷/LAYUI/Files/Gy_QCVerification/" + HBillNo;
+ }
+ else
+ {
+ path = HttpContext.Current.Server.MapPath("~/../Files/Gy_QCVerification/" + HBillNo);
+ }
+ }
dynamic dyResult = UploadFile_Gy_QCVerification(files, path, HBillNo, HRemark, HUserName);
if (dyResult != null && dyResult.result == 1)
{
@@ -15713,7 +15724,20 @@
{
File.Delete(fileurl); //鍒犻櫎鎸囧畾鏂囦欢
files.SaveAs(fileurl);
- string StrPath = "/files/Gy_QCVerification/" + HBillNo + "/" + filename;
+ string StrPath = "";
+
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍑礉濂堢壒")
+ {
+ StrPath = "D:/缃戠珯鍙戝竷/LAYUI/Files/Gy_QCVerification/" + HBillNo + "/" + filename;
+ }
+ else
+ {
+ StrPath = "/files/Gy_QCVerification/" + HBillNo + "/" + filename;
+ }
+ }
if (File.Exists(fileurl))
{
//杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱
@@ -15773,8 +15797,19 @@
[HttpGet]
public object Gy_QCVerification_Filelist(string HBillNo)
{
- var url = fileip + "/Files/Gy_QCVerification/" + HBillNo + "/";
-
+ string Ret = "";
+ var url = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍑礉濂堢壒")
+ {
+ url = "D:/缃戠珯鍙戝竷/LAYUI/Files/Gy_QCVerification/" + HBillNo + "/";
+ }
+ else
+ {
+ url = fileip + "/Files/Gy_QCVerification/" + HBillNo + "/";
+ }
+ }
try
{
ds = oCN.RunProcReturn("select *,'" + url + "'+CAST(HFileName as varchar(200))as url from MES_AccessoriesList where HSourceBillNo='" + HBillNo + "'", "MES_AccessoriesList");
@@ -15808,8 +15843,7 @@
{
oCN.RunProc("delete from MES_AccessoriesList where HItemID =" + HItemID);
- string fileurl = Path.Combine(HttpContext.Current.Server.MapPath("~/../Files/Gy_QCVerification/" + HSourceBillNo), HFileName);
- File.Delete(fileurl); //鍒犻櫎鎸囧畾鏂囦欢
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
@@ -15825,7 +15859,11 @@
return objJsonResult;
}
}
+
+
#endregion
+
+
#endregion
--
Gitblit v1.9.1