提交代码
This commit is contained in:
parent
9c4bc2154d
commit
edbb8bf3ae
|
@ -0,0 +1,19 @@
|
||||||
|
|
||||||
|
ALTER VIEW [dbo].[View_QuantityManagement_Base]
|
||||||
|
AS
|
||||||
|
/********¹¤³ÌÁ¿»ù´¡±í********/
|
||||||
|
|
||||||
|
select BaseId,C.ProjectId,C.DrawingId,case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end as WorkSection,case when a.DrawingNo is not null then a.DrawingNo else b.ChangeNo end as DrawingNo,
|
||||||
|
case when a.DrawingName is not null then a.DrawingName else b.ChangeName end as DrawingName,C.State,
|
||||||
|
case when a.DrawingNo is not null then ca.ProfessionalName else cb.ProfessionalName end as Major,
|
||||||
|
Part,ProjectContent,Unit,Amount,t.TeamGroupName as WorkTeam
|
||||||
|
from QuantityManagement_Base C
|
||||||
|
left join QuantityManagement_Drawing a on a.DrawingId=C.DrawingId
|
||||||
|
left join Base_CNProfessional ca on ca.CNProfessionalId=a.Major
|
||||||
|
left join QuantityManagement_Change b on b.ChangeId=C.DrawingId
|
||||||
|
left join Base_CNProfessional cb on cb.CNProfessionalId=b.Major
|
||||||
|
left join ProjectData_TeamGroup t on t.TeamGroupId=C.WorkTeam
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
|
@ -203,6 +203,27 @@ namespace BLL
|
||||||
return respone;
|
return respone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Model.ResponeData getWorkSectionAndDrawingName(string drawingId)
|
||||||
|
{
|
||||||
|
Model.ResponeData respone = new ResponeData();
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var q = (from x in db.View_QuantityManagement_Base
|
||||||
|
where x.DrawingId == drawingId && x.State == BLL.Const.Base_Complete
|
||||||
|
orderby x.Part
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
BaseInfoItem res = new BaseInfoItem();
|
||||||
|
if (q != null)
|
||||||
|
{
|
||||||
|
res.BaseInfoId = q.WorkSection;
|
||||||
|
res.BaseInfoName = q.DrawingName;
|
||||||
|
}
|
||||||
|
|
||||||
|
respone.data = res;
|
||||||
|
}
|
||||||
|
return respone;
|
||||||
|
}
|
||||||
|
|
||||||
public static Model.ResponeData getProjectContentList(string drawingId, string part)
|
public static Model.ResponeData getProjectContentList(string drawingId, string part)
|
||||||
{
|
{
|
||||||
Model.ResponeData respone = new ResponeData();
|
Model.ResponeData respone = new ResponeData();
|
||||||
|
|
1055
SGGL/Model/Model.cs
1055
SGGL/Model/Model.cs
File diff suppressed because it is too large
Load Diff
|
@ -127,6 +127,24 @@ namespace WebAPI.Controllers
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public Model.ResponeData getWorkSectionAndDrawingName(string drawingId)
|
||||||
|
{
|
||||||
|
Model.ResponeData respone = new ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
return APIQuantityManagementService.getWorkSectionAndDrawingName(drawingId);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
respone.code = 0;
|
||||||
|
respone.message = e.Message;
|
||||||
|
}
|
||||||
|
return respone;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public Model.ResponeData getProjectContentList(string drawingId, string part)
|
public Model.ResponeData getProjectContentList(string drawingId, string part)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue