1
This commit is contained in:
@@ -109,7 +109,7 @@ namespace BLL.API
|
|||||||
UsingPlanItem planItem = new UsingPlanItem();
|
UsingPlanItem planItem = new UsingPlanItem();
|
||||||
planItem.UsingPlanId = x.UsingPlanId;
|
planItem.UsingPlanId = x.UsingPlanId;
|
||||||
planItem.WeldId = x.WeldId;
|
planItem.WeldId = x.WeldId;
|
||||||
planItem.UnitStoreId= BLL.UnitStoreService.GetUnitStoreNameById(x.UnitStoreId);
|
planItem.UnitStoreId = BLL.UnitStoreService.GetUnitStoreNameById(x.UnitStoreId);
|
||||||
planItem.ProjectId = x.ProjectId;
|
planItem.ProjectId = x.ProjectId;
|
||||||
planItem.UsePosition = x.UsePosition;
|
planItem.UsePosition = x.UsePosition;
|
||||||
planItem.Amount = x.Amount;
|
planItem.Amount = x.Amount;
|
||||||
@@ -412,16 +412,16 @@ namespace BLL.API
|
|||||||
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("1753-01-02");
|
DateTime dateTime = DateTime.Parse("1753-01-02");
|
||||||
if (!string.IsNullOrEmpty(date) && date != "null")
|
if (!string.IsNullOrEmpty(date) && date != "null")
|
||||||
{
|
{
|
||||||
dateTime = DateTime.Parse(date);
|
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 w.PhotoUrl != null && pw.ExchangeTime > dateTime
|
||||||
select w).Distinct();
|
select w).Distinct();
|
||||||
|
|
||||||
List<WelderItem> res = new List<WelderItem>();
|
List<WelderItem> res = new List<WelderItem>();
|
||||||
foreach (var p in q)
|
foreach (var p in q)
|
||||||
{
|
{
|
||||||
@@ -466,9 +466,9 @@ namespace BLL.API
|
|||||||
item.PhotoUrl = p.PhotoUrl;
|
item.PhotoUrl = p.PhotoUrl;
|
||||||
item.IsFaceTrain = p.IsFaceTrain;
|
item.IsFaceTrain = p.IsFaceTrain;
|
||||||
item.ExchangeTime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
|
item.ExchangeTime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
|
||||||
res.Add(item);
|
res.Add(item);
|
||||||
}
|
}
|
||||||
respone.data = res;
|
respone.data = res;
|
||||||
}
|
}
|
||||||
return respone;
|
return respone;
|
||||||
}
|
}
|
||||||
@@ -491,7 +491,7 @@ namespace BLL.API
|
|||||||
{
|
{
|
||||||
var getPerson = db.Project_Welder.FirstOrDefault(e => e.ProjectId == projectId && e.WED_ID == wedId);
|
var getPerson = db.Project_Welder.FirstOrDefault(e => e.ProjectId == projectId && e.WED_ID == wedId);
|
||||||
getPerson.ExchangeTime = DateTime.Now;
|
getPerson.ExchangeTime = DateTime.Now;
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -504,5 +504,41 @@ namespace BLL.API
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 根据项目id获取焊工信息列表
|
||||||
|
/// <summary>
|
||||||
|
/// 根据项目id获取焊工信息列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="personId">人员ID</param>
|
||||||
|
/// <param name="type">交换类型</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.ResponeData getProjectWelderList(string projectId, int page, int pageSize)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var res = from x in db.Project_Welder
|
||||||
|
join y in db.HJGL_BS_Welder on x.WED_ID equals y.WED_ID
|
||||||
|
where x.ProjectId == projectId
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
WED_Code = y.WED_Code,
|
||||||
|
WED_Name = y.WED_Name,
|
||||||
|
|
||||||
|
};
|
||||||
|
responeData.data = res.Skip(page * pageSize).Take(pageSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
ErrLogInfo.WriteLog(ex, "根据项目id获取焊工信息列表", "WeldController.getProjectWelderList");
|
||||||
|
}
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -195,15 +195,32 @@ 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)
|
||||||
{
|
{
|
||||||
Model.ResponeData respone = new ResponeData();
|
Model.ResponeData respone = new ResponeData();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
return APIWeldServices.getUpdateWelderExchangeTime(wedId,projectId);
|
return APIWeldServices.getUpdateWelderExchangeTime(wedId, projectId);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
respone.code = 0;
|
||||||
|
respone.message = e.Message;
|
||||||
|
}
|
||||||
|
return respone;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public Model.ResponeData getProjectWelderList(string projectId, int page, int pageSize)
|
||||||
|
{
|
||||||
|
Model.ResponeData respone = new ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
return APIWeldServices.getProjectWelderList(projectId, page, pageSize);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.1.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.1.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\bin\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\..\赛鼎\SGGL_SeDin_New\SGGL\WebAPI\bin\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||||
|
|||||||
Reference in New Issue
Block a user