| | |
| | | using 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; |
| | | |
| | |
| | | { |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | ,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 |
| | |
| | | { |
| | | 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"; |
| | |
| | | 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 =""; //ç»´ä¿®è¦æ± |
| | |
| | | { |
| | | 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; |