王 垚
2021-11-12 0ce538e3c3dc01153ce1bfc2d75276881206c222
src/BLL/Demo.BillView/PRD/Pro_DayPlanPushZJDB.cs
@@ -42,7 +42,7 @@
            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);
@@ -64,16 +64,10 @@
                    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)
                        )
@@ -158,14 +152,14 @@
            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
@@ -175,7 +169,7 @@
                sqlList.Add(sql);
                DBServiceHelper.ExecuteBatch(Context, sqlList);
            }
        }