项目人员信息档案新增、导入补充:机构划分、组织单元、人员分类、员工子组、备注信息
This commit is contained in:
@@ -866,11 +866,11 @@ namespace BLL
|
||||
var tb1 = SQLHelper.GetDataTableRunText(strSql1, null);
|
||||
|
||||
string strSql2 = @" select ProjectId,COUNT(1) num from [dbo].[SitePerson_Person]
|
||||
where IsUsed=1 and (OutTime is null or OutTime>'" + dateZ + "') and UnitId ='"+Const.UnitId_TCC+@"'
|
||||
where IsUsed=1 and (OutTime is null or OutTime>'" + dateZ + "') and UnitId ='"+Const.UnitId_XJYJ+@"'
|
||||
group by ProjectId";
|
||||
var tb2 = SQLHelper.GetDataTableRunText(strSql2, null);
|
||||
string strSql3 = @"select ProjectId,COUNT(1) num from [dbo].[SitePerson_Person]
|
||||
where IsUsed=1 and (OutTime is null or OutTime>'" + dateZ + @"') and UnitId !='"+Const.UnitId_TCC+@"'
|
||||
where IsUsed=1 and (OutTime is null or OutTime>'" + dateZ + @"') and UnitId !='"+Const.UnitId_XJYJ+@"'
|
||||
group by ProjectId";
|
||||
var tb3 = SQLHelper.GetDataTableRunText(strSql3, null);
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace BLL
|
||||
public static string getaccess_token()
|
||||
{
|
||||
string access_token = string.Empty;
|
||||
string appid = Const.AppID_TCC;
|
||||
string secret = Const.AppSecret_TCC;
|
||||
string appid = Const.AppID_XJYJ;
|
||||
string secret = Const.AppSecret_XJYJ;
|
||||
//string appid = "wxb5f0e8051b7b9eee";
|
||||
//string secret = "626175f8860bf84beb4cf507b9445115";
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
@@ -130,8 +130,8 @@ namespace BLL
|
||||
public static string getUserOpenId(string userId, string jsCode,bool isRefresh = false)
|
||||
{
|
||||
string openId = string.Empty;
|
||||
string appid = Const.AppID_TCC;
|
||||
string secret = Const.AppSecret_TCC;
|
||||
string appid = Const.AppID_XJYJ;
|
||||
string secret = Const.AppSecret_XJYJ;
|
||||
//string appid = "wxb5f0e8051b7b9eee";
|
||||
//string secret = "626175f8860bf84beb4cf507b9445115";
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
|
||||
@@ -347,7 +347,7 @@ namespace BLL
|
||||
where x.ProjectId == projectId && (strUnitId == null || x.UnitId == strUnitId)
|
||||
&& (strWorkPostId == null || x.WorkPostId == strWorkPostId)
|
||||
select x;
|
||||
if (unitId != Const.UnitId_TCC && !string.IsNullOrEmpty(unitId))
|
||||
if (unitId != Const.UnitId_XJYJ && !string.IsNullOrEmpty(unitId))
|
||||
{
|
||||
getViews = getViews.Where(x => x.UnitId == unitId);
|
||||
}
|
||||
@@ -1152,7 +1152,7 @@ namespace BLL
|
||||
ChangeTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ChangeTime),
|
||||
ChangeTimeD = x.ChangeTime,
|
||||
};
|
||||
if (!string.IsNullOrEmpty(unitId) && unitId != Const.UnitId_TCC)
|
||||
if (!string.IsNullOrEmpty(unitId) && unitId != Const.UnitId_XJYJ)
|
||||
{
|
||||
personInOuts = personInOuts.Where(x => x.UnitId == unitId);
|
||||
}
|
||||
@@ -1204,7 +1204,7 @@ namespace BLL
|
||||
ChangeTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ChangeTime),
|
||||
ChangeTimeD = x.ChangeTime,
|
||||
};
|
||||
if (!string.IsNullOrEmpty(userUnitId) && userUnitId != Const.UnitId_TCC)
|
||||
if (!string.IsNullOrEmpty(userUnitId) && userUnitId != Const.UnitId_XJYJ)
|
||||
{
|
||||
personInOuts = personInOuts.Where(x => x.UnitId == userUnitId);
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ namespace BLL
|
||||
};
|
||||
if (setItem.UnitType == "1")
|
||||
{
|
||||
newFlowOperate.UnitIds = Const.UnitId_TCC;
|
||||
newFlowOperate.UnitIds = Const.UnitId_XJYJ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace BLL
|
||||
}).AsEnumerable();
|
||||
if (getReceiveFileManagerItem.Count() > 0)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(unitId) && unitId != Const.UnitId_TCC)
|
||||
if (!string.IsNullOrEmpty(unitId) && unitId != Const.UnitId_XJYJ)
|
||||
{
|
||||
getReceiveFileManagerItem = getReceiveFileManagerItem.Where(x => x.FileUnitId == unitId || (x.UnitIds != null && x.UnitIds.Contains(unitId)));
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ namespace BLL
|
||||
var startDateD = Funs.GetNewDateTime(startDate);
|
||||
var endDateD = Funs.GetNewDateTime(endDate);
|
||||
var getPersons = from x in db.SitePerson_Person
|
||||
where x.ProjectId == projectId && x.InTime <= startDateD && (!x.OutTime.HasValue) && x.UnitId ==Const.UnitId_TCC
|
||||
where x.ProjectId == projectId && x.InTime <= startDateD && (!x.OutTime.HasValue) && x.UnitId ==Const.UnitId_XJYJ
|
||||
select x;
|
||||
Model.SeDinMonthReport4OtherItem newItem = new Model.SeDinMonthReport4OtherItem
|
||||
{
|
||||
|
||||
@@ -78,13 +78,13 @@ namespace BLL
|
||||
}
|
||||
else
|
||||
{
|
||||
newTestRecord.UnitId = newTestRecord.UnitId = Const.UnitId_TCC;
|
||||
newTestRecord.UnitId = newTestRecord.UnitId = Const.UnitId_XJYJ;
|
||||
}
|
||||
}
|
||||
newTestRecord.DepartName = DepartService.getDepartNameById(newTestRecord.DepartId);
|
||||
newTestRecord.UnitName = UnitService.GetUnitNameByUnitId(newTestRecord.UnitId);
|
||||
newTestRecord.ProjectName = ProjectService.GetProjectNameByProjectId(newTestRecord.ProjectId);
|
||||
if (newTestRecord.UnitId == Const.UnitId_TCC)
|
||||
if (newTestRecord.UnitId == Const.UnitId_XJYJ)
|
||||
{
|
||||
newTestRecord.IsThiUnit = true;
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ namespace BLL
|
||||
else
|
||||
{
|
||||
var user = UserService.GetUserByUserId(userId);
|
||||
if (user != null && user.UnitId == Const.UnitId_TCC)
|
||||
if (user != null && user.UnitId == Const.UnitId_XJYJ)
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
@@ -668,14 +668,14 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static string GetThisUnitId()
|
||||
{
|
||||
string unitId = Const.UnitId_TCC;
|
||||
string unitId = Const.UnitId_XJYJ;
|
||||
|
||||
return unitId;
|
||||
}
|
||||
|
||||
public static Model.Base_Unit GetIsThisUnit()
|
||||
{
|
||||
return (Funs.DB.Base_Unit.FirstOrDefault(e => e.UnitId == Const.UnitId_TCC)); //本单位
|
||||
return (Funs.DB.Base_Unit.FirstOrDefault(e => e.UnitId == Const.UnitId_XJYJ)); //本单位
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -923,15 +923,15 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 新疆油建单位id
|
||||
/// </summary>
|
||||
public const string UnitId_TCC = "b4f3d912-ca6d-440c-a8d7-bc6a5d5a1f84";
|
||||
public const string UnitId_XJYJ = "b4f3d912-ca6d-440c-a8d7-bc6a5d5a1f84";
|
||||
/// <summary>
|
||||
/// 天辰
|
||||
/// 新疆油建
|
||||
/// </summary>
|
||||
public const string AppID_TCC = "wxa4b25a008458d7ba";
|
||||
public const string AppID_XJYJ = "wxa4b25a008458d7ba";
|
||||
/// <summary>
|
||||
/// 天辰
|
||||
/// 新疆油建
|
||||
/// </summary>
|
||||
public const string AppSecret_TCC = "610d0310fe6ce1b7b33440438c54d3eb";
|
||||
public const string AppSecret_XJYJ = "610d0310fe6ce1b7b33440438c54d3eb";
|
||||
|
||||
/// <summary>
|
||||
///施工部门id
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace BLL
|
||||
if (compileDate.HasValue) ///操作日期
|
||||
{
|
||||
var puser = BLL.ProjectUserService.GetProjectUserByUserIdProjectId(projectId, compileMan); ///操作人是安全工程师或者安全经理
|
||||
var thisUnit = BLL.Const.UnitId_TCC;
|
||||
var thisUnit = BLL.Const.UnitId_XJYJ;
|
||||
if (puser != null && thisUnit != null && thisUnit == puser.UnitId && (puser.RoleId == BLL.Const.HSSEManager || puser.RoleId == BLL.Const.HSSEEngineer))
|
||||
{
|
||||
if (operateName == Const.BtnAdd) ////添加日志
|
||||
|
||||
@@ -374,6 +374,7 @@ namespace BLL
|
||||
//PostTrainingRoleId = person.PostTrainingRoleId,
|
||||
OutTime = person.OutTime,
|
||||
OutResult = person.OutResult,
|
||||
Remarks = person.Remarks,
|
||||
Telephone = person.Telephone,
|
||||
PositionId = person.PositionId,
|
||||
PostTitleId = person.PostTitleId,
|
||||
@@ -381,7 +382,6 @@ namespace BLL
|
||||
HeadImage = person.HeadImage,
|
||||
IsUsed = person.IsUsed,
|
||||
IsCardUsed = person.IsCardUsed,
|
||||
DepartId = person.DepartId,
|
||||
FromPersonId = person.FromPersonId,
|
||||
Password = GetPersonPassWord(person.IdentityCard),
|
||||
AuditorId = person.AuditorId,
|
||||
@@ -391,6 +391,14 @@ namespace BLL
|
||||
EduLevel = person.EduLevel,
|
||||
MaritalStatus = person.MaritalStatus,
|
||||
Isprint = "0",
|
||||
InstitutionalDivisionId = person.InstitutionalDivisionId,
|
||||
DepartId = person.DepartId,
|
||||
EmployeeCategoryId = person.EmployeeCategoryId,
|
||||
EmployeeSubgroupId = person.EmployeeSubgroupId,
|
||||
InstitutionalDivisionName = person.InstitutionalDivisionName,
|
||||
DepartName = person.DepartName,
|
||||
EmployeeCategoryName = person.EmployeeCategoryName,
|
||||
EmployeeSubgroupName = person.EmployeeSubgroupName,
|
||||
MainCNProfessionalId = person.MainCNProfessionalId,
|
||||
ViceCNProfessionalId = person.ViceCNProfessionalId,
|
||||
Birthday = person.Birthday,
|
||||
@@ -456,6 +464,7 @@ namespace BLL
|
||||
newPerson.OutTime = person.OutTime;
|
||||
newPerson.IsSafetyMonitoring = person.IsSafetyMonitoring;
|
||||
newPerson.OutResult = person.OutResult;
|
||||
newPerson.Remarks = person.Remarks;
|
||||
newPerson.Telephone = person.Telephone;
|
||||
newPerson.PositionId = person.PositionId;
|
||||
newPerson.PostTitleId = person.PostTitleId;
|
||||
@@ -465,7 +474,6 @@ namespace BLL
|
||||
newPerson.IsCardUsed = person.IsCardUsed;
|
||||
newPerson.EduLevel = person.EduLevel;
|
||||
newPerson.MaritalStatus = person.MaritalStatus;
|
||||
newPerson.DepartId = person.DepartId;
|
||||
newPerson.QRCodeAttachUrl = person.QRCodeAttachUrl;
|
||||
newPerson.Password = GetPersonPassWord(person.IdentityCard);
|
||||
newPerson.ExchangeTime = null;
|
||||
@@ -483,6 +491,14 @@ namespace BLL
|
||||
newPerson.IsForeign = person.IsForeign;
|
||||
newPerson.IsOutside = person.IsOutside;
|
||||
newPerson.Birthday = person.Birthday;
|
||||
newPerson.InstitutionalDivisionId = person.InstitutionalDivisionId;
|
||||
newPerson.DepartId = person.DepartId;
|
||||
newPerson.EmployeeCategoryId = person.EmployeeCategoryId;
|
||||
newPerson.EmployeeSubgroupId = person.EmployeeSubgroupId;
|
||||
newPerson.InstitutionalDivisionName = person.InstitutionalDivisionName;
|
||||
newPerson.DepartName = person.DepartName;
|
||||
newPerson.EmployeeCategoryName = person.EmployeeCategoryName;
|
||||
newPerson.EmployeeSubgroupName = person.EmployeeSubgroupName;
|
||||
newPerson.MainCNProfessionalId = person.MainCNProfessionalId;
|
||||
newPerson.ViceCNProfessionalId = person.ViceCNProfessionalId;
|
||||
newPerson.IdcardType = person.IdcardType;
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace BLL
|
||||
public static void CreateReceiveFile(Model.InformationProject_Notice notice)
|
||||
{
|
||||
var getProjects = Funs.GetStrListByStr(notice.AccessProjectId, ',');
|
||||
string unitId =Const.UnitId_TCC;
|
||||
string unitId =Const.UnitId_XJYJ;
|
||||
var getAtt = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == notice.NoticeId);
|
||||
foreach (var item in getProjects)
|
||||
{
|
||||
|
||||
@@ -651,7 +651,7 @@
|
||||
where (x.ProjectState == null || x.ProjectState == BLL.Const.ProjectState_1)
|
||||
select x;
|
||||
|
||||
if (unitId == BLL.Const.UnitId_TCC)
|
||||
if (unitId == BLL.Const.UnitId_XJYJ)
|
||||
{
|
||||
getDatas = getDatas.Where(x => x.UnitId == unitId || x.UnitId == null);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
public static bool GetProjectUnitTypeByProjectIdUnitId(string projectId, string unitId)
|
||||
{
|
||||
bool isShow = false;
|
||||
if (unitId != Const.UnitId_TCC)
|
||||
if (unitId != Const.UnitId_XJYJ)
|
||||
{
|
||||
var pUnit = Funs.DB.Project_ProjectUnit.FirstOrDefault(e => e.ProjectId == projectId && e.UnitId == unitId);
|
||||
if (pUnit != null)
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_Unit> GetThisUnitDropDownList()
|
||||
{
|
||||
var list = (from x in Funs.DB.Base_Unit where x.UnitId == Const.UnitId_TCC select x).ToList();
|
||||
var list = (from x in Funs.DB.Base_Unit where x.UnitId == Const.UnitId_XJYJ select x).ToList();
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace BLL
|
||||
List<Model.Base_Unit> unitList = new List<Model.Base_Unit>();
|
||||
if (string.IsNullOrEmpty(unitId))
|
||||
{
|
||||
unitId = Const.UnitId_TCC;
|
||||
unitId = Const.UnitId_XJYJ;
|
||||
}
|
||||
var unitIdList = GetChildrenUnitId(unitId);
|
||||
if (unitIdList.Count() > 0)
|
||||
@@ -216,7 +216,7 @@ namespace BLL
|
||||
if (isThisUnit)
|
||||
{
|
||||
list = (from x in Funs.DB.Base_Unit
|
||||
where x.IsBranch == true || x.UnitId == Const.UnitId_TCC
|
||||
where x.IsBranch == true || x.UnitId == Const.UnitId_XJYJ
|
||||
select x).OrderBy(x => x.UnitCode).ToList();
|
||||
}
|
||||
return list;
|
||||
@@ -923,7 +923,7 @@ namespace BLL
|
||||
{
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var q = (from x in db.Base_Unit where x.UnitId != BLL.Const.UnitId_TCC orderby x.UnitCode select x).ToList();
|
||||
var q = (from x in db.Base_Unit where x.UnitId != BLL.Const.UnitId_XJYJ orderby x.UnitCode select x).ToList();
|
||||
return q;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1584,7 +1584,7 @@ namespace BLL
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var user = (from x in db.Sys_User
|
||||
where x.IsPost == true && x.UnitId == Const.UnitId_TCC && x.DepartId == Const.Depart_constructionId
|
||||
where x.IsPost == true && x.UnitId == Const.UnitId_XJYJ && x.DepartId == Const.Depart_constructionId
|
||||
orderby x.UserId
|
||||
select x).ToList();
|
||||
ListItem[] lis = new ListItem[user.Count()];
|
||||
|
||||
@@ -1935,7 +1935,7 @@
|
||||
try
|
||||
{
|
||||
CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient();
|
||||
var getData = hsseC.GetInformation_UrgeReportToSUB(Const.UnitId_TCC);
|
||||
var getData = hsseC.GetInformation_UrgeReportToSUB(Const.UnitId_XJYJ);
|
||||
if (getData.Count() > 0)
|
||||
{
|
||||
foreach (var item in getData)
|
||||
@@ -1992,7 +1992,7 @@
|
||||
try
|
||||
{
|
||||
CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient();
|
||||
var getData = hsseC.GetCheck_CheckRectifyListToSUB(Const.UnitId_TCC);
|
||||
var getData = hsseC.GetCheck_CheckRectifyListToSUB(Const.UnitId_XJYJ);
|
||||
if (getData.Count() > 0)
|
||||
{
|
||||
List<string> ids = new List<string>();
|
||||
@@ -2095,7 +2095,7 @@
|
||||
try
|
||||
{
|
||||
CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient();
|
||||
var getData = hsseC.GetCheck_CheckInfo_Table8ItemListToSUB(Const.UnitId_TCC);
|
||||
var getData = hsseC.GetCheck_CheckInfo_Table8ItemListToSUB(Const.UnitId_XJYJ);
|
||||
if (getData.Count() > 0)
|
||||
{
|
||||
List<string> ids = new List<string>();
|
||||
@@ -2261,7 +2261,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
var getDataItem = hsseC.GetSupervise_SubUnitReportItemListToSUB(Const.UnitId_TCC);
|
||||
var getDataItem = hsseC.GetSupervise_SubUnitReportItemListToSUB(Const.UnitId_XJYJ);
|
||||
foreach (var item in getDataItem)
|
||||
{
|
||||
var newItem = db.Supervise_SubUnitReportItem.FirstOrDefault(e => e.SubUnitReportItemId == item.SubUnitReportItemId);
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace BLL
|
||||
units = units.Where(x => unitIdList.Contains(x.UnitId)).ToList();
|
||||
}
|
||||
///本单位
|
||||
string thisUnitId = BLL.Const.UnitId_TCC;
|
||||
string thisUnitId = BLL.Const.UnitId_XJYJ;
|
||||
//var unitThis = BLL.CommonService.GetIsThisUnit();
|
||||
//if (unitThis != null)
|
||||
//{
|
||||
|
||||
Reference in New Issue
Block a user