Browse Source

。。

master
yibo 8 years ago
parent
commit
a836ad4cc8
7 changed files with 77 additions and 2 deletions
  1. +1
    -0
      B3SubstituteKill/B3SubstituteKill.csproj
  2. +9
    -0
      B3SubstituteKill/BL/Bills/StatPay/StatPayBL.cs
  3. +16
    -0
      B3SubstituteKill/BL/Bills/SubKillButcherOrder/SubKillButcherOrderBL.cs
  4. +14
    -0
      B3SubstituteKill/BL/Bills/SubKillWeightBill/SubKillWeightBillBL.cs
  5. +4
    -1
      B3SubstituteKill/BO/Bills/StatPay/StatPay_CallbackPayDetail.cs
  6. +4
    -1
      B3SubstituteKill/BO/Bills/StatPay/StatPay_CostDetail.cs
  7. +29
    -0
      B3SubstituteKill/Utils/B3SubstituteKillOnlineConfig.cs

+ 1
- 0
B3SubstituteKill/B3SubstituteKill.csproj View File

@ -107,6 +107,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Rpcs\SupplierRpc.cs" />
<Compile Include="Utils\B3SubstituteKillConsts.cs" />
<Compile Include="Utils\B3SubstituteKillOnlineConfig.cs" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />


+ 9
- 0
B3SubstituteKill/BL/Bills/StatPay/StatPayBL.cs View File

@ -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<StatPay>, 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);
}
}
}

+ 16
- 0
B3SubstituteKill/BL/Bills/SubKillButcherOrder/SubKillButcherOrderBL.cs View File

@ -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);
}
}
}

+ 14
- 0
B3SubstituteKill/BL/Bills/SubKillWeightBill/SubKillWeightBillBL.cs View File

@ -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);
}
}
}

+ 4
- 1
B3SubstituteKill/BO/Bills/StatPay/StatPay_CallbackPayDetail.cs View File

@ -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<StatPay_CallbackPayDetail>
{ }
{
public Money<> CallbackPayMoney { get { return this.Sum(x => x.Money.EToDecimal() ?? 0); } }
}
}

+ 4
- 1
B3SubstituteKill/BO/Bills/StatPay/StatPay_CostDetail.cs View File

@ -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<StatPay_CostDetail>
{ }
{
public Money<> CostMoney { get { return this.Sum(x => x.Money.EToDecimal() ?? 0); } }
}
}

+ 29
- 0
B3SubstituteKill/Utils/B3SubstituteKillOnlineConfig.cs View File

@ -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; }
}
}
}

Loading…
Cancel
Save