Browse Source

需求单No.137222:宾西 1.【结算单】导用友【采购入库单】。

master
gaowenwei 8 years ago
parent
commit
b2f22695fd
7 changed files with 261 additions and 1 deletions
  1. +6
    -0
      BWP.B3ButcherManageExport.Web/BWP.B3ButcherManageExport.Web.csproj
  2. +120
    -0
      BWP.B3ButcherManageExport.Web/Pages/B3ButcherManageExport/U8/StatPayToU8_/StatPayToU8List.cs
  3. +74
    -0
      BWP.B3ButcherManageExport.Web/Pages/B3ButcherManageExport/U8/StatPayToU8_/StatPayToU8List.xml
  4. +1
    -1
      BWP.B3ButcherManageExport/B3ButcherManageExportConsts.cs
  5. +58
    -0
      BWP.B3ButcherManageExport/BL/U8/StatPayToU8BL_/StatPayToU8BL.cs
  6. +1
    -0
      BWP.B3ButcherManageExport/BWP.B3ButcherManageExport.csproj
  7. +1
    -0
      WebFolder/Config/Plugins/B3ButcherManageExport.Plugin

+ 6
- 0
BWP.B3ButcherManageExport.Web/BWP.B3ButcherManageExport.Web.csproj View File

@ -86,6 +86,9 @@
<Compile Include="Pages\B3ButcherManageExport\NC_\PayToNc_\PayToNcList.cs"> <Compile Include="Pages\B3ButcherManageExport\NC_\PayToNc_\PayToNcList.cs">
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
</Compile> </Compile>
<Compile Include="Pages\B3ButcherManageExport\U8\StatPayToU8_\StatPayToU8List.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="PluginClass.cs" /> <Compile Include="PluginClass.cs" />
</ItemGroup> </ItemGroup>
@ -124,6 +127,9 @@
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Pages\B3ButcherManageExport\NC_\PayToNc_\PayToNcList.xml" /> <EmbeddedResource Include="Pages\B3ButcherManageExport\NC_\PayToNc_\PayToNcList.xml" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3ButcherManageExport\U8\StatPayToU8_\StatPayToU8List.xml" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.


+ 120
- 0
BWP.B3ButcherManageExport.Web/Pages/B3ButcherManageExport/U8/StatPayToU8_/StatPayToU8List.cs View File

