1
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace WebAPI.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 问题通知单
|
||||
/// </summary>
|
||||
public class ProblemNoticeController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取整改详情详情
|
||||
/// </summary>
|
||||
/// <param name="proNoticeCId"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData GetDetailItem(string proNoticeCId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = ProblemNoticeService.GetDetailItem(proNoticeCId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存整改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData SaveDetailItem(ProblemNoticeDetailInput model)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
ProblemNoticeService.SaveDetailItem(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,291 @@
|
||||
|
||||
|
||||
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebAPI.Controllers.Customization.CNCCG
|
||||
{
|
||||
/// <summary>
|
||||
/// 交建定制特种设备检查接口
|
||||
/// </summary>
|
||||
public class SpecialEquipmentCheckController : ApiController
|
||||
{
|
||||
#region 根据主键ID获取详细日常检查、定期检查 信息
|
||||
/// <summary>
|
||||
/// 根据主键ID获取详细日常检查、定期检查 信息
|
||||
/// </summary>
|
||||
/// <param name="Special_EquipmentCheckId">主键id</param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getDetail(string Special_EquipmentCheckId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = Special_EquipmentCheckService.getDailyData(Special_EquipmentCheckId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取特种设备日常检查、定期检查列表
|
||||
/// <summary>
|
||||
/// 获取特种设备日常检查、定期检查列表
|
||||
/// </summary>
|
||||
/// <param name="Projectid">项目id</param>
|
||||
/// <param name="Type">0日常检查 1定期检查 2安装前 3安装中 4使用中 5拆除中 6.日常定稿 7定期定稿</param>
|
||||
/// <param name="CompileMan">添加人</param>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <param name="EquipmentInItemId">特种设备Id</param>
|
||||
/// <param name="State">状态</param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getList(string Projectid, string Type,string EquipmentInItemId="", string CompileMan = "",string State="", int pageIndex=0)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var getDataList = Special_EquipmentCheckService.GetSpecial_EquipmentCheckList(Projectid, Type, CompileMan, State, EquipmentInItemId);
|
||||
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>
|
||||
/// 加载检查表检查内容
|
||||
/// </summary>
|
||||
/// <param name="Type">7日常检查 8定期检查 9安装前 10安装中 11使用中 12拆除中</param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getCheckItemDetailList(string Type) {
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = Special_EquipmentCheckService.getCheckItemDetailList(Type);
|
||||
}
|
||||
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 getEquipmentInItem(string ProjectId) {
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = Special_EquipmentCheckService.getEquipmentInItem(ProjectId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 添加特种设备日常检查、定期检查
|
||||
/// <summary>
|
||||
/// 添加特种设备日常检查、定期检查
|
||||
/// </summary>
|
||||
/// <param name="Model"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData EditDayEquipment([FromBody] Special_EquipmentCheckService.ListDetail Model) {
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.message = Special_EquipmentCheckService.EditDayEquipment(Model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
//安装前、安装中、使用中、拆除中(需要审批)
|
||||
/// <summary>
|
||||
/// 下拉
|
||||
/// </summary>
|
||||
public class EquipmentInItem
|
||||
{
|
||||
/// <summary>
|
||||
/// 显示的值
|
||||
/// </summary>
|
||||
public string dataValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 存起来的值
|
||||
/// </summary>
|
||||
public string dataKey { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据当前状态加载办理步骤
|
||||
/// </summary>
|
||||
/// <param name="State">默认是0</param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getAuditDrp(string State="0")
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var EqList = EquipmentCheckApproveService.GetDHandleTypeByState(State);
|
||||
List<EquipmentInItem> EIlist = new List<EquipmentInItem>();
|
||||
foreach (var item in EqList)
|
||||
{
|
||||
EquipmentInItem m = new EquipmentInItem();
|
||||
m.dataValue = item.Text;
|
||||
m.dataKey = item.Value;
|
||||
EIlist.Add(m);
|
||||
}
|
||||
|
||||
responeData.data = EIlist;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目id获取审批下拉人员
|
||||
/// </summary>
|
||||
/// <param name="ProjectId"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getUserDrp(string ProjectId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var EqList = UserService.GetMainUserList(ProjectId);
|
||||
List<EquipmentInItem> EIlist = new List<EquipmentInItem>();
|
||||
foreach (var item in EqList)
|
||||
{
|
||||
EquipmentInItem m = new EquipmentInItem();
|
||||
m.dataValue = item.Text;
|
||||
m.dataKey = item.Value;
|
||||
EIlist.Add(m);
|
||||
}
|
||||
|
||||
responeData.data = EIlist;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载审批列表
|
||||
/// </summary>
|
||||
/// <param name="Special_EquipmentCheckId"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getAuditList(string Special_EquipmentCheckId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = Special_EquipmentCheckService.getListData(Special_EquipmentCheckId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加特种设备隐患排查清单
|
||||
/// </summary>
|
||||
/// <param name="Model">2安装前 3安装中 4使用中 5拆除中</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData EditFlowEquipment([FromBody] Special_EquipmentCheckService.ListDetail Model)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.message = Special_EquipmentCheckService.EditFlowEquipment(Model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键加载特种设备信息
|
||||
/// </summary>
|
||||
/// <param name="EquipmentInItemId"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getEquipmentInItemModel(string EquipmentInItemId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = Special_EquipmentCheckService.getEquipmentInItemModel(EquipmentInItemId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user