Compare commits

...

2 Commits

Author SHA1 Message Date
李超 f4767c7713 Merge branch 'master' of http://47.104.102.122:3000/gaofei/HJGL_DS 2025-10-16 12:55:01 +08:00
李超 6d1418e7cc 焊工更新接口 2025-10-16 12:54:32 +08:00
3 changed files with 13 additions and 8 deletions

View File

@ -407,16 +407,21 @@ namespace BLL.API
/// </summary> /// </summary>
/// <param name="projectId"></param> /// <param name="projectId"></param>
/// <returns></returns> /// <returns></returns>
public static Model.ResponeData getProjectWelder(string projectId) public static Model.ResponeData getProjectWelder(string projectId, string unitId, string date)
{ {
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 pw.ProjectId == projectId where w.PhotoUrl !=null && pw.ExchangeTime > dateTime
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)
{ {

View File

@ -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 = null; w.ExchangeTime = DateTime.Now;
} }
Funs.DB.SubmitChanges(); Funs.DB.SubmitChanges();
Alert.ShowInParent(PersonFace(welder), MessageBoxIcon.Warning); Alert.ShowInParent(PersonFace(welder), MessageBoxIcon.Warning);

View File

@ -179,15 +179,14 @@ namespace WebAPI.Controllers
} }
[HttpGet] [HttpGet]
public Model.ResponeData getProjectWelder(string projectId) public Model.ResponeData getProjectWelder(string projectId, string unitId, string date)
{ {
Model.ResponeData respone = new ResponeData(); Model.ResponeData respone = new ResponeData();
try try
{ {
return APIWeldServices.getProjectWelder(projectId); return APIWeldServices.getProjectWelder(projectId, unitId, date);
} }
catch (Exception e) catch (Exception e)
{ {
@ -196,6 +195,7 @@ 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)
{ {