From 4b7075beba3ac2f75bd295fb1c413cd514ce1a4c Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期二, 11 六月 2024 23:41:22 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs | 184 +++++++++++++++++++++++++++++++++++++++------- 1 files changed, 156 insertions(+), 28 deletions(-) diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs index 3444efa..89983c8 100644 --- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs @@ -5523,16 +5523,16 @@ //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞� string s = ""; - int sYear = 0; - int sPeriod = 0; - if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DateTime.Now, ref sYear, ref sPeriod, ref s) == false) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = s; - objJsonResult.data = null; - return objJsonResult; - } + //int sYear = 0; + //int sPeriod = 0; + //if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DateTime.Now, ref sYear, ref sPeriod, ref s) == false) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = s; + // objJsonResult.data = null; + // return objJsonResult; + //} ListModels oListModels = new ListModels(); try @@ -5613,9 +5613,17 @@ //string[] arrStr = oItem.HSendMan.Split(','); //鍙戦�佷汉 //arrStr = oItem.HReceiveMan.Split(','); //鎺ユ敹浜� string[] arrStr = oItem.HCopyMan.Split(','); //鎶勯�佷汉 - List<string> b = new List<string>(arrStr); - b.Add(oItem.HReceiveMan); - arrStr = b.ToArray(); + if (!string.IsNullOrEmpty(oItem.HCopyMan)) + { + arrStr = oItem.HCopyMan.Split(','); // 鎶勯�佷汉 + List<string> b = new List<string>(arrStr); + b.Add(oItem.HReceiveMan); + arrStr = b.ToArray(); + } + else + { + arrStr = oItem.HReceiveMan.Split(',');//鎺ユ敹浜� + } //鎶勯�佷汉琛ㄤ綋鏁版嵁 for (int i = 1; i <= arrStr.Length; i++) { @@ -5733,18 +5741,17 @@ #region 宸ヤ綔鑱旂郴鍗曠紪杈戣幏鍙栨暟鎹� [Route("Sc_MESTransFerWorkBill/GetOA_WorkLinkBillListCheckDetai")] [HttpGet] - public object GetOA_WorkLinkBillListCheckDetai(string HID, string HEntryID) + public object GetOA_WorkLinkBillListCheckDetai(string HID) { try { List<object> columnNameList = new List<object>(); - string sql = string.Format(@"select A.*,B.HEntryID,B.HReadFlag,D.HName HDeptName,e.HName HEvaluateStatusName + string sql = string.Format(@"select A.*,D.HName HDeptName,e.HName HEvaluateStatusName from OA_WorkLinkBillMain A - inner join OA_WorkLinkBillSub2 B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID left join Gy_EvaluateStatus AS e ON A.HEvaluateStatusID = e.HItemID - where A.HInterID='" + HID + "' and b.HEntryID='" + HEntryID + "'"); ; + where A.HInterID='" + HID + "'" ); ; ds = oCN.RunProcReturn(sql, "OA_WorkLinkBillMain"); if (ds == null || ds.Tables[0].Rows.Count == 0) { @@ -6283,7 +6290,7 @@ #region 宸ヤ綔鑱旂郴鍗曞洖澶� /// <summary> - /// 寮傚父鍙嶉鍗� + /// 宸ヤ綔鑱旂郴鍗� /// </summary> /// <param name="msg"></param> /// <returns></returns> @@ -6312,16 +6319,16 @@ //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞� string s = ""; - int sYear = 0; - int sPeriod = 0; - if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DateTime.Now, ref sYear, ref sPeriod, ref s) == false) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = s; - objJsonResult.data = null; - return objJsonResult; - } + //int sYear = 0; + //int sPeriod = 0; + //if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DateTime.Now, ref sYear, ref sPeriod, ref s) == false) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = s; + // objJsonResult.data = null; + // return objJsonResult; + //} ListModels oListModels = new ListModels(); try @@ -6459,6 +6466,127 @@ } #endregion + #region 宸ヤ綔鑱旂郴鍗曞偓淇� + [Route("Sc_MESTransFerWorkBill/UpdateOA_WorkLinkBillHHasten")] + [HttpGet] + public object UpdateOA_WorkLinkBillHHasten(Int64 HInterID,string CurUserName) + { + try + { + //鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("OA_WorkLinkBill_Edit", 1, false, CurUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + //HInterID鏁版嵁鍒ゆ柇 + if (HInterID <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "HInterID灏忎簬0锛�"; + objJsonResult.data = null; + return objJsonResult; + } + Int64 lngBillKey = 0; + lngBillKey = DBUtility.ClsPub.isLong(HInterID); + DAL.ClsOA_WorkLinkBill oBill = new DAL.ClsOA_WorkLinkBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣� + //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔 + if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁 + { + if (oBill.omodel.HCloseMan.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍌績锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (oBill.omodel.HDeleteMan.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍌績锛�"; + objJsonResult.data = null; + return objJsonResult; + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + string sql = "update OA_WorkLinkBillMain set HHasten = HHasten + 1 where HInterID = " + HInterID ; + + oCN.RunProc(sql); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 宸ヤ綔鑱旂郴鍗曟牴鎹簮鍗旾D鏌ョ湅鏄惁鏈夊搴旇仈绯诲崟 + [Route("Sc_MESTransFerWorkBill/GetOA_WorkLinkBillListBySourceID")] + [HttpGet] + public object GetOA_WorkLinkBillListBySourceID(string HRelationInterID, string HRelationEntryID) + { + try + { + List<object> columnNameList = new List<object>(); + + string sql = string.Format(@"select A.*,D.HName HDeptName,e.HName HEvaluateStatusName + from OA_WorkLinkBillMain A + left join Gy_Department D on A.HDeptID=D.HItemID + left join Gy_EvaluateStatus AS e ON A.HEvaluateStatusID = e.HItemID + where A.HRelationInterID='" + HRelationInterID + "' and A.HRelationEntryID= '"+ HRelationEntryID+"'"); ; + ds = oCN.RunProcReturn(sql, "OA_WorkLinkBillMain"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + + } + #endregion + #endregion } } \ No newline at end of file -- Gitblit v1.9.1