009_DI-Elec/Learun.Application.Web/AppApi/EnginedataPropertyApiController.cs

73 lines
2.0 KiB
C#

using Learun.Application.TwoDevelopment.ZZDT_EC;
using Learun.Util;
using Learun.Util.SqlSugar;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Web.Http;
namespace Learun.Application.Web.AppApi
{
/// <summary>
/// 工程数据属性接口
/// </summary>
[RoutePrefix("api/EnginedataPropertyApi")]
[HandlerApiLogin(FilterMode.Enforce)]
[TokenAuthorize]
public class EnginedataPropertyApiController : WebApiControllerBase
{
private ec_enginedata_propertyIBLL ec_enginedata_propertyIBLL = new ec_enginedata_propertyBLL();
/// <summary>
/// 更新默认工程数据属性
/// </summary>
/// <returns></returns>
[HttpPost]
public IHttpActionResult UpdateEnginePropByDefault(string ProjId)
{
try
{
ec_enginedata_propertyIBLL.UpdateEnginePropByDefault(ProjId);
return Success("更新成功");
}
catch (Exception ex)
{
return Fail(ex.Message);
}
}
/// <summary>
/// 插入缺少的工程数据属性
/// </summary>
/// <returns></returns>
[HttpPost]
public IHttpActionResult InsertEnginePropByDefault(string ProjId)
{
try
{
ec_enginedata_propertyIBLL.InsertEnginePropByDefault(ProjId);
return Success("插入成功");
}
catch (Exception ex)
{
return Fail(ex.Message);
}
}
/// <summary>
///
/// </summary>
/// <param name="ProjId"></param>
/// <returns></returns>
[HttpGet]
public IHttpActionResult GetTagPropsById(string ProjId,string engineId)
{
var bll = new ec_enginedata_propertyBLL();
var res = bll.GetEnginePropById(ProjId,engineId);
return Success(res);
}
#if DEBUG
#endif
}
}