提交代码
This commit is contained in:
commit
6eb3e01c1b
|
@ -1,4 +1,13 @@
|
|||
|
||||
|
||||
ALTER TABLE Solution_LargerHazard
|
||||
ADD CONSTRAINT DF_Solution_LargerHazard_TrainPersonNum DEFAULT 0 FOR TrainPersonNum;
|
||||
go
|
||||
ALTER TABLE Comprehensive_MajorPlanApproval
|
||||
ADD CONSTRAINT DF_Comprehensive_MajorPlanApproval_TrainPersonNum DEFAULT 0 FOR TrainPersonNum;
|
||||
go
|
||||
|
||||
|
||||
ALTER TABLE Solution_LargerHazard ALTER COLUMN Address nvarchar(500);
|
||||
go
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
UPDATE [dbo].[HSSE_Hazard_HazardRegister] SET [Risk_Level] = '一般' WHERE Risk_Level is null or Risk_Level = '';
|
||||
go
|
||||
|
||||
UPDATE [dbo].[HSSE_Hazard_HazardRegister] SET [ProblemTypes] = '0' WHERE ProblemTypes is null or Risk_Level = '';
|
||||
go
|
|
@ -4811,7 +4811,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 关键事项模板文件原始虚拟路径
|
||||
/// </summary>
|
||||
public const string GJSXOutTemplateUrl = "File\\Excel\\DataOut\\关键事项.xlsx";
|
||||
public const string GJSXOutTemplateUrl = "File\\Excel\\DataOut\\关键事项跟踪一览表.xlsx";
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
|
|
@ -1250,6 +1250,59 @@ namespace BLL
|
|||
//return TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)).AddSeconds(timestamp);
|
||||
}
|
||||
|
||||
#region 去除后面多余的零
|
||||
|
||||
/// <summary>
|
||||
/// 去除后面多余的零
|
||||
/// </summary>
|
||||
/// <param name="sResult"></param>
|
||||
/// <returns></returns>
|
||||
public static string RemoveZero(string sResult)
|
||||
{
|
||||
if (sResult.IndexOf(".") < 0)
|
||||
return sResult;
|
||||
int iIndex = sResult.Length - 1;
|
||||
for (int i = sResult.Length - 1; i >= 0; i--)
|
||||
{
|
||||
if (sResult.Substring(i, 1) != "0")
|
||||
{
|
||||
iIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
sResult = sResult.Substring(0, iIndex + 1);
|
||||
if (sResult.EndsWith("."))
|
||||
sResult = sResult.Substring(0, sResult.Length - 1);
|
||||
return sResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 去除后面多余的零
|
||||
/// </summary>
|
||||
/// <param name="dValue"></param>
|
||||
/// <returns></returns>
|
||||
public static string RemoveZero(decimal dValue)
|
||||
{
|
||||
string sResult = dValue.ToString();
|
||||
if (sResult.IndexOf(".") < 0)
|
||||
return sResult;
|
||||
int iIndex = sResult.Length - 1;
|
||||
for (int i = sResult.Length - 1; i >= 0; i--)
|
||||
{
|
||||
if (sResult.Substring(i, 1) != "0")
|
||||
{
|
||||
iIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
sResult = sResult.Substring(0, iIndex + 1);
|
||||
if (sResult.EndsWith("."))
|
||||
sResult = sResult.Substring(0, sResult.Length - 1);
|
||||
return sResult;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static string RequestGet(string Baseurl, string Token)
|
||||
{
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
|
|
@ -113,7 +113,7 @@ namespace BLL
|
|||
newHazardRegister.ProblemTypes = hazardRegister.ProblemTypes;
|
||||
newHazardRegister.DIC_ID = hazardRegister.DIC_ID;
|
||||
newHazardRegister.Type = hazardRegister.Type;
|
||||
|
||||
newHazardRegister.Risk_Level = hazardRegister.Risk_Level;
|
||||
newHazardRegister.HiddenType = hazardRegister.HiddenType;
|
||||
//把附件表的路径复制过来
|
||||
Model.AttachFile file = BLL.AttachFileService.GetAttachFile(hazardRegister.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId);
|
||||
|
|
|
@ -1352,4 +1352,8 @@
|
|||
<value>Completion status of weekly plan</value>
|
||||
<comment>周计划完成情况</comment>
|
||||
</data>
|
||||
<data name="mainProject2_QuantityDone" xml:space="preserve">
|
||||
<value>Completion status of engineering quantity</value>
|
||||
<comment>工程量完成情况</comment>
|
||||
</data>
|
||||
</root>
|
|
@ -1197,4 +1197,7 @@
|
|||
<data name="mainProject2_WeekPlanDone" xml:space="preserve">
|
||||
<value>周计划完成情况</value>
|
||||
</data>
|
||||
<data name="mainProject2_QuantityDone" xml:space="preserve">
|
||||
<value>工程量完成情况</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1194,4 +1194,7 @@
|
|||
<data name="mainProject2_WeekPlanDone" xml:space="preserve">
|
||||
<value>周计划完成情况</value>
|
||||
</data>
|
||||
<data name="mainProject2_QuantityDone" xml:space="preserve">
|
||||
<value>工程量完成情况</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1185,6 +1185,15 @@ namespace Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 工程量完成情况 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string mainProject2_QuantityDone {
|
||||
get {
|
||||
return ResourceManager.GetString("mainProject2_QuantityDone", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 质量安全预警 的本地化字符串。
|
||||
/// </summary>
|
||||
|
@ -3067,7 +3076,7 @@ namespace Resources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 欢迎回来 的本地化字符串。
|
||||
/// 查找类似 欢迎回来 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string String1 {
|
||||
get {
|
||||
|
@ -3076,7 +3085,7 @@ namespace Resources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 分包管理 的本地化字符串。
|
||||
/// 查找类似 分包管理 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string SubManagement {
|
||||
get {
|
||||
|
@ -3256,7 +3265,7 @@ namespace Resources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 欢迎回来 的本地化字符串。
|
||||
/// 查找类似 欢迎回来 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string Welcome {
|
||||
get {
|
||||
|
@ -3265,7 +3274,7 @@ namespace Resources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 焊接管理 的本地化字符串。
|
||||
/// 查找类似 焊接管理 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string WeldingManage {
|
||||
get {
|
||||
|
|
|
@ -2867,7 +2867,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
}
|
||||
SaveMethod();
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
//ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
|
||||
//Model.Report_WeekAndMonthReport_New weekAndMonthReport = WeekAndMonthReportNewService.Detail(this.ReportId);
|
||||
|
@ -3147,14 +3147,21 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
saveTxtContent();
|
||||
#endregion
|
||||
|
||||
bool save = false;
|
||||
if (AddOrUpdate == "add")
|
||||
{
|
||||
save = true;
|
||||
WeekAndMonthReportNewService.Insert(report);
|
||||
}
|
||||
else
|
||||
{
|
||||
save = true;
|
||||
WeekAndMonthReportNewService.Update(report);
|
||||
}
|
||||
if (save)
|
||||
{
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
|
||||
#region 保存本月质量目标管理情况
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace FineUIPro.Web.DataShow
|
|||
from EduTrain_TrainRecord AS TrainRecord
|
||||
LEFT JOIN Base_TrainType AS TrainType ON TrainRecord.TrainTypeId=TrainType.TrainTypeId
|
||||
LEFT JOIN Base_Project AS Project ON TrainRecord.ProjectId=Project.ProjectId
|
||||
|
||||
where Project.ProjectState ='1'
|
||||
UNION ALL
|
||||
|
||||
select
|
||||
|
@ -91,7 +91,7 @@ namespace FineUIPro.Web.DataShow
|
|||
TrainDepart as UnitName
|
||||
From Bo_Sheng_Train F
|
||||
LEFT JOIN Base_Project AS Project ON F.ProjectId=Project.ProjectId
|
||||
)f WHERE 1=1 ";
|
||||
)f WHERE 1=1 and Project.ProjectState ='1' ";
|
||||
|
||||
#region 总数
|
||||
var strSqlSum = @"select Count(*)as allCount from(
|
||||
|
@ -112,7 +112,7 @@ namespace FineUIPro.Web.DataShow
|
|||
from EduTrain_TrainRecord AS TrainRecord
|
||||
LEFT JOIN Base_TrainType AS TrainType ON TrainRecord.TrainTypeId=TrainType.TrainTypeId
|
||||
LEFT JOIN Base_Project AS Project ON TrainRecord.ProjectId=Project.ProjectId
|
||||
|
||||
where Project.ProjectState ='1'
|
||||
UNION ALL
|
||||
|
||||
select
|
||||
|
@ -129,7 +129,7 @@ namespace FineUIPro.Web.DataShow
|
|||
TrainDepart as UnitName
|
||||
From Bo_Sheng_Train F
|
||||
LEFT JOIN Base_Project AS Project ON F.ProjectId=Project.ProjectId
|
||||
)f WHERE 1=1";
|
||||
)f WHERE 1=1 and Project.ProjectState ='1'" ;
|
||||
|
||||
#endregion
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace FineUIPro.Web.DataShow
|
|||
LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId
|
||||
WHERE Person.PersonId in (select distinct PersonId from SitePerson_PersonInOutNow
|
||||
where CONVERT(VARCHAR(10), GETDATE(), 23)=CONVERT(VARCHAR(10), ChangeTime, 23)) ";
|
||||
where CONVERT(VARCHAR(10), GETDATE(), 23)=CONVERT(VARCHAR(10), ChangeTime, 23)) and Project.ProjectState ='1'";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace FineUIPro.Web.DataShow
|
|||
LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId
|
||||
WHERE Person.PersonId in (select distinct PersonId from SitePerson_PersonInOutNow
|
||||
where CONVERT(VARCHAR(10), GETDATE(), 23)=CONVERT(VARCHAR(10), ChangeTime, 23)) and (WorkPost.PostType is null or WorkPost.PostType!='1') ";
|
||||
where CONVERT(VARCHAR(10), GETDATE(), 23)=CONVERT(VARCHAR(10), ChangeTime, 23)) and (WorkPost.PostType is null or WorkPost.PostType!='1') and Project.ProjectState ='1'";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace FineUIPro.Web.DataShow
|
|||
LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId
|
||||
WHERE Person.PersonId in (select distinct PersonId from SitePerson_PersonInOutNow
|
||||
where CONVERT(VARCHAR(10), GETDATE(), 23)=CONVERT(VARCHAR(10), ChangeTime, 23)) and WorkPost.PostType='1' ";
|
||||
where CONVERT(VARCHAR(10), GETDATE(), 23)=CONVERT(VARCHAR(10), ChangeTime, 23)) and WorkPost.PostType='1' and Project.ProjectState ='1'";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace FineUIPro.Web.DataShow
|
|||
FROM SitePerson_Person AS Person
|
||||
LEFT JOIN Base_Project AS Project ON Project.ProjectId=Person.ProjectId
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE Person.IsUsed=1 and WorkPost.IsCQMS=1 ";
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE Person.IsUsed=1 and WorkPost.IsCQMS=1 and Project.ProjectState ='1'";
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
strSql += " AND Person.ProjectId = @ProjectId";
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace FineUIPro.Web.DataShow
|
|||
LEFT JOIN Base_Project AS Project ON Person.ProjectId =Project.ProjectId
|
||||
LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId
|
||||
WHERE IsUsed=1 AND InTime <=GETDATE() AND (OutTime IS NULL OR OutTime > GETDATE()) ";
|
||||
WHERE IsUsed=1 AND InTime <=GETDATE() AND (OutTime IS NULL OR OutTime > GETDATE()) and Project.ProjectState ='1' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -535,22 +535,31 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
|||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(tb.Rows[j]["GJSXTypeName"].ToString());
|
||||
cell = row.CreateCell(6);
|
||||
var stateCellStyle = cellStyle;
|
||||
//if (state == "0")
|
||||
//{
|
||||
// stateCellStyle.FillForegroundColor = IndexedColors.Green.Index;
|
||||
// //stateCellStyle.FillBackgroundColor = IndexedColors.Green.Index;
|
||||
//}
|
||||
//else if (state == "2" || state == "3")
|
||||
//{
|
||||
// //stateCellStyle.FillForegroundColor = IndexedColors.Blue.Index;
|
||||
// stateCellStyle.FillBackgroundColor = IndexedColors.Blue.Index;
|
||||
//}
|
||||
//else if (state == "4")
|
||||
//{
|
||||
// //stateCellStyle.FillForegroundColor = IndexedColors.Red.Index;
|
||||
// stateCellStyle.FillBackgroundColor = IndexedColors.Red.Index;
|
||||
//}
|
||||
|
||||
NPOI.SS.UserModel.ICellStyle stateCellStyle = workbook.CreateCellStyle();
|
||||
stateCellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
stateCellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
stateCellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
stateCellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
stateCellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
stateCellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
stateCellStyle.WrapText = true;
|
||||
stateCellStyle.SetFont(font);
|
||||
if (state == "0")
|
||||
{
|
||||
stateCellStyle.FillForegroundColor = IndexedColors.Green.Index;
|
||||
stateCellStyle.FillPattern = FillPattern.SolidForeground; // 填充方式
|
||||
}
|
||||
else if (state == "2" || state == "3")
|
||||
{
|
||||
stateCellStyle.FillForegroundColor = IndexedColors.SkyBlue.Index;
|
||||
stateCellStyle.FillPattern = FillPattern.SolidForeground; // 填充方式
|
||||
}
|
||||
else if (state == "4")
|
||||
{
|
||||
stateCellStyle.FillForegroundColor = IndexedColors.Red.Index;
|
||||
stateCellStyle.FillPattern = FillPattern.SolidForeground; // 填充方式
|
||||
}
|
||||
cell.CellStyle = stateCellStyle;
|
||||
cell.SetCellValue(tb.Rows[j]["StateStr"].ToString());
|
||||
cell = row.CreateCell(7);
|
||||
|
|
|
@ -393,6 +393,9 @@
|
|||
<div class="jdtj-btn jdtj-btn-act" id="span_jdtj" onclick="jdtjOnclick(0)" style="cursor: pointer">
|
||||
<asp:Literal runat="server" Text="<%$ Resources:Lan,mainProject2_ProgressStatistics %>" />
|
||||
</div>
|
||||
<div class="jdtj-btn" onclick="jdtjOnclick(3)" id="span_quantityDoneJdtj" style="cursor: pointer">
|
||||
<asp:Literal runat="server" Text="<%$ Resources:Lan,mainProject2_QuantityDone %>" />
|
||||
</div>
|
||||
<div class="jdtj-btn" onclick="jdtjOnclick(1)" id="span_weekJdtj" style="cursor: pointer">
|
||||
<asp:Literal runat="server" Text="<%$ Resources:Lan,mainProject2_WeekPlanDone %>" />
|
||||
</div>
|
||||
|
@ -698,6 +701,7 @@
|
|||
function jdtjOnclick(objval) {
|
||||
if (objval == 1) {
|
||||
$("#span_jdtj").removeClass("jdtj-btn-act");
|
||||
$("#span_quantityDoneJdtj").removeClass("jdtj-btn-act");
|
||||
$("#span_weekJdtj").addClass("jdtj-btn-act");
|
||||
$("#span_monthJdtj").removeClass("jdtj-btn-act");
|
||||
$("#jdtj-content").show();
|
||||
|
@ -706,14 +710,25 @@
|
|||
$("#div_jdtjList").html('<%=WeekJdtjHtml%>');
|
||||
} else if (objval == 2) {
|
||||
$("#span_jdtj").removeClass("jdtj-btn-act");
|
||||
$("#span_quantityDoneJdtj").removeClass("jdtj-btn-act");
|
||||
$("#span_weekJdtj").removeClass("jdtj-btn-act");
|
||||
$("#span_monthJdtj").addClass("jdtj-btn-act");
|
||||
$("#jdtj-content").show();
|
||||
$("#left_one").hide();
|
||||
$("#div_jdtjHead").html('<%=MonthJdtjHead%>');
|
||||
$("#div_jdtjList").html('<%=MonthJdtjHtml%>');
|
||||
} else if (objval == 3) {
|
||||
$("#span_jdtj").removeClass("jdtj-btn-act");
|
||||
$("#span_quantityDoneJdtj").addClass("jdtj-btn-act");
|
||||
$("#span_weekJdtj").removeClass("jdtj-btn-act");
|
||||
$("#span_monthJdtj").removeClass("jdtj-btn-act");
|
||||
$("#jdtj-content").show();
|
||||
$("#left_one").hide();
|
||||
$("#div_jdtjHead").html('<%=QuantityDoneJdtjHead%>');
|
||||
$("#div_jdtjList").html('<%=QuantityDoneJdtjHtml%>');
|
||||
} else {
|
||||
$("#span_jdtj").addClass("jdtj-btn-act");
|
||||
$("#span_quantityDoneJdtj").removeClass("jdtj-btn-act");
|
||||
$("#span_weekJdtj").removeClass("jdtj-btn-act");
|
||||
$("#span_monthJdtj").removeClass("jdtj-btn-act");
|
||||
$("#jdtj-content").hide();
|
||||
|
|
|
@ -109,6 +109,7 @@ namespace FineUIPro.Web.common
|
|||
var personTask = GetPersonAsync();
|
||||
var weekJdtjTask = GetWeekJDAsync();
|
||||
var monthJdtjTask = GetMonthJDAsync();
|
||||
var quantityDoneJDTask = GetQuantityDoneJDAsync();
|
||||
var otherTasks = new List<Task>
|
||||
{
|
||||
BindSafetyStatisticsAsync(), // 安全统计模块
|
||||
|
@ -148,13 +149,14 @@ namespace FineUIPro.Web.common
|
|||
|
||||
getCNEN(),//中英文翻译
|
||||
};
|
||||
await Task.WhenAll(otherTasks.Concat(new[] { treeTask, personTask }));
|
||||
await Task.WhenAll(otherTasks.Concat(new[] { treeTask, personTask, weekJdtjTask, monthJdtjTask, quantityDoneJDTask }));
|
||||
|
||||
Tree = await treeTask;
|
||||
Person = await personTask;
|
||||
|
||||
WeekJdtjHtml = await weekJdtjTask;
|
||||
MonthJdtjHtml = await monthJdtjTask;
|
||||
QuantityDoneJdtjHtml = await quantityDoneJDTask;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1187,6 +1189,91 @@ namespace FineUIPro.Web.common
|
|||
|
||||
#endregion 赢得值曲线
|
||||
|
||||
|
||||
#region 工程量完成情况
|
||||
|
||||
protected string QuantityDoneJdtjHtml;
|
||||
protected string QuantityDoneJdtjHead = "<div class=\"th-p\" >类型</div><div class=\"th-p\" >设计数量</div><div class=\"th-p\"><p>本期</p><p><span>计划</span><span>实际</span><span>完成率</span></p></div><div class=\"th-p\"><p>累计</p><p><span>计划</span><span>实际</span><span>完成率</span></p></div><div class=\"th-p\" >完成率</div>";
|
||||
//protected string QuantityDoneJdtjHead = "<div class=\"th-p\" >类型</div><div class=\"th-p\" >单位</div><div class=\"th-p\" >设计数量</div><div class=\"th-p\"><p>本期</p><p><span>计划完成</span><span>实际完成</span><span>完成率</span></p></div><div class=\"th-p\"><p>累计</p><p><span>计划完成</span><span>实际完成</span><span>完成率</span></p></div><div class=\"th-p\" >完成率</div>";
|
||||
|
||||
/// <summary>
|
||||
/// 工程量完成情况
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task<string> GetQuantityDoneJDAsync()
|
||||
{
|
||||
return await Task.Run(() =>
|
||||
{
|
||||
string doneJdtjHtml = string.Empty;
|
||||
string month = string.Format("{0:yyyy-MM-01}", DateTime.Now);
|
||||
//DateTime months = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-01");
|
||||
if (DateTime.Now.Day < 26)
|
||||
{
|
||||
month = string.Format("{0:yyyy-MM-01}", DateTime.Now.AddMonths(-1));
|
||||
//months = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.AddMonths(-1).Month.ToString() + "-01");
|
||||
}
|
||||
string strSql = @"select qc.QuantityCompletionId,(select PlanNum from JDGL_QuantityCompletion where QuantityListId=ql.QuantityListId and Months=@month) as PlanNum,
|
||||
(select RealNum from JDGL_QuantityCompletion where QuantityListId=ql.QuantityListId and Months=@month) as RealNum,
|
||||
(select NextNum from JDGL_QuantityCompletion where QuantityListId=ql.QuantityListId and Months=@month) as NextNum,ql.DesignNum,ql.Name,ql.Unit,ql.SortIndex,
|
||||
CONVERT(FLOAT, (select sum(ISNULL(PlanNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) as TotalPlanNum,
|
||||
CONVERT(FLOAT, (select sum(ISNULL(RealNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) as TotalRealNum,
|
||||
CONVERT(NVARCHAR(10), ((CAST(CASE ISNULL(qc.PlanNum, 0) WHEN 0 THEN 0
|
||||
|
||||
ELSE 100 * ISNULL(qc.RealNum, 0) / (1.0 * qc.PlanNum) END AS DECIMAL(9, 2))))) + '%'
|
||||
|
||||
AS Rate,
|
||||
CONVERT(NVARCHAR(10), ((CAST(CASE(select sum(ISNULL(PlanNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) WHEN 0 THEN 0
|
||||
|
||||
ELSE 100 * (select sum(ISNULL(RealNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) / (1.0 * (select sum(ISNULL(PlanNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) END AS DECIMAL(9, 2)))))+'%'
|
||||
|
||||
AS TotalRate,
|
||||
CONVERT(NVARCHAR(10), ((CAST(CASE ISNULL(ql.DesignNum, 0) WHEN 0 THEN 0
|
||||
ELSE 100 * (select sum(ISNULL(RealNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) / (1.0 * ql.DesignNum) END AS DECIMAL(9, 2)))))+'%'
|
||||
|
||||
AS SumRate,
|
||||
CONVERT(FLOAT, (select sum(ISNULL(PlanNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months < qc.Months)) as LastTotalPlanNum,
|
||||
CONVERT(FLOAT, (select sum(ISNULL(RealNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months < qc.Months)) as LastTotalRealNum
|
||||
from[dbo].JDGL_QuantityList ql
|
||||
left join dbo.[JDGL_QuantityCompletion] qc on ql.QuantityListId=qc.QuantityListId
|
||||
where qc.QuantityCompletionId=(select top 1 QuantityCompletionId from[JDGL_QuantityCompletion] q where q.QuantityListId=qc.QuantityListId and q.Months<=@month order by q.Months desc) and qc.ProjectId=@ProjectId order by ql.SortIndex, ql.Name";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@month", month));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int j = 0; j < tb.Rows.Count; j++)
|
||||
{
|
||||
string name = tb.Rows[j]["Name"].ToString().Trim();
|
||||
string unit = tb.Rows[j]["Unit"].ToString().Trim();
|
||||
string designNum = Funs.RemoveZero(tb.Rows[j]["DesignNum"].ToString().Trim());
|
||||
string planNum = Funs.RemoveZero(tb.Rows[j]["PlanNum"].ToString().Trim());
|
||||
string realNum = Funs.RemoveZero(tb.Rows[j]["RealNum"].ToString().Trim());
|
||||
string rate = tb.Rows[j]["Rate"].ToString().Trim();
|
||||
string nextNum = Funs.RemoveZero(tb.Rows[j]["NextNum"].ToString().Trim());
|
||||
string totalPlanNum = Funs.RemoveZero(tb.Rows[j]["TotalPlanNum"].ToString().Trim());
|
||||
string totalRealNum = Funs.RemoveZero(tb.Rows[j]["TotalRealNum"].ToString().Trim());
|
||||
string totalRate = tb.Rows[j]["TotalRate"].ToString().Trim();
|
||||
string sumRate = tb.Rows[j]["SumRate"].ToString().Trim();
|
||||
sb.Append("<div class=\"row\">");
|
||||
sb.Append($"<div class=\"tr\" >{name}({unit})</div>");
|
||||
//sb.Append($"<div class=\"tr\" >{unit}</div>");
|
||||
sb.Append($"<div class=\"tr\" >{designNum}</div>");
|
||||
sb.Append($"<div class=\"tr\" ><p><span>{planNum}</span><span>{realNum}</span><span>{rate}</span></p></div>");
|
||||
sb.Append($"<div class=\"tr\" ><p><span>{totalPlanNum}</span><span>{totalRealNum}</span><span>{totalRate}</span></p></div>");
|
||||
sb.Append($"<div class=\"tr\" >{sumRate}</div>");
|
||||
sb.Append("</div>");
|
||||
}
|
||||
doneJdtjHtml = sb.ToString();
|
||||
return doneJdtjHtml;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 进度统计
|
||||
|
||||
protected string WeekJdtjHtml;
|
||||
|
@ -1206,10 +1293,8 @@ namespace FineUIPro.Web.common
|
|||
return await Task.Run(() =>
|
||||
{
|
||||
string weekGridHtml = string.Empty;
|
||||
//获取当前时间所在周信息
|
||||
//获取当前时间上一个周计划信息
|
||||
var lastWeek = WeekPlanService.GetLastWeekPlan(this.CurrUser.LoginProjectId);
|
||||
////根据当前时间获取上一个周计划信息
|
||||
//var lastWeekItem = WeekItemService.GetWeekItemByDateNow(this.CurrUser.LoginProjectId);
|
||||
if (lastWeek != null)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
|
|
|
@ -173,7 +173,29 @@ namespace FineUIPro.Web.common
|
|||
.SelectMany(x => x.persons.DefaultIfEmpty(),
|
||||
(x, person) => new { x.post, person })
|
||||
.Where(x => pids.Contains(x.person.ProjectId));
|
||||
divCqmsManageNum.InnerText = qualityQuery.Count().ToString();
|
||||
|
||||
//企业总部人员和分支机构人员
|
||||
var query = (from person in db.Person_CompanyBranchPerson
|
||||
join unit in db.Base_Unit on person.UnitId equals unit.UnitId into unitJoin
|
||||
from unit in unitJoin.DefaultIfEmpty() // 左连接
|
||||
join workPost in db.Base_WorkPost on person.WorkPostId equals workPost.WorkPostId into workPostJoin
|
||||
from workPost in workPostJoin.DefaultIfEmpty() // 左连接
|
||||
where person.IsOnJob == true && workPost.IsCQMS == true
|
||||
select new
|
||||
{
|
||||
ID = person.CompanyBranchPersonId,
|
||||
UnitName = unit.UnitName,
|
||||
PersonName = person.PersonName,
|
||||
SexStr = person.Sex == "1" ? "男" : "女",
|
||||
IdentityCard = person.IdentityCard,
|
||||
WorkPostName = workPost.WorkPostName,
|
||||
Telephone = person.Telephone,
|
||||
IsOnJob = person.IsOnJob,
|
||||
Remark = person.Remark,
|
||||
ProjectName = ""
|
||||
}).ToList();
|
||||
|
||||
divCqmsManageNum.InnerText = (qualityQuery.Count() + query.Count()).ToString();
|
||||
// 质量培训人员
|
||||
divCqmsPxNum.InnerText = db.Comprehensive_InspectionPerson
|
||||
.Where(x => pids.Contains(x.ProjectId))
|
||||
|
@ -674,16 +696,15 @@ namespace FineUIPro.Web.common
|
|||
if (pids == null)
|
||||
{
|
||||
zlallNumber = (from x in Funs.DB.Check_CheckControl
|
||||
where x.CheckDate <= DateTime.Now
|
||||
select x).Count().ToString();
|
||||
|
||||
var num2 = (from x in Funs.DB.Check_CheckControl
|
||||
where x.CheckDate <= DateTime.Now && x.State == "7"
|
||||
where x.State == "7"
|
||||
select x).Count();
|
||||
|
||||
zlfinishNumber = num2.ToString();
|
||||
var num3 = (from x in Funs.DB.Check_CheckControl
|
||||
where x.CheckDate <= DateTime.Now && x.State != "7"
|
||||
where x.State != "7"
|
||||
select x).Count();
|
||||
|
||||
var zgl = String.Format("{0:N2}", 100.0 * num2 / (num2 + num3));
|
||||
|
@ -695,16 +716,16 @@ namespace FineUIPro.Web.common
|
|||
else
|
||||
{
|
||||
zlallNumber = (from x in Funs.DB.Check_CheckControl
|
||||
where x.CheckDate <= DateTime.Now && pids.Contains(x.ProjectId)
|
||||
where pids.Contains(x.ProjectId)
|
||||
select x).Count().ToString();
|
||||
|
||||
var num2 = (from x in Funs.DB.Check_CheckControl
|
||||
where x.CheckDate <= DateTime.Now && x.State == "7" && pids.Contains(x.ProjectId)
|
||||
where x.State == "7" && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
|
||||
zlfinishNumber = num2.ToString();
|
||||
var num3 = (from x in Funs.DB.Check_CheckControl
|
||||
where x.CheckDate <= DateTime.Now && x.State != "7" && pids.Contains(x.ProjectId)
|
||||
where x.State != "7" && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
|
||||
var zgl = String.Format("{0:N2}", 100.0 * num2 / (num2 + num3));
|
||||
|
@ -778,7 +799,7 @@ namespace FineUIPro.Web.common
|
|||
List<double> listdata = new List<double>();
|
||||
double result = 0;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var ndtLists = from x in db.ProcessControl_NondestructiveTest_New where x.ProfessionalName == "工艺管道" select x;
|
||||
var ndtLists = from x in db.ProcessControl_NondestructiveTest_New select x;
|
||||
if (pids != null)
|
||||
{
|
||||
ndtLists = ndtLists.Where(x=>pids.Contains(x.ProjectId));
|
||||
|
|
|
@ -10367,6 +10367,14 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<View_JDGL_QuantityCompletionDone> View_JDGL_QuantityCompletionDone
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetTable<View_JDGL_QuantityCompletionDone>();
|
||||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<View_JDGL_SteelStructureCompletion> View_JDGL_SteelStructureCompletion
|
||||
{
|
||||
get
|
||||
|
@ -350495,7 +350503,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(50)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(500)")]
|
||||
public string Address
|
||||
{
|
||||
get
|
||||
|
@ -437486,6 +437494,87 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_JDGL_QuantityCompletionDone")]
|
||||
public partial class View_JDGL_QuantityCompletionDone
|
||||
{
|
||||
|
||||
private string _QuantityListId;
|
||||
|
||||
private string _ProjectId;
|
||||
|
||||
private System.Nullable<System.DateTime> _Months;
|
||||
|
||||
private System.Nullable<decimal> _Rate;
|
||||
|
||||
public View_JDGL_QuantityCompletionDone()
|
||||
{
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuantityListId", DbType="NVarChar(50)")]
|
||||
public string QuantityListId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._QuantityListId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._QuantityListId != value))
|
||||
{
|
||||
this._QuantityListId = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ProjectId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._ProjectId != value))
|
||||
{
|
||||
this._ProjectId = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Months", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> Months
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Months;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Months != value))
|
||||
{
|
||||
this._Months = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rate", DbType="Decimal(25,12)")]
|
||||
public System.Nullable<decimal> Rate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Rate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Rate != value))
|
||||
{
|
||||
this._Rate = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_JDGL_SteelStructureCompletion")]
|
||||
public partial class View_JDGL_SteelStructureCompletion
|
||||
{
|
||||
|
|
|
@ -25,4 +25,13 @@ namespace Model
|
|||
public List<PieData> pieData { get; set; }
|
||||
public List<string> loc { get; set; }
|
||||
}
|
||||
|
||||
public class Serie
|
||||
{
|
||||
public string name { get; set; }
|
||||
public string type { get; set; }
|
||||
public string stack { get; set; }
|
||||
//public List<double> data { get; set; }
|
||||
public List<string> data { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue