diff --git a/HJGL/.vs/HJGL/v17/.suo b/HJGL/.vs/HJGL/v17/.suo
index e1850e8..1bb5cea 100644
Binary files a/HJGL/.vs/HJGL/v17/.suo and b/HJGL/.vs/HJGL/v17/.suo differ
diff --git a/HJGL/BLL/BLL.csproj b/HJGL/BLL/BLL.csproj
index d13a5a3..d3515ff 100644
--- a/HJGL/BLL/BLL.csproj
+++ b/HJGL/BLL/BLL.csproj
@@ -120,6 +120,7 @@
+
diff --git a/HJGL/BLL/Common/MailHelper.cs b/HJGL/BLL/Common/MailHelper.cs
index ad2dc72..50df84f 100644
--- a/HJGL/BLL/Common/MailHelper.cs
+++ b/HJGL/BLL/Common/MailHelper.cs
@@ -1,6 +1,8 @@
-using Model;
+using BLL;
+using Model;
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Net.Mail;
namespace FineUIPro.Web.common
{
@@ -170,12 +172,13 @@ namespace FineUIPro.Web.common
}
- public static Email_Pop getEmailPop(string EmailID)
+ public static Email_Pop getEmailPop()
{
- Email_Pop pp = new Email_Pop();
- pp = BLL.Email_Send.Email_PopService.GetEmail_Pop(EmailID);
+ var pp = Funs.DB.Email_Pop.FirstOrDefault();
return pp;
+
+
}
}
diff --git a/HJGL/BLL/Schedule/TaskScheduleService.cs b/HJGL/BLL/Schedule/TaskScheduleService.cs
new file mode 100644
index 0000000..248368c
--- /dev/null
+++ b/HJGL/BLL/Schedule/TaskScheduleService.cs
@@ -0,0 +1,78 @@
+using FineUIPro.Web.common;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ public class TaskScheduleService
+ {
+
+ //NDE点口未审核统计
+ public static int NDEWeldPointNotAuditStatusTotal(int type)
+ {
+ if (type == 0)
+ return 0;
+
+ StringBuilder strSql = new StringBuilder();
+ strSql.Append(@"SELECT count(1) FROM dbo.View_Batch_PointBatchItem WHERE PointState IS NOT NULL ");
+ switch (type)
+ {
+ case 1:
+ strSql.Append(" AND JLAudit='未审核'");
+ break;
+ case 2:
+ strSql.Append(" AND GLGSAudit='未审核' ");
+ break;
+ }
+
+ int totalCount= SQLHelper.getIntValue(strSql.ToString());
+
+ return totalCount;
+ }
+
+ public static void GetNDEAuditEmailTemplate(int type)
+ {
+ var pop = MailHelper.getEmailPop();
+ if (pop == null)
+ {
+ BLL.ErrLogInfo.WriteLog($"未配置邮件服务器");
+ return;
+ }
+ string templateContent = string.Empty;
+ List emailSend = new List(); //发送人
+ List emailCC = new List(); //抄送给
+ string mailSubject = string.Empty;
+ string typeStr = string.Empty;
+ if (type == 1)
+ typeStr = "监理";
+ if (type == 2)
+ typeStr = "管理公司";
+
+ var emailTemplate = BLL.Email_Send.Email_SendTemplateService.GetEmailNotifier(typeStr);
+ if (emailTemplate == null)
+ {
+ BLL.ErrLogInfo.WriteLog($"不存在此邮件模版");
+ return;
+ }
+ emailSend = BLL.Email_Send.Email_SendTemplateService.GetEmailByTemplateId(emailTemplate.EmailId, "0");
+ emailCC = BLL.Email_Send.Email_SendTemplateService.GetEmailByTemplateId(emailTemplate.EmailId, "1");
+ if (emailSend.Count == 0)
+ {
+ BLL.ErrLogInfo.WriteLog($"未检测到发送人邮箱,请先配置邮箱地址");
+ return;
+ }
+ mailSubject = $"{typeStr}—{emailTemplate.EailTiaoJian}"; //发送主题
+ templateContent = emailTemplate.EmailContext;
+ int totalCount = BLL.TaskScheduleService.NDEWeldPointNotAuditStatusTotal(type);
+ templateContent = templateContent.Replace("{{totalCount}}", totalCount.ToString());
+
+ string resultMessage = "";
+ MailHelper.SendNetMail(pop, pop.EmailYx, emailSend.ToArray(), mailSubject, templateContent, string.Empty, string.Empty, string.Empty, emailCC.ToArray(), out resultMessage);
+
+ }
+ }
+}
diff --git a/HJGL/BLL/SendEmail/Email_SendTemplateService.cs b/HJGL/BLL/SendEmail/Email_SendTemplateService.cs
index 1bca1f2..ec65e4c 100644
--- a/HJGL/BLL/SendEmail/Email_SendTemplateService.cs
+++ b/HJGL/BLL/SendEmail/Email_SendTemplateService.cs
@@ -1,4 +1,5 @@
using Model;
+using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Data.Common;
@@ -79,7 +80,7 @@ namespace BLL.Email_Send
}
#endregion
- #region 根据主键删除EProject
+ #region 根据主键删除
///
/// 根据主键删除EProject
///
@@ -95,7 +96,7 @@ namespace BLL.Email_Send
}
#endregion
- #region 根据EmailNotifier查询EProject
+ #region 根据EmailNotifier查询
///
/// 根据EmailNotifier查询EProject
///
@@ -106,7 +107,7 @@ namespace BLL.Email_Send
}
#endregion
- #region 根据EmailNotifier查询EProject
+ #region 根据EmailNotifier查询
///
/// 根据EmailNotifier查询EProject
///
@@ -117,6 +118,19 @@ namespace BLL.Email_Send
}
#endregion
+ #region 根据模版ID获取发送人列表
+ public static List GetEmailByTemplateId(string templateId,string isCc)
+ {
+ var result = (from a in Funs.DB.Email_ToPeople
+ join b in Funs.DB.Sys_User on a.EmuserID equals b.UserId
+ where b.IsPost.Value && b.Email!=""
+ && a.EMPeopleType==isCc && a.EmtempID==templateId
+ select b.Email
+ ).ToList();
+
+ return result;
+ }
+ #endregion
#region 事务提交 新增
///
diff --git a/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_Edit.aspx b/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_Edit.aspx
index fa51bb6..4857287 100644
--- a/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_Edit.aspx
+++ b/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_Edit.aspx
@@ -8,7 +8,7 @@
-
+ 编辑
- /// 登陆的用户ID
- ///
- public Model.ResponeData GetPushHotTrust(string userId)
- {
- var responeData = new Model.ResponeData();
- try
- {
- responeData.data =APIMessagePushService.GetPushHotTrust(userId);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
-
- #region 推送的NDE检测委托单
- ///
- /// 推送的NDE检测委托单
- ///
- /// 登陆的用户ID
- ///
- public Model.ResponeData GetPushNDTTrust(string userId)
- {
- var responeData = new Model.ResponeData();
- try
- {
- responeData.data = APIMessagePushService.GetPushNDTTrust(userId);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
-
- #region 焊工一次合格率低于96%预警
- ///
- /// 焊工一次合格率低于96%预警
- ///
- /// 项目区域
- ///
- public Model.ResponeData GetWelderOnePassRateWarning(string projectArea)
- {
- var responeData = new Model.ResponeData();
- try
- {
- responeData.data = APIMessagePushService.GetWelderOnePassRateWarning(projectArea);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
-
- #region 施工单位一次合格率低于96%预警
- ///
- /// 施工单位一次合格率低于96%预警
- ///
- /// 项目区域
- ///
- public Model.ResponeData GetUnitOnePassRateWarning(string projectArea)
- {
- var responeData = new Model.ResponeData();
- try
- {
- responeData.data = APIMessagePushService.GetUnitOnePassRateWarning(projectArea);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
- }
-}
\ No newline at end of file
diff --git a/HJGL/WebApi/Controllers/PreWeldingDailyController.cs b/HJGL/WebApi/Controllers/PreWeldingDailyController.cs
deleted file mode 100644
index b0ce8a1..0000000
--- a/HJGL/WebApi/Controllers/PreWeldingDailyController.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web.Http;
-using BLL;
-
-namespace WebApi.Controllers
-{
- public class PreWeldingDailyController : ApiController
- {
- #region 保存焊接日报
- ///
- /// 保存焊接日报
- ///
- /// 焊口信息
- ///
- [HttpPost]
- public Model.ResponeData SavePreWeldingDaily([FromBody] List newItem)
- {
- var responeData = new Model.ResponeData();
- try
- {
- APIPreWeldingDailyService.SavePreWeldingDaily(newItem);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
- }
-}
\ No newline at end of file
diff --git a/HJGL/WebApi/Controllers/ReportQueryController.cs b/HJGL/WebApi/Controllers/ReportQueryController.cs
deleted file mode 100644
index b40d643..0000000
--- a/HJGL/WebApi/Controllers/ReportQueryController.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using BLL;
-using System.Web.Http;
-
-namespace WebApi.Controllers
-{
- public class ReportQueryController : ApiController
- {
- #region 根据焊工号获取焊工业绩
- ///
- /// 根据焊工号获取焊工业绩
- ///
- ///
- ///
- ///
- public Model.ResponeData GetWelderPerformanceByWelderCode(string projectId, string welderCode)
- {
- var responeData = new Model.ResponeData();
- try
- {
- responeData.data = APIReportQueryService.GetWelderPerformanceByWelderCode(projectId, welderCode);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
-
- #region 根据条件获取管线综合信息
- ///
- /// 根据条件获取管线综合信息
- ///
- /// 项目
- /// 区域
- /// 管线号
- ///
- public Model.ResponeData GetPipeLineInfo(string projectId, string workAreaId, string pipelineCode)
- {
- var responeData = new Model.ResponeData();
- try
- {
- responeData.data = APIReportQueryService.GetPipeLineInfo(projectId, workAreaId, pipelineCode);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
-
- #region 焊接工作量查询
- ///
- /// 焊接工作量查询
- ///
- /// 项目区域
- /// 项目Id
- ///
- public Model.ResponeData GetWeldWorkload(string projectArea, string projectId)
- {
- var responeData = new Model.ResponeData();
- try
- {
- responeData.data = APIReportQueryService.GetWeldWorkload(projectArea, projectId);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
-
- #region 拍片工作量查询
- ///
- /// 焊接工作量查询
- ///
- /// 项目区域
- /// 项目Id
- ///
- public Model.ResponeData GetWeldNdtFilm(string projectArea, string projectId)
- {
- var responeData = new Model.ResponeData();
- try
- {
- responeData.data = APIReportQueryService.GetWeldNdtFilm(projectArea, projectId);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
- }
-}
\ No newline at end of file
diff --git a/HJGL/WebApi/Controllers/TaskController.cs b/HJGL/WebApi/Controllers/TaskController.cs
new file mode 100644
index 0000000..35b69fa
--- /dev/null
+++ b/HJGL/WebApi/Controllers/TaskController.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Http;
+
+namespace WebApi.Controllers
+{
+ public class TaskController: ApiController
+ {
+ [HttpGet]
+ public Model.ResponeData GetNDEAuditEmailTemplate()
+ {
+ var model=new Model.ResponeData();
+
+ try
+ {
+ //定时任务跑 监理 未审核的点口邮件
+ BLL.TaskScheduleService.GetNDEAuditEmailTemplate(1);
+ //定时任务跑 管理公司 未审核的点口邮件
+ BLL.TaskScheduleService.GetNDEAuditEmailTemplate(2);
+ model.code = 200;
+ model.message = "OK";
+ }
+ catch (Exception ex)
+ {
+ BLL.ErrLogInfo.WriteLog(ex, "The scheduled task failed to run the unaudited point-of-mail. Procedure");
+ model.code=500;
+ model.message = "Error";
+ }
+ return model;
+ }
+ }
+}
\ No newline at end of file
diff --git a/HJGL/WebApi/Controllers/UserController.cs b/HJGL/WebApi/Controllers/UserController.cs
deleted file mode 100644
index daeb7cd..0000000
--- a/HJGL/WebApi/Controllers/UserController.cs
+++ /dev/null
@@ -1,130 +0,0 @@
-using BLL;
-using System;
-using System.Linq;
-using System.Web.Http;
-
-namespace WebAPI.Controllers
-{
- ///
- /// 用户
- ///
- public class UserController : ApiController
- {
- #region 根据账号或手机号码登录方法
- ///
- /// 登录方法
- ///
- ///
- ///
- [HttpPost]
- public Model.ResponeData postLoginOn([FromBody] Model.UserItem userInfo)
- {
- //登录方法 Model.UserItem
- var responeData = new Model.ResponeData
- {
- message = "账号密码不匹配!"
- };
- try
- {
- ////用户登录
- var user = APIUserService.UserLogOn(userInfo);
- if (user != null)
- {
- responeData.message = "登录成功!";
- responeData.data = user;
- }
- //else 暂不用
- //{
- // // 焊工登录
- // var user1 = APIWelderService.PersonLogOn(userInfo);
- // if (user1 != null)
- // {
- // responeData.message = "登录成功!";
- // responeData.code = 2;
- // responeData.data = user1;
- // }
- //}
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
-
- #region 根据userid获取用户信息
- ///
- /// 根据userid获取用户信息
- ///
- ///
- ///
- public Model.ResponeData getUserByUserId(string userId)
- {
- var responeData = new Model.ResponeData();
- try
- {
- responeData.data = APIUserService.getUserByUserId(userId);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
-
- #region 根据登陆用户的单位ID和选择的项目获取单位类型(1、建设方,2、总承包商,3、监理,4、检测,5、施工)
- ///
- /// 根据登陆用户的单位ID和选择的项目获取单位类型(1、建设方,2、总承包商,3、监理,4、检测,5、施工)
- ///
- /// 项目ID
- /// 单位ID
- ///
- public Model.ResponeData getUserInfo(string projectId, string unitId)
- {
- var responeData = new Model.ResponeData();
- try
- {
- responeData.data = APIUserService.getUserInfo(projectId, unitId);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
-
- #region 获取项目区域的用户列表
- ///
- /// 获取项目区域的用户列表
- ///
- /// 项目区域
- ///
- public Model.ResponeData getUserListByProjectArea(string projectArea)
- {
- var responeData = new Model.ResponeData();
- try
- {
- responeData.data = APIUserService.getUserListByProjectArea(projectArea);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
-
-
- }
-}
diff --git a/HJGL/WebApi/Controllers/WelderController.cs b/HJGL/WebApi/Controllers/WelderController.cs
deleted file mode 100644
index 3685980..0000000
--- a/HJGL/WebApi/Controllers/WelderController.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web.Http;
-using BLL;
-
-namespace WebApi.Controllers
-{
- public class WelderController : ApiController
- {
- #region 获取焊工登录信息
- ///
- /// 获取焊工登录信息
- ///
- /// 焊工登录信息
- ///
- public Model.ResponeData WelderLogOn(Model.UserItem userInfo)
- {
- var responeData = new Model.ResponeData();
- try
- {
- responeData.data = APIWelderService.WelderLogOn(userInfo);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
-
- #region 根据项目ID和施工单位获取项目焊工列表信息
- ///
- /// 根据项目ID和施工单位获取项目焊工列表信息
- ///
- /// 项目ID
- /// 施工单位ID
- ///
- public Model.ResponeData getWelderList(string projectId, string unitId)
- {
- var responeData = new Model.ResponeData();
- try
- {
- responeData.data = APIWelderService.getWelderList(projectId, unitId);
- }
- catch (Exception ex)
- {
- responeData.code = 0;
- responeData.message = ex.Message;
- }
-
- return responeData;
- }
- #endregion
- }
-}
\ No newline at end of file
diff --git a/HJGL/WebApi/ErrLog.txt b/HJGL/WebApi/ErrLog.txt
new file mode 100644
index 0000000..ef9d8d6
--- /dev/null
+++ b/HJGL/WebApi/ErrLog.txt
@@ -0,0 +1,44 @@
+
+错误信息开始=====>
+错误类型:NotSupportedException
+错误信息:方法“Boolean IsNullOrEmpty(System.String)”不支持转换为 SQL。
+错误堆栈:
+ 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.TranslateStringStaticMethod(SqlMethodCall mc)
+ 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitMethodCall(SqlMethodCall mc)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.VisitUnaryOperator(SqlUnary uo)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.VisitBinaryOperator(SqlBinary bo)
+ 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitBinaryOperator(SqlBinary bo)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.VisitBinaryOperator(SqlBinary bo)
+ 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitBinaryOperator(SqlBinary bo)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSelectCore(SqlSelect select)
+ 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitSelect(SqlSelect select)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.VisitAlias(SqlAlias a)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSource(SqlSource source)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSelectCore(SqlSelect select)
+ 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitSelect(SqlSelect select)
+ 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node)
+ 在 System.Data.Linq.SqlClient.SqlProvider.BuildQuery(ResultShape resultShape, Type resultType, SqlNode node, ReadOnlyCollection`1 parentParameters, SqlNodeAnnotations annotations)
+ 在 System.Data.Linq.SqlClient.SqlProvider.BuildQuery(Expression query, SqlNodeAnnotations annotations)
+ 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
+ 在 System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()
+ 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
+ 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
+ 在 BLL.Email_Send.Email_SendTemplateService.GetEmailByTemplateId(String templateId, String isCc) 位置 E:\湛江巴斯夫\Basf_TCC7\HJGL\BLL\SendEmail\Email_SendTemplateService.cs:行号 124
+ 在 BLL.TaskScheduleService.GetNDEAuditEmailTemplate(Int32 type) 位置 E:\湛江巴斯夫\Basf_TCC7\HJGL\BLL\Schedule\TaskScheduleService.cs:行号 51
+ 在 WebApi.Controllers.TaskController.GetNDEAuditEmailTemplate() 位置 E:\湛江巴斯夫\Basf_TCC7\HJGL\WebApi\Controllers\TaskController.cs:行号 19
+出错时间:05/17/2024 11:16:43
+The scheduled task failed to run the unaudited point-of-mail. Procedure
+出错时间:05/17/2024 11:16:43
+
+未检测到发送人邮箱,请先配置邮箱地址
+未检测到发送人邮箱,请先配置邮箱地址
diff --git a/HJGL/WebApi/Filter/PermissionAttribute.cs b/HJGL/WebApi/Filter/PermissionAttribute.cs
deleted file mode 100644
index fdb96cc..0000000
--- a/HJGL/WebApi/Filter/PermissionAttribute.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Net.Http;
-using System.Web.Http.Controllers;
-using System.Web.Http.Filters;
-
-namespace WebAPI.Filter
-{
- ///
- ///
- ///
- public class PermissionAttribute: ActionFilterAttribute
- {
- ///
- ///
- ///
- ///
- public override void OnActionExecuting(HttpActionContext actionContext)
- {
- bool isOk = false;
- actionContext.Request.Headers.TryGetValues("token", out IEnumerable token);
- string strValues = actionContext.ActionDescriptor.ControllerDescriptor.ControllerName + "*" + ((ReflectedHttpActionDescriptor)actionContext.ActionDescriptor).ActionName;
- if (lists.FirstOrDefault(x => x == strValues) != null)
- {
- isOk = true;
- }
-
- if (!isOk && token != null)
- {
- var getUser = BLL.Sys_UserService.GetUsersByUserId(token.FirstOrDefault());
- if (getUser != null)
- {
- isOk = true;
- }
- else
- {
- var getPerson = BLL.WelderService .GetWelderById(token.FirstOrDefault());
- if (getPerson != null)
- {
- isOk = true;
- }
- }
- }
- // base.OnActionExecuting(actionContext);
- if (isOk)
- {
- base.OnActionExecuting(actionContext);
- }
- else
- {
- actionContext.Response = actionContext.Request.CreateResponse(System.Net.HttpStatusCode.OK,
- new { code = "0", message = "您没有权限!" }, actionContext.ControllerContext.Configuration.Formatters.JsonFormatter);
- }
- }
-
- ///
- ///
- ///
- public static List lists = new List { "User*postLoginOn" };
- }
-}
\ No newline at end of file
diff --git a/HJGL/WebApi/Web.config b/HJGL/WebApi/Web.config
index fa4b215..c767bb2 100644
--- a/HJGL/WebApi/Web.config
+++ b/HJGL/WebApi/Web.config
@@ -10,7 +10,7 @@
-
+
@@ -27,7 +27,7 @@
-->
-
+
diff --git a/HJGL/WebApi/WebApi.csproj b/HJGL/WebApi/WebApi.csproj
index 0e1a2d7..898a76b 100644
--- a/HJGL/WebApi/WebApi.csproj
+++ b/HJGL/WebApi/WebApi.csproj
@@ -157,16 +157,7 @@
-
-
-
-
-
-
-
-
-
-
+
Global.asax
@@ -228,6 +219,7 @@
+