Browse Source

增加生产通知, 微信审批还没做

master
luanhui 8 years ago
parent
commit
4fb58c2d55
12 changed files with 664 additions and 17 deletions
  1. +15
    -0
      B3_DongFangWanQi.Web/B3_DongFangWanQi.Web.csproj
  2. +108
    -0
      B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationEdit.cs
  3. +42
    -0
      B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationList.cs
  4. +58
    -0
      B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationList.xml
  5. +61
    -0
      B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/SelectOrderDialog.cs
  6. +105
    -0
      B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/SelectOrderDialog.xml
  7. +52
    -17
      B3_DongFangWanQi/B3_DongFangWanQi.csproj
  8. +82
    -0
      B3_DongFangWanQi/BL/ProductionNotificationBL_/ProductionNotificationBL.cs
  9. +42
    -0
      B3_DongFangWanQi/BO/Bill/ProductionNotification_/ProductionNotification.cs
  10. +73
    -0
      B3_DongFangWanQi/BO/Bill/ProductionNotification_/ProductionNotification_Detail.cs
  11. +12
    -0
      B3_DongFangWanQi/Utils/DmoTypeIDOffset.cs
  12. +14
    -0
      WebFolder/Config/Plugins/B3_DongFangWanQi.Plugin

+ 15
- 0
B3_DongFangWanQi.Web/B3_DongFangWanQi.Web.csproj View File

@ -134,6 +134,15 @@
<Compile Include="Pages\B3_DongFangWanQi\Bills\OutputForecastEdit.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3_DongFangWanQi\Bills\ProductionNotification_\ProductionNotificationEdit.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3_DongFangWanQi\Bills\ProductionNotification_\ProductionNotificationList.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3_DongFangWanQi\Bills\ProductionNotification_\SelectOrderDialog.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3_DongFangWanQi\Tools\SaleOrderUpdateEdit.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
@ -181,6 +190,12 @@
<ItemGroup>
<EmbeddedResource Include="Pages\B3_DongFangWanQi\Tools\SaleOrderUpdateList.xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3_DongFangWanQi\Bills\ProductionNotification_\ProductionNotificationList.xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3_DongFangWanQi\Bills\ProductionNotification_\SelectOrderDialog.xml" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\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.


+ 108
- 0
B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationEdit.cs View File

@ -0,0 +1,108 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;
using B3_DongFangWanQi.BL;
using B3_DongFangWanQi.BO;
using BWP.B3Frameworks.Utils;
using BWP.Web.CustomPageLayout;
using BWP.Web.Layout;
using BWP.Web.Pages.B3Sale.Bills;
using BWP.Web.Utils;
using BWP.Web.WebControls;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using TSingSoft.WebControls2;
using TSingSoft.WebPluginFramework;
namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_
{
class ProductionNotificationEdit : B3SaleWorkFlowBillEditPage<ProductionNotification, IProductionNotificationBL>
{
private DFEditGrid _detailGrid;
protected override void BuildBasePropertiesEditor(TitlePanel titlePanel, PageLayoutSection section)
{
var layoutManager = new LayoutManager("main", mDFInfo, mDFContainer);
var config = new AutoLayoutConfig();
config.Add("AccountingUnit_ID");
config.Add("Department_ID");
config.Add("Employee_ID");
config.Add("Date");
config.Add("Remark");
layoutManager.Config = config;
section.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo);
titlePanel.Controls.Add(layoutManager.CreateLayout());
}
protected override void BuildBody(Control form)
{
base.BuildBody(form);
CreateAccDetailPanel(form.EAdd(new TitlePanel("订单明细")));
}
private void CreateAccDetailPanel(TitlePanel titlePanel)
{
var vPanel = new VLayoutPanel();
titlePanel.Controls.Add(vPanel);
if (CanSave)
{
var hPanel = vPanel.Add(new HLayoutPanel(), new VLayoutOption(HorizontalAlign.Left));
var selectOrder = hPanel.Add(new DialogButton
{
Text = "选择订单",
});
selectOrder.DialogTitle = "选择订单";
selectOrder.Url = "SelectOrderDialog.aspx";
selectOrder.Click += delegate
{
var resultDetails = DialogUtil.GetCachedObj<ProductionNotification_Detail>(this);
mBL.LoadDetailsByOrders(Dmo,resultDetails);
_detailGrid.DataBind();
};
var button = hPanel.Add(new TSButton("更新发货数量"));
button.Click += delegate
{
_detailGrid.GetFromUI();
mBL.UpdateUnitNumber(Dmo);
_detailGrid.DataBind();
};
}
var detailEditor = new DFCollectionEditor<ProductionNotification_Detail>(() => Dmo.Details);
detailEditor.AllowDeletionFunc = () => CanSave;
detailEditor.CanDeleteFunc = (detail) => CanSave;
detailEditor.IsEditableFunc = (field, detail) => CanSave;
_detailGrid = vPanel.Add(new DFEditGrid(detailEditor) { Width = Unit.Percentage(100) });
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Order_ID"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("OrderDate"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("LoadTime"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Customer_Name"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Goods_Name"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("UnitNumber"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("SendNumber"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFTextBox>("LoadCarNumber"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Price"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Money"));
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!IsPostBack)
DataBind();
}
public override void GetFromUI()
{
base.GetFromUI();
_detailGrid.GetFromUI();
}
}
}

