| | |
| | | } |
| | | sw.Stop();//结束计时 |
| | | LogService.Write($"11.参数查询结束,新增结束,用时" + sw.Elapsed); |
| | | LogService.Write("END--出站单据保存结束,出站单号:" + HBillNo); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "新增单据成功!"; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write("出站单据保存发生异常,出站单号:" + sArray[0].ToString()); |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | |
| | | oCn.BeginTran(); |
| | | |
| | | ds = oCn.RunProcReturn($"select * from Sc_AssemblyBillMain where HMainSourceInterID={oBill.omodel.HProcExchInterID} and HMainSourceEntryID={oBill.omodel.HProcExchEntryID} and HBarCode_P='{HBardcode}'", "Sc_AssemblyBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | oCn.RunProc($"delete from Sc_AssemblyBillMain where HMainSourceInterID={oBill.omodel.HProcExchInterID} and HMainSourceEntryID={oBill.omodel.HProcExchEntryID} and HBarCode_P='{HBardcode}'"); |
| | | oCn.RunProc($"delete from Sc_AssemblyBillMain where HInterID={ds.Tables[0].Rows[0]["HInterID"].ToString()} and HBarCode_P='{HBardcode}'"); |
| | | } |
| | | |
| | | oCn.RunProc("delete from Sc_StationOutBillSub_SN where HInterID=" + HInterID + " and HBarCode='" + HBardcode + "'"); |
| | | oCn.RunProc("update Sc_StationOutBillMain set HQty-=1 where HInterID=" + HInterID); |
| | | |
| | | |
| | | oCn.Commit(); |
| | | |