20220315 代码初始化上传
This commit is contained in:
@@ -0,0 +1,258 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using BLL;
|
||||
|
||||
namespace WebAPI.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class PipeJointController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据单位工程获取管线列表
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getPipelineList(string projectId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = APIPipeJointService.getPipelineList(projectId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据管线ID获取未焊接的焊口信息
|
||||
/// </summary>
|
||||
/// <param name="pipeLineId"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData GetUnweldedWeldJointList(string pipeLineId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = APIPipeJointService.GetUnweldedWeldJointList(pipeLineId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据管线ID获取所有的焊口列表
|
||||
/// </summary>
|
||||
/// <param name="pipeLineId"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData GetAllWeldJointList(string pipeLineId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = APIPipeJointService.GetAllWeldJointList(pipeLineId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取焊口属性下拉框信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData GetJointAttributeList()
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = APIPipeJointService.GetJointAttributeList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取焊接位置下拉框信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData GetJOTLocationList()
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = APIPipeJointService.GetJOTLocationList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取焊工列表
|
||||
/// </summary>
|
||||
/// <param name="unitWorkId"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getWelderListByUnitWorkId(string unitWorkId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = APIPipeJointService.getWelderList(unitWorkId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊口ID获取焊口信息
|
||||
/// </summary>
|
||||
/// <param name="weldJointId"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getWeldJointInfoById(string weldJointId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = APIPipeJointService.getWeldJointInfo(weldJointId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
|
||||
#region 根据焊口标识获取焊口详细信息
|
||||
/// <summary>
|
||||
/// 根据焊口标识获取焊口详细信息
|
||||
/// </summary>
|
||||
/// <param name="weldJointIdentify"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getWeldJointByIdentify(string weldJointIdentify)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = APIPipeJointService.getWeldJointByIdentify(weldJointIdentify);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存管线焊口信息
|
||||
/// <summary>
|
||||
/// 保存管线焊口信息
|
||||
/// </summary>
|
||||
/// <param name="addItem">管线焊口项</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData PostSavePipeWeldJoint([FromBody] Model.WeldJointItem addItem)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
APIPipeJointService.SavePipeWeldJoint(addItem);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 批量保存管线焊口信息
|
||||
/// <summary>
|
||||
/// 批量保存管线焊口信息
|
||||
/// </summary>
|
||||
/// <param name="addItems">管线焊口项</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData PostSavePipeWeldJointList([FromBody] List<Model.WeldJointItem> addItems)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
APIPipeJointService.SavePipeWeldJointList(addItems);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存预焊接日报
|
||||
/// <summary>
|
||||
/// 保存预焊接日报
|
||||
/// </summary>
|
||||
/// <param name="addItem"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData PostSavePreWeldingDaily([FromBody] Model.WeldJointItem addItem)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
APIPipeJointService.SaveWeldingDaily(addItem);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user