202306131、新增项目级消息待办页面功能。2、新增项目单位是否同步实名制设置功能。3、优化考试合格自动生成卡号功能。
This commit is contained in:
@@ -749,6 +749,11 @@
|
||||
/// </summary>
|
||||
public const string Menu_PDigData = "Menu_PDigData";
|
||||
|
||||
/// <summary>
|
||||
/// 消息
|
||||
/// </summary>
|
||||
public const string Menu_ToDo = "Menu_ToDo";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 考勤方式定义
|
||||
|
||||
@@ -70,7 +70,8 @@ namespace BLL
|
||||
SubProject = costManage.SubProject,
|
||||
States = costManage.States,
|
||||
CompileMan = costManage.CompileMan,
|
||||
CompileDate = costManage.CompileDate
|
||||
CompileDate = costManage.CompileDate,
|
||||
NextManId= costManage.NextManId,
|
||||
};
|
||||
|
||||
db.CostGoods_CostManage.InsertOnSubmit(newCostManage);
|
||||
@@ -105,6 +106,7 @@ namespace BLL
|
||||
newCostManage.States = costManage.States;
|
||||
newCostManage.CompileMan = costManage.CompileMan;
|
||||
newCostManage.CompileDate = costManage.CompileDate;
|
||||
newCostManage.NextManId = costManage.NextManId;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ namespace BLL
|
||||
|
||||
/// 监理 业主 不进入
|
||||
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.UnitType != Const.ProjectUnitType_3 && getPUnit.UnitType != Const.ProjectUnitType_4 && getPUnit.IsSynchro == true)
|
||||
{
|
||||
string proCode = ProjectService.GetContractNoByProjectId(newPersonInOut.ProjectId);
|
||||
var getRealNameP = db.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using FineUIPro;
|
||||
using Microsoft.SqlServer.Dts.Runtime;
|
||||
using Model;
|
||||
using NPOI.HSSF.Record.Aggregates;
|
||||
using NPOI.SS.Formula.PTG;
|
||||
using System;
|
||||
using System.Collections;
|
||||
@@ -641,7 +642,7 @@ namespace BLL
|
||||
var getMaxCarNo = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == projectId && x.CardNo.Contains(prefix)).Max(x => x.CardNo);
|
||||
if (!string.IsNullOrEmpty(getMaxCarNo) && getMaxCarNo.Length > 5)
|
||||
{
|
||||
var getInt = Funs.GetNewInt(Funs.GetSubStr(getMaxCarNo, 5));
|
||||
var getInt = Funs.GetNewInt(getMaxCarNo.Substring(getMaxCarNo.Length-5));
|
||||
if (getInt.HasValue)
|
||||
{
|
||||
cardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getSitePerson.ProjectId, prefix);
|
||||
|
||||
@@ -510,24 +510,34 @@ namespace BLL
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static void SendCarNo()
|
||||
public static int SendCarNo(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
int count = 0;
|
||||
var getPersons = from x in db.SitePerson_Person
|
||||
where x.States == Const.State_1 && x.CardNo == null
|
||||
where x.States == Const.State_1 && x.CardNo == null && x.ProjectId == projectId
|
||||
select x;
|
||||
foreach (var item in getPersons)
|
||||
{
|
||||
|
||||
var isNull = db.EduTrain_TrainRecordDetail.FirstOrDefault(x => x.PersonId == item.PersonId);
|
||||
if (isNull != null) ////未参加过培训的人员
|
||||
var isNull = db.EduTrain_TrainRecordDetail.FirstOrDefault(x => x.PersonId == item.PersonId && x.CheckResult ==true);
|
||||
if (isNull != null) ////参加过培训的人员
|
||||
{
|
||||
item.CardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", item.ProjectId, UnitService.GetUnitCodeByUnitId(item.UnitId));
|
||||
db.SubmitChanges();
|
||||
string prefix = UnitService.GetUnitCodeByUnitId(item.UnitId) + "-";
|
||||
var getMaxCarNo = db.SitePerson_Person.Where(x => x.ProjectId == item.ProjectId && x.CardNo.Contains(prefix)).Max(x => x.CardNo);
|
||||
if (!string.IsNullOrEmpty(getMaxCarNo) && getMaxCarNo.Length > 5)
|
||||
{
|
||||
var getInt = Funs.GetNewInt(getMaxCarNo.Substring(getMaxCarNo.Length - 5));
|
||||
if (getInt.HasValue)
|
||||
{
|
||||
item.CardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", item.ProjectId, prefix);
|
||||
db.SubmitChanges();
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,10 +337,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
var pcount = from x in db.Sys_Log
|
||||
where x.ProjectId != null && x.OperationTime > DateTime.Now.AddDays(-3)
|
||||
var pcount = (from x in db.Sys_Log
|
||||
where x.ProjectId != null && x.OperationTime > DateTime.Now.AddDays(-2)
|
||||
group x by x.ProjectId into g
|
||||
select new { g.First().ProjectId, count = g.Count() };
|
||||
select new { g.First().ProjectId, count = g.Count() }).Distinct();
|
||||
|
||||
List<Model.Base_Project> getList = new List<Base_Project>();
|
||||
if (getProjects.Count() > 0)
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -762,7 +762,7 @@ namespace BLL
|
||||
&& x.UnitType != null
|
||||
&& (proCode == null || y.ContractNo == proCode)
|
||||
&& u.CollCropCode != null && u.CollCropCode != ""
|
||||
&& z.JTproCode != null
|
||||
&& z.JTproCode != null && x.IsSynchro == true
|
||||
select new
|
||||
{
|
||||
unitId = x.UnitId,
|
||||
@@ -900,7 +900,7 @@ namespace BLL
|
||||
where z.ProCode != null && !x.RealNamePushTime.HasValue && x.TeamTypeId != null
|
||||
&& (proCode == null || y.ContractNo == proCode)
|
||||
&& u.CollCropCode != null && u.CollCropCode != ""
|
||||
&& z.JTproCode != null
|
||||
&& z.JTproCode != null && p.IsSynchro == true
|
||||
&& p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
|
||||
select new
|
||||
{
|
||||
@@ -997,7 +997,7 @@ namespace BLL
|
||||
&& y.ContractNo == proCode && v.TeamId.HasValue
|
||||
&& ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue && x.RealNameAddTime.HasValue)
|
||||
|| (type != Const.BtnModify && !x.RealNameAddTime.HasValue && x.States == Const.State_1 && Persons.HeadImage.Length > 0))
|
||||
&& p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
|
||||
&& p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4 && p.IsSynchro == true
|
||||
&& z.JTproCode != null
|
||||
select new
|
||||
{
|
||||
@@ -1517,12 +1517,13 @@ namespace BLL
|
||||
join z in Funs.DB.RealName_Project on x.ProCode equals z.ProCode
|
||||
join v in Funs.DB.ProjectData_TeamGroup on p.TeamGroupId equals v.TeamGroupId
|
||||
join r in Funs.DB.RealName_CollTeam on v.TeamId equals r.TeamId
|
||||
join pu in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { pu.UnitId, pu.ProjectId }
|
||||
where x.IdcardNumber != null && x.ChangeTime.HasValue
|
||||
&& (proCode == null || x.ProCode == proCode)
|
||||
&& v.TeamId.HasValue && r.TeamId.HasValue
|
||||
&& p.States == Const.State_1
|
||||
&& !x.RealNamePushTime.HasValue
|
||||
&& z.JTproCode != null
|
||||
&& z.JTproCode != null && pu.IsSynchro == true
|
||||
orderby x.ChangeTime descending
|
||||
select new
|
||||
{
|
||||
@@ -1735,7 +1736,8 @@ namespace BLL
|
||||
join z in db.RealName_Project on y.ContractNo equals z.ProCode
|
||||
join v in db.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId
|
||||
join w in db.Base_WorkPost on x.WorkPostId equals w.WorkPostId
|
||||
where personList.Contains(x.PersonId) && z.JTproCode != null
|
||||
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.IsSynchro == true
|
||||
select new
|
||||
{
|
||||
name = x.PersonName,
|
||||
|
||||
Reference in New Issue
Block a user