+ 42
- 0
B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationList.cs View File

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using B3_DongFangWanQi.BL;
using B3_DongFangWanQi.BO;
using BWP.B3Frameworks;
using BWP.Web.Pages.B3Sale.Bills;
using BWP.Web.Utils;
using TSingSoft.WebControls2;
namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_
{
class ProductionNotificationList : B3SaleBillListPage<ProductionNotification, IProductionNotificationBL>
{
protected override void AddQueryControls(VLayoutPanel vPanel)
{
vPanel.Add(CreateDefaultBillQueryControls((panel, config) => {
panel.Add("AccountingUnit_ID", QueryCreator.DFChoiceBox(mDFInfo.Fields["AccountingUnit_ID"], B3FrameworksConsts.DataSources.));
config.Add("Date");
config.Add("AccountingUnit_ID");
config.Add("Department_ID");
config.Add("Employee_ID");
}));
}
protected override void AddDFBrowseGridColumn(DFBrowseGrid grid, string field)
{
base.AddDFBrowseGridColumn(grid, field);
if (field == "BillState")
{
AddDFBrowseGridColumn(grid, "Date");
AddDFBrowseGridColumn(grid, "AccountingUnit_Name");
AddDFBrowseGridColumn(grid, "Department_Name");
AddDFBrowseGridColumn(grid, "Employee_Name");
}
}
}
}

+ 58
- 0
B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationList.xml View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8" ?>
<Select xmlns="urn:XDQuery">
<Columns>
<Field name="ID"/>
</Columns>
<From>
<DmoClass class="B3_DongFangWanQi.BO.ProductionNotification, B3_DongFangWanQi"/>
</From>
<Where>
<And>
<EQ>
<Field name="ID"/>
<QBE paramName="ID"/>
</EQ>
<EQ>
<Field name="BillState"/>
<QBE paramName="BillState"/>
</EQ>
<EQ>
<Field name="AccountingUnit_ID"/>
<QBE paramName="AccountingUnit_ID"/>
</EQ>
<EQ>
<Field name="Department_ID"/>
<QBE paramName="Department_ID"/>
</EQ>
<EQ>
<Field name="Employee_ID"/>
<QBE paramName="Employee_ID"/>
</EQ>
<EQ>
<Field name="IsLocked"/>
<QBE paramName="IsLocked"/>
</EQ>
<Contains>
<Field name="CreateUser_Name"/>
<QBE paramName="CreateUser_Name"/>
</Contains>
<Contains>
<Field name="CheckUser_Name"/>
<QBE paramName="CheckUser_Name"/>
</Contains>
<GreaterThanOrEqual>
<Field name="Date"/>
<QBE paramName="MinDate" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="Date"/>
<QBE paramName="MaxDate"/>
</LessThanOrEqual>
<Contains>
<Field name="Remark"/>
<QBE paramName="Remark"/>
</Contains>
</And>
</Where>
</Select>

+ 61
- 0
B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/SelectOrderDialog.cs View File

@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using B3_DongFangWanQi.BO;
using BWP.B3Frameworks;
using BWP.B3Frameworks.BO.NamedValueTemplate;
using BWP.B3Sale.BO;
using BWP.Web.Layout;
using BWP.Web.Utils;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using TSingSoft.WebControls2;
namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_
{
class SelectOrderDialog: DmoMultiSelectDialog<Order, ProductionNotification_Detail>
{
protected override void CreateQuery(VLayoutPanel vPanel)
{
var layoutManager = new LayoutManager("", mDFInfo, mQueryContainer);
var config = new AutoLayoutConfig();
config.Add("ID");
config.Add("Customer_ID");
config.Add("AccountingUnit_ID");
config.Add("DeliverGoodsLine_ID");
config.Add("CheckOutManner_ID");
config.Add("Employee_ID");
config.Add("Store_ID");
config.Add("SaleKind_ID");
config.Add("OrderDate");
config.Add("LoadTime");
layoutManager.Config = config;
vPanel.Add(layoutManager.CreateLayout());
base.CreateQuery(vPanel);
}
protected override void SetResultFromDFDataRow(ProductionNotification_Detail dmo, DFDataRow row)
{
dmo.Order_ID = (long) row["ID"];
}
protected override void CreateQueryGridColumns(DFBrowseGrid grid)
{
grid.Columns.Add(new DFBrowseGridColumn("ID"));
grid.Columns.Add(new DFBrowseGridColumn("OrderDate"));
grid.Columns.Add(new DFBrowseGridColumn("LoadTime"));
grid.Columns.Add(new DFBrowseGridColumn("Customer_Name"));
}
protected override DQueryDom GetQueryDom()
{
var dom= base.GetQueryDom();
// var bill = dom.From.RootSource.Alias;
dom.Where.Conditions.Add(DQCondition.EQ("BillState",.));
return dom;
}
}
}

+ 105
- 0
B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/SelectOrderDialog.xml View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8" ?>
<Select xmlns="urn:XDQuery">
<Columns>
<Field name="ID"/>
</Columns>
<From>
<DmoClass class="BWP.B3Sale.BO.Order, B3Sale"/>
</From>
<Where>
<And>
<EQ>
<Field name="ID"/>
<QBE paramName="ID"/>
</EQ>
<EQ>
<Field name="Customer_ID"/>
<QBE paramName="Customer_ID"/>
</EQ>
<EQ>
<Field name="AccountingUnit_ID"/>
<QBE paramName="AccountingUnit_ID"/>
</EQ>
<EQ>
<Field name="DeliverGoodsLine_ID"/>
<QBE paramName="DeliverGoodsLine_ID"/>
</EQ>
<EQ>
<Field name="CheckOutManner_ID"/>
<QBE paramName="CheckOutManner_ID"/>
</EQ>
<EQ>
<Field name="Employee_ID"/>
<QBE paramName="Employee_ID"/>
</EQ>
<EQ>
<Field name="Store_ID"/>
<QBE paramName="Store_ID"/>
</EQ>
<QBEIn>
<Field name="SaleKind_ID"/>
<QBE paramName="SaleKind_ID"/>
</QBEIn>
<EQ>
<Field name="IsLocked"/>
<QBE paramName="IsLocked"/>
</EQ>
<EQ>
<Field name="CustomerOrderNo"/>
<QBE paramName="CustomerOrderNo"/>
</EQ>
<EQ>
<Field name="TakeGoods_Type"/>
<QBE paramName="TakeGoods_Type"/>
</EQ>
<Contains>
<Field name="Remark"/>
<QBE paramName="Remark"/>
</Contains>
<Contains>
<Field name="CreateUser_Name"/>
<QBE paramName="CreateUser_Name"/>
</Contains>
<Contains>
<Field name="CheckUser_Name"/>
<QBE paramName="CheckUser_Name"/>
</Contains>
<GreaterThanOrEqual>
<Field name="OrderDate"/>
<QBE paramName="MinOrderDate" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="OrderDate"/>
<QBE paramName="MaxOrderDate"/>
</LessThanOrEqual>
<GreaterThanOrEqual>
<Field name="LoadTime"/>
<QBE paramName="MinLoadTime" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="LoadTime"/>
<QBE paramName="MaxLoadTime"/>
</LessThanOrEqual>
<GreaterThanOrEqual>
<Field name="CreateTime"/>
<QBE paramName="MinCreateTime" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="CreateTime"/>
<QBE paramName="MaxCreateTime"/>
</LessThanOrEqual>
<EQ>
<Field name="BillState"/>
<QBE paramName ="BillState"/>
</EQ>
<EQ>
<Field name="Carrier_ID"/>
<QBE paramName ="Carrier_ID"/>
</EQ>
<Contains>
<Field name="Code"/>
<QBE paramName="Code"/>
</Contains>
</And>
</Where>
</Select>

