20220315 代码初始化上传

This commit is contained in:
2022-03-15 17:36:38 +08:00
commit 9dc8a7e05d
9501 changed files with 2066431 additions and 0 deletions
@@ -0,0 +1,75 @@
using BLL.API.HJGL;
using Model;
using Model.APIItem.HJGL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
namespace WebAPI.Controllers.HJGL
{
public class ElectrodeRecoveryController : ApiController
{ //
// GET: /Draw/
[HttpGet]
public ResponseData<List<ElectrodeRecoveryItem>> Index(string projectId, int index, int page, string name)
{
ResponseData<List<ElectrodeRecoveryItem>> res = new ResponseData<List<ElectrodeRecoveryItem>>();
try
{
res.successful = true;
if (string.IsNullOrEmpty(name))
name = "";
res.resultValue = APIElectrodeRecoveryService.GetListData(projectId, index, page, name);
}
catch (Exception e)
{
res.successful = false;
}
return res;
}
[HttpPost]
public ResponseData<string> AddElectrodeRecovery([FromBody]ElectrodeRecoveryItem ElectrodeRecovery)
{
ResponseData<string> res = new ResponseData<string>();
try
{
ElectrodeRecovery.RecoveryDate = DateTime.Now;
if (string.IsNullOrEmpty(ElectrodeRecovery.RecoveryId))
{
if (string.IsNullOrEmpty(ElectrodeRecovery.RecoveryCode))
{
string prefix = BLL.ProjectService.GetProjectByProjectId(ElectrodeRecovery.ProjectId).ProjectCode + "-HJ-CD-LL-";
ElectrodeRecovery.RecoveryCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.HJGL_ElectrodeRecovery", "RecoveryCode", ElectrodeRecovery.ProjectId, prefix);
}
ElectrodeRecovery.RecoveryId = Guid.NewGuid().ToString();
APIElectrodeRecoveryService.AddElectrodeRecovery(ElectrodeRecovery);
res.resultValue = ElectrodeRecovery.RecoveryId;
}
else
{
APIElectrodeRecoveryService.UpdateElectrodeRecovery(ElectrodeRecovery);
res.resultValue = ElectrodeRecovery.RecoveryId;
}
res.successful = true;
}
catch (Exception e)
{
res.resultHint = e.StackTrace;
res.successful = false;
}
return res;
}
}
}
@@ -0,0 +1,124 @@
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 HotProcessHardController : ApiController
{
/// <summary>
/// 根据单位工程获取热处理委托单号
/// </summary>
/// <param name="unitWrokId"></param>
/// <param name="hotProessTrustNo"></param>
/// <returns></returns>
public Model.ResponeData getHotProessTrustNo(string unitWrokId, string hotProessTrustNo)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIHotProcessHardService.getHotProessTrustNo(unitWrokId, hotProessTrustNo);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 根据单位工程获取硬度委托单号
/// </summary>
/// <param name="unitWrokId"></param>
/// <param name="hardTrustNo"></param>
/// <returns></returns>
public Model.ResponeData getHardTrustNo(string unitWrokId, string hardTrustNo)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIHotProcessHardService.getHardTrustNo(unitWrokId, hardTrustNo);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 根据热处理委托单获取委托单明细
/// </summary>
/// <param name="hotProessTrustId"></param>
/// <returns></returns>
public Model.ResponeData getHotProcessItem(string hotProessTrustId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data =APIHotProcessHardService.getHotProcessItem(hotProessTrustId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 根据硬度委托单获取委托单明细
/// </summary>
/// <param name="hardTrustId"></param>
/// <returns></returns>
public Model.ResponeData getHardTrustItem(string hardTrustId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIHotProcessHardService.getHardTrustItem(hardTrustId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 硬度检测不合格预警
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public Model.ResponeData GetHardNoPassWarning(string projectId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIHotProcessHardService.GetHardNoPassWarning(projectId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
}
}
@@ -0,0 +1,559 @@
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 NDETrustController : ApiController
{
#region
/// <summary>
/// 选择单位工程、探伤类型、探伤比例、点口批号获取需要进行点口的批,自动点口调用
/// </summary>
/// <param name="unitWorkId"></param>
/// <param name="detectionTypeId"></param>
/// <param name="detectionRateId"></param>
/// <param name="pointBatchCode"></param>
/// <returns></returns>
public Model.ResponeData getAutoPointBatchCode(string unitWorkId, string detectionTypeId, string detectionRateId, string pointBatchCode)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.getAutoPointBatchCode(unitWorkId, detectionTypeId, pointBatchCode, pointBatchCode);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 根据单位工程、点口批号、批开始时间获取需要调整的批(已点口但还未进行委托的批列表)
/// </summary>
/// <param name="unitWorkId"></param>
/// <param name="detectionTypeId"></param>
/// <param name="detectionRateId"></param>
/// <param name="pointBatchCode"></param>
/// <returns></returns>
public Model.ResponeData getPointBatchCode(string unitWorkId, string detectionTypeId, string detectionRateId, string pointBatchCode)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.getPointBatchCode(unitWorkId, detectionTypeId, pointBatchCode, pointBatchCode);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 根据点口批ID获取批明细(自动点口调用呈现)
/// </summary>
/// <param name="pointBatchId"></param>
/// <returns></returns>
public Model.ResponeData getPointBatchDetail(string pointBatchId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.getPointBatchDetail(pointBatchId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 根据点口批ID获取已点口还未审批的焊口
/// </summary>
/// <param name="pointBatchId"></param>
/// <returns></returns>
public Model.ResponeData getPointWeldJoint(string pointBatchId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.getPointWeldJoint(pointBatchId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 根据点口批ID和焊口ID获取待调整焊口
/// </summary>
/// <param name="pointBatchId"></param>
/// <param name="weldJointId"></param>
/// <returns></returns>
public Model.ResponeData getPointWeldJoint(string pointBatchId, string weldJointId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.getPointWeldJoint(pointBatchId, weldJointId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 根据单位工程获取所有已点的焊口列表
/// </summary>
/// <param name="unitWorkId"></param>
/// <returns></returns>
public Model.ResponeData GetPointWeldJointList(string unitWorkId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.GetPointWeldJointList(unitWorkId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 对所选批次进行自动点口
/// </summary>
/// <param name="pointBatchId"></param>
/// <returns></returns>
public Model.ResponeData getAutoPointSave(string pointBatchId)
{
var responeData = new Model.ResponeData();
try
{
APINDETrustService.AutoPointSave(pointBatchId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 点口调整
/// </summary>
/// <param name="oldJointId"></param>
/// <param name="newJointId"></param>
/// <returns></returns>
public Model.ResponeData getRePointSave(string oldJointId, string newJointId)
{
var responeData = new Model.ResponeData();
try
{
APINDETrustService.RePointSave(oldJointId, newJointId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 根据单位工程获取所有已点的焊口生成委托单
/// </summary>
/// <param name="unitWorkId"></param>
/// <returns></returns>
public Model.ResponeData getGenerateTrust(string unitWorkId)
{
var responeData = new Model.ResponeData();
try
{
APINDETrustService.GenerateTrust(unitWorkId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region
/// <summary>
/// 选择单位工程、探伤类型、探伤比例、委托单号等获取委托单
/// </summary>
/// <param name="unitWorkId"></param>
/// <param name="detectionTypeId"></param>
/// <param name="detectionRateId"></param>
/// <param name="isAudit"></param>
/// <param name="trustBatchCode"></param>
/// <returns></returns>
public Model.ResponeData getBatchTrustCode(string unitWorkId, string detectionTypeId, string detectionRateId, bool? isAudit, string trustBatchCode)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.getBatchTrustCode(unitWorkId, detectionTypeId, detectionRateId, isAudit, trustBatchCode);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 选择委托单ID获取委托单明细信息
/// </summary>
/// <param name="trustBatchId"></param>
/// <returns></returns>
public Model.ResponeData getBatchTrustDetail(string trustBatchId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.GetBatchTrustDetail(trustBatchId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 对所选委托单进行审核
/// </summary>
/// <param name="trustBatchId"></param>
/// <returns></returns>
public Model.ResponeData getBatchTrustAudit(string trustBatchId)
{
var responeData = new Model.ResponeData();
try
{
APINDETrustService.BatchTrustAudit(trustBatchId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region
/// <summary>
/// 选择单位工程、探伤类型、检测单号获取检测单
/// </summary>
/// <param name="unitWorkId"></param>
/// <param name="detectionTypeId"></param>
/// <param name="ndeCode"></param>
/// <returns></returns>
public Model.ResponeData getBatchNdeCode(string unitWorkId, string detectionTypeId, string ndeCode)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.getBatchNdeCode(unitWorkId, detectionTypeId, ndeCode);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 根据检测单ID获取检测单明细
/// </summary>
/// <param name="ndeId"></param>
/// <returns></returns>
public Model.ResponeData getBatchNDEDetail(string ndeId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.GetBatchNDEDetail(ndeId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region /
/// <summary>
/// 获取返修单列表
/// </summary>
/// <param name="unitWorkId"></param>
/// <param name="isAudit"></param>
/// <param name="repairRecordCode"></param>
/// <returns></returns>
public Model.ResponeData GetRepairRecord(string unitWorkId, bool isAudit, string repairRecordCode)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.GetRepairRecord(unitWorkId, isAudit, repairRecordCode);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 获取返修单信息
/// </summary>
/// <param name="repairRecordId"></param>
/// <returns></returns>
public Model.ResponeData GetRepairInfoByRepairRecordId(string repairRecordId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.GetRepairInfoByRepairRecordId(repairRecordId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 根据条件获取可选取扩透口的批明细
/// </summary>
/// <param name="repairRecordId"></param>
/// <param name="welder">同焊工</param>
/// <param name="pipeLine">同管线</param>
/// <param name="daily">同一天</param>
/// <param name="repairBefore">返修前所焊</param>
/// <param name="mat">同材质</param>
/// <param name="spec">同规格</param>
/// <returns></returns>
public Model.ResponeData GetRepairExpDetail(string repairRecordId, bool welder, bool pipeLine, bool daily, bool repairBefore, bool mat, bool spec)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.GetRepairExpDetail(repairRecordId, welder, pipeLine, daily, repairBefore, mat, spec);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 获取扩透口的随机数
/// </summary>
/// <param name="num"></param>
/// <returns></returns>
public Model.ResponeData GetRandomExport(int num)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.RandomExport(num);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 保存返修/扩透口信息
/// </summary>
/// <param name="repairRecordId">返修ID</param>
/// <param name="expandId">扩透口ID(多个用“,”号隔开)</param>
/// <param name="repairWelder">返修焊工</param>
/// <param name="repairDate">返修日期</param>
/// <param name="isCut">是否切除</param>
public Model.ResponeData GetRepairExpSaveInfo(string repairRecordId, string expandId, string repairWelder, string repairDate, bool isCut)
{
var responeData = new Model.ResponeData();
try
{
APINDETrustService.GetRepairExpSaveInfo(repairRecordId, expandId, repairWelder, repairDate, isCut);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 返修单审核
/// </summary>
/// <param name="repairRecordId"></param>
/// <returns></returns>
public Model.ResponeData GetRepairAudit(string repairRecordId)
{
var responeData = new Model.ResponeData();
try
{
APINDETrustService.RepairAudit(repairRecordId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 生成返修委托单
/// </summary>
/// <param name="repairRecordId"></param>
/// <returns></returns>
public Model.ResponeData GetGenerateRepairTrust(string repairRecordId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.GenerateRepairTrust(repairRecordId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region NDE预警
/// <summary>
/// 无损检测不合格焊口信息
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public Model.ResponeData GetNdeCheckNoPassWarn(string projectId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.GetNdeCheckNoPassWarn(projectId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 未委托焊口预警
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public Model.ResponeData GetNoTrustJointWarn(string projectId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.GetNoTrustJointWarn(projectId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
/// <summary>
/// 未检测焊口预警
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public Model.ResponeData GetNoCheckJointWarn(string projectId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APINDETrustService.GetNoTrustJointWarn(projectId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
}
}
@@ -0,0 +1,156 @@
using Model;
using Model.HJGL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
namespace WebAPI.Controllers.HJGL
{
/// <summary>
///
/// </summary>
public class PersonEntranceController : ApiController
{
/// <summary>
///
/// </summary>
/// <param name="projectId"></param>
/// <param name="name"></param>
/// <param name="pageIndex"></param>
/// <returns></returns>
[HttpGet]
public ResponseData<List<WelderEntrance>> Index(string projectId, string name, int pageIndex)
{
ResponseData<List<WelderEntrance>> res = new ResponseData<List<WelderEntrance>>();
try
{if (string.IsNullOrEmpty(name))
name = "";
res.successful = true;
res.resultValue = BLL.APIWelderEntranceService.GetWelderList(projectId, name, pageIndex);
}
catch (Exception e)
{
res.successful = false;
}
return res;
}
[HttpGet]
public ResponseData<WelderEntrance> GetWelderById(string welderId)
{
ResponseData<WelderEntrance> res = new ResponseData<WelderEntrance>();
try
{
res.successful = true;
res.resultValue = BLL.APIWelderEntranceService.GetWelderById(welderId);
}
catch (Exception e)
{
res.successful = false;
}
return res;
}
[HttpGet]
public ResponseData<bool> IsExistWEDName(string WED_Name, string projectId)
{
ResponseData<bool> res = new ResponseData<bool>();
try
{
res.successful = true;
res.resultValue = BLL.APIWelderEntranceService.IsExistWEDName( WED_Name, projectId);
}
catch (Exception e)
{
res.successful = false;
}
return res;
}
[HttpGet]
public ResponseData<bool> IsExistWEDCode(string WED_Code, string projectId)
{
ResponseData<bool> res = new ResponseData<bool>();
try
{
res.successful = true;
res.resultValue = BLL.APIWelderEntranceService.IsExistWEDCode(WED_Code, projectId);
}
catch (Exception e)
{
res.successful = false;
}
return res;
}
[HttpGet]
public ResponseData<bool> DeleteBSWelder(string WED_ID)
{
ResponseData<bool> res = new ResponseData<bool>();
try
{
res.successful = true;
BLL.APIWelderEntranceService.DeleteBSWelder(WED_ID);
}
catch (Exception e)
{
res.successful = false;
}
return res;
}
[HttpPost]
public ResponseData<string> Add([FromBody]WelderEntrance welder)
{
ResponseData<string> res = new ResponseData<string>();
try
{
res.successful = true;
BLL.APIWelderEntranceService.AddBSWelder(welder);
}
catch (Exception e)
{
res.successful = false;
}
return res;
}
[HttpPost]
public ResponseData<string> update([FromBody]WelderEntrance welder)
{
ResponseData<string> res = new ResponseData<string>();
try
{
res.successful = true;
BLL.APIWelderEntranceService.UpdateBSWelder(welder);
}
catch (Exception e)
{
res.successful = false;
}
return res;
}
}
}
@@ -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
}
}
@@ -0,0 +1,92 @@
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 PreWeldingDailyController : ApiController
{
#region
/// <summary>
/// 根据主键获取详细
/// </summary>
/// <param name="preWeldingDailyId"></param>
/// <returns></returns>
public Model.ResponeData getPreWeldingDailyInfo(string preWeldingDailyId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIPreWeldingDailyService.getPreWeldingDailyInfo(preWeldingDailyId);
}
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>
public Model.ResponeData getPreWeldingDailyList(string projectId, int pageIndex)
{
var responeData = new Model.ResponeData();
try
{
var getDataList = APIPreWeldingDailyService.getPreWeldingDailyList(projectId);
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;
}
#endregion
#region
/// <summary>
/// 保存PreWeldingDaily
/// </summary>
/// <param name="newItem">施工方案</param>
/// <returns></returns>
[HttpPost]
public Model.ResponeData SavePreWeldingDaily([FromBody] Model.HJGL_PreWeldingDailyItem newItem)
{
var responeData = new Model.ResponeData();
try
{
APIPreWeldingDailyService.SavePreWeldingDaily(newItem);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
}
}
@@ -0,0 +1,188 @@
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 ReportQueryController: ApiController
{
#region
/// <summary>
/// 根据人员二维码获取焊工业绩
/// </summary>
/// <param name="personId"></param>
/// <returns></returns>
public Model.ResponeData GetWelderPerformanceByQRC(string personId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.GetWelderPerformanceByQRC(personId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region
/// <summary>
/// 根据焊工号获取焊工业绩
/// </summary>
/// <param name="projectId"></param>
/// <param name="welderCode"></param>
/// <returns></returns>
public Model.ResponeData GetWelderPerformanceByWelderCode(string projectId, string welderCode)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.GetWelderPerformanceByWelderCode(projectId, welderCode);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region ID获取焊工合格项目
/// <summary>
/// 根据人员ID获取焊工合格项目
/// </summary>
/// <param name="personId"></param>
/// <returns></returns>
public Model.ResponeData GetWelderQualify(string personId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.getWelderQualify(personId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region
/// <summary>
/// 焊工资质预警
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public Model.ResponeData GetWelderQualifyWarning(string projectId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.GetWelderQualifyWarning(projectId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region 96%
/// <summary>
/// 焊工一次合格率低于96%预警
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public Model.ResponeData GetWelderOnePassRateWarning(string projectId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.GetWelderOnePassRateWarning(projectId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region ID获取焊口信息和焊接信息
/// <summary>
/// 根据焊口ID获取焊口信息和焊接信息
/// </summary>
/// <param name="weldJointId"></param>
/// <returns></returns>
public Model.ResponeData GetJointCompreInfo(string weldJointId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.GetJointCompreInfo(weldJointId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region
/// <summary>
/// 多维度查询报表
/// </summary>
/// <param name="projectId"></param>
/// <param name="unitId"></param>
/// <param name="unitWorkId"></param>
/// <param name="pipeLineId"></param>
/// <param name="material"></param>
/// <param name="startTime"></param>
/// <param name="endTime"></param>
/// <returns></returns>
public Model.ResponeData GetReportQueryByRequir(string projectId, string unitId, string unitWorkId, string pipeLineId, string material, string startTime, string endTime)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.GetReportQueryByRequir(projectId, unitId, unitWorkId, pipeLineId, material, startTime, endTime);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
}
}
@@ -0,0 +1,89 @@
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 TestPackageController : ApiController
{
#region
/// <summary>
/// 获取试压包号
/// </summary>
/// <param name="unitWorkId">单位工程</param>
/// <param name="isFinish">是否完成</param>
/// <param name="testPackageNo">试压包号</param>
/// <returns></returns>
public Model.ResponeData getTestPackageNo(string unitWorkId, bool isFinish, string testPackageNo)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APITestPackageService.getTestPackageNo(unitWorkId, isFinish, testPackageNo);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region ID获取明细
/// <summary>
/// 根据试压包ID获取明细
/// </summary>
/// <param name="ptp_Id"></param>
/// <returns></returns>
public Model.ResponeData GetTestPackageDetail(string ptp_Id)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APITestPackageService.GetTestPackageDetail(ptp_Id);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region
/// <summary>
/// 获取具备试压条件的试压包提醒
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public Model.ResponeData GetCanTestPackageWarning(string projectId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APITestPackageService.GetCanTestPackageWarning(projectId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
}
}