From c750debcd24e88f26984acce74ab56c4e00366ef Mon Sep 17 00:00:00 2001
From: shecs <408299694@qq.com>
Date: Mon, 8 Dec 2025 09:24:37 +0800
Subject: [PATCH] 111
---
DataBase/版本日志/FCLDB_2024.05.14.sql | 57 --
DataBase/版本日志/FCLDB_2024.05.16.sql | 42 -
DataBase/版本日志/FCLDB_2024.06.06.sql | 55 --
DataBase/版本日志/FCLDB_SynHR_2024.04.29.sql | 2 -
FCL/BLL/APIService/SyncUserInfoService.cs | 262 +++++-
FCL/BLL/Common/HttpHelper.cs | 2 +-
FCL/BLL/Common/MailHelper.cs | 8 +-
FCL/BLL/SES/ContractManagementService.cs | 21 +
FCL/BLL/SES/PunishmentService.cs | 2 +-
FCL/BLL/bin/Debug/Model.xml | 5 +
.../Evaluation/ContractorEvaluation.aspx | 10 +-
.../Evaluation/ContractorEvaluation.aspx.cs | 87 +-
.../ContractorEvaluation.aspx.designer.cs | 62 +-
.../Evaluation/ContractorEvaluationEdit.aspx | 27 +-
.../ContractorEvaluationEdit.aspx.cs | 48 +-
.../ContractorEvaluationEdit.aspx.designer.cs | 27 +
.../Evaluation/PerformanceReport.aspx.cs | 4 +-
.../Evaluation/SafetyPerformance.aspx | 198 ++++
.../Evaluation/SafetyPerformance.aspx.cs | 299 ++++++
.../SafetyPerformance.aspx.designer.cs | 242 +++++
.../File/Excel/承包商评估表.xlsx | Bin 19958 -> 19983 bytes
.../File/Excel/承包商评估表1.xlsx | Bin 0 -> 19958 bytes
FCL/FineUIPro.Web/FineUIPro.Web.csproj | 8 +
FCL/FineUIPro.Web/FineUIPro.Web.csproj.user | 4 +-
FCL/FineUIPro.Web/Global.asax.cs | 850 +++++++++++++++++-
FCL/FineUIPro.Web/Login.aspx.cs | 28 +-
FCL/FineUIPro.Web/SES/SESRelatedData.aspx | 51 ++
FCL/FineUIPro.Web/SES/SESRelatedData.aspx.cs | 181 +++-
.../SES/SESRelatedData.aspx.designer.cs | 81 ++
.../SES/SESRelatedDataContractManage1.aspx.cs | 4 +-
.../SESRelatedDataContractManage10.aspx.cs | 6 +-
.../SESRelatedDataContractManage11.aspx.cs | 5 +-
.../SESRelatedDataContractManage12.aspx.cs | 5 +-
.../SESRelatedDataContractManage13.aspx.cs | 4 +-
.../SES/SESRelatedDataContractManage2.aspx.cs | 18 +-
.../SES/SESRelatedDataContractManage3.aspx.cs | 8 +-
.../SES/SESRelatedDataContractManage4.aspx.cs | 7 +-
.../SES/SESRelatedDataContractManage5.aspx.cs | 4 +-
.../SES/SESRelatedDataContractManage6.aspx.cs | 34 +-
.../SES/SESRelatedDataContractManage7.aspx.cs | 34 +-
.../SES/SESRelatedDataContractManage8.aspx.cs | 5 +-
.../SES/SESRelatedDataContractManage9.aspx.cs | 6 +-
FCL/FineUIPro.Web/SysManage/UserList.aspx.cs | 8 +
FCL/Model/APIItem/ResponeData.cs | 3 +
FCL/Model/Model.cs | 755 +++++++++++++++-
FCL/WebApi/WebApi.csproj | 10 +-
.../Evaluation/ContractorEvaluation.aspx | 126 +++
.../Evaluation/ContractorEvaluationEdit.aspx | 347 +++++++
.../Evaluation/SafetyPerformance.aspx | 198 ++++
.../PackFile/bin/App_GlobalResources.compiled | 2 +
.../PackFile/bin/App_global.asax.compiled | 6 +
FCLPackFile_2025.12.01/PackFile/bin/BLL.dll | Bin 0 -> 220672 bytes
.../PackFile/bin/FineUIPro.Web.dll | Bin 0 -> 1352192 bytes
.../PackFile/bin/FineUIPro.Web.dll.config | 179 ++++
FCLPackFile_2025.12.01/PackFile/bin/Model.dll | Bin 0 -> 398336 bytes
FCLPackFile_2025.12.01/PackFile/bin/UI.dll | Bin 0 -> 8704 bytes
.../版本日志/FCLDB_2025-11-25.sql | 140 +++
web.config | 72 ++
58 files changed, 4308 insertions(+), 341 deletions(-)
delete mode 100644 DataBase/版本日志/FCLDB_2024.05.14.sql
delete mode 100644 DataBase/版本日志/FCLDB_2024.05.16.sql
delete mode 100644 DataBase/版本日志/FCLDB_2024.06.06.sql
delete mode 100644 DataBase/版本日志/FCLDB_SynHR_2024.04.29.sql
create mode 100644 FCL/FineUIPro.Web/Evaluation/SafetyPerformance.aspx
create mode 100644 FCL/FineUIPro.Web/Evaluation/SafetyPerformance.aspx.cs
create mode 100644 FCL/FineUIPro.Web/Evaluation/SafetyPerformance.aspx.designer.cs
create mode 100644 FCL/FineUIPro.Web/File/Excel/承包商评估表1.xlsx
create mode 100644 FCLPackFile_2025.12.01/PackFile/Evaluation/ContractorEvaluation.aspx
create mode 100644 FCLPackFile_2025.12.01/PackFile/Evaluation/ContractorEvaluationEdit.aspx
create mode 100644 FCLPackFile_2025.12.01/PackFile/Evaluation/SafetyPerformance.aspx
create mode 100644 FCLPackFile_2025.12.01/PackFile/bin/App_GlobalResources.compiled
create mode 100644 FCLPackFile_2025.12.01/PackFile/bin/App_global.asax.compiled
create mode 100644 FCLPackFile_2025.12.01/PackFile/bin/BLL.dll
create mode 100644 FCLPackFile_2025.12.01/PackFile/bin/FineUIPro.Web.dll
create mode 100644 FCLPackFile_2025.12.01/PackFile/bin/FineUIPro.Web.dll.config
create mode 100644 FCLPackFile_2025.12.01/PackFile/bin/Model.dll
create mode 100644 FCLPackFile_2025.12.01/PackFile/bin/UI.dll
create mode 100644 FCLPackFile_2025.12.01/版本日志/FCLDB_2025-11-25.sql
create mode 100644 web.config
diff --git a/DataBase/版本日志/FCLDB_2024.05.14.sql b/DataBase/版本日志/FCLDB_2024.05.14.sql
deleted file mode 100644
index 2f029c5..0000000
--- a/DataBase/版本日志/FCLDB_2024.05.14.sql
+++ /dev/null
@@ -1,57 +0,0 @@
-
-ALTER TABLE dbo.FC_SESRelatedData ADD OtherDef NVARCHAR(300) NULL
-GO
-
-
-ALTER VIEW [dbo].[View_Contractor_Evaluation]
-AS
-/*********框架承包商评估表**********/
-SELECT t.*,(t.Spending_commitment+t.Forecasted) AS Total,
- (CASE WHEN t.YearDiff<>0 THEN CONVERT(DECIMAL(18,2),(t.Spending_commitment+t.Forecasted)/t.YearDiff) ELSE NULL END) AS YearAvg
-FROM
-(SELECT datas.ID, datas.FO_NO, datas.TechnicalBonus,datas.SafetyBonus,
-(CASE WHEN con.Contractor IS NULL THEN con.ContractorCN
- WHEN con.ContractorCN IS NULL THEN con.Contractor ELSE con.Contractor+con.ContractorCN END)AS Contractor,
-datas.DisciplineId,
-(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,
-datas.Buyer,
-datas.BuyerId,
-datas.Main_Coordinator AS Main_CoordinatorId,
-u2.UserName AS Main_Coordinator,
-datas.Contract_Admin,
-datas.Validate_Date,
-datas.Expire_Date,
-(CASE WHEN datas.Validate_Date IS NOT NULL AND datas.Expire_Date IS NOT NULL THEN CONVERT(DECIMAL(9,2),DATEDIFF(DAY,datas.Validate_Date,datas.Expire_Date)*1.00/365) ELSE 0 END ) AS YearDiff,
-v.Spending_commitment AS Spending_commitment,
-(CASE WHEN datas.Proportion_of_FC_Definition IS NOT NULL THEN CONVERT(VARCHAR(10),CONVERT(DECIMAL(9,2),datas.Proportion_of_FC_Definition*100.0))+'%' END) AS VolumeAllocation,
-CONVERT(DECIMAL(18,2), ISNULL(datas.Forecasted,0)) AS Forecasted,
-datas.ReviewOfFC,datas.PriceEvaluation1,datas.PriceEvaluation2,datas.PriceLevel,datas.enumeration,datas.NCRIsReview,datas.NCRReviewNum,
-datas.IsInquiry,datas.InquiryNum,datas.AuditResult,datas.BoQIsAudit,datas.BoQAuditComments,datas.IsOthers,datas.OthersNum,datas.OtherDef,datas.Proposed
-
-FROM FC_SESRelatedData AS datas
-LEFT JOIN dbo.Base_Contractor AS con ON con.ContractorId = datas.Contractor
-LEFT JOIN dbo.Sys_User AS u2 ON u2.UserId = datas.Main_Coordinator
-LEFT JOIN dbo.Base_Discipline AS dis ON dis.DisciplineId = datas.DisciplineId
-LEFT JOIN
-(SELECT datas.FO_NO,
- (CONVERT(DECIMAL(18,2),ISNULL(c.CheckedValue,0))+CONVERT(DECIMAL(18,2),ISNULL(a.Commitment,0))) AS Spending_commitment
- FROM FC_SESRelatedData AS datas
- LEFT JOIN dbo.Base_Discipline AS dis ON dis.DisciplineId = datas.DisciplineId
- LEFT JOIN dbo.Base_FOType AS ft ON ft.FOTypeId = datas.FOTypeId
- LEFT JOIN(SELECT SUM(ISNULL(SSR_Actual_cost,0)) AS CheckedValue,FO FROM dbo.FC_SESReport
- WHERE Accepted='X' AND Deleted <> 'X' AND Blocked <> 'X' GROUP BY FO) AS c ON c.FO=datas.FO_NO
- LEFT JOIN(SELECT SUM(ISNULL(SSR_budget,0)) AS Commitment,FO FROM dbo.FC_SESReport
- WHERE Accepted <> 'X' AND Deleted <> 'X' AND Blocked <> 'X' GROUP BY FO) AS a ON a.FO=datas.FO_NO
- --WHERE ft.FOType!='OEM' AND dis.Discipline NOT LIKE '%Basf Expert Service%'
- -- AND datas.FC_Status!='Closed' AND (datas.Expire_Date IS NOT NULL AND DATEDIFF(MONTH,Expire_Date,GETDATE())<=1)
-
-)v ON v.FO_NO = datas.FO_NO
-)t
-
-
-
-GO
-
-
diff --git a/DataBase/版本日志/FCLDB_2024.05.16.sql b/DataBase/版本日志/FCLDB_2024.05.16.sql
deleted file mode 100644
index 3476c18..0000000
--- a/DataBase/版本日志/FCLDB_2024.05.16.sql
+++ /dev/null
@@ -1,42 +0,0 @@
-ALTER TABLE dbo.Base_FileType ADD IsExport BIT NULL
-GO
-UPDATE dbo.Base_FileType SET IsExport=0
-GO
-
-ALTER VIEW [dbo].[View_FC_ContractManagement]
-AS
-SELECT cm.OccurDate,fc.FO_NO,dis.Discipline AS DisciplineEn,dis.DisciplineCN,con.Contractor AS ContractorEn,con.ContractorCN,
- (CASE WHEN con.Contractor IS NULL THEN con.ContractorCN WHEN con.ContractorCN IS NULL THEN con.Contractor ELSE con.Contractor+con.ContractorCN END)AS Contractor,
- (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,
- cm.Remark,ftype.FileType,u.UserName AS Contract_Admin, u2.UserName AS Main_Coordinator,mcdep.DepartName AS MCDept,
- u3.UserName AS User_Representative, bycDep.DepartCode AS BycDept,ftype.IsExport
-FROM dbo.FC_ContractManagement cm
-LEFT JOIN dbo.FC_SESRelatedData fc ON fc.ID = cm.FC_ID
-LEFT JOIN dbo.Base_Discipline AS dis ON dis.DisciplineId = fc.DisciplineId
-LEFT JOIN dbo.Base_Contractor AS con ON con.ContractorId = fc.Contractor
-LEFT JOIN dbo.Base_FileType ftype ON ftype.FileTypeId = cm.FileTypeId
-LEFT JOIN dbo.Sys_User AS u ON u.UserId = fc.Contract_Admin
-LEFT JOIN dbo.Sys_User AS u2 ON u2.UserId = fc.Main_Coordinator
-LEFT JOIN dbo.Sys_User AS u3 ON u3.UserId=fc.User_Representative
-LEFT JOIN dbo.Base_Depart mcdep ON mcdep.DepartId = u2.DepartId
-LEFT JOIN dbo.Base_Depart bycDep ON bycDep.DepartId=cm.BycDept
-
-
-GO
-
-CREATE VIEW [dbo].[View_EMC_Contractor_Qualification]
-AS
-SELECT cm.FoId,fc.FO_NO,cm.QueName,cm.QueDef,cm.QueType,cm.LimitStartDate,cm.LimitEndDate,cm.Remark,
- (CASE WHEN con.Contractor IS NULL THEN con.ContractorCN WHEN con.ContractorCN IS NULL THEN con.Contractor ELSE con.Contractor+con.ContractorCN END)AS Contractor,
- (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,
- u.UserName AS Contract_Admin, u2.UserName AS Main_Coordinator,fc.Expire_Date,fc.Contractor AS ContractorId ,fc.FC_Status
-FROM dbo.EMC_Contractor_Qualification cm
-LEFT JOIN dbo.FC_SESRelatedData fc ON fc.ID = cm.FoId
-LEFT JOIN dbo.Base_Discipline AS dis ON dis.DisciplineId = fc.DisciplineId
-LEFT JOIN dbo.Base_Contractor AS con ON con.ContractorId = fc.Contractor
-LEFT JOIN dbo.Sys_User AS u ON u.UserId = fc.Contract_Admin
-LEFT JOIN dbo.Sys_User AS u2 ON u2.UserId = fc.Main_Coordinator
-
-GO
-
-
diff --git a/DataBase/版本日志/FCLDB_2024.06.06.sql b/DataBase/版本日志/FCLDB_2024.06.06.sql
deleted file mode 100644
index 18b6aa9..0000000
--- a/DataBase/版本日志/FCLDB_2024.06.06.sql
+++ /dev/null
@@ -1,55 +0,0 @@
-
-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
-
-
-
-
diff --git a/DataBase/版本日志/FCLDB_SynHR_2024.04.29.sql b/DataBase/版本日志/FCLDB_SynHR_2024.04.29.sql
deleted file mode 100644
index f3572ff..0000000
--- a/DataBase/版本日志/FCLDB_SynHR_2024.04.29.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE dbo.SyncDataUserLogs ADD Josn NVARCHAR(MAX)
-GO
\ No newline at end of file
diff --git a/FCL/BLL/APIService/SyncUserInfoService.cs b/FCL/BLL/APIService/SyncUserInfoService.cs
index 90612d5..62bc487 100644
--- a/FCL/BLL/APIService/SyncUserInfoService.cs
+++ b/FCL/BLL/APIService/SyncUserInfoService.cs
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace BLL.APIService
{
- public class SyncUserInfoService
+ public class SyncUserInfoService
{
private const string GETTOKENAPI = "https://ppsintf.basf-ypc.net.cn/ppsinterface/token/getToken";
private const string GETHRINfOAPI = "https://ppsintf.basf-ypc.net.cn/ppsinterface/interfaceInfo/getHrInfo";
@@ -28,25 +28,29 @@ namespace BLL.APIService
}
}
+
+ ///
+ /// 获取HR信息并进行逻辑处理
+ ///
public static void GetSyncUserInfo()
{
- //var token = GetUserToken(); //获取接口token
+ var token = GetUserToken(); //获取接口token
var dic = GetDepartList(); //把本地数据库中的部门全部取出作为字典
var dicUser = GetUserInfoByAccount(); //同上把所有用户取出来
- string file = System.Web.HttpContext.Current.Server.MapPath("~/data.txt");
- string result = System.IO.File.ReadAllText(file);
- //string result = BLL.Common.HttpHelper.HttpPostRequest(GETHRINfOAPI, "", token);
+ //string file = System.Web.HttpContext.Current.Server.MapPath("~/data.txt");
+ //string result = System.IO.File.ReadAllText(file);
+ string result = BLL.Common.HttpHelper.HttpPostRequest(GETHRINfOAPI, "", token);
var data = JsonHelper.DeserializeJsonToObject>>(result);
List logList = new List();
if (data.code == "200")
{
- //ErrLogInfo.WriteLog($"userinfo={data.data}");
+ ErrLogInfo.WriteLog($"userinfo={data.data}");
var userInfo = data.data;
- string batchNo= DateTime.Now.ToString("yyyyMMddHHmmss");
+ string batchNo = DateTime.Now.ToString("yyyyMMddHHmmss");
DateTime syncTime = DateTime.Now;
foreach (var item in userInfo)
{
- if (item.ppsHrOtherEmp==null || string.IsNullOrEmpty(item.ppsHrOtherEmp.bgdid))
+ if (item.ppsHrOtherEmp == null || string.IsNullOrEmpty(item.ppsHrOtherEmp.bgdid))
{
Model.SyncDataUserLogs log3 = new Model.SyncDataUserLogs();
log3.BatchNo = batchNo;
@@ -87,7 +91,7 @@ namespace BLL.APIService
departId = InsertDepartInfo(dic, userId, item.section); //插入本地数据库部门
}
}
- else if((item.section.ToUpper() == "CTT" && item.position.Contains("Manager")) || item.section.ToUpper() == "CTT" && item.position.Contains("General Manager"))
+ else if ((item.section.ToUpper() == "CTT" && item.position.Contains("Manager")) || item.section.ToUpper() == "CTT" && item.position.Contains("General Manager"))
{
//不处理
//判断是否存在部门
@@ -107,11 +111,16 @@ namespace BLL.APIService
if (IsExistsDepart(dic, item.section))
{
departId = dic[item.section]; //取出本地数据库部门ID
- UpdateDepartInfo(userId, item.section); //更新部门表数据
+
+ //eftEffectiveDate有值说明此人已离职
+ if (!item.ppsHrOtherEmp.leftEffectiveDate.HasValue)
+ {
+ UpdateDepartInfo(userId, item.section); //更新部门表数据
+ }
}
else
{
- departId = InsertDepartInfo(dic,userId, item.section); //插入本地数据库部门
+ departId = InsertDepartInfo(dic, userId, item.section); //插入本地数据库部门
}
}
else
@@ -127,11 +136,14 @@ namespace BLL.APIService
if (IsExistsDepart(dic, itemDepartCode))
{
departId = dic[itemDepartCode]; //取出自身部门所在的部门ID
- UpdateDepartInfo(itemUserId, itemDepartCode); //更新自身部门的部门数据。
+ if (!item.ppsHrOtherEmp.leftEffectiveDate.HasValue)
+ {
+ UpdateDepartInfo(itemUserId, itemDepartCode); //更新自身部门的部门数据。
+ }
}
else
{
- departId = InsertDepartInfo(dic,itemUserId, itemDepartCode); //插入本地部门表数据
+ departId = InsertDepartInfo(dic, itemUserId, itemDepartCode); //插入本地部门表数据
}
}
else
@@ -149,17 +161,19 @@ namespace BLL.APIService
//上级用户所在的部门已经存在
if (IsExistsDepart(dic, parentDepatCode))
{
- //departId = dic[parentDepatCode]; //取出他上级用户所在的部门ID
- UpdateDepartInfo(parentUserId, parentDepatCode); //更新部门信息
+ //departId = dic[parentDepatCode]; //取出他上级用户所在的部门ID
+ if (!parentUser.ppsHrOtherEmp.leftEffectiveDate.HasValue)
+ {
+ UpdateDepartInfo(parentUserId, parentDepatCode); //更新部门信息
+ }
//并且插入自己子部门信息
- departId=InsertDepartInfoChilds(dic,parentUserId, item.section);
+ departId = InsertDepartInfoChilds(dic, parentUserId, item.section);
}
else
{
- departId = InsertDepartInfo(dic,parentUserId, parentDepatCode); //插入他上级用户所在的部门到部门表中去
+ departId = InsertDepartInfo(dic, parentUserId, parentDepatCode); //插入他上级用户所在的部门到部门表中去
}
}
-
}
log.DepatId = departId;
@@ -181,7 +195,7 @@ namespace BLL.APIService
#region 同步用户
Model.SyncDataUserLogs log2 = new Model.SyncDataUserLogs();
string resultId = string.Empty;
-
+
try
{
log2.BatchNo = batchNo;
@@ -197,7 +211,7 @@ namespace BLL.APIService
}
else
{
-
+
resultId = UpdateUserInfo(item, departId);
log.UserId = resultId;
log.DataType = 1; //同步用户类型数据
@@ -209,13 +223,13 @@ namespace BLL.APIService
{
log.UserId = resultId;
log.DataType = 1;
- log2.Remark =$"同步失败:{ex.Message}";
+ log2.Remark = $"同步失败:{ex.Message}";
log2.IsSuccess = false;
}
//这里记录同步用户的日志
logList.Add(log2);
#endregion
-
+
}
@@ -227,6 +241,205 @@ namespace BLL.APIService
}
}
+ //public static void GetSyncUserInfo1()
+ //{
+ // var token = GetUserToken(); //获取接口token
+ // var dic = GetDepartList(); //把本地数据库中的部门全部取出作为字典
+ // var dicUser = GetUserInfoByAccount(); //同上把所有用户取出来
+ // //string file = System.Web.HttpContext.Current.Server.MapPath("~/data.txt");
+ // //string result = System.IO.File.ReadAllText(file);
+ // string result = BLL.Common.HttpHelper.HttpPostRequest(GETHRINfOAPI, "", token);
+ // var data = JsonHelper.DeserializeJsonToObject>>(result);
+ // List logList = new List();
+ // if (data.code == "200")
+ // {
+ // //ErrLogInfo.WriteLog($"userinfo={data.data}");
+ // var userInfo = data.data;
+ // string batchNo= DateTime.Now.ToString("yyyyMMddHHmmss");
+ // DateTime syncTime = DateTime.Now;
+ // foreach (var item in userInfo)
+ // {
+ // if (item.ppsHrOtherEmp==null || string.IsNullOrEmpty(item.ppsHrOtherEmp.bgdid))
+ // {
+ // Model.SyncDataUserLogs log3 = new Model.SyncDataUserLogs();
+ // log3.BatchNo = batchNo;
+ // log3.CreatedTime = syncTime;
+ // log3.DataType = 3; //错误在账号信息类型
+ // log3.DepatId = string.Empty;
+ // log3.UserId = string.Empty;
+ // log3.IsSuccess = false;
+ // log3.Remark = $"当前账号为空:{JsonHelper.SerializeObject(item)}";
+ // logList.Add(log3);
+ // continue;
+ // }
+ // var account = item.ppsHrOtherEmp.bgdid;// 当前json的账号
+ // var manager = item.ppsHrOtherEmp.manager; //当前经理的员工号
+ // account = account.ToLower();
+ // var user = dicUser.ContainsKey(account); //判断当前账号是否在我们数据库中
+ // string userId = user ? dicUser[account] : null; //存在那就是把用户id取出来,否则用户id就是null
+
+ // #region 同步部门
+ // //部门id
+ // string departId = "";
+ // Model.SyncDataUserLogs log = new Model.SyncDataUserLogs();
+ // try
+ // {
+ // log.BatchNo = batchNo;
+ // log.CreatedTime = syncTime;
+ // //如果是经理,总经理,总监
+ // if (item.section.ToUpper() == "CTT" && item.position.Contains("Director"))
+ // {
+ // //判断是否存在部门
+ // if (IsExistsDepart(dic, item.section))
+ // {
+ // departId = dic[item.section]; //取出本地数据库部门ID
+ // UpdateDepartInfo(userId, item.section); //更新部门表数据
+ // }
+ // else
+ // {
+ // departId = InsertDepartInfo(dic, userId, item.section); //插入本地数据库部门
+ // }
+ // }
+ // else if((item.section.ToUpper() == "CTT" && item.position.Contains("Manager")) || item.section.ToUpper() == "CTT" && item.position.Contains("General Manager"))
+ // {
+ // //不处理
+ // //判断是否存在部门
+ // if (IsExistsDepart(dic, item.section))
+ // {
+ // departId = dic[item.section]; //取出本地数据库部门ID
+ // // UpdateDepartInfo(null, item.section); //更新部门表数据
+ // }
+ // else
+ // {
+ // departId = InsertDepartInfo(dic, null, item.section); //插入本地数据库部门
+ // }
+ // }
+ // else if ((item.position.Contains("Manager") || item.position.Contains("Director") || item.position.Contains("General Manager")))
+ // {
+ // //判断是否存在部门
+ // if (IsExistsDepart(dic, item.section))
+ // {
+ // departId = dic[item.section]; //取出本地数据库部门ID
+ // UpdateDepartInfo(userId, item.section); //更新部门表数据
+ // }
+ // else
+ // {
+ // departId = InsertDepartInfo(dic,userId, item.section); //插入本地数据库部门
+ // }
+ // }
+ // else
+ // {
+ // //查找当前用户的上级经理是谁
+ // var parentUser = userInfo.Where(t => t.ppsHrOtherEmp.bycstaffNo == manager).FirstOrDefault();
+ // if (parentUser == null)
+ // {
+ // //找不到就是他自己
+ // string itemDepartCode = item.section.ToUpper();
+ // string itemUserId = userId;
+ // //判断当前自身的部门是否存在
+ // if (IsExistsDepart(dic, itemDepartCode))
+ // {
+ // departId = dic[itemDepartCode]; //取出自身部门所在的部门ID
+ // UpdateDepartInfo(itemUserId, itemDepartCode); //更新自身部门的部门数据。
+ // }
+ // else
+ // {
+ // departId = InsertDepartInfo(dic,itemUserId, itemDepartCode); //插入本地部门表数据
+ // }
+ // }
+ // else
+ // {
+ // //找到了就是上级的用户部门+LeaderID;
+ // string parentDepatCode = parentUser.section.ToUpper(); //上级部门编号
+ // string parentAccount = parentUser.ppsHrOtherEmp.bgdid; //上级用户的账号
+ // if (!string.IsNullOrEmpty(parentAccount))
+ // parentAccount = parentAccount.ToLower();
+ // else
+ // parentAccount = string.Empty;
+
+ // var parentLocalUser = dicUser.ContainsKey(parentAccount); //查找本地数据库的上级用户是否存在
+ // string parentUserId = parentLocalUser ? dicUser[parentAccount] : null;
+ // //上级用户所在的部门已经存在
+ // if (IsExistsDepart(dic, parentDepatCode))
+ // {
+ // //departId = dic[parentDepatCode]; //取出他上级用户所在的部门ID
+ // UpdateDepartInfo(parentUserId, parentDepatCode); //更新部门信息
+ // //并且插入自己子部门信息
+ // departId=InsertDepartInfoChilds(dic,parentUserId, item.section);
+ // }
+ // else
+ // {
+ // departId = InsertDepartInfo(dic,parentUserId, parentDepatCode); //插入他上级用户所在的部门到部门表中去
+ // }
+ // }
+
+ // }
+
+ // log.DepatId = departId;
+ // log.DataType = 0; //同步部门类型数据
+ // log.Remark = "同步成功";
+ // log.IsSuccess = true;
+ // }
+ // catch (Exception ex)
+ // {
+ // log.DepatId = departId;
+ // log.DataType = 0;
+ // log.Remark = ex.Message;
+ // log.IsSuccess = false;
+ // }
+ // //这里记录同步部门的日志
+ // logList.Add(log);
+ // #endregion
+
+ // #region 同步用户
+ // Model.SyncDataUserLogs log2 = new Model.SyncDataUserLogs();
+ // string resultId = string.Empty;
+
+ // try
+ // {
+ // log2.BatchNo = batchNo;
+ // log2.CreatedTime = syncTime;
+ // log2.Josn = JsonHelper.SerializeObject(item);
+ // //当前本地数据库用户表不存在此用户
+ // if (!user)
+ // {
+ // //插入
+ // resultId = InsertUserInfo(item, departId);
+ // log.UserId = resultId;
+ // log.DataType = 1;
+ // }
+ // else
+ // {
+
+ // resultId = UpdateUserInfo(item, departId);
+ // log.UserId = resultId;
+ // log.DataType = 1; //同步用户类型数据
+ // }
+ // log2.Remark = "同步成功";
+ // log2.IsSuccess = true;
+ // }
+ // catch (Exception ex)
+ // {
+ // log.UserId = resultId;
+ // log.DataType = 1;
+ // log2.Remark =$"同步失败:{ex.Message}";
+ // log2.IsSuccess = false;
+ // }
+ // //这里记录同步用户的日志
+ // logList.Add(log2);
+ // #endregion
+
+
+ // }
+
+ // AddSyncLogs(logList);
+ // }
+ // else
+ // {
+ // ErrLogInfo.WriteLog("请求失败:返回结果:" + result);
+ // }
+ //}
+
#region 私有方法
///
/// 获取所有的BU
@@ -236,9 +449,7 @@ namespace BLL.APIService
{
return BLL.Funs.DB.Base_Depart.ToList()
.ToDictionary(t => t.DepartCode.ToUpper(), t => t.DepartId);
-
-
- }
+ }
///
/// 获取所有的User
@@ -309,6 +520,7 @@ namespace BLL.APIService
}
return result.DepartId;
}
+
///
/// 判断是否存在BU
///
diff --git a/FCL/BLL/Common/HttpHelper.cs b/FCL/BLL/Common/HttpHelper.cs
index 6c4228e..eb2dbca 100644
--- a/FCL/BLL/Common/HttpHelper.cs
+++ b/FCL/BLL/Common/HttpHelper.cs
@@ -41,7 +41,7 @@ namespace BLL.Common
///
public static string HttpPostRequest(string url, string postJsonData,string token)
{
- //BLL.ErrLogInfo.WriteLog("token=" + token);
+ BLL.ErrLogInfo.WriteLog("token=" + token);
string strPostReponse = string.Empty;
try
{
diff --git a/FCL/BLL/Common/MailHelper.cs b/FCL/BLL/Common/MailHelper.cs
index 71cd1eb..bd0a900 100644
--- a/FCL/BLL/Common/MailHelper.cs
+++ b/FCL/BLL/Common/MailHelper.cs
@@ -221,7 +221,7 @@ namespace BLL.Common
/// 抄送(多个抄送人用";"隔开,最后一个不能有";")
/// 发送次数
/// 输出信息
- public static bool SendNetMail2(EmailPop ps, string mailFrom, string[] mailTo, string mailSubject, string mailBody, string mailPriority, string[] mailCC, string sendNum, out string resultMessage)
+ public static bool SendNetMail2(EmailPop ps, string mailFrom, string[] mailTo, string mailSubject, string mailBody, string mailPriority, string[] mailCC, out string resultMessage)
{
var englishmonth = DateTime.Now.ToString("MMMM", CultureInfo.CreateSpecificCulture("en-GB"));
bool result = true;
@@ -303,8 +303,8 @@ namespace BLL.Common
{
Model.SendEmail newSendEmail = new Model.SendEmail();
newSendEmail.EmailId = Guid.NewGuid().ToString();
- newSendEmail.EmailTile = mailSubject + sendNum;
- newSendEmail.EmailContent = ReplaceHtmlTag(mailBody) + sendNum;
+ newSendEmail.EmailTile = mailSubject;
+ newSendEmail.EmailContent = ReplaceHtmlTag(mailBody);
newSendEmail.EmailURL = send;
newSendEmail.EmailName = send;
@@ -328,7 +328,7 @@ namespace BLL.Common
{
Model.SendEmail newSendEmail = new Model.SendEmail();
newSendEmail.EmailId = Guid.NewGuid().ToString();
- newSendEmail.EmailTile = mailSubject + sendNum;
+ newSendEmail.EmailTile = mailSubject;
newSendEmail.EmailContent = ReplaceHtmlTag(mailBody);
newSendEmail.EmailURL = send;
newSendEmail.EmailName = send;
diff --git a/FCL/BLL/SES/ContractManagementService.cs b/FCL/BLL/SES/ContractManagementService.cs
index b3047a0..640fc69 100644
--- a/FCL/BLL/SES/ContractManagementService.cs
+++ b/FCL/BLL/SES/ContractManagementService.cs
@@ -73,6 +73,27 @@ namespace BLL
}
}
+ ///
+ /// 增加ToDo
+ ///
+ ///
+ public static void AddToDo(Model.FC_ToDo todo)
+ {
+ Model.FC_ToDo newToDo = new Model.FC_ToDo();
+ newToDo.ToDoId = SQLHelper.GetNewID(typeof(Model.FC_ToDo));
+ newToDo.FO_NO = todo.FO_NO;
+ newToDo.ContractId = todo.ContractId;
+ newToDo.ToDoMan = todo.ToDoMan;
+ newToDo.ViolationBehavior = todo.ViolationBehavior;
+ newToDo.Result = todo.Result;
+ newToDo.IsHandle = todo.IsHandle;
+ newToDo.HandleDate = todo.HandleDate;
+ newToDo.Number = todo.Number;
+ newToDo.Number2 = todo.Number2;
+ Funs.DB.FC_ToDo.InsertOnSubmit(newToDo);
+ Funs.DB.SubmitChanges();
+ }
+
///
/// 根据主键删除Contract Management
///
diff --git a/FCL/BLL/SES/PunishmentService.cs b/FCL/BLL/SES/PunishmentService.cs
index c2452c6..1706963 100644
--- a/FCL/BLL/SES/PunishmentService.cs
+++ b/FCL/BLL/SES/PunishmentService.cs
@@ -101,7 +101,7 @@ namespace BLL
newPunishment.Individual = punishment.Individual;
newPunishment.ViolationDegree = punishment.ViolationDegree;
newPunishment.BYC_RU = punishment.BYC_RU;
- //newPunishment.Violation_Inspector = punishment.Violation_Inspector;
+ newPunishment.Violation_Inspector = punishment.Violation_Inspector;
newPunishment.CompletionDate = punishment.CompletionDate;
newPunishment.ViolationRelatedSes = punishment.ViolationRelatedSes;
newPunishment.SelectYesNo = punishment.SelectYesNo;
diff --git a/FCL/BLL/bin/Debug/Model.xml b/FCL/BLL/bin/Debug/Model.xml
index 2902b6e..41734c5 100644
--- a/FCL/BLL/bin/Debug/Model.xml
+++ b/FCL/BLL/bin/Debug/Model.xml
@@ -244,6 +244,11 @@
密码
+
+
+
+
+
代码 200-正常;1010-异常;
diff --git a/FCL/FineUIPro.Web/Evaluation/ContractorEvaluation.aspx b/FCL/FineUIPro.Web/Evaluation/ContractorEvaluation.aspx
index 8a064c5..b4cd1b9 100644
--- a/FCL/FineUIPro.Web/Evaluation/ContractorEvaluation.aspx
+++ b/FCL/FineUIPro.Web/Evaluation/ContractorEvaluation.aspx
@@ -27,8 +27,10 @@
-
+
+
+
@@ -105,6 +107,10 @@
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="1300px" Height="860px">
+
+
+