焊工更新头像接口
This commit is contained in:
parent
f68528a197
commit
e2da671c2f
|
@ -429,6 +429,7 @@ y in db.Project_Welder on x.WED_ID equals y.WED_ID
|
||||||
item.LimitDate = p.LimitDate;
|
item.LimitDate = p.LimitDate;
|
||||||
item.IdentityCard = p.IdentityCard;
|
item.IdentityCard = p.IdentityCard;
|
||||||
item.AttachUrl = p.AttachUrl;
|
item.AttachUrl = p.AttachUrl;
|
||||||
|
item.PhotoUrl = p.PhotoUrl;
|
||||||
item.IsFaceTrain = p.IsFaceTrain;
|
item.IsFaceTrain = p.IsFaceTrain;
|
||||||
res.Add(item);
|
res.Add(item);
|
||||||
|
|
||||||
|
|
|
@ -402,5 +402,101 @@ namespace BLL.API
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 项目焊工
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.ResponeData getProjectWelder(string projectId)
|
||||||
|
{
|
||||||
|
Model.ResponeData respone = new ResponeData();
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var q = from pw in db.Project_Welder
|
||||||
|
join w in db.HJGL_BS_Welder on pw.WED_ID equals w.WED_ID
|
||||||
|
where pw.ProjectId == projectId
|
||||||
|
where w.PhotoUrl !=null && pw.ExchangeTime ==null
|
||||||
|
select w;
|
||||||
|
List<WelderItem> res = new List<WelderItem>();
|
||||||
|
foreach (var p in q)
|
||||||
|
{
|
||||||
|
WelderItem item = new WelderItem();
|
||||||
|
item.WED_ID = p.WED_ID;
|
||||||
|
item.WED_Unit = p.WED_Unit;
|
||||||
|
item.EDU_ID = p.EDU_ID;
|
||||||
|
item.SE_EquipmentID = p.SE_EquipmentID;
|
||||||
|
item.NP_NondestructivePersonID = p.NP_NondestructivePersonID;
|
||||||
|
item.WED_Code = p.WED_Code;
|
||||||
|
item.WED_Name = p.WED_Name;
|
||||||
|
item.WED_UserType = p.WED_UserType;
|
||||||
|
item.WED_Sex = p.WED_Sex;
|
||||||
|
item.WED_Birthday = p.WED_Birthday;
|
||||||
|
item.WED_WorkCode = p.WED_WorkCode;
|
||||||
|
item.WED_Class = p.WED_Class;
|
||||||
|
item.WED_TotalDin = p.WED_TotalDin;
|
||||||
|
item.WED_TotalJoint = p.WED_TotalJoint;
|
||||||
|
item.WED_ExtendDin = p.WED_ExtendDin;
|
||||||
|
item.WED_ExtendJoint = p.WED_ExtendJoint;
|
||||||
|
item.WED_RepairJoint = p.WED_RepairJoint;
|
||||||
|
item.WED_IfOnGuard = p.WED_IfOnGuard;
|
||||||
|
item.WED_Remark = p.WED_Remark;
|
||||||
|
item.WED_TotalFilm = p.WED_TotalFilm;
|
||||||
|
item.WED_PassFilm = p.WED_PassFilm;
|
||||||
|
item.WED_ExtendTotalFilm = p.WED_ExtendTotalFilm;
|
||||||
|
item.WED_ExtendPassFilm = p.WED_ExtendPassFilm;
|
||||||
|
item.ProjectId = p.ProjectId;
|
||||||
|
item.ThicknessMax = p.ThicknessMax;
|
||||||
|
item.ThicknessMin = p.ThicknessMin;
|
||||||
|
item.SizesMax = p.SizesMax;
|
||||||
|
item.SizesMin = p.SizesMin;
|
||||||
|
item.RecordDate = p.RecordDate;
|
||||||
|
item.MyFinger = p.MyFinger;
|
||||||
|
item.SignatureUrl = p.SignatureUrl;
|
||||||
|
item.Education = p.Education;
|
||||||
|
item.WED_States = p.WED_States;
|
||||||
|
item.IsOAM = p.IsOAM;
|
||||||
|
item.LimitDate = p.LimitDate;
|
||||||
|
item.IdentityCard = p.IdentityCard;
|
||||||
|
item.AttachUrl = p.AttachUrl;
|
||||||
|
item.PhotoUrl = p.PhotoUrl;
|
||||||
|
item.IsFaceTrain = p.IsFaceTrain;
|
||||||
|
res.Add(item);
|
||||||
|
}
|
||||||
|
respone.data = res;
|
||||||
|
}
|
||||||
|
return respone;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region 更新人员数据交换时间
|
||||||
|
/// <summary>
|
||||||
|
/// 更新人员数据交换时间
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="personId">人员ID</param>
|
||||||
|
/// <param name="type">交换类型</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.ResponeData getUpdateWelderExchangeTime(string wedId, string projectId)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var getPerson = db.Project_Welder.FirstOrDefault(e => e.ProjectId == projectId && e.WED_ID == wedId);
|
||||||
|
getPerson.ExchangeTime = DateTime.Now;
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
ErrLogInfo.WriteLog(ex, "更新人员数据交换时间", "PersonController.getUpdatePersonExchangeTime");
|
||||||
|
}
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,12 +92,23 @@ namespace BLL
|
||||||
newWelder.AttachUrl = welder.AttachUrl;
|
newWelder.AttachUrl = welder.AttachUrl;
|
||||||
newWelder.SignatureUrl = welder.SignatureUrl;
|
newWelder.SignatureUrl = welder.SignatureUrl;
|
||||||
newWelder.IsFaceTrain = welder.IsFaceTrain;
|
newWelder.IsFaceTrain = welder.IsFaceTrain;
|
||||||
|
|
||||||
newWelder.MaxHanTiao = welder.MaxHanTiao;
|
newWelder.MaxHanTiao = welder.MaxHanTiao;
|
||||||
newWelder.MaxWeldingWire = welder.MaxWeldingWire;
|
newWelder.MaxWeldingWire = welder.MaxWeldingWire;
|
||||||
newWelder.IsOAM = welder.IsOAM;
|
newWelder.IsOAM = welder.IsOAM;
|
||||||
|
|
||||||
|
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
|
var pw = from x in db.Project_Welder
|
||||||
|
where x.WED_ID == welder.WED_ID
|
||||||
|
select x;
|
||||||
|
foreach(var w in pw)
|
||||||
|
{
|
||||||
|
w.ExchangeTime = null;
|
||||||
|
}
|
||||||
|
db.SubmitChanges();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ using System;
|
||||||
namespace Model.APIItem
|
namespace Model.APIItem
|
||||||
{
|
{
|
||||||
public class WelderItem
|
public class WelderItem
|
||||||
{ /**
|
{
|
||||||
* 人员id
|
/**
|
||||||
*/
|
* 人员id
|
||||||
|
*/
|
||||||
public string WED_ID { get; set; }
|
public string WED_ID { get; set; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -249,9 +249,10 @@ namespace Model.APIItem
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public string AttachUrl { get; set; }
|
public string AttachUrl { get; set; }
|
||||||
|
public string PhotoUrl { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public bool? IsFaceTrain { get; set; }
|
public bool? IsFaceTrain { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,5 +178,39 @@ namespace WebAPI.Controllers
|
||||||
return respone;
|
return respone;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public Model.ResponeData getProjectWelder(string projectId)
|
||||||
|
{
|
||||||
|
Model.ResponeData respone = new ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
return APIWeldServices.getProjectWelder(projectId);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
respone.code = 0;
|
||||||
|
respone.message = e.Message;
|
||||||
|
}
|
||||||
|
return respone;
|
||||||
|
}
|
||||||
|
[HttpGet]
|
||||||
|
public Model.ResponeData getUpdateWelderExchangeTime(string wedId,string projectId)
|
||||||
|
{
|
||||||
|
Model.ResponeData respone = new ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
return APIWeldServices.getUpdateWelderExchangeTime(wedId,projectId);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
respone.code = 0;
|
||||||
|
respone.message = e.Message;
|
||||||
|
}
|
||||||
|
return respone;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -178,6 +178,8 @@ namespace WebAPI.Filter
|
||||||
//"Weld*getUsingPlanById",
|
//"Weld*getUsingPlanById",
|
||||||
//"Weld*welderQueIsPass",
|
//"Weld*welderQueIsPass",
|
||||||
//"Weld*addUsingPlan",
|
//"Weld*addUsingPlan",
|
||||||
|
"Weld*getProjectWelder",
|
||||||
|
"Weld*getUpdateWelderExchangeTime",
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue