From aa92c97c1c87db25ba22fdaf0f6d398e2a2e67df Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期五, 18 十月 2024 15:02:39 +0800 Subject: [PATCH] 添加工艺路线系统参数,是否启用多级审批 --- WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs | 121 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 113 insertions(+), 8 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs b/WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs index f4ec9b4..223e3db 100644 --- a/WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs +++ b/WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs @@ -110,7 +110,7 @@ return objJsonResult; } - ds = oCN.RunProcReturn("select * from h_v_Sc_WorkBeginDotCheckBillMainList where HInterID = " + HInterID, " h_v_Sc_WorkBeginDotCheckBillMainList"); + ds = oCN.RunProcReturn("select * from h_v_Sc_WorkBeginDotCheckBillMainList_Edit where HInterID = " + HInterID, " h_v_Sc_WorkBeginDotCheckBillMainList_Edit"); objJsonResult.code = "1"; objJsonResult.count = 1; @@ -213,7 +213,7 @@ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); - oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); + oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") { @@ -761,6 +761,69 @@ } #endregion + #region 鎶ュ伐鍙拌烦杞幏鍙栨暟鎹� + [Route("Sc_WorkBeginDotCheckBill/锘縎c_WorkBeginDotCheckBillList")] + [HttpGet] + public object Sc_WorkBeginDotCheckBillList(string HMaterID, string HProcID,string HSourceID, string SCOrder, string User) + { + try + { + List<DataTable> tableList = new List<DataTable>(); + + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Sc_WorkBeginDotCheckBillMain_Edit", 1, false, User)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ澶辫触!"; + objJsonResult.data = null; + return objJsonResult; + } + + if (HMaterID == null || HMaterID.Equals("")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鐗╂枡涓嶈兘涓虹┖锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (HProcID == null || HProcID.Equals("")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "宸ュ簭涓嶈兘涓虹┖锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (HSourceID == null || HSourceID.Equals("")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鐢熶骇璧勬簮涓嶈兘涓虹┖锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + ds = oCN.RunProcReturn("exec h_p_WorkBeginDotCheckList '" + HMaterID + "','" + HProcID + "','" + HSourceID + "','"+ SCOrder + "'", "h_p_WorkBeginDotCheckList"); + + 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 = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 璁惧鍚姩鐐规娓呭崟鍒楄〃 鏌ヨ [Route("Sc_WorkBeginDotCheckBill/getGy_WorkBeginDotCheckListBillMainList")] [HttpGet] @@ -846,7 +909,7 @@ return objJsonResult; } - ds = oCN.RunProcReturn("select * from h_v_Gy_WorkBeginDotCheckListBillMainList where HInterID = " + HInterID, " h_v_Gy_WorkBeginDotCheckListBillMainList"); + ds = oCN.RunProcReturn("select * from h_v_Gy_WorkBeginDotCheckListBillMainList_Edit where HInterID = " + HInterID, " h_v_Gy_WorkBeginDotCheckListBillMainList_Edit"); objJsonResult.code = "1"; objJsonResult.count = 1; @@ -903,7 +966,7 @@ if (refSav == "Add") { //鍗曟嵁鍙锋槸鍚﹂噸澶� - if (OBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, OBill.omodel.HInterID)) + if (OBill1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, OBill1.omodel.HInterID)) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -914,7 +977,7 @@ } if (refSav == "Update") { - if (OBill.ShowBill(oItem.HInterID, ref s) == false) + if (OBill1.ShowBill(oItem.HInterID, ref s) == false) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -923,7 +986,7 @@ return objJsonResult; } //鍒ゆ柇鏄惁鍙紪杈� - if (OBill.omodel.HChecker != "" && OBill.omodel.HChecker != null) + if (OBill1.omodel.HChecker != "" && OBill1.omodel.HChecker != null) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -931,7 +994,7 @@ objJsonResult.data = 1; return objJsonResult; } - if (OBill.omodel.HBillStatus > 1) + if (OBill1.omodel.HBillStatus > 1) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -949,7 +1012,7 @@ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); - oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); + oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") { @@ -1497,5 +1560,47 @@ } #endregion + #region 鍚姩鐐规瀛愯〃鏍规嵁绫诲瀷 鏌ヨ 鏃ュ父鐐规 + [Route("Sc_WorkBeginDotCheckBill/get锘縎c_WorkDotCheckList_Day")] + [HttpGet] + public object getSc_WorkDotCheckList_Day(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + + + Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); + + string Type = dic["Type"].ToString(); + string HInterId = dic["HInterId"].ToString(); + + ds = oCN.RunProcReturn("exec h_p_DotCheckDayList '" + Type + "','" + HInterId + "'", "h_p_DotCheckDayList"); + + //娣诲姞鍒楀悕 + 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