Browse Source

。。

master
luanhui 8 years ago
parent
commit
99eb4206d4
2 changed files with 37 additions and 3 deletions
  1. +2
    -3
      B3QingDaoWanFu/B3QingDaoWanFu.csproj
  2. +35
    -0
      B3QingDaoWanFu/TypeIOCs/StatPayBLTypeIoc.cs

+ 2
- 3
B3QingDaoWanFu/B3QingDaoWanFu.csproj View File

@ -92,11 +92,10 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TypeIOCs\StatPayBLTypeIoc.cs" />
<Compile Include="Utils\WanFuOnlineConfig.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="TypeIOCs\" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.


+ 35
- 0
B3QingDaoWanFu/TypeIOCs/StatPayBLTypeIoc.cs View File

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BWP.B3ButcherManage.BL;
using BWP.B3ButcherManage.BO;
using BWP.B3ButcherManage.NamedValueTemplate;
using BWP.B3Frameworks;
using Forks.EnterpriseServices.BusinessInterfaces;
using Forks.Utils;
using TSingSoft.WebPluginFramework;
namespace BWP.B3QingDaoWanFu.TypeIOCs
{
[TypeIOC(typeof(StatPayBL), typeof(StatPayBL.BaseBLIOCs.AfterSave))]
public class StatPayAfterSaveBLTypeIoc:StatPayBL.BaseBLIOCs.AfterSave
{
public void Invoke(IDmoContext context, StatPay dmo)
{
if (dmo.PurchaseType == .)
{
dmo.ActualMoney = (dmo.ShackMoney.EToDecimal() ?? 0) + (dmo.JingJianFee.EToDecimal() ?? 0) - (dmo.DiscontMoney.EToDecimal() ?? 0);
Money<decimal>? we = null;
if (dmo.ShackWeight != 0)
we = dmo.ShackWeight;
dmo.ActualPrice = decimal.Round(dmo.ActualMoney.EToDecimal() ?? 0, 2) / we;
if (dmo.ActualPrice.HasValue)
dmo.ActualPrice = decimal.Round(dmo.ActualPrice.Value.Value, 2);
}}
}
}

Loading…
Cancel
Save