修改项目级及进度首页
This commit is contained in:
parent
6382b43e73
commit
5ac9cee30c
|
@ -313,7 +313,7 @@ namespace FineUIPro.Web.JDGL.WBS
|
||||||
if (list.Count == 0)
|
if (list.Count == 0)
|
||||||
{
|
{
|
||||||
operating = "add";
|
operating = "add";
|
||||||
string openUrl = String.Format("CostControlInitEdit.aspx?operating=add&Id={0}", trWBS.SelectedNodeID, "增加 - ");
|
string openUrl = String.Format("CostControlEdit.aspx?operating=add&Id={0}", trWBS.SelectedNodeID, "增加 - ");
|
||||||
PageContext.RegisterStartupScript(Window3.GetShowReference(openUrl));
|
PageContext.RegisterStartupScript(Window3.GetShowReference(openUrl));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -140,7 +140,7 @@
|
||||||
<div class="bw-b-bottom-up flex flexV">
|
<div class="bw-b-bottom-up flex flexV">
|
||||||
<div class="tit-one pdl" style="color: #fff">进度统计</div>
|
<div class="tit-one pdl" style="color: #fff">进度统计</div>
|
||||||
<div class="bw-item-content flex1 pdtb0">
|
<div class="bw-item-content flex1 pdtb0">
|
||||||
<div id='four' style="width: 100%; height: 100%;"></div>
|
<div id='four' style="width: 100%; height: 50%;"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
<div class="bw-b-bottom-up flex flexV">
|
<div class="bw-b-bottom-up flex flexV">
|
||||||
<div class="tit-one tit-center" style="color: #fff">赢得值曲线</div>
|
<div class="tit-one tit-center" style="color: #fff">赢得值曲线</div>
|
||||||
<div class="bw-item-content flex1 pdtb0">
|
<div class="bw-item-content flex1 pdtb0">
|
||||||
<div id='two' style="width: 100%; height: 100%;"></div>
|
<div id='two' style="width: 100%; height: 150%;"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -31,6 +31,9 @@ namespace FineUIPro.Web
|
||||||
result = Convert.ToDouble(views[0].TotalRealNum);
|
result = Convert.ToDouble(views[0].TotalRealNum);
|
||||||
}
|
}
|
||||||
return JsonConvert.SerializeObject(result);
|
return JsonConvert.SerializeObject(result);
|
||||||
|
//double totalCost = from x in Funs.DB.WBS_CostControl where x.ProjectId == this.CurrUser.LoginProjectId && x.is select x;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -243,7 +243,7 @@ padding-left: 2em;
|
||||||
<div class="bw-b-bottom">
|
<div class="bw-b-bottom">
|
||||||
<div class="bw-b-bottom-up flex flexV">
|
<div class="bw-b-bottom-up flex flexV">
|
||||||
<div class="tit-one tit-center tit-right-wrap" style="color:#fff">
|
<div class="tit-one tit-center tit-right-wrap" style="color:#fff">
|
||||||
<div>施工进度曲线</div>
|
<div>赢得值曲线</div>
|
||||||
<div class="tit-right more js-more-2">更多</div>
|
<div class="tit-right more js-more-2">更多</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bw-item-content flex1 pdtb0">
|
<div class="bw-item-content flex1 pdtb0">
|
||||||
|
@ -515,7 +515,7 @@ padding-left: 2em;
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
formatter: '{a}<br />{b}: {c}%'
|
formatter: '{a}<br />{b}: {c}'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
show: true,
|
show: true,
|
||||||
|
@ -557,7 +557,7 @@ padding-left: 2em;
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: 'rgba(255, 255, 255, 0.8)'
|
color: 'rgba(255, 255, 255, 0.8)'
|
||||||
},
|
},
|
||||||
formatter: '{value} %'
|
//formatter: '{value} %'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
series: data,
|
series: data,
|
||||||
|
@ -572,11 +572,6 @@ padding-left: 2em;
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
//color: 'rgba(200,201,10, 1)'
|
//color: 'rgba(200,201,10, 1)'
|
||||||
//normal: {
|
|
||||||
// label: {
|
|
||||||
// show: false
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
},
|
},
|
||||||
backgroundColor: 'rgba(0,162,233, 0.01)',
|
backgroundColor: 'rgba(0,162,233, 0.01)',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
|
@ -588,70 +583,52 @@ padding-left: 2em;
|
||||||
myChart.setOption(option)
|
myChart.setOption(option)
|
||||||
}
|
}
|
||||||
//var two = { "title": "赢得值曲线", "xFontNum": 0, "legend": null, "categories": ["2020-07", "2020-08", "2020-09", "2020-10", "2020-11", "2020-12", "2021-01", "2021-02"], "series": [{ "name": null, "type": null, "data": [5.0, 2.0, 0.0, 1.0, 4.0, 8.0, 2.0, 3.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [8.0, 12.0, 4.0, 9.0, 10.0, 2.0, 3.0, 3.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [12.0, 2.0, 5.0, 10.0, 3.0, 3.0, 8.0, 10.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [4.0, 3.0, 14.0, 8.0, 10.0, 3.0, 5.0, 10.0], "dataString": null, "dataObject": null }], "series2": null };
|
//var two = { "title": "赢得值曲线", "xFontNum": 0, "legend": null, "categories": ["2020-07", "2020-08", "2020-09", "2020-10", "2020-11", "2020-12", "2021-01", "2021-02"], "series": [{ "name": null, "type": null, "data": [5.0, 2.0, 0.0, 1.0, 4.0, 8.0, 2.0, 3.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [8.0, 12.0, 4.0, 9.0, 10.0, 2.0, 3.0, 3.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [12.0, 2.0, 5.0, 10.0, 3.0, 3.0, 8.0, 10.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [4.0, 3.0, 14.0, 8.0, 10.0, 3.0, 5.0, 10.0], "dataString": null, "dataObject": null }], "series2": null };
|
||||||
var two =<%=Two %>
|
var two =<%=Two %>;
|
||||||
var xArr1 = two.categories
|
var xArr1 = two.categories
|
||||||
var data1 = [{
|
var data1 = [{
|
||||||
name: '计划值',
|
name: '本月BCWS',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
//smooth: true,
|
//smooth: true,
|
||||||
data: two.series[0].data,
|
data: two.series[0].data,
|
||||||
label: { //柱体上显示数值
|
|
||||||
show: false,//开启显示
|
|
||||||
position: 'top',//在上方显示
|
|
||||||
textStyle: {//数值样式
|
|
||||||
fontSize: '20px',
|
|
||||||
color: '#fff'
|
|
||||||
},
|
|
||||||
formatter: '{c}',
|
|
||||||
},
|
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
//color: 'rgba(200,201,10, 1)'
|
color: 'rgba(200,201,10, 1)'
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
name: '实际值',
|
name: '本月BCWP',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
//smooth: true,
|
//smooth: true,
|
||||||
data: two.series[2].data,
|
data: two.series[2].data,
|
||||||
label: { //柱体上显示数值
|
|
||||||
show: false,//开启显示
|
|
||||||
position: 'top',//在上方显示
|
|
||||||
textStyle: {//数值样式
|
|
||||||
fontSize: '20px',
|
|
||||||
color: '#fff'
|
|
||||||
},
|
|
||||||
formatter: '{c}',
|
|
||||||
},
|
|
||||||
}, {
|
}, {
|
||||||
name: '累计计划值',
|
name: '本月ACWP',
|
||||||
|
type: 'bar',
|
||||||
|
//smooth: true,
|
||||||
|
data: two.series[4].data,
|
||||||
|
}, {
|
||||||
|
name: '累计BCWS',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
//smooth: true,
|
//smooth: true,
|
||||||
data: two.series[1].data,
|
data: two.series[1].data,
|
||||||
label: { //柱体上显示数值
|
|
||||||
show: false,//开启显示
|
|
||||||
position: 'top',//在上方显示
|
|
||||||
textStyle: {//数值样式
|
|
||||||
fontSize: '20px',
|
|
||||||
color: '#fff'
|
|
||||||
},
|
|
||||||
formatter: '{c}',
|
|
||||||
},
|
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
//color: 'rgba(200,201,10, 1)'
|
//color: 'rgba(200,201,10, 1)'
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
name: '累计实际值',
|
name: '累计BCWP',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
//smooth: true,
|
//smooth: true,
|
||||||
data: two.series[3].data,
|
data: two.series[3].data,
|
||||||
label: { //柱体上显示数值
|
}, {
|
||||||
show: false,//开启显示
|
name: '累计ACWP',
|
||||||
position: 'top',//在上方显示
|
type: 'line',
|
||||||
textStyle: {//数值样式
|
//smooth: true,
|
||||||
fontSize: '20px',
|
data: two.series[5].data,
|
||||||
color: '#fff'
|
lineStyle: {
|
||||||
},
|
color: 'rgba(200,201,10, 1)'
|
||||||
formatter: '{c}',
|
|
||||||
},
|
},
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: 'rgba(200,201,10, 1)'
|
||||||
|
}
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
line('left_one', xArr1, data1)
|
line('left_one', xArr1, data1)
|
||||||
</script>
|
</script>
|
||||||
|
@ -919,7 +896,7 @@ padding-left: 2em;
|
||||||
})
|
})
|
||||||
|
|
||||||
$(".js-more-2").click(function () {
|
$(".js-more-2").click(function () {
|
||||||
window.open("../JDGL/Check/ProgressCompletion.aspx");
|
window.open("../common/mainMenu_JDGL.aspx");
|
||||||
})
|
})
|
||||||
|
|
||||||
$(".js-more-3").click(function () {
|
$(".js-more-3").click(function () {
|
||||||
|
|
|
@ -5,6 +5,8 @@ using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
using BLL;
|
using BLL;
|
||||||
|
|
||||||
namespace FineUIPro.Web.common
|
namespace FineUIPro.Web.common
|
||||||
|
@ -127,33 +129,115 @@ namespace FineUIPro.Web.common
|
||||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||||
List<string> listCategories = new List<string>();
|
List<string> listCategories = new List<string>();
|
||||||
businessColumn.title = "赢得值曲线";
|
businessColumn.title = "赢得值曲线";
|
||||||
var views = (from x in Funs.DB.View_JDGL_ProgressCompletion where x.ProjectId == this.CurrUser.LoginProjectId orderby x.Months select x).ToList();
|
Model.Project_Installation installation = BLL.Project_InstallationService.GetProjectInstallationByProjectId(this.CurrUser.LoginProjectId);
|
||||||
|
if (installation != null)
|
||||||
|
{
|
||||||
Model.SingleSerie s = new Model.SingleSerie();
|
Model.SingleSerie s = new Model.SingleSerie();
|
||||||
Model.SingleSerie s2 = new Model.SingleSerie();
|
Model.SingleSerie s2 = new Model.SingleSerie();
|
||||||
Model.SingleSerie s3 = new Model.SingleSerie();
|
Model.SingleSerie s3 = new Model.SingleSerie();
|
||||||
Model.SingleSerie s4 = new Model.SingleSerie();
|
Model.SingleSerie s4 = new Model.SingleSerie();
|
||||||
|
Model.SingleSerie s5 = new Model.SingleSerie();
|
||||||
|
Model.SingleSerie s6 = new Model.SingleSerie();
|
||||||
List<double> listdata = new List<double>();
|
List<double> listdata = new List<double>();
|
||||||
List<double> listdata2 = new List<double>();
|
List<double> listdata2 = new List<double>();
|
||||||
List<double> listdata3 = new List<double>();
|
List<double> listdata3 = new List<double>();
|
||||||
List<double> listdata4 = new List<double>();
|
List<double> listdata4 = new List<double>();
|
||||||
for (int i = 0; i < views.Count; i++)
|
List<double> listdata5 = new List<double>();
|
||||||
|
List<double> listdata6 = new List<double>();
|
||||||
|
string strSql = "select distinct (cast(YEAR(Months) as varchar(4))+'.'+cast(MONTH(Months) as varchar(2))) as 月份,t.Months," +
|
||||||
|
"ThisRealCost as '本月已完工作实际费用-ACWP',ThisPlanCost as '本月已完工作预算费用-BCWP',ThisPlanValue as '本月计划工作预算费用-BCWS',TotalPlanValue as '累计计划工作预算费用-BCWS',TotalRealCost as '累计已完工作实际费用-ACWP',TotalPlanCost as '累计已完工作预算费用-BCWP' " +
|
||||||
|
"from dbo.View_WBS_CostControlParentDetail as t where ParentId=@Id order by t.Months";
|
||||||
|
//string date = DateTime.Now.Year + "-" + DateTime.Now.Month + "-01";
|
||||||
|
SqlParameter[] parameter = new SqlParameter[]
|
||||||
{
|
{
|
||||||
listCategories.Add(views[i].MonthStr);
|
new SqlParameter("@Id",installation.InstallationId),
|
||||||
listdata.Add(Convert.ToDouble(views[i].PlanNum));
|
//new SqlParameter("@Months",date),
|
||||||
listdata2.Add(Convert.ToDouble(views[i].TotalPlanNum));
|
};
|
||||||
listdata3.Add(Convert.ToDouble(views[i].RealNum));
|
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
listdata4.Add(Convert.ToDouble(views[i].TotalRealNum));
|
decimal lastbcws = 0, bcws = 0, lastacwp = 0, acwp = 0, lastbcwp = 0, bcwp = 0;
|
||||||
|
for (int i = 0; i < dt.Rows.Count; i++)
|
||||||
|
{
|
||||||
|
dt.Rows[i]["本月已完工作实际费用-ACWP"] = Funs.GetNewDecimalOrZero(dt.Rows[i]["本月已完工作实际费用-ACWP"].ToString()) / 10000;
|
||||||
|
dt.Rows[i]["本月已完工作预算费用-BCWP"] = Funs.GetNewDecimalOrZero(dt.Rows[i]["本月已完工作预算费用-BCWP"].ToString()) / 10000;
|
||||||
|
dt.Rows[i]["本月计划工作预算费用-BCWS"] = Funs.GetNewDecimalOrZero(dt.Rows[i]["本月计划工作预算费用-BCWS"].ToString()) / 10000;
|
||||||
|
bcws = Funs.GetNewDecimalOrZero(dt.Rows[i]["累计计划工作预算费用-BCWS"].ToString());
|
||||||
|
acwp = Funs.GetNewDecimalOrZero(dt.Rows[i]["累计已完工作实际费用-ACWP"].ToString());
|
||||||
|
bcwp = Funs.GetNewDecimalOrZero(dt.Rows[i]["累计已完工作预算费用-BCWP"].ToString());
|
||||||
|
if (bcws == lastbcws)
|
||||||
|
{
|
||||||
|
if (Funs.GetNewDateTimeOrNow(dt.Rows[i]["Months"].ToString()) > DateTime.Now)
|
||||||
|
{
|
||||||
|
dt.Rows[i]["累计计划工作预算费用-BCWS"] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dt.Rows[i]["累计计划工作预算费用-BCWS"] = bcws / 10000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dt.Rows[i]["累计计划工作预算费用-BCWS"] = bcws / 10000;
|
||||||
|
}
|
||||||
|
if (acwp == lastacwp)
|
||||||
|
{
|
||||||
|
if (Funs.GetNewDateTimeOrNow(dt.Rows[i]["Months"].ToString()) > DateTime.Now)
|
||||||
|
{
|
||||||
|
dt.Rows[i]["累计已完工作实际费用-ACWP"] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dt.Rows[i]["累计已完工作实际费用-ACWP"] = acwp / 10000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dt.Rows[i]["累计已完工作实际费用-ACWP"] = acwp / 10000;
|
||||||
|
}
|
||||||
|
if (bcwp == lastbcwp)
|
||||||
|
{
|
||||||
|
if (Funs.GetNewDateTimeOrNow(dt.Rows[i]["Months"].ToString()) > DateTime.Now)
|
||||||
|
{
|
||||||
|
dt.Rows[i]["累计已完工作预算费用-BCWP"] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dt.Rows[i]["累计已完工作预算费用-BCWP"] = bcwp / 10000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dt.Rows[i]["累计已完工作预算费用-BCWP"] = bcwp / 10000;
|
||||||
|
}
|
||||||
|
lastbcws = bcws;
|
||||||
|
lastacwp = acwp;
|
||||||
|
lastbcwp = bcwp;
|
||||||
|
|
||||||
|
listCategories.Add(dt.Rows[i]["月份"].ToString());
|
||||||
|
if (Funs.GetNewDateTimeOrNow(dt.Rows[i]["Months"].ToString()) <= DateTime.Now)
|
||||||
|
{
|
||||||
|
listdata.Add(Convert.ToDouble(dt.Rows[i]["本月计划工作预算费用-BCWS"]));
|
||||||
|
listdata2.Add(Convert.ToDouble(dt.Rows[i]["累计计划工作预算费用-BCWS"]));
|
||||||
|
listdata3.Add(Convert.ToDouble(dt.Rows[i]["本月已完工作预算费用-BCWP"]));
|
||||||
|
listdata4.Add(Convert.ToDouble(dt.Rows[i]["累计已完工作预算费用-BCWP"]));
|
||||||
|
listdata5.Add(Convert.ToDouble(dt.Rows[i]["本月已完工作实际费用-ACWP"]));
|
||||||
|
listdata6.Add(Convert.ToDouble(dt.Rows[i]["累计已完工作实际费用-ACWP"]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
s.data = listdata;
|
s.data = listdata;
|
||||||
s2.data = listdata2;
|
s2.data = listdata2;
|
||||||
s3.data = listdata3;
|
s3.data = listdata3;
|
||||||
s4.data = listdata4;
|
s4.data = listdata4;
|
||||||
|
s5.data = listdata5;
|
||||||
|
s6.data = listdata6;
|
||||||
series.Add(s);
|
series.Add(s);
|
||||||
series.Add(s2);
|
series.Add(s2);
|
||||||
series.Add(s3);
|
series.Add(s3);
|
||||||
series.Add(s4);
|
series.Add(s4);
|
||||||
|
series.Add(s5);
|
||||||
|
series.Add(s6);
|
||||||
businessColumn.categories = listCategories;
|
businessColumn.categories = listCategories;
|
||||||
businessColumn.series = series;
|
businessColumn.series = series;
|
||||||
|
}
|
||||||
return JsonConvert.SerializeObject(businessColumn);
|
return JsonConvert.SerializeObject(businessColumn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue