2023-09-01
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
{
|
||||
public partial class ContractTrackProgressChart : PageBase
|
||||
{
|
||||
public string ContractId
|
||||
{
|
||||
get => (string)ViewState["ContractId"];
|
||||
set => ViewState["ContractId"] = value;
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
ContractId = Request.Params["ContractId"];
|
||||
BindChart();
|
||||
}
|
||||
}
|
||||
|
||||
void BindChart()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ContractId))
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var result = (from x in db.PHTGL_ContractTrackProgress
|
||||
|
||||
join y in db.PHTGL_ContractTrack on x.ContractTrackId equals y.Id
|
||||
|
||||
where y.ContractId == ContractId
|
||||
group x by x.Date into g
|
||||
select new
|
||||
|
||||
{
|
||||
月份 = g.Key,
|
||||
BCWS工程量 = g.Sum(x => x.BCWS_Quantity),
|
||||
BCWS产值 = g.Sum(x => x.BCWS_OutputValue),
|
||||
BCWS百分比 = g.Sum(x => x.BCWS_Percentage),
|
||||
ACWP工程量 = g.Sum(x => x.ACWP_Quantity),
|
||||
ACWP产值 = g.Sum(x => x.ACWP_OutputValue),
|
||||
ACWP百分比 = g.Sum(x => x.ACWP_Percentage)
|
||||
}).ToList();
|
||||
|
||||
this.ChartEV.CreateMaryChartHTGL(LINQToDataTable(result), 1020, 420, null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user