小程序
This commit is contained in:
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using System.Web.Http;
|
||||
using BLL;
|
||||
using Model;
|
||||
using Model.CQMS;
|
||||
|
||||
namespace WebAPI.Controllers.CQMS
|
||||
{
|
||||
@@ -112,5 +113,131 @@ namespace WebAPI.Controllers.CQMS
|
||||
|
||||
public string AttachUrl { get; set; }
|
||||
}
|
||||
|
||||
#region 小程序端
|
||||
/// <summary>
|
||||
/// 添加 主表+子表
|
||||
/// </summary>
|
||||
/// <param name="inspectionManagement"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public ResponseData<string> AddInspectionManagement([FromBody] InspectionManagement inspectionManagement)
|
||||
{
|
||||
ResponseData<string> res = new ResponseData<string>();
|
||||
try
|
||||
{
|
||||
res.successful = BLL.API.CQMS.ApiInspectionManagementService.AddInspectionManagement(inspectionManagement);
|
||||
res.successful = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
return res;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取观测点
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="keyWord"></param>
|
||||
/// <returns></returns>
|
||||
public ResponseData<List<BreakdownProject>> getBreakdownProject(string projectId, string keyWord)
|
||||
{
|
||||
ResponseData<List<BreakdownProject>> res = new ResponseData<List<BreakdownProject>>();
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(keyWord))
|
||||
keyWord = "";
|
||||
res.resultValue = BLL.API.CQMS.BreakdownProjectService.getBreakdowns(projectId, keyWord);
|
||||
res.successful = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
return res;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取明细列表数据
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="index"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ResponseData<List<InspectionManagement>> getInspectionManagement(string projectId, int index, int page, string state, string name)
|
||||
{
|
||||
ResponseData<List<InspectionManagement>> res = new ResponseData<List<InspectionManagement>>();
|
||||
try
|
||||
{
|
||||
res.successful = true;
|
||||
res.resultValue = BLL.API.CQMS.ApiInspectionManagementService.getInspectionManagement(projectId, index, page, state, name);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取明细列表数据
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="index"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ResponseData<List<InspectionManagementDetail>> getInspectionManagementDetail(string projectId, int index, int page, string state, string name)
|
||||
{
|
||||
ResponseData<List<InspectionManagementDetail>> res = new ResponseData<List<InspectionManagementDetail>>();
|
||||
try
|
||||
{
|
||||
res.successful = true;
|
||||
res.resultValue = BLL.API.CQMS.ApiInspectionManagementService.getInspectionManagementDetail(projectId, index, page, state, name);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据主表 获取子表数据
|
||||
/// </summary>
|
||||
/// <param name="InspectionId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ResponseData<List<InspectionManagementDetail>> getInspectionManagementDetailByInspectionId(string InspectionId)
|
||||
{
|
||||
ResponseData<List<InspectionManagementDetail>> res = new ResponseData<List<InspectionManagementDetail>>();
|
||||
try
|
||||
{
|
||||
res.successful = true;
|
||||
res.resultValue = BLL.API.CQMS.ApiInspectionManagementService.getInspectionManagementDetailByinspectionId(InspectionId);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user