11
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -30,12 +30,12 @@ namespace BLL.APIService
|
||||
}
|
||||
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<ResultData<List<UserInfo>>>(result);
|
||||
List<Model.SyncDataUserLogs> logList = new List<Model.SyncDataUserLogs>();
|
||||
if (data.code == "200")
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
<Compile Include="BaseInfo\TaxRateService.cs" />
|
||||
<Compile Include="BaseInfo\TemplateTypeService.cs" />
|
||||
<Compile Include="BaseInfo\TypeService.cs" />
|
||||
<Compile Include="BaseInfo\ViolationClauseService.cs" />
|
||||
<Compile Include="Common\AccessTokenModel.cs" />
|
||||
<Compile Include="Common\AttachFileService.cs" />
|
||||
<Compile Include="Common\ChartControlService.cs" />
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ViolationClauseService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取类型
|
||||
/// </summary>
|
||||
/// <param name="violationClauseId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.EMC_ViolationClause GetViolationClause(string violationClauseId)
|
||||
{
|
||||
return Funs.DB.EMC_ViolationClause.FirstOrDefault(e => e.ViolationClauseId == violationClauseId);
|
||||
}
|
||||
|
||||
public static List<Model.EMC_ViolationClause> GetSupViolationClause()
|
||||
{
|
||||
return Funs.DB.EMC_ViolationClause.Where(e => e.SupViolationClause == null).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="violationClause"></param>
|
||||
public static void AddViolationClause(Model.EMC_ViolationClause violationClause)
|
||||
{
|
||||
Model.EMC_ViolationClause newType = new Model.EMC_ViolationClause();
|
||||
newType.ViolationClauseId = violationClause.ViolationClauseId;
|
||||
newType.ClauseDef = violationClause.ClauseDef;
|
||||
newType.DeductionComPany1 = violationClause.DeductionComPany1;
|
||||
newType.DeductionComPany2 = violationClause.DeductionComPany2;
|
||||
newType.DeductionComPany3 = violationClause.DeductionComPany3;
|
||||
newType.DeductionIndividual1 = violationClause.DeductionIndividual1;
|
||||
newType.DeductionIndividual2 = violationClause.DeductionIndividual2;
|
||||
newType.DeductionIndividual3 = violationClause.DeductionIndividual3;
|
||||
newType.ApplicationDef= violationClause.ApplicationDef;
|
||||
newType.SupViolationClause = violationClause.SupViolationClause;
|
||||
newType.SortIndex = violationClause.SortIndex;
|
||||
Funs.DB.EMC_ViolationClause.InsertOnSubmit(newType);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="violationClause"></param>
|
||||
public static void UpdateViolationClause(Model.EMC_ViolationClause violationClause)
|
||||
{
|
||||
Model.EMC_ViolationClause newType = Funs.DB.EMC_ViolationClause.FirstOrDefault(e => e.ViolationClauseId == violationClause.ViolationClauseId);
|
||||
if (newType != null)
|
||||
{
|
||||
newType.ClauseDef = violationClause.ClauseDef;
|
||||
newType.DeductionComPany1 = violationClause.DeductionComPany1;
|
||||
newType.DeductionComPany2 = violationClause.DeductionComPany2;
|
||||
newType.DeductionComPany3 = violationClause.DeductionComPany3;
|
||||
newType.DeductionIndividual1 = violationClause.DeductionIndividual1;
|
||||
newType.DeductionIndividual2 = violationClause.DeductionIndividual2;
|
||||
newType.DeductionIndividual3 = violationClause.DeductionIndividual3;
|
||||
newType.ApplicationDef = violationClause.ApplicationDef;
|
||||
newType.SortIndex = violationClause.SortIndex;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除类型
|
||||
/// </summary>
|
||||
/// <param name="typeId"></param>
|
||||
public static void DeleteViolationClause(string violationClauseId)
|
||||
{
|
||||
Model.EMC_ViolationClause type = Funs.DB.EMC_ViolationClause.FirstOrDefault(e => e.ViolationClauseId == violationClauseId);
|
||||
if (type != null)
|
||||
{
|
||||
Funs.DB.EMC_ViolationClause.DeleteOnSubmit(type);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitViolationClause(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataGroupField = "SupClauseDef";
|
||||
dropName.DataValueField = "ViolationClauseId";
|
||||
dropName.DataTextField = "ClauseDef";
|
||||
dropName.DataSource = (from x in Funs.DB.EMC_ViolationClause
|
||||
join y in Funs.DB.EMC_ViolationClause on x.SupViolationClause equals y.ViolationClauseId
|
||||
select new { x.ViolationClauseId, x.ClauseDef, SupClauseDef = y.ClauseDef }).ToList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,6 +120,21 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string BtnOut = "Export";
|
||||
|
||||
/// <summary>
|
||||
/// FC导出
|
||||
/// </summary>
|
||||
public const string FCExport = "FCExport";
|
||||
|
||||
/// <summary>
|
||||
/// Person导出
|
||||
/// </summary>
|
||||
public const string PersonExport = "PersonExport";
|
||||
|
||||
/// <summary>
|
||||
/// Fo导出
|
||||
/// </summary>
|
||||
public const string FoExport = "FoExport";
|
||||
|
||||
/// <summary>
|
||||
/// 导出分数
|
||||
/// </summary>
|
||||
@@ -316,6 +331,11 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string FOOffsetMenuId = "AE8C4BCB-A7E0-4EC6-B3F3-124C5B77D32F";
|
||||
|
||||
/// <summary>
|
||||
/// 违章条款
|
||||
/// </summary>
|
||||
public const string ViolationClauseMenuId = "CCAF3391-23FD-4E4D-A552-0C4AD3CFF44A";
|
||||
|
||||
#endregion
|
||||
|
||||
#region EMC Contracts
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace BLL.Common
|
||||
/// <returns></returns>
|
||||
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
|
||||
{
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace BLL.Common
|
||||
|
||||
//email.To.Add(send);
|
||||
//主题
|
||||
email.Subject = mailSubject;
|
||||
email.Subject = mailSubject.Replace("\r","").Replace("\n", "");
|
||||
//附件
|
||||
if (!string.IsNullOrEmpty(mailAttch))
|
||||
{
|
||||
@@ -273,7 +273,7 @@ namespace BLL.Common
|
||||
|
||||
//email.To.Add(send);
|
||||
//主题
|
||||
email.Subject = mailSubject;
|
||||
email.Subject = mailSubject.Replace("\r", "").Replace("\n", "");
|
||||
//附件
|
||||
|
||||
//优先级
|
||||
|
||||
@@ -23,7 +23,12 @@ namespace BLL
|
||||
return Funs.DB.View_EMC_Punishment.FirstOrDefault(e => e.PunishmentId == punishmentId);
|
||||
}
|
||||
|
||||
|
||||
public static Model.View_EMC_Que_Punishment GetQuePunishmentViewById(string punishmentId)
|
||||
{
|
||||
return Funs.DB.View_EMC_Que_Punishment.FirstOrDefault(e => e.PunishmentId == punishmentId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加扣款项
|
||||
@@ -34,6 +39,7 @@ namespace BLL
|
||||
Model.EMC_Punishment newPunishment = new Model.EMC_Punishment();
|
||||
newPunishment.PunishmentId = punishment.PunishmentId;
|
||||
newPunishment.FO_NO = punishment.FO_NO;
|
||||
newPunishment.ItemNo = punishment.ItemNo;
|
||||
newPunishment.SES_No = punishment.SES_No;
|
||||
newPunishment.PunishDate = punishment.PunishDate;
|
||||
newPunishment.Location = punishment.Location;
|
||||
@@ -50,6 +56,15 @@ namespace BLL
|
||||
newPunishment.Def=punishment.Def;
|
||||
newPunishment.CreateDate = punishment.CreateDate;
|
||||
|
||||
newPunishment.Contractor= punishment.Contractor;
|
||||
newPunishment.Discipline=punishment.Discipline;
|
||||
newPunishment.ViolationClauseId= punishment.ViolationClauseId;
|
||||
newPunishment.IsFrame= punishment.IsFrame;
|
||||
newPunishment.ViolationPerson =punishment.ViolationPerson;
|
||||
newPunishment.BYC_Person= punishment.BYC_Person;
|
||||
newPunishment.Requisitioner=punishment.Requisitioner;
|
||||
newPunishment.AttachUrl = punishment.AttachUrl;
|
||||
|
||||
Funs.DB.EMC_Punishment.InsertOnSubmit(newPunishment);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
@@ -64,6 +79,7 @@ namespace BLL
|
||||
if (newPunishment != null)
|
||||
{
|
||||
newPunishment.FO_NO = punishment.FO_NO;
|
||||
newPunishment.ItemNo = punishment.ItemNo;
|
||||
newPunishment.SES_No = punishment.SES_No;
|
||||
newPunishment.PunishDate = punishment.PunishDate;
|
||||
newPunishment.Location = punishment.Location;
|
||||
@@ -77,6 +93,16 @@ namespace BLL
|
||||
newPunishment.ViolationRelatedSes = punishment.ViolationRelatedSes;
|
||||
newPunishment.SelectYesNo = punishment.SelectYesNo;
|
||||
newPunishment.Def = punishment.Def;
|
||||
|
||||
newPunishment.Contractor = punishment.Contractor;
|
||||
newPunishment.Discipline = punishment.Discipline;
|
||||
newPunishment.ViolationClauseId = punishment.ViolationClauseId;
|
||||
newPunishment.IsFrame = punishment.IsFrame;
|
||||
newPunishment.ViolationPerson = punishment.ViolationPerson;
|
||||
newPunishment.BYC_Person = punishment.BYC_Person;
|
||||
newPunishment.Requisitioner = punishment.Requisitioner;
|
||||
newPunishment.AttachUrl = punishment.AttachUrl;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user