@ -0,0 +1,120 @@
using BWP.B3ButcherManage.BO;
using BWP.B3ButcherManageExport.BL;
using BWP.B3ExportBase;
using BWP.B3ExportBase.Utils;
using BWP.Web.Pages.B3ExportBase;
using Forks.EnterpriseServices.BusinessInterfaces;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebControls2;
using BWP.B3Frameworks;
namespace BWP.Web.Pages.B3ButcherManageExport.U8.StatPayToU8_
{
public class StatPayToU8List : ExportBaseList<StatPay, IStatPayToU8BL>
{
protected override string Caption
{
get { return "屠宰场结算单导U8采购入库单"; }
}
protected override void AddQueryControls(VLayoutPanel vPanel)
{
vPanel.Add(CreateDefaultBillQueryControls((panel, config) =>
{
panel.Add("Weigh_ID", new DFTextBox(mDFInfo.Fields["Weigh_ID"]));
config.Add("Date");
config.Add("AccountingUnit_ID");
config.Add("Department_ID");
config.Add("Employee_ID");
config.Add("Supplier_ID");
config.Add("Weigh_ID");
}));
}
protected override void AddDFBrowseGridColumn(DFBrowseGrid grid, string field)
{
base.AddDFBrowseGridColumn(grid, field);
if (field == "BillState")
{
AddDFBrowseGridColumn(grid, "Weigh_ID");
AddDFBrowseGridColumn(grid, "AccountingUnit_Name");
AddDFBrowseGridColumn(grid, "Department_Name");
AddDFBrowseGridColumn(grid, "Supplier_Name");
AddDFBrowseGridColumn(grid, "Employee_Name");
AddDFBrowseGridColumn(grid, "CheckUser_Name");
AddDFBrowseGridColumn(grid, "Remark");
}
}
protected override string DoExport(List<long> idList)
{
if (idList.Count == 0)
{
throw new ApplicationException("请选择单据!");
}
if (_dfcUrl.IsEmpty)
{
throw new ApplicationException("请选择外部系统!");
}
BL.Export(idList, long.Parse(_dfcUrl.Value), _billDate.Value);
return BIFactory.GetLastMessage();
}
private ChoiceBox _dfcUrl;
private DFDateInput _billDate;
protected override void AddExportControl(HLayoutPanel hbox)
{
hbox.Add(new SimpleLabel("外部系统"));
_dfcUrl = hbox.Add(new ChoiceBox());
_dfcUrl.DataKind = B3ExportBaseConsts.DataSources.;
_dfcUrl.EnableInputArgument = true;
_dfcUrl.SmartOrderEnabled = false;
_dfcUrl.EnableTopItem = true;
_dfcUrl.Width = 130;
hbox.Add(new SimpleLabel("单据日期"));
_billDate = hbox.Add(new DFDateInput());
_billDate.Value = DateTime.Today;
base.AddExportControl(hbox);
}
public override string Url
{
get { return "~/B3ButcherManageExport/U8/StatPayToU8_/StatPayToU8List.aspx"; }
}
protected override string EditUrl
{
get
{
return "B3ButcherManage/Bills/StatPay_/StatPayEdit.aspx";
}
}
protected override DQueryDom GetQueryDom()
{
var dom = base.GetQueryDom();
dom.EAddCheckedCondition(dom.From.RootSource.Alias);
return dom;
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!IsPostBack)
{
var tuple = ExportConfigUtil.LoadDefaultExtSystems(MethodID);
if (tuple != null)
{
_dfcUrl.Value = tuple.Item1.ToString();
_dfcUrl.DisplayValue = tuple.Item2;
}
}
}
}
}

+ 74
- 0
BWP.B3ButcherManageExport.Web/Pages/B3ButcherManageExport/U8/StatPayToU8_/StatPayToU8List.xml View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8" ?>
<Select xmlns="urn:XDQuery">
<Columns>
<Field name="ID"/>
</Columns>
<From>
<DmoClass class="BWP.B3ButcherManage.BO.StatPay, B3ButcherManage"/>
</From>
<Where>
<And>
<EQ>
<Field name="ID"/>
<QBE paramName="ID"/>
</EQ>
<EQ>
<Field name="Supplier_ID"/>
<QBE paramName="Supplier_ID"/>
</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="Weigh_ID"/>
<QBE paramName="Weigh_ID"/>
</EQ>
<EQ>
<Field name="IsLocked"/>
<QBE paramName="IsLocked"/>
</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="CreateTime"/>
<QBE paramName="MinCreateTime" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="CreateTime"/>
<QBE paramName="MaxCreateTime"/>
</LessThanOrEqual>
<GreaterThanOrEqual>
<Field name="Date"/>
<QBE paramName="MinDate" />
</GreaterThanOrEqual>
<LessThanOrEqual>
<Field name="Date"/>
<QBE paramName="MaxDate"/>
</LessThanOrEqual>
<EQ>
<Field name="BillState"/>
<QBE paramName ="BillState"/>
</EQ>
</And>
</Where>
</Select>

+ 1
- 1
BWP.B3ButcherManageExport/B3ButcherManageExportConsts.cs View File

