首页数据只显示本年份修改

This commit is contained in:
李超 2024-01-03 14:12:27 +08:00
parent e8877811ef
commit f590c95d94
6 changed files with 291 additions and 130 deletions

View File

@ -35,7 +35,9 @@
<f:RadioButtonList ID="rblState" runat="server" Label="分析类型" LabelWidth="80px" Width="250px"
AutoPostBack="true" OnSelectedIndexChanged="drpChartType_SelectedIndexChanged">
<f:RadioItem Value="0" Selected="true" Text="按责任单位" />
<f:RadioItem Value="2" Text="检查人" />
<f:RadioItem Value="1" Text="按检查项" />
</f:RadioButtonList>
<f:Button ID="BtnAnalyse" Text="统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click">
</f:Button>
@ -115,22 +117,22 @@
series: series
};
if (xAxis.length > 5) {
option.dataZoom = [{
type: 'slider',
show: true,
startValue: 0,
endValue: 4,
height: '10',
backgroundColor: '#aed0ea',
fillerColor: '#107f8b',
bottom: '10%',
zoomLock: true,
moveOnMouseWheel: true,
brushSelect: true,
showDetail: false,
}]
}
//if (xAxis.length > 5) {
// option.dataZoom = [{
// type: 'slider',
// show: true,
// startValue: 0,
// endValue: 4,
// height: '10',
// backgroundColor: '#aed0ea',
// fillerColor: '#107f8b',
// bottom: '10%',
// zoomLock: true,
// moveOnMouseWheel: true,
// brushSelect: true,
// showDetail: false,
// }]
//}
var myChart = echarts.init(document.getElementById("divAccidentTime"));
myChart.setOption(option);

View File

