83 lines
2.5 KiB
C#
83 lines
2.5 KiB
C#
using Gatedge.K3Cloud.Utils;
|
|
using Gatedge.K3Cloud.Utils.Common;
|
|
using Gatedge.K3Cloud.Utils.Model.K3Request;
|
|
using Gatedge.ScanCode.Common;
|
|
using Gatedge.ScanCode.Extension;
|
|
using Gatedge.ScanCode.Services;
|
|
using Gatedge.ScanCode.Services.IServices;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Gatedge.ScanCode.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 辅助资料
|
|
/// </summary>
|
|
[Route("api/[controller]")]
|
|
[Authorize]
|
|
[ApiController]
|
|
public class SupportingInformationController : ControllerBase
|
|
{
|
|
private readonly string _FormName = "辅助属性";
|
|
private readonly string _FormId = "BOS_ASSISTANTDATA_DETAIL";
|
|
private readonly K3CloudApiUtils _utils;
|
|
|
|
/// <summary>
|
|
/// 构造方法
|
|
/// </summary>
|
|
/// <param name="utils"></param>
|
|
public SupportingInformationController(K3CloudApiUtils utils)
|
|
{
|
|
_utils = utils;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 辅助属性列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("PackagingMethodList")]
|
|
public AjaxResult PackagingMethodList()
|
|
{
|
|
Query queryParam = new Query()
|
|
{
|
|
FormId = this._FormId,
|
|
// 基础资料内码,基础资料编码
|
|
FieldKeys = "FEntryID,FNumber,FDataValue",
|
|
Limit = 0,
|
|
StartRow = 0,
|
|
FilterString = new List<FilterItem>()
|
|
};
|
|
// 已审核未禁用
|
|
queryParam.FilterString.Add(new FilterItem()
|
|
{
|
|
Left = "",
|
|
FieldName = "FId.FNumber",
|
|
Compare = "67",
|
|
Value = "01",
|
|
Right = "",
|
|
Logic = "",
|
|
});
|
|
var loginInfo = User.GetLoginInfoByClaimsPrincipal();
|
|
_utils.InitCloudApi(loginInfo);
|
|
ISupportingInformationService service = new SupportingInformationService(_utils);
|
|
var data = service.List(queryParam);
|
|
return AjaxResult.Success(data);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 查看
|
|
/// </summary>
|
|
/// <param name="Param"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("View")]
|
|
public AjaxResult View([FromQuery] View Param)
|
|
{
|
|
var loginInfo = User.GetLoginInfoByClaimsPrincipal();
|
|
_utils.InitCloudApi(loginInfo);
|
|
var result = _utils.Query(_FormId, Param);
|
|
return AjaxResult.Success(result);
|
|
}
|
|
}
|
|
}
|