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 { /// /// 辅助资料 /// [Route("api/[controller]")] [Authorize] [ApiController] public class SupportingInformationController : ControllerBase { private readonly string _FormName = "辅助属性"; private readonly string _FormId = "BOS_ASSISTANTDATA_DETAIL"; private readonly K3CloudApiUtils _utils; /// /// 构造方法 /// /// public SupportingInformationController(K3CloudApiUtils utils) { _utils = utils; } /// /// 辅助属性列表 /// /// [HttpGet("PackagingMethodList")] public AjaxResult PackagingMethodList() { Query queryParam = new Query() { FormId = this._FormId, // 基础资料内码,基础资料编码 FieldKeys = "FEntryID,FNumber,FDataValue", Limit = 0, StartRow = 0, FilterString = "" }; // 已审核未禁用 //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); } /// /// 查看 /// /// /// [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); } } }