@ -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 = 0 m ;
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 ( "经纪费" , "JingJiFe e" ) ) ;
_checkbox . Items . Add ( new ListItem ( "里程" , "Mileag e" ) ) ;
_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 ) ;
}
}
}