11
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
using BLL;
|
||||
using BLL.Common;
|
||||
using FineUIPro.Web.common.SysManage;
|
||||
using Model;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
@@ -247,10 +249,14 @@ namespace FineUIPro.Web.Evaluation
|
||||
HiddenField hidisDepScore4 = Grid1.Rows[i].FindControl("hidisDepScore4") as HiddenField;
|
||||
HiddenField hidisDepScore5 = Grid1.Rows[i].FindControl("hidisDepScore5") as HiddenField;
|
||||
HiddenField hidisDepScore6 = Grid1.Rows[i].FindControl("hidisDepScore6") as HiddenField;
|
||||
|
||||
HiddenField hidMaxScore1 = Grid1.Rows[i].FindControl("hidMaxScore1") as HiddenField;
|
||||
HiddenField hidMaxScore2 = Grid1.Rows[i].FindControl("hidMaxScore2") as HiddenField;
|
||||
|
||||
var foNo = Grid1.Rows[i].DataKeys[0].ToString();
|
||||
var isEvaluateType = Grid1.Rows[i].DataKeys[1].ToString();
|
||||
var evaluateType = Grid1.Rows[i].DataKeys[2].ToString();
|
||||
|
||||
var userType = Grid1.Rows[i].DataKeys[3].ToString();
|
||||
|
||||
if (contractorList != null && contractorList.Count(p => p.FO_NO == foNo) > 0)
|
||||
{
|
||||
@@ -260,6 +266,58 @@ namespace FineUIPro.Web.Evaluation
|
||||
lblContractor.Text = contractModel.Contractor;
|
||||
}
|
||||
}
|
||||
if (userType == "1")
|
||||
{
|
||||
var sesList = Funs.DB.FC_SESReportView.Where(p => p.FO_NO == foNo && p.Requisitioner == CurrUser.Account).ToList();
|
||||
var max = sesList.Select(x => x.ViolationDegree).Max();
|
||||
if (!string.IsNullOrEmpty(max))
|
||||
{
|
||||
if (max == "1")
|
||||
{
|
||||
hidMaxScore1.Text = "4.5";
|
||||
}
|
||||
if (max == "2")
|
||||
{
|
||||
hidMaxScore1.Text = "4";
|
||||
}
|
||||
if (max == "3")
|
||||
{
|
||||
hidMaxScore1.Text = "3.5";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var sesList = new List<FC_SESReportView>();
|
||||
var setList = Funs.DB.Sys_User.Where(p => new string[] { Const.Role_CTSSId, Const.Role_CTSCId, Const.Role_CTMTId }.Contains(p.RoleId) && p.UserId == CurrUser.UserId).ToList();
|
||||
if (setList.Count > 0)
|
||||
{
|
||||
sesList = Funs.DB.FC_SESReportView.Where(p => p.FO_NO == foNo && p.Requisitioner != "" && p.Requisitioner != null).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
sesList = Funs.DB.FC_SESReportView.Where(p => p.FO_NO == foNo && (p.MainCoordinatorUser == CurrUser.Account || p.ContractAdminUser == CurrUser.Account || p.UserRepresentativeUser == CurrUser.Account)).ToList();
|
||||
}
|
||||
var max = sesList.Select(x => x.ViolationDegree).Max();
|
||||
switch (max)
|
||||
{
|
||||
case "1":
|
||||
hidMaxScore2.Text = "4.5";
|
||||
break;
|
||||
case "2":
|
||||
hidMaxScore2.Text = "4";
|
||||
break;
|
||||
case "3":
|
||||
hidMaxScore2.Text = "3.5";
|
||||
break;
|
||||
default:
|
||||
hidMaxScore2.Text = "5";
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (isEvaluateType == "1")
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "color1";
|
||||
@@ -501,7 +559,7 @@ namespace FineUIPro.Web.Evaluation
|
||||
DepExtend6 = hidisDepScore6.Text,
|
||||
Status = item.Status,
|
||||
OriginalIndex = item.OriginalIndex
|
||||
}); ;
|
||||
});
|
||||
}
|
||||
|
||||
if (editLs.Count(p => p.EvaluateType == "1") > 0)//0:未评价 1:已评价
|
||||
@@ -1357,5 +1415,37 @@ namespace FineUIPro.Web.Evaluation
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Grid2_RowDataBound(object sender, GridRowEventArgs e)
|
||||
{
|
||||
var row = e.DataItem as Model.FC_SESReportView;
|
||||
|
||||
if (!string.IsNullOrEmpty(row.ViolationDegree))
|
||||
{
|
||||
e.RowCssClass = "color2";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected string ConvertViolationDegree(object violationDegree)
|
||||
{
|
||||
string degree = string.Empty;
|
||||
if (violationDegree != null)
|
||||
{
|
||||
if (violationDegree.ToString() == "1")
|
||||
{
|
||||
degree = "一般违章";
|
||||
}
|
||||
if (violationDegree.ToString() == "2")
|
||||
{
|
||||
degree = "严重违章";
|
||||
}
|
||||
if (violationDegree.ToString() == "3")
|
||||
{
|
||||
degree = "零容忍违章";
|
||||
}
|
||||
}
|
||||
return degree;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user