From 4709166614ea10ba442400992cade48c4c9ef00d Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期五, 09 六月 2023 17:18:06 +0800
Subject: [PATCH] 提料计划信息导入
---
WebAPI/Controllers/SCGL/日计划管理/Sc_JIT_ComplementGoodBillController.cs | 401 ++++++++++++++++++++++++++++++++++++++++++++++++++
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 12 +
WebAPI/Controllers/Sc_ProcessMangementController.cs | 17 +
3 files changed, 428 insertions(+), 2 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index ae497c1..12880dd 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -221,6 +221,18 @@
}
}
}
+ //鍒ゆ柇瀹㈡埛涓虹憺涓庣ズ
+ else if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�")
+ {
+ if (HEmpID == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎿嶄綔鍛樻病鏈夐�夋嫨锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
}
//if (HCenterID == 0)
diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Sc_JIT_ComplementGoodBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Sc_JIT_ComplementGoodBillController.cs"
index 87870f3..d00e673 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Sc_JIT_ComplementGoodBillController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Sc_JIT_ComplementGoodBillController.cs"
@@ -3,9 +3,11 @@
using System;
using System.Collections.Generic;
using System.Data;
+using System.IO;
using System.Linq;
using System.Web;
using System.Web.Http;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
using WebAPI.Models;
namespace WebAPI.Controllers.SCGL
@@ -554,6 +556,405 @@
}
#endregion
+ #region 鎻愭枡璁″垝淇℃伅 鏂囦欢涓婁紶
+ [Route("Cg_PODemandPlanConfigBill/Cg_PODemandPlanConfigBill_Excel")]
+ [HttpPost]
+ public object Cg_PODemandPlanConfigBill_Excel()
+ {
+ try
+ {
+ //var WorkBookName = HttpContext.Current.Request["WorkBookName"];
+ //DBUtility.ClsPub.HOrgID = long.Parse(HttpContext.Current.Request["HOrgID"]);
+ //鑾峰彇鏂囦欢鍚嶇О
+ var file = HttpContext.Current.Request.Files[0];
+ //鑾峰彇鏂囦欢鐗╃悊璺緞
+ string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+ //淇濆瓨鏂囦欢
+ file.SaveAs(ExcelPath);
+
+ NpoiHelper np = new NpoiHelper();
+ DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+ //鍒犻櫎鏂囦欢
+ File.Delete(ExcelPath);
+
+ //鍒涘缓涓存椂琛�
+ DataTable tb2 = new DataTable("dt2");
+
+ //娣诲姞鍒楀悕
+ for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+ {
+ tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+ }
+
+ //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+ tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+ tb2.Columns.Add("HSupID", typeof(Int32));//渚涘簲鍟�
+ tb2.Columns.Add("HMaterID", typeof(Int32));//鐗╂枡ID
+ tb2.Columns.Add("HUnitID", typeof(Int32));//璁¢噺鍗曚綅
+
+ //娣诲姞鏁版嵁
+ for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+ {
+ DataRow row = tb2.NewRow();
+ for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+ {
+ row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+ }
+ tb2.Rows.Add(row);
+ }
+
+
+ var error = "";
+
+ //鏌ヨ宸ヨ壓璺嚎娌℃湁鐨勫垪
+ if (!tb2.Columns.Contains("缁勭粐缂栫爜"))
+ error += "娌℃湁鎵惧埌銆愮粍缁囩紪鐮併�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("缁勭粐"))
+ error += "娌℃湁鎵惧埌銆愮粍缁囥�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("渚涘簲鍟嗕唬鐮�"))
+ error += "娌℃湁鎵惧埌銆愪緵搴斿晢浠g爜銆戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("渚涘簲鍟�"))
+ error += "娌℃湁鎵惧埌銆愪緵搴斿晢銆戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("鐗╂枡浠g爜"))
+ error += "娌℃湁鎵惧埌銆愮墿鏂欎唬鐮併�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("鐗╂枡鍚嶇О"))
+ error += "娌℃湁鎵惧埌銆愮墿鏂欏悕绉般�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("瑙勬牸鍨嬪彿"))
+ error += "娌℃湁鎵惧埌銆愯鏍煎瀷鍙枫�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("璁¢噺鍗曚綅"))
+ error += "娌℃湁鎵惧埌銆愯閲忓崟浣嶃�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("JIT鐗╂枡鍒嗙被"))
+ error += "娌℃湁鎵惧埌銆怞IT鐗╂枡鍒嗙被銆戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("JIT鎷夊姩瀹夊叏搴撳瓨閲�"))
+ error += "娌℃湁鎵惧埌銆怞IT鎷夊姩瀹夊叏搴撳瓨閲忋�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("JIT鐗╂枡闇�姹備緵璐у懆鏈�"))
+ error += "娌℃湁鎵惧埌銆怞IT鐗╂枡闇�姹備緵璐у懆鏈熴�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("JIT鎻愯揣缁忔祹鎵归噺"))
+ error += "娌℃湁鎵惧埌銆怞IT鎻愯揣缁忔祹鎵归噺銆戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("JIT鎻愯揣鎵归噺瀵瑰簲鍛ㄦ湡锛堝ぉ锛�"))
+ error += "娌℃湁鎵惧埌銆怞IT鎻愯揣鎵归噺瀵瑰簲鍛ㄦ湡锛堝ぉ锛夈�戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("JIT渚涜揣鎻愬墠鏈燂紙澶╋級"))
+ error += "娌℃湁鎵惧埌銆怞IT渚涜揣鎻愬墠鏈燂紙澶╋級銆戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("JIT鍒拌揣鍓嶇疆鏈燂紙澶╋級"))
+ error += "娌℃湁鎵惧埌銆怞IT鍒拌揣鍓嶇疆鏈燂紙澶╋級銆戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("JIT閫佽揣鎺у埗澶╂暟"))
+ error += "娌℃湁鎵惧埌銆怞IT閫佽揣鎺у埗澶╂暟銆戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("JIT鏈�灏忚捣閫侀噺"))
+ error += "娌℃湁鎵惧埌銆怞IT鏈�灏忚捣閫侀噺銆戠殑鏍囬,";
+
+ if (!tb2.Columns.Contains("澶囨敞"))
+ error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
+
+ if (error.Length > 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+ {
+ string HORGNumber = "";
+ string HORGName = "";
+ string HSupNumer = "";
+ string HSupName = "";
+ string HMaterNumer = "";
+ string HMaterName = "";
+ string HMaterModel = "";
+ string HUntilName = "";
+
+ string JITType = "";//JIT鐗╂枡鍒嗙被
+ string JIPEB = ""; //JIT鎻愯揣缁忔祹鎵归噺
+ string JISLT = ""; //JIT渚涜揣鎻愬墠鏈燂紙澶╋級
+ string JIDLT = ""; //JIT鍒拌揣鍓嶇疆鏈燂紙澶╋級
+ string JIMLC = ""; //JIT鏈�灏忚捣閫侀噺
+
+ HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐缂栫爜"].ToString());
+ HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐"].ToString());
+ HSupNumer = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["渚涘簲鍟嗕唬鐮�"].ToString());
+ HSupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["渚涘簲鍟�"].ToString());
+ HMaterNumer = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鐗╂枡浠g爜"].ToString());
+ HMaterName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鐗╂枡鍚嶇О"].ToString());
+ HMaterModel = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["瑙勬牸鍨嬪彿"].ToString());
+ HUntilName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["璁¢噺鍗曚綅"].ToString());
+
+ JITType = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["JIT鐗╂枡鍒嗙被"].ToString());
+ JIPEB = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["JIT鎻愯揣缁忔祹鎵归噺"].ToString());
+ JISLT = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["JIT渚涜揣鎻愬墠鏈燂紙澶╋級"].ToString());
+ JIDLT = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["JIT鍒拌揣鍓嶇疆鏈燂紙澶╋級"].ToString());
+ JIMLC = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["JIT鏈�灏忚捣閫侀噺"].ToString());
+
+ //妫�鏌ョ墿鏂�
+ int index = i + 1;
+
+ if (HORGNumber != "")
+ {
+
+
+ //鏌ヨ缁勭粐
+ ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+ }
+ string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+
+ //鏌ヨ渚涘簲鍟�
+ ds = oCN.RunProcReturn("select * from Gy_Supplier where HNumber='" + HSupNumer + "' and HName='" + HSupName + "' and HUSEORGID=" + HORGid + "", "Gy_Supplier");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,渚涘簲鍟嗕笉瀛樺湪锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ tb2.Rows[i]["HSupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+ }
+
+ //鏌ヨ鐗╂枡
+ ds = oCN.RunProcReturn("select * from Gy_Material where HNumber='" + HMaterNumer + "' and HName='" + HMaterName + "' and HModel='" + HMaterModel + "' and HUSEORGID=" + HORGid + "", "Gy_Material");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,鐗╂枡涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ tb2.Rows[i]["HMaterID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+ }
+
+ //鏌ヨ璁¢噺鍗曚綅
+ ds = oCN.RunProcReturn("select * from Gy_Unit where HName='" + HUntilName + "' ", "Gy_Unit"); //and HUSEORGID=" + HORGid + "
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,璁¢噺鍗曚綅涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ tb2.Rows[i]["HUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+ }
+
+ //JIT鐗╂枡鍒嗙被
+ if (JITType == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绗�" + index + "琛�,JIT鐗╂枡鍒嗙被涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //JIT鎻愯揣缁忔祹鎵归噺
+ if (JIPEB == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绗�" + index + "琛�,JIT鎻愯揣缁忔祹鎵归噺涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //JIT渚涜揣鎻愬墠鏈燂紙澶╋級
+ if (JISLT == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绗�" + index + "琛�,JIT渚涜揣鎻愬墠鏈燂紙澶╋級涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //JIT鍒拌揣鍓嶇疆鏈燂紙澶╋級
+ if (JIDLT == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绗�" + index + "琛�,IT鍒拌揣鍓嶇疆鏈燂紙澶╋級涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //JIT鏈�灏忚捣閫侀噺
+ if (JIMLC == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绗�" + index + "琛�,JIT鏈�灏忚捣閫侀噺涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //瀹℃牳浠g爜鏄惁鍚堢悊
+ if (!DBUtility.ClsPub.AllowNumber(HMaterNumer))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绗�" + index + "琛�,鐗╂枡浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = error;
+ objJsonResult.data = tb2;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鎻愭枡璁″垝淇℃伅 瀵煎叆(淇濆瓨)
+ [Route("Cg_PODemandPlanConfigBill/Cg_PODemandPlanConfigBill_btnSave")]
+ [HttpPost]
+ public object Cg_PODemandPlanConfigBill_btnSave([FromBody] JObject sMainSub)
+ {
+ var _value = sMainSub["sMainSub"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string user = sArray[1].ToString();
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Cg_PODemandPlanConfigBill_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+ List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+ foreach (JObject item in Excel)
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ foreach (var itm in item.Properties())
+ {
+ dic.Add(itm.Name, itm.Value.ToString());
+ }
+ list.Add(dic);
+ }
+
+ oCN.BeginTran();
+
+ foreach (Dictionary<string, string> item in list)
+ {
+ long HInterID = DBUtility.ClsPub.CreateBillID_Prod("4611", ref DBUtility.ClsPub.sExeReturnInfo);//鑾峰緱涓�涓柊鐨刬d
+ string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod("4611", ref DBUtility.ClsPub.sExeReturnInfo, true);//鑾峰緱涓�涓柊鐨勫崟鎹彿
+ string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+ string HSupID = item["HSupID"].ToString();//渚涘簲鍟�
+ string HSupplierName = item["渚涘簲鍟�"].ToString();
+ string HMaterID = item["HMaterID"].ToString();//鐗╂枡ID
+ string HMaterName = item["鐗╂枡鍚嶇О"].ToString();
+ string HMaterModel = item["瑙勬牸鍨嬪彿"].ToString();
+ string HUnitID = item["HUnitID"].ToString();//璁¢噺鍗曚綅
+ string JITType = item["JIT鐗╂枡鍒嗙被"].ToString();
+ string JITPSL = item["JIT鎷夊姩瀹夊叏搴撳瓨閲�"].ToString();
+ string JITMDSC = item["JIT鐗╂枡闇�姹備緵璐у懆鏈�"].ToString();
+ string JIPEB = item["JIT鎻愯揣缁忔祹鎵归噺"].ToString();
+ string JITPBCC = item["JIT鎻愯揣鎵归噺瀵瑰簲鍛ㄦ湡锛堝ぉ锛�"].ToString();
+ string JISLT = item["JIT渚涜揣鎻愬墠鏈燂紙澶╋級"].ToString();
+ string JIDLT = item["JIT鍒拌揣鍓嶇疆鏈燂紙澶╋級"].ToString();
+ string JITDCD = item["JIT閫佽揣鎺у埗澶╂暟"].ToString();
+ string JIMLC = item["JIT鏈�灏忚捣閫侀噺"].ToString();
+ string HRemark = item["澶囨敞"].ToString();
+
+ int i = 1;
+ //涓昏〃
+ oCN.RunProc("insert into Cg_PODemandPlanConfigBillMain(HInterID,HBillNo,HYear,HPeriod,HBillType,HBillSubType,HDate,HBillStatus,HMaker,HMakeDate,HOrgId)" +
+ $"values({HInterID}, '{HBillNo}',{DateTime.Now.Year}, {DateTime.Now.Month}, '4611', '4611', GETDATE(), 1, '{user}', GETDATE(), {HOrgID})");
+ //瀛愯〃
+ oCN.RunProc("insert into Cg_PODemandPlanConfigBillSub(HInterID,HEntryID,HRemark,HSupplierID,HSupplierName,HMaterID," +
+ "HMaterName, HMaterModel, HJITMaterGroup, HJITSafeStock, HJITMaterDemand, HJITBatchQty, HDeliveryPeriod, " +
+ "HLeadTime, HLeadTime_Sec, HDeliveryMode, HDeliveryDaysCtrl)values" +
+ $"({HInterID}, {i}, '{HRemark}', {(HSupID == "" ? "0" : HSupID)}, '{HSupplierName}', {(HMaterID == "" ? "0" : HMaterID)}," +
+ $" '{HMaterName}', '{HMaterModel}', '{JITType}', {(JITPSL == "" ? "0" : JITPSL)}, {(JITMDSC == "" ? "0" : JITMDSC)},0,{(JITPBCC == "" ? "0" : JITPBCC)}," +
+ $" {(JISLT == "" ? "0" : JISLT)}, {(JIDLT == "" ? "0" : JIDLT)}, '', {(JITDCD == "" ? "0" : JITDCD)}) ");
+ }
+
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀵煎叆鎴愬姛!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#endregion
#region 鏃ヨ鍒掑钩鍙板熀纭�璧勬枡 瑕佹枡璁″垝淇℃伅
diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs
index d7c0ff4..ca35e9d 100644
--- a/WebAPI/Controllers/Sc_ProcessMangementController.cs
+++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -702,6 +702,19 @@
{
if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�")
{
+
+ //鍒ゆ柇閲戣澏浜戞槸鍚﹀凡缁忔湁鍏ュ簱鐨勬暟鎹�
+ ds = oCN.RunProcReturn($@"select * from AIS20220308151944..T_PRD_INSTOCK where FBILLNO='{BillNo}'", "T_PRD_INSTOCK");
+
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠鍑虹珯鍗曞彿宸插叆搴�,璇蜂笉瑕侀噸鏂板叆搴�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
//鍒ゆ柇閲戣澏浜戠敓浜ф眹鎶ュ崟 鏁伴噺 鏄惁 澶т簬 鏈亾鍑虹珯鏁伴噺
ds = oCN.RunProcReturn($@"select sum(FFinishQty)-sum(FSTOCKINQUASELQTY)-(select HQty from Sc_StationOutBillMain where HBillNo='{BillNo}')
from AIS20220308151944..T_PRD_MORPT rpt3
@@ -722,7 +735,7 @@
-
+
JObject model = new JObject();
@@ -1422,7 +1435,7 @@
return objJsonResult;
}
}
-
+
--
Gitblit v1.9.1