This commit is contained in:
commit
412f8b1bf4
|
|
@ -310,6 +310,7 @@
|
|||
<Compile Include="CQMS\WBS\WorkPackageInitService.cs" />
|
||||
<Compile Include="CQMS\WBS\WorkPackageProjectService.cs" />
|
||||
<Compile Include="CQMS\WBS\WorkPackageService.cs" />
|
||||
<Compile Include="DCGL\ServerCheck\DCGLCheckNoticeItemService.cs" />
|
||||
<Compile Include="DCGL\ServerCheck\DCGLCheckRectifyItemService.cs" />
|
||||
<Compile Include="DCGL\ServerCheck\DCGLCheckRectifyService.cs" />
|
||||
<Compile Include="DigData\HSEDataCollectService.cs" />
|
||||
|
|
|
|||
|
|
@ -4188,7 +4188,7 @@ namespace BLL
|
|||
public const string MajorPlanApprovalMenuId = "fd116c94-714b-4b92-a3c9-cc83d358e2b3";
|
||||
|
||||
/// <summary>
|
||||
/// 设计交底管理
|
||||
/// 施工技术交底管理
|
||||
/// </summary>
|
||||
public const string ConTechnologyDisclosureMenuId = "A16CFA9D-2783-4573-95F9-EBA2B682B7EA";
|
||||
|
||||
|
|
|
|||
|
|
@ -95,8 +95,11 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static string CNCECPath
|
||||
{
|
||||
get;
|
||||
set;
|
||||
get
|
||||
{
|
||||
var path = BLL.ServerService.GetQHSEUrl();
|
||||
return path;
|
||||
}
|
||||
}
|
||||
public static string SGGLUrl
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 督查检查整改明细表
|
||||
/// </summary>
|
||||
public static class DCGLCheckNoticeItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取督查检查整改明细信息
|
||||
/// </summary>
|
||||
/// <param name="checkRectifyItemId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.DCGL_Check_CheckInfo_TableNoticeItem GetCheckNoticeItemByCheckNoticeItemId(string checkNoticeItemId)
|
||||
{
|
||||
return Funs.DB.DCGL_Check_CheckInfo_TableNoticeItem.FirstOrDefault(e => e.ID == checkNoticeItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加督查检查整改明细信息
|
||||
/// </summary>
|
||||
/// <param name="CheckNoticeItem"></param>
|
||||
public static void UpdateCheckNoticeItem(Model.DCGL_Check_CheckInfo_TableNoticeItem CheckNoticeItem)
|
||||
{
|
||||
var newCheckNoticeItem = Funs.DB.DCGL_Check_CheckInfo_TableNoticeItem.FirstOrDefault(x => x.ID == CheckNoticeItem.ID);
|
||||
if (newCheckNoticeItem != null)
|
||||
{
|
||||
newCheckNoticeItem.Situation = CheckNoticeItem.Situation;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -681,6 +681,7 @@ namespace BLL
|
|||
if (!string.IsNullOrWhiteSpace(timeStampStr)) { url = $"{url}&lastTimestamp={timeStampStr}"; }
|
||||
if (!string.IsNullOrWhiteSpace(projectCode)) { url = $"{url}&projectCode={projectCode}"; }
|
||||
|
||||
ErrLogInfo.WriteLog($"{url}【Cookie】{session.name}={session.value}");
|
||||
var returndata = BLL.APIGetHttpService.OutsideHttp(url, "GET", null, newToken, null);
|
||||
if (!string.IsNullOrEmpty(returndata))
|
||||
{
|
||||
|
|
@ -757,7 +758,7 @@ namespace BLL
|
|||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
|
||||
ErrLogInfo.WriteLog($"【{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}获取IDP质量管理设计图纸】{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -827,6 +828,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;
|
||||
|
|
@ -948,6 +950,7 @@ namespace BLL
|
|||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"【{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}更新蓝图寄出信息】{ex.Message}");
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
|
@ -1024,6 +1027,7 @@ namespace BLL
|
|||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"【{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}更新蓝图打印信息】{ex.Message}");
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,11 +6,51 @@ using System.Collections;
|
|||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Net;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class FileInsertService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取服务器图片转byte
|
||||
/// </summary>
|
||||
/// <param name="fileHost"></param>
|
||||
/// <param name="attachUrl"></param>
|
||||
/// <returns></returns>
|
||||
public static List<byte[]> FilePathTransStream(string fileHost, string attachUrl)
|
||||
{
|
||||
List<byte[]> bytes = new List<byte[]>();
|
||||
var strs = attachUrl.Trim().Split(',');
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var fileUrl in strs)
|
||||
{
|
||||
string filepath = $"{fileHost}{fileUrl}";
|
||||
// 创建WebClient实例
|
||||
using (WebClient webClient = new WebClient())
|
||||
{
|
||||
// 下载图片并保存到内存流
|
||||
using (MemoryStream ms = new MemoryStream(webClient.DownloadData(filepath)))
|
||||
{
|
||||
// 将MemoryStream转换为byte数组
|
||||
byte[] imageBytes = ms.ToArray();
|
||||
bytes.Add(imageBytes);
|
||||
//// 使用byte数组(例如,保存到文件或进行其他处理)
|
||||
//File.WriteAllBytes("localImage.jpg", imageBytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Error: " + ex.Message);
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取附件数据流类
|
||||
/// </summary>
|
||||
|
|
@ -45,7 +85,6 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取多附件数据流类
|
||||
/// </summary>
|
||||
|
|
@ -63,7 +102,6 @@ namespace BLL
|
|||
{
|
||||
if (strs.Count() > i)
|
||||
{
|
||||
//string physicalpath = Funs.AttachRootPath;
|
||||
string physicalpath = Funs.RootPath;
|
||||
string fpath = strs[i];
|
||||
string fullPath = physicalpath + fpath;
|
||||
|
|
@ -107,7 +145,6 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 数据和附件插入到多附件表
|
||||
/// </summary>
|
||||
|
|
@ -149,5 +186,45 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 数据和附件插入到多附件表【不存实际文件,只存地址】
|
||||
/// </summary>
|
||||
public static void InsertAttachFileRecord(string attachFileId, string dataId, string attachSource, string attachUrl)
|
||||
{
|
||||
var getAtt = Funs.DB.AttachFile.FirstOrDefault(x => x.AttachFileId == attachFileId);
|
||||
if (getAtt != null)
|
||||
{
|
||||
Funs.DB.AttachFile.DeleteOnSubmit(getAtt);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
//多附件
|
||||
var attachFile = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataId);
|
||||
if (attachFile == null && !string.IsNullOrEmpty(attachSource))
|
||||
{
|
||||
Model.AttachFile newAttachFile = new Model.AttachFile
|
||||
{
|
||||
AttachFileId = attachFileId,
|
||||
ToKeyId = dataId,
|
||||
AttachSource = attachSource,
|
||||
AttachUrl = attachUrl
|
||||
};
|
||||
Funs.DB.AttachFile.InsertOnSubmit(newAttachFile);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (attachFile.AttachUrl != attachUrl)
|
||||
{
|
||||
///删除附件文件
|
||||
BLL.UploadAttachmentService.DeleteFile(Funs.RootPath, attachFile.AttachUrl);
|
||||
attachFile.AttachSource = attachSource;
|
||||
attachFile.AttachUrl = attachUrl;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ namespace BLL
|
|||
//public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 关键事项通知提醒责任人
|
||||
/// 关键事项新增通知提醒责任人、抄送人
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="gjsxId"></param>
|
||||
public static void GJSXNoticeSendEmail(string userId, string gjsxId)
|
||||
public static void GJSXNoticeSendEmail(string gjsxId)
|
||||
{
|
||||
List<string> userIds = new List<string>();
|
||||
string strSql = $@"select
|
||||
DATEDIFF(DAY, CompleteDate, isnull(CloseDate,getdate())) AS DateDiffDays
|
||||
,a.GJSXID,a.ProjectId,a.Detail,a.createDate,Base_Project.ProjectName,Base_Unit.UnitName,a.CloseDate,a.IsManypeople,a.CompleteDate,a.AttachUrl
|
||||
|
|
@ -87,12 +87,28 @@ namespace BLL
|
|||
}).ToList();
|
||||
|
||||
var gItem = lstOverdue.FirstOrDefault();
|
||||
if (gItem != null)
|
||||
{
|
||||
userIds.Add(gItem.User_AcceptanceUserId);
|
||||
if (!string.IsNullOrWhiteSpace(gItem.User_CsUserIds))
|
||||
{
|
||||
userIds.AddRange(gItem.User_CsUserIds.Split(','));
|
||||
}
|
||||
foreach (var userId in userIds)
|
||||
{
|
||||
var user = UserService.GetUserByUserId(userId);
|
||||
if (gItem != null && !string.IsNullOrWhiteSpace(user.Email))
|
||||
if (!string.IsNullOrWhiteSpace(user.Email))
|
||||
{
|
||||
MailMessage mail = new MailMessage();
|
||||
//邮件主题
|
||||
if (userId == gItem.User_AcceptanceUserId)
|
||||
{
|
||||
mail.Subject = $"你有新的关键事项了——{gItem.ProjectName}";
|
||||
}
|
||||
else
|
||||
{
|
||||
mail.Subject = $"有新的关键事项抄送你了——{gItem.ProjectName}";
|
||||
}
|
||||
mail.To.Add(user.Email);
|
||||
//mail.To.Add("test@test.com");
|
||||
mail.IsBodyHtml = true;//确保邮件正文被当作HTML解析
|
||||
|
|
@ -134,7 +150,264 @@ namespace BLL
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"关键事项通知提醒责任人;项目名称:{gItem.ProjectName},事项编号:{gItem.GJSXID}", ex);
|
||||
//ErrLogInfo.WriteLog($"关键事项通知提醒责任人;项目名称:{gItem.ProjectName},事项编号:{gItem.GJSXID}", ex);
|
||||
ErrLogInfo.WriteLog($"【新增关键事项通知提醒责任人邮箱提醒异常】邮箱:{user.Email};项目名称:{gItem.ProjectName},事项编号:{gItem.GJSXID};时间:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")};异常信息:{ex.Message}");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关键事项申请关闭通知提醒提出人和跟踪人
|
||||
/// </summary>
|
||||
/// <param name="gjsxId"></param>
|
||||
/// <param name="detail"></param>
|
||||
public static void GJSXApplyCloseNoticeSendEmail(string gjsxId, string detail)
|
||||
{
|
||||
List<string> userIds = new List<string>();
|
||||
string strSql = $@"select
|
||||
DATEDIFF(DAY, CompleteDate, isnull(CloseDate,getdate())) AS DateDiffDays
|
||||
,a.GJSXID,a.ProjectId,a.Detail,a.createDate,Base_Project.ProjectName,Base_Unit.UnitName,a.CloseDate,a.IsManypeople,a.CompleteDate,a.AttachUrl
|
||||
,case a.state when 2 then '正在进行' when 3 then '待办' when 0 then '已关闭' when 1 then '开放' end as state
|
||||
,CNProfessionalName = STUFF((SELECT ',' + Base_CNProfessional.ProfessionalName FROM dbo.Base_CNProfessional where PATINDEX('%,' + RTRIM(Base_CNProfessional.CNProfessionalId) + ',%', ',' + a.CNProfessional_ID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,QuestionTypeName = STUFF((SELECT ',' + Base_QuestionType.QuestionTypeName FROM dbo.Base_QuestionType where PATINDEX('%,' + RTRIM(Base_QuestionType.QuestionTypeID) + ',%', ',' + a.QuestionTypeID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,GJSXTypeName = STUFF((SELECT ',' + Base_GJSXType.GJSXTypeName FROM dbo.Base_GJSXType where PATINDEX('%,' + RTRIM(Base_GJSXType.GJSXTypeID) + ',%', ',' + a.GJSXTypeID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,a.UserID,b.UserName
|
||||
--,b.Email as UserEmail
|
||||
,a.User_ReceiveID as User_ReceiveUserId
|
||||
,User_ReceiveUserName = STUFF((SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.User_ReceiveID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
--,User_ReceiveUserEmail = STUFF((SELECT ',' + p2.Email FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.User_ReceiveID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,a.user_Acceptance as User_AcceptanceUserId
|
||||
,User_AcceptanceUserName = STUFF((SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.user_Acceptance + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
--,User_AcceptanceUserEmail = STUFF((SELECT ',' + p2.Email FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.user_Acceptance + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,a.CsUsers as User_CsUserIds
|
||||
,User_CsUsers = STUFF((SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.CsUsers + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
--,User_CsUsersUserEmail = STUFF((SELECT ',' + p2.Email FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.CsUsers + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
from GJSX as a
|
||||
left join Sys_User as b on a.UserId = b.UserId
|
||||
left join[dbo].[Base_Project] on a.ProjectId = Base_Project.ProjectId
|
||||
left join[dbo].[Base_Unit] on a.UnitId = Base_Unit.UnitId
|
||||
where 1=1 and a.GJSXID = '{gjsxId}' ";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
|
||||
DataTable table = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// 使用LINQ将DataTable转换为List<GJSXItem>
|
||||
var lstOverdue = table.AsEnumerable().Select(row => new GJSXItem
|
||||
{
|
||||
DateDiffDays = Convert.ToInt32(row["DateDiffDays"]),
|
||||
GJSXID = row["GJSXID"].ToString(),
|
||||
ProjectId = row["ProjectId"].ToString(),
|
||||
ProjectName = row["ProjectName"].ToString(),
|
||||
UnitName = row["UnitName"].ToString(),
|
||||
Detail = row["Detail"].ToString(),
|
||||
CNProfessionalName = row["CNProfessionalName"].ToString(),
|
||||
QuestionTypeName = row["QuestionTypeName"].ToString(),
|
||||
GJSXTypeName = row["GJSXTypeName"].ToString(),
|
||||
UserID = row["UserID"].ToString(),
|
||||
UserName = row["UserName"].ToString(),
|
||||
//UserEmail = row["UserEmail"].ToString(),
|
||||
User_ReceiveUserId = row["User_ReceiveUserId"].ToString(),
|
||||
User_ReceiveUserName = row["User_ReceiveUserName"].ToString(),
|
||||
//User_ReceiveUserEmail = row["User_ReceiveUserEmail"].ToString(),
|
||||
User_AcceptanceUserId = row["User_AcceptanceUserId"].ToString(),
|
||||
User_AcceptanceUserName = row["User_AcceptanceUserName"].ToString(),
|
||||
//User_AcceptanceUserEmail = row["User_AcceptanceUserEmail"].ToString(),
|
||||
User_CsUserIds = row["User_CsUserIds"].ToString(),
|
||||
User_CsUsers = row["User_CsUsers"].ToString(),
|
||||
//User_CsUsersUserEmail = row["User_CsUsersUserEmail"].ToString(),
|
||||
CompleteDate = Convert.ToDateTime(row["CompleteDate"].ToString())
|
||||
}).ToList();
|
||||
|
||||
var gItem = lstOverdue.FirstOrDefault();
|
||||
if (gItem != null)
|
||||
{
|
||||
userIds.Add(gItem.UserID);
|
||||
userIds.Add(gItem.User_ReceiveUserId);
|
||||
foreach (var userId in userIds)
|
||||
{
|
||||
var user = UserService.GetUserByUserId(userId);
|
||||
if (!string.IsNullOrWhiteSpace(user.Email))
|
||||
{
|
||||
MailMessage mail = new MailMessage();
|
||||
//邮件主题
|
||||
mail.Subject = $"有新的事项申请关闭——{gItem.ProjectName}";
|
||||
mail.To.Add(user.Email);
|
||||
//mail.To.Add("test@test.com");
|
||||
mail.IsBodyHtml = true;//确保邮件正文被当作HTML解析
|
||||
//邮件正文
|
||||
string bodyStr = $@"<html>
|
||||
<head>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>事项申请关闭</h2>
|
||||
<p>项目名称:{gItem.ProjectName}</p>
|
||||
<p>事项编号:{gItem.GJSXID}</p>
|
||||
<p>责任单位:{gItem.UnitName}</p>
|
||||
<p>专业:{gItem.CNProfessionalName}</p>
|
||||
<p>事项类别:{gItem.GJSXTypeName}</p>
|
||||
<p>紧急程度:{gItem.QuestionTypeName}</p>
|
||||
<p>事项描述:{gItem.Detail}</p>
|
||||
<p>提出人:{gItem.UserName}</p>
|
||||
<p>责任人:{gItem.User_AcceptanceUserName}</p>
|
||||
<p>跟踪人:{gItem.User_ReceiveUserName}</p>
|
||||
<p>抄送人:{gItem.User_CsUsers}</p>
|
||||
<p>约定完成日期:{gItem.CompleteDate.ToShortDateString()}</p>
|
||||
<p>申请关闭说明:{detail}</p>
|
||||
|
||||
<h2>智慧施工管理信息系统</h2>
|
||||
<a href='https://zhgd.cwcec.com/'>请点击此处,进入智慧施工管理信息系统,查看事项详情</a>
|
||||
<p>登录账号:{user.Account}</p>
|
||||
<p>登录密码:CWCEC.+身份证号后四位(示例:CWCEC.1234)</p>
|
||||
|
||||
</body>
|
||||
</html>";
|
||||
//< p > 登录密码:{ user.RawPassword}</ p >
|
||||
mail.Body = bodyStr;
|
||||
|
||||
try
|
||||
{
|
||||
bool send = PushEmail(mail);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//ErrLogInfo.WriteLog($"关键事项申请关闭通知提醒责任人;项目名称:{gItem.ProjectName},事项编号:{gItem.GJSXID}", ex);
|
||||
ErrLogInfo.WriteLog($"【申请关闭通知提醒责任人邮箱提醒异常】邮箱:{user.Email};项目名称:{gItem.ProjectName},事项编号:{gItem.GJSXID};时间:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")};异常信息:{ex.Message}");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关键事项驳回申请关闭通知提醒责任人
|
||||
/// </summary>
|
||||
/// <param name="gjsxId"></param>
|
||||
/// <param name="detail"></param>
|
||||
public static void GJSXDisallowApplyCloseNoticeSendEmail(string gjsxId, string detail)
|
||||
{
|
||||
List<string> userIds = new List<string>();
|
||||
string strSql = $@"select
|
||||
DATEDIFF(DAY, CompleteDate, isnull(CloseDate,getdate())) AS DateDiffDays
|
||||
,a.GJSXID,a.ProjectId,a.Detail,a.createDate,Base_Project.ProjectName,Base_Unit.UnitName,a.CloseDate,a.IsManypeople,a.CompleteDate,a.AttachUrl
|
||||
,case a.state when 2 then '正在进行' when 3 then '待办' when 0 then '已关闭' when 1 then '开放' end as state
|
||||
,CNProfessionalName = STUFF((SELECT ',' + Base_CNProfessional.ProfessionalName FROM dbo.Base_CNProfessional where PATINDEX('%,' + RTRIM(Base_CNProfessional.CNProfessionalId) + ',%', ',' + a.CNProfessional_ID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,QuestionTypeName = STUFF((SELECT ',' + Base_QuestionType.QuestionTypeName FROM dbo.Base_QuestionType where PATINDEX('%,' + RTRIM(Base_QuestionType.QuestionTypeID) + ',%', ',' + a.QuestionTypeID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,GJSXTypeName = STUFF((SELECT ',' + Base_GJSXType.GJSXTypeName FROM dbo.Base_GJSXType where PATINDEX('%,' + RTRIM(Base_GJSXType.GJSXTypeID) + ',%', ',' + a.GJSXTypeID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,a.UserID,b.UserName
|
||||
--,b.Email as UserEmail
|
||||
,a.User_ReceiveID as User_ReceiveUserId
|
||||
,User_ReceiveUserName = STUFF((SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.User_ReceiveID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
--,User_ReceiveUserEmail = STUFF((SELECT ',' + p2.Email FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.User_ReceiveID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,a.user_Acceptance as User_AcceptanceUserId
|
||||
,User_AcceptanceUserName = STUFF((SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.user_Acceptance + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
--,User_AcceptanceUserEmail = STUFF((SELECT ',' + p2.Email FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.user_Acceptance + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,a.CsUsers as User_CsUserIds
|
||||
,User_CsUsers = STUFF((SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.CsUsers + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
--,User_CsUsersUserEmail = STUFF((SELECT ',' + p2.Email FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.CsUsers + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
from GJSX as a
|
||||
left join Sys_User as b on a.UserId = b.UserId
|
||||
left join[dbo].[Base_Project] on a.ProjectId = Base_Project.ProjectId
|
||||
left join[dbo].[Base_Unit] on a.UnitId = Base_Unit.UnitId
|
||||
where 1=1 and a.GJSXID = '{gjsxId}' ";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
|
||||
DataTable table = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// 使用LINQ将DataTable转换为List<GJSXItem>
|
||||
var lstOverdue = table.AsEnumerable().Select(row => new GJSXItem
|
||||
{
|
||||
DateDiffDays = Convert.ToInt32(row["DateDiffDays"]),
|
||||
GJSXID = row["GJSXID"].ToString(),
|
||||
ProjectId = row["ProjectId"].ToString(),
|
||||
ProjectName = row["ProjectName"].ToString(),
|
||||
UnitName = row["UnitName"].ToString(),
|
||||
Detail = row["Detail"].ToString(),
|
||||
CNProfessionalName = row["CNProfessionalName"].ToString(),
|
||||
QuestionTypeName = row["QuestionTypeName"].ToString(),
|
||||
GJSXTypeName = row["GJSXTypeName"].ToString(),
|
||||
UserID = row["UserID"].ToString(),
|
||||
UserName = row["UserName"].ToString(),
|
||||
//UserEmail = row["UserEmail"].ToString(),
|
||||
User_ReceiveUserId = row["User_ReceiveUserId"].ToString(),
|
||||
User_ReceiveUserName = row["User_ReceiveUserName"].ToString(),
|
||||
//User_ReceiveUserEmail = row["User_ReceiveUserEmail"].ToString(),
|
||||
User_AcceptanceUserId = row["User_AcceptanceUserId"].ToString(),
|
||||
User_AcceptanceUserName = row["User_AcceptanceUserName"].ToString(),
|
||||
//User_AcceptanceUserEmail = row["User_AcceptanceUserEmail"].ToString(),
|
||||
User_CsUserIds = row["User_CsUserIds"].ToString(),
|
||||
User_CsUsers = row["User_CsUsers"].ToString(),
|
||||
//User_CsUsersUserEmail = row["User_CsUsersUserEmail"].ToString(),
|
||||
CompleteDate = Convert.ToDateTime(row["CompleteDate"].ToString())
|
||||
}).ToList();
|
||||
|
||||
var gItem = lstOverdue.FirstOrDefault();
|
||||
if (gItem != null)
|
||||
{
|
||||
userIds.Add(gItem.User_AcceptanceUserId);
|
||||
foreach (var userId in userIds)
|
||||
{
|
||||
var user = UserService.GetUserByUserId(userId);
|
||||
if (!string.IsNullOrWhiteSpace(user.Email))
|
||||
{
|
||||
MailMessage mail = new MailMessage();
|
||||
//邮件主题
|
||||
mail.Subject = $"有事项申请关闭被驳回了——{gItem.ProjectName}";
|
||||
mail.To.Add(user.Email);
|
||||
//mail.To.Add("test@test.com");
|
||||
mail.IsBodyHtml = true;//确保邮件正文被当作HTML解析
|
||||
//邮件正文
|
||||
string bodyStr = $@"<html>
|
||||
<head>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>事项申请关闭被驳回</h2>
|
||||
<p>项目名称:{gItem.ProjectName}</p>
|
||||
<p>事项编号:{gItem.GJSXID}</p>
|
||||
<p>责任单位:{gItem.UnitName}</p>
|
||||
<p>专业:{gItem.CNProfessionalName}</p>
|
||||
<p>事项类别:{gItem.GJSXTypeName}</p>
|
||||
<p>紧急程度:{gItem.QuestionTypeName}</p>
|
||||
<p>事项描述:{gItem.Detail}</p>
|
||||
<p>提出人:{gItem.UserName}</p>
|
||||
<p>责任人:{gItem.User_AcceptanceUserName}</p>
|
||||
<p>跟踪人:{gItem.User_ReceiveUserName}</p>
|
||||
<p>抄送人:{gItem.User_CsUsers}</p>
|
||||
<p>约定完成日期:{gItem.CompleteDate.ToShortDateString()}</p>
|
||||
<p>驳回申请关闭说明:{detail}</p>
|
||||
|
||||
<h2>智慧施工管理信息系统</h2>
|
||||
<a href='https://zhgd.cwcec.com/'>请点击此处,进入智慧施工管理信息系统,查看事项详情</a>
|
||||
<p>登录账号:{user.Account}</p>
|
||||
<p>登录密码:CWCEC.+身份证号后四位(示例:CWCEC.1234)</p>
|
||||
|
||||
</body>
|
||||
</html>";
|
||||
//< p > 登录密码:{ user.RawPassword}</ p >
|
||||
mail.Body = bodyStr;
|
||||
|
||||
try
|
||||
{
|
||||
bool send = PushEmail(mail);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//ErrLogInfo.WriteLog($"关键事项申请关闭驳回通知提醒责任人;项目名称:{gItem.ProjectName},事项编号:{gItem.GJSXID}", ex);
|
||||
ErrLogInfo.WriteLog($"【驳回申请关闭通知提醒责任人邮箱提醒异常】邮箱:{user.Email};项目名称:{gItem.ProjectName},事项编号:{gItem.GJSXID};时间:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")};异常信息:{ex.Message}");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -172,7 +445,7 @@ namespace BLL
|
|||
left join Sys_User as b on a.UserId = b.UserId
|
||||
left join[dbo].[Base_Project] on a.ProjectId = Base_Project.ProjectId
|
||||
left join[dbo].[Base_Unit] on a.UnitId = Base_Unit.UnitId
|
||||
where 1=1 and a.state<>'0' and GETDATE()>a.CompleteDate ";
|
||||
where 1=1 and Base_Project.ProjectState=1 and a.state<>'0' and a.state<>'1' and (GETDATE()>a.CompleteDate or DATEDIFF(DAY, CompleteDate, isnull(CloseDate,getdate()))=-7 or DATEDIFF(DAY, CompleteDate, isnull(CloseDate,getdate()))=-6 or DATEDIFF(DAY, CompleteDate, isnull(CloseDate,getdate()))=-1 ) ";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
|
|
@ -211,6 +484,7 @@ namespace BLL
|
|||
//获取有邮箱的用户
|
||||
var userIds = BLL.UserService.GetUserHaveEmailList();
|
||||
|
||||
userIds = userIds.Where(x => x.UserName == "张邦兴" || x.UserName == "申银行").ToList();
|
||||
if (userIds.Any() && lstOverdue.Any())
|
||||
{
|
||||
//int allnum = 0;
|
||||
|
|
@ -223,14 +497,14 @@ namespace BLL
|
|||
{
|
||||
string projectName = pro.ProjectName;
|
||||
|
||||
#region 提醒事项相关人员
|
||||
#region 事项预警提醒相关人员
|
||||
|
||||
foreach (var user in userIds)
|
||||
{
|
||||
//if (allnum > 100) { break; }
|
||||
MailMessage mail = new MailMessage();
|
||||
//邮件主题
|
||||
mail.Subject = $"关键事项超期预警提醒——{projectName}";
|
||||
mail.Subject = $"关键事项预警提醒——{projectName}";
|
||||
mail.To.Add(user.Email);
|
||||
//mail.To.Add("test@test.com");
|
||||
mail.IsBodyHtml = true;//确保邮件正文被当作HTML解析
|
||||
|
|
@ -243,27 +517,27 @@ namespace BLL
|
|||
{
|
||||
foreach (var item in acceptanceItems)
|
||||
{
|
||||
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>");
|
||||
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.QuestionTypeName}</td><td>{item.UserName}</td><td>{item.User_AcceptanceUserName}</td><td>{item.CompleteDate.ToShortDateString()}</td><td>{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : item.DateDiffDays < -1 ? "还有一周就逾期了" : "半")}</td></tr>");
|
||||
index++;
|
||||
}
|
||||
}
|
||||
//发起人为本人
|
||||
var userItems = lstProjectOverdue.Where(x => x.UserID == user.UserId).OrderByDescending(x => x.DateDiffDays).ToList();
|
||||
var userItems = lstProjectOverdue.Where(x => x.UserID == user.UserId && x.DateDiffDays > -1).OrderByDescending(x => x.DateDiffDays).ToList();
|
||||
if (userItems.Any())
|
||||
{
|
||||
foreach (var item in userItems)
|
||||
{
|
||||
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>");
|
||||
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.QuestionTypeName}</td><td>{item.UserName}</td><td>{item.User_AcceptanceUserName}</td><td>{item.CompleteDate.ToShortDateString()}</td><td>{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : "半")}</td></tr>");
|
||||
index++;
|
||||
}
|
||||
}
|
||||
//跟踪人为本人--x.User_ReceiveUserId != null && x.User_ReceiveUserId != "" &&
|
||||
var receiveItems = lstProjectOverdue.Where(x => x.User_ReceiveUserId.Contains(user.UserId)).OrderByDescending(x => x.DateDiffDays).ToList();
|
||||
var receiveItems = lstProjectOverdue.Where(x => x.User_ReceiveUserId.Contains(user.UserId) && x.DateDiffDays > -1).OrderByDescending(x => x.DateDiffDays).ToList();
|
||||
if (receiveItems.Any())
|
||||
{
|
||||
foreach (var item in receiveItems)
|
||||
{
|
||||
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>");
|
||||
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.QuestionTypeName}</td><td>{item.UserName}</td><td>{item.User_AcceptanceUserName}</td><td>{item.CompleteDate.ToShortDateString()}</td><td>{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : "半")}</td></tr>");
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
|
@ -273,7 +547,7 @@ namespace BLL
|
|||
{
|
||||
foreach (var item in csUserItems)
|
||||
{
|
||||
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>");
|
||||
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.QuestionTypeName}</td><td>{item.UserName}</td><td>{item.User_AcceptanceUserName}</td><td>{item.CompleteDate.ToShortDateString()}</td><td>{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : item.DateDiffDays < -1 ? "还有一周就逾期了" : "半")}</td></tr>");
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
|
@ -293,7 +567,7 @@ namespace BLL
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>关键事项超期预警提醒</h2>
|
||||
<h2>关键事项预警提醒</h2>
|
||||
<a href='https://zhgd.cwcec.com/'>请点击此处,查看详细信息,并及时处置关闭</a>
|
||||
<table>
|
||||
<thead>
|
||||
|
|
@ -304,6 +578,7 @@ namespace BLL
|
|||
<th>事项编号</th>
|
||||
<th>事项描述</th>
|
||||
<th>事项类别</th>
|
||||
<th>紧急程度</th>
|
||||
<th>发起人</th>
|
||||
<th>责任人</th>
|
||||
<th>约定完成时间</th>
|
||||
|
|
@ -314,16 +589,24 @@ namespace BLL
|
|||
|
||||
mail.Body = bodyStr;
|
||||
if (index > 1)
|
||||
{
|
||||
try
|
||||
{
|
||||
//allnum++;
|
||||
bool send = PushEmail(mail);
|
||||
//Thread.Sleep(1000); //暂停1秒
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"【邮箱提醒异常】邮箱:{user.Email};时间:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")};异常信息:{ex.Message}");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 提醒项目主管和项目经理
|
||||
#region 事项逾期提醒项目主管和项目经理
|
||||
|
||||
var projectSupervisors = ProjectUserService.GetProjectUserByRoleId(Const.ProjectSupervisor);
|
||||
var projectManagers = ProjectUserService.GetProjectUserByRoleId(Const.ProjectManager);
|
||||
|
|
@ -339,7 +622,7 @@ namespace BLL
|
|||
{
|
||||
MailMessage mail = new MailMessage();
|
||||
//邮件主题
|
||||
mail.Subject = $"关键事项超期预警提醒——{projectName}";
|
||||
mail.Subject = $"关键事项逾期提醒——{projectName}";
|
||||
mail.To.Add(user.Email);
|
||||
//mail.To.Add("test@test.com");
|
||||
mail.IsBodyHtml = true;//确保邮件正文被当作HTML解析
|
||||
|
|
@ -349,20 +632,33 @@ namespace BLL
|
|||
int index = 0;
|
||||
if (projectManagerIds.Contains(user.UserId))
|
||||
{
|
||||
foreach (var item in lstProjectOverdue)
|
||||
index = 0;
|
||||
//超期当日提醒项目经理
|
||||
var lstProjectOverdue1 = lstProjectOverdue.Where(x => x.DateDiffDays == 0 || x.DateDiffDays == -1).ToList();
|
||||
//超期一周的重要、紧急事项提醒项目经理
|
||||
var lstProjectOverdue7 = lstProjectOverdue.Where(x => x.DateDiffDays >= 7 && x.QuestionTypeName != "一般").ToList();
|
||||
lstProjectOverdue1.AddRange(lstProjectOverdue7);
|
||||
foreach (var item in lstProjectOverdue1)
|
||||
{
|
||||
if (!item.User_CsUserIds.Contains(user.UserId))
|
||||
{
|
||||
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>");
|
||||
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.QuestionTypeName}</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();
|
||||
//超期两周的重要、紧急事项提醒项目主管
|
||||
var lstProjectOverdue14 = lstProjectOverdue.Where(x => x.DateDiffDays >= 13).ToList();
|
||||
index = 0;
|
||||
foreach (var item in lstProjectOverdue2)
|
||||
foreach (var item in lstProjectOverdue14)
|
||||
{
|
||||
if (!item.User_CsUserIds.Contains(user.UserId))
|
||||
{
|
||||
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>");
|
||||
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.QuestionTypeName}</td><td>{item.UserName}</td><td>{item.User_AcceptanceUserName}</td><td>{item.CompleteDate.ToShortDateString()}</td><td>{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : "半")}</td></tr>");
|
||||
}
|
||||
}
|
||||
}
|
||||
//邮件正文
|
||||
|
|
@ -392,6 +688,7 @@ namespace BLL
|
|||
<th>事项编号</th>
|
||||
<th>事项描述</th>
|
||||
<th>事项类别</th>
|
||||
<th>紧急程度</th>
|
||||
<th>发起人</th>
|
||||
<th>责任人</th>
|
||||
<th>约定完成时间</th>
|
||||
|
|
@ -402,11 +699,19 @@ namespace BLL
|
|||
|
||||
mail.Body = bodyStr;
|
||||
if (index > 1)
|
||||
{
|
||||
try
|
||||
{
|
||||
//allnum++;
|
||||
bool send = PushEmail(mail);
|
||||
//Thread.Sleep(1000); //暂停1秒
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"【邮箱提醒异常】邮箱:{user.Email};时间:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")};异常信息:{ex.Message}");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ namespace BLL
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.ServiceModel.Security;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public static class UserService
|
||||
|
|
@ -390,6 +391,27 @@ namespace BLL
|
|||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据用户Id判断用户是否有维护邮箱,返回姓名
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsUserHaveEmail(string userId, out string userName)
|
||||
{
|
||||
bool result = false;
|
||||
userName = string.Empty;
|
||||
if (!string.IsNullOrWhiteSpace(userId))
|
||||
{
|
||||
var user = (from x in Funs.DB.Sys_User where x.UserId == userId select x).FirstOrDefault();
|
||||
if (user != null)
|
||||
{
|
||||
result = !string.IsNullOrWhiteSpace(user.Email);
|
||||
userName = user.UserName;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据用户Id获取用户邮箱
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ namespace FineUIPro.Web.CQMS.Check
|
|||
{
|
||||
if (!string.IsNullOrEmpty(approve.ApproveMan))
|
||||
{
|
||||
if (this.CurrUser.UserId == approve.ApproveMan || CurrUser.UserId == Const.sysglyId)
|
||||
if (approve.ApproveMan.Contains(this.CurrUser.UserId) || CurrUser.UserId == Const.sysglyId)
|
||||
{
|
||||
if (jointCheck.State == BLL.Const.JointCheck_Compile)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -60,12 +60,12 @@ namespace FineUIPro.Web.CQMS.Check
|
|||
strSql += " AND UnitId = @UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", this.drpSponsorUnit.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtStartTime.Text.Trim()))
|
||||
if (!string.IsNullOrWhiteSpace(txtStartTime.Text.Trim()))
|
||||
{
|
||||
strSql += " AND CheckDate >= @CheckDate";
|
||||
listStr.Add(new SqlParameter("@CheckDate", txtStartTime.Text.Trim() + " 00:00:00"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
|
||||
if (!string.IsNullOrWhiteSpace(txtEndTime.Text.Trim()))
|
||||
{
|
||||
strSql += " AND CheckDate <= @CheckDateE";
|
||||
listStr.Add(new SqlParameter("@CheckDateE", txtEndTime.Text.Trim() + " 23:59:59"));
|
||||
|
|
|
|||
|
|
@ -76,6 +76,12 @@
|
|||
<f:RenderField ColumnID="AttendMan" DataField="AttendMan" FieldType="String" HeaderText="参加人员" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="130px">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("ConTechnologyDisclosureId")) %>' ToolTip="附件查看"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
|
@ -96,16 +102,16 @@
|
|||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="施工技术交底管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="900px" Height="430px">
|
||||
Width="900px" Height="600px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="1200px" Height="660px">
|
||||
</f:Window>
|
||||
<%--<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
|
||||
IsModal="true" Width="700px" Height="500px">
|
||||
</f:Window>--%>
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="修改" Icon="Pencil" OnClick="btnMenuModify_Click" Hidden="true">
|
||||
|
|
|
|||
|
|
@ -7,10 +7,12 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class ConTechnologyDisclosure {
|
||||
public partial class ConTechnologyDisclosure
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
|
|
@ -138,6 +140,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
|
|
@ -174,6 +185,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -45,22 +45,35 @@
|
|||
<f:TextBox ID="txtAttendMan" runat="server" Label="参加人员" MaxLength="100" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel ID="Panel2" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
|
||||
<Items>
|
||||
<f:Label ID="Label1" runat="server" Label="上传附件"
|
||||
LabelAlign="Right" LabelWidth="140px">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<%--<f:HiddenField ID="hdAttachUrl" runat="server">
|
||||
</f:HiddenField>--%>
|
||||
<f:HiddenField ID="hdAttachUrl" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<%--<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>--%>
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using BLL;
|
||||
using FineUIPro.Web.Comprehensive;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
|
@ -47,6 +48,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
if (con != null)
|
||||
{
|
||||
this.ConTechnologyDisclosureId = con.ConTechnologyDisclosureId;
|
||||
this.hdAttachUrl.Text = this.ConTechnologyDisclosureId;
|
||||
if (!string.IsNullOrEmpty(con.CNProfessionalId))
|
||||
{
|
||||
this.drpCNProfessionalId.SelectedValue = con.CNProfessionalId;
|
||||
|
|
@ -126,9 +128,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
newCon.DisclosurePersonNum = Funs.GetNewInt(this.txtDisclosurePersonNum.Text.Trim());
|
||||
|
||||
if (string.IsNullOrEmpty(this.ConTechnologyDisclosureId))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
{
|
||||
newCon.ConTechnologyDisclosureId = this.hdAttachUrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
newCon.ConTechnologyDisclosureId = SQLHelper.GetNewID(typeof(Model.Comprehensive_ConTechnologyDisclosure));
|
||||
|
||||
this.hdAttachUrl.Text = newCon.ConTechnologyDisclosureId;
|
||||
}
|
||||
newCon.CompileMan = this.CurrUser.UserId;
|
||||
newCon.CompileDate = DateTime.Now;
|
||||
BLL.ConTechnologyDisclosureService.AddConTechnologyDisclosure(newCon);
|
||||
|
|
@ -165,5 +174,22 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 附件上传
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttach_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.hdAttachUrl.Text)) //新增记录
|
||||
{
|
||||
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDetails));
|
||||
}
|
||||
Model.Comprehensive_ConTechnologyDisclosure con = BLL.ConTechnologyDisclosureService.GetConTechnologyDisclosureById(this.ConTechnologyDisclosureId);
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/ConTechnologyDisclosure&menuId={1}", this.hdAttachUrl.Text, BLL.Const.ConTechnologyDisclosureMenuId)));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -131,6 +131,33 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtAttendMan;
|
||||
|
||||
/// <summary>
|
||||
/// Panel2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel2;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttach 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttach;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
|
@ -140,6 +167,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// hdAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
|
|
@ -148,5 +184,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,8 +234,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
designDetails.DesignDetailsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDetails));
|
||||
this.hdAttachUrl.Text = designDetails.DesignDetailsId;
|
||||
}
|
||||
|
||||
|
||||
designDetails.CompileMan = this.CurrUser.UserId;
|
||||
designDetails.CompileDate = DateTime.Now;
|
||||
designDetails.Status = BLL.Const.Comprehensive_Compile;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,12 @@
|
|||
<f:RenderField ColumnID="Remark" DataField="Remark" FieldType="String" HeaderText="备注" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("TrainingRecordsId")) %>' ToolTip="附件查看"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
|
@ -84,11 +90,15 @@
|
|||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="培训记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="800px" Height="500px">
|
||||
Width="800px" Height="600px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="培训记录导入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="1200px" Height="650px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
|
||||
IsModal="true" Width="700px" Height="500px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
|
|
|
|||
|
|
@ -7,10 +7,12 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class TrainingRecords {
|
||||
public partial class TrainingRecords
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
|
|
@ -120,6 +122,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
|
|
@ -156,6 +167,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -52,16 +52,35 @@
|
|||
<f:TextArea ID="txtRemark" runat="server" Label="备注" MaxLength="50" LabelAlign="Right" LabelWidth="130px"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel ID="Panel2" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
|
||||
<Items>
|
||||
<f:Label ID="Label1" runat="server" Label="上传附件"
|
||||
LabelAlign="Right" LabelWidth="140px">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:HiddenField ID="hdAttachUrl" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using BLL;
|
||||
using FineUIPro.Web.Comprehensive;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
|
|
@ -40,6 +41,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
if (trainingRecords != null)
|
||||
{
|
||||
this.TrainingRecordsId = trainingRecords.TrainingRecordsId;
|
||||
this.hdAttachUrl.Text = this.TrainingRecordsId;
|
||||
this.txtTrainingContents.Text = trainingRecords.TrainingContents;
|
||||
if (!string.IsNullOrEmpty(trainingRecords.CNProfessionalId))
|
||||
{
|
||||
|
|
@ -90,8 +92,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
BLL.TrainingRecordsService.UpdateTrainingRecords(trainingRecords);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
{
|
||||
trainingRecords.TrainingRecordsId = this.hdAttachUrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
trainingRecords.TrainingRecordsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_TrainingRecords));
|
||||
this.hdAttachUrl.Text = trainingRecords.TrainingRecordsId;
|
||||
}
|
||||
trainingRecords.ProjectId = this.CurrUser.LoginProjectId;
|
||||
BLL.TrainingRecordsService.AddTrainingRecords(trainingRecords);
|
||||
}
|
||||
|
|
@ -122,5 +132,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 附件上传
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttach_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.hdAttachUrl.Text)) //新增记录
|
||||
{
|
||||
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDetails));
|
||||
}
|
||||
Model.Comprehensive_TrainingRecords trainingRecords = BLL.TrainingRecordsService.GetTrainingRecordsById(this.TrainingRecordsId);
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/TrainingRecords&menuId={1}", this.hdAttachUrl.Text, BLL.Const.TrainingRecordsMenuId)));
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -7,10 +7,12 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class TrainingRecordsEdit {
|
||||
public partial class TrainingRecordsEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
|
|
@ -111,6 +113,33 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// Panel2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel2;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttach 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttach;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
|
@ -120,6 +149,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// hdAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
|
|
@ -128,5 +166,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
sb.Append("AND P.CNProfessionalId=@CNProfessionalId ");
|
||||
listStr.Add(new SqlParameter("@CNProfessionalId", drpCNProfessional.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtStarTime.Text))
|
||||
if (!string.IsNullOrWhiteSpace(txtStarTime.Text))
|
||||
{
|
||||
sb.Append("AND P.InspectionDate >= @startTime ");
|
||||
listStr.Add(new SqlParameter("@startTime", Funs.GetNewDateTime(txtStarTime.Text)));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtEndTime.Text))
|
||||
if (!string.IsNullOrWhiteSpace(txtEndTime.Text))
|
||||
{
|
||||
sb.Append("AND P.InspectionDate <= @endTim ");
|
||||
listStr.Add(new SqlParameter("@endTime", Funs.GetNewDateTime(txtEndTime.Text)));
|
||||
|
|
|
|||
|
|
@ -13,10 +13,12 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
{
|
||||
public partial class CheckRectify : PageBase
|
||||
{
|
||||
private static string proType;
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
proType = Request.Params["proType"] ?? string.Empty;
|
||||
this.GetButtonPower();
|
||||
//btnNew.OnClientClick = Window1.GetShowReference("CheckRectifyEdit.aspx") + "return false;";
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
|
|
@ -30,15 +32,19 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = string.Empty;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append($@"SELECT S.CheckRectifyId,S.CheckRectifyCode,S.ProjectId,S.ProjectName,S.UnitId,U.UnitName,S.CheckDate,CASE S.HandleState WHEN '{BLL.Const.State_1}' THEN '未签发' WHEN '{BLL.Const.State_2}' THEN '未上报' ELSE '已上报' END AS HandleState,
|
||||
S.IssueMan,S.IssueDate,ISNULL(TotalCount.TotalCount,0) AS TotalCount ,ISNULL(CompleteCount.CompleteCount,0) AS CompleteCount,(ISNULL(TotalCount.TotalCount,0) -ISNULL(CompleteCount.CompleteCount,0)) AS UnCompleteCount ");
|
||||
sb.Append("FROM dbo.DCGL_Check_CheckRectify AS S LEFT JOIN dbo.Base_Unit AS U ON U.UnitId = S.UnitId ");
|
||||
sb.Append(" LEFT JOIN (SELECT COUNT(*) AS TotalCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem GROUP BY CheckRectifyId) AS TotalCount ON S.CheckRectifyId=TotalCount.CheckRectifyId ");
|
||||
sb.Append(" LEFT JOIN (SELECT COUNT(*) AS CompleteCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem WHERE RealEndDate IS NOT NULL GROUP BY CheckRectifyId) AS CompleteCount ON S.CheckRectifyId=CompleteCount.CheckRectifyId ");
|
||||
if (!string.IsNullOrWhiteSpace(proType) && proType == "1")
|
||||
{//只查询本项目检查数据
|
||||
sb.Append($"WHERE S.ProjectId='{this.CurrUser.LoginProjectId}' ");
|
||||
}
|
||||
sb.Append("ORDER BY HandleState");
|
||||
SqlParameter[] parameter = new SqlParameter[] { };
|
||||
strSql = "SELECT S.CheckRectifyId,S.CheckRectifyCode,S.ProjectId,S.ProjectName,S.UnitId,U.UnitName,S.CheckDate,CASE S.HandleState WHEN '" + BLL.Const.State_1 + "' THEN '未签发' WHEN '" + BLL.Const.State_2 + "' THEN '未上报' ELSE '已上报' END AS HandleState,"
|
||||
+ @" S.IssueMan,S.IssueDate,ISNULL(TotalCount.TotalCount,0) AS TotalCount ,ISNULL(CompleteCount.CompleteCount,0) AS CompleteCount,(ISNULL(TotalCount.TotalCount,0) -ISNULL(CompleteCount.CompleteCount,0)) AS UnCompleteCount"
|
||||
+ @" FROM dbo.DCGL_Check_CheckRectify AS S LEFT JOIN dbo.Base_Unit AS U ON U.UnitId = S.UnitId"
|
||||
+ @" LEFT JOIN (SELECT COUNT(*) AS TotalCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem GROUP BY CheckRectifyId) AS TotalCount ON S.CheckRectifyId=TotalCount.CheckRectifyId"
|
||||
+ @" LEFT JOIN (SELECT COUNT(*) AS CompleteCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem WHERE RealEndDate IS NOT NULL GROUP BY CheckRectifyId) AS CompleteCount ON S.CheckRectifyId=CompleteCount.CheckRectifyId"
|
||||
+ @" ORDER BY HandleState";
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(sb.ToString(), parameter);
|
||||
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
|
|
@ -386,13 +392,246 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
}
|
||||
|
||||
|
||||
#region 获取
|
||||
|
||||
/// <summary>
|
||||
/// 获取督查检查整改
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.ResponeData getCheck_CheckRectifyListToSUB()
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
string unitId = CommonService.GetThisUnitId();
|
||||
string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/getDCGLCheckInfoRectify?unitId=" + unitId;
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
Hashtable newToken = new Hashtable
|
||||
{
|
||||
{ "token", ServerService.GetToken().Token }
|
||||
};
|
||||
|
||||
var strJosn = APIGetHttpService.Http(baseurl, "GET", contenttype, newToken, null);
|
||||
if (!string.IsNullOrEmpty(strJosn))
|
||||
{
|
||||
JObject obj = JObject.Parse(strJosn);
|
||||
responeData.code = Funs.GetNewIntOrZero(obj["code"].ToString());
|
||||
responeData.message = obj["message"].ToString();
|
||||
if (responeData.code == 1)
|
||||
{
|
||||
JArray getData = JArray.Parse(obj["data"].ToString());
|
||||
if (getData.Count() > 0)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
List<string> ids = new List<string>();
|
||||
foreach (var item in getData)
|
||||
{
|
||||
string getCheckRectifyId = item["CheckRectifyId"].ToString();
|
||||
if (!ids.Contains(getCheckRectifyId))
|
||||
{
|
||||
var newRectify = db.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == getCheckRectifyId);
|
||||
if (newRectify == null)
|
||||
{
|
||||
ids.Add(getCheckRectifyId);
|
||||
Model.DCGL_Check_CheckRectify newCheckRectify = new Model.DCGL_Check_CheckRectify
|
||||
{
|
||||
CheckRectifyId = getCheckRectifyId,
|
||||
CheckRectifyCode = item["CheckRectifyCode"].ToString(),
|
||||
ProjectId = item["ProjectId"].ToString(),
|
||||
ProjectName = item["ProjectName"].ToString(),
|
||||
UnitId = unitId,
|
||||
CheckDate = Funs.GetNewDateTime(item["CheckDate"].ToString()),
|
||||
IssueMan = item["IssueMan"].ToString(),
|
||||
IssueDate = Funs.GetNewDateTime(item["IssueDate"].ToString()),
|
||||
HandleState = item["HandleState"].ToString()
|
||||
};
|
||||
db.DCGL_Check_CheckRectify.InsertOnSubmit(newCheckRectify);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
newRectify.CheckRectifyCode = item["CheckRectifyCode"].ToString();
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
//获取对应主表主键的明细集合
|
||||
string getNoticeItemId = item["NoticeItemId"].ToString();
|
||||
var notice = db.DCGL_Check_CheckInfo_TableNoticeItem.FirstOrDefault(x => x.ID == getNoticeItemId);
|
||||
if (notice == null)
|
||||
{
|
||||
Model.DCGL_Check_CheckInfo_TableNoticeItem newCheckRectifyItem = new Model.DCGL_Check_CheckInfo_TableNoticeItem
|
||||
{
|
||||
ID = getNoticeItemId,
|
||||
CheckInfoId = item["CheckInfoId"].ToString(),
|
||||
SortIndex = Funs.GetNewInt(item["SortIndex"].ToString()),
|
||||
Describe = item["Describe"].ToString(),
|
||||
Standards = item["Standards"].ToString(),
|
||||
Advice = item["Advice"].ToString(),
|
||||
LimitTime = Funs.GetNewDateTime(item["LimitTime"].ToString()),
|
||||
|
||||
Situation = item["Situation"].ToString(),
|
||||
Remark = item["Remark"].ToString(),
|
||||
Url = item["Url"].ToString(),
|
||||
AffUrl = item["AffUrl"].ToString(),
|
||||
RiskLevel = item["RiskLevel"].ToString(),
|
||||
ProblemTypes = item["ProblemTypes"].ToString(),
|
||||
ProblemSubTypeId = item["ProblemSubTypeId"].ToString(),
|
||||
ProblemSubType = item["ProblemSubType"].ToString(),
|
||||
States = item["States"].ToString(),
|
||||
|
||||
//WorkType = item["WorkType"].ToString(),
|
||||
//DangerPoint = item["DangerPoint"].ToString(),
|
||||
//RiskExists = item["RiskExists"].ToString(),
|
||||
//IsProject = Convert.ToBoolean(item["IsProject"].ToString()),
|
||||
//CheckMan = item["CheckMan"].ToString(),
|
||||
//SubjectUnitMan = item["SubjectUnitMan"].ToString(),
|
||||
};
|
||||
db.DCGL_Check_CheckInfo_TableNoticeItem.InsertOnSubmit(newCheckRectifyItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
BLL.CommonService.DeleteAttachFileById(getNoticeItemId);//删除附件
|
||||
////上传附件
|
||||
string getAttachFileId = item["AttachFileId"].ToString();
|
||||
if (!string.IsNullOrEmpty(getAttachFileId))
|
||||
{
|
||||
List<byte[]> resultList = new List<byte[]>();
|
||||
string filePath = item["FilePath"].ToString();
|
||||
string attachSource = item["AttachSource"].ToString();
|
||||
string attachUrl = item["AttachUrl"].ToString();
|
||||
|
||||
BLL.FileInsertService.InsertAttachFileRecord(getAttachFileId, getNoticeItemId, attachSource, attachUrl);
|
||||
//if (!string.IsNullOrWhiteSpace(filePath) && !string.IsNullOrWhiteSpace(attachSource) && !string.IsNullOrWhiteSpace(attachUrl))
|
||||
//{
|
||||
// resultList = FileInsertService.FilePathTransStream(filePath, attachUrl);
|
||||
//}
|
||||
//BLL.FileInsertService.InsertAttachFile(getAttachFileId, getNoticeItemId, attachSource, attachUrl, resultList);
|
||||
}
|
||||
|
||||
string getCheckRectifyItemId = item["CheckRectifyItemId"].ToString();
|
||||
var oldItem = db.DCGL_Check_CheckRectifyItem.FirstOrDefault(e => e.CheckRectifyItemId == getCheckRectifyItemId);
|
||||
if (oldItem == null)
|
||||
{
|
||||
Model.DCGL_Check_CheckRectifyItem newCheckRectifyItem = new Model.DCGL_Check_CheckRectifyItem
|
||||
{
|
||||
CheckRectifyItemId = getCheckRectifyItemId,
|
||||
CheckRectifyId = getCheckRectifyId,
|
||||
NoticeItemId = getNoticeItemId,
|
||||
ConfirmMan = item["ConfirmMan"].ToString(),
|
||||
ConfirmManName = item["ConfirmManName"].ToString(),
|
||||
ConfirmDate = Funs.GetNewDateTime(item["ConfirmDate"].ToString()),
|
||||
OrderEndDate = Funs.GetNewDateTime(item["OrderEndDate"].ToString()),
|
||||
OrderEndPerson = item["OrderEndPerson"].ToString(),
|
||||
RealEndDate = Funs.GetNewDateTime(item["RealEndDate"].ToString()),
|
||||
};
|
||||
|
||||
db.DCGL_Check_CheckRectifyItem.InsertOnSubmit(newCheckRectifyItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//获取对应主表主键的明细集合
|
||||
string getNoticeItemId = item["NoticeItemId"].ToString();
|
||||
var notice = db.DCGL_Check_CheckInfo_TableNoticeItem.FirstOrDefault(x => x.ID == getNoticeItemId);
|
||||
if (notice == null)
|
||||
{
|
||||
|
||||
Model.DCGL_Check_CheckInfo_TableNoticeItem newCheckRectifyItem = new Model.DCGL_Check_CheckInfo_TableNoticeItem
|
||||
{
|
||||
ID = getNoticeItemId,
|
||||
CheckInfoId = item["CheckInfoId"].ToString(),
|
||||
SortIndex = Funs.GetNewInt(item["SortIndex"].ToString()),
|
||||
Describe = item["Describe"].ToString(),
|
||||
Standards = item["Standards"].ToString(),
|
||||
Advice = item["Advice"].ToString(),
|
||||
LimitTime = Funs.GetNewDateTime(item["LimitTime"].ToString()),
|
||||
|
||||
Situation = item["Situation"].ToString(),
|
||||
Remark = item["Remark"].ToString(),
|
||||
Url = item["Url"].ToString(),
|
||||
AffUrl = item["AffUrl"].ToString(),
|
||||
RiskLevel = item["RiskLevel"].ToString(),
|
||||
ProblemTypes = item["ProblemTypes"].ToString(),
|
||||
ProblemSubTypeId = item["ProblemSubTypeId"].ToString(),
|
||||
ProblemSubType = item["ProblemSubType"].ToString(),
|
||||
States = item["States"].ToString(),
|
||||
|
||||
//WorkType = item["WorkType"].ToString(),
|
||||
//DangerPoint = item["DangerPoint"].ToString(),
|
||||
//RiskExists = item["RiskExists"].ToString(),
|
||||
//IsProject = Convert.ToBoolean(item["IsProject"].ToString()),
|
||||
//CheckMan = item["CheckMan"].ToString(),
|
||||
//SubjectUnitMan = item["SubjectUnitMan"].ToString(),
|
||||
};
|
||||
db.DCGL_Check_CheckInfo_TableNoticeItem.InsertOnSubmit(newCheckRectifyItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
BLL.CommonService.DeleteAttachFileById(getNoticeItemId);//删除附件
|
||||
////上传附件
|
||||
string getAttachFileId = item["AttachFileId"].ToString();
|
||||
if (!string.IsNullOrEmpty(getAttachFileId))
|
||||
{
|
||||
List<byte[]> resultList = new List<byte[]>();
|
||||
string attachSource = item["AttachSource"].ToString();
|
||||
string attachUrl = item["AttachUrl"].ToString();
|
||||
BLL.FileInsertService.InsertAttachFileRecord(getAttachFileId, getNoticeItemId, attachSource, attachUrl);
|
||||
//if (!string.IsNullOrWhiteSpace(filePath) && !string.IsNullOrWhiteSpace(attachSource) && !string.IsNullOrWhiteSpace(attachUrl))
|
||||
//{
|
||||
// resultList = FileInsertService.FilePathTransStream(filePath, attachUrl);
|
||||
//}
|
||||
//BLL.FileInsertService.InsertAttachFile(getAttachFileId, getNoticeItemId, attachSource, attachUrl, resultList);
|
||||
}
|
||||
|
||||
string getCheckRectifyItemId = item["CheckRectifyItemId"].ToString();
|
||||
var oldItem = db.DCGL_Check_CheckRectifyItem.FirstOrDefault(e => e.CheckRectifyItemId == getCheckRectifyItemId);
|
||||
if (oldItem == null)
|
||||
{
|
||||
Model.DCGL_Check_CheckRectifyItem newCheckRectifyItem = new Model.DCGL_Check_CheckRectifyItem
|
||||
{
|
||||
CheckRectifyItemId = getCheckRectifyItemId,
|
||||
CheckRectifyId = getCheckRectifyId,
|
||||
NoticeItemId = getNoticeItemId,
|
||||
ConfirmMan = item["ConfirmMan"].ToString(),
|
||||
ConfirmManName = item["ConfirmManName"].ToString(),
|
||||
ConfirmDate = Funs.GetNewDateTime(item["ConfirmDate"].ToString()),
|
||||
OrderEndDate = Funs.GetNewDateTime(item["OrderEndDate"].ToString()),
|
||||
OrderEndPerson = item["OrderEndPerson"].ToString(),
|
||||
RealEndDate = Funs.GetNewDateTime(item["RealEndDate"].ToString()),
|
||||
};
|
||||
|
||||
db.DCGL_Check_CheckRectifyItem.InsertOnSubmit(newCheckRectifyItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
responeData.message = "获取成功:整改明细记录" + getData.Count().ToString() + "条";
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "获取失败:" + ex.Message;
|
||||
ErrLogInfo.WriteLog("督查检查通知单获取!", ex);
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取
|
||||
/// <summary>
|
||||
/// 获取
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.ResponeData getCheck_CheckRectifyListToSUB()
|
||||
public static Model.ResponeData getCheck_CheckRectifyListToSUBOld()
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
|
|
@ -591,6 +830,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
CheckRectifyId = getCheckRectifyId,
|
||||
NoticeItemId = getNoticeItemId,
|
||||
ConfirmMan = item["ConfirmMan"].ToString(),
|
||||
ConfirmManName = item["ConfirmManName"].ToString(),
|
||||
ConfirmDate = Funs.GetNewDateTime(item["ConfirmDate"].ToString()),
|
||||
OrderEndDate = Funs.GetNewDateTime(item["OrderEndDate"].ToString()),
|
||||
OrderEndPerson = item["OrderEndPerson"].ToString(),
|
||||
|
|
|
|||
|
|
@ -6,11 +6,36 @@
|
|||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>隐患整改单</title>
|
||||
<link href="../../res/css/viewer.min.css" rel="stylesheet" />
|
||||
<script src="../../res/js/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<script src="../../res/js/viewer.min.js" type="text/javascript"></script>
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
.imgPreview {
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%; /*容器占满整个屏幕*/
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.imgPreview img {
|
||||
z-index: 100;
|
||||
width: 60%;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
}
|
||||
/*添加鼠标移入图片效果*/
|
||||
.img {
|
||||
cursor: url("ico/放大镜.png"), auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -57,7 +82,7 @@
|
|||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
||||
BoxFlex="1" DataKeyNames="CheckRectifyItemId" AllowCellEditing="true" Height="420px"
|
||||
BoxFlex="1" DataKeyNames="CheckRectifyItemId" AllowCellEditing="true" Height="620px"
|
||||
ClicksToEdit="1" DataIDField="CheckRectifyItemId" EnableColumnLines="true">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="45px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
|
|
@ -74,10 +99,16 @@
|
|||
<asp:Label ID="Label4" runat="server" Text='<%# Bind("RiskExists") %>' ToolTip='<%#Bind("RiskExists") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" HeaderText="整改前" Text="相关照片"
|
||||
<f:TemplateField ColumnID="tfImageUrl1" MinWidth="120px" HeaderText="整改前" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbImageUrl1" runat="server" Text='<%# ConvertImageUrlByImage(Eval("NoticeItemId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" HeaderText="整改前" Text="相关照片"
|
||||
ToolTip="相关照片附件" DataIFrameUrlFields="NoticeItemId" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Check&type=-1"
|
||||
Title="相关照片" ColumnID="WindowAtt">
|
||||
</f:WindowField>
|
||||
</f:WindowField>--%>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" HeaderText="整改后" Text="相关照片"
|
||||
ToolTip="相关照片附件" DataIFrameUrlFields="CheckRectifyItemId" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Check&menuId=2E4A3E58-44B7-41B0-BFE3-634DF29AAE27"
|
||||
Title="相关照片" ColumnID="WindowAtt1">
|
||||
|
|
@ -108,12 +139,19 @@
|
|||
</f:DatePicker>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Verification" DataField="Verification" Width="100px" HeaderToolTip="企业管理部门验证人"
|
||||
<%-- <f:RenderField ColumnID="Verification" DataField="Verification" Width="100px" HeaderToolTip="企业管理部门验证人"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="验证人">
|
||||
<Editor>
|
||||
<f:TextBox ID="txtVerification" Text='<%# Eval("Verification")%>' MaxLength="50" runat="server">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField ColumnID="Situation" DataField="Situation" Width="220px" HeaderToolTip="整改情况"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="整改情况">
|
||||
<Editor>
|
||||
<f:TextBox ID="txtSituation" Text='<%# Eval("Situation")%>' MaxLength="500" runat="server">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="1px" ColumnID="CheckRectifyItemId" DataField="CheckRectifyItemId"
|
||||
FieldType="String" HeaderText="主键" Hidden="true" HeaderTextAlign="Center">
|
||||
|
|
@ -143,5 +181,43 @@
|
|||
IsModal="true" Width="800px" Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<div class="imgPreview">
|
||||
<img src="#" alt="" id="imgPreview" />
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
var imgID = '<%=Grid1.ClientID %>';
|
||||
function showImg() {
|
||||
var $wrap = $("#" + imgID)
|
||||
//console.log($wrap)
|
||||
$wrap.find('img').on('click', function () {
|
||||
var src = $(this).attr('src');
|
||||
console.log(src)
|
||||
if (src.indexOf("/res/icon") != -1) {
|
||||
return;
|
||||
}
|
||||
var div = document.createElement('div');
|
||||
div.style.display = 'none';
|
||||
div.innerHTML = '<img src="' + src + '">'; // 创建一个包含图片的 div 元素
|
||||
document.body.appendChild(div); // 将 div 元素添加到页面中
|
||||
|
||||
var viewer = new Viewer(div.firstChild); // 创建 Viewer 实例并传入图片元素
|
||||
viewer.show(); // 显示图片预览
|
||||
|
||||
// 在 Viewer 关闭后移除添加的 div 元素
|
||||
viewer.on('hidden', function () {
|
||||
document.body.removeChild(div);
|
||||
});
|
||||
|
||||
});
|
||||
$('.imgPreview').on('click', function () {
|
||||
// $('.imgPreview').hide()
|
||||
});
|
||||
}
|
||||
F.ready(function () {
|
||||
showImg();
|
||||
})
|
||||
</script>
|
||||
<script src="../../res/js/hook.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,12 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 集团服务器路径
|
||||
/// </summary>
|
||||
public string CNCECPath = BLL.Funs.CNCECPath;
|
||||
//public string CNCECPath = "https://qhse.cncecoa.com/QHSE/";
|
||||
|
||||
/// <summary>
|
||||
/// 定义集合
|
||||
/// </summary>
|
||||
|
|
@ -74,6 +80,27 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取整改前图片(放于Img中)
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertImageUrlByImage(object id)
|
||||
{
|
||||
string url = string.Empty;
|
||||
if (id != null)
|
||||
{
|
||||
var attachFile = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == id.ToString());
|
||||
|
||||
if (attachFile != null)
|
||||
{
|
||||
url = BLL.UploadAttachmentService.ShowImage(CNCECPath, attachFile.AttachUrl);
|
||||
}
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
|
|
@ -103,12 +130,19 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
jerqueSaveList();
|
||||
foreach (var item in CheckRectifyItems)
|
||||
{
|
||||
var newCheckNoticeItem = BLL.DCGLCheckNoticeItemService.GetCheckNoticeItemByCheckNoticeItemId(item.NoticeItemId);
|
||||
if (newCheckNoticeItem != null)
|
||||
{
|
||||
newCheckNoticeItem.Situation = item.Situation;
|
||||
BLL.DCGLCheckNoticeItemService.UpdateCheckNoticeItem(newCheckNoticeItem);
|
||||
}
|
||||
|
||||
var newCheckRectifyItem = BLL.DCGLCheckRectifyItemService.GetCheckRectifyItemByCheckRectifyItemId(item.CheckRectifyItemId);
|
||||
if (newCheckRectifyItem != null)
|
||||
{
|
||||
newCheckRectifyItem.RealEndDate = item.RealEndDate;
|
||||
newCheckRectifyItem.OrderEndPerson = item.OrderEndPerson;
|
||||
newCheckRectifyItem.Verification = item.Verification;
|
||||
//newCheckRectifyItem.Verification = item.Verification;
|
||||
BLL.DCGLCheckRectifyItemService.UpdateCheckRectifyItem(newCheckRectifyItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -121,6 +155,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
}
|
||||
if (type == BLL.Const.BtnSaveUp)
|
||||
{
|
||||
//string code = CNCECHSSEGetWebService.UpReportDCGlCheck_CheckRectify(newCheckRectify.CheckRectifyId, this.CurrUser);
|
||||
string code = CNCECHSSEGetWebService.UpDCGlCheck_CheckRectify(newCheckRectify.CheckRectifyId, this.CurrUser);
|
||||
if (code == "1")
|
||||
{
|
||||
|
|
@ -154,7 +189,8 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
{
|
||||
item.OrderEndPerson = values.Value<string>("OrderEndPerson").ToString();
|
||||
item.RealEndDate = Funs.GetNewDateTime(values.Value<string>("RealEndDate").ToString());
|
||||
item.Verification = values.Value<string>("Verification").ToString();
|
||||
//item.Verification = values.Value<string>("Verification").ToString();
|
||||
item.Situation = values.Value<string>("Situation").ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,6 +149,15 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label4;
|
||||
|
||||
/// <summary>
|
||||
/// lbImageUrl1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbImageUrl1;
|
||||
|
||||
/// <summary>
|
||||
/// txtOrderEndPerson 控件。
|
||||
/// </summary>
|
||||
|
|
@ -168,13 +177,13 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
protected global::FineUIPro.DatePicker txtRealEndDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtVerification 控件。
|
||||
/// txtSituation 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtVerification;
|
||||
protected global::FineUIPro.TextBox txtSituation;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
|
|
|
|||
|
|
@ -1858,6 +1858,7 @@
|
|||
<Content Include="res\css\company.css" />
|
||||
<Content Include="res\css\indextower.css" />
|
||||
<Content Include="res\css\swiper.min.css" />
|
||||
<Content Include="res\css\viewer.min.css" />
|
||||
<Content Include="res\DataInTable.js" />
|
||||
<Content Include="res\images\01.png" />
|
||||
<Content Include="res\images\02.png" />
|
||||
|
|
@ -1896,12 +1897,22 @@
|
|||
<Content Include="res\image\message.png" />
|
||||
<Content Include="res\index\images\logocenter.png" />
|
||||
<Content Include="res\js\crypto-js.min.js" />
|
||||
<Content Include="res\js\hook.js" />
|
||||
<Content Include="res\js\jquery-1.8.3.js" />
|
||||
<Content Include="res\js\jquery-3.3.1.min.js" />
|
||||
<Content Include="res\js\jquery-3.4.1.min.js" />
|
||||
<Content Include="res\js\jquery-ui-1.9.2.custom.js" />
|
||||
<Content Include="res\js\jquery-ui-1.9.2.custom.min.js" />
|
||||
<Content Include="res\js\jssip-3.7.0.min.js" />
|
||||
<Content Include="res\js\mix-webrtc-1.0.0.min.js" />
|
||||
<Content Include="res\js\mixrtc.min.js" />
|
||||
<Content Include="res\js\swiper-bundle.min.css" />
|
||||
<Content Include="res\js\swiper-bundle.min.js" />
|
||||
<Content Include="res\js\swiper.css" />
|
||||
<Content Include="res\js\swiper.js" />
|
||||
<Content Include="res\js\swiper.min.css" />
|
||||
<Content Include="res\js\swiper.min.js" />
|
||||
<Content Include="res\js\viewer.min.js" />
|
||||
<Content Include="res\largescreen\css\reset1.css" />
|
||||
<Content Include="res\largescreen\css\userPage.css" />
|
||||
<Content Include="res\largescreen\images\down.png" />
|
||||
|
|
@ -20196,7 +20207,7 @@
|
|||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
|
|
|||
|
|
@ -112,12 +112,13 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
|||
protected void SaveData()
|
||||
{
|
||||
var progressStatus = this.ddlProgressStatus.SelectedValue;
|
||||
var progress_detail = this.txtProgress_detail.Text.Trim();
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var model = new Model.GJSX_detail
|
||||
{
|
||||
GJSXID = this.GJSXID,
|
||||
//Cuid = this.GJSXDetailId,
|
||||
Progress_detail = this.txtProgress_detail.Text.Trim(),
|
||||
Progress_detail = progress_detail,
|
||||
ProgressStatus = progressStatus,
|
||||
Progress_user = this.CurrUser.UserId,
|
||||
Date = DateTime.Now,
|
||||
|
|
@ -150,6 +151,11 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
|||
}
|
||||
|
||||
db.SubmitChanges();
|
||||
if (progressStatus == "申请关闭")
|
||||
{
|
||||
//申请关闭邮件提醒:提出人和跟踪人
|
||||
GJSXMonitorService.GJSXApplyCloseNoticeSendEmail(this.GJSXID, progress_detail);
|
||||
}
|
||||
//ShowNotify("保存成功", MessageBoxIcon.Success);
|
||||
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using System.Web.UI;
|
|||
using System.Web.UI.WebControls;
|
||||
using static System.Runtime.CompilerServices.RuntimeHelpers;
|
||||
using System.Xml.Linq;
|
||||
using RestSharp.Extensions;
|
||||
|
||||
namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
|
|
@ -745,21 +746,61 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
|||
return;
|
||||
}
|
||||
|
||||
//跟踪人
|
||||
var DropUser_ReceiveID = this.DropUser_ReceiveID.SelectedValue;
|
||||
|
||||
string rNotice = this.rblNotice.SelectedValue;
|
||||
//勾选邮件即时通知责任人,先判断责任人是否已维护邮箱
|
||||
if (rNotice == "1")
|
||||
{
|
||||
if (!BLL.UserService.IsUserHaveEmail(DropUser_AcceptanceId))
|
||||
//if (!BLL.UserService.IsUserHaveEmail(this.CurrUser.UserId))
|
||||
//{
|
||||
// Alert.ShowInParent("请先给提出人维护邮箱!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//if (!BLL.UserService.IsUserHaveEmail(DropUser_AcceptanceId))
|
||||
//{
|
||||
// Alert.ShowInParent("请先给责任人维护邮箱!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//if (!BLL.UserService.IsUserHaveEmail(DropUser_ReceiveID))
|
||||
//{
|
||||
// Alert.ShowInParent("请先给跟踪人维护邮箱!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
List<string> verifyUser = new List<string>();
|
||||
verifyUser.Add(this.CurrUser.UserId);
|
||||
verifyUser.Add(DropUser_AcceptanceId);
|
||||
verifyUser.Add(DropUser_ReceiveID);
|
||||
if (!string.IsNullOrEmpty(drpCsUsers.Value))
|
||||
{
|
||||
Alert.ShowInParent("请先给责任人维护邮箱!", MessageBoxIcon.Warning);
|
||||
//抄送人
|
||||
var sendUserIds = string.Join(",", drpCsUsers.Values);
|
||||
var sendUserId = sendUserIds.Split(',');
|
||||
verifyUser.AddRange(sendUserId);
|
||||
}
|
||||
string verifyMsg = string.Empty;
|
||||
foreach (var verify in verifyUser)
|
||||
{
|
||||
string verUserName = string.Empty;
|
||||
if (!BLL.UserService.IsUserHaveEmail(verify, out verUserName))
|
||||
{
|
||||
verifyMsg = !string.IsNullOrWhiteSpace(verifyMsg) ? $"{verifyMsg}、{verUserName}" : verUserName;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(verifyMsg))
|
||||
{
|
||||
Alert.ShowInParent($"请先给{verifyMsg}维护邮箱!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
//List<string> userIds = new List<string>();
|
||||
//userIds.Add(DropUser_AcceptanceId);
|
||||
//userIds.AddRange(drpCsUsers.Values);
|
||||
string EditType = Request.Params["EditType"];
|
||||
|
||||
string ID = Request.Params["ID"];
|
||||
if (string.IsNullOrEmpty(ID))
|
||||
{
|
||||
|
|
@ -767,10 +808,11 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
|||
//勾选邮件即时通知责任人,邮箱通知提醒关键事项
|
||||
if (rNotice == "1")
|
||||
{
|
||||
if (BLL.UserService.IsUserHaveEmail(DropUser_AcceptanceId))
|
||||
{
|
||||
GJSXMonitorService.GJSXNoticeSendEmail(DropUser_AcceptanceId, this.txtGJSXID.Text.Trim());
|
||||
}
|
||||
GJSXMonitorService.GJSXNoticeSendEmail(this.txtGJSXID.Text.Trim());
|
||||
//if (BLL.UserService.IsUserHaveEmail(DropUser_AcceptanceId))
|
||||
//{
|
||||
// GJSXMonitorService.GJSXNoticeSendEmail(DropUser_AcceptanceId, this.txtGJSXID.Text.Trim());
|
||||
//}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -783,10 +825,11 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
|||
//勾选邮件即时通知责任人,邮箱通知提醒关键事项
|
||||
if (rNotice == "1")
|
||||
{
|
||||
if (BLL.UserService.IsUserHaveEmail(DropUser_AcceptanceId))
|
||||
{
|
||||
GJSXMonitorService.GJSXNoticeSendEmail(DropUser_AcceptanceId, this.txtGJSXID.Text.Trim());
|
||||
}
|
||||
GJSXMonitorService.GJSXNoticeSendEmail(this.txtGJSXID.Text.Trim());
|
||||
//if (BLL.UserService.IsUserHaveEmail(DropUser_AcceptanceId))
|
||||
//{
|
||||
// GJSXMonitorService.GJSXNoticeSendEmail(DropUser_AcceptanceId, this.txtGJSXID.Text.Trim());
|
||||
//}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -834,6 +877,12 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
|||
ProgressStatus = $"{(progressResult == "0" ? "同意" : "驳回")}申请",
|
||||
};
|
||||
GJSXItemService.AddGJSXMX(detail);
|
||||
|
||||
//事项申请关闭被驳回,邮箱提醒
|
||||
if (progressResult == "1")
|
||||
{
|
||||
GJSXMonitorService.GJSXDisallowApplyCloseNoticeSendEmail(detail.GJSXID, progressReason);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ using System.Web.UI;
|
|||
using System.Web.UI.WebControls;
|
||||
using Org.BouncyCastle.Ocsp;
|
||||
using FineUIPro.Web.HJGL.FL;
|
||||
using System.Data;
|
||||
|
||||
namespace FineUIPro.Web.common
|
||||
{
|
||||
|
|
@ -983,20 +984,48 @@ namespace FineUIPro.Web.common
|
|||
{
|
||||
int AllCount = 0;
|
||||
int MCount = 0;
|
||||
var getallin = new List<Model.PageDataPersonInOutItem>();
|
||||
if (pids == null)
|
||||
//var getallin = new List<Model.PageDataPersonInOutItem>();
|
||||
//if (pids == null)
|
||||
//{
|
||||
// getallin = APIPageDataService.getPersonNum(new List<string>(), DateTime.Now);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// getallin = APIPageDataService.getPersonNum(pids.ToList(), DateTime.Now);
|
||||
//}
|
||||
|
||||
|
||||
var startDate = DateTime.Now.Date;
|
||||
var endDate = startDate.AddDays(1);
|
||||
|
||||
string strSql = @"select ProjectId,PostType,COUNT(distinct PersonId)PersonNum from SitePerson_PersonInOutNow
|
||||
where ChangeTime >= '" + startDate.ToString("yyyy-MM-dd") + "' and ChangeTime <='" + endDate.ToString("yyyy-MM-dd") + "' and ProjectId in ('" + string.Join("','", allProjects.Select(x => x.ProjectId)) + @"')
|
||||
group by ProjectId,PostType";
|
||||
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, null);
|
||||
Dictionary<string, int> dic = new Dictionary<string, int>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
getallin = APIPageDataService.getPersonNum(new List<string>(), DateTime.Now);
|
||||
string projectid = row["ProjectId"].ToString();
|
||||
string postType = row["PostType"].ToString();
|
||||
int PersonNum = int.Parse(row["PersonNum"].ToString());
|
||||
if (!dic.ContainsKey(projectid))
|
||||
{
|
||||
dic.Add(projectid, PersonNum);
|
||||
}
|
||||
else
|
||||
{
|
||||
getallin = APIPageDataService.getPersonNum(pids.ToList(), DateTime.Now);
|
||||
dic[projectid] = dic[projectid] + PersonNum;
|
||||
}
|
||||
AllCount = getallin.Count();
|
||||
if (AllCount > 0)
|
||||
AllCount += PersonNum;
|
||||
if(postType == Const.PostType_1)
|
||||
{
|
||||
MCount = getallin.Count(x => x.PostType == Const.PostType_1);
|
||||
MCount += PersonNum;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
div_xcrs.InnerHtml = AllCount.ToString();
|
||||
div_zyxcrs.InnerHtml = (AllCount - MCount).ToString();
|
||||
|
|
@ -1006,7 +1035,14 @@ namespace FineUIPro.Web.common
|
|||
foreach (var item in allProjects)
|
||||
{
|
||||
ProjectPersonMc += "'" + item.ShortName + "',";
|
||||
ProjectPersonCount += "'" + getallin.Count(x => x.ProjectId == item.ProjectId) + "',";
|
||||
if (dic.ContainsKey(item.ProjectId))
|
||||
{
|
||||
ProjectPersonCount += "'" + dic[item.ProjectId] + "',";
|
||||
}
|
||||
else
|
||||
{
|
||||
ProjectPersonCount += "'0',";
|
||||
}
|
||||
}
|
||||
ProjectPersonMc = !string.IsNullOrWhiteSpace(ProjectPersonMc) ? ProjectPersonMc.TrimEnd(',') : string.Empty;
|
||||
ProjectPersonCount = !string.IsNullOrWhiteSpace(ProjectPersonCount) ? ProjectPersonCount.TrimEnd(',') : string.Empty;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
<script src="lib/flex.js"></script>
|
||||
<link rel="stylesheet" href="css/safetyproduction.css"/>
|
||||
<link rel="stylesheet" href="../res/assets/css/xfk.css"/>
|
||||
<script src="~/res/js/crypto-js.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
|
|
@ -452,8 +453,11 @@
|
|||
|
||||
} else if (type == 'Video') {
|
||||
var videoURL = '<%=VideoURL %>'
|
||||
window.open(videoURL + "#/screen", '_blank'); //视频监控
|
||||
|
||||
var username = 'admin'
|
||||
var password = '<%=PassWord %>';
|
||||
var sign = CryptoJS.AES.encrypt(username + "$" + password + "$" + Date.now(), "nbd").toString();
|
||||
sign = encodeURIComponent(sign);
|
||||
window.open(videoURL + "login.html?sign=" + sign, '_blank');
|
||||
|
||||
}
|
||||
else if (type == 'HighRiskWorkPermit') {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,28 @@ namespace FineUIPro.Web.common
|
|||
{
|
||||
public partial class main_new0 : PageBase
|
||||
{
|
||||
protected string VideoURL
|
||||
{
|
||||
get
|
||||
{
|
||||
return ConfigurationManager.AppSettings["Video_URL"] ;
|
||||
}
|
||||
}
|
||||
protected string PassWord
|
||||
{
|
||||
get
|
||||
{
|
||||
var sysSet17 = (from x in Funs.DB.Sys_Set where x.SetName == "视频监控密码" select x).ToList().FirstOrDefault();
|
||||
if (sysSet17 != null)
|
||||
{
|
||||
|
||||
return Funs.EncryptionPassword(sysSet17.SetValue);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static List<Model.Solution_LargerHazard> LargerHazard = new List<Model.Solution_LargerHazard>();
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -166,13 +188,7 @@ namespace FineUIPro.Web.common
|
|||
}
|
||||
}
|
||||
|
||||
protected string VideoURL
|
||||
{
|
||||
get
|
||||
{
|
||||
return ConfigurationManager.AppSettings["Video_URL"] + "#/screen";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region 加载项目信息
|
||||
protected void getProjectInfo()
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,6 @@
|
|||
_oldParam = jQuery.param;
|
||||
jQuery.param = function (x) {
|
||||
var t = _oldParam(x);
|
||||
t = t.replace('F_STATE=', 'F_STATE=__hook');
|
||||
return t;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2421
SGGL/Model/Model.cs
2421
SGGL/Model/Model.cs
File diff suppressed because it is too large
Load Diff
|
|
@ -44,6 +44,38 @@ namespace WebAPI.Controllers
|
|||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定日期的IDP系统项目设计图纸数据【调试数据用】
|
||||
/// </summary>
|
||||
/// <param name="dates"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData SynIDPDesignDrawingDataByDate([FromBody] List<string> dates)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
foreach (var date in dates)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(date))
|
||||
{
|
||||
//string date = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
|
||||
IDPDataService.GetIDPProjectDesignDrawingData("", date);
|
||||
}
|
||||
else
|
||||
{
|
||||
IDPDataService.GetIDPProjectDesignDrawingData();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.ToString();
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 每天夜间接收OA系统项目设计图纸数据
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ namespace WebAPI.Filter
|
|||
"HazardRegister*getHazardRegisterByProjectIdStates",
|
||||
"PMP*SynPMPProjectData",
|
||||
"IDP*SynIDPDesignDrawingData",
|
||||
"IDP*SynIDPDesignDrawingDataByDate",
|
||||
"IDP*SynIDPPreRunData",
|
||||
"IDP*SynOADesignDrawingDataBlueprintInfo",
|
||||
"IDP*SynOADesignDrawingDataPrintInfo",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<_PublishTargetUrl>G:\发布\五环WebApi</_PublishTargetUrl>
|
||||
<History>True|2025-09-16T11:11:12.4383069Z||;True|2025-09-02T11:14:00.9580707+08:00||;True|2025-09-02T10:52:20.0445598+08:00||;True|2025-08-29T17:56:01.6245615+08:00||;True|2025-08-29T17:55:41.2802685+08:00||;True|2025-08-09T21:27:40.2103961+08:00||;True|2025-08-06T15:31:52.1166645+08:00||;True|2025-08-04T18:56:13.9675910+08:00||;True|2025-07-23T11:12:18.0134770+08:00||;True|2025-07-23T10:36:09.9990536+08:00||;True|2025-07-23T10:35:51.8814789+08:00||;True|2025-07-21T17:46:45.4620710+08:00||;True|2025-07-21T17:40:43.9871097+08:00||;True|2025-07-21T17:29:11.9275869+08:00||;True|2025-07-21T17:05:21.7763763+08:00||;True|2025-07-18T17:55:59.4892329+08:00||;True|2025-07-18T11:08:56.2628896+08:00||;True|2025-07-18T10:53:44.2534260+08:00||;True|2025-07-18T10:27:52.6751668+08:00||;True|2025-07-18T10:03:09.1785776+08:00||;True|2025-07-18T10:02:38.1252107+08:00||;True|2025-07-17T18:19:07.5837609+08:00||;True|2025-07-17T15:40:11.9126705+08:00||;True|2025-07-11T17:54:03.0298703+08:00||;True|2025-07-11T16:19:50.3283029+08:00||;True|2025-07-11T15:49:22.5920473+08:00||;True|2025-07-02T14:39:27.0436873+08:00||;True|2025-07-02T11:18:29.1208369+08:00||;True|2025-07-01T15:52:16.6767496+08:00||;True|2025-07-01T10:14:59.0471052+08:00||;True|2025-06-28T11:40:36.0544739+08:00||;True|2025-06-27T15:10:24.4628086+08:00||;True|2025-06-27T10:31:14.8332810+08:00||;True|2025-06-27T10:13:13.3022394+08:00||;True|2025-06-26T23:51:04.1304509+08:00||;True|2025-06-26T23:34:06.4223762+08:00||;True|2025-06-26T22:42:08.9018138+08:00||;True|2025-06-26T22:16:01.8954571+08:00||;True|2025-06-26T21:19:42.2638204+08:00||;True|2025-06-25T23:22:39.7267591+08:00||;True|2025-06-25T23:19:33.2378458+08:00||;True|2025-06-25T22:18:16.2863303+08:00||;True|2025-06-25T22:10:29.2540175+08:00||;True|2025-06-25T22:00:58.5212166+08:00||;True|2025-06-25T22:00:31.2531214+08:00||;True|2025-06-25T18:33:01.5770030+08:00||;True|2025-06-25T17:47:33.7779622+08:00||;True|2025-06-25T17:40:26.9905954+08:00||;True|2025-06-20T11:24:58.4099232+08:00||;True|2025-06-19T16:42:45.2358810+08:00||;True|2025-06-16T19:28:10.6447738+08:00||;True|2025-06-12T11:00:02.3559090+08:00||;True|2025-06-12T10:40:29.0324520+08:00||;True|2025-06-04T23:24:01.0324973+08:00||;True|2025-06-04T18:39:41.7304136+08:00||;True|2025-06-04T11:23:17.3803405+08:00||;True|2025-06-04T11:04:32.4212196+08:00||;True|2025-05-26T19:19:09.7246357+08:00||;True|2025-05-26T19:16:39.1283077+08:00||;True|2025-05-26T19:09:24.1561616+08:00||;True|2025-04-07T16:11:44.5172315+08:00||;True|2025-04-02T18:10:22.8695984+08:00||;True|2025-04-02T17:59:51.2978116+08:00||;True|2025-04-02T17:50:55.8630437+08:00||;True|2025-04-02T17:49:22.5114405+08:00||;True|2025-04-02T17:47:11.0650205+08:00||;True|2025-04-02T17:39:09.8576853+08:00||;True|2025-04-02T17:38:15.3079030+08:00||;True|2025-04-02T17:22:03.6735964+08:00||;True|2025-04-02T17:19:04.4220913+08:00||;True|2025-04-02T17:17:14.0244636+08:00||;True|2025-04-02T17:11:09.6583011+08:00||;True|2025-04-02T17:07:23.6330597+08:00||;True|2025-04-02T16:58:45.4070649+08:00||;True|2025-04-02T16:50:20.5907511+08:00||;True|2025-04-02T16:44:18.5351224+08:00||;True|2025-04-02T16:31:11.1297141+08:00||;True|2025-04-02T16:18:43.1126995+08:00||;True|2025-04-02T14:50:42.5384021+08:00||;True|2025-04-01T10:53:08.9403414+08:00||;True|2025-04-01T10:52:08.7646389+08:00||;True|2025-04-01T09:52:56.3095742+08:00||;True|2025-03-13T16:44:25.3220313+08:00||;True|2025-03-13T15:31:10.3223071+08:00||;True|2025-03-13T10:58:17.1401575+08:00||;True|2025-01-23T23:10:37.9664637+08:00||;True|2024-09-24T09:51:10.8028974+08:00||;True|2024-09-20T17:30:59.6144803+08:00||;True|2024-09-20T15:28:40.2547949+08:00||;True|2024-09-19T16:30:51.3047517+08:00||;True|2024-09-19T15:53:23.2431713+08:00||;True|2024-09-19T15:48:55.0571748+08:00||;True|2024-09-19T15:06:29.5748482+08:00||;True|2024-09-19T14:55:42.1477578+08:00||;True|2024-09-19T10:07:53.8666329+08:00||;True|2024-09-03T16:26:17.4985546+08:00||;True|2024-07-17T10:29:15.9472548+08:00||;</History>
|
||||
<History>True|2025-09-23T08:44:57.4175593Z||;True|2025-09-23T16:44:35.0478492+08:00||;True|2025-09-23T16:06:50.5843534+08:00||;True|2025-09-22T20:54:35.9805610+08:00||;True|2025-09-22T20:45:58.7044128+08:00||;True|2025-09-22T20:40:46.7449595+08:00||;True|2025-09-22T15:14:22.9602725+08:00||;True|2025-09-22T15:08:27.5989706+08:00||;True|2025-09-22T14:54:19.5237685+08:00||;True|2025-09-18T09:53:17.9300539+08:00||;True|2025-09-16T19:11:12.4383069+08:00||;True|2025-09-02T11:14:00.9580707+08:00||;True|2025-09-02T10:52:20.0445598+08:00||;True|2025-08-29T17:56:01.6245615+08:00||;True|2025-08-29T17:55:41.2802685+08:00||;True|2025-08-09T21:27:40.2103961+08:00||;True|2025-08-06T15:31:52.1166645+08:00||;True|2025-08-04T18:56:13.9675910+08:00||;True|2025-07-23T11:12:18.0134770+08:00||;True|2025-07-23T10:36:09.9990536+08:00||;True|2025-07-23T10:35:51.8814789+08:00||;True|2025-07-21T17:46:45.4620710+08:00||;True|2025-07-21T17:40:43.9871097+08:00||;True|2025-07-21T17:29:11.9275869+08:00||;True|2025-07-21T17:05:21.7763763+08:00||;True|2025-07-18T17:55:59.4892329+08:00||;True|2025-07-18T11:08:56.2628896+08:00||;True|2025-07-18T10:53:44.2534260+08:00||;True|2025-07-18T10:27:52.6751668+08:00||;True|2025-07-18T10:03:09.1785776+08:00||;True|2025-07-18T10:02:38.1252107+08:00||;True|2025-07-17T18:19:07.5837609+08:00||;True|2025-07-17T15:40:11.9126705+08:00||;True|2025-07-11T17:54:03.0298703+08:00||;True|2025-07-11T16:19:50.3283029+08:00||;True|2025-07-11T15:49:22.5920473+08:00||;True|2025-07-02T14:39:27.0436873+08:00||;True|2025-07-02T11:18:29.1208369+08:00||;True|2025-07-01T15:52:16.6767496+08:00||;True|2025-07-01T10:14:59.0471052+08:00||;True|2025-06-28T11:40:36.0544739+08:00||;True|2025-06-27T15:10:24.4628086+08:00||;True|2025-06-27T10:31:14.8332810+08:00||;True|2025-06-27T10:13:13.3022394+08:00||;True|2025-06-26T23:51:04.1304509+08:00||;True|2025-06-26T23:34:06.4223762+08:00||;True|2025-06-26T22:42:08.9018138+08:00||;True|2025-06-26T22:16:01.8954571+08:00||;True|2025-06-26T21:19:42.2638204+08:00||;True|2025-06-25T23:22:39.7267591+08:00||;True|2025-06-25T23:19:33.2378458+08:00||;True|2025-06-25T22:18:16.2863303+08:00||;True|2025-06-25T22:10:29.2540175+08:00||;True|2025-06-25T22:00:58.5212166+08:00||;True|2025-06-25T22:00:31.2531214+08:00||;True|2025-06-25T18:33:01.5770030+08:00||;True|2025-06-25T17:47:33.7779622+08:00||;True|2025-06-25T17:40:26.9905954+08:00||;True|2025-06-20T11:24:58.4099232+08:00||;True|2025-06-19T16:42:45.2358810+08:00||;True|2025-06-16T19:28:10.6447738+08:00||;True|2025-06-12T11:00:02.3559090+08:00||;True|2025-06-12T10:40:29.0324520+08:00||;True|2025-06-04T23:24:01.0324973+08:00||;True|2025-06-04T18:39:41.7304136+08:00||;True|2025-06-04T11:23:17.3803405+08:00||;True|2025-06-04T11:04:32.4212196+08:00||;True|2025-05-26T19:19:09.7246357+08:00||;True|2025-05-26T19:16:39.1283077+08:00||;True|2025-05-26T19:09:24.1561616+08:00||;True|2025-04-07T16:11:44.5172315+08:00||;True|2025-04-02T18:10:22.8695984+08:00||;True|2025-04-02T17:59:51.2978116+08:00||;True|2025-04-02T17:50:55.8630437+08:00||;True|2025-04-02T17:49:22.5114405+08:00||;True|2025-04-02T17:47:11.0650205+08:00||;True|2025-04-02T17:39:09.8576853+08:00||;True|2025-04-02T17:38:15.3079030+08:00||;True|2025-04-02T17:22:03.6735964+08:00||;True|2025-04-02T17:19:04.4220913+08:00||;True|2025-04-02T17:17:14.0244636+08:00||;True|2025-04-02T17:11:09.6583011+08:00||;True|2025-04-02T17:07:23.6330597+08:00||;True|2025-04-02T16:58:45.4070649+08:00||;True|2025-04-02T16:50:20.5907511+08:00||;True|2025-04-02T16:44:18.5351224+08:00||;True|2025-04-02T16:31:11.1297141+08:00||;True|2025-04-02T16:18:43.1126995+08:00||;True|2025-04-02T14:50:42.5384021+08:00||;True|2025-04-01T10:53:08.9403414+08:00||;True|2025-04-01T10:52:08.7646389+08:00||;True|2025-04-01T09:52:56.3095742+08:00||;True|2025-03-13T16:44:25.3220313+08:00||;True|2025-03-13T15:31:10.3223071+08:00||;True|2025-03-13T10:58:17.1401575+08:00||;True|2025-01-23T23:10:37.9664637+08:00||;True|2024-09-24T09:51:10.8028974+08:00||;True|2024-09-20T17:30:59.6144803+08:00||;True|2024-09-20T15:28:40.2547949+08:00||;True|2024-09-19T16:30:51.3047517+08:00||;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
|
@ -86,22 +86,22 @@
|
|||
<publishTime>10/28/2024 14:02:50</publishTime>
|
||||
</File>
|
||||
<File Include="bin/App_global.asax.compiled">
|
||||
<publishTime>09/16/2025 19:11:11</publishTime>
|
||||
<publishTime>09/23/2025 16:44:55</publishTime>
|
||||
</File>
|
||||
<File Include="bin/App_global.asax.dll">
|
||||
<publishTime>09/16/2025 19:11:11</publishTime>
|
||||
<publishTime>09/23/2025 16:44:55</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Aspose.Words.dll">
|
||||
<publishTime>12/06/2024 20:13:58</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BLL.dll">
|
||||
<publishTime>09/16/2025 19:10:50</publishTime>
|
||||
<publishTime>09/23/2025 16:44:21</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BLL.dll.config">
|
||||
<publishTime>12/26/2024 09:46:52</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BLL.pdb">
|
||||
<publishTime>09/16/2025 19:10:50</publishTime>
|
||||
<publishTime>09/23/2025 16:44:21</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BouncyCastle.Crypto.dll">
|
||||
<publishTime>12/18/2020 05:32:28</publishTime>
|
||||
|
|
@ -128,10 +128,10 @@
|
|||
<publishTime>07/25/2012 19:48:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Model.dll">
|
||||
<publishTime>09/16/2025 19:10:44</publishTime>
|
||||
<publishTime>09/18/2025 09:52:47</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Model.pdb">
|
||||
<publishTime>09/16/2025 19:10:44</publishTime>
|
||||
<publishTime>09/18/2025 09:52:47</publishTime>
|
||||
</File>
|
||||
<File Include="bin/netstandard.dll">
|
||||
<publishTime>07/04/2024 14:13:01</publishTime>
|
||||
|
|
@ -389,13 +389,13 @@
|
|||
<publishTime>02/09/2013 00:42:28</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebAPI.dll">
|
||||
<publishTime>09/16/2025 19:10:53</publishTime>
|
||||
<publishTime>09/23/2025 16:44:45</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebAPI.pdb">
|
||||
<publishTime>09/16/2025 19:10:53</publishTime>
|
||||
<publishTime>09/23/2025 16:44:45</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebAPI.xml">
|
||||
<publishTime>09/16/2025 19:10:53</publishTime>
|
||||
<publishTime>09/23/2025 16:44:45</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebGrease.dll">
|
||||
<publishTime>01/23/2014 21:57:34</publishTime>
|
||||
|
|
@ -479,7 +479,7 @@
|
|||
<publishTime>10/28/2024 14:02:50</publishTime>
|
||||
</File>
|
||||
<File Include="PrecompiledApp.config">
|
||||
<publishTime>09/16/2025 19:10:54</publishTime>
|
||||
<publishTime>09/23/2025 16:44:46</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/bootstrap.js">
|
||||
<publishTime>10/28/2024 14:02:50</publishTime>
|
||||
|
|
|
|||
Loading…
Reference in New Issue