diff --git a/FCL/BLL/Funs.cs b/FCL/BLL/Funs.cs index 9b8c27f..a01818f 100644 --- a/FCL/BLL/Funs.cs +++ b/FCL/BLL/Funs.cs @@ -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; + } + /// /// 单位设置 /// diff --git a/FCL/FineUIPro.Web/Evaluation/EvaluationNew.aspx b/FCL/FineUIPro.Web/Evaluation/EvaluationNew.aspx index 71b3957..9155583 100644 --- a/FCL/FineUIPro.Web/Evaluation/EvaluationNew.aspx +++ b/FCL/FineUIPro.Web/Evaluation/EvaluationNew.aspx @@ -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; diff --git a/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx b/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx index 08a960e..35a6c2b 100644 --- a/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx +++ b/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx @@ -14,11 +14,18 @@ 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; } - + .f-grid-cell.ycl .f-grid-cell-inner { display: none; } @@ -67,6 +74,9 @@ + + + @@ -138,7 +148,7 @@ + PageSize="15" EnableRowSelectEvent="true" Height="200px" OnRowDataBound="Grid2_RowDataBound"> @@ -161,6 +171,12 @@ + + + + + @@ -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); + } }); + }); diff --git a/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx.cs b/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx.cs index 128287f..e1d6b19 100644 --- a/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx.cs +++ b/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx.cs @@ -1,15 +1,19 @@ 锘縰sing 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; } } + + // 杩濈珷鎵e垎 + 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; + } + } } diff --git a/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx.designer.cs b/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx.designer.cs index 5525d95..ecd4aad 100644 --- a/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx.designer.cs +++ b/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Evaluation { - - - public partial class SafetyEvaluation { - +namespace FineUIPro.Web.Evaluation +{ + + + public partial class SafetyEvaluation + { + /// /// form1 鎺т欢銆 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 鎺т欢銆 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 鎺т欢銆 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelTopRegion 鎺т欢銆 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.Panel panelTopRegion; - + /// /// Grid1 鎺т欢銆 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar1 鎺т欢銆 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// rdbUserType 鎺т欢銆 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.RadioButtonList rdbUserType; - + /// /// drpUser 鎺т欢銆 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.DropDownList drpUser; - + /// /// drpContractNo 鎺т欢銆 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.DropDownList drpContractNo; - + /// /// btnUndo 鎺т欢銆 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.Button btnUndo; - + /// /// btnAutoEvaluation 鎺т欢銆 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.Button btnAutoEvaluation; - + /// /// ToolbarFill1 鎺т欢銆 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// hdFo 鎺т欢銆 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.HiddenField hdFo; - + /// /// BatchEvaluation 鎺т欢銆 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.Button BatchEvaluation; - + /// /// LinkFoNo 鎺т欢銆 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::System.Web.UI.WebControls.LinkButton LinkFoNo; - + /// /// hidisDepScore1 鎺т欢銆 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.HiddenField hidisDepScore1; - + /// /// hidisDepScore2 鎺т欢銆 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.HiddenField hidisDepScore2; - + /// /// hidisDepScore3 鎺т欢銆 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.HiddenField hidisDepScore3; - + /// /// hidisDepScore4 鎺т欢銆 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.HiddenField hidisDepScore4; - + /// /// hidisDepScore5 鎺т欢銆 /// @@ -191,7 +193,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.HiddenField hidisDepScore5; - + /// /// hidisDepScore6 鎺т欢銆 /// @@ -200,7 +202,34 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.HiddenField hidisDepScore6; - + + /// + /// hidMaxScore1 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.HiddenField hidMaxScore1; + + /// + /// hidMaxScore2 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.HiddenField hidMaxScore2; + + /// + /// hidMsg 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.HiddenField hidMsg; + /// /// lblContractor 鎺т欢銆 /// @@ -209,7 +238,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::System.Web.UI.WebControls.Label lblContractor; - + /// /// wjsc 鎺т欢銆 /// @@ -218,7 +247,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.GroupField wjsc; - + /// /// panelBottomRegion 鎺т欢銆 /// @@ -227,7 +256,7 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.Panel panelBottomRegion; - + /// /// Grid2 鎺т欢銆 /// @@ -236,7 +265,16 @@ namespace FineUIPro.Web.Evaluation { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.Grid Grid2; - + + /// + /// Label3 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::System.Web.UI.WebControls.Label Label3; + /// /// Window1 鎺т欢銆 /// diff --git a/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user b/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user index c048173..c498d8f 100644 --- a/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/FCL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -2,7 +2,7 @@ ProjectFiles - Debug|Any CPU + Release|Any CPU true diff --git a/FCL/FineUIPro.Web/Global.asax.cs b/FCL/FineUIPro.Web/Global.asax.cs index a646744..c1f09df 100644 --- a/FCL/FineUIPro.Web/Global.asax.cs +++ b/FCL/FineUIPro.Web/Global.asax.cs @@ -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) diff --git a/FCL/FineUIPro.Web/Login.aspx b/FCL/FineUIPro.Web/Login.aspx index 724d7fc..a4a8435 100644 --- a/FCL/FineUIPro.Web/Login.aspx +++ b/FCL/FineUIPro.Web/Login.aspx @@ -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"; diff --git a/FCL/FineUIPro.Web/Web.config b/FCL/FineUIPro.Web/Web.config index d291e38..0bc7abb 100644 --- a/FCL/FineUIPro.Web/Web.config +++ b/FCL/FineUIPro.Web/Web.config @@ -1,35 +1,35 @@ -锘 +锘 - -
- - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FCL/FineUIPro.Web/ssocallback.aspx.cs b/FCL/FineUIPro.Web/ssocallback.aspx.cs index 2e85fcc..ea96834 100644 --- a/FCL/FineUIPro.Web/ssocallback.aspx.cs +++ b/FCL/FineUIPro.Web/ssocallback.aspx.cs @@ -17,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"); @@ -36,23 +36,22 @@ namespace FineUIPro.Web private AccessTokenModel GetAccessToken(string _code) { - string clientId = System.Web.Configuration.WebConfigurationManager.AppSettings["clientId"]; - string clientSecret = System.Web.Configuration.WebConfigurationManager.AppSettings["clientSecret"]; + string clientId = Funs.ClientId; + string clientSecret = Funs.ClientSecret; + string redirect_url = Funs.Redirect_url; string grant_type = "authorization_code"; - string redirect_url = System.Web.Configuration.WebConfigurationManager.AppSettings["redirect_url"]; 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(result); return Data; - } catch (Exception ex) { @@ -71,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) { diff --git a/FCL/WebApi/WebApi.csproj.user b/FCL/WebApi/WebApi.csproj.user index ca0d73e..643f3e5 100644 --- a/FCL/WebApi/WebApi.csproj.user +++ b/FCL/WebApi/WebApi.csproj.user @@ -8,7 +8,7 @@ - Debug|Any CPU + Release|Any CPU