From dc719f0fc2d595a3b4ad51415a8bcf2b8eecde44 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期五, 06 十二月 2024 16:52:48 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/条码管理/WEBSController.cs | 153 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 145 insertions(+), 8 deletions(-) diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" index 65accf5..9e6e063 100644 --- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" +++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" @@ -1072,6 +1072,90 @@ #region 鎵爜妯″潡璋冪敤鏂规硶 + #region 鍏朵粬鍏ュ簱 鑾峰彇鍏ュ簱绫诲瀷 + + /// <summary> + /// 鑾峰彇鍏ュ簱绫诲瀷 + /// </summary> + /// <returns></returns> + [Route("WEBSController/GetStockInStyle_Json")] + [HttpGet] + public Object GetStockInStyle_Json() + { + try + { + ds = oWebs.get_StockInStyle(); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ涓嶅埌鍏ュ簱绫诲瀷淇℃伅锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鎴愬姛"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鑾峰彇鍏ュ簱绫诲瀷淇℃伅澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + #region 鍏朵粬鍑哄簱 鑾峰彇鍑哄簱绫诲瀷 + + /// <summary> + /// 鑾峰彇鍑哄簱绫诲瀷 + /// </summary> + /// <returns></returns> + [Route("WEBSController/GetStockOutStyle_Json")] + [HttpGet] + public Object GetStockOutStyle_Json() + { + try + { + ds = oWebs.get_StockOutStyle(); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ涓嶅埌鍑哄簱绫诲瀷淇℃伅锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鎴愬姛"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鑾峰彇鍑哄簱绫诲瀷淇℃伅澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + #region 鐩存帴璋冩嫧 鑾峰彇璋冩嫧鍑鸿揣绫诲瀷 /// <summary> @@ -1396,6 +1480,50 @@ } #endregion + + + #region 鎵爜妯″潡 瀹㈡埛銆佷紶绁ㄣ�佹潯鐮侀獙璇佽皟鐢� + + /// <summary> + /// 鎵爜妯″潡 瀹㈡埛銆佷紶绁ㄣ�佹潯鐮侀獙璇佽皟鐢� + /// </summary> + /// <returns></returns> + [Route("WEBSController/GetCheakBarCodeAndCP_Json")] + [HttpGet] + public object GetCheakBarCodeAndCP_Json(long HCusID, string HCP, string HBarCode) + { + try + { + HBarCode = HBarCode.Trim(); + if (oWebs.Get_CheakBarCodeAndCP(HCusID, HCP, HBarCode, ref DBUtility.ClsPub.sErrInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛� + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛� + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹㈡埛銆佷紶绁ㄣ�佹潯鐮侀獙璇佸け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + #endregion @@ -4482,7 +4610,7 @@ FentityModel.Add("FKEEPERID", new JObject() { ["FNumber"] = item["淇濈鑰呬唬鐮�"].ToString() }); // 淇濈鑰呬唬鐮� FentityModel.Add("FAuxPropId", new JObject() { ["FAUXPROPID__FF100003"] = new JObject() { ["FNumber"] = item["杈呭姪灞炴�т唬鐮�"].ToString() } }); // 杈呭姪灞炴�� FentityModel.Add("FExtAuxUnitId", new JObject() { ["FNumber"] = item["杈呰閲忓崟浣嶄唬鐮�"].ToString() }); // 杈呭崟浣� - FentityModel.Add("FExtAuxUnitQty", item["绠辨暟"].ToString()); //绠辨暟 + FentityModel.Add("FExtAuxUnitQty", item["鏄庣粏绠辨暟"].ToString()); //绠辨暟 FentityModel.Add("F_TFKO_Assistant", new JObject() { ["FNumber"] = item["缃戝埆浠g爜"].ToString() }); // 缃戝埆 ???蹇呭~ FentityModel.Add("F_TFKO_Assistant1", new JObject() { ["FNumber"] = item["瀛斿瀷浠g爜"].ToString() }); // 瀛斿瀷 FentityModel.Add("F_TFKO_Assistant2", new JObject() { ["FNumber"] = item["鑹叉辰浠g爜"].ToString() }); // 鑹叉辰 ???蹇呭~ @@ -4611,15 +4739,16 @@ } } } + + //鏇存柊鏉$爜婧愬崟id淇℃伅 + sql = string.Format($@"update a set HSourceInterID = b.FID,HSourceEntryID = c.FEntryID from Gy_BarCodeBill a left join AIS20220609121235..TFKO_t_Cust100009 b on a.HSourceBillNo = b.FBillNo left join AIS20220609121235..TFKO_t_Cust_Entry100065 c on b.FID = C.FID and a.HBarcodeNo = c.FSEQ where HSourceBillNo = '{HSourceBillNo_TB}'"); + //鎵ц鏇存柊璇彞 + oCn.RunProc(sql); + } } - sJXCode = sBarCode; - - //鏇存柊鏉$爜婧愬崟id淇℃伅 - sql = string.Format($@"update a set HSourceInterID = b.FID,HSourceEntryID = c.FEntryID from Gy_BarCodeBill a left join AIS20220609121235..TFKO_t_Cust100009 b on a.HSourceBillNo = b.FBillNo left join AIS20220609121235..TFKO_t_Cust_Entry100065 c on b.FID = C.FID and a.HBarcodeNo = c.FSEQ where HSourceBillNo = '{HSourceBillNo_TB}'"); - //鎵ц鏇存柊璇彞 - oCn.RunProc(sql); + sJXCode = sBarCode; } else { @@ -4963,7 +5092,15 @@ objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; + objJsonResult.data = new + { + Materlist = ds.Tables[0], //杩斿洖鐗╂枡鏄庣粏鍒楄〃淇℃伅锛�0锛� + Mouldlist = ds.Tables[1], //杩斿洖妯℃不鍏峰垪琛ㄤ俊鎭紙1锛� + FIFOlist = ds.Tables[2], //杩斿洖鍏堣繘鍏堝嚭鍒楄〃淇℃伅锛�2锛� + BarCodelist = ds.Tables[3], //杩斿洖鏉$爜鏄庣粏鍒楄〃淇℃伅锛�3锛� + ICMOReportlist = ds.Tables[4], //杩斿洖婧愬崟鐢熶骇姹囨姤鍗曟潯鐮佹槑缁嗗垪琛ㄤ俊鎭紙4锛� + BarCodeDetailslist = ds.Tables[5] //杩斿洖褰撳墠鎵�鎵弿鏉$爜鏄庣粏淇℃伅锛�5锛� + }; return objJsonResult; } else -- Gitblit v1.9.1