From a836ad4cc8f34c881ed1cb39ede370c0b4e949e8 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Sat, 27 Jan 2018 11:24:53 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- B3SubstituteKill/B3SubstituteKill.csproj | 1 + .../BL/Bills/StatPay/StatPayBL.cs | 9 ++++++ .../SubKillButcherOrderBL.cs | 16 ++++++++++ .../SubKillWeightBill/SubKillWeightBillBL.cs | 14 +++++++++ .../StatPay/StatPay_CallbackPayDetail.cs | 5 +++- .../BO/Bills/StatPay/StatPay_CostDetail.cs | 5 +++- .../Utils/B3SubstituteKillOnlineConfig.cs | 29 +++++++++++++++++++ 7 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 B3SubstituteKill/Utils/B3SubstituteKillOnlineConfig.cs diff --git a/B3SubstituteKill/B3SubstituteKill.csproj b/B3SubstituteKill/B3SubstituteKill.csproj index 894b3a5..190b1dc 100644 --- a/B3SubstituteKill/B3SubstituteKill.csproj +++ b/B3SubstituteKill/B3SubstituteKill.csproj @@ -107,6 +107,7 @@ + diff --git a/B3SubstituteKill/BL/Bills/StatPay/StatPayBL.cs b/B3SubstituteKill/BL/Bills/StatPay/StatPayBL.cs index a4b0039..8b81c4f 100644 --- a/B3SubstituteKill/BL/Bills/StatPay/StatPayBL.cs +++ b/B3SubstituteKill/BL/Bills/StatPay/StatPayBL.cs @@ -1,5 +1,6 @@ using BWP.B3Frameworks.BL; using BWP.B3SubstituteKill.BO; +using BWP.B3SubstituteKill.Rpcs; using Forks.EnterpriseServices; using Forks.EnterpriseServices.BusinessInterfaces; using System; @@ -16,5 +17,13 @@ namespace BWP.B3SubstituteKill.BL public class StatPayBL : DepartmentWorkFlowBillBL, IStatPayBL { + protected override void beforeSave(StatPay dmo) + { + dmo.PriceBill_ID = null; + if (dmo.Date.HasValue && dmo.Supplier_ID.HasValue) + dmo.PriceBill_ID = SupplierRpc.GetPriceBillID(dmo.Supplier_ID.Value, dmo.Date.Value); + dmo.ReceiveMoney = dmo.CostDetails.CostMoney - dmo.CallbackPayDetails.CallbackPayMoney; + base.beforeSave(dmo); + } } } diff --git a/B3SubstituteKill/BL/Bills/SubKillButcherOrder/SubKillButcherOrderBL.cs b/B3SubstituteKill/BL/Bills/SubKillButcherOrder/SubKillButcherOrderBL.cs index 9227a82..4375639 100644 --- a/B3SubstituteKill/BL/Bills/SubKillButcherOrder/SubKillButcherOrderBL.cs +++ b/B3SubstituteKill/BL/Bills/SubKillButcherOrder/SubKillButcherOrderBL.cs @@ -1,6 +1,7 @@ using BWP.B3Frameworks.BL; using BWP.B3SubstituteKill.BO; using BWP.B3SubstituteKill.Rpcs; +using BWP.B3SubstituteKill.Utils; using Forks.EnterpriseServices; using Forks.EnterpriseServices.BusinessInterfaces; using System; @@ -27,5 +28,20 @@ namespace BWP.B3SubstituteKill.BL dmo.Weight = dmo.Details.Sum(x => x.Weight.EToDecimal() ?? 0); base.beforeSave(dmo); } + + protected override void doCheck(SubKillButcherOrder dmo) + { + if (new B3SubstituteKillOnlineConfig().ButcherOrderCreateStatPay) + { + + } + base.doCheck(dmo); + } + + protected override void doUnCheck(SubKillButcherOrder dmo) + { + + base.doUnCheck(dmo); + } } } diff --git a/B3SubstituteKill/BL/Bills/SubKillWeightBill/SubKillWeightBillBL.cs b/B3SubstituteKill/BL/Bills/SubKillWeightBill/SubKillWeightBillBL.cs index 90e7a72..6b80712 100644 --- a/B3SubstituteKill/BL/Bills/SubKillWeightBill/SubKillWeightBillBL.cs +++ b/B3SubstituteKill/BL/Bills/SubKillWeightBill/SubKillWeightBillBL.cs @@ -1,6 +1,7 @@ using BWP.B3Frameworks.BL; using BWP.B3SubstituteKill.BO; using BWP.B3SubstituteKill.Rpcs; +using BWP.B3SubstituteKill.Utils; using Forks.EnterpriseServices; using Forks.EnterpriseServices.BusinessInterfaces; using System; @@ -32,5 +33,18 @@ namespace BWP.B3SubstituteKill.BL dmo.Weight = dmo.Details.Sum(x => x.Weight.EToDecimal() ?? 0); base.beforeSave(dmo); } + + protected override void doCheck(SubKillWeightBill dmo) + { + if (!new B3SubstituteKillOnlineConfig().ButcherOrderCreateStatPay) + { } + base.doCheck(dmo); + } + + protected override void doUnCheck(SubKillWeightBill dmo) + { + + base.doUnCheck(dmo); + } } } diff --git a/B3SubstituteKill/BO/Bills/StatPay/StatPay_CallbackPayDetail.cs b/B3SubstituteKill/BO/Bills/StatPay/StatPay_CallbackPayDetail.cs index 761c597..9290da6 100644 --- a/B3SubstituteKill/BO/Bills/StatPay/StatPay_CallbackPayDetail.cs +++ b/B3SubstituteKill/BO/Bills/StatPay/StatPay_CallbackPayDetail.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; +using TSingSoft.WebPluginFramework; namespace BWP.B3SubstituteKill.BO { @@ -33,5 +34,7 @@ namespace BWP.B3SubstituteKill.BO [Serializable] public class StatPay_CallbackPayDetailCollection : DmoCollection - { } + { + public Money<金额> CallbackPayMoney { get { return this.Sum(x => x.Money.EToDecimal() ?? 0); } } + } } diff --git a/B3SubstituteKill/BO/Bills/StatPay/StatPay_CostDetail.cs b/B3SubstituteKill/BO/Bills/StatPay/StatPay_CostDetail.cs index 2141848..bba8a6c 100644 --- a/B3SubstituteKill/BO/Bills/StatPay/StatPay_CostDetail.cs +++ b/B3SubstituteKill/BO/Bills/StatPay/StatPay_CostDetail.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; +using TSingSoft.WebPluginFramework; namespace BWP.B3SubstituteKill.BO { @@ -41,5 +42,7 @@ namespace BWP.B3SubstituteKill.BO [Serializable] public class StatPay_CostDetailCollection : DmoCollection - { } + { + public Money<金额> CostMoney { get { return this.Sum(x => x.Money.EToDecimal() ?? 0); } } + } } diff --git a/B3SubstituteKill/Utils/B3SubstituteKillOnlineConfig.cs b/B3SubstituteKill/Utils/B3SubstituteKillOnlineConfig.cs new file mode 100644 index 0000000..3417539 --- /dev/null +++ b/B3SubstituteKill/Utils/B3SubstituteKillOnlineConfig.cs @@ -0,0 +1,29 @@ +using Forks.EnterpriseServices; +using Forks.Utils.Configuration; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using TSingSoft.WebPluginFramework; + +namespace BWP.B3SubstituteKill.Utils +{ + [ConfigurationEnabled] + public class B3SubstituteKillOnlineConfig + { + public B3SubstituteKillOnlineConfig() + { + ConfigurationUtil.Fill(this); + } + + private BoolConfigRef _butcherOrderCreateStatPay = new BoolConfigRef(false); + [LogicName("代宰排宰创建代宰结算")] + [ConfigurationItemGroup("B3代宰模块")] + [ConfigurationItemDescription("代宰排宰创建代宰结算,默认“否”;如果选“是”,则“代宰排宰”审核创建代宰结算,否 代宰过磅审核创建代宰结算 ")] + public BoolConfigRef ButcherOrderCreateStatPay + { + get { return _butcherOrderCreateStatPay; } + set { _butcherOrderCreateStatPay = value; } + } + } +}