@ -73,7 +73,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
}
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
{
strSql += " and CheckTime <'" + DateTime.Parse( this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
strSql += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
}
if (drpUnit.SelectedValue != BLL.Const._Null)
@ -156,56 +156,205 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
},
data: " + series3 + @"
}]";
string strSql1 = @" select r.RegisterTypesId,t.RegisterTypesName,
string strSql1 = @" select r.RegisterTypesId,t.RegisterTypesName,
count(*) as allnum,
Sum(case when States= 1 or States is null then 1 else 0 end) as todo,
Sum(case when States= 3 or States =2 then 1 else 0 end) as finish
from HSSE_Hazard_HazardRegister r left join HSSE_Hazard_HazardRegisterTypes t on r.RegisterTypesId=t.RegisterTypesId
where ProjectId=@ProjectId and States != '4' and ProblemTypes = '1'
";
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
}
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
}
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
}
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
}
if (drpUnit.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
}
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
}
strSql1 += " group by r.RegisterTypesId,t.RegisterTypesName ";
List<SqlParameter> listStr1 = new List<SqlParameter>();
listStr1.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (drpUnit.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
}
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
}
strSql1 += " group by r.RegisterTypesId,t.RegisterTypesName ";
List<SqlParameter> listStr1 = new List<SqlParameter>();
listStr1.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
SqlParameter[] parameter1 = listStr1.ToArray();
DataTable tb1 = SQLHelper.GetDataTableRunText(strSql1, parameter1);
if (tb1 != null)
{
xPieAxis = "[";
seriesPie = "[";
foreach (DataRow dr in tb1.Rows)
{
xPieAxis += " '" + dr["RegisterTypesName"].ToString() + "' ,";
seriesPie += " { name:'" + dr["RegisterTypesName"].ToString() + "', value:" + dr["allnum"].ToString() + "} ,";
SqlParameter[] parameter1 = listStr1.ToArray();
DataTable tb1 = SQLHelper.GetDataTableRunText(strSql1, parameter1);
if (tb1 != null)
{
xPieAxis = "[";
seriesPie = "[";
}
xPieAxis=xPieAxis.TrimEnd(',');
seriesPie=seriesPie.TrimEnd(',');
xPieAxis += "]";
seriesPie += "]";
}
}
else
foreach (DataRow dr in tb1.Rows)
{
xPieAxis += " '" + dr["RegisterTypesName"].ToString() + "' ,";
seriesPie += " { name:'" + dr["RegisterTypesName"].ToString() + "', value:" + dr["allnum"].ToString() + "} ,";
}
xPieAxis = xPieAxis.TrimEnd(',');
seriesPie = seriesPie.TrimEnd(',');
xPieAxis += "]";
seriesPie += "]";
}
}
else if (this.rblState.SelectedValue == "2")
{
string strSql = @" select a.CheckManId,b.UserName,
count(*) as allnum,
Sum(case when States= 1 or States is null then 1 else 0 end) as todo,
Sum(case when States= 3 or States =2 then 1 else 0 end) as finish
from HSSE_Hazard_HazardRegister a left join Sys_User b on a.CheckManId = b.UserId
where a.ProjectId=@ProjectId and States != '4' and ProblemTypes = '1'
";
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
{
strSql += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
}
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
{
strSql += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
}
if (drpUnit.SelectedValue != BLL.Const._Null)
{
strSql += " and a.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
}
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
{
strSql += " and a.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
}
strSql += " group by a.CheckManId,b.UserName ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
legend = "[\"全部\", \"待整改\", \"已整改\"]";
xAxis = "[";
string series1 = "[";
string series2 = "[";
string series3 = "[";
foreach (DataRow dr in tb.Rows)
{
xAxis += "\"" + dr["UserName"].ToString() + "\",";
series1 += "" + dr["allnum"].ToString() + ",";
series2 += "" + dr["todo"].ToString() + ",";
series3 += "" + dr["finish"].ToString() + ",";
}
xAxis = xAxis.TrimEnd(',');
xAxis += "]";
series1 = series1.TrimEnd(',');
series1 += "]";
series2 = series2.TrimEnd(',');
series2 += "]";
series3 = series3.TrimEnd(',');
series3 += "]";
series = @"[{
name: '',
type: 'bar',
label: {
show: true,
position: 'top'
},
barWidth: 20,
barGap:'5%',
emphasis: {
focus: 'series'
},
data: " + series1 + @"
},
{
name: '',
type: 'bar',
barWidth: 20,
barGap:'5%',
label: {
show: true,
position: 'top'
},
emphasis: {
focus: 'series'
},
data: " + series2 + @"
},
{
name: '',
type: 'bar',
barWidth: 20,
barGap:'5%',
label: {
show: true,
position: 'top'
},
emphasis: {
focus: 'series'
},
data: " + series3 + @"
}]";
string strSql1 = @" select r.RegisterTypesId,t.RegisterTypesName,
count(*) as allnum,
Sum(case when States= 1 or States is null then 1 else 0 end) as todo,
Sum(case when States= 3 or States =2 then 1 else 0 end) as finish
from HSSE_Hazard_HazardRegister r left join HSSE_Hazard_HazardRegisterTypes t on r.RegisterTypesId=t.RegisterTypesId
where ProjectId=@ProjectId and States != '4' and ProblemTypes = '1'
";
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
}
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
}
if (drpUnit.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
}
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
}
strSql1 += " group by r.RegisterTypesId,t.RegisterTypesName ";
List<SqlParameter> listStr1 = new List<SqlParameter>();
listStr1.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
SqlParameter[] parameter1 = listStr1.ToArray();
DataTable tb1 = SQLHelper.GetDataTableRunText(strSql1, parameter1);
if (tb1 != null)
{
xPieAxis = "[";
seriesPie = "[";
foreach (DataRow dr in tb1.Rows)
{
xPieAxis += " '" + dr["RegisterTypesName"].ToString() + "' ,";
seriesPie += " { name:'" + dr["RegisterTypesName"].ToString() + "', value:" + dr["allnum"].ToString() + "} ,";
}
xPieAxis = xPieAxis.TrimEnd(',');
seriesPie = seriesPie.TrimEnd(',');
xPieAxis += "]";
seriesPie += "]";
}
}
else
{
string strSql = @" select u.UnitId,u.unitName,r.RegisterTypesId,t.RegisterTypesName,
count(*) as allnum,
@ -254,14 +403,14 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
Dictionary<string, string> temp = null;
if (!data.ContainsKey(dr["unitName"].ToString()))
{
data.Add(dr["unitName"].ToString(), new Dictionary<string,string>());
data.Add(dr["unitName"].ToString(), new Dictionary<string, string>());
}
temp = data[dr["unitName"].ToString()];
if (!temp.ContainsKey(dr["RegisterTypesName"].ToString()))
{
temp.Add(dr["RegisterTypesName"].ToString(),"0");
temp.Add(dr["RegisterTypesName"].ToString(), "0");
}
temp[dr["RegisterTypesName"].ToString()]=dr["allnum"].ToString();
temp[dr["RegisterTypesName"].ToString()] = dr["allnum"].ToString();
}
foreach (string types in xdic)
@ -295,7 +444,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
}
series += @"{
name: '"+ unit + @"[]',
name: '" + unit + @"[]',
type: 'bar',
stack: '',
barWidth: 10,
@ -309,11 +458,11 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
data: [" + tempseries.TrimEnd(',') + @"]
},";
}
data = new Dictionary<string, Dictionary<string, string>>();
data = new Dictionary<string, Dictionary<string, string>>();
foreach (DataRow dr in tb.Rows)
{
xdic.Add(dr["RegisterTypesName"].ToString());
Dictionary<string,string> temp = null;
Dictionary<string, string> temp = null;
if (!data.ContainsKey(dr["unitName"].ToString()))
{
data.Add(dr["unitName"].ToString(), new Dictionary<string, string>());
@ -323,7 +472,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
{
temp.Add(dr["RegisterTypesName"].ToString(), "0");
}
temp[dr["RegisterTypesName"].ToString()]=dr["todo"].ToString();
temp[dr["RegisterTypesName"].ToString()] = dr["todo"].ToString();
}
foreach (string unit in data.Keys)
{
@ -369,7 +518,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
{
temp.Add(dr["RegisterTypesName"].ToString(), "0");
}
temp[dr["RegisterTypesName"].ToString()]=dr["finish"].ToString();
temp[dr["RegisterTypesName"].ToString()] = dr["finish"].ToString();
}
foreach (string unit in data.Keys)
{
@ -407,56 +556,56 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
string strSql1 = @" select r.RegisterTypesId,t.RegisterTypesName,
string strSql1 = @" select r.RegisterTypesId,t.RegisterTypesName,
count(*) as allnum,
Sum(case when States= 1 or States is null then 1 else 0 end) as todo,
Sum(case when States= 3 or States =2 then 1 else 0 end) as finish
from HSSE_Hazard_HazardRegister r left join HSSE_Hazard_HazardRegisterTypes t on r.RegisterTypesId=t.RegisterTypesId
where ProjectId=@ProjectId and States != '4' and ProblemTypes = '1'
";
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
}
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
}
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
}
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
}
if (drpUnit.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
}
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
}
strSql1 += " group by r.RegisterTypesId,t.RegisterTypesName ";
List<SqlParameter> listStr1 = new List<SqlParameter>();
listStr1.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (drpUnit.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
}
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
}
strSql1 += " group by r.RegisterTypesId,t.RegisterTypesName ";
List<SqlParameter> listStr1 = new List<SqlParameter>();
listStr1.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
SqlParameter[] parameter1 = listStr1.ToArray();
DataTable tb1 = SQLHelper.GetDataTableRunText(strSql1, parameter1);
if (tb1 != null)
{
xPieAxis = "[";
seriesPie = "[";
SqlParameter[] parameter1 = listStr1.ToArray();
DataTable tb1 = SQLHelper.GetDataTableRunText(strSql1, parameter1);
if (tb1 != null)
{
xPieAxis = "[";
seriesPie = "[";
foreach (DataRow dr in tb1.Rows)
{
xPieAxis += " '" + dr["RegisterTypesName"].ToString() + "' ,";
seriesPie += " { name:'" + dr["RegisterTypesName"].ToString() + "', value:" + dr["allnum"].ToString() + "} ,";
foreach (DataRow dr in tb1.Rows)
{
xPieAxis += " '" + dr["RegisterTypesName"].ToString() + "' ,";
seriesPie += " { name:'" + dr["RegisterTypesName"].ToString() + "', value:" + dr["allnum"].ToString() + "} ,";
}
xPieAxis = xPieAxis.TrimEnd(',');
seriesPie = seriesPie.TrimEnd(',');
xPieAxis += "]";
seriesPie += "]";
}
}
xPieAxis = xPieAxis.TrimEnd(',');
seriesPie = seriesPie.TrimEnd(',');
xPieAxis += "]";
seriesPie += "]";
}
}
}
// this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "单位巡检分析", this.drpChartType.SelectedValue, 1130, 450, this.ckbShow.Checked));
//#endregion

