20250329 工作台
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -626,6 +626,7 @@
|
||||
<Compile Include="JDGL\WBS\WbsSetMatchCostControlService.cs" />
|
||||
<Compile Include="JDGL\WBS\WbsSetService.cs" />
|
||||
<Compile Include="JDGL\WBS\WorkloadStatisticsService.cs" />
|
||||
<Compile Include="PMP\PMPDataService.cs" />
|
||||
<Compile Include="Notice\NoticeService.cs" />
|
||||
<Compile Include="OfficeCheck\Check\CheckNoticeService.cs" />
|
||||
<Compile Include="OfficeCheck\Check\CheckReportService.cs" />
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace BLL
|
||||
/// <returns>一个质量巡检审批实体</returns>
|
||||
public static Model.Check_CheckControlApprove GetCheckControlApproveByCheckControlId(string CheckControlCode)
|
||||
{
|
||||
return db.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
return db.Check_CheckControlApprove.OrderByDescending(x=>x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType != "S" && x.ApproveDate != null);
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改质量巡检审批信息
|
||||
|
||||
@@ -4811,7 +4811,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 关键事项模板文件原始虚拟路径
|
||||
/// </summary>
|
||||
public const string GJSXOutTemplateUrl = "File\\Excel\\DataOut\\关键事项.xlsx";
|
||||
public const string GJSXOutTemplateUrl = "File\\Excel\\DataOut\\关键事项跟踪一览表.xlsx";
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
@@ -1250,6 +1250,59 @@ namespace BLL
|
||||
//return TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)).AddSeconds(timestamp);
|
||||
}
|
||||
|
||||
#region 去除后面多余的零
|
||||
|
||||
/// <summary>
|
||||
/// 去除后面多余的零
|
||||
/// </summary>
|
||||
/// <param name="sResult"></param>
|
||||
/// <returns></returns>
|
||||
public static string RemoveZero(string sResult)
|
||||
{
|
||||
if (sResult.IndexOf(".") < 0)
|
||||
return sResult;
|
||||
int iIndex = sResult.Length - 1;
|
||||
for (int i = sResult.Length - 1; i >= 0; i--)
|
||||
{
|
||||
if (sResult.Substring(i, 1) != "0")
|
||||
{
|
||||
iIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
sResult = sResult.Substring(0, iIndex + 1);
|
||||
if (sResult.EndsWith("."))
|
||||
sResult = sResult.Substring(0, sResult.Length - 1);
|
||||
return sResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 去除后面多余的零
|
||||
/// </summary>
|
||||
/// <param name="dValue"></param>
|
||||
/// <returns></returns>
|
||||
public static string RemoveZero(decimal dValue)
|
||||
{
|
||||
string sResult = dValue.ToString();
|
||||
if (sResult.IndexOf(".") < 0)
|
||||
return sResult;
|
||||
int iIndex = sResult.Length - 1;
|
||||
for (int i = sResult.Length - 1; i >= 0; i--)
|
||||
{
|
||||
if (sResult.Substring(i, 1) != "0")
|
||||
{
|
||||
iIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
sResult = sResult.Substring(0, iIndex + 1);
|
||||
if (sResult.EndsWith("."))
|
||||
sResult = sResult.Substring(0, sResult.Length - 1);
|
||||
return sResult;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static string RequestGet(string Baseurl, string Token)
|
||||
{
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace BLL
|
||||
newHazardRegister.ProblemTypes = hazardRegister.ProblemTypes;
|
||||
newHazardRegister.DIC_ID = hazardRegister.DIC_ID;
|
||||
newHazardRegister.Type = hazardRegister.Type;
|
||||
|
||||
newHazardRegister.Risk_Level = hazardRegister.Risk_Level;
|
||||
newHazardRegister.HiddenType = hazardRegister.HiddenType;
|
||||
//把附件表的路径复制过来
|
||||
Model.AttachFile file = BLL.AttachFileService.GetAttachFile(hazardRegister.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId);
|
||||
|
||||
@@ -508,6 +508,7 @@ namespace BLL
|
||||
OutTime = person.OutTime,
|
||||
OutResult = person.OutResult,
|
||||
Telephone = person.Telephone,
|
||||
Email = person.Email,
|
||||
PositionId = person.PositionId,
|
||||
PostTitleId = person.PostTitleId,
|
||||
PhotoUrl = person.PhotoUrl,
|
||||
@@ -588,6 +589,7 @@ namespace BLL
|
||||
newPerson.OutTime = person.OutTime;
|
||||
newPerson.OutResult = person.OutResult;
|
||||
newPerson.Telephone = person.Telephone;
|
||||
newPerson.Email = person.Email;
|
||||
newPerson.PositionId = person.PositionId;
|
||||
newPerson.PostTitleId = person.PostTitleId;
|
||||
if (newPerson.PhotoUrl != person.PhotoUrl && !string.IsNullOrEmpty(person.PhotoUrl))
|
||||
@@ -669,6 +671,7 @@ namespace BLL
|
||||
newPerson.OutTime = person.OutTime;
|
||||
newPerson.OutResult = person.OutResult;
|
||||
newPerson.Telephone = person.Telephone;
|
||||
newPerson.Email = person.Email;
|
||||
newPerson.PhotoUrl = person.PhotoUrl;
|
||||
newPerson.HeadImage = person.HeadImage;
|
||||
newPerson.IsUsed = person.IsUsed;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -170,6 +170,130 @@
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static string WuHuanPMPPath
|
||||
{
|
||||
get
|
||||
{
|
||||
var sysSet5 = (from x in Funs.DB.Sys_Set where x.SetName == "PMP接口地址" select x).ToList().FirstOrDefault();
|
||||
if (sysSet5 != null)
|
||||
{
|
||||
_CNCECPath = sysSet5.SetValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_CNCECPath = "";
|
||||
}
|
||||
return _CNCECPath;
|
||||
}
|
||||
set
|
||||
{
|
||||
_CNCECPath = value;
|
||||
}
|
||||
}
|
||||
public static string WuHuanPMPToken
|
||||
{
|
||||
get
|
||||
{
|
||||
var sysSet5 = (from x in Funs.DB.Sys_Set where x.SetName == "PMPToken" select x).ToList().FirstOrDefault();
|
||||
if (sysSet5 != null)
|
||||
{
|
||||
_CNCECToken = sysSet5.SetValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_CNCECToken = "";
|
||||
}
|
||||
return _CNCECToken;
|
||||
}
|
||||
}
|
||||
public static string WuHuanPMPTokenExTime
|
||||
{
|
||||
get
|
||||
{
|
||||
var sysSet5 = (from x in Funs.DB.Sys_Set where x.SetName == "PMPTokenExTime" select x).ToList().FirstOrDefault();
|
||||
if (sysSet5 != null)
|
||||
{
|
||||
_CNCECTokenExTime = sysSet5.SetValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_CNCECTokenExTime = "";
|
||||
}
|
||||
return _CNCECTokenExTime;
|
||||
}
|
||||
}
|
||||
public static void SetWuHuanPMPToken(string token)
|
||||
{
|
||||
Model.Sys_Set sysSet = Funs.DB.Sys_Set.FirstOrDefault(x => x.SetName == "PMPToken");
|
||||
if (sysSet != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(token))
|
||||
{
|
||||
sysSet.SetValue = token;
|
||||
}
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Sys_Set newSysSet5 = new Model.Sys_Set();
|
||||
var q = (from x in Funs.DB.Sys_Set orderby x.SetId descending select x).FirstOrDefault();
|
||||
if (q == null)
|
||||
{
|
||||
newSysSet5.SetId = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
newSysSet5.SetId = q.SetId + 1;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(token))
|
||||
{
|
||||
newSysSet5.SetValue = token;
|
||||
}
|
||||
newSysSet5.SetName = "PMPToken";
|
||||
Funs.DB.Sys_Set.InsertOnSubmit(newSysSet5);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void SetWuHuanPMPTokenExpirationTime(string ExpirationTime)
|
||||
{
|
||||
Model.Sys_Set sysSet = Funs.DB.Sys_Set.FirstOrDefault(x => x.SetName == "PMPTokenExTime");
|
||||
if (sysSet != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ExpirationTime))
|
||||
{
|
||||
sysSet.SetValue = ExpirationTime;
|
||||
}
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Sys_Set newSysSet5 = new Model.Sys_Set();
|
||||
var q = (from x in Funs.DB.Sys_Set orderby x.SetId descending select x).FirstOrDefault();
|
||||
if (q == null)
|
||||
{
|
||||
newSysSet5.SetId = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
newSysSet5.SetId = q.SetId + 1;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(ExpirationTime))
|
||||
{
|
||||
newSysSet5.SetValue = ExpirationTime;
|
||||
}
|
||||
newSysSet5.SetName = "PMPTokenExTime";
|
||||
Funs.DB.Sys_Set.InsertOnSubmit(newSysSet5);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取及格分数
|
||||
/// </summary>
|
||||
|
||||
@@ -218,6 +218,7 @@ namespace BLL
|
||||
PageSize = 10,
|
||||
IsOffice = user.IsOffice,
|
||||
Telephone = user.Telephone,
|
||||
Email = user.Email,
|
||||
DataSources = user.DataSources,
|
||||
SignatureUrl = user.SignatureUrl,
|
||||
DepartId = user.DepartId,
|
||||
@@ -268,6 +269,7 @@ namespace BLL
|
||||
newUser.IsPost = user.IsPost;
|
||||
newUser.IsOffice = user.IsOffice;
|
||||
newUser.Telephone = user.Telephone;
|
||||
newUser.Email = user.Email;
|
||||
newUser.SignatureUrl = user.SignatureUrl;
|
||||
newUser.DepartId = user.DepartId;
|
||||
newUser.MainCNProfessionalId = user.MainCNProfessionalId;
|
||||
@@ -298,6 +300,10 @@ namespace BLL
|
||||
newUser.IsPost = user.IsPost;
|
||||
newUser.IsOffice = user.IsOffice;
|
||||
newUser.Telephone = user.Telephone;
|
||||
if (!string.IsNullOrEmpty(user.Email))
|
||||
{
|
||||
newUser.Email = user.Email;
|
||||
}
|
||||
newUser.SignatureUrl = user.SignatureUrl;
|
||||
newUser.DepartId = user.DepartId;
|
||||
newUser.Politicalstatus = user.Politicalstatus;
|
||||
@@ -339,7 +345,10 @@ namespace BLL
|
||||
newUser.UserName = user.UserName;
|
||||
newUser.UserCode = user.UserCode;
|
||||
newUser.IdentityCard = user.IdentityCard;
|
||||
newUser.Email = user.Email;
|
||||
if (!string.IsNullOrEmpty(user.Email))
|
||||
{
|
||||
newUser.Email = user.Email;
|
||||
}
|
||||
newUser.Telephone = user.Telephone;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -1436,7 +1436,7 @@ namespace BLL
|
||||
{
|
||||
var result =
|
||||
(from x in Funs.DB.Solution_LargerHazard
|
||||
where x.ProjectId == projectid && x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime
|
||||
where x.ProjectId == projectid && x.IsSuperLargerHazard == true && x.TrainPersonNum != null && x.RecordTime > Const.DtmarkTime
|
||||
select x.TrainPersonNum).ToList().Sum(x => x.Value);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1444,10 +1444,10 @@ namespace BLL
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
var getData = (from x in Funs.DB.SitePerson_Person
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
join z in Funs.DB.RealName_Project on y.ContractNo equals z.ProCode
|
||||
join z in Funs.DB.RealName_Project on y.JTProjectCode equals z.ProCode
|
||||
join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId
|
||||
join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId
|
||||
where x.IdentityCard == identityCard && y.ContractNo == proCode
|
||||
where x.IdentityCard == identityCard && y.JTProjectCode == proCode
|
||||
&& v.TeamId.HasValue && z.JTproCode != null
|
||||
&& ((type == Const.BtnAdd && x.HeadImage != null && x.HeadImage.Length > 0) || (type == Const.BtnModify && x.RealNameAddTime.HasValue))
|
||||
select new
|
||||
@@ -1507,7 +1507,7 @@ namespace BLL
|
||||
pushContent = JsonConvert.SerializeObject(addlistObject);
|
||||
returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/persons", "POST", contenttype, newToken, pushContent);
|
||||
}
|
||||
|
||||
InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, returndata, pushContent);
|
||||
if (!string.IsNullOrEmpty(returndata))
|
||||
{
|
||||
JObject obj = JObject.Parse(returndata);
|
||||
@@ -1545,8 +1545,7 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent);
|
||||
//InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent);
|
||||
if (data.Contains("已存在") || mess.Contains("已存在"))
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
|
||||
Reference in New Issue
Block a user