This commit is contained in:
2021-07-08 20:34:29 +08:00
parent 7f785d6423
commit e092c6cfb0
24 changed files with 5142 additions and 177 deletions
+22 -24
View File
@@ -226,7 +226,7 @@ namespace BLL
/// <summary>
/// 实名制推送记录日志
/// </summary>
public static void InsertRealNamePushLog(string ProjectId, string ProjectCode, string PushType, string Success, string Code, string Message)
public static void InsertRealNamePushLog(string ProjectId, string JTProjectCode, string PushType, string Success, string Code, string Message)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
@@ -234,7 +234,7 @@ namespace BLL
{
PushLogId = SQLHelper.GetNewID(),
ProjectId = ProjectId,
ProjectCode = ProjectCode,
ProjectCode = JTProjectCode,
PushType = PushType,
Success = Success,
Code = Code,
@@ -479,19 +479,16 @@ namespace BLL
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
public static string getProject()
{
Model.SGGLDB db = Funs.DB;
public static string getProject(string proCode)
{
string mess = string.Empty;
string sucess = string.Empty;
string code = string.Empty;
string proCode = string.Empty;
string contenttype = "application/json;charset=unicode";
string url = Funs.RealNameApiUrl + "/foreignApi/baseData/getProjectList";
Hashtable newToken = new Hashtable
{
{ "token", getaccess_token(null) }
{ "token", getaccess_token(proCode) }
};
var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, null);
if (!string.IsNullOrEmpty(returndata))
@@ -510,12 +507,12 @@ namespace BLL
string proShortName = item["proShortName"].ToString();
if (!string.IsNullOrEmpty(proCode))
{
var getProject = db.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
var getProject = Funs.DB.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
if (getProject != null)
{
getProject.ProName = proName;
getProject.ProShortName = proShortName;
db.SubmitChanges();
Funs.DB.SubmitChanges();
}
else
{
@@ -526,8 +523,8 @@ namespace BLL
ProName = proName,
ProShortName = proShortName
};
db.RealName_Project.InsertOnSubmit(newProject);
db.SubmitChanges();
Funs.DB.RealName_Project.InsertOnSubmit(newProject);
Funs.DB.SubmitChanges();
}
}
}
@@ -714,15 +711,15 @@ namespace BLL
string url = Funs.RealNameApiUrl + "/foreignApi/accept/proCollCompany";
var getProjectUnits = (from x in db.Project_ProjectUnit
join y in db.Base_Project on x.ProjectId equals y.ProjectId
join z in db.RealName_Project on y.ProjectCode equals z.ProCode
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.ProjectCode == proCode)
&& (proCode == null || y.JTProjectCode == proCode)
&& u.CollCropCode != null && u.CollCropCode != ""
select new
{
unitId=x.UnitId,
proCode = y.ProjectCode,
proCode = y.JTProjectCode,
collCropCode = u.CollCropCode,
collCropType = db.Sys_Const.First(t => t.GroupId == ConstValue.Group_ProjectUnitType && t.ConstValue == x.UnitType).Remark,
entryTime = string.Format("{0:yyyy-MM-dd}", x.InTime),
@@ -834,16 +831,16 @@ namespace BLL
string url = Funs.RealNameApiUrl + "/foreignApi/accept/collTeam";
var getCollTeam = (from x in Funs.DB.ProjectData_TeamGroup
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
join z in Funs.DB.RealName_Project on y.ProjectCode equals z.ProCode
join z in Funs.DB.RealName_Project on y.JTProjectCode equals z.ProCode
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId
join s in Funs.DB.SitePerson_Person on x.GroupLeaderId equals s.PersonId into jonPerson
from s in jonPerson.DefaultIfEmpty()
where z.ProCode != null && !x.RealNamePushTime.HasValue && x.TeamTypeId != null
&& (proCode == null || y.ProjectCode == proCode)
&& (proCode == null || y.JTProjectCode == proCode)
&& u.CollCropCode != null && u.CollCropCode != ""
select new
{
proCode = y.ProjectCode,
proCode = y.JTProjectCode,
collCropCode = u.CollCropCode,
teamType = x.TeamTypeId,
teamName = x.TeamGroupName,
@@ -920,7 +917,7 @@ namespace BLL
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
where ((x.IdentityCard != null && x.IdentityCard != "" && identityCard == null) || (identityCard != null && x.IdentityCard == identityCard))
&& y.ProjectCode == proCode
&& y.JTProjectCode == proCode
&& v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0
&& ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue) || (type != Const.BtnModify && !x.RealNameAddTime.HasValue))
&& ((x.IdcardType == null || x.IdcardType == "SHENFEN_ZHENGJIAN")
@@ -946,7 +943,7 @@ namespace BLL
//positiveIdcardImage = db.AttachFile.First(t => (x.PersonId + "#1") == t.ToKeyId).ImageByte,
//negativeIdcardImage = db.AttachFile.First(t => (x.PersonId + "#5") == t.ToKeyId).ImageByte,
headImage = x.HeadImage,
proCode = y.ProjectCode,
proCode = y.JTProjectCode,
teamId = v.TeamId,
mobile = x.Telephone,
teamLeaderFlag = (v.GroupLeaderId == x.PersonId ? "Y" : "N"),
@@ -1043,7 +1040,7 @@ namespace BLL
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId
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
where x.IdentityCard == identityCard && y.ProjectCode == proCode
where x.IdentityCard == identityCard && y.JTProjectCode == proCode
&& v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0
&& ((x.IdcardType == null || x.IdcardType == "SHENFEN_ZHENGJIAN")
&& (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18))
@@ -1066,7 +1063,7 @@ namespace BLL
countryCode = x.CountryCode,
provinceCode = x.ProvinceCode,
headImage = x.HeadImage,
proCode = y.ProjectCode,
proCode = y.JTProjectCode,
teamId = v.TeamId,
mobile = x.Telephone,
teamLeaderFlag = (v.GroupLeaderId == x.PersonId ? "Y" : "N"),
@@ -1168,6 +1165,7 @@ namespace BLL
where x.IdcardNumber != null && x.IdcardType != null && x.ChangeTime.HasValue
&& (proCode == null || x.ProCode == proCode) && p.HeadImage != null && p.HeadImage.Length > 0
&& v.TeamId.HasValue && p.HeadImage != null && r.TeamId.HasValue
&& (p.IdentityCard.Length == 15 || p.IdentityCard.Length == 18)
select new
{
p.PersonId,
@@ -1313,7 +1311,7 @@ namespace BLL
where teamGroupIds.Contains(x.TeamGroupId)
select new
{
proCode = y.ProjectCode,
proCode = y.JTProjectCode,
collCropCode = u.CollCropCode,
teamType = x.TeamTypeId,
teamName = x.TeamGroupName,
@@ -1371,7 +1369,7 @@ namespace BLL
//positiveIdcardImage = db.AttachFile.First(t => (x.PersonId + "#1") == t.ToKeyId).ImageByte,
//negativeIdcardImage = db.AttachFile.First(t => (x.PersonId + "#5") == t.ToKeyId).ImageByte,
headImage = x.HeadImage,
proCode = y.ProjectCode,
proCode = y.JTProjectCode,
teamId = v.TeamId,
mobile = x.Telephone,
teamLeaderFlag = (v.GroupLeaderId == x.PersonId ? "Y" : "N"),