From a09ff1d01aeebae9037118035f10e06c570b092e Mon Sep 17 00:00:00 2001 From: ch <37327@LLOOCCY> Date: 星期三, 19 一月 2022 08:46:34 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/生产管理/报工台工序/Sc_MESBeginStepWorkBillController.cs | 32 +++++++++++++++++++++++--------- 1 files changed, 23 insertions(+), 9 deletions(-) diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" index a318f68..4cac767 100644 --- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" +++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" @@ -1,11 +1,15 @@ 锘縰sing Newtonsoft.Json.Linq; +using NPOI.HSSF.UserModel; +using NPOI.SS.UserModel; using Pub_Class; using System; using System.Collections.Generic; using System.Data; +using System.IO; using System.Linq; using System.Net; using System.Net.Http; +using System.Net.Http.Headers; using System.Web.Http; using WebAPI.Models; @@ -103,7 +107,7 @@ { DBUtility.ClsPub.CurUserName = UserName; //缂栬緫鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second("MES_MESBeginWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) + if (!DBUtility.ClsPub.Security_Log_second("MES_MESBeginWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName)) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -190,7 +194,7 @@ try { //瀹℃牳鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName)) + if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -374,7 +378,7 @@ string refSav = sArray[2].ToString(); DBUtility.ClsPub.CurUserName = UserName; //淇濆瓨鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second("MES_MESBeginWorkBill_Edit", 1, true, DBUtility.ClsPub.CurUserName)) + if (!DBUtility.ClsPub.Security_Log_second("MES_MESBeginWorkBill_Edit", 1, false, DBUtility.ClsPub.CurUserName)) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -603,14 +607,14 @@ ,b.HSourceInterID,b.HSourceEntryID,b.HSourceBillNo,b.HSourceBillType from Sc_ProcessReportMain a inner join Sc_ProcessReportSub b on a.HInterID=B.HInterID - inner join (select max(HProcNo) HProcNo,HBillNo,HProcID,HSourceInterID,HSourceEntryID,HSourceBillNo - from Sc_ProcessPlanSub group by HBillNo,HProcID,HSourceInterID,HSourceEntryID,HSourceBillNo) - pr on b.HSourceBillNo=pr.HSourceBillNo and b.HSourceInterID=pr.HSourceInterID and b.HSourceEntryID=pr.HSourceEntryID + inner join (select max(HProcNo) HProcNo + from Sc_ProcessPlanSub group by HBillNo,HSourceBillNo) + pr on b.HProcID=pr.HProcNo left join Gy_Process p on b.HProcID=p.HItemID left join Gy_Material m on a.HMaterID=m.hitemid left join Gy_Source s on b.HSourceID=s.HItemID left join Gy_Group g on a.HGroupID=g.HItemID - left join Gy_Employee e on b.HEmpID=e.HItemID "+sWhere+" and HRelationInterID='0'"); + left join Gy_Employee e on b.HEmpID=e.HItemID " + sWhere+" and HRelationInterID='0'"); return new SQLHelper.ClsCN().RunProcReturn(sql, "Sc_ICMOBillWorkQtyStatus_Tmp"); } #endregion @@ -627,7 +631,7 @@ { try { - ds = new SQLHelper.ClsCN().RunProcReturn("select isnull(sum(HQty),0) HQty,isnull(sum(HBadQty),0) HBadQty,isnull(sum(HWasterQty),0) HWasterQty from Sc_ProcessReportSub with (nolock)" + sWhere, "Sc_ProcessReportSub"); + ds = new SQLHelper.ClsCN().RunProcReturn("select isnull(sum(HQty),0) HQty,isnull(sum(HBadCount),0) HBadQty,isnull(sum(HWasterQty),0) HWasterQty from Sc_ProcessReportSub with (nolock)" + sWhere, "Sc_ProcessReportSub"); if (ds.Tables[0].Rows.Count > 0) { objJsonResult.code = "1"; @@ -761,6 +765,16 @@ oItemSub.HCloseType = false; //鍏抽棴绫诲瀷 //oItemSub.HRemark = ""; //澶囨敞 oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺 + oItemSub.HProcPlanBillNo = ""; //宸ュ簭璁″垝鍗� + oItemSub.HSeOrderBillNo = ""; + oItemSub.HRemark = "鎶ュ伐鍙板伐搴忔眹鎶�"; + oItemSub.HOtherItem1 = ""; + oItemSub.HOtherItem2 = ""; + oItemSub.HOtherItem3 = ""; + oItemSub.HOtherItem4 = ""; + oItemSub.HOtherItem5 = ""; + oItemSub.HPackType = ""; + oItemSub.HBatchNo=""; //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦 //oItemSub.HRepairID = 0; //缁翠慨椤圭洰 //oItemSub.HRepairExplanation =""; //缁翠慨瑕佹眰 @@ -845,7 +859,7 @@ { string StrMessage = ""; //瀹℃牳鏉冮檺 - if (!WebClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName, ref StrMessage)) + if (!WebClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName, ref StrMessage)) { objJsonResult.code = "0"; objJsonResult.count = 0; -- Gitblit v1.9.1