111
This commit is contained in:
parent
6bbff852fb
commit
9cd730b56b
|
@ -0,0 +1,48 @@
|
|||
ALTER TABLE dbo.EMC_Punishment ADD IsEvaluated BIT NULL
|
||||
GO
|
||||
ALTER TABLE dbo.SyncDataUserLogs ADD Josn NVARCHAR(MAX)
|
||||
GO
|
||||
|
||||
ALTER VIEW [dbo].[FC_SESReportView]
|
||||
AS
|
||||
SELECT
|
||||
a.SES_No,
|
||||
a.FO AS FO_NO,
|
||||
a.Short_Descrption,
|
||||
CONVERT(VARCHAR(50),a.Start_Date,23) AS Start_Date,
|
||||
CONVERT(VARCHAR(50),a.End_Date,23) AS End_Date,
|
||||
CONVERT(VARCHAR(50),a.TECO_Date,23) AS TECO_Date,
|
||||
CONVERT(VARCHAR(50),a.SES_CONF_Format,23) AS SES_CONF_Format,
|
||||
CONVERT(VARCHAR(50),a.Claim_sheets_receive,23) AS Claim_sheets_receive,
|
||||
(CASE WHEN a.Claim_sheets_receive IS NULL THEN a.TECO_Date ELSE a.Claim_sheets_receive END) AS Claim_TECO_Date,
|
||||
YEAR(CASE WHEN a.Claim_sheets_receive IS NULL THEN a.TECO_Date ELSE a.Claim_sheets_receive END) AS dateYear,
|
||||
MONTH(CASE WHEN a.Claim_sheets_receive IS NULL THEN a.TECO_Date ELSE a.Claim_sheets_receive END) AS dateMonth,
|
||||
a.Requisitioner,
|
||||
u1.Account AS MainCoordinatorUser,
|
||||
u2.Account AS UserRepresentativeUser,
|
||||
u3.Account AS ContractAdminUser,
|
||||
b.DisciplineId,
|
||||
dis.Discipline AS Discipline_Eng,
|
||||
dis.DisciplineCN AS Discipline_CN,
|
||||
(CASE WHEN dis.Discipline IS NULL THEN dis.DisciplineCN
|
||||
WHEN dis.DisciplineCN IS NULL THEN dis.Discipline
|
||||
ELSE dis.Discipline+dis.DisciplineCN END) AS Discipline,
|
||||
(SELECT TOP 1 p.ViolationDegree FROM dbo.EMC_Punishment p
|
||||
WHERE p.FO_NO=a.FO AND p.ViolationRelatedSes=a.SES_No AND p.Flag='1' AND IsEvaluated IS NULL) AS ViolationDegree
|
||||
FROM FC_SESReport AS a
|
||||
LEFT JOIN FC_SESRelatedData AS b ON a.FO=b.FO_NO
|
||||
LEFT JOIN Base_Discipline AS dis ON dis.DisciplineId = b.DisciplineId
|
||||
LEFT JOIN Sys_User AS u1 ON u1.UserId=b.Main_Coordinator
|
||||
LEFT JOIN Sys_User AS u2 ON u2.UserId=b.User_Representative
|
||||
LEFT JOIN Sys_User AS u3 ON u3.UserId=b.Contract_Admin
|
||||
WHERE YEAR(CASE WHEN a.Claim_sheets_receive IS NULL THEN a.TECO_Date ELSE a.Claim_sheets_receive END)=(CASE MONTH(GETDATE()) WHEN 1 THEN YEAR(GETDATE())-1 ELSE YEAR(GETDATE()) END)
|
||||
AND MONTH(CASE WHEN a.Claim_sheets_receive IS NULL THEN a.TECO_Date ELSE a.Claim_sheets_receive END)=(CASE MONTH(GETDATE()) WHEN 1 THEN 12 ELSE MONTH(GETDATE())-1 END)
|
||||
--and a.SES_No not in (select SES_No from Score_JournalEvaluation)
|
||||
AND (a.Claim_sheets_receive IS NOT NULL OR a.TECO_Date IS NOT NULL)
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
|
@ -73,9 +73,7 @@
|
|||
<f:HiddenField runat="server" ID="hidisDepScore4"></f:HiddenField>
|
||||
<f:HiddenField runat="server" ID="hidisDepScore5"></f:HiddenField>
|
||||
<f:HiddenField runat="server" ID="hidisDepScore6"></f:HiddenField>
|
||||
<f:HiddenField runat="server" Text="" ID="hidMaxScore1"></f:HiddenField>
|
||||
<f:HiddenField runat="server" Text="" ID="hidMaxScore2"></f:HiddenField>
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField HeaderText="承包商<br/>Contractor" HeaderTextAlign="Center" Width="200px">
|
||||
|
@ -213,41 +211,8 @@
|
|||
var target = $(event.target);
|
||||
var cellEl = target.closest('.f-grid-cell');
|
||||
var rowId = grid1.getRowId(cellEl);
|
||||
console.log(rowId);
|
||||
var columnId = grid1.getColumnId(cellEl);
|
||||
var columnName = grid1.getColumn(columnId).columnId;
|
||||
console.log();
|
||||
//获取控件值1()
|
||||
var maxScore1 = $("#Panel1_panelTopRegion_Grid1_ftpl_" + rowId + "_0_hidMaxScore1-inputEl").val();
|
||||
//获取控件值2()
|
||||
var maxScore2 = $("#Panel1_panelTopRegion_Grid1_ftpl_" + rowId + "_0_hidMaxScore2-inputEl").val()
|
||||
|
||||
// 用户EHSS
|
||||
if (columnName == "Score3" && value > parseFloat(maxScore1)) {
|
||||
F.alert("最大只能评" + maxScore1 + "星");
|
||||
var html = F.rateHtml(0, {
|
||||
allowClear: true,
|
||||
allowHalf: true,
|
||||
textVisible: false
|
||||
});
|
||||
grid1.getCellEl(rowId, columnId).html(html)
|
||||
}
|
||||
|
||||
// 部门安全监管
|
||||
else if (columnName == "Score1" && value > parseFloat(maxScore2)) {
|
||||
F.alert("最大只能评" + maxScore2 + "星");
|
||||
var html = F.rateHtml(0, {
|
||||
allowClear: true,
|
||||
allowHalf: true,
|
||||
textVisible: false
|
||||
});
|
||||
grid1.getCellEl(rowId, columnId).html(html)
|
||||
}
|
||||
|
||||
else {
|
||||
//更新单元格的值
|
||||
grid1.updateCellValue(rowId, columnId, value);
|
||||
}
|
||||
grid1.updateCellValue(rowId, columnId, value);
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -267,57 +267,6 @@ namespace FineUIPro.Web.Evaluation
|
|||
}
|
||||
}
|
||||
|
||||
// 违章扣分
|
||||
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();
|
||||
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;
|
||||
}
|
||||
}
|
||||
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")
|
||||
{
|
||||
|
|
|
@ -203,24 +203,6 @@ namespace FineUIPro.Web.Evaluation
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hidisDepScore6;
|
||||
|
||||
/// <summary>
|
||||
/// hidMaxScore1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hidMaxScore1;
|
||||
|
||||
/// <summary>
|
||||
/// hidMaxScore2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hidMaxScore2;
|
||||
|
||||
/// <summary>
|
||||
/// lblContractor 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<Use64BitIISExpress>
|
||||
</Use64BitIISExpress>
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<add path="res.axd" verb="GET" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
|
||||
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
||||
</httpHandlers>
|
||||
<compilation debug="true" targetFramework="4.8">
|
||||
<compilation debug="false" targetFramework="4.8">
|
||||
<buildProviders>
|
||||
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
|
||||
</buildProviders>
|
||||
|
|
|
@ -29,6 +29,10 @@ namespace Model
|
|||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnCreated();
|
||||
partial void OnCreated()
|
||||
{
|
||||
this.CommandTimeout = 600;
|
||||
}
|
||||
partial void InsertAttachFile(AttachFile instance);
|
||||
partial void UpdateAttachFile(AttachFile instance);
|
||||
partial void DeleteAttachFile(AttachFile instance);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
|
|
Loading…
Reference in New Issue