a
This commit is contained in:
@@ -14,6 +14,8 @@ using Kingdee.BOS.Core.List;
|
||||
using Kingdee.BOS.App.Data;
|
||||
using Kingdee.BOS.Orm.DataEntity;
|
||||
using Kingdee.BOS.Core.Metadata;
|
||||
using Kingdee.BOS.Core.Metadata.Util;
|
||||
using System.Data;
|
||||
|
||||
|
||||
namespace MonthlyProductionSchedule
|
||||
@@ -114,16 +116,30 @@ namespace MonthlyProductionSchedule
|
||||
|
||||
// 默认排序字段:需要从filter中取用户设置的排序字段
|
||||
string seqFld = string.Format(base.KSQL_SEQ, " t0.FID ");
|
||||
|
||||
var year = filter.FilterParameter.CustomFilter["DataHoldYear"].Long2Int();
|
||||
var month = filter.FilterParameter.CustomFilter["DataHoldMonth"].Long2Int();
|
||||
var date = new DateTime(year, month, 1);
|
||||
// 取数SQL
|
||||
// FID, FEntryId, 编号、状态、物料、数量、单位、单位精度、单价、价税合计
|
||||
|
||||
var startDate = "2023-12-01";
|
||||
var endDate = "2023-12-31";
|
||||
object resa = 0;
|
||||
var startDate = date.ToString("yyyy-MM-dd");
|
||||
var endDate = date.AddMonths(1).AddDays(-1);
|
||||
string sql = $@"
|
||||
EXEC PROC_ProductionSchedule '{tableName}','{startDate}','{endDate}', {base.Context.UserLocale.LCID} ,'{seqFld}';
|
||||
";
|
||||
//var para = new List<SqlParam>
|
||||
//{
|
||||
// new SqlParam("@tableName", KDDbType.String,tableName),
|
||||
// new SqlParam("@startDate", KDDbType.String,startDate),
|
||||
// new SqlParam("@endDate", KDDbType.String,endDate),
|
||||
// new SqlParam("@LCID", KDDbType.Int32,base.Context.UserLocale.LCID),
|
||||
// new SqlParam("@seqFld", KDDbType.String,seqFld),
|
||||
// new SqlParam("@HasId", KDDbType.Int32, resa,ParameterDirection.Output)
|
||||
//};
|
||||
|
||||
//var res = DBUtils.ExecuteStoreProcedure(this.Context, "PROC_ProductionSchedule", para);
|
||||
DBUtils.ExecuteDynamicObject(this.Context, sql);
|
||||
//filter.FilterParameter.CustomOption.Add("res", res[0].Value);
|
||||
}
|
||||
protected override string GetIdentityFieldIndexSQL(string tableName)
|
||||
{
|
||||
@@ -135,7 +151,8 @@ EXEC PROC_ProductionSchedule '{tableName}','{startDate}','{endDate}', {base.Cont
|
||||
{
|
||||
base.ExecuteBatch(listSql);
|
||||
}
|
||||
///
|
||||
|
||||
/// <summary>
|
||||
/// 构建出报表列
|
||||
///
|
||||
///
|
||||
@@ -153,10 +170,14 @@ EXEC PROC_ProductionSchedule '{tableName}','{startDate}','{endDate}', {base.Cont
|
||||
/// ListHeader headChild2 = header.AddChild("FPURMAN", new LocaleValue("采购员"));
|
||||
/// headChild2.Width = width;
|
||||
/// headChild2.Mergeable = true;
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
public override ReportHeader GetReportHeaders(IRptParams filter)
|
||||
{
|
||||
var date = System.DateTime.Now;
|
||||
var year = filter.FilterParameter.CustomFilter["DataHoldYear"].Long2Int();
|
||||
var month = filter.FilterParameter.CustomFilter["DataHoldMonth"].Long2Int();
|
||||
var date = new DateTime(year, month, 1);
|
||||
|
||||
// FID, FEntryId,
|
||||
var _colIndex = 0;
|
||||
@@ -164,20 +185,20 @@ EXEC PROC_ProductionSchedule '{tableName}','{startDate}','{endDate}', {base.Cont
|
||||
|
||||
header.AddChild("FNAME", new LocaleValue("产品名称"), _colIndex++);
|
||||
header.AddChild("ShelfLife", new LocaleValue("有效期"), _colIndex++);
|
||||
header.AddChild("ShelfLife", new LocaleValue("标准批量"), _colIndex++);
|
||||
header.AddChild("StandardLot", new LocaleValue("标准批量"), _colIndex++);
|
||||
header.AddChild("FLOTYIELD", new LocaleValue("每批产量"), _colIndex++);
|
||||
header.AddChild("FPACKUNITCONVERRATIO", new LocaleValue("包装规格"), _colIndex++);
|
||||
header.AddChild("FPACKUNITCONVT", new LocaleValue("包装规格"), _colIndex++);
|
||||
header.AddChild("FPACKUNITNAME", new LocaleValue("单位"), _colIndex++);
|
||||
header.AddChild("ShelfLife", new LocaleValue("安全库存量"), _colIndex++);
|
||||
header.AddChild("SAFESTOCKCOUNT", new LocaleValue("安全库存量"), _colIndex++);
|
||||
header.AddChild("SAFESTOCK", new LocaleValue("安全库存数量"), _colIndex++);
|
||||
header.AddChild("M01", new LocaleValue("本月预计需求量"), _colIndex++);
|
||||
header.AddChild("S01", new LocaleValue(date.AddMonths(-1).ToString("yyyyMM") + "发货量"), _colIndex++);
|
||||
header.AddChild("S02", new LocaleValue(date.AddMonths(-2).ToString("yyyyMM") + "发货量"), _colIndex++);
|
||||
header.AddChild("S03", new LocaleValue(date.AddMonths(-3).ToString("yyyyMM") + "发货量"), _colIndex++);
|
||||
header.AddChild("FSPECIFICATION", new LocaleValue("已入库量"), _colIndex++);
|
||||
header.AddChild("FSPECIFICATION", new LocaleValue("在生产量"), _colIndex++);
|
||||
header.AddChild("FSPECIFICATION", new LocaleValue("合计入库量"), _colIndex++);
|
||||
header.AddChild("InStockQty", new LocaleValue("已入库量"), _colIndex++);
|
||||
header.AddChild("InProductionQty", new LocaleValue("在生产量"), _colIndex++);
|
||||
header.AddChild("TotalStockQty", new LocaleValue("合计入库量"), _colIndex++);
|
||||
header.AddChild("OrderLotQty", new LocaleValue("系统计划生产批数"), _colIndex++);
|
||||
header.AddChild("FirmLotQty", new LocaleValue("确认计划生产批数"), _colIndex++);
|
||||
header.AddChild("FFirmQty", new LocaleValue("确认计划生产量"), _colIndex++);
|
||||
@@ -189,7 +210,6 @@ EXEC PROC_ProductionSchedule '{tableName}','{startDate}','{endDate}', {base.Cont
|
||||
public override ReportTitles GetReportTitles(IRptParams filter)
|
||||
{
|
||||
var result = base.GetReportTitles(filter);
|
||||
var date = System.DateTime.Now;
|
||||
DynamicObject dyFilter = filter.FilterParameter.CustomFilter;
|
||||
if (dyFilter != null)
|
||||
{
|
||||
@@ -197,9 +217,8 @@ EXEC PROC_ProductionSchedule '{tableName}','{startDate}','{endDate}', {base.Cont
|
||||
{
|
||||
result = new ReportTitles();
|
||||
}
|
||||
//var t = filter.FilterParameter.CustomOption["res"].Long2Int();
|
||||
//result.AddTitle("F_JD_Date", Convert.ToString(dyFilter["F_JD_Date"]));
|
||||
|
||||
result.AddTitle("FNameLabel", $"{date.AddMonths(-1).ToString("yyyyyMMM")}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user