From 9671e1c0d88deeea2efc06b800f7eaedfcf82949 Mon Sep 17 00:00:00 2001 From: 王 垚 <1402714037@qq.com> Date: 星期一, 08 十一月 2021 14:37:00 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/GG_NoticeController.cs | 40 +++++++++++++++++++++++++++++----------- 1 files changed, 29 insertions(+), 11 deletions(-) diff --git a/WebAPI/Controllers/GG_NoticeController.cs b/WebAPI/Controllers/GG_NoticeController.cs index 4144c40..3061fa7 100644 --- a/WebAPI/Controllers/GG_NoticeController.cs +++ b/WebAPI/Controllers/GG_NoticeController.cs @@ -68,11 +68,29 @@ public static DataSet Get_GG_NoticeBillList(string sWhere) { - var sql = "select A.HInterID,b.HEntryID,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '鏈槄' when B.HReadFlag=1 then '宸查槄' end HReadFlag, A.HMaker,A.HDate,A.HUpDater,A.HUpDateDate" + + var sql = "select A.HInterID,b.HEntryID,A.HBillNo,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '鏈槄' when B.HReadFlag=1 then '宸查槄' end HReadFlag, A.HMaker,A.HDate,A.HUpDater,A.HUpDateDate" + " from OA_InformBillMain A inner join OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where 1=1 " + sWhere; return new SQLHelper.ClsCN().RunProcReturn(sql, "OA_InformBillMain"); } + #endregion + + #region 鍏憡鍒楄〃缂栬緫鑾峰彇鏁版嵁 + [Route("GG_Notice/GG_NoticeBillListCheckDetai")] + [HttpGet] + public ApiResult<DataSet> GG_NoticeBillListCheckDetai(string HID,string HEntryID) + { + if (string.IsNullOrEmpty(HID)) + return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" }; + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + + var dataSet = oCN.RunProcReturn("select A.HInterID,b.HEntryID,A.HBillNo,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '鏈槄' when B.HReadFlag=1 then '宸查槄' end HReadFlag, A.HMaker,A.HDate,A.HUpDater,A.HUpDateDate" + + " from OA_InformBillMain A inner join OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where A.HInterID='"+ HID + "' and b.HEntryID='"+HEntryID+"'", "OA_InformBillMain"); + if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) + return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄥ崟鍙�" }; + + return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet }; + } #endregion #region 鍏憡鍒楄〃淇濆瓨/缂栬緫 @@ -89,15 +107,14 @@ string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); - string msg3 = sArray[1].ToString(); - string refSav = sArray[2].ToString(); - string msg4 = sArray[3].ToString(); + string refSav = sArray[1].ToString(); + string msg3 = sArray[2].ToString(); string s = ""; ListModels oListModels = new ListModels(); try { //缂栬緫鏉冮檺 - //if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdInBill_Edit", 1, true, msg4)) + //if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdInBill_Edit", 1, true, msg3)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; @@ -170,17 +187,18 @@ objJsonResult.data = 1; return objJsonResult; } - oItem.HMaker = msg4; //鍒跺崟浜� + oItem.HMaker = msg3; //鍒跺崟浜� oItem.HBillType = "4506"; oItem.HBillSubType = "4506"; 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")); - lsmain.Add(oItem); + string[] arrStr = oItem.HReceiveMan.Split(','); + oBill.omodel = oItem; //琛ㄤ綋鏁版嵁 - for (int i = 0; i < msg3.Length; i++) + for (int i = 1; i <=arrStr.Length; i++) { - i++; + Models.ClsOA_InformBillSub sb = new Models.ClsOA_InformBillSub(); sb.HEntryID = i; sb.HCloseMan = ""; @@ -191,8 +209,8 @@ sb.HSourceBillType = ""; sb.HRelationQty = 0; sb.HRelationMoney = 0; - sb.HReceiveMan = ""; - lssub.Add(sb); + sb.HReceiveMan = arrStr[i-1]; + oBill.DetailColl.Add(sb); } } -- Gitblit v1.9.1