20210909
This commit is contained in:
		
							parent
							
								
									41dafe1113
								
							
						
					
					
						commit
						0543d5bfbc
					
				|  | @ -936,7 +936,7 @@ namespace BLL | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|                 InsertRealNamePushLog(null, proCode, "推送项目部/施工队数据", sucess, code,  mess, data, pushContent); |                 InsertRealNamePushLog(null, proCode, "推送项目部/施工队", sucess, code,  mess, data, pushContent); | ||||||
|             } |             } | ||||||
|             else |             else | ||||||
|             { |             { | ||||||
|  | @ -970,10 +970,10 @@ namespace BLL | ||||||
|                                join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId |                                join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId | ||||||
|                                join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId |                                join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId | ||||||
|                                where (identityCard == null ||  x.IdentityCard == identityCard) |                                where (identityCard == null ||  x.IdentityCard == identityCard) | ||||||
|                                 && y.JTProjectCode == proCode  && z.JTproCode != null && x.IsCardNoOK ==true |                                 && y.JTProjectCode == proCode  && z.JTproCode != null && x.IsCardNoOK ==true && v.TeamId.HasValue | ||||||
|                                 && v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0 |                                && ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue && x.RealNameAddTime.HasValue) | ||||||
|                                && ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue  |                                  || (type != Const.BtnModify && !x.RealNameAddTime.HasValue && x.IsUsed && !x.OutTime.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 |                                 && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4 | ||||||
|                                select new |                                select new | ||||||
|                                { |                                { | ||||||
|  | @ -1102,8 +1102,8 @@ namespace BLL | ||||||
|                                join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId |                                join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId | ||||||
|                                join p in  Funs.DB.Project_ProjectUnit on new { x.UnitId,x.ProjectId } equals new { p.UnitId,p.ProjectId } |                                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 |                                where  x.IdentityCard == identityCard  && y.JTProjectCode == proCode | ||||||
|                                && v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0                                                         |                                && v.TeamId.HasValue && z.JTproCode != null | ||||||
|                                && z.JTproCode != null  |                                && ((type ==Const.BtnAdd && x.HeadImage != null && x.HeadImage.Length > 0) || (type == Const.BtnModify && x.RealNameAddTime.HasValue))                              | ||||||
|                                && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4 |                                && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4 | ||||||
|                                select new |                                select new | ||||||
|                                { |                                { | ||||||
|  | @ -1190,8 +1190,28 @@ namespace BLL | ||||||
|                             } |                             } | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
| 
 |  | ||||||
|                     InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code,  mess, data, pushContent); |                     InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code,  mess, data, pushContent); | ||||||
|  |                     if (data.Contains("已存在") || mess.Contains("已存在")) | ||||||
|  |                     { | ||||||
|  |                         using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) | ||||||
|  |                         { | ||||||
|  |                             foreach (var item in getData) | ||||||
|  |                             { | ||||||
|  |                                 if (data.Contains(item.idcardNumber) || mess.Contains(item.idcardNumber)) | ||||||
|  |                                 { | ||||||
|  |                                     var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == item.PersonId); | ||||||
|  |                                     if (getPerson != null) | ||||||
|  |                                     { | ||||||
|  |                                         if (!getPerson.RealNameAddTime.HasValue) | ||||||
|  |                                         { | ||||||
|  |                                             getPerson.RealNameAddTime = DateTime.Now; | ||||||
|  |                                         } | ||||||
|  |                                         db.SubmitChanges(); | ||||||
|  |                                     } | ||||||
|  |                                 } | ||||||
|  |                             } | ||||||
|  |                         } | ||||||
|  |                     } | ||||||
|                 } |                 } | ||||||
|                 else |                 else | ||||||
|                 { |                 { | ||||||
|  | @ -1295,11 +1315,11 @@ namespace BLL | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                     InsertRealNamePushLog(null, proCode, "推送考勤数据", sucess, code, mess, data, pushContent); |                     InsertRealNamePushLog(null, proCode, "推送考勤数据", sucess, code, mess, data, pushContent); | ||||||
|                     if (data.Contains("无法入场")) |                     if (data.Contains("无法入场") || mess.Contains("班组")) | ||||||
|                     { |                     { | ||||||
|                         foreach (var item in getData) |                         foreach (var item in getData) | ||||||
|                         { |                         { | ||||||
|                             if (data.Contains(item.idcardNumber)) |                             if (data.Contains(item.idcardNumber) || mess.Contains(item.idcardNumber)) | ||||||
|                             { |                             { | ||||||
|                                 using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) |                                 using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) | ||||||
|                                 { |                                 { | ||||||
|  |  | ||||||
|  | @ -47,15 +47,15 @@ | ||||||
|                             <asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label> |                             <asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label> | ||||||
|                         </ItemTemplate> |                         </ItemTemplate> | ||||||
|                     </f:TemplateField> |                     </f:TemplateField> | ||||||
|                     <f:RenderField Width="120px" ColumnID="ProjectCode" DataField="ProjectCode" |                     <f:RenderField Width="100px" ColumnID="ProjectCode" DataField="ProjectCode" | ||||||
|                         SortField="ProjectCode" FieldType="String" HeaderText="项目号" HeaderTextAlign="Center" |                         SortField="ProjectCode" FieldType="String" HeaderText="项目号" HeaderTextAlign="Center" | ||||||
|                         TextAlign="Left"> |                         TextAlign="Left"> | ||||||
|                     </f:RenderField> |                     </f:RenderField> | ||||||
|                       <f:RenderField Width="150px" ColumnID="proShortName" DataField="proShortName" |                       <f:RenderField Width="160px" ColumnID="proShortName" DataField="proShortName" | ||||||
|                         SortField="proShortName" FieldType="String" HeaderText="项目" HeaderTextAlign="Center" |                         SortField="proShortName" FieldType="String" HeaderText="项目" HeaderTextAlign="Center" | ||||||
|                         TextAlign="Left"> |                         TextAlign="Left"> | ||||||
|                     </f:RenderField> |                     </f:RenderField> | ||||||
|                     <f:RenderField Width="170px" ColumnID="PushType" DataField="PushType"  |                     <f:RenderField Width="160px" ColumnID="PushType" DataField="PushType"  | ||||||
|                         SortField="PushType" FieldType="String" HeaderText="数据类型" HeaderTextAlign="Center" |                         SortField="PushType" FieldType="String" HeaderText="数据类型" HeaderTextAlign="Center" | ||||||
|                         TextAlign="Left"> |                         TextAlign="Left"> | ||||||
|                     </f:RenderField> |                     </f:RenderField> | ||||||
|  | @ -63,7 +63,7 @@ | ||||||
|                         HeaderText="时间" HeaderTextAlign="Center" TextAlign="Center"> |                         HeaderText="时间" HeaderTextAlign="Center" TextAlign="Center"> | ||||||
|                     </f:RenderField> |                     </f:RenderField> | ||||||
|                       <f:RenderField Width="80px" ColumnID="Success" DataField="Success" |                       <f:RenderField Width="80px" ColumnID="Success" DataField="Success" | ||||||
|                         SortField="Success" FieldType="String" HeaderText="是否成功" HeaderTextAlign="Center" |                         SortField="Success" FieldType="String" HeaderText="成功" HeaderTextAlign="Center" | ||||||
|                         TextAlign="Left"> |                         TextAlign="Left"> | ||||||
|                     </f:RenderField> |                     </f:RenderField> | ||||||
|                         <f:RenderField Width="150px" ColumnID="ReturnData" DataField="ReturnData" |                         <f:RenderField Width="150px" ColumnID="ReturnData" DataField="ReturnData" | ||||||
|  |  | ||||||
|  | @ -397,7 +397,7 @@ namespace FineUIPro.Web.ZHGL.RealName | ||||||
|                                         join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId |                                         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 } |                                         join p in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId } | ||||||
|                                         where x.ProjectId == projectId |                                         where x.ProjectId == projectId | ||||||
|                                         && x.IdentityCard != null && (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18) |                                         && x.IsCardNoOK==true | ||||||
|                                          && v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0 |                                          && v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0 | ||||||
|                                         && !x.RealNameAddTime.HasValue |                                         && !x.RealNameAddTime.HasValue | ||||||
|                                         && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4 |                                         && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4 | ||||||
|  | @ -416,6 +416,7 @@ namespace FineUIPro.Web.ZHGL.RealName | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|  |             SynchroSetService.InsertRealNamePushLog(projectId, proCode, "单条批量推送(新增)", "完成", null, message, null, null); | ||||||
|             if (string.IsNullOrEmpty(message)) |             if (string.IsNullOrEmpty(message)) | ||||||
|             { |             { | ||||||
|                 ShowNotify("同步完成!" + count.ToString() + "条", MessageBoxIcon.Success); |                 ShowNotify("同步完成!" + count.ToString() + "条", MessageBoxIcon.Success); | ||||||
|  | @ -441,11 +442,11 @@ namespace FineUIPro.Web.ZHGL.RealName | ||||||
|             { |             { | ||||||
|                 var getIdentityCards = (from x in Funs.DB.SitePerson_Person |                 var getIdentityCards = (from x in Funs.DB.SitePerson_Person | ||||||
|                                         join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId |                                         join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId | ||||||
|                                         where x.ProjectId == projectId |                                         join p in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId } | ||||||
|                                         && x.IdentityCard != null && (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18) |                                         where x.ProjectId == projectId && x.IsCardNoOK == true && v.TeamId.HasValue | ||||||
|                                          && v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0 |                                         && !x.RealNameUpdateTime.HasValue && x.RealNameAddTime.HasValue | ||||||
|                                         && !x.RealNameUpdateTime.HasValue |                                         && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4 | ||||||
|                                         select x.IdentityCard).Take(500); |                                         select x.IdentityCard).Take(100); | ||||||
|                 foreach (var item in getIdentityCards) |                 foreach (var item in getIdentityCards) | ||||||
|                 { |                 { | ||||||
|                     string mes = BLL.SynchroSetService.PushPersonsByIdentityCard(Const.BtnModify, getRProjects.ProCode, item) ?? ""; |                     string mes = BLL.SynchroSetService.PushPersonsByIdentityCard(Const.BtnModify, getRProjects.ProCode, item) ?? ""; | ||||||
|  | @ -460,6 +461,7 @@ namespace FineUIPro.Web.ZHGL.RealName | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|  |             SynchroSetService.InsertRealNamePushLog(projectId, proCode, "单条批量推送(更新)", "完成", null, message, null, null); | ||||||
|             if (string.IsNullOrEmpty(message)) |             if (string.IsNullOrEmpty(message)) | ||||||
|             { |             { | ||||||
|                 ShowNotify("同步完成!" + count.ToString() + "条", MessageBoxIcon.Success); |                 ShowNotify("同步完成!" + count.ToString() + "条", MessageBoxIcon.Success); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue