105 lines
3.8 KiB
C#
105 lines
3.8 KiB
C#
using BLL;
|
|
using Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web.Http;
|
|
|
|
namespace WebAPI.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 质量计划
|
|
/// </summary>
|
|
public class CQMSPlanController : ApiController
|
|
{
|
|
/// <summary>
|
|
/// 根据项目id获取总包质量计划列表集合
|
|
/// </summary>
|
|
/// <param name="projectId"></param>
|
|
/// <param name="index"></param>
|
|
/// <param name="page"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public ResponseData<List<Plan_MainPlan>> getMainPlanList(string projectId, int index, int page)
|
|
{
|
|
ResponseData<List<Plan_MainPlan>> res = new ResponseData<List<Plan_MainPlan>>();
|
|
res.successful = true;
|
|
res.resultValue = BLL.CQMS_MainPlanService.getListDataForApi(projectId, index, page);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据项目id获取分包质量计划列表集合
|
|
/// </summary>
|
|
/// <param name="projectId"></param>
|
|
/// <param name="index"></param>
|
|
/// <param name="page"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public ResponseData<List<Plan_SubPlan>> getSubPlanList(string projectId, int index, int page)
|
|
{
|
|
ResponseData<List<Plan_SubPlan>> res = new ResponseData<List<Plan_SubPlan>>();
|
|
res.successful = true;
|
|
res.resultValue = BLL.CQMS_SubPlanService.getListDataForApi(projectId, index, page);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 根据id获取总包质量计划详情
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public ResponseData<Plan_MainPlan> GetMainPlanByMainPlanId(string id)
|
|
{
|
|
ResponseData<Plan_MainPlan> res = new ResponseData<Plan_MainPlan>();
|
|
Plan_MainPlan cd = BLL.CQMS_MainPlanService.GetMainPlanByMainPlanIdForApi(id);
|
|
|
|
res.successful = true;
|
|
res.resultValue = BeanUtil.CopyOjbect<Plan_MainPlan>(cd, true);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 根据id获取分包质量计划详情
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public ResponseData<Plan_SubPlan> GetSubPlanBySubPlanId(string id)
|
|
{
|
|
ResponseData<Plan_SubPlan> res = new ResponseData<Plan_SubPlan>();
|
|
Plan_SubPlan cd = BLL.CQMS_SubPlanService.GetSubPlanBySubPlanIdForApi(id);
|
|
|
|
res.successful = true;
|
|
res.resultValue = BeanUtil.CopyOjbect<Plan_SubPlan>(cd, true);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 根据id获取总包质量计划审批明细
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public ResponseData<List<Plan_MainPlanApprove>> GetMainPlanApproveById(string id)
|
|
{
|
|
ResponseData<List<Plan_MainPlanApprove>> res = new ResponseData<List<Plan_MainPlanApprove>>();
|
|
res.successful = true;
|
|
res.resultValue = BLL.CQMS_MainPlanApproveService.getApproveListDataByIdForApi(id);
|
|
return res;
|
|
|
|
}
|
|
/// <summary>
|
|
/// 根据id获取分包质量计划审批明细
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public ResponseData<List<Plan_SubPlanApprove>> GetSubPlanApproveById(string id)
|
|
{
|
|
ResponseData<List<Plan_SubPlanApprove>> res = new ResponseData<List<Plan_SubPlanApprove>>();
|
|
res.successful = true;
|
|
res.resultValue = BLL.CQMS_SubPlanApproveService.getApproveListDataByIdForApi(id);
|
|
return res;
|
|
|
|
}
|
|
}
|
|
}
|