@ -9,7 +9,7 @@ namespace BWP.B3ButcherManageExport {
public const byte StatPayToEasVoucher = 2; public const byte StatPayToEasVoucher = 2;
public const byte AdvancePayToNc = 3; public const byte AdvancePayToNc = 3;
public const byte PayToNc = 4; public const byte PayToNc = 4;
public const byte StatPayToU8 = 5;
} }
public class DmoTypeID { public class DmoTypeID {


+ 58
- 0
BWP.B3ButcherManageExport/BL/U8/StatPayToU8BL_/StatPayToU8BL.cs View File

@ -0,0 +1,58 @@
using BWP.B3ButcherManage.BO;
using BWP.B3ExportBase;
using BWP.B3ExportBase.BL;
using BWP.B3ExportBase.BO;
using BWP.B3Frameworks;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.BusinessInterfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebPluginFramework;
using TSingSoft.WebPluginFramework.BIPlugins.BLEvents;
namespace BWP.B3ButcherManageExport.BL
{
[BusinessInterface(typeof(StatPayToU8BL))]
public interface IStatPayToU8BL : IExportU8BL
{
void Export(List<long> dmoIDs, long extSystemID, DateTime? date);
}
[LogicName("屠宰场结算单导U8采购入库单")]
[BindToFeature("B3ButcherManageExport.0005")]
[ExportID(B3FrameworksConsts.DmoTypeIDBases.B3ButcherManageExport, B3ButcherManageExportConsts.ExportIDOffsets.StatPayToU8)]
public class StatPayToU8BL : ExportU8BL<StatPay>, IStatPayToU8BL
{
protected override Ufinterface CreateUfinterface(IList<StatPay> dmos)
{
var scriptHelper = new PythonScriptHelper(string.Empty, Config.Script, this);
var inv = SaleInvoices.CreateSaleInvoice();
scriptHelper.AddLocalVar("dmos", dmos);
scriptHelper.AddLocalVar("invoices", inv);
scriptHelper.Execute();
var i = 0;
foreach (var invoice in inv.Bills)
{
BillIDs.Add(i, invoice.B2BillIDs);
i++;
}
return inv;
}
private DateTime _date;
public DateTime Date
{
get { return _date; }
set { _date = value; }
}
public void Export(List<long> dmoIDs, long extSystemID, DateTime? date)
{
_date = date ?? BLContext.Today;
Export(dmoIDs, extSystemID);
}
}
}

+ 1
- 0
BWP.B3ButcherManageExport/BWP.B3ButcherManageExport.csproj View File

@ -76,6 +76,7 @@
<Compile Include="BL\EAS\StatPayToEasVoucherBL.cs" /> <Compile Include="BL\EAS\StatPayToEasVoucherBL.cs" />
<Compile Include="BL\NC\AdvancePayToNcBL_\AdvancePayToNcBL.cs" /> <Compile Include="BL\NC\AdvancePayToNcBL_\AdvancePayToNcBL.cs" />
<Compile Include="BL\NC\PayToNcBL_\PayToNcBL.cs" /> <Compile Include="BL\NC\PayToNcBL_\PayToNcBL.cs" />
<Compile Include="BL\U8\StatPayToU8BL_\StatPayToU8BL.cs" />
<Compile Include="BO\NC\NcUfinterface.cs" /> <Compile Include="BO\NC\NcUfinterface.cs" />
<Compile Include="BO\NC\NCVourcher.cs" /> <Compile Include="BO\NC\NCVourcher.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />


+ 1
- 0
WebFolder/Config/Plugins/B3ButcherManageExport.Plugin View File

@ -20,6 +20,7 @@
<Feature id="0002" name="B3屠宰结算单导EAS凭证"/> <Feature id="0002" name="B3屠宰结算单导EAS凭证"/>
<Feature id="0003" name="B3预付款单导NC凭证"/> <Feature id="0003" name="B3预付款单导NC凭证"/>
<Feature id="0004" name="B3付款单导NC凭证"/> <Feature id="0004" name="B3付款单导NC凭证"/>
<Feature id="0005" name="B3结算单导U8采购入库单"/>
</Features> </Features>
</Plugin> </Plugin>

Loading…
Cancel
Save