合并
This commit is contained in:
@@ -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);
|
||||
@@ -365,7 +371,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 从集团获取
|
||||
/// </summary>
|
||||
@@ -387,8 +393,9 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||
|
||||
|
||||
#region 获取
|
||||
|
||||
/// <summary>
|
||||
/// 获取
|
||||
/// 获取督查检查整改
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
@@ -397,7 +404,239 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
string unitId =BLL.Const.UnitId_SEDIN;
|
||||
string unitId = BLL.Const.UnitId_SEDIN;
|
||||
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_CheckRectifyListToSUBOld()
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
string unitId = BLL.Const.UnitId_SEDIN;
|
||||
string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/getDCGLCheckRectify?unitId=" + unitId;
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
Hashtable newToken = new Hashtable
|
||||
@@ -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 = CNCECHSSEWebService.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 控件。
|
||||
|
||||
@@ -3271,6 +3271,7 @@
|
||||
<Content Include="res\assets\js\swiper.min.js" />
|
||||
<Content Include="res\assets\js\video-7.15.0.min.js" />
|
||||
<Content Include="res\assets\js\world.js" />
|
||||
<Content Include="res\css\viewer.min.css" />
|
||||
<Content Include="res\DataInTable.js" />
|
||||
<Content Include="res\HJGL\InfoQuery\css\Chart.css" />
|
||||
<Content Include="res\images\idcard.png" />
|
||||
@@ -3363,7 +3364,10 @@
|
||||
<Content Include="res\indexv1\js\old\draw-circle.js" />
|
||||
<Content Include="res\indexv1\js\video-7.15.0.min.js" />
|
||||
<Content Include="res\indexv1\js\world.js" />
|
||||
<Content Include="res\js\hook.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\viewer.min.js" />
|
||||
<Content Include="res\ol\bd09.js" />
|
||||
<Content Include="res\ol\ol.css" />
|
||||
<Content Include="res\ol\ol.js" />
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
try
|
||||
{
|
||||
Funs.RootPath = Server.MapPath("~/");
|
||||
|
||||
Funs.AttachRootPath = ConfigurationManager.AppSettings["localRoot"];
|
||||
// 日志文件所在目录
|
||||
ErrLogInfo.DefaultErrLogFullPath = Server.MapPath("~/ErrLog.txt");
|
||||
Funs.ConnString = ConfigurationManager.AppSettings["ConnectionString"];
|
||||
|
||||
@@ -7,6 +7,12 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>排产计划</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.color1 {
|
||||
background:#ff0000;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -56,7 +62,7 @@
|
||||
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ProductionSchedulingPlanId"
|
||||
AllowSorting="true" SortField="FlowNum,Material,Caliber" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableTextSelection="True">
|
||||
EnableTextSelection="True" OnRowDataBound="Grid1_RowDataBound">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
||||
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
@@ -80,23 +86,23 @@
|
||||
DataField="Dain" SortField="Dain" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="总达因" ColumnID="TotalDyne"
|
||||
<f:RenderField HeaderText="总达因(按材质)" ColumnID="TotalDyne"
|
||||
DataField="TotalDyne" SortField="TotalDyne" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="总优先级" ColumnID="TotalPriority"
|
||||
<f:RenderField HeaderText="总达因(按材质)优先级" ColumnID="TotalPriority"
|
||||
DataField="TotalPriority" SortField="TotalPriority" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="100px">
|
||||
Width="190px">
|
||||
<Editor>
|
||||
<f:TextBox ID="txtTotalPriority" runat="server"></f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="优先级总达因" ColumnID="PriorityTotalDyne"
|
||||
<f:RenderField HeaderText="总达因" ColumnID="PriorityTotalDyne"
|
||||
DataField="PriorityTotalDyne" SortField="PriorityTotalDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="120px">
|
||||
<Editor>
|
||||
<%--<Editor>
|
||||
<f:NumberBox ID="txtPriorityTotalDyne" runat="server"></f:NumberBox>
|
||||
</Editor>
|
||||
</Editor>--%>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="计划开始时间" ColumnID="PlanStartDate"
|
||||
DataField="PlanStartDate" SortField="PlanStartDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left"
|
||||
@@ -119,7 +125,7 @@
|
||||
<f:NumberBox ID="txtDays" runat="server" NoDecimal="true" NoNegative="true" ></f:NumberBox>
|
||||
</Editor>--%>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="平均每天工作量" ColumnID="AvgDailyWorkload"
|
||||
<f:RenderField HeaderText="平均每日应完成工作量" ColumnID="AvgDailyWorkload"
|
||||
DataField="AvgDailyWorkload" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="140px">
|
||||
<Editor>
|
||||
@@ -129,9 +135,9 @@
|
||||
<f:RenderField HeaderText="当日已完成量" ColumnID="OnDayCompleteDyne"
|
||||
DataField="OnDayCompleteDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="120px">
|
||||
<Editor>
|
||||
<%--<Editor>
|
||||
<f:NumberBox ID="NumberBox1" runat="server" NoNegative="true"></f:NumberBox>
|
||||
</Editor>
|
||||
</Editor>--%>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="次日应完成量" ColumnID="NextDayCompleteDyne"
|
||||
DataField="NextDayCompleteDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
||||
@@ -196,7 +202,7 @@
|
||||
}
|
||||
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['FlowNum', 'Material', 'TotalDyne', 'TotalCompletedRate']);
|
||||
this.mergeColumns(['FlowNum', 'Material', 'TotalDyne','TotalPriority','PriorityTotalDyne', 'TotalCompletedRate']);
|
||||
}
|
||||
|
||||
//自动计算天数、平均每天工作量
|
||||
|
||||
@@ -223,10 +223,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
string projectId = this.CurrUser.LoginProjectId;
|
||||
if (tvControlItem.SelectedNode.CommandName == "流水段")
|
||||
{
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@projectId", projectId));
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNode.ParentNode.NodeID))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@unitWorkId", this.tvControlItem.SelectedNode.ParentNode.NodeID));
|
||||
@@ -252,7 +253,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
DataTable tb = SQLHelper.GetDataTableRunProc("Sp_ProductionSchedulingPlanStatistics", parameter);
|
||||
|
||||
//删除原有数据
|
||||
BLL.ProductionSchedulingPlanService.DeleteProductionSchedulingPlanByUnitWorkIdAndFlowNum(this.CurrUser.LoginProjectId,this.tvControlItem.SelectedNode.ParentNode.Text, this.tvControlItem.SelectedNode.Text);
|
||||
BLL.ProductionSchedulingPlanService.DeleteProductionSchedulingPlanByUnitWorkIdAndFlowNum(projectId, this.tvControlItem.SelectedNode.ParentNode.Text, this.tvControlItem.SelectedNode.Text);
|
||||
for (int i = 0; i < tb.Rows.Count; i++)
|
||||
{
|
||||
string unitWorkId = tb.Rows[i]["UnitWorkId"].ToString();//单位工程
|
||||
@@ -261,32 +262,52 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
string material = tb.Rows[i]["Material"].ToString();//材质Text
|
||||
string caliber = tb.Rows[i]["Caliber"].ToString();//寸径
|
||||
|
||||
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, flowingSection, unitWorkId, material, caliber);
|
||||
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(projectId, flowingSection, unitWorkId, material, caliber);
|
||||
if (plan == null)
|
||||
{
|
||||
Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan();
|
||||
newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan));
|
||||
newPlan.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newPlan.ProjectId = projectId;
|
||||
newPlan.PipelineId = unitWorkId;
|
||||
newPlan.FlowNum = flowingSection;
|
||||
newPlan.MainItemName = tb.Rows[i]["UnitWorkName"].ToString();
|
||||
newPlan.Material = material;
|
||||
newPlan.Caliber = caliber;
|
||||
newPlan.Dain = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber,"1");
|
||||
newPlan.TotalDyne = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection,"1");
|
||||
newPlan.CompletedCount = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber, "2");
|
||||
newPlan.Dain = BLL.WeldJointService.GetSizeSum(projectId, unitWorkId, flowingSection, steelType, caliber, "1");//达因数
|
||||
var dyne = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSectionAndMaterial(projectId, unitWorkId, flowingSection, steelType);//总达因(按材质)
|
||||
if (dyne != null)
|
||||
{
|
||||
newPlan.TotalDyne = dyne;
|
||||
}
|
||||
else
|
||||
{
|
||||
newPlan.TotalDyne = 0;
|
||||
}
|
||||
newPlan.PriorityTotalDyne = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(projectId, unitWorkId, flowingSection, "1");//总达因
|
||||
//当日已完成量
|
||||
var currentDay = BLL.WeldJointService.GetCurrentDaySizeSum(projectId, unitWorkId, flowingSection, steelType, caliber);
|
||||
if (currentDay != null)
|
||||
{
|
||||
newPlan.OnDayCompleteDyne = currentDay;
|
||||
}
|
||||
else
|
||||
{
|
||||
newPlan.OnDayCompleteDyne = 0;
|
||||
}
|
||||
|
||||
newPlan.CompletedCount = BLL.WeldJointService.GetSizeSum(projectId, unitWorkId, flowingSection, steelType, caliber, "2");//累计已完成量
|
||||
if (newPlan.Dain > 0)
|
||||
{
|
||||
newPlan.CompletedRate = (newPlan.CompletedCount / newPlan.Dain) * 100;
|
||||
newPlan.CompletedRate = (newPlan.CompletedCount / newPlan.Dain) * 100;//已完成百分比
|
||||
}
|
||||
else
|
||||
{
|
||||
newPlan.CompletedRate = 0;
|
||||
}
|
||||
if (newPlan.TotalDyne > 0)
|
||||
if (newPlan.PriorityTotalDyne > 0)
|
||||
{
|
||||
decimal? completeDinSum = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, "2");
|
||||
newPlan.TotalCompletedRate = (completeDinSum / newPlan.TotalDyne) * 100;
|
||||
decimal? completeDinSum = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(projectId, unitWorkId, flowingSection, "2");//完成总达因
|
||||
newPlan.TotalCompletedRate = (completeDinSum / newPlan.PriorityTotalDyne) * 100;//已完成百分比汇总
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -299,7 +320,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
else if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)//单位工程
|
||||
{
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@projectId", projectId));
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNode.NodeID))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@unitWorkId", this.tvControlItem.SelectedNode.NodeID));
|
||||
@@ -317,7 +338,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
DataTable tb = SQLHelper.GetDataTableRunProc("Sp_ProductionSchedulingPlanStatistics", parameter);
|
||||
|
||||
//删除原有数据
|
||||
BLL.ProductionSchedulingPlanService.DeleteProductionSchedulingPlanByUnitWork(this.CurrUser.LoginProjectId, this.tvControlItem.SelectedNode.Text);
|
||||
BLL.ProductionSchedulingPlanService.DeleteProductionSchedulingPlanByUnitWork(projectId, this.tvControlItem.SelectedNode.Text);
|
||||
for (int i = 0; i < tb.Rows.Count; i++)
|
||||
{
|
||||
string unitWorkId = tb.Rows[i]["UnitWorkId"].ToString();//单位工程
|
||||
@@ -325,32 +346,51 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
string steelType = tb.Rows[i]["SteelType"].ToString();//材质Value
|
||||
string material = tb.Rows[i]["Material"].ToString();//材质Text
|
||||
string caliber = tb.Rows[i]["Caliber"].ToString();//寸径
|
||||
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, flowingSection, unitWorkId, material, caliber);
|
||||
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(projectId, flowingSection, unitWorkId, material, caliber);
|
||||
if (plan == null)
|
||||
{
|
||||
Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan();
|
||||
newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan));
|
||||
newPlan.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newPlan.ProjectId = projectId;
|
||||
newPlan.PipelineId = unitWorkId;
|
||||
newPlan.FlowNum = flowingSection;
|
||||
newPlan.MainItemName = tb.Rows[i]["UnitWorkName"].ToString();
|
||||
newPlan.Material = material;
|
||||
newPlan.Caliber = caliber;
|
||||
newPlan.Dain = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber, "1");
|
||||
newPlan.TotalDyne = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, "1");
|
||||
newPlan.CompletedCount = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber, "2");
|
||||
newPlan.Dain = BLL.WeldJointService.GetSizeSum(projectId, unitWorkId, flowingSection, steelType, caliber, "1");//达因数
|
||||
var dyne = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSectionAndMaterial(projectId, unitWorkId, flowingSection, steelType);//总达因(按材质)
|
||||
if (dyne != null)
|
||||
{
|
||||
newPlan.TotalDyne = dyne;
|
||||
}
|
||||
else
|
||||
{
|
||||
newPlan.TotalDyne = 0;
|
||||
}
|
||||
newPlan.PriorityTotalDyne = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(projectId, unitWorkId, flowingSection, "1");//总达因
|
||||
//当日已完成量
|
||||
var currentDay = BLL.WeldJointService.GetCurrentDaySizeSum(projectId, unitWorkId, flowingSection, steelType, caliber);
|
||||
if (currentDay != null)
|
||||
{
|
||||
newPlan.OnDayCompleteDyne = currentDay;
|
||||
}
|
||||
else
|
||||
{
|
||||
newPlan.OnDayCompleteDyne = 0;
|
||||
}
|
||||
newPlan.CompletedCount = BLL.WeldJointService.GetSizeSum(projectId, unitWorkId, flowingSection, steelType, caliber, "2");//累计已完成量
|
||||
if (newPlan.Dain > 0)
|
||||
{
|
||||
newPlan.CompletedRate = (newPlan.CompletedCount / newPlan.Dain) * 100;
|
||||
newPlan.CompletedRate = (newPlan.CompletedCount / newPlan.Dain) * 100;//已完成百分比
|
||||
}
|
||||
else
|
||||
{
|
||||
newPlan.CompletedRate = 0;
|
||||
}
|
||||
if (newPlan.TotalDyne > 0)
|
||||
if (newPlan.PriorityTotalDyne > 0)
|
||||
{
|
||||
decimal? completeDinSum = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, "2");
|
||||
newPlan.TotalCompletedRate = (completeDinSum / newPlan.TotalDyne) * 100;
|
||||
decimal? completeDinSum = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(projectId, unitWorkId, flowingSection, "2");//完成总达因
|
||||
newPlan.TotalCompletedRate = (completeDinSum / newPlan.PriorityTotalDyne) * 100;//已完成百分比汇总
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -623,9 +663,21 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle.WrapText = true;//自动换行
|
||||
|
||||
NPOI.SS.UserModel.ICellStyle style11 = workbook.CreateCellStyle();
|
||||
style11.DataFormat = NPOI.HSSF.UserModel.HSSFDataFormat.GetBuiltinFormat("0.00");//数字格式
|
||||
style11.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
style11.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
style11.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
style11.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
style11.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Right;
|
||||
style11.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
style11.WrapText = true;//自动换行
|
||||
|
||||
var font = workbook.CreateFont();
|
||||
font.FontHeightInPoints = 11;
|
||||
cellStyle.SetFont(font);
|
||||
|
||||
// 第二步:创建新数据行
|
||||
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
|
||||
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
|
||||
@@ -653,20 +705,23 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
cell.SetCellValue(item.Caliber);//口径
|
||||
|
||||
cell = row.CreateCell(4);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Dain.HasValue ? item.Dain.ToString() : "");//达因数
|
||||
//cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Dain.HasValue ? Convert.ToDouble(item.Dain) : 0);//达因数
|
||||
cell.CellStyle = style11;
|
||||
|
||||
cell = row.CreateCell(5);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.TotalDyne.HasValue ? item.TotalDyne.ToString() : "");//总达因数
|
||||
//cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.TotalDyne.HasValue ? Convert.ToDouble(item.TotalDyne) : 0);//总达因数
|
||||
cell.CellStyle = style11;
|
||||
|
||||
cell = row.CreateCell(6);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.TotalPriority);//总优先级
|
||||
|
||||
cell = row.CreateCell(7);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.PriorityTotalDyne.HasValue ? item.PriorityTotalDyne.ToString() : "");//优先级总达因
|
||||
//cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.PriorityTotalDyne.HasValue ? Convert.ToDouble(item.PriorityTotalDyne) : 0);//优先级总达因
|
||||
cell.CellStyle = style11;
|
||||
|
||||
cell = row.CreateCell(8);
|
||||
cell.CellStyle = cellStyle;
|
||||
@@ -681,21 +736,25 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
cell.SetCellValue(item.Days.HasValue ? item.Days.ToString() : "");//天数
|
||||
|
||||
cell = row.CreateCell(11);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.AvgDailyWorkload.HasValue ? item.AvgDailyWorkload.ToString() : "");//平均每天工作量
|
||||
//cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.AvgDailyWorkload.HasValue ? Convert.ToDouble(item.AvgDailyWorkload.ToString()) : 0);//平均每天工作量
|
||||
cell.CellStyle = style11;
|
||||
|
||||
cell = row.CreateCell(12);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.OnDayCompleteDyne.HasValue ? item.OnDayCompleteDyne.ToString() : "");//当日已完成量
|
||||
//cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.OnDayCompleteDyne.HasValue ? Convert.ToDouble(item.OnDayCompleteDyne.ToString()) : 0);//当日已完成量
|
||||
cell.CellStyle = style11;
|
||||
|
||||
cell = row.CreateCell(13);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.NextDayCompleteDyne.HasValue ? item.NextDayCompleteDyne.ToString() : "");//次日应完成量
|
||||
//cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.NextDayCompleteDyne.HasValue ? Convert.ToDouble(item.NextDayCompleteDyne.ToString()) : 0);//次日应完成量
|
||||
cell.CellStyle = style11;
|
||||
|
||||
cell = row.CreateCell(14);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.CompletedCount.HasValue ? item.CompletedCount.ToString() : "");//累计已完成量
|
||||
|
||||
//cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.CompletedCount.HasValue ? Convert.ToDouble(item.CompletedCount.ToString()) : 0);//累计已完成量
|
||||
cell.CellStyle = style11;
|
||||
|
||||
cell = row.CreateCell(15);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.CompletedRate.HasValue ? item.CompletedRate.ToString() : "");//已完成百分比
|
||||
@@ -828,5 +887,31 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Grid行绑定事件
|
||||
/// <summary>
|
||||
/// 次日应完成量高于平均每日应完成工作量发出预警,预警要统一着色显示红色
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
|
||||
{
|
||||
DataRowView row = e.DataItem as DataRowView;
|
||||
double avgDailyWorkload = 0;
|
||||
double nextDayCompleteDyne = 0;
|
||||
if (row["AvgDailyWorkload"] != null && !string.IsNullOrEmpty(row["AvgDailyWorkload"].ToString()))
|
||||
{
|
||||
avgDailyWorkload = Convert.ToDouble(row["AvgDailyWorkload"]);
|
||||
}
|
||||
if (row["NextDayCompleteDyne"] != null && !string.IsNullOrEmpty(row["NextDayCompleteDyne"].ToString()))
|
||||
{
|
||||
nextDayCompleteDyne = Convert.ToDouble(row["NextDayCompleteDyne"]);
|
||||
}
|
||||
if (avgDailyWorkload < nextDayCompleteDyne)
|
||||
{
|
||||
e.RowCssClass = "color1";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -147,15 +147,6 @@ namespace FineUIPro.Web.HJGL.PreDesign {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTotalPriority;
|
||||
|
||||
/// <summary>
|
||||
/// txtPriorityTotalDyne 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtPriorityTotalDyne;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlanStartDate 控件。
|
||||
/// </summary>
|
||||
@@ -183,15 +174,6 @@ namespace FineUIPro.Web.HJGL.PreDesign {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtAvgDailyWorkload;
|
||||
|
||||
/// <summary>
|
||||
/// NumberBox1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox NumberBox1;
|
||||
|
||||
/// <summary>
|
||||
/// NumberBox2 控件。
|
||||
/// </summary>
|
||||
|
||||
+9
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
+10
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user