+ 52
- 17
B3_DongFangWanQi/B3_DongFangWanQi.csproj View File

@ -11,8 +11,8 @@
<RootNamespace>B3_DongFangWanQi</RootNamespace>
<AssemblyName>B3_DongFangWanQi</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<KeyContainerName>BwpApp</KeyContainerName>
<FileAlignment>512</FileAlignment>
<KeyContainerName>BwpApp</KeyContainerName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -37,47 +37,82 @@
<Reference Include="B3Frameworks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\B3Frameworks.dll</HintPath>
<Private>False</Private></Reference>
<Private>False</Private>
</Reference>
<Reference Include="B3Frameworks.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\B3Frameworks.Web.dll</HintPath>
<Private>False</Private></Reference>
<Reference Include="B3Sale, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL"><SpecificVersion>False</SpecificVersion><Private>False</Private></Reference>
<Reference Include="B3UnitedInfos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL"><SpecificVersion>False</SpecificVersion><Private>False</Private></Reference>
<Reference Include="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"><SpecificVersion>False</SpecificVersion><Private>False</Private></Reference>
<Private>False</Private>
</Reference>
<Reference Include="B3Sale, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="B3SaleInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\B3SaleInterface.dll</HintPath>
</Reference>
<Reference Include="B3UnitedInfos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Forks.Utils, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6911f69af04f1ecb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\TsingSoft2\TSREF\Forks.Utils.dll</HintPath>
<Private>False</Private></Reference>
<Reference Include="System"><SpecificVersion>False</SpecificVersion></Reference>
<Reference Include="System.Data"><SpecificVersion>False</SpecificVersion></Reference>
<Reference Include="System.Web"><SpecificVersion>False</SpecificVersion></Reference>
<Reference Include="System.Xml"><SpecificVersion>False</SpecificVersion></Reference>
<Private>False</Private>
</Reference>
<Reference Include="System">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Data">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Web">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Xml">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="TSingSoft.WebControls2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=2d003d348dae6330, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\TsingSoft2\TSREF\TSingSoft.WebControls2.dll</HintPath>
<Private>False</Private></Reference>
<Private>False</Private>
</Reference>
<Reference Include="Wpf, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\Wpf.dll</HintPath>
<Private>False</Private></Reference>
<Private>False</Private>
</Reference>
<Reference Include="Wpf.System, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\Wpf.System.dll</HintPath>
<Private>False</Private></Reference>
<Private>False</Private>
</Reference>
<Reference Include="Wpf.System.Web, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\tsref\Debug\Wpf.System.Web.dll</HintPath>
<Private>False</Private></Reference>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\version\Customer_version.cs"><Link>Customer_version.cs</Link></Compile><Compile Include="BL\OutputForecastBL.cs" />
<Compile Include="..\..\..\version\Customer_version.cs">
<Link>Customer_version.cs</Link>
</Compile>
<Compile Include="BL\OutputForecastBL.cs" />
<Compile Include="BL\OutputConfigureBL.cs" />
<Compile Include="BL\ProductionNotificationBL_\ProductionNotificationBL.cs" />
<Compile Include="BO\Bill\Outputforecast.cs" />
<Compile Include="BO\Bill\OutputForecast_Detail.cs" />
<Compile Include="BO\Bill\ProductionNotification_\ProductionNotification.cs" />
<Compile Include="BO\Bill\ProductionNotification_\ProductionNotification_Detail.cs" />
<Compile Include="BO\OutputConfigure.cs" />
<Compile Include="BO\OutputConfigure_Detail.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utils\DmoTypeIDOffset.cs" />
</ItemGroup>
<ItemGroup />
<ItemGroup>


