Compare commits

..

7 Commits

Author SHA1 Message Date
佘春生 20904bda17 11 2024-06-18 10:34:42 +08:00
佘春生 3d69c04346 11 2024-06-14 09:48:33 +08:00
佘春生 241e49f6e7 Merge branch 'master' of http://47.104.102.122:3000/shecs/Basf_FCL 2024-06-12 14:07:26 +08:00
佘春生 2c9d12025c 111 2024-06-12 14:07:24 +08:00
佘春生 6c3e64e8c4 77 2024-06-12 09:16:06 +08:00
佘春生 fddaacc4aa 77 2024-06-12 09:15:47 +08:00
佘春生 17ee5db333 77 2024-06-12 09:15:44 +08:00
17 changed files with 501 additions and 102 deletions

1
.gitignore vendored
View File

@ -1195,5 +1195,6 @@ FCL/WebApi/obj/Release/WebApi.pdb
/FCL/FineUIPro.Web/File/Excel/20240515031710
/FCL/FineUIPro.Web/File/Excel/20240515031759
/FCL/WebApi/obj/Debug
/备份/FCLPackFile_2024.06.06
/FCL/packages
/FCL/FineUIPro.Web/Web.config

View File

@ -0,0 +1,55 @@

ALTER TABLE dbo.EMC_Punishment ADD IsUserEvaluated BIT NULL
GO
ALTER TABLE dbo.EMC_Punishment ADD IsDepEvaluated 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 (p.IsUserEvaluated IS NULL OR IsDepEvaluated IS NULL )) AS ViolationDegree,
(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') AS ShowViolationDegree
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

View File

@ -59,6 +59,27 @@ namespace BLL
}
}
// 单点登陆ClientId参数
public static string ClientId
{
get;
set;
}
// 单点登陆ClientSecret参数
public static string ClientSecret
{
get;
set;
}
// 单点登陆Redirect_url参数
public static string Redirect_url
{
get;
set;
}
/// <summary>
/// 데貫<EB8DB0>
/// </summary>

View File

