| | |
| | | e.FieldKeys.Add("FBaseJoinQty"); |
| | | } |
| | | private const string POFormId = "PRD_PPBOM"; |
| | | public List<string> FentryIdList = new List<string>(); |
| | | private List<string> FentryIdList = new List<string>(); |
| | | public override void BeforeExecuteOperationTransaction(BeforeExecuteOperationTransaction e) |
| | | { |
| | | base.BeforeExecuteOperationTransaction(e); |
| | |
| | | string srcFormId = ""; |
| | | string srcSrcBillNo = ""; |
| | | string FPPBOMFENTRYID = ""; |
| | | try |
| | | { |
| | | srcFormId = "PRD_PPBOM"; |
| | | srcSrcBillNo = entryRow["FPPBOMBILLNO"]?.ToString(); |
| | | string FPPBOMFID = entryRow["FPPOMFID"]?.ToString(); |
| | | FPPBOMFENTRYID = entryRow["FPPBOMFENTRYID"]?.ToString(); |
| | | } |
| | | catch (Exception) |
| | | { |
| | | } |
| | | srcFormId = "PRD_PPBOM"; |
| | | srcSrcBillNo = entryRow["FPPBOMBILLNO"]?.ToString(); |
| | | string FPPBOMFID = entryRow["FPPOMFID"]?.ToString(); |
| | | FPPBOMFENTRYID = entryRow["FPPBOMFENTRYID"]?.ToString(); |
| | | if (string.IsNullOrWhiteSpace(srcFormId) |
| | | || string.IsNullOrWhiteSpace(srcSrcBillNo) |
| | | ) |
| | |
| | | if (FentryIdList.Count > 0) |
| | | { |
| | | string FentryId = string.Join(",", FentryIdList.ToArray()); |
| | | // sql = string.Format(@"/*dialect*/ |
| | | //update a set FBASEQTY = FQTY |
| | | //from T_STK_STKTRANSFERINENTRY_LK a |
| | | //join T_STK_STKTRANSFERINENTRY b on a.FENTRYID = b.FENTRYID |
| | | //where |
| | | //--a.FSTABLENAME = 'T_PRD_PPBOMENTRY' and |
| | | //a.FENTRYID in ({0})", FentryId); |
| | | // sqlList.Add(sql); |
| | | // sql = string.Format(@"/*dialect*/ |
| | | //update a set FBASEQTY = FQTY |
| | | //from T_STK_STKTRANSFERINENTRY_LK a |
| | | //join T_STK_STKTRANSFERINENTRY b on a.FENTRYID = b.FENTRYID |
| | | //where |
| | | //--a.FSTABLENAME = 'T_PRD_PPBOMENTRY' and |
| | | //a.FENTRYID in ({0})", FentryId); |
| | | // sqlList.Add(sql); |
| | | sql = string.Format(@"/*dialect*/update T_STK_STKTRANSFERINENTRY_R |
| | | set FSrcBillTypeId = 'PRD_PPBOM',FSRCBILLNO=b.FPPBOMBILLNO |
| | | ,FTRANSRESERVELINK=1 |
| | |
| | | sqlList.Add(sql); |
| | | DBServiceHelper.ExecuteBatch(Context, sqlList); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |