From 2ed7db74976db41fd445ff313e3f5042220fe2eb Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期二, 23 十二月 2025 11:11:38 +0800
Subject: [PATCH] 新增根据物料获取工艺路线工作中心下的产线方法,新增凯贝扫描客户条码解析方法
---
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 47 +++++++++++++++++++++++++++++++++++++++++------
1 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index f6d5708..50c5e22 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -4922,11 +4922,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 +4993,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 +5066,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 +5112,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 = "鍒犻櫎鎴愬姛锛�";
--
Gitblit v1.9.1