feat(hjgl): 完善焊接任务与质量管理流程
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebAPI.Controllers.HJGL.WeldingManage
|
||||
{
|
||||
public class WeldTaskController : ApiController
|
||||
{
|
||||
[HttpGet]
|
||||
public Model.ResponeData GetTaskListByTeamGroup(string projectId, string teamGroupId = null, string unitWorkId = null)
|
||||
{
|
||||
var response = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
response.data = WeldTaskService.GetTaskListByTeamGroup(projectId, teamGroupId, unitWorkId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
response.code = 0;
|
||||
response.message = ex.Message;
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public Model.ResponeData GetTaskDetail(string projectId, string taskCode)
|
||||
{
|
||||
var response = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
response.data = WeldTaskService.GetTaskDetail(projectId, taskCode);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
response.code = 0;
|
||||
response.message = ex.Message;
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public Model.ResponeData GenerateOutPlan([FromBody] Model.WeldTaskGenerateRequest request)
|
||||
{
|
||||
var response = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
if (request == null) throw new ArgumentNullException("request");
|
||||
WeldTaskService.GenerateOutPlanByTaskCode(request.ProjectId, request.TaskCode, request.PersonId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
response.code = 0;
|
||||
response.message = ex.Message;
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user