| | |
| | | { |
| | | // |
| | | oCn.BeginTran(); |
| | | |
| | | omodel.HSourceBillNo_Main = omodel.HMainSourceBillNo; |
| | | omodel.HSourceBillType_Main = omodel.HMainSourceBillType; |
| | | omodel.HSourceEntryID_Main = omodel.HMainSourceEntryID; |
| | | omodel.HSourceInterID_Main = omodel.HMainSourceInterID; |
| | | // 保存前处理 |
| | | if (!BeforeSave(omodel.HInterID, omodel.HICMOInterID, omodel.HICMOEntryID, omodel.HICMOBillNo, 1, omodel.HSourceID, ref sReturn)) |
| | | { |
| | | return false; |
| | | } |
| | | //更新主表 |
| | | string sql = generateSQLReflection(omodel, "update", "HInterID"); |
| | | string sql = $@"update Sc_MESStopRestoreWorkBillMain set |
| | | HPrintQty = {omodel.HPrintQty},HICMOInterID = {omodel.HICMOInterID},HICMOEntryID = {omodel.HICMOEntryID}, |
| | | HICMOBillNo = '{omodel.HICMOBillNo}',HProcExchInterID = {omodel.HProcExchInterID}, |
| | | HProcExchEntryID = {omodel.HProcExchEntryID},HProcExchBillNo = '{omodel.HProcExchBillNo}', |
| | | HSourceInterID_Main = {omodel.HSourceInterID_Main},HSourceEntryID_Main = {omodel.HSourceEntryID_Main}, |
| | | HSourceBillNo_Main = '{omodel.HSourceBillNo_Main}',HSourceBillType_Main = '{omodel.HSourceBillType_Main}', |
| | | HMaterID = {omodel.HMaterID},HProcID = {omodel.HProcID},HBeginWorkTime = '{omodel.HBeginWorkTime}', |
| | | HSourceID = {omodel.HSourceID},HGroupID = {omodel.HGroupID},HDeptID = {omodel.HGroupID}, |
| | | HEmpID = {omodel.HEmpID},HStopReason = '{omodel.HStopReason}',HReportType = '{omodel.HReportType}', |
| | | HBarCodeMakeDate = '{omodel.HBarCodeMakeDate}',HYear = '{omodel.HYear}',HPeriod = {omodel.HPeriod}, |
| | | HBillType = '{omodel.HBillType}',HBillSubType = '{omodel.HBillSubType}',HDate = '{omodel.HDate}', |
| | | HCheckItemNowID = {omodel.HCheckItemNowID} ,HCheckItemNextID = {omodel.HCheckItemNextID}, |
| | | HCheckFlowID = {omodel.HCheckFlowID},HRemark = '{omodel.HRemark}',HUpDater = '{omodel.HUpDater}',HUpDateDate = getdate(), |
| | | HMainSourceBillNo = '{omodel.HMainSourceBillNo}',HMainSourceBillType = '{omodel.HMainSourceBillNo}', |
| | | HMainSourceInterID = {omodel.HMainSourceInterID},HMainSourceEntryID = {omodel.HMainSourceEntryID} |
| | | where HInterID = ${omodel.HInterID}"; |
| | | oCn.RunProcReturn(sql, MvarItemKey); |
| | | //删除关联 |
| | | DeleteRelation(ref sReturn, lngBillKey); |