diff --git a/DataBase/版本日志/SGGLDB_V2022-03-20-001.sql b/DataBase/版本日志/SGGLDB_V2022-03-20-001.sql
new file mode 100644
index 00000000..c41c5600
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2022-03-20-001.sql
@@ -0,0 +1,8 @@
+ALTER TABLE Project_ProjectUnit ADD IsSynchro BIT NULL
+GO
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʵͬ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_ProjectUnit', @level2type=N'COLUMN',@level2name=N'IsSynchro'
+GO
+UPDATE Project_ProjectUnit SET IsSynchro=1 WHERE UnitType=1 OR UnitType=2
+GO
+UPDATE Project_ProjectUnit SET IsSynchro=0 WHERE UnitType !=1 AND UnitType !=2
+GO
diff --git a/SGGL/BLL/DoorServer/DoorServerService.cs b/SGGL/BLL/DoorServer/DoorServerService.cs
index 78e3f4bf..033d33b5 100644
--- a/SGGL/BLL/DoorServer/DoorServerService.cs
+++ b/SGGL/BLL/DoorServer/DoorServerService.cs
@@ -31,159 +31,161 @@ namespace BLL
{
if (drecord.DateTimeRecord.HasValue)
{
- Model.T_d_EmployInOutRecord newInOutRecord = new Model.T_d_EmployInOutRecord
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
- NewID = SQLHelper.GetNewID(),
- ProjectId = drecord.ProjectId,
- InstallationName = ProjectService.GetProjectNameByProjectId(drecord.ProjectId),
- RecordDate = drecord.DateTimeRecord.Value.Date,
- IDCardNo = drecord.IDCardNo,
- };
- ////获取人员
- var getPserson = PersonService.GetPersonByIdentityCard(drecord.ProjectId, drecord.IDCardNo);
- if (getPserson == null)
- {
- getPserson = PersonService.GetPersonByName(drecord.ProjectId, drecord.EmployName);
- }
- if (getPserson != null)
- {
- newInOutRecord.UnitId = getPserson.UnitId;
- newInOutRecord.UnitName = UnitService.GetUnitNameByUnitId(getPserson.UnitId);
- newInOutRecord.DepartmentID = getPserson.TeamGroupId;
- newInOutRecord.DepartName = TeamGroupService.GetTeamGroupNameByTeamGroupId(getPserson.TeamGroupId);
- newInOutRecord.EmployNO = getPserson.CardNo;
- newInOutRecord.EmployName = getPserson.PersonName;
- newInOutRecord.Nation = getPserson.Nation;
- newInOutRecord.NationName = BasicDataService.GetDictNameByDictCode(getPserson.Nation);
- newInOutRecord.PostId = getPserson.WorkPostId;
- newInOutRecord.PostName = WorkPostService.getWorkPostNameById(getPserson.WorkPostId);
- }
- else
- {
- newInOutRecord.EmployName = drecord.EmployName;
- newInOutRecord.UnitId = null;
- newInOutRecord.PostId = null;
- }
-
- #region 上下班时间
- ///上午上班 8
- DateTime TWorkIn1 = drecord.DateTimeRecord.Value.Date.AddHours(8);
- ///上午下班 12:30
- DateTime TOffDuty1 = drecord.DateTimeRecord.Value.Date.AddHours(12).AddMinutes(30);
- ///下午上班 1:30
- DateTime TWorkIn2 = drecord.DateTimeRecord.Value.Date.AddHours(13).AddMinutes(30);
- ///下午下班 7
- DateTime TOffDuty2 = drecord.DateTimeRecord.Value.Date.AddHours(19);
- if (drecord.InOrOut == "进门")
- {
- ///上午上班
- if ( drecord.DateTimeRecord < TOffDuty1)
+ Model.T_d_EmployInOutRecord newInOutRecord = new Model.T_d_EmployInOutRecord
{
- newInOutRecord.WorkIn1 = drecord.DateTimeRecord;
+ NewID = SQLHelper.GetNewID(),
+ ProjectId = drecord.ProjectId,
+ InstallationName = ProjectService.GetProjectNameByProjectId(drecord.ProjectId),
+ RecordDate = drecord.DateTimeRecord.Value.Date,
+ IDCardNo = drecord.IDCardNo,
+ };
+ ////获取人员
+ var getPserson = PersonService.GetPersonByIdentityCard(drecord.ProjectId, drecord.IDCardNo);
+ if (getPserson == null)
+ {
+ getPserson = PersonService.GetPersonByName(drecord.ProjectId, drecord.EmployName);
}
- else if ( drecord.DateTimeRecord < TOffDuty2)
+ if (getPserson != null)
{
- newInOutRecord.WorkIn2 = drecord.DateTimeRecord;
+ newInOutRecord.UnitId = getPserson.UnitId;
+ newInOutRecord.UnitName = UnitService.GetUnitNameByUnitId(getPserson.UnitId);
+ newInOutRecord.DepartmentID = getPserson.TeamGroupId;
+ newInOutRecord.DepartName = TeamGroupService.GetTeamGroupNameByTeamGroupId(getPserson.TeamGroupId);
+ newInOutRecord.EmployNO = getPserson.CardNo;
+ newInOutRecord.EmployName = getPserson.PersonName;
+ newInOutRecord.Nation = getPserson.Nation;
+ newInOutRecord.NationName = BasicDataService.GetDictNameByDictCode(getPserson.Nation);
+ newInOutRecord.PostId = getPserson.WorkPostId;
+ newInOutRecord.PostName = WorkPostService.getWorkPostNameById(getPserson.WorkPostId);
}
else
{
- newInOutRecord.WorkIn3 = drecord.DateTimeRecord;
+ newInOutRecord.EmployName = drecord.EmployName;
+ newInOutRecord.UnitId = null;
+ newInOutRecord.PostId = null;
}
- }
- else
- {
- ///上午下班
- if ( drecord.DateTimeRecord < TWorkIn2)
+
+ #region 上下班时间
+ ///上午上班 8
+ DateTime TWorkIn1 = drecord.DateTimeRecord.Value.Date.AddHours(8);
+ ///上午下班 12:30
+ DateTime TOffDuty1 = drecord.DateTimeRecord.Value.Date.AddHours(12).AddMinutes(30);
+ ///下午上班 1:30
+ DateTime TWorkIn2 = drecord.DateTimeRecord.Value.Date.AddHours(13).AddMinutes(30);
+ ///下午下班 7
+ DateTime TOffDuty2 = drecord.DateTimeRecord.Value.Date.AddHours(19);
+ if (drecord.InOrOut == "进门")
{
- newInOutRecord.OffDuty1 = drecord.DateTimeRecord;
- }
- else if ( drecord.DateTimeRecord < TOffDuty2.AddHours(1))
- {
- newInOutRecord.OffDuty2 = drecord.DateTimeRecord;
+ ///上午上班
+ if (drecord.DateTimeRecord < TOffDuty1)
+ {
+ newInOutRecord.WorkIn1 = drecord.DateTimeRecord;
+ }
+ else if (drecord.DateTimeRecord < TOffDuty2)
+ {
+ newInOutRecord.WorkIn2 = drecord.DateTimeRecord;
+ }
+ else
+ {
+ newInOutRecord.WorkIn3 = drecord.DateTimeRecord;
+ }
}
else
{
- newInOutRecord.OffDuty3 = drecord.DateTimeRecord;
- }
- }
- #endregion
-
- bool isInsert = false;
- var getInOutRecord = Funs.DB.T_d_EmployInOutRecord.FirstOrDefault(x => x.ProjectId == drecord.ProjectId && x.IDCardNo == drecord.IDCardNo && x.RecordDate == drecord.DateTimeRecord.Value.Date);
- if (getInOutRecord == null)
- {
- isInsert = true;
- }
- if (isInsert)
- {
- newInOutRecord.ManHours = 4;
- newInOutRecord.ManOverHours = 0;
- Funs.DB.T_d_EmployInOutRecord.InsertOnSubmit(newInOutRecord);
- Funs.DB.SubmitChanges();
- }
- else
- {
- #region 计算人工时
- if (newInOutRecord.WorkIn1.HasValue && (!getInOutRecord.WorkIn1.HasValue || getInOutRecord.WorkIn1 > newInOutRecord.WorkIn1))
- {
- getInOutRecord.WorkIn1 = newInOutRecord.WorkIn1;
- }
- if (newInOutRecord.WorkIn2.HasValue && (!getInOutRecord.WorkIn2.HasValue || getInOutRecord.WorkIn2 > newInOutRecord.WorkIn2))
- {
- getInOutRecord.WorkIn2 = newInOutRecord.WorkIn2;
- }
- if (newInOutRecord.WorkIn3.HasValue && (!getInOutRecord.WorkIn3.HasValue || getInOutRecord.WorkIn3 > newInOutRecord.WorkIn3))
- {
- getInOutRecord.WorkIn3 = newInOutRecord.WorkIn3;
- }
-
- if (newInOutRecord.OffDuty1.HasValue && (!getInOutRecord.OffDuty1.HasValue || getInOutRecord.OffDuty1 < newInOutRecord.OffDuty1))
- {
- getInOutRecord.OffDuty1 = newInOutRecord.OffDuty1;
- }
- if (newInOutRecord.OffDuty2.HasValue && (!getInOutRecord.OffDuty2.HasValue || getInOutRecord.OffDuty2 < newInOutRecord.OffDuty2))
- {
- getInOutRecord.OffDuty2 = newInOutRecord.OffDuty2;
- }
- if (newInOutRecord.OffDuty3.HasValue && (!getInOutRecord.OffDuty3.HasValue || getInOutRecord.OffDuty3 < newInOutRecord.OffDuty3))
- {
- getInOutRecord.OffDuty3 = newInOutRecord.OffDuty3;
- }
- int m1 = 0;
- if (getInOutRecord.WorkIn1.HasValue || getInOutRecord.OffDuty1.HasValue)
- {
- m1 = 240;
- if (getInOutRecord.WorkIn1.HasValue && getInOutRecord.OffDuty1.HasValue)
+ ///上午下班
+ if (drecord.DateTimeRecord < TWorkIn2)
{
- m1 = Convert.ToInt32((getInOutRecord.OffDuty1 - getInOutRecord.WorkIn1).Value.TotalMinutes);
+ newInOutRecord.OffDuty1 = drecord.DateTimeRecord;
}
- }
- int m2 = 0;
- if (getInOutRecord.WorkIn2.HasValue || getInOutRecord.OffDuty2.HasValue)
- {
- m2 = 240;
- if (getInOutRecord.WorkIn2.HasValue && getInOutRecord.OffDuty2.HasValue)
+ else if (drecord.DateTimeRecord < TOffDuty2.AddHours(1))
{
- m2 = Convert.ToInt32((getInOutRecord.OffDuty2 - getInOutRecord.WorkIn2).Value.TotalMinutes);
+ newInOutRecord.OffDuty2 = drecord.DateTimeRecord;
}
- }
- int m3 = 0;
- if (getInOutRecord.WorkIn3.HasValue || getInOutRecord.OffDuty3.HasValue)
- {
- m3 = 240;
- if (getInOutRecord.WorkIn3.HasValue && getInOutRecord.OffDuty3.HasValue)
+ else
{
- m3 = Convert.ToInt32((getInOutRecord.OffDuty3 - getInOutRecord.WorkIn3).Value.TotalMinutes);
+ newInOutRecord.OffDuty3 = drecord.DateTimeRecord;
}
}
#endregion
- getInOutRecord.ManHours = Convert.ToInt32(Math.Ceiling((m1 + m2 + m3) * 1.0 / 60));
- getInOutRecord.ManOverHours = Convert.ToInt32(Math.Ceiling(m3 * 1.0 / 60));
- Funs.DB.SubmitChanges();
+ bool isInsert = false;
+ var getInOutRecord = db.T_d_EmployInOutRecord.FirstOrDefault(x => x.ProjectId == drecord.ProjectId && x.IDCardNo == drecord.IDCardNo && x.RecordDate == drecord.DateTimeRecord.Value.Date);
+ if (getInOutRecord == null)
+ {
+ isInsert = true;
+ }
+ if (isInsert)
+ {
+ newInOutRecord.ManHours = 4;
+ newInOutRecord.ManOverHours = 0;
+ db.T_d_EmployInOutRecord.InsertOnSubmit(newInOutRecord);
+ db.SubmitChanges();
+ }
+ else
+ {
+ #region 计算人工时
+ if (newInOutRecord.WorkIn1.HasValue && (!getInOutRecord.WorkIn1.HasValue || getInOutRecord.WorkIn1 > newInOutRecord.WorkIn1))
+ {
+ getInOutRecord.WorkIn1 = newInOutRecord.WorkIn1;
+ }
+ if (newInOutRecord.WorkIn2.HasValue && (!getInOutRecord.WorkIn2.HasValue || getInOutRecord.WorkIn2 > newInOutRecord.WorkIn2))
+ {
+ getInOutRecord.WorkIn2 = newInOutRecord.WorkIn2;
+ }
+ if (newInOutRecord.WorkIn3.HasValue && (!getInOutRecord.WorkIn3.HasValue || getInOutRecord.WorkIn3 > newInOutRecord.WorkIn3))
+ {
+ getInOutRecord.WorkIn3 = newInOutRecord.WorkIn3;
+ }
+
+ if (newInOutRecord.OffDuty1.HasValue && (!getInOutRecord.OffDuty1.HasValue || getInOutRecord.OffDuty1 < newInOutRecord.OffDuty1))
+ {
+ getInOutRecord.OffDuty1 = newInOutRecord.OffDuty1;
+ }
+ if (newInOutRecord.OffDuty2.HasValue && (!getInOutRecord.OffDuty2.HasValue || getInOutRecord.OffDuty2 < newInOutRecord.OffDuty2))
+ {
+ getInOutRecord.OffDuty2 = newInOutRecord.OffDuty2;
+ }
+ if (newInOutRecord.OffDuty3.HasValue && (!getInOutRecord.OffDuty3.HasValue || getInOutRecord.OffDuty3 < newInOutRecord.OffDuty3))
+ {
+ getInOutRecord.OffDuty3 = newInOutRecord.OffDuty3;
+ }
+ int m1 = 0;
+ if (getInOutRecord.WorkIn1.HasValue || getInOutRecord.OffDuty1.HasValue)
+ {
+ m1 = 240;
+ if (getInOutRecord.WorkIn1.HasValue && getInOutRecord.OffDuty1.HasValue)
+ {
+ m1 = Convert.ToInt32((getInOutRecord.OffDuty1 - getInOutRecord.WorkIn1).Value.TotalMinutes);
+ }
+ }
+ int m2 = 0;
+ if (getInOutRecord.WorkIn2.HasValue || getInOutRecord.OffDuty2.HasValue)
+ {
+ m2 = 240;
+ if (getInOutRecord.WorkIn2.HasValue && getInOutRecord.OffDuty2.HasValue)
+ {
+ m2 = Convert.ToInt32((getInOutRecord.OffDuty2 - getInOutRecord.WorkIn2).Value.TotalMinutes);
+ }
+ }
+ int m3 = 0;
+ if (getInOutRecord.WorkIn3.HasValue || getInOutRecord.OffDuty3.HasValue)
+ {
+ m3 = 240;
+ if (getInOutRecord.WorkIn3.HasValue && getInOutRecord.OffDuty3.HasValue)
+ {
+ m3 = Convert.ToInt32((getInOutRecord.OffDuty3 - getInOutRecord.WorkIn3).Value.TotalMinutes);
+ }
+ }
+ #endregion
+
+ getInOutRecord.ManHours = Convert.ToInt32(Math.Ceiling((m1 + m2 + m3) * 1.0 / 60));
+ getInOutRecord.ManOverHours = Convert.ToInt32(Math.Ceiling(m3 * 1.0 / 60));
+ db.SubmitChanges();
+ }
}
}
-
}
#endregion
@@ -194,22 +196,25 @@ namespace BLL
///
public static Model.T_d_department GetSupDep(string projectId, int? departmentID, int ParentID)
{
- var getDep = Funs.DB.T_d_department.FirstOrDefault(x => x.ProjectId == projectId && x.DepartmentID == departmentID);
- if (getDep != null)
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
- if (getDep.ParentID == ParentID)
+ var getDep =db.T_d_department.FirstOrDefault(x => x.ProjectId == projectId && x.DepartmentID == departmentID);
+ if (getDep != null)
{
- return getDep;
+ if (getDep.ParentID == ParentID)
+ {
+ return getDep;
+ }
+ else
+ {
+ return GetSupDep(projectId, getDep.ParentID, ParentID);
+ }
}
else
{
- return GetSupDep(projectId, getDep.ParentID, ParentID);
+ return null;
}
}
- else
- {
- return null;
- }
}
#endregion
}
diff --git a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs
index 3b8c6c78..e1db32c8 100644
--- a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs
+++ b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs
@@ -65,7 +65,7 @@ namespace BLL
db.SubmitChanges();
/// 监理 业主 不进入
var getPUnit = db.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == newPersonInOut.ProjectId && x.UnitId == newPersonInOut.UnitId);
- if (getPUnit.UnitType != Const.ProjectUnitType_3 && getPUnit.UnitType != Const.ProjectUnitType_4)
+ if (getPUnit.IsSynchro == true)
{
var getRealNameP = db.RealName_Project.FirstOrDefault(x => x.ProCode == newPersonInOut.ProCode);
if (getRealNameP != null)
diff --git a/SGGL/BLL/ProjectData/ProjectUnitService.cs b/SGGL/BLL/ProjectData/ProjectUnitService.cs
index 7f677eb0..b923eeee 100644
--- a/SGGL/BLL/ProjectData/ProjectUnitService.cs
+++ b/SGGL/BLL/ProjectData/ProjectUnitService.cs
@@ -78,6 +78,7 @@
PlanCostB = projectUnit.PlanCostB,
ContractRange = projectUnit.ContractRange,
RealNamePushTime= projectUnit.RealNamePushTime,
+ IsSynchro = projectUnit.IsSynchro,
};
db.Project_ProjectUnit.InsertOnSubmit(newProjectUnit);
db.SubmitChanges();
@@ -100,6 +101,7 @@
newProjectUnit.PlanCostB = projectUnit.PlanCostB;
newProjectUnit.ContractRange = projectUnit.ContractRange;
newProjectUnit.RealNamePushTime = projectUnit.RealNamePushTime;
+ newProjectUnit.IsSynchro = projectUnit.IsSynchro;
db.SubmitChanges();
}
}
diff --git a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs
index 8f105c96..9b6d1631 100644
--- a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs
+++ b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs
@@ -752,7 +752,7 @@ namespace BLL
join z in db.RealName_Project on y.JTProjectCode equals z.ProCode
join u in db.Base_Unit on x.UnitId equals u.UnitId
where z.ProCode != null && !x.RealNamePushTime.HasValue && x.UnitType != null
- && (proCode == null || y.JTProjectCode == proCode)
+ && (proCode == null || y.JTProjectCode == proCode) && x.IsSynchro == true
&& u.CollCropCode != null && u.CollCropCode != ""
select new
{
@@ -973,8 +973,8 @@ namespace BLL
&& y.JTProjectCode == proCode && z.JTproCode != null && x.IsCardNoOK ==true && v.TeamId.HasValue
&& ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue && x.RealNameAddTime.HasValue)
|| (type != Const.BtnModify && !x.RealNameAddTime.HasValue && x.IsUsed && !x.OutTime.HasValue
- && x.HeadImage != null && x.HeadImage.Length > 0))
- && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
+ && x.HeadImage != null && x.HeadImage.Length > 0))
+ && p.IsSynchro == true
select new
{
name = x.PersonName,
@@ -1103,8 +1103,8 @@ namespace BLL
join p in Funs.DB.Project_ProjectUnit on new { x.UnitId,x.ProjectId } equals new { p.UnitId,p.ProjectId }
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)
- && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
+ && ((type ==Const.BtnAdd && x.HeadImage != null && x.HeadImage.Length > 0) || type == Const.BtnModify)
+ && p.IsSynchro == true
select new
{
name = x.PersonName,
@@ -1393,7 +1393,7 @@ namespace BLL
&& p.IsCardNoOK ==true && z.JTproCode != null
&& (!p.OutTime.HasValue || p.OutTime > x.ChangeTime)
&& !x.RealNamePushTime.HasValue
- && pu.UnitType != Const.ProjectUnitType_3 && pu.UnitType != Const.ProjectUnitType_4
+ && pu.IsSynchro == true
orderby x.ChangeTime descending
select new
{
@@ -1600,7 +1600,7 @@ namespace BLL
join w in db.Base_WorkPost on x.WorkPostId equals w.WorkPostId
join p in db.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId }
where personList.Contains(x.PersonId) && z.JTproCode != null
- && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
+ && p.IsSynchro == true
select new
{
name = x.PersonName,
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx
index 9a5b72aa..ede084f4 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx
@@ -80,6 +80,9 @@
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="出场时间"
HeaderTextAlign="Center" TextAlign="Center">
+
+
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx.cs
index 3c2e7b46..b0932a18 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx.cs
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx.cs
@@ -53,7 +53,9 @@ namespace FineUIPro.Web.ProjectData
{
if (this.drpProject.Items.Count() > 0)
{
- string strSql = @"SELECT ProjectUnit.ProjectUnitId,ProjectUnit.ProjectId,Project.ProjectCode,Project.ProjectName,ProjectUnit.UnitId,Unit.UnitCode,Unit.UnitName,ProjectUnit.UnitType,sysConst.ConstText AS UnitTypeName,ProjectUnit.InTime,ProjectUnit.OutTime "
+ string strSql = @"SELECT ProjectUnit.ProjectUnitId,ProjectUnit.ProjectId,Project.ProjectCode,Project.ProjectName,ProjectUnit.UnitId,Unit.UnitCode
+ ,Unit.UnitName,ProjectUnit.UnitType,sysConst.ConstText AS UnitTypeName,ProjectUnit.InTime
+ ,ProjectUnit.OutTime,ProjectUnit.IsSynchro "
+ @" FROM Project_ProjectUnit AS ProjectUnit "
+ @" LEFT JOIN Base_Project AS Project ON ProjectUnit.ProjectId = Project.ProjectId "
+ @" LEFT JOIN Base_Unit AS Unit ON ProjectUnit.UnitId = Unit.UnitId "
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx
index c13fec81..1004aecf 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx
@@ -84,7 +84,12 @@
-
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx.cs
index 27eec941..e84bef6e 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx.cs
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx.cs
@@ -38,6 +38,7 @@ namespace FineUIPro.Web.ProjectData
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
BLL.ConstValue.InitConstValueDropDownList(this.drpUnitType, ConstValue.Group_ProjectUnitType, true);
BasicDataService.InitBasicDataProjectUnitDropDownList(this.drpIdcardType, "ZHENGJIAN_TYPE", true);
+ this.ckIsSynchro.Checked = false;
this.ProjectUnitId = Request.QueryString["ProjectUnitId"];
if (!String.IsNullOrEmpty(this.ProjectUnitId))
{
@@ -85,6 +86,10 @@ namespace FineUIPro.Web.ProjectData
this.nbPlanCostB.Text = projectUnit.PlanCostB.ToString();
}
this.txtContractRange.Text = projectUnit.ContractRange;
+ if (projectUnit.IsSynchro == true)
+ {
+ this.ckIsSynchro.Checked = true;
+ }
}
}
}
@@ -109,6 +114,14 @@ namespace FineUIPro.Web.ProjectData
newProjectUnit.PlanCostA = Funs.GetNewDecimalOrZero(this.nbPlanCostA.Text.Trim());
newProjectUnit.PlanCostB = Funs.GetNewDecimalOrZero(this.nbPlanCostB.Text.Trim());
newProjectUnit.ContractRange = this.txtContractRange.Text.Trim();
+ if (this.ckIsSynchro.Checked)
+ {
+ newProjectUnit.IsSynchro = true;
+ }
+ else
+ {
+ newProjectUnit.IsSynchro = false;
+ }
BLL.ProjectUnitService.UpdateProjectUnit(newProjectUnit);
Model.Base_Unit unit = BLL.UnitService.GetUnitByUnitId(newProjectUnit.UnitId);
if (unit != null)
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx.designer.cs
index 6879a3b0..465537b1 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx.designer.cs
@@ -174,6 +174,15 @@ namespace FineUIPro.Web.ProjectData {
///
protected global::FineUIPro.TextArea txtContractRange;
+ ///
+ /// ckIsSynchro 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox ckIsSynchro;
+
///
/// Toolbar1 控件。
///
diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs
index 6ffda2c4..7418ed96 100644
--- a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs
+++ b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs
@@ -428,7 +428,7 @@ namespace FineUIPro.Web.ZHGL.RealName
&& x.IsCardNoOK==true
&& v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0
&& !x.RealNameAddTime.HasValue
- && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
+ && p.IsSynchro == true
select x.IdentityCard).Take(500);
foreach (var item in getIdentityCards)
{
@@ -477,8 +477,8 @@ namespace FineUIPro.Web.ZHGL.RealName
join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId
join p in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId }
where x.ProjectId == projectId && x.IsCardNoOK == true && v.TeamId.HasValue
- && !x.RealNameUpdateTime.HasValue
- && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
+ && !x.RealNameUpdateTime.HasValue
+ && p.IsSynchro == true
select x.IdentityCard).Take(100);
foreach (var item in getIdentityCards)
{
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index a062806d..dc35ead0 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -222840,6 +222840,8 @@ namespace Model
private System.Nullable _RealNamePushTime;
+ private System.Nullable _IsSynchro;
+
private EntityRef _Base_Project;
private EntityRef _Base_Unit;
@@ -222872,6 +222874,8 @@ namespace Model
partial void OnAuditManChanged();
partial void OnRealNamePushTimeChanging(System.Nullable value);
partial void OnRealNamePushTimeChanged();
+ partial void OnIsSynchroChanging(System.Nullable value);
+ partial void OnIsSynchroChanged();
#endregion
public Project_ProjectUnit()
@@ -223129,6 +223133,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsSynchro", DbType="Bit")]
+ public System.Nullable IsSynchro
+ {
+ get
+ {
+ return this._IsSynchro;
+ }
+ set
+ {
+ if ((this._IsSynchro != value))
+ {
+ this.OnIsSynchroChanging(value);
+ this.SendPropertyChanging();
+ this._IsSynchro = value;
+ this.SendPropertyChanged("IsSynchro");
+ this.OnIsSynchroChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Project_ProjectUnit_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
@@ -252977,7 +253001,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(2000)")]
public string Address
{
get
@@ -253041,7 +253065,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
public string WorkAreaName
{
get
@@ -334850,7 +334874,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(2000)")]
public string Address
{
get
@@ -334866,7 +334890,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
public string WorkAreaName
{
get