diff --git a/Gatedge.K3.Pilot.PlugIn/BOSPlugIn/AR_SalesVATInvoice/ServicePlugIn/AfterSave.cs b/Gatedge.K3.Pilot.PlugIn/BOSPlugIn/AR_SalesVATInvoice/ServicePlugIn/AfterSave.cs index 6c06e5b..d663ec2 100644 --- a/Gatedge.K3.Pilot.PlugIn/BOSPlugIn/AR_SalesVATInvoice/ServicePlugIn/AfterSave.cs +++ b/Gatedge.K3.Pilot.PlugIn/BOSPlugIn/AR_SalesVATInvoice/ServicePlugIn/AfterSave.cs @@ -17,7 +17,7 @@ namespace Gatedge.K3.Pilot.PlugIn.BOSPlugIn.AR_SalesVATInvoice.ServicePlugIn { base.OnPreparePropertys(e); // 添加需要加载的字段 - e.FieldKeys.Add("FDENTRYID"); + e.FieldKeys.Add("FENTRYID"); e.FieldKeys.Add("FIDD"); e.FieldKeys.Add("FSEQQ"); e.FieldKeys.Add("FSRCBILLTYPEID"); @@ -41,7 +41,7 @@ namespace Gatedge.K3.Pilot.PlugIn.BOSPlugIn.AR_SalesVATInvoice.ServicePlugIn foreach (var entry in entrys) { - var entryId = Convert.ToInt64(entry["FDENTRYID"]); + var entryId = Convert.ToInt64(entry["Id"]); var fidd = entry["FIDD"]; var fiddValue = fidd == null ? 0 : Convert.ToInt64(fidd); @@ -57,7 +57,7 @@ namespace Gatedge.K3.Pilot.PlugIn.BOSPlugIn.AR_SalesVATInvoice.ServicePlugIn var sql = $@"/*dialect*/ SELECT FSRCBILLTYPEID, FSRCBILLNO, FSEQ FROM T_IV_SALESICENTRY -WHERE FDENTRYID = {fiddValue}"; +WHERE FENTRYID = {fiddValue}"; var result = DBServiceHelper.ExecuteDynamicObject(this.Context, sql); if (result == null || result.Count == 0) @@ -72,7 +72,7 @@ WHERE FDENTRYID = {fiddValue}"; UPDATE T_IV_SALESICENTRY SET FSRCBILLTYPEID = '{srcBillTypeId}', FSRCBILLNO = '{srcBillNoValue}' -WHERE FDENTRYID = {entryId}"; +WHERE FENTRYID = {entryId}"; DBServiceHelper.Execute(this.Context, updateSql); } @@ -82,9 +82,9 @@ WHERE FDENTRYID = {entryId}"; // FIDD <= 0 时,把当前行FENTRYID赋值给FIDD,同时把FSEQ赋值给FSEQQ var updateSql = $@"/*dialect*/ UPDATE T_IV_SALESICENTRY -SET FIDD = FDENTRYID, +SET FIDD = FENTRYID, FSEQQ = FSEQ -WHERE FDENTRYID = {entryId}"; +WHERE FENTRYID = {entryId}"; DBServiceHelper.Execute(this.Context, updateSql); }