小程序
This commit is contained in:
@@ -48,6 +48,7 @@ namespace Mvc.Controllers
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ResponseData<List<Solution_CQMSConstructSolutionApprove>> GetApproveById(string id,int edition)
|
||||
{
|
||||
ResponseData<List<Solution_CQMSConstructSolutionApprove>> res = new ResponseData<List<Solution_CQMSConstructSolutionApprove>>();
|
||||
@@ -56,6 +57,7 @@ namespace Mvc.Controllers
|
||||
res.resultValue = BLL.CQMSConstructSolutionApproveService.getListDataForApi(id);
|
||||
return res;
|
||||
}
|
||||
[HttpGet]
|
||||
public ResponseData<Solution_CQMSConstructSolutionApprove> GetCurrApproveById(string id, string userId, int edition)
|
||||
{
|
||||
ResponseData<Solution_CQMSConstructSolutionApprove> res = new ResponseData<Solution_CQMSConstructSolutionApprove>();
|
||||
@@ -87,6 +89,7 @@ namespace Mvc.Controllers
|
||||
/// <param name="id"></param>
|
||||
/// <param name="edition"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ResponseData<List<Solution_CQMSConstructSolutionApprove>> GetConApproveById(string id, int edition)
|
||||
{
|
||||
ResponseData<List<Solution_CQMSConstructSolutionApprove>> res = new ResponseData<List<Solution_CQMSConstructSolutionApprove>>();
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,255 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
using BLL;
|
||||
using Model;
|
||||
using Model.CQMS;
|
||||
|
||||
|
||||
namespace WebAPI.Controllers.CQMS
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量小程序接口
|
||||
/// </summary>
|
||||
public class QualityAssuranceController : ApiController
|
||||
{
|
||||
#region 设计交底
|
||||
/// <summary>
|
||||
/// 设计交底列表
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Model.ResponeData getDesignDetailsList(string projectId, int pageIndex = 0,string cNProfessionalId="") {
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var getDataList = QualityAssuranceService.getDesignDetailsList(projectId, cNProfessionalId);
|
||||
int pageCount = getDataList.Count();
|
||||
if (pageCount > 0 && pageIndex > 0)
|
||||
{
|
||||
getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
|
||||
}
|
||||
responeData.data = new { pageCount, getDataList };
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Model.ResponeData getDesignDetails(string Id) {
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = QualityAssuranceService.getDesignDetails(Id);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 图纸会审
|
||||
/// <summary>
|
||||
/// 图纸会审列表
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Model.ResponeData getReviewDrawingsList(string projectId, int pageIndex = 0, string cNProfessionalId = "")
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var getDataList = QualityAssuranceService.getReviewDrawingsList(projectId,cNProfessionalId);
|
||||
int pageCount = getDataList.Count();
|
||||
if (pageCount > 0 && pageIndex > 0)
|
||||
{
|
||||
getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
|
||||
}
|
||||
responeData.data = new { pageCount, getDataList };
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 图纸会审详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Model.ResponeData getReviewDrawings(string Id)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = QualityAssuranceService.getReviewDrawings(Id);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 技术交底
|
||||
/// <summary>
|
||||
/// 技术交底列表
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <param name="cNProfessionalId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Model.ResponeData getConTechnologyDisclosureList(string projectId, int pageIndex = 0, string cNProfessionalId = "")
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var getDataList = QualityAssuranceService.getConTechnologyDisclosureList(projectId, cNProfessionalId);
|
||||
int pageCount = getDataList.Count();
|
||||
if (pageCount > 0 && pageIndex > 0)
|
||||
{
|
||||
getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
|
||||
}
|
||||
responeData.data = new { pageCount, getDataList };
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 技术交底详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Model.ResponeData getConTechnologyDisclosure(string Id)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = QualityAssuranceService.getConTechnologyDisclosure(Id);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 人员报验
|
||||
//
|
||||
/// <summary>
|
||||
/// 人员报验列表
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <param name="serachText"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Model.ResponeData getInspectionPersonList(string projectId,string serachText="", int pageIndex = 0)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var getDataList = QualityAssuranceService.getInspectionPersonList(projectId,serachText);
|
||||
int pageCount = getDataList.Count();
|
||||
if (pageCount > 0 && pageIndex > 0)
|
||||
{
|
||||
getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
|
||||
}
|
||||
responeData.data = new { pageCount, getDataList };
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 人员报验详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Model.ResponeData getInspectionPerson(string Id)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = QualityAssuranceService.getInspectionPerson(Id);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 材料报验
|
||||
|
||||
#endregion
|
||||
|
||||
#region 机具报验
|
||||
|
||||
#endregion
|
||||
|
||||
#region 设计变更
|
||||
|
||||
#endregion
|
||||
|
||||
#region 共捡数据
|
||||
|
||||
#endregion
|
||||
|
||||
#region 无损检测
|
||||
|
||||
#endregion
|
||||
|
||||
#region 压力管道
|
||||
|
||||
#endregion
|
||||
|
||||
#region 特种设备
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user