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 TSingSoft.WebPluginFramework;
|
|
using TSingSoft.WebPluginFramework.BIPlugins.BLEvents;
|
|
|
|
namespace BWP.B3ButcherManageExport.BL
|
|
{
|
|
[BusinessInterface(typeof(StatPayToNcBL))]
|
|
public interface IStatPayToNcBL : INcBL<StatPay>
|
|
{
|
|
void Export(List<long> idList, long p, DateTime? nullable);
|
|
}
|
|
|
|
[LogicName("结算单导NC凭证")]
|
|
[BindToFeature("B3ButcherManageExport.0008")]
|
|
[ExportID(B3FrameworksConsts.DmoTypeIDBases.B3ButcherManageExport, B3ButcherManageExportConsts.ExportIDOffsets.StatPayToNc)]
|
|
public class StatPayToNcBL : NcBL<StatPay>, IStatPayToNcBL
|
|
{
|
|
public readonly List<string> MinPreDetailProperties = new List<string>();
|
|
protected override NcUfinterface CreateUfinterface(IList<StatPay> dmos)
|
|
{
|
|
var scriptHelper = new PythonScriptHelper(string.Empty, Config.Script, this);
|
|
scriptHelper.AddLocalVar("dmos", dmos);
|
|
if (Version == "6.3")
|
|
{
|
|
{
|
|
var bills = BO.NcVouchers.New();
|
|
scriptHelper.AddLocalVar("vouchers", bills);
|
|
scriptHelper.Execute();
|
|
var i = 0;
|
|
foreach (var bill in bills.Bills)
|
|
{
|
|
BillIDs.Add(i, bill.B2BillIDs);
|
|
i++;
|
|
}
|
|
return bills;
|
|
}
|
|
}
|
|
throw new Exception("未实现导出方法");
|
|
}
|
|
|
|
public override short GetMethodID()
|
|
{
|
|
return B3FrameworksConsts.DmoTypeIDBases.B3ButcherManageExport + B3ButcherManageExportConsts.ExportIDOffsets.StatPayToNc;
|
|
}
|
|
|
|
public DateTime Date { get; set; }
|
|
public void Export(List<long> dmoIDs, long extSystemID, DateTime? date)
|
|
{
|
|
Date = date ?? BLContext.Today;
|
|
Export(dmoIDs, extSystemID);
|
|
}
|
|
}
|
|
}
|