@ -171,10 +171,10 @@
<f:RenderField ColumnID="Requisitioner" DataField="Requisitioner" Width="200px" SortField="Requisitioner"
FieldType="String" HeaderText="Requisitioner" HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="ViolationDegree" Width="110px" HeaderText="违章程度"
HeaderTextAlign="Center" TextAlign="Center" SortField="ViolationDegree">
<f:TemplateField ColumnID="ShowViolationDegree" Width="110px" HeaderText="违章程度"
HeaderTextAlign="Center" TextAlign="Center" SortField="ShowViolationDegree">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# ConvertViolationDegree(Eval("ViolationDegree")) %>'></asp:Label>
<asp:Label ID="Label3" runat="server" Text='<%# ConvertViolationDegree(Eval("ShowViolationDegree")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
</Columns>
@ -213,7 +213,7 @@
var target = $(event.target);
var cellEl = target.closest('.f-grid-cell');
var rowId = grid1.getRowId(cellEl);
console.log(rowId);
//console.log(rowId);
var columnId = grid1.getColumnId(cellEl);
var columnName = grid1.getColumn(columnId).columnId;
@ -226,7 +226,7 @@
// 用户EHSS
if (columnName == "Score3" && value > parseFloat(maxScore1)) {
F.alert("最大只能评" + maxScore1 + "星");
F.alert(hidMsg + "最大只能评" + maxScore1 + "星");
var html = F.rateHtml(0, {
allowClear: true,
allowHalf: true,
@ -237,7 +237,7 @@
// 部门安全监管
else if (columnName == "Score1" && value > parseFloat(maxScore2)) {
F.alert("最大只能评" + maxScore2 + "星");
F.alert(hidMsg + "最大只能评" + maxScore2 + "星");
var html = F.rateHtml(0, {
allowClear: true,
allowHalf: true,

View File

@ -823,6 +823,22 @@ namespace FineUIPro.Web.Evaluation
scoreJournalList.Add(scoreJournal);
}
Funs.DB.Score_JournalEvaluation.InsertAllOnSubmit(scoreJournalList);
// 回写违章捐款(用户)
var PunishList= from x in pjSESReport where x.ViolationDegree!=null select x;
if (PunishList.Count() > 0)
{
foreach (var p in PunishList)
{
var punish = Funs.DB.EMC_Punishment.FirstOrDefault(x => x.FO_NO == p.FO_NO && x.ViolationRelatedSes == p.SES_No);
if (punish != null)
{
punish.IsUserEvaluated = true;
Funs.DB.SubmitChanges();
}
}
}
}
}
//部门
@ -938,6 +954,21 @@ namespace FineUIPro.Web.Evaluation
}
Funs.DB.Score_JournalEvaluation.InsertAllOnSubmit(scoreJournalList);
}
// 回写违章捐款(部门)
var PunishList = from x in pjSESReport where x.ViolationDegree != null select x;
if (PunishList.Count() > 0)
{
foreach (var p in PunishList)
{
var punish = Funs.DB.EMC_Punishment.FirstOrDefault(x => x.FO_NO == p.FO_NO && x.ViolationRelatedSes == p.SES_No);
if (punish != null)
{
punish.IsDepEvaluated = true;
Funs.DB.SubmitChanges();
}
}
}
}
}
}
@ -974,7 +1005,7 @@ namespace FineUIPro.Web.Evaluation
{
sesList = Funs.DB.FC_SESReportView.Where(p => p.FO_NO == FoNo && p.Requisitioner == CurrUser.Account).ToList();
}
Grid2.DataSource = sesList;
Grid2.DataSource = sesList.OrderByDescending(x=>x.ShowViolationDegree);
Grid2.DataBind();
}
#endregion
@ -1428,7 +1459,7 @@ namespace FineUIPro.Web.Evaluation
{
var row = e.DataItem as Model.FC_SESReportView;
if (!string.IsNullOrEmpty(row.ViolationDegree))
if (!string.IsNullOrEmpty(row.ShowViolationDegree))
{
e.RowCssClass = "color2";
}

View File

@ -14,6 +14,13 @@
color: #fff;
}
.f-grid-row.color2,
.f-grid-row.color2 .f-icon,
.f-grid-row.color2 a {
background-color: red;
color: #fff;
}
.f-rate .f-rate-star.f-rate-star-half .f-rate-star-first .f-rate-star-icon, .f-rate .f-rate-star.f-rate-star-full
.f-rate-star-first .f-rate-star-icon, .f-rate .f-rate-star.f-rate-star-full .f-rate-star-second .f-rate-star-icon {
color: #cc0033;
@ -67,6 +74,9 @@
<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>
<f:HiddenField runat="server" Text="" ID="hidMsg"></f:HiddenField>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField HeaderText="承包商<br/>Contractor" HeaderTextAlign="Center" Width="200px">
@ -138,7 +148,7 @@
<Items>
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
BoxFlex="1" DataKeyNames="SES_No" AllowCellEditing="true" ClicksToEdit="2" DataIDField="SES_No"
PageSize="15" EnableRowSelectEvent="true" Height="200px">
PageSize="15" EnableRowSelectEvent="true" Height="200px" OnRowDataBound="Grid2_RowDataBound">
<Columns>
<f:RenderField ColumnID="SES_No" DataField="SES_No" SortField="SES_No"
FieldType="String" HeaderText="SES No." HeaderTextAlign="Center">
@ -161,6 +171,12 @@
<f:RenderField ColumnID="Requisitioner" DataField="Requisitioner" Width="200px" SortField="Requisitioner"
FieldType="String" HeaderText="Requisitioner" HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="ShowViolationDegree" Width="110px" HeaderText="违章程度"
HeaderTextAlign="Center" TextAlign="Center" SortField="ShowViolationDegree">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# ConvertViolationDegree(Eval("ShowViolationDegree")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
</Columns>
</f:Grid>
</Items>
@ -183,10 +199,12 @@
function renderRateUser(value, row) {
var evaltype = row.rowValue["IsEvaluateType"];
return F.rateHtml(value, {
allowClear: true,
readonly: evaltype == 1 ? true : false,
allowHalf: true,
textVisible: false
});
return html;
}
F.ready(function () {
var grid1 = F(grid1ClientID);
@ -194,13 +212,46 @@
F.rateEvents(grid1.el, function (event, value) {
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;
//更新单元格的值
grid1.updateCellValue(rowId, columnId, value);
//获取控件值1
var maxScore1 = $("#Panel1_panelTopRegion_Grid1_ftpl_" + rowId + "_0_hidMaxScore1-inputEl").val();
//获取控件值2
var maxScore2 = $("#Panel1_panelTopRegion_Grid1_ftpl_" + rowId + "_0_hidMaxScore2-inputEl").val()
var hidMsg = $("#Panel1_panelTopRegion_Grid1_ftpl_" + rowId + "_0_hidMsg-inputEl").val()
// 用户EHSS
if (columnName == "Score3" && value > parseFloat(maxScore1)) {
F.alert(hidMsg + "最大只能评" + 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(hidMsg + "最大只能评" + maxScore2 + "星");
var html = F.rateHtml(0, {
allowClear: true,
allowHalf: true,
textVisible: false
});
grid1.getCellEl(rowId, columnId).html(html)
}
else {
//更新单元格的值
grid1.updateCellValue(rowId, columnId, value);
}
});
});
</script>
</body>

View File

@ -1,15 +1,19 @@
using BLL;
using BLL.Common;
using FineUIPro.Web.common.SysManage;
using Model;
using Newtonsoft.Json;
using NPOI.SS.Formula.Functions;
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;
using System.Web.UI.WebControls;
using static NPOI.POIFS.Crypt.CryptoFunctions;
namespace FineUIPro.Web.Evaluation
{
@ -247,10 +251,15 @@ 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;
HiddenField hidMsg = Grid1.Rows[i].FindControl("hidMsg") 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 +269,63 @@ 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).OrderByDescending(t => t.ViolationDegree).FirstOrDefault();
switch (sesList?.ViolationDegree)
{
case "1":
hidMaxScore1.Text = "4.5";
hidMsg.Text = $"当前合同号:{foNo}下,SES:{sesList?.SES_No}存在一般违章,";
break;
case "2":
hidMaxScore1.Text = "4";
hidMsg.Text = $"当前合同号:{foNo}下,SES:{sesList?.SES_No}存在严重违章,";
break;
case "3":
hidMaxScore1.Text = "3.5";
hidMsg.Text = $"当前合同号:{foNo}下,SES:{sesList?.SES_No}存在零容忍违章,";
break;
default:
hidMaxScore1.Text = "5";
hidMsg.Text = "";
break;
}
}
else
{
var sesList = Funs.DB.FC_SESReportView.AsQueryable();
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 = sesList.Where(p => p.FO_NO == foNo && p.Requisitioner != "" && p.Requisitioner != null && p.Requisitioner != string.Empty).OrderByDescending(t => t.ViolationDegree);
else
sesList = sesList.Where(p => p.FO_NO == foNo && (p.MainCoordinatorUser == CurrUser.Account || p.ContractAdminUser == CurrUser.Account || p.UserRepresentativeUser == CurrUser.Account)).OrderByDescending(t => t.ViolationDegree);
var max = sesList.FirstOrDefault();
switch (max?.ViolationDegree)
{
case "1":
hidMaxScore2.Text = "4.5";
hidMsg.Text = $"当前合同号:{foNo}下,SES:{max?.SES_No}存在一般违章,";
break;
case "2":
hidMaxScore2.Text = "4";
hidMsg.Text = $"当前合同号:{foNo}下,SES:{max?.SES_No}存在严重违章,";
break;
case "3":
hidMaxScore2.Text = "3.5";
hidMsg.Text = $"当前合同号:{foNo}下,SES:{max?.SES_No}存在零容忍违章,";
break;
default:
hidMaxScore2.Text = "5";
hidMsg.Text = "";
break;
}
}
if (isEvaluateType == "1")
{
Grid1.Rows[i].RowCssClass = "color1";
@ -758,6 +824,21 @@ namespace FineUIPro.Web.Evaluation
}
Funs.DB.Score_JournalEvaluation.InsertAllOnSubmit(scoreJournalList);
}
// 回写违章捐款(用户)
var PunishList = from x in pjSESReport where x.ViolationDegree != null select x;
if (PunishList.Count() > 0)
{
foreach (var p in PunishList)
{
var punish = Funs.DB.EMC_Punishment.FirstOrDefault(x => x.FO_NO == p.FO_NO && x.ViolationRelatedSes == p.SES_No);
if (punish != null)
{
punish.IsUserEvaluated = true;
Funs.DB.SubmitChanges();
}
}
}
}
//部门
if (item.EvaluateType == "Dep")
@ -872,6 +953,21 @@ namespace FineUIPro.Web.Evaluation
}
Funs.DB.Score_JournalEvaluation.InsertAllOnSubmit(scoreJournalList);
}
// 回写违章捐款(部门)
var PunishList = from x in pjSESReport where x.ViolationDegree != null select x;
if (PunishList.Count() > 0)
{
foreach (var p in PunishList)
{
var punish = Funs.DB.EMC_Punishment.FirstOrDefault(x => x.FO_NO == p.FO_NO && x.ViolationRelatedSes == p.SES_No);
if (punish != null)
{
punish.IsDepEvaluated = true;
Funs.DB.SubmitChanges();
}
}
}
}
}
}
@ -908,7 +1004,7 @@ namespace FineUIPro.Web.Evaluation
{
sesList = Funs.DB.FC_SESReportView.Where(p => p.FO_NO == FoNo && p.Requisitioner == CurrUser.Account).ToList();
}
Grid2.DataSource = sesList;
Grid2.DataSource = sesList.OrderByDescending(x => x.ShowViolationDegree);
Grid2.DataBind();
}
#endregion
@ -1357,5 +1453,38 @@ namespace FineUIPro.Web.Evaluation
BindGrid();
}
#endregion
protected void Grid2_RowDataBound(object sender, GridRowEventArgs e)
{
var row = e.DataItem as Model.FC_SESReportView;
if (!string.IsNullOrEmpty(row.ShowViolationDegree))
{
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;
}
}
}

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Evaluation {
namespace FineUIPro.Web.Evaluation
{
public partial class SafetyEvaluation {
public partial class SafetyEvaluation
{
/// <summary>
/// form1 控件。
@ -201,6 +203,33 @@ 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>
/// hidMsg 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hidMsg;
/// <summary>
/// lblContractor 控件。
/// </summary>
@ -237,6 +266,15 @@ namespace FineUIPro.Web.Evaluation {
/// </remarks>
protected global::FineUIPro.Grid Grid2;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label3;
/// <summary>
/// Window1 控件。
/// </summary>

View File

@ -69,14 +69,14 @@
<Reference Include="Microsoft.IdentityModel.Abstractions, Version=7.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Abstractions.7.6.0\lib\net461\Microsoft.IdentityModel.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=7.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.JsonWebTokens.7.6.0\lib\net461\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
<Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=6.22.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.JsonWebTokens.6.22.1\lib\net461\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Logging, Version=7.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Logging.7.6.0\lib\net461\Microsoft.IdentityModel.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Tokens, Version=7.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Tokens.7.6.0\lib\net461\Microsoft.IdentityModel.Tokens.dll</HintPath>
<Reference Include="Microsoft.IdentityModel.Tokens, Version=6.22.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Tokens.6.22.1\lib\net461\Microsoft.IdentityModel.Tokens.dll</HintPath>
</Reference>
<Reference Include="Microsoft.JScript" />
<Reference Include="Microsoft.ReportViewer.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
@ -125,8 +125,8 @@
<Reference Include="System.Data.Linq" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.DirectoryServices.Protocols" />
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=7.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\System.IdentityModel.Tokens.Jwt.7.6.0\lib\net461\System.IdentityModel.Tokens.Jwt.dll</HintPath>
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=6.22.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\System.IdentityModel.Tokens.Jwt.6.22.1\lib\net461\System.IdentityModel.Tokens.Jwt.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Management" />
@ -138,16 +138,16 @@
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Text.Encodings.Web, Version=4.0.5.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encodings.Web.4.7.2\lib\net461\System.Text.Encodings.Web.dll</HintPath>
</Reference>
<Reference Include="System.Text.Json, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.4.7.2\lib\net461\System.Text.Json.dll</HintPath>
<Reference Include="System.Text.Json, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.4.6.0\lib\net461\System.Text.Json.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>

View File

@ -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>

View File

@ -32,6 +32,10 @@
Funs.RootPath = Server.MapPath("~/");
// 日志文件所在目录
ErrLogInfo.DefaultErrLogFullPath = Server.MapPath("~/ErrLog.txt");
Funs.ClientId = ConfigurationManager.AppSettings["clientId"];
Funs.ClientSecret = ConfigurationManager.AppSettings["clientSecret"];
Funs.Redirect_url = ConfigurationManager.AppSettings["redirect_url"];
Funs.SystemName = ConfigurationManager.AppSettings["SystemName"];
Funs.ConnString = ConfigurationManager.ConnectionStrings["FCLDBConnectionString"].ConnectionString;
}
@ -117,10 +121,11 @@
// 承包商资质提前3个过期提示
var queListOne = from x in Funs.DB.EMC_Contractor_Qualification
where x.LimitEndDate != null
&& x.LimitEndDate.Value.AddMonths(-3).Date <= DateTime.Now.Date
&& x.LimitEndDate.Value.AddMonths(-3).AddDays(15).Date >= DateTime.Now.Date
select x;
join y in Funs.DB.FC_SESRelatedData on x.FoId equals y.ID
where x.LimitEndDate != null && y.FC_Status == "Valid"
&& x.LimitEndDate.Value.AddMonths(-3).Date <= DateTime.Now.Date
&& x.LimitEndDate.Value.AddMonths(-3).AddDays(15).Date >= DateTime.Now.Date
select x;
if (queListOne.Count() > 0)
{
System.Timers.Timer aTimer = new System.Timers.Timer();
@ -134,10 +139,11 @@
// 承包商资质提前1个过期提示
var queListTwo = from x in Funs.DB.EMC_Contractor_Qualification
where x.LimitEndDate != null
join y in Funs.DB.FC_SESRelatedData on x.FoId equals y.ID
where x.LimitEndDate != null && y.FC_Status == "Valid"
&& x.LimitEndDate.Value.AddMonths(-1).Date <= DateTime.Now.Date
&& x.LimitEndDate.Value.AddMonths(-1).AddDays(15).Date >= DateTime.Now.Date
select x;
select x;
if (queListTwo.Count() > 0)
{
System.Timers.Timer aTimer = new System.Timers.Timer();
@ -176,8 +182,9 @@
{
// 承包商资质提前3个过期提示
var queList = from x in Funs.DB.EMC_Contractor_Qualification
where x.LimitEndDate != null
&& x.LimitEndDate.Value.AddMonths(-3).Date <= DateTime.Now.Date
join y in Funs.DB.FC_SESRelatedData on x.FoId equals y.ID
where x.LimitEndDate != null && y.FC_Status == "Valid"
&& x.LimitEndDate.Value.AddMonths(-3).Date <= DateTime.Now.Date
&& x.LimitEndDate.Value.AddMonths(-3).AddDays(15).Date >= DateTime.Now.Date
select x;
if (queList.Count() > 0)
@ -433,8 +440,9 @@
{
// 承包商资质提前1个过期提示
var queList = from x in Funs.DB.EMC_Contractor_Qualification
where x.LimitEndDate != null
&& x.LimitEndDate.Value.AddMonths(-1).Date <= DateTime.Now.Date
join y in Funs.DB.FC_SESRelatedData on x.FoId equals y.ID
where x.LimitEndDate != null && y.FC_Status == "Valid"
&& x.LimitEndDate.Value.AddMonths(-1).Date <= DateTime.Now.Date
&& x.LimitEndDate.Value.AddMonths(-1).AddDays(15).Date >= DateTime.Now.Date
select x;
if (queList.Count() > 0)

View File

@ -224,10 +224,10 @@
}
})
$("#faskloginUrl").click(function () {
let clientId = "9379ad91-eef9-4956-a1ee-8b04bb3d42c8";
let clientId = '<%= BLL.Funs.ClientId %>';
let url = "https://login.microsoftonline.com/ecaa386b-c8df-4ce0-ad01-740cbdb5ba55/oauth2/v2.0/authorize";
let response_type = "code";
let redirect_url = encodeURIComponent("https://fcl-test.basf-ypc.net.cn/ssocallback.aspx");
let redirect_url = encodeURIComponent('<%= BLL.Funs.Redirect_url %>');
let scope = "openid profile";
let response_mode = "query";
let state = "state123";

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0"?>
<!--
有关如何配置 ASP.NET 应用程序的详细消息,请访问
@ -16,6 +16,9 @@
<!--连接字符串-->
<!--<add key="ConnectionString" value="Server=.;Database=FCLDB;Integrated Security=False; User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>-->
<!--系统名称-->
<add key="clientId" value="db8ff79d-c3b5-4f08-b56d-0e1913a13bbb"/>
<add key="clientSecret" value="N5E8Q~gvFJ665-GZGD7AHfo6sZNzVTQcdBgN4diX"/>
<add key="redirect_url" value="https://fcl.basf-ypc.net.cn/ssocallback.aspx"/>
<add key="SystemName" value="FC"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
<add key="aspnet:MaxHttpCollectionKeys" value="50000"/>
@ -84,7 +87,7 @@
<error redirect="https://localhost/FCL/OperationError.aspx" statusCode="404"/>
</customErrors>
<!--Unencrypted __VIEWSTATE parameterviewstate 保存没有加密,解决方法-->
<machineKey validation="3DES"/>
<machineKey validation="3DES" compatibilityMode="Framework20SP1"/>
<!--Body Parameters Accepted in Query:https才能访问-->
<!--<httpCookies httpOnlyCookies="true" requireSSL="true"/>-->
</system.web>
@ -137,6 +140,34 @@
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-7.6.0.0" newVersion="7.6.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.5.1" newVersion="4.0.5.1"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -2,9 +2,9 @@
<packages>
<package id="Microsoft.Bcl.AsyncInterfaces" version="1.1.0" targetFramework="net461" />
<package id="Microsoft.IdentityModel.Abstractions" version="7.6.0" targetFramework="net461" />
<package id="Microsoft.IdentityModel.JsonWebTokens" version="7.6.0" targetFramework="net461" />
<package id="Microsoft.IdentityModel.JsonWebTokens" version="6.22.1" targetFramework="net461" />
<package id="Microsoft.IdentityModel.Logging" version="7.6.0" targetFramework="net461" />
<package id="Microsoft.IdentityModel.Tokens" version="7.6.0" targetFramework="net461" />
<package id="Microsoft.IdentityModel.Tokens" version="6.22.1" targetFramework="net461" />
<package id="Microsoft.ReportingServices.ReportViewerControl.WebForms" version="150.1484.0" targetFramework="net461" />
<package id="Microsoft.SqlServer.Types" version="14.0.1016.290" targetFramework="net40" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
@ -12,12 +12,12 @@
<package id="Portable.BouncyCastle" version="1.8.9" targetFramework="net461" />
<package id="SharpZipLib" version="1.3.2" targetFramework="net461" />
<package id="System.Buffers" version="4.5.1" targetFramework="net461" />
<package id="System.IdentityModel.Tokens.Jwt" version="7.6.0" targetFramework="net461" />
<package id="System.IdentityModel.Tokens.Jwt" version="6.22.1" targetFramework="net461" />
<package id="System.Memory" version="4.5.5" targetFramework="net461" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net461" />
<package id="System.Text.Encodings.Web" version="4.7.2" targetFramework="net461" />
<package id="System.Text.Json" version="4.7.2" targetFramework="net461" />
<package id="System.Text.Json" version="4.6.0" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
</packages>

View File

@ -1,19 +1,12 @@
using BLL;
using BLL.Common;
using Microsoft.IdentityModel.Logging;
using Microsoft.IdentityModel.Tokens;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Org.BouncyCastle.Utilities.Encoders;
using System;
using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web
{
@ -24,7 +17,7 @@ namespace FineUIPro.Web
{
this.code = Request.Params["code"];
BLL.ErrLogInfo.WriteLog($"获取code={this.code}");
//BLL.ErrLogInfo.WriteLog($"获取code={this.code}");
if (string.IsNullOrEmpty(this.code))
{
Response.Redirect("~/login.aspx");
@ -43,23 +36,22 @@ namespace FineUIPro.Web
private AccessTokenModel GetAccessToken(string _code)
{
string clientId = "9379ad91-eef9-4956-a1ee-8b04bb3d42c8";
string clientSecret = "iLu8Q~4DRYAn~sMjvO1j.tgRERFWhILvLYRPNc9S";
string clientId = Funs.ClientId;
string clientSecret = Funs.ClientSecret;
string redirect_url = Funs.Redirect_url;
string grant_type = "authorization_code";
string redirect_url = "https://fcl-test.basf-ypc.net.cn/ssocallback.aspx";
string scope = "profile openid";
string baseUrl = $"https://login.microsoftonline.com/ecaa386b-c8df-4ce0-ad01-740cbdb5ba55/oauth2/v2.0/token";
try
{
string postData = $"code={code}&client_id={clientId}&client_secret={clientSecret}&grant_type={grant_type}&redirect_uri={redirect_url}&scope={scope}";
BLL.ErrLogInfo.WriteLog($"请求参数postData={postData}");
//BLL.ErrLogInfo.WriteLog($"请求参数postData={postData}");
string result = BLL.Common.HttpHelper.HttpPost(baseUrl, postData);
BLL.ErrLogInfo.WriteLog($"请求API Result={result}");
//BLL.ErrLogInfo.WriteLog($"请求API Result={result}");
var Data = JsonConvert.DeserializeObject<AccessTokenModel>(result);
return Data;
}
catch (Exception ex)
{
@ -78,7 +70,7 @@ namespace FineUIPro.Web
string[] toke_split= token.id_token.Split('.');
var header = Encoding.UTF8.GetString(Base64UrlEncoder.DecodeBytes(toke_split[0]));
var clamis= Encoding.UTF8.GetString(Base64UrlEncoder.DecodeBytes(toke_split[1]));
BLL.ErrLogInfo.WriteLog("clamis=" + clamis);
//BLL.ErrLogInfo.WriteLog("clamis=" + clamis);
JObject jo = JObject.Parse(clamis);
if (jo["cn"] != null)
{

View File

@ -9763,7 +9763,9 @@ namespace Model
private System.Nullable<System.DateTime> _CreateDate;
private System.Nullable<bool> _IsEvaluated;
private System.Nullable<bool> _IsUserEvaluated;
private System.Nullable<bool> _IsDepEvaluated;
private EntityRef<Base_Depart> _Base_Depart;
@ -9813,8 +9815,10 @@ namespace Model
partial void OnRelatedSesMailIsSendChanged();
partial void OnCreateDateChanging(System.Nullable<System.DateTime> value);
partial void OnCreateDateChanged();
partial void OnIsEvaluatedChanging(System.Nullable<bool> value);
partial void OnIsEvaluatedChanged();
partial void OnIsUserEvaluatedChanging(System.Nullable<bool> value);
partial void OnIsUserEvaluatedChanged();
partial void OnIsDepEvaluatedChanging(System.Nullable<bool> value);
partial void OnIsDepEvaluatedChanged();
#endregion
public EMC_Punishment()
@ -10232,22 +10236,42 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsEvaluated", DbType="Bit")]
public System.Nullable<bool> IsEvaluated
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUserEvaluated", DbType="Bit")]
public System.Nullable<bool> IsUserEvaluated
{
get
{
return this._IsEvaluated;
return this._IsUserEvaluated;
}
set
{
if ((this._IsEvaluated != value))
if ((this._IsUserEvaluated != value))
{
this.OnIsEvaluatedChanging(value);
this.OnIsUserEvaluatedChanging(value);
this.SendPropertyChanging();
this._IsEvaluated = value;
this.SendPropertyChanged("IsEvaluated");
this.OnIsEvaluatedChanged();
this._IsUserEvaluated = value;
this.SendPropertyChanged("IsUserEvaluated");
this.OnIsUserEvaluatedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsDepEvaluated", DbType="Bit")]
public System.Nullable<bool> IsDepEvaluated
{
get
{
return this._IsDepEvaluated;
}
set
{
if ((this._IsDepEvaluated != value))
{
this.OnIsDepEvaluatedChanging(value);
this.SendPropertyChanging();
this._IsDepEvaluated = value;
this.SendPropertyChanged("IsDepEvaluated");
this.OnIsDepEvaluatedChanged();
}
}
}
@ -18710,6 +18734,8 @@ namespace Model
private string _ViolationDegree;
private string _ShowViolationDegree;
public FC_SESReportView()
{
}
@ -19033,6 +19059,22 @@ namespace Model
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShowViolationDegree", DbType="NChar(1)")]
public string ShowViolationDegree
{
get
{
return this._ShowViolationDegree;
}
set
{
if ((this._ShowViolationDegree != value))
{
this._ShowViolationDegree = value;
}
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.FC_SignedContracts")]

View File

@ -8,7 +8,7 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>