+ 82
- 0
B3_DongFangWanQi/BL/ProductionNotificationBL_/ProductionNotificationBL.cs View File

@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using B3_DongFangWanQi.BO;
using BWP.B3Frameworks.BL;
using BWP.B3Sale.BL;
using BWP.B3Sale.BO;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.BusinessInterfaces;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.Utils;
using TSingSoft.WebPluginFramework;
namespace B3_DongFangWanQi.BL
{
[BusinessInterface(typeof(ProductionNotificationBL))]
[LogicName("生产通知")]
public interface IProductionNotificationBL : IDepartmentWorkFlowBillBL<ProductionNotification>
{
void UpdateUnitNumber(ProductionNotification dmo);
void LoadDetailsByOrders(ProductionNotification dmo, IList<ProductionNotification_Detail> resultDetails);
}
public class ProductionNotificationBL : SaleDepartmentWorkFlowBillBL<ProductionNotification>, IProductionNotificationBL
{
protected override void beforeSave(ProductionNotification dmo)
{
base.beforeSave(dmo);
foreach (ProductionNotification_Detail detail in dmo.Details)
{
detail.Money = detail.LoadCarNumber * detail.Price;
}
dmo.Money = dmo.Details.Sum(x => (x.Money ?? 0).Value);
}
public void UpdateUnitNumber(ProductionNotification dmo)
{
foreach (ProductionNotification_Detail detail in dmo.Details)
{
var query=new DQueryDom(new JoinAlias(typeof(Order_Detail)));
query.Where.Conditions.Add(DQCondition.EQ("ID",detail.OrderDetail_ID));
query.Columns.Add(DQSelectColumn.Field("UnitNum"));
var unitnum = query.EExecuteScalar<Money<decimal>?>(Session);
detail.SendNumber = unitnum;
detail.LoadCarNumber = unitnum;
detail.Money = detail.LoadCarNumber * detail.Price;
}
}
public void LoadDetailsByOrders(ProductionNotification dmo,IList<ProductionNotification_Detail> resultDetails)
{
dmo.Details.Clear();
var orderbl = BIFactory.Create<IOrderBL>(Session);
foreach (ProductionNotification_Detail detail in resultDetails)
{
var order = orderbl.Load(detail.Order_ID);
foreach (Order_Detail orderDetail in order.Details)
{
var dmodetail = new ProductionNotification_Detail();
dmodetail.Order_ID = order.ID;
dmodetail.OrderDetail_ID = orderDetail.ID;
dmodetail.OrderDate = order.OrderDate;
dmodetail.LoadTime = order.LoadTime;
dmodetail.Customer_ID = order.Customer_ID;
dmodetail.Customer_Name = order.Customer_Name;
dmodetail.Goods_ID = orderDetail.SaleGoods_ID;
dmodetail.Goods_Name = orderDetail.Goods_Name;
dmodetail.UnitNumber = orderDetail.UnitNum;
dmodetail.SendNumber = orderDetail.UnitNum;
dmodetail.LoadCarNumber = orderDetail.UnitNum;
dmodetail.Price = orderDetail.Price;
dmodetail.Money = orderDetail.Money;
dmo.Details.Add(dmodetail);
}
}
}
}
}

+ 42
- 0
B3_DongFangWanQi/BO/Bill/ProductionNotification_/ProductionNotification.cs View File

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using B3_DongFangWanQi.Utils;
using BWP.B3Frameworks;
using BWP.B3Frameworks.BO;
using BWP.B3Frameworks.BO.MoneyTemplate;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.Utils;
namespace B3_DongFangWanQi.BO
{
[DFClass, Serializable]
[LogicName("生产通知")]
[DmoTypeID(B3FrameworksConsts.DmoTypeIDBases.B3DongFangWanQi, DmoTypeIDOffset.ProductionNotification)]
public class ProductionNotification:DepartmentWorkFlowBill
{
private DateTime _date = DateTime.Today;
[LogicName("日期")]
public DateTime Date
{
get { return _date; }
set { _date = value; }
}
readonly ProductionNotification_DetailCollection _details = new ProductionNotification_DetailCollection();
[OneToMany(typeof(ProductionNotification_Detail), "ID")]
[Join("ID", "ProductionNotification_ID")]
public ProductionNotification_DetailCollection Details
{
get
{
return _details;
}
}
public Money<>? Money { get; set; }
}
}

