Merge branch 'master' of http://47.104.102.122:3000/panhf/CNCEC_SUBQHSE_WUHUAN
This commit is contained in:
commit
dc3f0bdc97
|
@ -0,0 +1,2 @@
|
|||
alter table Report_Construction_Plan add Quantity4 int null
|
||||
GO
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
|
||||
|
||||
ALTER TABLE Comprehensive_InspectionEquipment
|
||||
ALTER COLUMN UsedPlace NVARCHAR(500);
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
|
||||
|
||||
update Sys_Role set RoleCode='101' where RoleName='项目经理';
|
||||
|
||||
|
||||
--角色补充项目主管
|
||||
IF NOT EXISTS (SELECT 1 FROM Sys_Role WHERE RoleName = '项目主管')
|
||||
BEGIN
|
||||
insert into Sys_Role(RoleId,RoleName,RoleCode,IsSystemBuilt,RoleType,IsAuditFlow)
|
||||
values('b51072d6-5c8d-4763-b010-b3492b50feac','项目主管','100',1,1,1)
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
|
@ -390,6 +390,10 @@ namespace BLL
|
|||
|
||||
#region 内置项目角色定义
|
||||
/// <summary>
|
||||
/// 项目主管
|
||||
/// </summary>
|
||||
public const string ProjectSupervisor = "b51072d6-5c8d-4763-b010-b3492b50feac";
|
||||
/// <summary>
|
||||
/// 项目经理
|
||||
/// </summary>
|
||||
public const string ProjectManager = "1184835B-73AF-47FB-9F83-20740CE2FAD7";
|
||||
|
|
|
@ -827,6 +827,7 @@ namespace BLL
|
|||
{
|
||||
try
|
||||
{
|
||||
ErrLogInfo.WriteLog($"【{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}接收保存数字档案馆推送数据】{JsonConvert.SerializeObject(items)}");
|
||||
string message = string.Empty;
|
||||
int succ = 0;
|
||||
int err = 0;
|
||||
|
|
|
@ -5,6 +5,7 @@ using System.Text;
|
|||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
@ -44,6 +45,7 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取多附件数据流类
|
||||
/// </summary>
|
||||
|
@ -61,18 +63,30 @@ namespace BLL
|
|||
{
|
||||
if (strs.Count() > i)
|
||||
{
|
||||
//string physicalpath = Funs.AttachRootPath;
|
||||
string physicalpath = Funs.RootPath;
|
||||
//HttpContext.Current.Request.PhysicalApplicationPath;
|
||||
string fullPath = physicalpath + strs[i];
|
||||
string fpath = strs[i];
|
||||
string fullPath = physicalpath + fpath;
|
||||
if (!File.Exists(fullPath))
|
||||
{
|
||||
byte[] fileContext = item;
|
||||
int index = fullPath.LastIndexOf("\\");
|
||||
string filePath = fullPath.Substring(0, index);
|
||||
string fileName = Regex.Match(fullPath, @"[^/\\?]+(\?.*)?$").Value;
|
||||
string filePath = fullPath.Replace(fileName, "");
|
||||
//int index = fullPath.LastIndexOf("\\");
|
||||
//string filePath = fullPath.Substring(0, index) ;
|
||||
//string filePath = index > 0 ? fullPath.Substring(0, index) : fullPath;
|
||||
|
||||
if (!Directory.Exists(filePath))
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(filePath);
|
||||
if (!Directory.Exists(filePath))
|
||||
{
|
||||
Directory.CreateDirectory(filePath);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"附件【{filePath}】获取异常!");
|
||||
//continue;
|
||||
}
|
||||
//string savePath = fullPath + fileName;
|
||||
|
||||
|
@ -93,6 +107,7 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 数据和附件插入到多附件表
|
||||
/// </summary>
|
||||
|
|
|
@ -125,7 +125,7 @@ namespace BLL
|
|||
|
||||
</body>
|
||||
</html>";
|
||||
//< p > 登录密码:{ user.RawPassword}</ p >
|
||||
//< p > 登录密码:{ user.RawPassword}</ p >
|
||||
mail.Body = bodyStr;
|
||||
|
||||
try
|
||||
|
@ -210,6 +210,7 @@ namespace BLL
|
|||
|
||||
//获取有邮箱的用户
|
||||
var userIds = BLL.UserService.GetUserHaveEmailList();
|
||||
|
||||
if (userIds.Any() && lstOverdue.Any())
|
||||
{
|
||||
//int allnum = 0;
|
||||
|
@ -221,6 +222,9 @@ namespace BLL
|
|||
if (lstProjectOverdue.Any())
|
||||
{
|
||||
string projectName = pro.ProjectName;
|
||||
|
||||
#region 提醒事项相关人员
|
||||
|
||||
foreach (var user in userIds)
|
||||
{
|
||||
//if (allnum > 100) { break; }
|
||||
|
@ -316,6 +320,96 @@ namespace BLL
|
|||
//Thread.Sleep(1000); //暂停1秒
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 提醒项目主管和项目经理
|
||||
|
||||
var projectSupervisors = ProjectUserService.GetProjectUserByRoleId(Const.ProjectSupervisor);
|
||||
var projectManagers = ProjectUserService.GetProjectUserByRoleId(Const.ProjectManager);
|
||||
|
||||
List<string> remindUserIds = new List<string>();
|
||||
List<string> projectSupervisorIds = projectSupervisors.Select(x => x.UserId).ToList();
|
||||
List<string> projectManagerIds = projectManagers.Select(x => x.UserId).ToList();
|
||||
if (projectSupervisorIds.Any()) { remindUserIds.AddRange(projectSupervisorIds); }
|
||||
if (projectManagerIds.Any()) { remindUserIds.AddRange(projectManagerIds); }
|
||||
|
||||
var remindUsers = userIds.Where(x => remindUserIds.Contains(x.UserId));
|
||||
foreach (var user in remindUsers)
|
||||
{
|
||||
MailMessage mail = new MailMessage();
|
||||
//邮件主题
|
||||
mail.Subject = $"关键事项超期预警提醒——{projectName}";
|
||||
mail.To.Add(user.Email);
|
||||
//mail.To.Add("test@test.com");
|
||||
mail.IsBodyHtml = true;//确保邮件正文被当作HTML解析
|
||||
|
||||
StringBuilder tbodyStr = new StringBuilder();
|
||||
|
||||
int index = 0;
|
||||
if (projectManagerIds.Contains(user.UserId))
|
||||
{
|
||||
foreach (var item in lstProjectOverdue)
|
||||
{
|
||||
index++;
|
||||
tbodyStr.Append($"<tr><td>{index}</td><td>事项逾期</td><td>{item.UnitName}</td><td>{item.GJSXID}</td><td>{item.Detail}</td><td>{item.GJSXTypeName}</td><td>{item.UserName}</td><td>{item.User_AcceptanceUserName}</td><td>{item.CompleteDate.ToShortDateString()}</td><td>{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : "半")}</td></tr>");
|
||||
}
|
||||
}
|
||||
if (projectSupervisorIds.Contains(user.UserId) && !projectManagerIds.Contains(user.UserId))
|
||||
{
|
||||
var lstProjectOverdue2 = lstOverdue.Where(x => x.ProjectId == pro.ProjectId && x.DateDiffDays > 13).ToList();
|
||||
index = 0;
|
||||
foreach (var item in lstProjectOverdue2)
|
||||
{
|
||||
index++;
|
||||
tbodyStr.Append($"<tr><td>{index}</td><td>事项逾期</td><td>{item.UnitName}</td><td>{item.GJSXID}</td><td>{item.Detail}</td><td>{item.GJSXTypeName}</td><td>{item.UserName}</td><td>{item.User_AcceptanceUserName}</td><td>{item.CompleteDate.ToShortDateString()}</td><td>{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : "半")}</td></tr>");
|
||||
}
|
||||
}
|
||||
//邮件正文
|
||||
string bodyStr = @"<html>
|
||||
<head>
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
th, td {
|
||||
border: 1px solid black;
|
||||
padding: 8px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>关键事项超期预警提醒</h2>
|
||||
<a href='https://zhgd.cwcec.com/'>请点击此处,查看详细信息,并及时处置关闭</a>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>类型</th>
|
||||
<th>责任单位</th>
|
||||
<th>事项编号</th>
|
||||
<th>事项描述</th>
|
||||
<th>事项类别</th>
|
||||
<th>发起人</th>
|
||||
<th>责任人</th>
|
||||
<th>约定完成时间</th>
|
||||
<th>超期时间(天)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>" + tbodyStr.ToString() + "</tbody></table></body></html>";
|
||||
|
||||
mail.Body = bodyStr;
|
||||
if (index > 1)
|
||||
{
|
||||
//allnum++;
|
||||
bool send = PushEmail(mail);
|
||||
//Thread.Sleep(1000); //暂停1秒
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
public static class ProjectUserService
|
||||
{
|
||||
public static SGGLDB db = Funs.DB;
|
||||
//public static SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
///获取项目用户信息
|
||||
|
@ -35,6 +35,15 @@
|
|||
return (from x in Funs.DB.Project_ProjectUser where x.UserId == userId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///获取项目用户信息 根据用户角色ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Project_ProjectUser> GetProjectUserByRoleId(string roleId)
|
||||
{
|
||||
return (from x in Funs.DB.Project_ProjectUser where x.RoleId.Contains(roleId) select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///获取当前项目用户信息根据用户ID
|
||||
/// </summary>
|
||||
|
|
|
@ -13,6 +13,8 @@ namespace BLL
|
|||
|
||||
|
||||
#region 督查检查整改上报
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 督查检查整改上报
|
||||
/// </summary>
|
||||
|
@ -23,12 +25,12 @@ namespace BLL
|
|||
{
|
||||
try
|
||||
{
|
||||
// CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient();
|
||||
var upCheckReport = from x in db.View_DCGL_CheckRectifyListFromSUB
|
||||
where x.RealEndDate.HasValue && x.CheckRectifyId == checkRectifyId
|
||||
select new Model.DCGLCheckRectifyItem
|
||||
{
|
||||
CheckRectifyId = x.CheckRectifyId,
|
||||
NoticeItemId = x.NoticeItemId,
|
||||
CheckRectifyCode = x.CheckRectifyCode,
|
||||
ProjectId = x.ProjectId,
|
||||
UnitId = x.UnitId,
|
||||
|
@ -42,13 +44,15 @@ namespace BLL
|
|||
OrderEndDate = x.OrderEndDate,
|
||||
OrderEndPerson = x.OrderEndPerson,
|
||||
RealEndDate = x.RealEndDate,
|
||||
Verification = x.Verification,
|
||||
//Verification = x.Verification,
|
||||
Situation = x.Situation,
|
||||
AttachFileId = x.AttachFileId2,
|
||||
ToKeyId = x.ToKeyId2,
|
||||
AttachSource = x.AttachSource2,
|
||||
AttachUrl = x.AttachUrl2,
|
||||
////附件转为字节传送
|
||||
FileContext = FileStructService.GetMoreFileStructByAttachUrl(x.AttachUrl2),
|
||||
FilePath = Funs.SGGLUrl
|
||||
//////附件转为字节传送
|
||||
//FileContext = FileStructService.GetMoreFileStructByAttachUrl(x.AttachUrl2),
|
||||
};
|
||||
|
||||
string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/UpDCGLCheckRectifyTable";
|
||||
|
@ -91,6 +95,8 @@ namespace BLL
|
|||
return code;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
|
@ -933,7 +933,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
}
|
||||
}
|
||||
numberIndex = 1;
|
||||
int? num1 = 0, num2 = 0;
|
||||
int? num1 = 0, num2 = 0, num3 = 0, num4 = 0;
|
||||
foreach (var item in pqrList)
|
||||
{
|
||||
//创建行
|
||||
|
@ -942,10 +942,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width, "", "", "unit"));
|
||||
row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.Quantity3.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.Quantity4.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[6].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
num1 += item.Quantity1;
|
||||
num2 += item.Quantity2;
|
||||
num3 += item.Quantity3;
|
||||
num4 += item.Quantity4;
|
||||
numberIndex += 1;
|
||||
}
|
||||
//自动设置表格样式
|
||||
|
@ -957,7 +961,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width, "", "", "unit"));
|
||||
rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[6].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, rowhj);
|
||||
|
||||
//自动设置表格样式
|
||||
|
|
|
@ -709,21 +709,36 @@
|
|||
</Editor>
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="130px" ColumnID="Quantity1" DataField="Quantity1"
|
||||
FieldType="int" HeaderTextAlign="Center" TextAlign="Left" HeaderText="PQR批准批次">
|
||||
<f:RenderField Width="140px" ColumnID="Quantity1" DataField="Quantity1"
|
||||
FieldType="int" HeaderTextAlign="Center" TextAlign="Left" HeaderText="本月PQR批准批次">
|
||||
<Editor>
|
||||
<f:NumberBox ID="TextBox7" runat="server" NoDecimal="true" NoNegative="true">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="130px" ColumnID="Quantity2" DataField="Quantity2"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="WPS批准数量">
|
||||
<f:RenderField Width="140px" ColumnID="Quantity2" DataField="Quantity2"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="累计PQR批准批次">
|
||||
<Editor>
|
||||
<f:NumberBox ID="TextBox8" runat="server" NoDecimal="true" NoNegative="true">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" ColumnID="Quantity3" DataField="Quantity3"
|
||||
FieldType="int" HeaderTextAlign="Center" TextAlign="Left" HeaderText="本月WPS批准数量">
|
||||
<Editor>
|
||||
<f:NumberBox ID="NumberBox1" runat="server" NoDecimal="true" NoNegative="true">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="140px" ColumnID="Quantity4" DataField="Quantity4"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="累计WPS批准数量">
|
||||
<Editor>
|
||||
<f:NumberBox ID="NumberBox2" runat="server" NoDecimal="true" NoNegative="true">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="250px" ColumnID="Remarks" DataField="Remarks"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="备注">
|
||||
|
|
|
@ -1097,6 +1097,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
{ "UnitOrMajor",""},
|
||||
{ "Quantity1", "" },
|
||||
{ "Quantity2","" },
|
||||
{ "Quantity3", "" },
|
||||
{ "Quantity4","" },
|
||||
{ "Remarks", "" },
|
||||
{ "Delete9", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", GetDeleteScriptGrid9(), IconHelper.GetResolvedIconUrl(Icon.Delete)) }
|
||||
};
|
||||
|
@ -1128,19 +1130,23 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
void OutPutSummaryGrid9()
|
||||
{
|
||||
DataTable source = ObjectToTable(Grid9.DataSource);
|
||||
int Quantity1Total = 0, Quantity2Total = 0;
|
||||
int Quantity1Total = 0, Quantity2Total = 0, Quantity3Total = 0, Quantity4Total = 0;
|
||||
if (source != null)
|
||||
{
|
||||
foreach (DataRow row in source.Rows)
|
||||
{
|
||||
Quantity1Total += Convert.ToInt32(row["Quantity1"]);
|
||||
Quantity2Total += Convert.ToInt32(row["Quantity2"]);
|
||||
Quantity3Total += Convert.ToInt32(row["Quantity3"]);
|
||||
Quantity4Total += Convert.ToInt32(row["Quantity4"]);
|
||||
}
|
||||
|
||||
JObject summary = new JObject();
|
||||
summary.Add("UnitOrMajor", "合计");
|
||||
summary.Add("Quantity1", Quantity1Total.ToString());
|
||||
summary.Add("Quantity2", Quantity2Total.ToString());
|
||||
summary.Add("Quantity3", Quantity3Total.ToString());
|
||||
summary.Add("Quantity4", Quantity4Total.ToString());
|
||||
Grid9.SummaryData = summary;
|
||||
}
|
||||
|
||||
|
@ -3232,6 +3238,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
UnitOrMajor = values.Value<string>("UnitOrMajor"),
|
||||
Quantity1 = Funs.GetNewIntOrZero(values.Value<string>("Quantity1")),
|
||||
Quantity2 = Funs.GetNewIntOrZero(values.Value<string>("Quantity2")),
|
||||
Quantity3 = Funs.GetNewIntOrZero(values.Value<string>("Quantity3")),
|
||||
Quantity4 = Funs.GetNewIntOrZero(values.Value<string>("Quantity4")),
|
||||
Remarks = values.Value<string>("Remarks"),
|
||||
};
|
||||
//if (Grid9.Rows[rowIndex].DataKeys.Length > 0)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,242 +1,122 @@
|
|||
PK
|
||||
|