IDP设计图纸管理
This commit is contained in:
@@ -9,6 +9,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using NPOI.SS.UserModel;
|
||||
using System.Security.Policy;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.DesignDrawing
|
||||
{
|
||||
@@ -73,6 +74,13 @@ namespace FineUIPro.Web.CQMS.DesignDrawing
|
||||
BLL.DesignDrawingService.InitMajorNameDropDownList(this.ddlMajorName, this.CurrUser.LoginProjectId, false);
|
||||
//BLL.DesignDrawingService.InitMajorNoDropDownList(this.ddlMajorNo, this.CurrUser.LoginProjectId, false);
|
||||
BLL.DesignDrawingService.InitStatusNameDropDownList(this.ddlStatus, this.CurrUser.LoginProjectId, false);
|
||||
BLL.DesignDrawingService.InitClassDropDownList(this.ddlClass, this.CurrUser.LoginProjectId, false);
|
||||
|
||||
BLL.DesignDrawingService.InitDesignUserNameDropDownList(this.ddlDesignUserName, this.CurrUser.LoginProjectId, false);
|
||||
BLL.DesignDrawingService.InitJiaoheUserNameDropDownList(this.ddlJiaoheUserName, this.CurrUser.LoginProjectId, false);
|
||||
BLL.DesignDrawingService.InitShenheUserNameDropDownList(this.ddlShenheUserName, this.CurrUser.LoginProjectId, false);
|
||||
BLL.DesignDrawingService.InitShendingUserNameDropDownList(this.ddlShendingUserName, this.CurrUser.LoginProjectId, false);
|
||||
BLL.DesignDrawingService.InitMajorResponsibleUserNameDropDownList(this.ddlMajorResponsibleUserName, this.CurrUser.LoginProjectId, false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -88,10 +96,37 @@ namespace FineUIPro.Web.CQMS.DesignDrawing
|
||||
//ORDER BY lib.updatetime DESC
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
//strSql += " AND (chec.CheckDate>=@startTime or @startTime='') and (chec.CheckDate<=@endTime or @endTime='') ";
|
||||
//listStr.Add(new SqlParameter("@startTime", !string.IsNullOrEmpty(txtStartTime.Text.Trim()) ? txtStartTime.Text.Trim() + " 00:00:00" : ""));
|
||||
//listStr.Add(new SqlParameter("@endTime", !string.IsNullOrEmpty(txtEndTime.Text.Trim()) ? txtEndTime.Text.Trim() + " 23:59:59" : ""));
|
||||
|
||||
if (!string.IsNullOrEmpty(txtStartUpdateTime.Text.Trim()))
|
||||
{
|
||||
strSql += " AND UpdateTime >= @startUpdateTime ";
|
||||
listStr.Add(new SqlParameter("@startUpdateTime", Funs.GetNewDateTime(txtStartUpdateTime.Text.Trim())));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtEndUpdateTime.Text.Trim()))
|
||||
{
|
||||
strSql += " AND UpdateTime <= @endUpdatTime ";
|
||||
listStr.Add(new SqlParameter("@endUpdatTime", $"{Funs.GetNewDateTime(txtEndUpdateTime.Text.Trim())} 23:59:59"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtStartSendTime.Text.Trim()))
|
||||
{
|
||||
strSql += " AND Sendtime >= @startSendTime ";
|
||||
listStr.Add(new SqlParameter("@startSendTime", Funs.GetNewDateTime(txtStartSendTime.Text.Trim())));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtEndSendTime.Text.Trim()))
|
||||
{
|
||||
strSql += " AND Sendtime <= @endSendTime ";
|
||||
listStr.Add(new SqlParameter("@endSendTime", $"{Funs.GetNewDateTime(txtEndSendTime.Text.Trim())} 23:59:59"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtStartPrintTime.Text.Trim()))
|
||||
{
|
||||
strSql += " AND Printtime >= @startPrintTime ";
|
||||
listStr.Add(new SqlParameter("@startPrintTime", Funs.GetNewDateTime(txtStartPrintTime.Text.Trim())));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtEndPrintTime.Text.Trim()))
|
||||
{
|
||||
strSql += " AND Printtime <= @endPrintTime ";
|
||||
listStr.Add(new SqlParameter("@endPrintTime", $"{Funs.GetNewDateTime(txtEndPrintTime.Text.Trim())} 23:59:59"));
|
||||
}
|
||||
if (this.ddlWbsFullPath.SelectedItemArray.Count() > 1 || (this.ddlWbsFullPath.SelectedValue != BLL.Const._Null && this.ddlWbsFullPath.SelectedItemArray.Count() == 1))
|
||||
{
|
||||
strSql += " AND (1=2 ";
|
||||
@@ -152,6 +187,101 @@ namespace FineUIPro.Web.CQMS.DesignDrawing
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
if (this.ddlClass.SelectedItemArray.Count() > 1 || (this.ddlClass.SelectedValue != BLL.Const._Null && this.ddlClass.SelectedItemArray.Count() == 1))
|
||||
{
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.ddlClass.SelectedValueArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||
{
|
||||
strSql += " OR ClassificationLevelInProject = @Class" + i.ToString();
|
||||
listStr.Add(new SqlParameter("@Class" + i.ToString(), item));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(ddlIfmail.SelectedValue.Trim()))
|
||||
{
|
||||
strSql += " AND ifmail = @ifmail";
|
||||
listStr.Add(new SqlParameter("@ifmail", ddlIfmail.SelectedValue.Trim()));
|
||||
}
|
||||
if (this.ddlDesignUserName.SelectedItemArray.Count() > 1 || (this.ddlDesignUserName.SelectedValue != BLL.Const._Null && this.ddlDesignUserName.SelectedItemArray.Count() == 1))
|
||||
{
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.ddlDesignUserName.SelectedValueArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||
{
|
||||
strSql += " OR DesignUserName = @DesignUserName" + i.ToString();
|
||||
listStr.Add(new SqlParameter("@DesignUserName" + i.ToString(), item));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
if (this.ddlJiaoheUserName.SelectedItemArray.Count() > 1 || (this.ddlJiaoheUserName.SelectedValue != BLL.Const._Null && this.ddlJiaoheUserName.SelectedItemArray.Count() == 1))
|
||||
{
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.ddlJiaoheUserName.SelectedValueArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||
{
|
||||
strSql += " OR JiaoheUserName = @JiaoheUserName" + i.ToString();
|
||||
listStr.Add(new SqlParameter("@JiaoheUserName" + i.ToString(), item));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
if (this.ddlShenheUserName.SelectedItemArray.Count() > 1 || (this.ddlShenheUserName.SelectedValue != BLL.Const._Null && this.ddlShenheUserName.SelectedItemArray.Count() == 1))
|
||||
{
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.ddlShenheUserName.SelectedValueArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||
{
|
||||
strSql += " OR ShenheUserName = @ShenheUserName" + i.ToString();
|
||||
listStr.Add(new SqlParameter("@ShenheUserName" + i.ToString(), item));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
if (this.ddlShendingUserName.SelectedItemArray.Count() > 1 || (this.ddlShendingUserName.SelectedValue != BLL.Const._Null && this.ddlShendingUserName.SelectedItemArray.Count() == 1))
|
||||
{
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.ddlShendingUserName.SelectedValueArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||
{
|
||||
strSql += " OR ShendingUserName = @ShendingUserName" + i.ToString();
|
||||
listStr.Add(new SqlParameter("@ShendingUserName" + i.ToString(), item));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
if (this.ddlMajorResponsibleUserName.SelectedItemArray.Count() > 1 || (this.ddlMajorResponsibleUserName.SelectedValue != BLL.Const._Null && this.ddlMajorResponsibleUserName.SelectedItemArray.Count() == 1))
|
||||
{
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.ddlMajorResponsibleUserName.SelectedValueArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||
{
|
||||
strSql += " OR MajorResponsibleUserName = @MajorResponsibleUserName" + i.ToString();
|
||||
listStr.Add(new SqlParameter("@MajorResponsibleUserName" + i.ToString(), item));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
@@ -203,6 +333,38 @@ namespace FineUIPro.Web.CQMS.DesignDrawing
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查看文件
|
||||
/// </summary>
|
||||
/// <param name="fileid"></param>
|
||||
/// <param name="maintitle"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetFileUrl(object fid, object maintitle)
|
||||
{
|
||||
string fileUrl = string.Empty;
|
||||
string fileid = fid.ToString();
|
||||
string filename = maintitle.ToString();
|
||||
if (!string.IsNullOrWhiteSpace(fileid))
|
||||
{
|
||||
maintitle = !string.IsNullOrWhiteSpace(filename) ? filename : "查看";
|
||||
string url = $"https://arch.cwcec.com/preview.html?fileid={fileid}";
|
||||
fileUrl = ShowAttachment(url, filename);
|
||||
}
|
||||
return fileUrl;
|
||||
}
|
||||
|
||||
public static string ShowAttachment(string path, string filename)
|
||||
{
|
||||
string htmlStr = string.Empty;
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
htmlStr = "<table runat='server' cellpadding='5' cellspacing='5' style=\"width: 100%\">";
|
||||
htmlStr += "<tr><td style=\"width: 60%\" align=\"left\"><span style='cursor:pointer;cursor:pointer;cursor:pointer;TEXT-DECORATION: underline;color:blue' onclick=\"window.open('" + path + "')\">" + filename + "</span></td>";
|
||||
htmlStr += "</table>";
|
||||
}
|
||||
return htmlStr;
|
||||
}
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
|
||||
Reference in New Issue
Block a user