+ 73
- 0
B3_DongFangWanQi/BO/Bill/ProductionNotification_/ProductionNotification_Detail.cs View File

@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.B3Frameworks.BO;
using BWP.B3Frameworks.BO.MoneyTemplate;
using BWP.B3Sale.BO;
using BWP.B3UnitedInfos.BO;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.Utils;
namespace B3_DongFangWanQi.BO
{
[DFClass, Serializable, LogicName("生产通知明细")]
public class ProductionNotification_Detail : Base
{
public long ProductionNotification_ID { get; set; }
[LogicName("订单号")]
public long Order_ID { get; set; }
[LogicName("订单明细号")]
public long? OrderDetail_ID { get; set; }
[LogicName("订货时间")]
[ReferenceTo(typeof(Order), "OrderDate")]
[Join("Order_ID", "ID")]
public DateTime? OrderDate { get; set; }
[LogicName("发货时间")]
[ReferenceTo(typeof(Order), "LoadTime")]
[Join("Order_ID", "ID")]
public DateTime? LoadTime { get; set; }
[LogicName("购货客户")]
public long? Customer_ID { get; set; }
[LogicName("购货客户")]
[ReferenceTo(typeof(Customer), "Name")]
[Join("Customer_ID", "ID")]
public string Customer_Name { get; set; }
[LogicName("存货")]
public long? Goods_ID { get; set; }
[LogicName("存货")]
[ReferenceTo(typeof(Goods), "Name")]
[Join("Goods_ID", "ID")]
public string Goods_Name { get; set; }
[LogicName("订货数量")]
public Money<decimal>? UnitNumber { get; set; }
[LogicName("发货数量")]
public Money<decimal>? SendNumber { get; set; }
[LogicName("装车数量")]
public Money<decimal>? LoadCarNumber { get; set; }
[LogicName("单价")]
public Money<decimal>? Price { get; set; }
[LogicName("金额")]
public Money<>? Money { get; set; }
}
[Serializable]
public class ProductionNotification_DetailCollection : DmoCollection<ProductionNotification_Detail>
{
}
}

+ 12
- 0
B3_DongFangWanQi/Utils/DmoTypeIDOffset.cs View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace B3_DongFangWanQi.Utils
{
internal static class DmoTypeIDOffset
{
public const byte ProductionNotification = 2;
}
}

+ 14
- 0
WebFolder/Config/Plugins/B3_DongFangWanQi.Plugin View File

@ -44,12 +44,26 @@
<Function index="2" name="编辑" />
</FunctionGroup>
<FunctionGroup name="生产通知" roleSchemas="employee">
<Function index="0" name="访问" />
<Function index="1" name="新建" />
<Function index="2" name="编辑" />
<Function index="3" name="删除" />
<Function index="4" name="审核" />
<Function index="5" name="撤销" />
<Function index="6" name="锁定" />
<Function index="7" name="解锁" />
<Function index="8" name="管理" />
<Function index="9" name="作废" />
</FunctionGroup>
</Security>
<Menus>
<Menu id="0001" name="/B3东方万旗/产值配置" roles="B3_DongFangWanQi.产值配置.访问" url="B3_DongFangWanQi/BaseInfos/OutputConfigureList.aspx"/>
<Menu id="0002" name="/B3东方万旗/产值预测" roles="B3_DongFangWanQi.产值预测.访问" url="B3_DongFangWanQi/Bills/OutputForecastList.aspx"/>
<Menu id="0003" name="/B3东方万旗/订单调整" roles="B3_DongFangWanQi.订单调整.访问" url="B3_DongFangWanQi/Tools/SaleOrderUpdateList.aspx"/>
<Menu id="0004" name="/B3东方万旗/生产通知" roles="B3_DongFangWanQi.生产通知.访问" url="B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationList.aspx"/>
</Menus>
</Plugin>

Loading…
Cancel
Save