From 19466feafef7d2be476ead4170d75af84781a9fe Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期五, 01 十二月 2023 09:21:03 +0800 Subject: [PATCH] 判断 子件条码 是否属于当前流转卡 --- WebAPI/Controllers/LMESController.cs | 134 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 134 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs index 6c3b6b9..e8c64b8 100644 --- a/WebAPI/Controllers/LMESController.cs +++ b/WebAPI/Controllers/LMESController.cs @@ -1099,6 +1099,36 @@ } /// <summary> + /// 鍒犻櫎瀵瑰簲鐨勫寘瑁呭崟 + /// </summary> + /// <param name="sWhere"></param> + /// <returns></returns> + [Route("LEMS/DelMES_ProductionLinePackagingList")] + [HttpGet] + public object DelMES_ProductionLinePackagingList(string HInterID) + { + try + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + oCN.RunProc("Delete from Sc_PackUnionBillMain where HInterID = " + HInterID); + oCN.RunProc("Delete from Sc_PackUnionBillSub where HInterID = " + HInterID); + oCN.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID = " + HInterID); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍒犻櫎澶辫触锛�"; + objJsonResult.data = e.ToString(); + return objJsonResult; + } + } + /// <summary> /// 鎵壒娆℃潯鐮佹柟娉曪紙浜х嚎缁勮杩芥函鍗曪級--鏍规嵁鎵规鏉$爜鍒版潯鐮佹。妗堣〃涓幏鍙栨暟鎹繚瀛樺埌temp琛� ///鍙傛暟锛歴tring sql銆� ///杩斿洖鍊硷細object銆� @@ -1225,6 +1255,110 @@ } } + //鍒ゆ柇鏉$爜鏄惁鏄笉鑹殑鐘舵�� + [Route("LEMS/HbadStaus")] + [HttpGet] + public object HbadStaus(string SubBarcode) + { + DataSet ds; + try + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + ds = oCN.RunProcReturn(@"select HBillNo,HReasult from tiaom where HBillNo='" + SubBarcode + @"' +union +select HBarCode HBillNo,HStatus HReasult from Gy_BarCodeBill +where HBarCode='" + SubBarcode + "'", "Gy_BarCodeBill"); + if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "ok!"; + objJsonResult.data = null; + return objJsonResult; + } + else if (ds.Tables[0].Rows[0]["HReasult"].ToString() =="涓嶈壇") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "褰撳墠鏉$爜鐨勭姸鎬佷负:"+ ds.Tables[0].Rows[0]["HReasult"].ToString() + "锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = null; + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "寮傚父锛�"; + objJsonResult.data = e.ToString(); + return objJsonResult; + } + } + + //鍒ゆ柇鏉$爜涔嬪墠鐨勫伐搴忔槸鍚﹀嚭绔� + [Route("LEMS/SNBarcodeProcCtrl")] + [HttpGet] + public object SNBarcodeProcCtrl(string SubBarcode,string HProcExchBillNo) + { + DataSet ds; + try + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + ds = oCN.RunProcReturn(" select * from Gy_BarCodeBill where HSourceBillNo='" + HProcExchBillNo + "' and HBarCode='" + SubBarcode + "'", "Gy_BarCodeBill"); + if (ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ユ棤鏁版嵁,鏉$爜:" + SubBarcode + "涓嶅睘浜庡綋鍓嶆祦杞崱:" + HProcExchBillNo + "!"; + objJsonResult.data = null; + return objJsonResult; + } + + ds = oCN.RunProcReturn(@"exec h_p_Sc_SNBarcodeProcCtrl '" + SubBarcode + "'", "h_p_Sc_SNBarcodeProcCtrl"); + if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ユ棤鏁版嵁!"; + objJsonResult.data = null; + return objJsonResult; + } + else if (ds.Tables[0].Rows[0]["HBack"].ToString() == "2") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = ds.Tables[0].Rows[0]["HBackRemark"].ToString() + "锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = null; + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "寮傚父锛�"; + objJsonResult.data = e.ToString(); + return objJsonResult; + } + } + + //鍒ゆ柇鎬荤殑鍖呰鏁伴噺鏄惁瓒呰繃娴佽浆鍗℃暟閲� [Route("LEMS/h_p_Sc_ProductionLinePackaging_Checkqty")] [HttpGet] -- Gitblit v1.9.1