This commit is contained in:
commit
0adb823a92
|
|
@ -0,0 +1,28 @@
|
||||||
|
|
||||||
|
ALTER PROCEDURE [dbo].[HJGL_spCH_HotProessTrustItem]
|
||||||
|
(
|
||||||
|
@HotProessTrustId nvarchar(50),
|
||||||
|
@ProessTypes nvarchar(50)=null
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
--通过检测id获取委托单信息
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
|
||||||
|
select HotProessTrustId,ISO_IsoNo,JOT_JointNo,JOT_JointDesc,STE_Code,
|
||||||
|
STRING_AGG((case when ProessTypes='1' then '预热'
|
||||||
|
when ProessTypes='2' then '消氢'
|
||||||
|
when ProessTypes='3' then '后热'
|
||||||
|
when ProessTypes='4' then '消应力热处理'
|
||||||
|
when ProessTypes='5' then '稳定化处理'
|
||||||
|
else ''end),'+') as ProessTypes from HJGL_View_CH_HotProessTrustItem TrustItem
|
||||||
|
where HotProessTrustId=@HotProessTrustId
|
||||||
|
and (ProessTypes=@ProessTypes or @ProessTypes is null)
|
||||||
|
group by HotProessTrustId,ISO_IsoNo,JOT_JointNo,JOT_JointDesc,STE_Code
|
||||||
|
|
||||||
|
union
|
||||||
|
|
||||||
|
select '99999999' as Number,'以下空白' AS ISO_IsoNo,null,null,null,null
|
||||||
|
|
||||||
|
end
|
||||||
|
go
|
||||||
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -717,7 +717,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
|
||||||
dt2.Columns.Add("ProessTypes");
|
dt2.Columns.Add("ProessTypes");
|
||||||
|
|
||||||
DataView dv = tb2.DefaultView;//获取表视图
|
DataView dv = tb2.DefaultView;//获取表视图
|
||||||
dv.Sort = "Number ASC";//按照ID倒序排序
|
dv.Sort = "ISO_IsoNo,JOT_JointNo ASC";//按照ID倒序排序
|
||||||
tb2 = dv.ToTable();//转为表
|
tb2 = dv.ToTable();//转为表
|
||||||
DataRow[] rows2 = tb2.DefaultView.ToTable().Select();
|
DataRow[] rows2 = tb2.DefaultView.ToTable().Select();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue