202211301、项目人员身份证变化事件优化。2、新增人员是否同时在多项目字段。
This commit is contained in:
parent
823cba39bb
commit
50b22cc547
|
|
@ -0,0 +1,4 @@
|
||||||
|
ALTER TABLE Person_Persons ADD MultiProject BIT NULL
|
||||||
|
GO
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¶àÏîÄ¿' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Person_Persons', @level2type=N'COLUMN',@level2name=N'MultiProject'
|
||||||
|
GO
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
--ADD BY YangHongwei 2022-11-30
|
||||||
|
1、项目人员身份证变化事件优化。
|
||||||
|
2、新增人员是否同时在多项目字段。
|
||||||
|
--END
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -145,6 +145,8 @@ namespace BLL
|
||||||
};
|
};
|
||||||
|
|
||||||
AddPersonItem(newPersonItem);
|
AddPersonItem(newPersonItem);
|
||||||
|
if (!getPersons.MultiProject.HasValue || getPersons.MultiProject == false)
|
||||||
|
{
|
||||||
var getOtherPersons = db.SitePerson_Person.Where(x => x.IdentityCard == sitePerson.IdentityCard && x.ProjectId != sitePerson.ProjectId && x.States == Const.ProjectPersonStates_1);
|
var getOtherPersons = db.SitePerson_Person.Where(x => x.IdentityCard == sitePerson.IdentityCard && x.ProjectId != sitePerson.ProjectId && x.States == Const.ProjectPersonStates_1);
|
||||||
if (getOtherPersons.Count() > 0)
|
if (getOtherPersons.Count() > 0)
|
||||||
{
|
{
|
||||||
|
|
@ -157,6 +159,7 @@ namespace BLL
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getPersons.CurrentProjectId = sitePerson.ProjectId;
|
getPersons.CurrentProjectId = sitePerson.ProjectId;
|
||||||
getPersons.CurrentProjectRoleId = sitePerson.RoleIds;
|
getPersons.CurrentProjectRoleId = sitePerson.RoleIds;
|
||||||
|
|
@ -184,14 +187,17 @@ namespace BLL
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
///未离场项目 先离场
|
|
||||||
OutPersonItem(newitem.PersonId, null, DateTime.Now);
|
|
||||||
var getPerson = Person_PersonsService.GetPerson_PersonsById(newitem.PersonId);
|
var getPerson = Person_PersonsService.GetPerson_PersonsById(newitem.PersonId);
|
||||||
if (getPerson != null)
|
if (getPerson != null)
|
||||||
{
|
{
|
||||||
newitem.PersonName = getPerson.PersonName;
|
newitem.PersonName = getPerson.PersonName;
|
||||||
newitem.IdentityCard = getPerson.IdentityCard;
|
newitem.IdentityCard = getPerson.IdentityCard;
|
||||||
|
if (!getPerson.MultiProject.HasValue || getPerson.MultiProject == false)
|
||||||
|
{
|
||||||
|
///未离场项目 先离场
|
||||||
|
OutPersonItem(newitem.PersonId, null, DateTime.Now);
|
||||||
}
|
}
|
||||||
|
|
||||||
var getPersonItem = db.SitePerson_PersonItem.FirstOrDefault(x => x.PersonId == getPerson.PersonId
|
var getPersonItem = db.SitePerson_PersonItem.FirstOrDefault(x => x.PersonId == getPerson.PersonId
|
||||||
&& x.InTime <= newitem.InTime && (x.OutTime > newitem.InTime || !x.OutTime.HasValue));
|
&& x.InTime <= newitem.InTime && (x.OutTime > newitem.InTime || !x.OutTime.HasValue));
|
||||||
if (getPersonItem != null)
|
if (getPersonItem != null)
|
||||||
|
|
@ -267,6 +273,7 @@ namespace BLL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 更新 人员进场信息
|
#region 更新 人员进场信息
|
||||||
|
|
|
||||||
|
|
@ -687,6 +687,7 @@ namespace BLL
|
||||||
RetirementDate = person.RetirementDate,
|
RetirementDate = person.RetirementDate,
|
||||||
RelativeName = person.RelativeName,
|
RelativeName = person.RelativeName,
|
||||||
RelativeTel = person.RelativeTel,
|
RelativeTel = person.RelativeTel,
|
||||||
|
MultiProject = person.MultiProject,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(person.QRCodeAttachUrl))
|
if (string.IsNullOrEmpty(person.QRCodeAttachUrl))
|
||||||
|
|
@ -779,6 +780,7 @@ namespace BLL
|
||||||
newPerson.RetirementDate = person.RetirementDate;
|
newPerson.RetirementDate = person.RetirementDate;
|
||||||
newPerson.RelativeName = person.RelativeName;
|
newPerson.RelativeName = person.RelativeName;
|
||||||
newPerson.RelativeTel = person.RelativeTel;
|
newPerson.RelativeTel = person.RelativeTel;
|
||||||
|
newPerson.MultiProject = person.MultiProject;
|
||||||
|
|
||||||
newPerson.IsCardNoOK = IDCardValid.CheckIDCard(person.IdentityCard);
|
newPerson.IsCardNoOK = IDCardValid.CheckIDCard(person.IdentityCard);
|
||||||
if (string.IsNullOrEmpty(person.QRCodeAttachUrl))
|
if (string.IsNullOrEmpty(person.QRCodeAttachUrl))
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@
|
||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
<f:FormRow ColumnWidths="25% 25% 50%">
|
<f:FormRow ColumnWidths="20% 15% 15% 50%">
|
||||||
<Items>
|
<Items>
|
||||||
<f:RadioButtonList ID="rblSex" runat="server" Label="性别">
|
<f:RadioButtonList ID="rblSex" runat="server" Label="性别">
|
||||||
<f:RadioItem Value="1" Text="男" Selected="true" />
|
<f:RadioItem Value="1" Text="男" Selected="true" />
|
||||||
|
|
@ -135,6 +135,8 @@
|
||||||
</f:RadioButtonList>
|
</f:RadioButtonList>
|
||||||
<f:CheckBox runat="server" ID="ckIsPost" Label="在职" Checked="true"
|
<f:CheckBox runat="server" ID="ckIsPost" Label="在职" Checked="true"
|
||||||
AutoPostBack="true" OnCheckedChanged="ckIsPost_CheckedChanged"></f:CheckBox>
|
AutoPostBack="true" OnCheckedChanged="ckIsPost_CheckedChanged"></f:CheckBox>
|
||||||
|
<f:CheckBox runat="server" ID="ckIsMultiProject" Label="多项目"
|
||||||
|
AutoPostBack="true" OnCheckedChanged="ckIsMultiProject_CheckedChanged"></f:CheckBox>
|
||||||
<f:DatePicker ID="txtBirthday" runat="server" Label="出生日期">
|
<f:DatePicker ID="txtBirthday" runat="server" Label="出生日期">
|
||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
</Items>
|
</Items>
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@ namespace FineUIPro.Web.Person
|
||||||
this.txtJobNum.Text = person.JobNum;
|
this.txtJobNum.Text = person.JobNum;
|
||||||
this.drpUnit.SelectedValue = person.UnitId;
|
this.drpUnit.SelectedValue = person.UnitId;
|
||||||
this.ckIsPost.Checked = person.IsPost ?? true;
|
this.ckIsPost.Checked = person.IsPost ?? true;
|
||||||
|
this.ckIsMultiProject.Checked = person.MultiProject ?? false;
|
||||||
if (!string.IsNullOrEmpty(person.DepartId))
|
if (!string.IsNullOrEmpty(person.DepartId))
|
||||||
{
|
{
|
||||||
this.drpDepart.SelectedValue = person.DepartId;
|
this.drpDepart.SelectedValue = person.DepartId;
|
||||||
|
|
@ -528,6 +529,7 @@ namespace FineUIPro.Web.Person
|
||||||
Address = this.txtAddress.Text.Trim(),
|
Address = this.txtAddress.Text.Trim(),
|
||||||
SignatureUrl = this.SignatureUrl,
|
SignatureUrl = this.SignatureUrl,
|
||||||
IsPost = this.ckIsPost.Checked,
|
IsPost = this.ckIsPost.Checked,
|
||||||
|
MultiProject=this.ckIsMultiProject.Checked,
|
||||||
};
|
};
|
||||||
|
|
||||||
newPerson.RoleIds = Funs.GetStringByArray(this.drpRole.SelectedValueArray);
|
newPerson.RoleIds = Funs.GetStringByArray(this.drpRole.SelectedValueArray);
|
||||||
|
|
@ -1087,5 +1089,18 @@ namespace FineUIPro.Web.Person
|
||||||
Alert.ShowInParent("人员不在职,则当前人所在的所有项目都将离场!", MessageBoxIcon.Warning);
|
Alert.ShowInParent("人员不在职,则当前人所在的所有项目都将离场!", MessageBoxIcon.Warning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void ckIsMultiProject_CheckedChanged(object sender, CheckedEventArgs e)
|
||||||
|
{
|
||||||
|
if (this.ckIsMultiProject.Checked)
|
||||||
|
{
|
||||||
|
Alert.ShowInParent("人员可在多个项目上同时在岗!", MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -248,6 +248,15 @@ namespace FineUIPro.Web.Person
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.CheckBox ckIsPost;
|
protected global::FineUIPro.CheckBox ckIsPost;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ckIsMultiProject 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.CheckBox ckIsMultiProject;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtBirthday 控件。
|
/// txtBirthday 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ namespace FineUIPro.Web.Person
|
||||||
this.GetButtonPower();
|
this.GetButtonPower();
|
||||||
this.btnNew.OnClientClick = Window1.GetShowReference("ProjectPersonEdit.aspx") + "return false;";
|
this.btnNew.OnClientClick = Window1.GetShowReference("ProjectPersonEdit.aspx") + "return false;";
|
||||||
ProjectService.InitProjectShortNameDropDownList(this.drpProject, false);
|
ProjectService.InitProjectShortNameDropDownList(this.drpProject, false);
|
||||||
|
this.drpProject.SelectedIndex= 0;
|
||||||
|
|
||||||
Funs.FineUIPleaseSelect(drpProject, "按项目查询");
|
Funs.FineUIPleaseSelect(drpProject, "按项目查询");
|
||||||
Funs.FineUIPleaseSelect(drpUnit, "按单位查询");
|
Funs.FineUIPleaseSelect(drpUnit, "按单位查询");
|
||||||
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, false);
|
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, false);
|
||||||
|
|
|
||||||
|
|
@ -280,8 +280,12 @@ namespace FineUIPro.Web.Person
|
||||||
{
|
{
|
||||||
var getProjectPerson = SitePerson_PersonService.GetSitePersonById(this.SitePersonId);
|
var getProjectPerson = SitePerson_PersonService.GetSitePersonById(this.SitePersonId);
|
||||||
if (getProjectPerson != null)
|
if (getProjectPerson != null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(getProjectPerson.IdentityCard))
|
||||||
{
|
{
|
||||||
this.txtIdentityCard.Text = getProjectPerson.IdentityCard;
|
this.txtIdentityCard.Text = getProjectPerson.IdentityCard;
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(getProjectPerson.PersonName))
|
if (!string.IsNullOrEmpty(getProjectPerson.PersonName))
|
||||||
{
|
{
|
||||||
this.txtPersonName.Text = getProjectPerson.PersonName;
|
this.txtPersonName.Text = getProjectPerson.PersonName;
|
||||||
|
|
|
||||||
|
|
@ -70769,7 +70769,7 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialName", DbType="NVarChar(30)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialName", DbType="NVarChar(300)")]
|
||||||
public string MaterialName
|
public string MaterialName
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -70789,7 +70789,7 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialSpec", DbType="NVarChar(20)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialSpec", DbType="NVarChar(300)")]
|
||||||
public string MaterialSpec
|
public string MaterialSpec
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -70809,7 +70809,7 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialMade", DbType="NVarChar(200)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialMade", DbType="NVarChar(300)")]
|
||||||
public string MaterialMade
|
public string MaterialMade
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -70829,7 +70829,7 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(300)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(3000)")]
|
||||||
public string MaterialDef
|
public string MaterialDef
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -70849,7 +70849,7 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipeGrade", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipeGrade", DbType="NVarChar(300)")]
|
||||||
public string PipeGrade
|
public string PipeGrade
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -70869,7 +70869,7 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnit", DbType="NVarChar(10)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnit", DbType="NVarChar(300)")]
|
||||||
public string MaterialUnit
|
public string MaterialUnit
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -71191,7 +71191,7 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationAndModel", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationAndModel", DbType="NVarChar(1000)")]
|
||||||
public string SpecificationAndModel
|
public string SpecificationAndModel
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -116316,6 +116316,8 @@ namespace Model
|
||||||
|
|
||||||
private string _PersonType;
|
private string _PersonType;
|
||||||
|
|
||||||
|
private System.Nullable<bool> _MultiProject;
|
||||||
|
|
||||||
private EntitySet<Accident_AccidentHandle> _Accident_AccidentHandle;
|
private EntitySet<Accident_AccidentHandle> _Accident_AccidentHandle;
|
||||||
|
|
||||||
private EntitySet<Accident_AccidentPersonRecord> _Accident_AccidentPersonRecord;
|
private EntitySet<Accident_AccidentPersonRecord> _Accident_AccidentPersonRecord;
|
||||||
|
|
@ -116908,6 +116910,8 @@ namespace Model
|
||||||
partial void OnCertificateIdChanged();
|
partial void OnCertificateIdChanged();
|
||||||
partial void OnPersonTypeChanging(string value);
|
partial void OnPersonTypeChanging(string value);
|
||||||
partial void OnPersonTypeChanged();
|
partial void OnPersonTypeChanged();
|
||||||
|
partial void OnMultiProjectChanging(System.Nullable<bool> value);
|
||||||
|
partial void OnMultiProjectChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Person_Persons()
|
public Person_Persons()
|
||||||
|
|
@ -118365,6 +118369,26 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MultiProject", DbType="Bit")]
|
||||||
|
public System.Nullable<bool> MultiProject
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._MultiProject;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._MultiProject != value))
|
||||||
|
{
|
||||||
|
this.OnMultiProjectChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._MultiProject = value;
|
||||||
|
this.SendPropertyChanged("MultiProject");
|
||||||
|
this.OnMultiProjectChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentHandle_Person_Persons", Storage="_Accident_AccidentHandle", ThisKey="PersonId", OtherKey="CompileMan", DeleteRule="NO ACTION")]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentHandle_Person_Persons", Storage="_Accident_AccidentHandle", ThisKey="PersonId", OtherKey="CompileMan", DeleteRule="NO ACTION")]
|
||||||
public EntitySet<Accident_AccidentHandle> Accident_AccidentHandle
|
public EntitySet<Accident_AccidentHandle> Accident_AccidentHandle
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue