From 2d142a18b9bd53cd399f3610d71e2105779dceea Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期一, 12 一月 2026 15:28:45 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 53 +++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 43 insertions(+), 10 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 271740c..cefa5c5 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -2891,7 +2891,6 @@
string HUpDater = mainList[0].HUpDater;
string HMaterNumber = mainList[0].HMaterNumber;
string HSupNumber = mainList[0].HSupNumber;
- long HPrintQty = mainList[0].HPrintQty;
string HMouldOWNER = mainList[0].HMouldOWNER;
string HSaveLife = mainList[0].HSaveLife;
int HCaveQty = mainList[0].HCaveQty;
@@ -2949,7 +2948,7 @@
}
//=========================================================
- //涓昏〃
+ //涓昏〃
oCN.RunProc("UpDate Gy_MouldFileMain set " +
" HBillNo='" + HBillNo + "'" + //鍥哄畾璧嬪��===============
",HDate='" + HDate + "'" +
@@ -2979,7 +2978,6 @@
",HDeptID=" + HDeptID.ToString() +
",HSupID=" + HSupID.ToString() +
",HSupNumber='" + HSupNumber + "'" +
- ",HPrintQty=" + HPrintQty.ToString() +
",HMouldStatus='" + HMouldStatus + "'" +
",HSaveLife='" + HSaveLife + "'" +
",HWhID=" + HWHID.ToString() +
@@ -4922,11 +4920,23 @@
public object UploadFile_Gy_MouldFilen()
{
+ 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_MouldFilen/" + HBillNo);
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍑礉濂堢壒")
+ {
+ path = "D:/缃戠珯鍙戝竷/LAYUI/Files/Gy_MouldFilen/" + HBillNo;
+ }
+ else
+ {
+ path = HttpContext.Current.Server.MapPath("~/../Files/Gy_MouldFilen/" + HBillNo);
+ }
+ }
dynamic dyResult = UploadFile_Gy_MouldFilen(files, path, HBillNo, HRemark, HUserName);
if (dyResult != null && dyResult.result == 1)
{
@@ -4981,7 +4991,20 @@
{
File.Delete(fileurl); //鍒犻櫎鎸囧畾鏂囦欢
files.SaveAs(fileurl);
- string StrPath = "/files/Gy_MouldFilen/" + HBillNo + "/" + filename;
+ string StrPath = "";
+
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍑礉濂堢壒")
+ {
+ StrPath = "D:/缃戠珯鍙戝竷/LAYUI/Files/Gy_MouldFilen/" + HBillNo + "/" + filename;
+ }
+ else
+ {
+ StrPath = "/files/Gy_MouldFilen/" + HBillNo + "/" + filename;
+ }
+ }
if (File.Exists(fileurl))
{
//杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱
@@ -5041,7 +5064,19 @@
[HttpGet]
public object Gy_MouldFilen_Filelist(string HBillNo)
{
- var url = fileip + "/Files/Gy_MouldFilen/" + HBillNo + "/";
+ string Ret = "";
+ var url = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍑礉濂堢壒")
+ {
+ url = "D:/缃戠珯鍙戝竷/LAYUI/Files/Gy_MouldFilen/" + HBillNo + "/";
+ }
+ else
+ {
+ url = fileip + "/Files/Gy_MouldFilen/" + HBillNo + "/";
+ }
+ }
try
{
@@ -5075,9 +5110,7 @@
try
{
- oCN.RunProc("delete from MES_AccessoriesList where HItemID =" + HItemID);
- string fileurl = Path.Combine(HttpContext.Current.Server.MapPath("~/../Files/Gy_MouldFilen/" + HSourceBillNo), HFileName);
- File.Delete(fileurl); //鍒犻櫎鎸囧畾鏂囦欢
+ oCN.RunProc("delete from MES_AccessoriesList where HItemID =" + HItemID);
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
@@ -5103,7 +5136,7 @@
{
try
{
- ds = oCN.RunProcReturn($"select *,b.hname HMaterNumber from Gy_BarCodeBill a left join Gy_Material b on a.HMaterID=b.HItemID where HBarCode='{HbarCode}' ", "Gy_Material");
+ ds = oCN.RunProcReturn($"select *,b.hnumber HMaterNumber,b.hname HMaterName_m from Gy_BarCodeBill a with(nolock) left join Gy_Material b with(nolock) on a.HMaterID=b.HItemID where HBarCode='{HbarCode}' ", "Gy_Material");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
--
Gitblit v1.9.1