Compare commits
No commits in common. "f4767c7713d50582beb4416af400f667fbea167f" and "bb6197e0844545c366c467753f3f9390b19bd987" have entirely different histories.
f4767c7713
...
bb6197e084
|
|
@ -407,21 +407,16 @@ namespace BLL.API
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="projectId"></param>
|
/// <param name="projectId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static Model.ResponeData getProjectWelder(string projectId, string unitId, string date)
|
public static Model.ResponeData getProjectWelder(string projectId)
|
||||||
{
|
{
|
||||||
Model.ResponeData respone = new ResponeData();
|
Model.ResponeData respone = new ResponeData();
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
DateTime dateTime =DateTime.Parse("1000-10-10");
|
|
||||||
if (!string.IsNullOrEmpty(date) && date != "null")
|
|
||||||
{
|
|
||||||
dateTime = DateTime.Parse(date);
|
|
||||||
}
|
|
||||||
var q = from pw in db.Project_Welder
|
var q = from pw in db.Project_Welder
|
||||||
join w in db.HJGL_BS_Welder on pw.WED_ID equals w.WED_ID
|
join w in db.HJGL_BS_Welder on pw.WED_ID equals w.WED_ID
|
||||||
where w.PhotoUrl !=null && pw.ExchangeTime > dateTime
|
where pw.ProjectId == projectId
|
||||||
|
where w.PhotoUrl !=null && pw.ExchangeTime ==null
|
||||||
select w;
|
select w;
|
||||||
|
|
||||||
List<WelderItem> res = new List<WelderItem>();
|
List<WelderItem> res = new List<WelderItem>();
|
||||||
foreach (var p in q)
|
foreach (var p in q)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -415,7 +415,7 @@
|
||||||
var pw = Funs.DB.Project_Welder.Where(x => x.WED_ID == WED_ID);
|
var pw = Funs.DB.Project_Welder.Where(x => x.WED_ID == WED_ID);
|
||||||
foreach(var w in pw)
|
foreach(var w in pw)
|
||||||
{
|
{
|
||||||
w.ExchangeTime = DateTime.Now;
|
w.ExchangeTime = null;
|
||||||
}
|
}
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
Alert.ShowInParent(PersonFace(welder), MessageBoxIcon.Warning);
|
Alert.ShowInParent(PersonFace(welder), MessageBoxIcon.Warning);
|
||||||
|
|
|
||||||
|
|
@ -179,14 +179,15 @@ namespace WebAPI.Controllers
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public Model.ResponeData getProjectWelder(string projectId, string unitId, string date)
|
public Model.ResponeData getProjectWelder(string projectId)
|
||||||
{
|
{
|
||||||
Model.ResponeData respone = new ResponeData();
|
Model.ResponeData respone = new ResponeData();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
return APIWeldServices.getProjectWelder(projectId, unitId, date);
|
return APIWeldServices.getProjectWelder(projectId);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
@ -195,7 +196,6 @@ namespace WebAPI.Controllers
|
||||||
}
|
}
|
||||||
return respone;
|
return respone;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public Model.ResponeData getUpdateWelderExchangeTime(string wedId,string projectId)
|
public Model.ResponeData getUpdateWelderExchangeTime(string wedId,string projectId)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue