Browse Source

需求单No.137752

master
luanhui 8 years ago
parent
commit
0eb1fbf4e6
5 changed files with 93 additions and 0 deletions
  1. +11
    -0
      B3QingDaoWanFu.Web/B3QingDaoWanFu.Web.csproj
  2. +17
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Overlays/SaleOutStoreEdit_Ext.cs
  3. +2
    -0
      B3QingDaoWanFu.Web/PluginClass.cs
  4. +5
    -0
      B3QingDaoWanFu/B3QingDaoWanFu.csproj
  5. +58
    -0
      B3QingDaoWanFu/TypeIOCs/SaleOutStoreBLTypeIoc.cs

+ 11
- 0
B3QingDaoWanFu.Web/B3QingDaoWanFu.Web.csproj View File

@ -66,6 +66,14 @@
<HintPath>D:\BwpB3Project\tsref\Debug\B3ProduceUnitedInfos.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="B3Sale, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\B3Sale.dll</HintPath>
</Reference>
<Reference Include="B3Sale.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\B3Sale.Web.dll</HintPath>
</Reference>
<Reference Include="B3UnitedInfos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\BwpB3Project\tsref\Debug\B3UnitedInfos.dll</HintPath>
@ -133,6 +141,9 @@
<Compile Include="DFGridReportPage.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3QingDaoWanFu\Overlays\SaleOutStoreEdit_Ext.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3QingDaoWanFu\Overlays\StatPayAnalyse_Ext.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>


+ 17
- 0
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Overlays/SaleOutStoreEdit_Ext.cs View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.Web.Pages.B3Sale.Bills.SaleOutStore_;
using TSingSoft.WebControls2;
namespace BWP.Web.Pages.B3QingDaoWanFu.Overlays
{
class SaleOutStoreEdit_Ext: SaleOutStoreEdit
{
protected override void AddCustomerDetailColumns(DFEditGrid detailGrid)
{
detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("FactoryPrice"));
}
}
}

+ 2
- 0
B3QingDaoWanFu.Web/PluginClass.cs View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BWP.Web.Pages.B3Sale.Bills.SaleOutStore_;
using TSingSoft.WebPluginFramework;
using TSingSoft.WebPluginFramework.Pages;
@ -17,6 +18,7 @@ namespace BWP.B3QingDaoWanFu
{
WpfPageFactory.RegisterPageOverlay(typeof(StatPayEdit).FullName, typeof(StatPayEdit_Ext).FullName);
WpfPageFactory.RegisterPageOverlay(typeof(StatPayAnalyse).FullName, typeof(StatPayAnalyse_Ext).FullName);
WpfPageFactory.RegisterPageOverlay(typeof(SaleOutStoreEdit).FullName, typeof(SaleOutStoreEdit_Ext).FullName);
GlobalFlags.On(B3ButcherManageConsts.GlobalFlags.StatPayAddRewardWithButcherUseWeight);
}
}


+ 5
- 0
B3QingDaoWanFu/B3QingDaoWanFu.csproj View File

@ -66,6 +66,10 @@
<HintPath>D:\BwpB3Project\tsref\Debug\B3ProduceUnitedInfos.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="B3Sale, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\B3Sale.dll</HintPath>
</Reference>
<Reference Include="B3UnitedInfos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\BwpB3Project\tsref\Debug\B3UnitedInfos.dll</HintPath>
@ -124,6 +128,7 @@
</Compile>
<Compile Include="DataPatchs\StatPaySetBillNeedValue20171123.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TypeIOCs\SaleOutStoreBLTypeIoc.cs" />
<Compile Include="TypeIOCs\StatPayBLTypeIoc.cs" />
<Compile Include="Utils\WanFuOnlineConfig.cs" />
</ItemGroup>


+ 58
- 0
B3QingDaoWanFu/TypeIOCs/SaleOutStoreBLTypeIoc.cs View File

@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.B3ButcherManage.Utils;
using BWP.B3Frameworks;
using BWP.B3Sale.BL;
using BWP.B3Sale.BO;
using Forks.EnterpriseServices.BusinessInterfaces;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using Forks.Utils;
using TSingSoft.WebPluginFramework;
namespace BWP.B3QingDaoWanFu.TypeIOCs
{
[TypeIOC(typeof(SaleOutStoreBL), typeof(SaleOutStoreBL.BaseBLIOCs.BeforeSave))]
public class SaleOutStoreBLTypeIoc:SaleOutStoreBL.BaseBLIOCs.BeforeSave
{
public void Invoke(IDmoContext context, SaleOutStore dmo)
{
foreach (SaleOutStore_Detail detail in dmo.Details)
{
detail.FactoryPrice = GetFactoryPrice(context, dmo, detail.SaleGoods_ID);
}
}
private Money<decimal>? GetFactoryPrice(IDmoContext context, SaleOutStore dmo, long detailSaleGoodsId)
{
var detail=new JoinAlias(typeof(DynamicPrice_Detail));
var query=new DQueryDom(detail);
query.Where.Conditions.Add(DQCondition.EQ("SaleGoods_ID", detailSaleGoodsId));
query.Where.Conditions.Add(DQCondition.InSubQuery(DQExpression.Field("DynamicPrice_ID"),GetSubQueryDom(dmo)));
query.Columns.Add(DQSelectColumn.Field("Price"));
return query.EExecuteScalar<Money<decimal>?>(context.Session);
}
private DQueryDom GetSubQueryDom( SaleOutStore dmo)
{
var bill=new JoinAlias("bill",typeof(DynamicPrice));
var detail=new JoinAlias("detail",typeof(DynamicPrice_AccountingUnitDetail));
var query=new DQueryDom(bill);
query.From.AddJoin(JoinType.Inner, new DQDmoSource(detail),DQCondition.EQ(bill,"ID",detail, "DynamicPrice_ID") );
query.AddBillStateCondition(bill);
query.Where.Conditions.Add(DQCondition.EQ(detail, "AccountingUnit_ID",dmo.AccountingUnit_ID));
query.Where.Conditions.Add(DQCondition.LessThanOrEqual(bill, "StartPriceDate", dmo.LoadTime));
query.Columns.Add(DQSelectColumn.Field("ID",bill));
query.Range=SelectRange.Top(1);
return query;
}
}
}

Loading…
Cancel
Save