This commit is contained in:
2024-09-03 17:23:01 +08:00
30 changed files with 1935 additions and 505 deletions
+4
View File
@@ -763,6 +763,10 @@ namespace BLL
{
newPerson.TeamGroupId = person.TeamGroupId;
}
if (!string.IsNullOrEmpty(person.WorkPostName))
{
person.WorkPostId = WorkPostService.AddWorkPostByName(person.WorkPostName);
}
if (!string.IsNullOrEmpty(person.WorkPostId))
{
newPerson.WorkPostId = person.WorkPostId;
+12
View File
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public static class AnBangService
{
}
}
+1
View File
@@ -85,6 +85,7 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="AnBang\AnBangService.cs" />
<Compile Include="API\APIBaseInfoService.cs" />
<Compile Include="API\APICommonService.cs" />
<Compile Include="API\APIDoorServerService.cs" />
+29
View File
@@ -45,7 +45,36 @@ namespace BLL
db.Base_WorkPost.InsertOnSubmit(newWorkPost);
db.SubmitChanges();
}
public static string AddWorkPostByName(string workPostName)
{
string workpostid = String.Empty;
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var model = db.Base_WorkPost.FirstOrDefault(e => e.WorkPostName == workPostName);
if (model != null)
{
workpostid = model.WorkPostId;
}
else
{
Model.Base_WorkPost newWorkPost = new Model.Base_WorkPost
{
WorkPostId = SQLHelper.GetNewID(),
WorkPostCode = "",
WorkPostName = workPostName,
IsHsse = false,
IsCQMS = false,
CNCodes = "",
};
db.Base_WorkPost.InsertOnSubmit(newWorkPost);
db.SubmitChanges();
workpostid = newWorkPost.WorkPostId;
}
return workpostid;
}
}
/// <summary>
/// 修改
/// </summary>