提交代码

This commit is contained in:
2023-10-16 14:39:37 +08:00
parent 5d690e99b4
commit 6e7bff7cdf
11 changed files with 287 additions and 85 deletions
@@ -60,7 +60,7 @@ namespace FineUIPro.Web.HSSE.Check
{
string strSql = @"SELECT CheckSpecial.CheckSpecialId,CodeRecords.Code AS CheckSpecialCode,"
+ @" CheckItemSet.CheckItemName,CheckSpecial.CheckTime,(CASE WHEN CheckSpecial.CheckType ='1' THEN '联合检查' ELSE '专项检查' END) AS CheckTypeName"
+ @" ,(CASE WHEN CheckSpecial.States='2' THEN '已完成' WHEN CheckSpecial.States='1' THEN '待整改' ELSE '待提交' END) AS StatesName"
+ @" ,(CASE WHEN CheckSpecial.States='2' THEN '待确认' WHEN CheckSpecial.States='3' THEN '已确认' WHEN CheckSpecial.States='1' THEN '待整改' ELSE '待提交' END) AS StatesName"
+ @" FROM Check_CheckSpecial AS CheckSpecial "
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON CheckSpecial.CheckSpecialId=CodeRecords.DataId "
+ @" LEFT JOIN Technique_CheckItemSet AS CheckItemSet ON CheckItemSet.CheckItemSetId = CheckSpecial.CheckItemSetId where 1=1";
@@ -68,9 +68,9 @@ namespace FineUIPro.Web.HSSE.Check
strSql += " AND CheckSpecial.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (this.rbStates.SelectedValue!="-1")
if (this.rbStates.SelectedValue != "-1")
{
strSql += " AND CheckSpecial.States = @States";
strSql += " AND CheckSpecial.States = @States";
listStr.Add(new SqlParameter("@States", this.rbStates.SelectedValue));
}
if (this.rbType.SelectedValue != "-1")
@@ -86,10 +86,10 @@ namespace FineUIPro.Web.HSSE.Check
listStr.Add(new SqlParameter("@CheckType", this.rbType.SelectedValue));
}
}
if (this.drpSupCheckItemSet.SelectedValue!=BLL.Const._Null)
if (this.drpSupCheckItemSet.SelectedValue != BLL.Const._Null)
{
strSql += " AND CheckSpecial.CheckItemSetId = @CheckItemSetId";
listStr.Add(new SqlParameter("@CheckItemSetId", this.drpSupCheckItemSet.SelectedValue ));
listStr.Add(new SqlParameter("@CheckItemSetId", this.drpSupCheckItemSet.SelectedValue));
}
if (!string.IsNullOrEmpty(this.txtStartTime.Text.Trim()))
{
@@ -269,8 +269,8 @@ namespace FineUIPro.Web.HSSE.Check
}
}
}
#endregion
#endregion
#region
/// 导出按钮
/// </summary>
@@ -289,7 +289,7 @@ namespace FineUIPro.Web.HSSE.Check
Response.End();
}
#endregion
/// <summary>
///
/// </summary>
@@ -361,7 +361,8 @@ namespace FineUIPro.Web.HSSE.Check
uploadfilepath = rootPath + initTemplatePath;
newUrl = uploadfilepath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".doc");
//filePath = initTemplatePath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".pdf");
if (File.Exists(newUrl)) {
if (File.Exists(newUrl))
{
File.Delete(newUrl);
}
File.Copy(uploadfilepath, newUrl);
@@ -398,10 +399,11 @@ namespace FineUIPro.Web.HSSE.Check
{
if (checkSpecial != null)
{
if (!string.IsNullOrEmpty(checkSpecial.CheckItemSetId)) {
if (!string.IsNullOrEmpty(checkSpecial.CheckItemSetId))
{
bookmarkSupCheckItemSet.Text = Technique_CheckItemSetService.GetCheckItemSetNameById(checkSpecial.CheckItemSetId);
}
}
}
@@ -410,10 +412,11 @@ namespace FineUIPro.Web.HSSE.Check
{
if (checkSpecial != null)
{
if (checkSpecial.CheckTime.HasValue) {
if (checkSpecial.CheckTime.HasValue)
{
bookmarkCheckDate.Text = string.Format("{0:yyyy-MM-dd}", checkSpecial.CheckTime);
}
}
}
@@ -598,7 +601,7 @@ namespace FineUIPro.Web.HSSE.Check
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;//水平居中对齐
builder.CellFormat.Width = 250;
builder.CellFormat.WrapText = true;
builder.Write(string.IsNullOrEmpty(detail.CheckItemSetContent)?"": detail.CheckItemSetContent);
builder.Write(string.IsNullOrEmpty(detail.CheckItemSetContent) ? "" : detail.CheckItemSetContent);
////处理结果
//builder.InsertCell();
@@ -615,7 +618,7 @@ namespace FineUIPro.Web.HSSE.Check
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
builder.CellFormat.Width = 60;
builder.Write(string.Format("{0:yyyy-MM-dd}", detail.Rectification_Date));
builder.Write(string.Format("{0:yyyy-MM-dd}", detail.Rectification_Date));
//隐患类别
builder.InsertCell();
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;