View File

@ -123,8 +123,9 @@ namespace FineUIPro.Web.common
var ProjectTotal1 = (from x in Funs.DB.HSSE_MonthReportItem
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
where ("成达公司HSE管理人数" == x.ReportItem || "分包商HSE管理人数" == x.ReportItem) && y.Years == DateTime.Now.Year
select x.YearTotal).Sum();
//where ("成达公司HSE管理人数" == x.ReportItem || "分包商HSE管理人数" == x.ReportItem) && y.Years == DateTime.Now.Year
where ("成达公司现场人数" == x.ReportItem ) && y.Years == DateTime.Now.Year
select x.YearTotal).Sum();
if (ProjectTotal1.HasValue)
{
@ -133,14 +134,16 @@ namespace FineUIPro.Web.common
var ProjectTotal2 = (from x in Funs.DB.HSSE_MonthReportItem
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
where ("成达公司现场人数" == x.ReportItem || "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year
select x.YearTotal).Sum();
//where ("成达公司现场人数" == x.ReportItem || "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year
where ( "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year
select x.YearTotal).Sum();
if (ProjectTotal2.HasValue && ProjectTotal1.HasValue)
{
this.divZYPerson.InnerHtml = (ProjectTotal2.Value - ProjectTotal1.Value).ToString();
}
else if (ProjectTotal2.HasValue)
//if (ProjectTotal2.HasValue && ProjectTotal1.HasValue)
//{
// this.divZYPerson.InnerHtml = (ProjectTotal2.Value - ProjectTotal1.Value).ToString();
//}
//else
if (ProjectTotal2.HasValue)
{
this.divZYPerson.InnerHtml = ProjectTotal2.Value.ToString();
}
@ -202,9 +205,9 @@ namespace FineUIPro.Web.common
// this.divRectifyRate.InnerHtml = Math.Round(ccount * 1.0 / allcout * 100, 1).ToString();
//}
DateTime time = DateTime.Parse(DateTime.Now.ToString("yyyy-01-01"));
var getRectify = from x in Funs.DB.View_Hazard_HazardRegister
where x.States != Const.State_0 && x.States != Const.State_R && x.States != null
where x.States != Const.State_0 && x.States != Const.State_R && x.States != null && x.RegisterDate>= time
group x by x.States into g
select new { g.Key, Count = g.Count() };
var allcout = getRectify.ToList();
@ -269,13 +272,17 @@ namespace FineUIPro.Web.common
/// </summary>
private void getCQMSProblem()
{
DateTime time = DateTime.Parse(DateTime.Now.ToString("yyyy-01-01"));
///整改率
CRectificationRate = 0;
///合格率
CQualifiedRate = 0;
var getJointCheckDetail = from x in Funs.DB.Check_JointCheckDetail
where x.CreateDate >= time
select x;
var getCheckControl = from x in Funs.DB.Check_CheckControl select x;
var getCheckControl = from x in Funs.DB.Check_CheckControl
where x.CheckDate >= time
select x;
///问题总数
int AllCount = getJointCheckDetail.Count() + getCheckControl.Count();
this.divCQMSAllNum.InnerHtml = AllCount.ToString();
@ -293,7 +300,7 @@ namespace FineUIPro.Web.common
CRectificationRate = Math.Round(CCount * 1.0 / AllCount * 100, 1);
}
}
var inspectionManagements = from x in Funs.DB.View_CQMS_InspectionManagementDetail select x;
var inspectionManagements = from x in Funs.DB.View_CQMS_InspectionManagementDetail where x.CheckDate>=time select x;
if (inspectionManagements.Count() > 0)
{
int okInspectionManagements = inspectionManagements.Where(x => x.IsOnceQualified == true).Count();

View File

@ -280,7 +280,7 @@
</div>
<div class="sd-body2-right">
<div class="sd-section">
<div class="sd-section-title ellipsis">劳务数据</div>
<div class="sd-section-title ellipsis">劳务数据(累计)</div>
<div class="sd-section-content">
<div class="sd-section7-inner">
<div class="sd-labor-data-list">

View File

@ -184,7 +184,8 @@ namespace FineUIPro.Web.common
//}
var ProjectTotal1 = (from x in Funs.DB.HSSE_MonthReportItem
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
where ("成达公司HSE管理人数" == x.ReportItem || "分包商HSE管理人数" == x.ReportItem) && y.Years == DateTime.Now.Year && y.ProjectId==CurrUser.LoginProjectId
// where ("成达公司HSE管理人数" == x.ReportItem || "分包商HSE管理人数" == x.ReportItem) && y.Years == DateTime.Now.Year && y.ProjectId==CurrUser.LoginProjectId
where ("成达公司现场人数" == x.ReportItem ) && y.Years == DateTime.Now.Year && y.ProjectId==CurrUser.LoginProjectId
select x.YearTotal).Sum();
@ -194,24 +195,26 @@ namespace FineUIPro.Web.common
var ProjectTotal2 = (from x in Funs.DB.HSSE_MonthReportItem
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
where ("成达公司现场人数" == x.ReportItem || "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year && y.ProjectId == CurrUser.LoginProjectId
// where ("成达公司现场人数" == x.ReportItem || "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year && y.ProjectId == CurrUser.LoginProjectId
where ( "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year && y.ProjectId == CurrUser.LoginProjectId
select x.YearTotal).Sum();
if (ProjectTotal1.HasValue)
{
this.divGLPerson.InnerHtml = ProjectTotal1.Value.ToString();
this.divGLPerson.InnerHtml = ProjectTotal1.Value.ToString() + "人月";
}
if (ProjectTotal2.HasValue)
if (ProjectTotal2.HasValue&& ProjectTotal1.HasValue)
{
this.divALLPerson.InnerHtml = ProjectTotal2.Value.ToString();
this.divALLPerson.InnerHtml = (ProjectTotal1.Value + ProjectTotal2.Value).ToString() + "人月";
}
if (ProjectTotal1.HasValue && ProjectTotal2.HasValue)
{
this.divZYPerson.InnerHtml = (ProjectTotal2.Value - ProjectTotal1.Value).ToString();
}
else if(ProjectTotal2.HasValue)
//if (ProjectTotal1.HasValue && ProjectTotal2.HasValue)
//{
// this.divZYPerson.InnerHtml = (ProjectTotal2.Value - ProjectTotal1.Value).ToString();
//}
//else
if(ProjectTotal2.HasValue)
{
this.divZYPerson.InnerHtml = ProjectTotal2.Value .ToString();
this.divZYPerson.InnerHtml = ProjectTotal2.Value .ToString()+"人月";
}

View File

@ -17,8 +17,8 @@ namespace WebAPI.Common
public static void init(int port)
{
allSockets = new Dictionary<string, IWebSocketConnection>();
webSocketServer = new WebSocketServer("wss://0.0.0.0:" + port);
//webSocketServer.Certificate = new X509Certificate2("MyCert.pfx","");
webSocketServer = new WebSocketServer("wss://127.0.0.1:" + port);
webSocketServer.Certificate = new X509Certificate2("D:\\project\\vs\\sggl_cd\\SGGL\\WebAPI\\bin\\wzgl.hfnbd.com.pfx", "1y1fib61");
webSocketServer.Start(socket =>
{