1
陈雯静
2024-04-10 5958825c5454df6346dd6e7fbf9af8799262aab4
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -431,7 +431,7 @@
                }
                //主表
                //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)
                {
@@ -442,7 +442,7 @@
                    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();
@@ -452,7 +452,7 @@
                    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();
@@ -462,17 +462,18 @@
                    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))
                {
@@ -523,6 +524,7 @@
                        }
                    }
                }
                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");
@@ -548,7 +550,7 @@
                //============================
                //LogService.Write($"10.事务结束,用时" + sw.Elapsed);
                LogService.Write($"10.事务结束,用时" + sw.Elapsed);
                oCN.Commit();
                string sReturn = "";
                if (oSystemParameter.ShowBill(ref sReturn) == true)