43 lines
1.2 KiB
C#
Executable File
43 lines
1.2 KiB
C#
Executable File
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Newtonsoft.Json.Linq;
|
|
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Public.IServices;
|
|
using Opsoft.NetCore.O3App.Shared;
|
|
using Opsoft.NetCore.O3App.WebApi.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Opsoft.NetCore.O3App.WebApi.Controllers
|
|
{
|
|
// <summary>
|
|
/// 公共控制
|
|
/// </summary>
|
|
[Authorize]
|
|
public class PublicController : BaseApiController<PublicController>
|
|
{
|
|
private readonly IPublicService service;
|
|
public PublicController(IMapper mapper, ILogger<PublicController> logger, IPublicService Service)
|
|
: base(mapper, logger)
|
|
{
|
|
service = Service;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 保存质检单信息
|
|
/// </summary>
|
|
/// <param name="data"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public async Task<BaseResponse<object>> OpenWin([FromBody] JObject request)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await service.OpenWin(input);
|
|
}, request);
|
|
}
|
|
}
|
|
}
|