diff --git a/HJGL_DS/BLL/API/APIWeldServices.cs b/HJGL_DS/BLL/API/APIWeldServices.cs
index 8b3b19a..a346670 100644
--- a/HJGL_DS/BLL/API/APIWeldServices.cs
+++ b/HJGL_DS/BLL/API/APIWeldServices.cs
@@ -407,16 +407,21 @@ namespace BLL.API
///
///
///
- public static Model.ResponeData getProjectWelder(string projectId)
+ public static Model.ResponeData getProjectWelder(string projectId, string unitId, string date)
{
Model.ResponeData respone = new ResponeData();
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
- 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
+ join w in db.HJGL_BS_Welder on pw.WED_ID equals w.WED_ID
+ where w.PhotoUrl !=null && pw.ExchangeTime > dateTime
select w;
+
List res = new List();
foreach (var p in q)
{
diff --git a/HJGL_DS/FineUIPro.Web/common/WelderManage/WelderSave.aspx.cs b/HJGL_DS/FineUIPro.Web/common/WelderManage/WelderSave.aspx.cs
index 1968e8f..ebb145f 100644
--- a/HJGL_DS/FineUIPro.Web/common/WelderManage/WelderSave.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/common/WelderManage/WelderSave.aspx.cs
@@ -415,7 +415,7 @@
var pw = Funs.DB.Project_Welder.Where(x => x.WED_ID == WED_ID);
foreach(var w in pw)
{
- w.ExchangeTime = null;
+ w.ExchangeTime = DateTime.Now;
}
Funs.DB.SubmitChanges();
Alert.ShowInParent(PersonFace(welder), MessageBoxIcon.Warning);
diff --git a/HJGL_DS/WebAPI/Controllers/WeldController.cs b/HJGL_DS/WebAPI/Controllers/WeldController.cs
index ab5dc9f..1e9ee17 100644
--- a/HJGL_DS/WebAPI/Controllers/WeldController.cs
+++ b/HJGL_DS/WebAPI/Controllers/WeldController.cs
@@ -179,15 +179,14 @@ namespace WebAPI.Controllers
}
-
[HttpGet]
- public Model.ResponeData getProjectWelder(string projectId)
+ public Model.ResponeData getProjectWelder(string projectId, string unitId, string date)
{
Model.ResponeData respone = new ResponeData();
try
{
- return APIWeldServices.getProjectWelder(projectId);
+ return APIWeldServices.getProjectWelder(projectId, unitId, date);
}
catch (Exception e)
{
@@ -196,6 +195,7 @@ namespace WebAPI.Controllers
}
return respone;
}
+
[HttpGet]
public Model.ResponeData getUpdateWelderExchangeTime(string wedId,string projectId)
{