Browse Source

需求单No.139480 费用录入增加显示字段 收购综合报表也加相关字段。

master
yibo 7 years ago
parent
commit
ec620634df
3 changed files with 62 additions and 12 deletions
  1. +23
    -4
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Bills/CostRecord_/CostRecordEdit.cs
  2. +20
    -7
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/ComprehensiveReport.cs
  3. +19
    -1
      B3QingDaoWanFu/BO/Bill/CostRecord/CostRecord_Detail.cs

+ 23
- 4
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Bills/CostRecord_/CostRecordEdit.cs View File

@ -54,8 +54,12 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Bills.CostRecord_
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("WeightBill_ID"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Supplier_Name"));
_detailGrid.Columns.Add(new DFEditGridColumn("JingJiFee"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Employee_Name"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("Car_Name"));
_detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("BuyNum"));
_detailGrid.Columns.Add(new DFEditGridColumn("Mileage"));
_detailGrid.Columns.Add(new DFEditGridColumn("TransferFee"));
_detailGrid.Columns.Add(new DFEditGridColumn("JingJiFee"));
var section = mPageLayoutManager.AddSection("DetaiColumns", "明细列");
titlePanel.SetPageLayoutSetting(mPageLayoutManager, section.Name);
@ -73,10 +77,25 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Bills.CostRecord_
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("PurchaseType_ID", Dmo.PurchaseType_ID), DQCondition.EQ(DQExpression.Snippet("CAST([_weighBill].[WeighTime] AS DATE)"), DQExpression.Value(Dmo.Date)), DQCondition.GreaterThanOrEqual("BillState", .)));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Columns.Add(DQSelectColumn.Field("Supplier_Name"));
query.Columns.Add(DQSelectColumn.Field("Employee_Name"));
query.Columns.Add(DQSelectColumn.Field("Car_Name"));
query.Columns.Add(DQSelectColumn.Field("BuyNum"));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("WeighTime"));
var result = query.EExecuteList<long, string>();
foreach (var item in result)
Dmo.Details.Add(new CostRecord_Detail { WeightBill_ID = item.Item1, Supplier_Name = item.Item2 });
using (var session = Forks.EnterpriseServices.DomainObjects2.Dmo.NewSession())
{
using (var reader = session.ExecuteReader(query))
{
var detail = new CostRecord_Detail()
{
WeightBill_ID = (long)reader[0],
Supplier_Name = (string)reader[1],
Employee_Name = (string)reader[2],
Car_Name = (string)reader[3],
BuyNum = (int?)reader[4]
};
Dmo.Details.Add(detail);
}
}
_detailGrid.DataBind();
}


+ 20
- 7
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/ComprehensiveReport.cs View File

@ -94,14 +94,14 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
table.SumRow["死亡头数"] = n;
}
if (_checkbox.Items.FindByText("经纪费").Selected)
if (_checkbox.Items.FindByText("人工费").Selected)
{
Money<> n = 0m;
foreach (DFDataRow row in table.Rows)
{
n += Convert.ToDecimal(row["经纪费"] ?? 0);
n += Convert.ToDecimal(row["人工费"] ?? 0);
}
table.SumRow["经纪费"] =n;
table.SumRow["人工费"] = n;
}
if (_checkbox.Items.FindByText("运费").Selected)
@ -109,9 +109,18 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
Money<> n = 0;
foreach (DFDataRow row in table.Rows)
{
n += Convert.ToInt32(row["运费"] ?? 0);
n += Convert.ToDecimal(row["运费"] ?? 0);
}
table.SumRow["运费"] = n;
}
if (_checkbox.Items.FindByText("里程").Selected)
{
decimal n = 0;
foreach (DFDataRow row in table.Rows)
{
n += Convert.ToDecimal(row["里程"] ?? 0);
}
table.SumRow["里程"] = n;
}
// Set占比(table,);
@ -232,8 +241,9 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
_checkbox.Items.Add(new ListItem("过磅单号", "Weigh_ID"));
_checkbox.Items.Add(new ListItem("结算单号", "ID"));
_checkbox.Items.Add(new ListItem("业务员", "Employee_Name"));
_checkbox.Items.Add(new ListItem("经纪费", "JingJiFee"));
_checkbox.Items.Add(new ListItem("里程", "Mileage"));
_checkbox.Items.Add(new ListItem("运费", "TransferFee"));
_checkbox.Items.Add(new ListItem("人工费", "JingJiFee"));
_checkbox.Items.Add(new ListItem("收购头数", "RealNumber"));
_checkbox.Items.Add(new ListItem("死亡头数", "DeathNumber"));
@ -385,8 +395,9 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
query.Columns.Add(DQSelectColumn.Create(DQExpression.Field(field.Value), field.Text));
query.GroupBy.Expressions.Add(DQExpression.Field(field.Value));
break;
case"经纪费":
case "里程":
case"运费":
case"人工费":
query.Columns.Add(DQSelectColumn.Create(DQExpression.Field(costRecord, field.Value), field.Text));
query.GroupBy.Expressions.Add(DQExpression.Field(weight, "ID"));
query.GroupBy.Expressions.Add(DQExpression.Field(costRecord, field.Value));
@ -1035,6 +1046,7 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
public Money<>? JingJiFee { get; set; }
public Money<>? TransferFee { get; set; }
public decimal? Mileage { get; set; }
public static void Register(DQueryDom root)
{
@ -1045,10 +1057,11 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
query.Columns.Add(DQSelectColumn.Field("WeightBill_ID", detail));
query.Columns.Add(DQSelectColumn.Sum(detail, "JingJiFee"));
query.Columns.Add(DQSelectColumn.Sum(detail, "TransferFee"));
query.Columns.Add(DQSelectColumn.Sum(detail, "Mileage"));
query.GroupBy.Expressions.Add(DQExpression.Field(detail, "WeightBill_ID"));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("BillState", .), DQCondition.EQ("Domain_ID", DomainContext.Current.ID)));
root.RegisterQueryTable(typeof(CostRecordTemp), new string[] { "WeightBill_ID", "JingJiFee", "TransferFee" }, query);
root.RegisterQueryTable(typeof(CostRecordTemp), new string[] { "WeightBill_ID", "JingJiFee", "TransferFee", "Mileage" }, query);
}
}
}


+ 19
- 1
B3QingDaoWanFu/BO/Bill/CostRecord/CostRecord_Detail.cs View File

@ -20,7 +20,10 @@ namespace BWP.B3QingDaoWanFu.BO
[LogicName("过磅单号")]
public long WeightBill_ID { get; set; }
[LogicName("经纪费")]
[LogicName("里程")]
public decimal? Mileage { get; set; }
[LogicName("人工费")]
public Money<>? JingJiFee { get; set; }
[LogicName("运费")]
@ -30,6 +33,21 @@ namespace BWP.B3QingDaoWanFu.BO
[ReferenceTo(typeof(WeighBill), "Supplier_Name")]
[Join("WeightBill_ID", "ID")]
public string Supplier_Name { get; set; }
[LogicName("车辆")]
[ReferenceTo(typeof(WeighBill), "Car_Name")]
[Join("WeightBill_ID", "ID")]
public string Car_Name { get; set; }
[LogicName("经纪人")]
[ReferenceTo(typeof(WeighBill), "Employee_Name")]
[Join("WeightBill_ID", "ID")]
public string Employee_Name { get; set; }
[LogicName("头数")]
[ReferenceTo(typeof(WeighBill), "BuyNum")]
[Join("WeightBill_ID", "ID")]
public int? BuyNum { get; set; }
}
[Serializable]


Loading…
Cancel
Save