督查检查整改优化
This commit is contained in:
parent
5af1eb5ab2
commit
f3db5bfdab
|
@ -396,7 +396,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||||
JArray arr = JArray.Parse(data);
|
JArray arr = JArray.Parse(data);
|
||||||
if (arr.Count() > 0)
|
if (arr.Count() > 0)
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
List<string> ids = new List<string>();
|
List<string> ids = new List<string>();
|
||||||
foreach (var item in arr)
|
foreach (var item in arr)
|
||||||
|
|
|
@ -13,10 +13,12 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||||
{
|
{
|
||||||
public partial class CheckRectify : PageBase
|
public partial class CheckRectify : PageBase
|
||||||
{
|
{
|
||||||
|
private static string proType;
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
proType = Request.Params["proType"] ?? string.Empty;
|
||||||
this.GetButtonPower();
|
this.GetButtonPower();
|
||||||
//btnNew.OnClientClick = Window1.GetShowReference("CheckRectifyEdit.aspx") + "return false;";
|
//btnNew.OnClientClick = Window1.GetShowReference("CheckRectifyEdit.aspx") + "return false;";
|
||||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
|
@ -30,15 +32,19 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void BindGrid()
|
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[] { };
|
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,"
|
DataTable tb = SQLHelper.GetDataTableRunText(sb.ToString(), parameter);
|
||||||
+ @" 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);
|
|
||||||
|
|
||||||
// 2.获取当前分页数据
|
// 2.获取当前分页数据
|
||||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||||
|
@ -387,8 +393,9 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||||
|
|
||||||
|
|
||||||
#region 获取
|
#region 获取
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取
|
/// 获取督查检查整改
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type"></param>
|
/// <param name="type"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
@ -397,7 +404,239 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||||
var responeData = new Model.ResponeData();
|
var responeData = new Model.ResponeData();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string unitId =CommonService.GetThisUnitId();
|
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.SUBQHSEDB db = new Model.SUBQHSEDB(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_CheckRectifyListToSUBOld()
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string unitId = CommonService.GetThisUnitId();
|
||||||
string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/getDCGLCheckRectify?unitId=" + unitId;
|
string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/getDCGLCheckRectify?unitId=" + unitId;
|
||||||
string contenttype = "application/json;charset=unicode";
|
string contenttype = "application/json;charset=unicode";
|
||||||
Hashtable newToken = new Hashtable
|
Hashtable newToken = new Hashtable
|
||||||
|
@ -416,7 +655,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||||
JArray getData = JArray.Parse(obj["data"].ToString());
|
JArray getData = JArray.Parse(obj["data"].ToString());
|
||||||
if (getData.Count() > 0)
|
if (getData.Count() > 0)
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
List<string> ids = new List<string>();
|
List<string> ids = new List<string>();
|
||||||
foreach (var item in getData)
|
foreach (var item in getData)
|
||||||
|
@ -591,6 +830,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||||
CheckRectifyId = getCheckRectifyId,
|
CheckRectifyId = getCheckRectifyId,
|
||||||
NoticeItemId = getNoticeItemId,
|
NoticeItemId = getNoticeItemId,
|
||||||
ConfirmMan = item["ConfirmMan"].ToString(),
|
ConfirmMan = item["ConfirmMan"].ToString(),
|
||||||
|
ConfirmManName = item["ConfirmManName"].ToString(),
|
||||||
ConfirmDate = Funs.GetNewDateTime(item["ConfirmDate"].ToString()),
|
ConfirmDate = Funs.GetNewDateTime(item["ConfirmDate"].ToString()),
|
||||||
OrderEndDate = Funs.GetNewDateTime(item["OrderEndDate"].ToString()),
|
OrderEndDate = Funs.GetNewDateTime(item["OrderEndDate"].ToString()),
|
||||||
OrderEndPerson = item["OrderEndPerson"].ToString(),
|
OrderEndPerson = item["OrderEndPerson"].ToString(),
|
||||||
|
|
|
@ -6,11 +6,36 @@
|
||||||
<head runat="server">
|
<head runat="server">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<title>隐患整改单</title>
|
<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">
|
<style type="text/css">
|
||||||
.f-grid-row .f-grid-cell-inner {
|
.f-grid-row .f-grid-cell-inner {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
word-break: break-all;
|
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>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -57,7 +82,7 @@
|
||||||
<f:FormRow>
|
<f:FormRow>
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
<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">
|
ClicksToEdit="1" DataIDField="CheckRectifyItemId" EnableColumnLines="true">
|
||||||
<Columns>
|
<Columns>
|
||||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="45px" HeaderTextAlign="Center" TextAlign="Center" />
|
<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>
|
<asp:Label ID="Label4" runat="server" Text='<%# Bind("RiskExists") %>' ToolTip='<%#Bind("RiskExists") %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</f:TemplateField>
|
</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"
|
ToolTip="相关照片附件" DataIFrameUrlFields="NoticeItemId" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Check&type=-1"
|
||||||
Title="相关照片" ColumnID="WindowAtt">
|
Title="相关照片" ColumnID="WindowAtt">
|
||||||
</f:WindowField>
|
</f:WindowField>--%>
|
||||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" HeaderText="整改后" Text="相关照片"
|
<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"
|
ToolTip="相关照片附件" DataIFrameUrlFields="CheckRectifyItemId" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Check&menuId=2E4A3E58-44B7-41B0-BFE3-634DF29AAE27"
|
||||||
Title="相关照片" ColumnID="WindowAtt1">
|
Title="相关照片" ColumnID="WindowAtt1">
|
||||||
|
@ -108,12 +139,19 @@
|
||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
</Editor>
|
</Editor>
|
||||||
</f:RenderField>
|
</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="验证人">
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="验证人">
|
||||||
<Editor>
|
<Editor>
|
||||||
<f:TextBox ID="txtVerification" Text='<%# Eval("Verification")%>' MaxLength="50" runat="server">
|
<f:TextBox ID="txtVerification" Text='<%# Eval("Verification")%>' MaxLength="50" runat="server">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
</Editor>
|
</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>
|
||||||
<f:RenderField Width="1px" ColumnID="CheckRectifyItemId" DataField="CheckRectifyItemId"
|
<f:RenderField Width="1px" ColumnID="CheckRectifyItemId" DataField="CheckRectifyItemId"
|
||||||
FieldType="String" HeaderText="主键" Hidden="true" HeaderTextAlign="Center">
|
FieldType="String" HeaderText="主键" Hidden="true" HeaderTextAlign="Center">
|
||||||
|
@ -143,5 +181,43 @@
|
||||||
IsModal="true" Width="800px" Height="500px">
|
IsModal="true" Width="800px" Height="500px">
|
||||||
</f:Window>
|
</f:Window>
|
||||||
</form>
|
</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>
|
</body>
|
||||||
</html>
|
</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>
|
||||||
/// 定义集合
|
/// 定义集合
|
||||||
/// </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>
|
||||||
/// 保存按钮
|
/// 保存按钮
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -103,12 +130,19 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||||
jerqueSaveList();
|
jerqueSaveList();
|
||||||
foreach (var item in CheckRectifyItems)
|
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);
|
var newCheckRectifyItem = BLL.DCGLCheckRectifyItemService.GetCheckRectifyItemByCheckRectifyItemId(item.CheckRectifyItemId);
|
||||||
if (newCheckRectifyItem != null)
|
if (newCheckRectifyItem != null)
|
||||||
{
|
{
|
||||||
newCheckRectifyItem.RealEndDate = item.RealEndDate;
|
newCheckRectifyItem.RealEndDate = item.RealEndDate;
|
||||||
newCheckRectifyItem.OrderEndPerson = item.OrderEndPerson;
|
newCheckRectifyItem.OrderEndPerson = item.OrderEndPerson;
|
||||||
newCheckRectifyItem.Verification = item.Verification;
|
//newCheckRectifyItem.Verification = item.Verification;
|
||||||
BLL.DCGLCheckRectifyItemService.UpdateCheckRectifyItem(newCheckRectifyItem);
|
BLL.DCGLCheckRectifyItemService.UpdateCheckRectifyItem(newCheckRectifyItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,6 +155,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||||
}
|
}
|
||||||
if (type == BLL.Const.BtnSaveUp)
|
if (type == BLL.Const.BtnSaveUp)
|
||||||
{
|
{
|
||||||
|
//string code = CNCECHSSEGetWebService.UpReportDCGlCheck_CheckRectify(newCheckRectify.CheckRectifyId, this.CurrUser);
|
||||||
string code = CNCECHSSEGetWebService.UpDCGlCheck_CheckRectify(newCheckRectify.CheckRectifyId, this.CurrUser);
|
string code = CNCECHSSEGetWebService.UpDCGlCheck_CheckRectify(newCheckRectify.CheckRectifyId, this.CurrUser);
|
||||||
if (code == "1")
|
if (code == "1")
|
||||||
{
|
{
|
||||||
|
@ -154,7 +189,8 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||||
{
|
{
|
||||||
item.OrderEndPerson = values.Value<string>("OrderEndPerson").ToString();
|
item.OrderEndPerson = values.Value<string>("OrderEndPerson").ToString();
|
||||||
item.RealEndDate = Funs.GetNewDateTime(values.Value<string>("RealEndDate").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>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Label Label4;
|
protected global::System.Web.UI.WebControls.Label Label4;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lbImageUrl1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label lbImageUrl1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtOrderEndPerson 控件。
|
/// txtOrderEndPerson 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -168,13 +177,13 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||||
protected global::FineUIPro.DatePicker txtRealEndDate;
|
protected global::FineUIPro.DatePicker txtRealEndDate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtVerification 控件。
|
/// txtSituation 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtVerification;
|
protected global::FineUIPro.TextBox txtSituation;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Toolbar1 控件。
|
/// Toolbar1 控件。
|
||||||
|
|
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
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||||
<UseIISExpress>true</UseIISExpress>
|
<UseIISExpress>true</UseIISExpress>
|
||||||
<Use64BitIISExpress />
|
<Use64BitIISExpress />
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
|
|
Loading…
Reference in New Issue