From 95406a6bf61a216c3791a6c2ecf912695d8b0528 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期四, 09 十一月 2023 16:30:10 +0800 Subject: [PATCH] 生产订单变更单:删除时判断单据是否审核,若已审核则删除失败 --- WebAPI/Controllers/CJGL/Cj_SingleStationController.cs | 127 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 127 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs index e0d8611..f88b6f5 100644 --- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs +++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs @@ -197,6 +197,18 @@ ,0,0,'','',0,0 ,0,'{HResult}',{oSub.HProcExchInterID},{oSub.HProcExchEntryID},'{oSub.HProcExchBillNo}')"); + //淇敼鏉$爜琛ㄧ殑鐘舵�� + oCN.RunProc("update Gy_BarCodeBill set HStatus='"+ HResult + "' where HBarCode='"+ oSub.HBarCode + "'"); + + //淇敼鍑虹珯鍗曠殑 涓嶈壇 鎶ュ簾鏁伴噺 + if (HResult == "涓嶈壇") { + oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID); + } + else if (HResult == "鎶ュ簾") + { + oCN.RunProc("update Sc_StationOutBillMain set HWasterQty+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID); + } + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = null; @@ -204,5 +216,120 @@ return objJsonResult; } #endregion + + #region 宸ュ簭鍗曞搧杩囩珯 娴佽浆鍗℃煡璇㈠叧閿欢娓呭崟 + [Route("Cj_SingleStation/HBardCodeBomList")] + [HttpGet] + public object HBardCodeBomList(string HBarCode, string user) + { + try + { + + ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBillHICOMProcessExchange where 鏉$爜='" + HBarCode + "'", "h_v_Gy_BarCodeBillHICOMProcessExchange"); + if (ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏉$爜鏌ユ棤鏁版嵁锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + 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 宸ュ簭鍗曞搧杩斾慨鍙� 鑾峰彇琛ㄦ牸鏁版嵁 + [Route("Cj_SingleStation/ProcessItemRepair")] + [HttpGet] + public object ProcessItemRepair( string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + + string sql = @"select * from h_v_Cj_BarCodeProcessItemRepair where 1=1 " + sWhere + " order by 鏃ユ湡 desc, HInterID desc, HEntryID desc"; + ds = oCN.RunProcReturn(sql, "h_v_Cj_BarCodeProcessItemRepair"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 宸ュ簭鍗曞搧杩斾慨鍙�--閰嶄欢鏇存崲 鏌ヨ鏇存崲璁板綍 + [Route("Cj_SingleStation/Sc_SourceLineRepairBillSub_MaterList")] + [HttpGet] + public object Sc_SourceLineRepairBillSub_MaterList(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + + string sql = @"select * from Sc_SourceLineRepairBillSub_Mater where 1=1 " + sWhere + " order by HInterID asc, HEntryID asc"; + ds = oCN.RunProcReturn(sql, "Sc_SourceLineRepairBillSub_Mater"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion } } \ No newline at end of file -- Gitblit v1.9.1