| | |
| | | } |
| | | //主表 |
| | | |
| | | //LogService.Write($"5.系统控制查询判断,用时" + sw.Elapsed); |
| | | LogService.Write($"5.系统控制查询判断,用时" + sw.Elapsed); |
| | | ds = oCN.RunProcReturn("exec h_p_MES_StationOutBill_QtyCtrl " + HInterID + "", "h_p_MES_StationOutBill_QtyCtrl"); |
| | | if (ds == null) |
| | | { |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //LogService.Write($"5.1,用时" + sw.Elapsed); |
| | | LogService.Write($"5.1,用时" + sw.Elapsed); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RollBack(); |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //LogService.Write($"5.2,用时" + sw.Elapsed); |
| | | LogService.Write($"5.2,用时" + sw.Elapsed); |
| | | if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2") |
| | | { |
| | | oCN.RollBack(); |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //LogService.Write($"6.判断结束,用时" + sw.Elapsed); |
| | | LogService.Write($"6.判断结束,用时" + sw.Elapsed); |
| | | oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_Out " + HInterID + ","+ num + ""); |
| | | //LogService.Write($"6.1,用时" + sw.Elapsed); |
| | | LogService.Write($"6.1,用时" + sw.Elapsed); |
| | | oCN.RunProc("exec h_p_Mes_ProcessExchangeChangeStatus " + HInterID + " "); |
| | | //LogService.Write($"6.2,用时" + sw.Elapsed); |
| | | LogService.Write($"6.2,用时" + sw.Elapsed); |
| | | oCN.RunProc("exec h_p_Mes_StationOutBillBackBarCode " + HInterID + " "); |
| | | //LogService.Write($"7.存储过程结束,用时" + sw.Elapsed); |
| | | LogService.Write($"7.存储过程结束,用时" + sw.Elapsed); |
| | | //判断是否是 末道工序 |
| | | ds1 = oCN.RunProcReturn(" select HLastProc,HFstProc from Sc_ProcessExchangeBillMain a " + |
| | | " inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID " + |
| | | " Where a.HInterID=" + HProcExchInterID + " and b.HEntryID=" + HProcExchEntryID + " ", "Sc_ProcessExchangeBillMain"); |
| | | LogService.Write($"7.1.查询,用时" + sw.Elapsed); |
| | | //判断是否是新增 |
| | | if ("Add".Equals(eventType)) |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | LogService.Write($"7.2.查询,用时" + sw.Elapsed); |
| | | |
| | | //=========================保存后控制 |
| | | DataSet ds2 = oCN.RunProcReturn("Exec h_p_Sc_StationOutBill_AfterSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "',1 ", "h_p_Sc_StationOutBill_AfterSaveCtrl"); |
| | |
| | | //============================ |
| | | |
| | | |
| | | //LogService.Write($"10.事务结束,用时" + sw.Elapsed); |
| | | LogService.Write($"10.事务结束,用时" + sw.Elapsed); |
| | | oCN.Commit(); |
| | | string sReturn = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn) == true) |