This commit is contained in:
2024-05-16 10:17:34 +08:00
parent d17354f244
commit 145844fbed
21 changed files with 551 additions and 294 deletions
@@ -204,17 +204,18 @@ namespace FineUIPro.Web.Evaluation
userList.Add(userRepresentative.First());
}
var ctk = from x in Funs.DB.Sys_User
join z in Funs.DB.Base_Depart on x.DepartId equals z.DepartId
where z.DepartCode == "CT/K" && x.Email != null && x.Email != ""
select x;
if (ctk.Count() > 0)
{
foreach (var c in ctk)
{
userList.Add(c);
}
}
// CT/K部门去掉
//var ctk = from x in Funs.DB.Sys_User
// join z in Funs.DB.Base_Depart on x.DepartId equals z.DepartId
// where z.DepartCode == "CT/K" && x.Email != null && x.Email != ""
// select x;
//if (ctk.Count() > 0)
//{
// foreach (var c in ctk)
// {
// userList.Add(c);
// }
//}
var ctss = from x in Funs.DB.Sys_User
join y in Funs.DB.Sys_Role on x.RoleId equals y.RoleId
@@ -744,7 +745,7 @@ namespace FineUIPro.Web.Evaluation
if (eva.IsOthers == true)
{
reportModel.GetRow(46).GetCell(1).SetCellValue(eva.OthersNum != null ? eva.OthersNum.Value.ToString() : "0");
reportModel.GetRow(46).GetCell(1).SetCellValue(eva.OtherDef);
reportModel.GetRow(45).GetCell(2).SetCellValue(txtNo);
reportModel.GetRow(45).GetCell(2).CellStyle.SetFont(content_Font);
}
@@ -250,7 +250,8 @@
<f:Listener Event="change" Handler="onCheckBoxListChange" />
</Listeners>
</f:CheckBoxList>
<f:NumberBox ID="numOthers" runat="server" Label="次数Times" NoDecimal="true" NoNegative="true"></f:NumberBox>
<f:TextBox ID="txtOtherDef" runat="server" Label="描述"></f:TextBox>
<%-- <f:NumberBox ID="numOthers" runat="server" Label="次数Times" NoDecimal="true" NoNegative="true"></f:NumberBox>--%>
</Items>
</f:FormRow>
</Rows>
@@ -43,7 +43,8 @@ namespace FineUIPro.Web.Evaluation
//cbBoQIsAudit.Enabled = false;
//txtBoQ.Enabled = false;
cbIsOthers.Enabled = false;
numOthers.Enabled = false;
txtOtherDef.Enabled = false;
//numOthers.Enabled = false;
txtProposed.Enabled = false;
txtTechnicalBonus.Enabled = false;
@@ -79,7 +80,8 @@ namespace FineUIPro.Web.Evaluation
txtForecasted.Enabled = true;
txtTechnicalBonus.Enabled = true;
cbIsOthers.Enabled = true;
numOthers.Enabled = true;
//numOthers.Enabled = true;
txtOtherDef.Enabled= true;
txtProposed.Enabled = true;
btnSave.Hidden = false;
}
@@ -191,11 +193,11 @@ namespace FineUIPro.Web.Evaluation
cbIsOthers.SelectedValueArray = new string[] { "False" };
}
}
if (foview.First().OthersNum.HasValue)
{
numOthers.Text = foview.First().OthersNum.ToString();
}
//if (foview.First().OthersNum.HasValue)
//{
// numOthers.Text = foview.First().OthersNum.ToString();
//}
txtOtherDef.Text = foview.First().OtherDef;
txtTechnicalBonus.Text = foview.First().TechnicalBonus;
txtSafetyBonus.Text = foview.First().SafetyBonus;
txtProposed.Text = foview.First().Proposed;
@@ -346,11 +348,11 @@ namespace FineUIPro.Web.Evaluation
return;
}
if (!string.IsNullOrEmpty(numOthers.Text))
{
newFo.OthersNum = Convert.ToInt32(numOthers.Text);
}
//if (!string.IsNullOrEmpty(numOthers.Text))
//{
// newFo.OthersNum = Convert.ToInt32(numOthers.Text);
//}
newFo.OtherDef=txtOtherDef.Text.Trim();
newFo.TechnicalBonus = txtTechnicalBonus.Text.Trim();
var role = BLL.Sys_RoleService.GetRole(CurrUser.RoleId);
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Evaluation {
public partial class ContractorEvaluationEdit {
namespace FineUIPro.Web.Evaluation
{
public partial class ContractorEvaluationEdit
{
/// <summary>
/// _form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm _form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// GroupPanel1 控件。
/// </summary>
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupPanel GroupPanel1;
/// <summary>
/// Form2 控件。
/// </summary>
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// txtFo 控件。
/// </summary>
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtFo;
/// <summary>
/// txtValidate_Date 控件。
/// </summary>
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtValidate_Date;
/// <summary>
/// txtExpire_Date 控件。
/// </summary>
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtExpire_Date;
/// <summary>
/// txtDiscipline 控件。
/// </summary>
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDiscipline;
/// <summary>
/// txtApplicable_Area 控件。
/// </summary>
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtApplicable_Area;
/// <summary>
/// txtYearDiff 控件。
/// </summary>
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField txtYearDiff;
/// <summary>
/// txtContractor 控件。
/// </summary>
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtContractor;
/// <summary>
/// txtPercentage 控件。
/// </summary>
@@ -128,7 +130,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPercentage;
/// <summary>
/// txtSpending_commitment 控件。
/// </summary>
@@ -137,7 +139,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSpending_commitment;
/// <summary>
/// txtForecasted 控件。
/// </summary>
@@ -146,7 +148,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtForecasted;
/// <summary>
/// txtTotal 控件。
/// </summary>
@@ -155,7 +157,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTotal;
/// <summary>
/// txtYearAvg 控件。
/// </summary>
@@ -164,7 +166,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtYearAvg;
/// <summary>
/// gpMonthEva 控件。
/// </summary>
@@ -173,7 +175,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupPanel gpMonthEva;
/// <summary>
/// Panel8 控件。
/// </summary>
@@ -182,7 +184,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel8;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -191,7 +193,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// GroupPanel3 控件。
/// </summary>
@@ -200,7 +202,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupPanel GroupPanel3;
/// <summary>
/// txtReviewOfFC 控件。
/// </summary>
@@ -209,7 +211,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtReviewOfFC;
/// <summary>
/// lbPriceEvaluation 控件。
/// </summary>
@@ -218,7 +220,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbPriceEvaluation;
/// <summary>
/// txtPriceEvaluation1 控件。
/// </summary>
@@ -227,7 +229,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPriceEvaluation1;
/// <summary>
/// txtPriceEvaluation2 控件。
/// </summary>
@@ -236,7 +238,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPriceEvaluation2;
/// <summary>
/// cbPriceLevel 控件。
/// </summary>
@@ -245,7 +247,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList cbPriceLevel;
/// <summary>
/// txtEnumeration 控件。
/// </summary>
@@ -254,7 +256,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtEnumeration;
/// <summary>
/// GroupPanel2 控件。
/// </summary>
@@ -263,7 +265,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupPanel GroupPanel2;
/// <summary>
/// cbInquiry 控件。
/// </summary>
@@ -272,7 +274,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList cbInquiry;
/// <summary>
/// numInquiryTime 控件。
/// </summary>
@@ -281,7 +283,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox numInquiryTime;
/// <summary>
/// cbNCR 控件。
/// </summary>
@@ -290,7 +292,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList cbNCR;
/// <summary>
/// numNCRTime 控件。
/// </summary>
@@ -299,7 +301,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox numNCRTime;
/// <summary>
/// cbAuditResult 控件。
/// </summary>
@@ -308,7 +310,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList cbAuditResult;
/// <summary>
/// GroupPanel5 控件。
/// </summary>
@@ -317,7 +319,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupPanel GroupPanel5;
/// <summary>
/// txtSafetyBonus 控件。
/// </summary>
@@ -326,7 +328,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSafetyBonus;
/// <summary>
/// GroupPanel6 控件。
/// </summary>
@@ -335,7 +337,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupPanel GroupPanel6;
/// <summary>
/// cbIsOthers 控件。
/// </summary>
@@ -344,16 +346,16 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList cbIsOthers;
/// <summary>
/// numOthers 控件。
/// txtOtherDef 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox numOthers;
protected global::FineUIPro.TextBox txtOtherDef;
/// <summary>
/// txtTechnicalBonus 控件。
/// </summary>
@@ -362,7 +364,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTechnicalBonus;
/// <summary>
/// txtProposed 控件。
/// </summary>
@@ -371,7 +373,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtProposed;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -380,7 +382,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnSave 控件。
/// </summary>
@@ -389,7 +391,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
@@ -1838,7 +1838,7 @@ namespace FineUIPro.Web.Evaluation
int conListCount = conList.Count();
int overviewCount = OverviewReport.Count;
int safeOverviewCount = safeOverviewReport.Count;
int totalNum = punishCount * 2 + cmListCount + conListCount + overviewCount + safeOverviewCount + noEvaluatedUser.Count;
int totalNum = punishCount + cmListCount + conListCount + overviewCount + safeOverviewCount + noEvaluatedUser.Count;
#region
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
//模板文件
@@ -1980,81 +1980,81 @@ namespace FineUIPro.Web.Evaluation
}
#endregion
#region punish_C4
XSSFSheet ws4 = (XSSFSheet)hssfworkbook.GetSheet("违规及处理办法C4");
if (punishCount > 0)
{
var rowIndex = 1;
foreach (var p in punishList)
{
if (ws4.GetRow(rowIndex) == null) ws4.CreateRow(rowIndex);
if (ws4.GetRow(rowIndex).GetCell(0) == null) ws4.GetRow(rowIndex).CreateCell(0);
if (ws4.GetRow(rowIndex).GetCell(1) == null) ws4.GetRow(rowIndex).CreateCell(1);
if (p.PunishDate != null)
{
ws4.GetRow(rowIndex).GetCell(0).SetCellValue(p.PunishDate.Value.ToString("yyyy/MM/dd"));
ws4.GetRow(rowIndex).GetCell(1).SetCellValue(p.PunishDate.Value.ToString("HH:mm"));
}
else
{
ws4.GetRow(rowIndex).GetCell(0).SetCellValue("");
ws4.GetRow(rowIndex).GetCell(1).SetCellValue("");
}
#region punish_C4
//XSSFSheet ws4 = (XSSFSheet)hssfworkbook.GetSheet("违规及处理办法C4");
//if (punishCount > 0)
//{
// var rowIndex = 1;
// foreach (var p in punishList)
// {
// if (ws4.GetRow(rowIndex) == null) ws4.CreateRow(rowIndex);
// if (ws4.GetRow(rowIndex).GetCell(0) == null) ws4.GetRow(rowIndex).CreateCell(0);
// if (ws4.GetRow(rowIndex).GetCell(1) == null) ws4.GetRow(rowIndex).CreateCell(1);
// if (p.PunishDate != null)
// {
// ws4.GetRow(rowIndex).GetCell(0).SetCellValue(p.PunishDate.Value.ToString("yyyy/MM/dd"));
// ws4.GetRow(rowIndex).GetCell(1).SetCellValue(p.PunishDate.Value.ToString("HH:mm"));
// }
// else
// {
// ws4.GetRow(rowIndex).GetCell(0).SetCellValue("");
// ws4.GetRow(rowIndex).GetCell(1).SetCellValue("");
// }
if (ws4.GetRow(rowIndex).GetCell(2) == null) ws4.GetRow(rowIndex).CreateCell(2);
ws4.GetRow(rowIndex).GetCell(2).SetCellValue(p.FO_NO);
if (ws4.GetRow(rowIndex).GetCell(3) == null) ws4.GetRow(rowIndex).CreateCell(3);
ws4.GetRow(rowIndex).GetCell(3).SetCellValue(p.ViolationRelatedSes);
if (ws4.GetRow(rowIndex).GetCell(4) == null) ws4.GetRow(rowIndex).CreateCell(4);
ws4.GetRow(rowIndex).GetCell(4).SetCellValue(p.Discipline);
if (ws4.GetRow(rowIndex).GetCell(5) == null) ws4.GetRow(rowIndex).CreateCell(5);
ws4.GetRow(rowIndex).GetCell(5).SetCellValue(p.DisciplineCN);
if (ws4.GetRow(rowIndex).GetCell(6) == null) ws4.GetRow(rowIndex).CreateCell(6);
ws4.GetRow(rowIndex).GetCell(6).SetCellValue(p.DisciplineEn);
if (ws4.GetRow(rowIndex).GetCell(7) == null) ws4.GetRow(rowIndex).CreateCell(7);
ws4.GetRow(rowIndex).GetCell(7).SetCellValue(p.Contractor);
if (ws4.GetRow(rowIndex).GetCell(8) == null) ws4.GetRow(rowIndex).CreateCell(8);
ws4.GetRow(rowIndex).GetCell(8).SetCellValue(p.ContractorCN);
if (ws4.GetRow(rowIndex).GetCell(9) == null) ws4.GetRow(rowIndex).CreateCell(9);
ws4.GetRow(rowIndex).GetCell(9).SetCellValue(p.ContractorEn);
if (ws4.GetRow(rowIndex).GetCell(10) == null) ws4.GetRow(rowIndex).CreateCell(10);
ws4.GetRow(rowIndex).GetCell(10).SetCellValue(p.Location);
if (ws4.GetRow(rowIndex).GetCell(11) == null) ws4.GetRow(rowIndex).CreateCell(11);
ws4.GetRow(rowIndex).GetCell(11).SetCellValue(p.Description);
// if (ws4.GetRow(rowIndex).GetCell(2) == null) ws4.GetRow(rowIndex).CreateCell(2);
// ws4.GetRow(rowIndex).GetCell(2).SetCellValue(p.FO_NO);
// if (ws4.GetRow(rowIndex).GetCell(3) == null) ws4.GetRow(rowIndex).CreateCell(3);
// ws4.GetRow(rowIndex).GetCell(3).SetCellValue(p.ViolationRelatedSes);
// if (ws4.GetRow(rowIndex).GetCell(4) == null) ws4.GetRow(rowIndex).CreateCell(4);
// ws4.GetRow(rowIndex).GetCell(4).SetCellValue(p.Discipline);
// if (ws4.GetRow(rowIndex).GetCell(5) == null) ws4.GetRow(rowIndex).CreateCell(5);
// ws4.GetRow(rowIndex).GetCell(5).SetCellValue(p.DisciplineCN);
// if (ws4.GetRow(rowIndex).GetCell(6) == null) ws4.GetRow(rowIndex).CreateCell(6);
// ws4.GetRow(rowIndex).GetCell(6).SetCellValue(p.DisciplineEn);
// if (ws4.GetRow(rowIndex).GetCell(7) == null) ws4.GetRow(rowIndex).CreateCell(7);
// ws4.GetRow(rowIndex).GetCell(7).SetCellValue(p.Contractor);
// if (ws4.GetRow(rowIndex).GetCell(8) == null) ws4.GetRow(rowIndex).CreateCell(8);
// ws4.GetRow(rowIndex).GetCell(8).SetCellValue(p.ContractorCN);
// if (ws4.GetRow(rowIndex).GetCell(9) == null) ws4.GetRow(rowIndex).CreateCell(9);
// ws4.GetRow(rowIndex).GetCell(9).SetCellValue(p.ContractorEn);
// if (ws4.GetRow(rowIndex).GetCell(10) == null) ws4.GetRow(rowIndex).CreateCell(10);
// ws4.GetRow(rowIndex).GetCell(10).SetCellValue(p.Location);
// if (ws4.GetRow(rowIndex).GetCell(11) == null) ws4.GetRow(rowIndex).CreateCell(11);
// ws4.GetRow(rowIndex).GetCell(11).SetCellValue(p.Description);
if (ws4.GetRow(rowIndex).GetCell(12) == null) ws4.GetRow(rowIndex).CreateCell(12);
ws4.GetRow(rowIndex).GetCell(12).SetCellValue(p.ViolationDegree);
if (ws4.GetRow(rowIndex).GetCell(13) == null) ws4.GetRow(rowIndex).CreateCell(13);
ws4.GetRow(rowIndex).GetCell(13).SetCellValue(p.Contract_Admin);
if (ws4.GetRow(rowIndex).GetCell(14) == null) ws4.GetRow(rowIndex).CreateCell(14);
ws4.GetRow(rowIndex).GetCell(14).SetCellValue(p.Main_Coordinator);
if (ws4.GetRow(rowIndex).GetCell(15) == null) ws4.GetRow(rowIndex).CreateCell(15);
ws4.GetRow(rowIndex).GetCell(15).SetCellValue(p.MCDept);
if (ws4.GetRow(rowIndex).GetCell(16) == null) ws4.GetRow(rowIndex).CreateCell(16);
ws4.GetRow(rowIndex).GetCell(16).SetCellValue(p.User_Representative);
if (ws4.GetRow(rowIndex).GetCell(17) == null) ws4.GetRow(rowIndex).CreateCell(17);
ws4.GetRow(rowIndex).GetCell(17).SetCellValue(p.BYCRU);
// if (ws4.GetRow(rowIndex).GetCell(12) == null) ws4.GetRow(rowIndex).CreateCell(12);
// ws4.GetRow(rowIndex).GetCell(12).SetCellValue(p.ViolationDegree);
// if (ws4.GetRow(rowIndex).GetCell(13) == null) ws4.GetRow(rowIndex).CreateCell(13);
// ws4.GetRow(rowIndex).GetCell(13).SetCellValue(p.Contract_Admin);
// if (ws4.GetRow(rowIndex).GetCell(14) == null) ws4.GetRow(rowIndex).CreateCell(14);
// ws4.GetRow(rowIndex).GetCell(14).SetCellValue(p.Main_Coordinator);
// if (ws4.GetRow(rowIndex).GetCell(15) == null) ws4.GetRow(rowIndex).CreateCell(15);
// ws4.GetRow(rowIndex).GetCell(15).SetCellValue(p.MCDept);
// if (ws4.GetRow(rowIndex).GetCell(16) == null) ws4.GetRow(rowIndex).CreateCell(16);
// ws4.GetRow(rowIndex).GetCell(16).SetCellValue(p.User_Representative);
// if (ws4.GetRow(rowIndex).GetCell(17) == null) ws4.GetRow(rowIndex).CreateCell(17);
// ws4.GetRow(rowIndex).GetCell(17).SetCellValue(p.BYCRU);
if (ws4.GetRow(rowIndex).GetCell(18) == null) ws4.GetRow(rowIndex).CreateCell(18);
ws4.GetRow(rowIndex).GetCell(18).SetCellValue(p.Violation_Inspector_Name);
if (ws4.GetRow(rowIndex).GetCell(19) == null) ws4.GetRow(rowIndex).CreateCell(19);
ws4.GetRow(rowIndex).GetCell(19).SetCellValue(p.InspectionDep);
if (ws4.GetRow(rowIndex).GetCell(20) == null) ws4.GetRow(rowIndex).CreateCell(20);
ws4.GetRow(rowIndex).GetCell(20).SetCellValue(p.SES_No);
if (ws4.GetRow(rowIndex).GetCell(21) == null) ws4.GetRow(rowIndex).CreateCell(21);
ws4.GetRow(rowIndex).GetCell(21).SetCellValue(p.CompletionDate != null ? p.CompletionDate.Value.ToString("yyyy/MM/dd") : "");
// if (ws4.GetRow(rowIndex).GetCell(18) == null) ws4.GetRow(rowIndex).CreateCell(18);
// ws4.GetRow(rowIndex).GetCell(18).SetCellValue(p.Violation_Inspector_Name);
// if (ws4.GetRow(rowIndex).GetCell(19) == null) ws4.GetRow(rowIndex).CreateCell(19);
// ws4.GetRow(rowIndex).GetCell(19).SetCellValue(p.InspectionDep);
// if (ws4.GetRow(rowIndex).GetCell(20) == null) ws4.GetRow(rowIndex).CreateCell(20);
// ws4.GetRow(rowIndex).GetCell(20).SetCellValue(p.SES_No);
// if (ws4.GetRow(rowIndex).GetCell(21) == null) ws4.GetRow(rowIndex).CreateCell(21);
// ws4.GetRow(rowIndex).GetCell(21).SetCellValue(p.CompletionDate != null ? p.CompletionDate.Value.ToString("yyyy/MM/dd") : "");
if ((int)((90 * (rowIndex + punishCount)) / totalNum) > percent)
{
percent = (int)(100 * (rowIndex + punishCount) / totalNum);
}
rowIndex++;
}
}
// if ((int)((90 * (rowIndex + punishCount)) / totalNum) > percent)
// {
// percent = (int)(100 * (rowIndex + punishCount) / totalNum);
// }
// rowIndex++;
// }
//}
#endregion
#region NCR
XSSFSheet wsCm = (XSSFSheet)hssfworkbook.GetSheet("约谈,NCR,合同终止");
#region NCR C4了
XSSFSheet wsCm = (XSSFSheet)hssfworkbook.GetSheet("违规及处理办法C4");
if (cmListCount > 0)
{
var rowIndex = 1;
@@ -2092,9 +2092,9 @@ namespace FineUIPro.Web.Evaluation
if (wsCm.GetRow(rowIndex).GetCell(14) == null) wsCm.GetRow(rowIndex).CreateCell(14);
wsCm.GetRow(rowIndex).GetCell(14).SetCellValue(p.BycDept);
if ((int)((90 * (rowIndex + punishCount * 2)) / totalNum) > percent)
if ((int)((90 * (rowIndex + punishCount )) / totalNum) > percent)
{
percent = (int)(100 * (rowIndex + punishCount * 2) / totalNum);
percent = (int)(100 * (rowIndex + punishCount) / totalNum);
}
rowIndex++;
}
@@ -2118,9 +2118,9 @@ namespace FineUIPro.Web.Evaluation
if (wsCon.GetRow(rowIndex).GetCell(3) == null) wsCon.GetRow(rowIndex).CreateCell(3);
wsCon.GetRow(rowIndex).GetCell(3).SetCellValue(p.Expire_Date != null ? p.Expire_Date.Value.ToString("yyyy/MM/dd") : "");
if ((int)((90 * (rowIndex + punishCount * 2 + cmListCount)) / totalNum) > percent)
if ((int)((90 * (rowIndex + punishCount + cmListCount)) / totalNum) > percent)
{
percent = (int)(100 * (rowIndex + punishCount * 2 + cmListCount) / totalNum);
percent = (int)(100 * (rowIndex + punishCount + cmListCount) / totalNum);
}
rowIndex++;
}
@@ -2226,9 +2226,9 @@ namespace FineUIPro.Web.Evaluation
wss.GetRow(rowIndex).GetCell(21).CellStyle = styleQfw;
#endregion
if ((int)((90 * (rowIndex + punishCount * 2 + cmListCount + conListCount)) / totalNum) > percent)
if ((int)((90 * (rowIndex + punishCount + cmListCount + conListCount)) / totalNum) > percent)
{
percent = (int)(100 * (rowIndex + punishCount * 2 + cmListCount + conListCount) / totalNum);
percent = (int)(100 * (rowIndex + punishCount + cmListCount + conListCount) / totalNum);
}
rowIndex++;
}
@@ -2332,9 +2332,9 @@ namespace FineUIPro.Web.Evaluation
wssafe.GetRow(rowIndex).GetCell(20).CellStyle = styleQfw;
#endregion
if ((int)((90 * (rowIndex + punishCount * 2 + cmListCount + conListCount + overviewCount)) / totalNum) > percent)
if ((int)((90 * (rowIndex + punishCount + cmListCount + conListCount + overviewCount)) / totalNum) > percent)
{
percent = (int)(100 * (rowIndex + punishCount * 2 + cmListCount + conListCount + overviewCount) / totalNum);
percent = (int)(100 * (rowIndex + punishCount + cmListCount + conListCount + overviewCount) / totalNum);
}
rowIndex++;
}
@@ -2402,9 +2402,9 @@ namespace FineUIPro.Web.Evaluation
}
}
#endregion
if ((int)((90 * (rowEvalIndex + punishCount * 2 + cmListCount + conListCount + overviewCount + safeOverviewCount)) / totalNum) > percent)
if ((int)((90 * (rowEvalIndex + punishCount + cmListCount + conListCount + overviewCount + safeOverviewCount)) / totalNum) > percent)
{
percent = (int)(100 * (rowEvalIndex + punishCount * 2 + cmListCount + conListCount + overviewCount + safeOverviewCount) / totalNum);
percent = (int)(100 * (rowEvalIndex + punishCount + cmListCount + conListCount + overviewCount + safeOverviewCount) / totalNum);
}
rowEvalIndex++;
}
@@ -2412,7 +2412,7 @@ namespace FineUIPro.Web.Evaluation
#endregion
ws.ForceFormulaRecalculation = true;
ws4.ForceFormulaRecalculation = true;
//ws4.ForceFormulaRecalculation = true;
wsCm.ForceFormulaRecalculation = true;
wss.ForceFormulaRecalculation = true;
wssafe.ForceFormulaRecalculation = true;
@@ -2438,7 +2438,7 @@ namespace FineUIPro.Web.Evaluation
int conListCount = conList.Count();
int overviewCount = OverviewReport.Count;
int safeOverviewCount = safeOverviewReport.Count;
int totalNum = punishCount * 2 + cmListCount + conListCount + overviewCount + safeOverviewCount + noEvaluatedUser.Count;
int totalNum = punishCount + cmListCount + conListCount + overviewCount + safeOverviewCount + noEvaluatedUser.Count;
#region
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
//模板文件
@@ -2580,81 +2580,81 @@ namespace FineUIPro.Web.Evaluation
}
#endregion
#region punish_C4
XSSFSheet ws4 = (XSSFSheet)hssfworkbook.GetSheet("Violation and HandlingC4");
if (punishCount > 0)
{
var rowIndex = 1;
foreach (var p in punishList)
{
if (ws4.GetRow(rowIndex) == null) ws4.CreateRow(rowIndex);
if (ws4.GetRow(rowIndex).GetCell(0) == null) ws4.GetRow(rowIndex).CreateCell(0);
if (ws4.GetRow(rowIndex).GetCell(1) == null) ws4.GetRow(rowIndex).CreateCell(1);
if (p.PunishDate != null)
{
ws4.GetRow(rowIndex).GetCell(0).SetCellValue(p.PunishDate.Value.ToString("yyyy/MM/dd"));
ws4.GetRow(rowIndex).GetCell(1).SetCellValue(p.PunishDate.Value.ToString("HH:mm"));
}
else
{
ws4.GetRow(rowIndex).GetCell(0).SetCellValue("");
ws4.GetRow(rowIndex).GetCell(1).SetCellValue("");
}
#region punish_C4
//XSSFSheet ws4 = (XSSFSheet)hssfworkbook.GetSheet("Violation and HandlingC4");
//if (punishCount > 0)
//{
// var rowIndex = 1;
// foreach (var p in punishList)
// {
// if (ws4.GetRow(rowIndex) == null) ws4.CreateRow(rowIndex);
// if (ws4.GetRow(rowIndex).GetCell(0) == null) ws4.GetRow(rowIndex).CreateCell(0);
// if (ws4.GetRow(rowIndex).GetCell(1) == null) ws4.GetRow(rowIndex).CreateCell(1);
// if (p.PunishDate != null)
// {
// ws4.GetRow(rowIndex).GetCell(0).SetCellValue(p.PunishDate.Value.ToString("yyyy/MM/dd"));
// ws4.GetRow(rowIndex).GetCell(1).SetCellValue(p.PunishDate.Value.ToString("HH:mm"));
// }
// else
// {
// ws4.GetRow(rowIndex).GetCell(0).SetCellValue("");
// ws4.GetRow(rowIndex).GetCell(1).SetCellValue("");
// }
if (ws4.GetRow(rowIndex).GetCell(2) == null) ws4.GetRow(rowIndex).CreateCell(2);
ws4.GetRow(rowIndex).GetCell(2).SetCellValue(p.FO_NO);
if (ws4.GetRow(rowIndex).GetCell(3) == null) ws4.GetRow(rowIndex).CreateCell(3);
ws4.GetRow(rowIndex).GetCell(3).SetCellValue(p.ViolationRelatedSes);
if (ws4.GetRow(rowIndex).GetCell(4) == null) ws4.GetRow(rowIndex).CreateCell(4);
ws4.GetRow(rowIndex).GetCell(4).SetCellValue(p.Discipline);
if (ws4.GetRow(rowIndex).GetCell(5) == null) ws4.GetRow(rowIndex).CreateCell(5);
ws4.GetRow(rowIndex).GetCell(5).SetCellValue(p.DisciplineCN);
if (ws4.GetRow(rowIndex).GetCell(6) == null) ws4.GetRow(rowIndex).CreateCell(6);
ws4.GetRow(rowIndex).GetCell(6).SetCellValue(p.DisciplineEn);
if (ws4.GetRow(rowIndex).GetCell(7) == null) ws4.GetRow(rowIndex).CreateCell(7);
ws4.GetRow(rowIndex).GetCell(7).SetCellValue(p.Contractor);
if (ws4.GetRow(rowIndex).GetCell(8) == null) ws4.GetRow(rowIndex).CreateCell(8);
ws4.GetRow(rowIndex).GetCell(8).SetCellValue(p.ContractorCN);
if (ws4.GetRow(rowIndex).GetCell(9) == null) ws4.GetRow(rowIndex).CreateCell(9);
ws4.GetRow(rowIndex).GetCell(9).SetCellValue(p.ContractorEn);
if (ws4.GetRow(rowIndex).GetCell(10) == null) ws4.GetRow(rowIndex).CreateCell(10);
ws4.GetRow(rowIndex).GetCell(10).SetCellValue(p.Location);
if (ws4.GetRow(rowIndex).GetCell(11) == null) ws4.GetRow(rowIndex).CreateCell(11);
ws4.GetRow(rowIndex).GetCell(11).SetCellValue(p.Description);
// if (ws4.GetRow(rowIndex).GetCell(2) == null) ws4.GetRow(rowIndex).CreateCell(2);
// ws4.GetRow(rowIndex).GetCell(2).SetCellValue(p.FO_NO);
// if (ws4.GetRow(rowIndex).GetCell(3) == null) ws4.GetRow(rowIndex).CreateCell(3);
// ws4.GetRow(rowIndex).GetCell(3).SetCellValue(p.ViolationRelatedSes);
// if (ws4.GetRow(rowIndex).GetCell(4) == null) ws4.GetRow(rowIndex).CreateCell(4);
// ws4.GetRow(rowIndex).GetCell(4).SetCellValue(p.Discipline);
// if (ws4.GetRow(rowIndex).GetCell(5) == null) ws4.GetRow(rowIndex).CreateCell(5);
// ws4.GetRow(rowIndex).GetCell(5).SetCellValue(p.DisciplineCN);
// if (ws4.GetRow(rowIndex).GetCell(6) == null) ws4.GetRow(rowIndex).CreateCell(6);
// ws4.GetRow(rowIndex).GetCell(6).SetCellValue(p.DisciplineEn);
// if (ws4.GetRow(rowIndex).GetCell(7) == null) ws4.GetRow(rowIndex).CreateCell(7);
// ws4.GetRow(rowIndex).GetCell(7).SetCellValue(p.Contractor);
// if (ws4.GetRow(rowIndex).GetCell(8) == null) ws4.GetRow(rowIndex).CreateCell(8);
// ws4.GetRow(rowIndex).GetCell(8).SetCellValue(p.ContractorCN);
// if (ws4.GetRow(rowIndex).GetCell(9) == null) ws4.GetRow(rowIndex).CreateCell(9);
// ws4.GetRow(rowIndex).GetCell(9).SetCellValue(p.ContractorEn);
// if (ws4.GetRow(rowIndex).GetCell(10) == null) ws4.GetRow(rowIndex).CreateCell(10);
// ws4.GetRow(rowIndex).GetCell(10).SetCellValue(p.Location);
// if (ws4.GetRow(rowIndex).GetCell(11) == null) ws4.GetRow(rowIndex).CreateCell(11);
// ws4.GetRow(rowIndex).GetCell(11).SetCellValue(p.Description);
if (ws4.GetRow(rowIndex).GetCell(12) == null) ws4.GetRow(rowIndex).CreateCell(12);
ws4.GetRow(rowIndex).GetCell(12).SetCellValue(p.ViolationDegree);
if (ws4.GetRow(rowIndex).GetCell(13) == null) ws4.GetRow(rowIndex).CreateCell(13);
ws4.GetRow(rowIndex).GetCell(13).SetCellValue(p.Contract_Admin);
if (ws4.GetRow(rowIndex).GetCell(14) == null) ws4.GetRow(rowIndex).CreateCell(14);
ws4.GetRow(rowIndex).GetCell(14).SetCellValue(p.Main_Coordinator);
if (ws4.GetRow(rowIndex).GetCell(15) == null) ws4.GetRow(rowIndex).CreateCell(15);
ws4.GetRow(rowIndex).GetCell(15).SetCellValue(p.MCDept);
if (ws4.GetRow(rowIndex).GetCell(16) == null) ws4.GetRow(rowIndex).CreateCell(16);
ws4.GetRow(rowIndex).GetCell(16).SetCellValue(p.User_Representative);
if (ws4.GetRow(rowIndex).GetCell(17) == null) ws4.GetRow(rowIndex).CreateCell(17);
ws4.GetRow(rowIndex).GetCell(17).SetCellValue(p.BYCRU);
// if (ws4.GetRow(rowIndex).GetCell(12) == null) ws4.GetRow(rowIndex).CreateCell(12);
// ws4.GetRow(rowIndex).GetCell(12).SetCellValue(p.ViolationDegree);
// if (ws4.GetRow(rowIndex).GetCell(13) == null) ws4.GetRow(rowIndex).CreateCell(13);
// ws4.GetRow(rowIndex).GetCell(13).SetCellValue(p.Contract_Admin);
// if (ws4.GetRow(rowIndex).GetCell(14) == null) ws4.GetRow(rowIndex).CreateCell(14);
// ws4.GetRow(rowIndex).GetCell(14).SetCellValue(p.Main_Coordinator);
// if (ws4.GetRow(rowIndex).GetCell(15) == null) ws4.GetRow(rowIndex).CreateCell(15);
// ws4.GetRow(rowIndex).GetCell(15).SetCellValue(p.MCDept);
// if (ws4.GetRow(rowIndex).GetCell(16) == null) ws4.GetRow(rowIndex).CreateCell(16);
// ws4.GetRow(rowIndex).GetCell(16).SetCellValue(p.User_Representative);
// if (ws4.GetRow(rowIndex).GetCell(17) == null) ws4.GetRow(rowIndex).CreateCell(17);
// ws4.GetRow(rowIndex).GetCell(17).SetCellValue(p.BYCRU);
if (ws4.GetRow(rowIndex).GetCell(18) == null) ws4.GetRow(rowIndex).CreateCell(18);
ws4.GetRow(rowIndex).GetCell(18).SetCellValue(p.Violation_Inspector_Name);
if (ws4.GetRow(rowIndex).GetCell(19) == null) ws4.GetRow(rowIndex).CreateCell(19);
ws4.GetRow(rowIndex).GetCell(19).SetCellValue(p.InspectionDep);
if (ws4.GetRow(rowIndex).GetCell(20) == null) ws4.GetRow(rowIndex).CreateCell(20);
ws4.GetRow(rowIndex).GetCell(20).SetCellValue(p.SES_No);
if (ws4.GetRow(rowIndex).GetCell(21) == null) ws4.GetRow(rowIndex).CreateCell(21);
ws4.GetRow(rowIndex).GetCell(21).SetCellValue(p.CompletionDate != null ? p.CompletionDate.Value.ToString("yyyy/MM/dd") : "");
// if (ws4.GetRow(rowIndex).GetCell(18) == null) ws4.GetRow(rowIndex).CreateCell(18);
// ws4.GetRow(rowIndex).GetCell(18).SetCellValue(p.Violation_Inspector_Name);
// if (ws4.GetRow(rowIndex).GetCell(19) == null) ws4.GetRow(rowIndex).CreateCell(19);
// ws4.GetRow(rowIndex).GetCell(19).SetCellValue(p.InspectionDep);
// if (ws4.GetRow(rowIndex).GetCell(20) == null) ws4.GetRow(rowIndex).CreateCell(20);
// ws4.GetRow(rowIndex).GetCell(20).SetCellValue(p.SES_No);
// if (ws4.GetRow(rowIndex).GetCell(21) == null) ws4.GetRow(rowIndex).CreateCell(21);
// ws4.GetRow(rowIndex).GetCell(21).SetCellValue(p.CompletionDate != null ? p.CompletionDate.Value.ToString("yyyy/MM/dd") : "");
if ((int)((90 * (rowIndex + punishCount)) / totalNum) > percent)
{
percent = (int)(100 * (rowIndex + punishCount) / totalNum);
}
rowIndex++;
}
}
// if ((int)((90 * (rowIndex + punishCount)) / totalNum) > percent)
// {
// percent = (int)(100 * (rowIndex + punishCount) / totalNum);
// }
// rowIndex++;
// }
//}
#endregion
#region NCR
XSSFSheet wsCm = (XSSFSheet)hssfworkbook.GetSheet("约谈,NCR,合同终止");
#region NCR C4了
XSSFSheet wsCm = (XSSFSheet)hssfworkbook.GetSheet("Violation and HandlingC4");
if (cmListCount > 0)
{
var rowIndex = 1;
@@ -2692,9 +2692,9 @@ namespace FineUIPro.Web.Evaluation
if (wsCm.GetRow(rowIndex).GetCell(14) == null) wsCm.GetRow(rowIndex).CreateCell(14);
wsCm.GetRow(rowIndex).GetCell(14).SetCellValue(p.BycDept);
if ((int)((90 * (rowIndex + punishCount * 2)) / totalNum) > percent)
if ((int)((90 * (rowIndex + punishCount)) / totalNum) > percent)
{
percent = (int)(100 * (rowIndex + punishCount * 2) / totalNum);
percent = (int)(100 * (rowIndex + punishCount) / totalNum);
}
rowIndex++;
}
@@ -2718,9 +2718,9 @@ namespace FineUIPro.Web.Evaluation
if (wsCon.GetRow(rowIndex).GetCell(3) == null) wsCon.GetRow(rowIndex).CreateCell(3);
wsCon.GetRow(rowIndex).GetCell(3).SetCellValue(p.Expire_Date != null ? p.Expire_Date.Value.ToString("yyyy/MM/dd") : "");
if ((int)((90 * (rowIndex + punishCount * 2 + cmListCount)) / totalNum) > percent)
if ((int)((90 * (rowIndex + punishCount + cmListCount)) / totalNum) > percent)
{
percent = (int)(100 * (rowIndex + punishCount * 2 + cmListCount) / totalNum);
percent = (int)(100 * (rowIndex + punishCount + cmListCount) / totalNum);
}
rowIndex++;
}
@@ -2826,9 +2826,9 @@ namespace FineUIPro.Web.Evaluation
wss.GetRow(rowIndex).GetCell(21).CellStyle = styleQfw;
#endregion
if ((int)((90 * (rowIndex + punishCount * 2 + cmListCount + conListCount)) / totalNum) > percent)
if ((int)((90 * (rowIndex + punishCount + cmListCount + conListCount)) / totalNum) > percent)
{
percent = (int)(100 * (rowIndex + punishCount * 2 + cmListCount + conListCount) / totalNum);
percent = (int)(100 * (rowIndex + punishCount + cmListCount + conListCount) / totalNum);
}
rowIndex++;
}
@@ -2932,9 +2932,9 @@ namespace FineUIPro.Web.Evaluation
wssafe.GetRow(rowIndex).GetCell(20).CellStyle = styleQfw;
#endregion
if ((int)((90 * (rowIndex + punishCount * 2 + cmListCount + conListCount + overviewCount)) / totalNum) > percent)
if ((int)((90 * (rowIndex + punishCount + cmListCount + conListCount + overviewCount)) / totalNum) > percent)
{
percent = (int)(100 * (rowIndex + punishCount * 2 + cmListCount + conListCount + overviewCount) / totalNum);
percent = (int)(100 * (rowIndex + punishCount + cmListCount + conListCount + overviewCount) / totalNum);
}
rowIndex++;
}
@@ -3002,9 +3002,9 @@ namespace FineUIPro.Web.Evaluation
}
}
#endregion
if ((int)((90 * (rowEvalIndex + punishCount * 2 + cmListCount + conListCount + overviewCount + safeOverviewCount)) / totalNum) > percent)
if ((int)((90 * (rowEvalIndex + punishCount + cmListCount + conListCount + overviewCount + safeOverviewCount)) / totalNum) > percent)
{
percent = (int)(100 * (rowEvalIndex + punishCount * 2 + cmListCount + conListCount + overviewCount + safeOverviewCount) / totalNum);
percent = (int)(100 * (rowEvalIndex + punishCount + cmListCount + conListCount + overviewCount + safeOverviewCount) / totalNum);
}
rowEvalIndex++;
}
@@ -3012,7 +3012,7 @@ namespace FineUIPro.Web.Evaluation
#endregion
ws.ForceFormulaRecalculation = true;
ws4.ForceFormulaRecalculation = true;
//ws4.ForceFormulaRecalculation = true;
wsCm.ForceFormulaRecalculation = true;
wss.ForceFormulaRecalculation = true;
wssafe.ForceFormulaRecalculation = true;
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<ProjectView>ProjectFiles</ProjectView>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress>
</Use64BitIISExpress>
+100 -12
View File
@@ -14,6 +14,7 @@
using BLL.Common;
using FineUIPro.Web.common;
using Model;
using NPOI.SS.Formula.Functions;
public class Global : System.Web.HttpApplication
{
@@ -24,6 +25,7 @@
protected void Application_Start(object sender, EventArgs e)
{
Application["OnlineUserCount"] = 0;
try
{
@@ -111,7 +113,6 @@
upTimer.Interval = 1000 * 60 * 60;
upTimer.Enabled = true;
upTimer.Start();
}
// 承包商资质提前3个过期提示
@@ -148,6 +149,17 @@
}
// 承包商EHSS违规关联SES号的填写通知
if (DateTime.Now.Hour == 10)
{
System.Timers.Timer aTimer = new System.Timers.Timer();
aTimer.Elapsed += new System.Timers.ElapsedEventHandler(RelatedSes_EmailSend);
//60分钟执行一次
aTimer.Interval = 1000 * 3 * 60 * 60;
aTimer.Enabled = true;
aTimer.Start();
}
// 启动接口
if (DateTime.Now.Hour == 17)
{
@@ -815,6 +827,7 @@
}
}
#region
private void aTimer_FC_AutoSend(object sender, System.Timers.ElapsedEventArgs e)
{
// 过期提示,30天范围
@@ -877,17 +890,17 @@
userList.Add(userRepresentative.First());
}
var ctk = from x in Funs.DB.Sys_User
join z in Funs.DB.Base_Depart on x.DepartId equals z.DepartId
where z.DepartCode == "CT/K" && x.Email != null && x.Email != ""
select x;
if (ctk.Count() > 0)
{
foreach (var c in ctk)
{
userList.Add(c);
}
}
//var ctk = from x in Funs.DB.Sys_User
// join z in Funs.DB.Base_Depart on x.DepartId equals z.DepartId
// where z.DepartCode == "CT/K" && x.Email != null && x.Email != ""
// select x;
//if (ctk.Count() > 0)
//{
// foreach (var c in ctk)
// {
// userList.Add(c);
// }
//}
var ctss = from x in Funs.DB.Sys_User
join y in Funs.DB.Sys_Role on x.RoleId equals y.RoleId
@@ -932,6 +945,7 @@
}
}
}
#endregion
/// <summary>
/// 发送邮件
@@ -1396,6 +1410,80 @@
BLL.SQLHelper.ExecutSql(strSql);
}
#region EHSS违规关联SES号的填写通知
private void RelatedSes_EmailSend(object sender, System.Timers.ElapsedEventArgs e)
{
var vses = (from x in Funs.DB.EMC_Punishment
where (x.RelatedSesMailIsSend == null || x.RelatedSesMailIsSend == false)
&& x.BYC_RU != null && x.BYC_RU.ToUpper() != "NA"
&& x.CreateDate.HasValue && x.CreateDate.Value.AddDays(1).Date <= DateTime.Now.Date
select x).ToList();
if (vses.Count() > 0)
{
Model.EmailPop pops = Funs.DB.EmailPop.FirstOrDefault(x => x.EmailID == BLL.Const.EmailPopId);
if (pops == null)
{
return;
}
foreach (var ses in vses)
{
string[] mailTo = null;
string[] mailCC = null;
string resultMessage = "";
var emailTemplate = Funs.DB.SendEmailTemplate.Where(x => x.EmailName.Contains("承包商EHSS违规关联SES号的填写通知"));
if (emailTemplate.Count() > 0)
{
var dep = BLL.DepartService.GetDepartById(ses.BYC_RU);
if (dep != null && !string.IsNullOrEmpty(dep.DepartLeader))
{
var userTo = from x in Funs.DB.Sys_User
where x.UserId == dep.DepartLeader
&& x.Email != null && x.Email != ""
select x;
if (userTo != null)
{
mailTo = userTo.Select(x => x.Email).ToArray();
}
string contractor = string.Empty;
var fo = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(ses.FO_NO);
if (fo != null)
{
var userCC = from x in Funs.DB.Sys_User
where (x.UserId == fo.Contract_Admin || x.UserId == fo.Main_Coordinator)
&& x.Email != null && x.Email != ""
select x;
mailCC = userCC.Select(x => x.Email).Distinct().ToArray();
var con = Funs.DB.View_Contractor_DropDownValue.FirstOrDefault(x => x.ContractorId == fo.Contractor);
if (con != null)
{
contractor = con.Contractor;
}
}
if (mailTo.Length > 0)
{
NameValueCollection myPram = new NameValueCollection();
myPram.Add("ContractNo", fo.FO_NO);
myPram.Add("Contractor", contractor);
bool result = MailHelper.SendPunishSesMail(pops, myPram, "承包商EHSS违规关联SES号的填写通知", mailTo, mailCC, out resultMessage);
if (result)
{
ses.RelatedSesMailIsSend = true;
Funs.DB.SubmitChanges();
}
}
}
}
}
}
}
#endregion
private void Sync_HR(object sender, System.Timers.ElapsedEventArgs e)
{
//调用接口
+1 -1
View File
@@ -180,7 +180,7 @@ namespace FineUIPro.Web.SES
protected void btnEmail_Click(object sender, EventArgs e)
{
List<Model.View_EMC_Punishment> pList = (from x in Funs.DB.View_EMC_Punishment
where x.Flag == "1" && x.EmailIsSend == "否" && x.BYCRU != null && x.BYCRU.ToLower() != "none"
where x.Flag == "1" && x.EmailIsSend == "否"
&& (x.PunishDate.Value.Year + x.PunishDate.Value.Month) == (DateTime.Now.Year + DateTime.Now.Month)
select x).ToList();
if (pList.Count()>0)
+49 -42
View File
@@ -131,6 +131,13 @@ namespace FineUIPro.Web.SES
txtDef.Enabled = false;
}
var puList = (from x in Funs.DB.EMC_Punishment where x.Flag == "1" && x.BYC_RU != null && x.BYC_RU != "NA" select x.BYC_RU).Distinct().ToArray();
if (this.CurrUser.DepartId != null && puList.Contains(this.CurrUser.DepartId))
{
drpViolationInspector.Hidden = true;
txtInspectionDep.Hidden = true;
}
this.txtCompletionDate.Text = punishment.CompletionDate != null ? string.Format("{0:yyyy-MM-dd}", punishment.CompletionDate) : "";
this.txtSESNo.Text = punishment.SES_No;
txtViolationRelatedSes.Text = punishment.ViolationRelatedSes;
@@ -301,53 +308,53 @@ namespace FineUIPro.Web.SES
{
PunishmentId = SQLHelper.GetNewID(typeof(Model.EMC_Punishment));
punishment.PunishmentId = PunishmentId;
punishment.CreateDate = DateTime.Now;
BLL.PunishmentService.AddPunishment(punishment);
#region
Model.EmailPop pops = Funs.DB.EmailPop.FirstOrDefault(x => x.EmailID == BLL.Const.EmailPopId);
if (pops == null)
{
return;
}
string[] mailTo = null;
string[] mailCC = null;
string resultMessage = "";
#region EHSS违规关联SES号的填写通知 Golbal里触发
//Model.EmailPop pops = Funs.DB.EmailPop.FirstOrDefault(x => x.EmailID == BLL.Const.EmailPopId);
//if (pops == null)
//{
// return;
//}
//string[] mailTo = null;
//string[] mailCC = null;
//string resultMessage = "";
var emailTemplate = Funs.DB.SendEmailTemplate.Where(x => x.EmailName.Contains("承包商EHSS违规关联SES号的填写通知"));
if (emailTemplate.Count() > 0)
{
var dep = BLL.DepartService.GetDepartById(drpBYC_RU.SelectedValue);
if (dep != null && !string.IsNullOrEmpty(dep.DepartLeader))
{
var userTo = from x in Funs.DB.Sys_User
where x.UserId == dep.DepartLeader
&& x.Email != null && x.Email != ""
select x;
if (userTo != null)
{
mailTo= userTo.Select(x => x.Email).ToArray();
}
//var emailTemplate = Funs.DB.SendEmailTemplate.Where(x => x.EmailName.Contains("承包商EHSS违规关联SES号的填写通知"));
//if (emailTemplate.Count() > 0)
//{
// var dep = BLL.DepartService.GetDepartById(drpBYC_RU.SelectedValue);
// if (dep != null && !string.IsNullOrEmpty(dep.DepartLeader))
// {
// var userTo = from x in Funs.DB.Sys_User
// where x.UserId == dep.DepartLeader
// && x.Email != null && x.Email != ""
// select x;
// if (userTo != null)
// {
// mailTo= userTo.Select(x => x.Email).ToArray();
// }
var fo = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(drpFO_No.SelectedValue);
if (fo != null)
{
var userCC = from x in Funs.DB.Sys_User
where (x.UserId == fo.Contract_Admin || x.UserId == fo.Main_Coordinator
|| x.UserId == drpViolationInspector.SelectedValue)
&& x.Email != null && x.Email != ""
select x;
mailCC = userCC.Select(x => x.Email).Distinct().ToArray();
}
// var fo = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(drpFO_No.SelectedValue);
// if (fo != null)
// {
// var userCC = from x in Funs.DB.Sys_User
// where (x.UserId == fo.Contract_Admin || x.UserId == fo.Main_Coordinator)
// && x.Email != null && x.Email != ""
// select x;
// mailCC = userCC.Select(x => x.Email).Distinct().ToArray();
// }
if (mailTo.Length > 0)
{
NameValueCollection myPram = new NameValueCollection();
myPram.Add("ContractNo", fo.FO_NO);
myPram.Add("Contractor", drpContractor.SelectedText);
MailHelper.SendPunishSesMail(pops, myPram, "承包商EHSS违规关联SES号的填写通知", mailTo, mailCC, out resultMessage);
}
}
}
// if (mailTo.Length > 0)
// {
// NameValueCollection myPram = new NameValueCollection();
// myPram.Add("ContractNo", fo.FO_NO);
// myPram.Add("Contractor", drpContractor.SelectedText);
// MailHelper.SendPunishSesMail(pops, myPram, "承包商EHSS违规关联SES号的填写通知", mailTo, mailCC, out resultMessage);
// }
// }
//}
#endregion
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Add Contractor Safety Punishment!");