增加frombody accept parameter
This commit is contained in:
parent
08953f8048
commit
4149aab542
@ -25,7 +25,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public FileResult OpeExportExcel(List<Alert> alerts)
|
public FileResult OpeExportExcel([FromBody] List<Alert> alerts)
|
||||||
{
|
{
|
||||||
var workbook = new XSSFWorkbook();
|
var workbook = new XSSFWorkbook();
|
||||||
#region excel設定
|
#region excel設定
|
||||||
@ -169,7 +169,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<ApiResult<List<Alert>>> AlertList(List<Alert> alerts)
|
public async Task<ApiResult<List<Alert>>> AlertList([FromBody] List<Alert> alerts)
|
||||||
{
|
{
|
||||||
ApiResult<List<Alert>> apiResult = new ApiResult<List<Alert>>();
|
ApiResult<List<Alert>> apiResult = new ApiResult<List<Alert>>();
|
||||||
try
|
try
|
||||||
|
@ -65,7 +65,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<ApiResult<List<Variable>>> SubSysList(string main_system_tag)
|
public async Task<ApiResult<List<Variable>>> SubSysList([FromBody] string main_system_tag)
|
||||||
{
|
{
|
||||||
ApiResult<List<Variable>> apiResult = new ApiResult<List<Variable>>();
|
ApiResult<List<Variable>> apiResult = new ApiResult<List<Variable>>();
|
||||||
List<Variable> sub_system_list = new List<Variable>();
|
List<Variable> sub_system_list = new List<Variable>();
|
||||||
@ -133,7 +133,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<ApiResult<List<Device>>> DevList(BuildingList bl)
|
public async Task<ApiResult<List<Device>>> DevList([FromBody] BuildingList bl)
|
||||||
{
|
{
|
||||||
ApiResult<List<Device>> apiResult = new ApiResult<List<Device>>();
|
ApiResult<List<Device>> apiResult = new ApiResult<List<Device>>();
|
||||||
List<Device> d = new List<Device>();
|
List<Device> d = new List<Device>();
|
||||||
@ -165,7 +165,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public FileResult OpeExportExcel(byte? work_type)
|
public FileResult OpeExportExcel([FromBody] byte? work_type)
|
||||||
{
|
{
|
||||||
var workbook = new XSSFWorkbook();
|
var workbook = new XSSFWorkbook();
|
||||||
#region excel設定
|
#region excel設定
|
||||||
@ -587,7 +587,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ofl"></param>
|
/// <param name="ofl"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<ApiResult<List<Operation_Firm>>> OpeFirList(OperationFindList ofl)
|
public async Task<ApiResult<List<Operation_Firm>>> OpeFirList([FromBody] OperationFindList ofl)
|
||||||
{
|
{
|
||||||
ApiResult<List<Operation_Firm>> apiResult = new ApiResult<List<Operation_Firm>>();
|
ApiResult<List<Operation_Firm>> apiResult = new ApiResult<List<Operation_Firm>>();
|
||||||
List<Operation_Firm> opList = new List<Operation_Firm>();
|
List<Operation_Firm> opList = new List<Operation_Firm>();
|
||||||
@ -648,7 +648,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="of"></param>
|
/// <param name="of"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<ApiResult<string>> SaveOpeFirm(Operation_Firm of)
|
public async Task<ApiResult<string>> SaveOpeFirm([FromBody] Operation_Firm of)
|
||||||
{
|
{
|
||||||
ApiResult<string> apiResult = new ApiResult<string>();
|
ApiResult<string> apiResult = new ApiResult<string>();
|
||||||
|
|
||||||
@ -702,7 +702,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="of"></param>
|
/// <param name="of"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<ApiResult<string>> EdtOneOpeFirm(Operation_Firm of)
|
public async Task<ApiResult<string>> EdtOneOpeFirm([FromBody] Operation_Firm of)
|
||||||
{
|
{
|
||||||
ApiResult<string> apiResult = new ApiResult<string>();
|
ApiResult<string> apiResult = new ApiResult<string>();
|
||||||
|
|
||||||
@ -767,7 +767,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ofl"></param>
|
/// <param name="ofl"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<ApiResult<List<Operation_Record>>> OpeRecList(OperationFindList ofl)
|
public async Task<ApiResult<List<Operation_Record>>> OpeRecList([FromBody] OperationFindList ofl)
|
||||||
{
|
{
|
||||||
ApiResult<List<Operation_Record>> apiResult = new ApiResult<List<Operation_Record>>();
|
ApiResult<List<Operation_Record>> apiResult = new ApiResult<List<Operation_Record>>();
|
||||||
List<Operation_Record> orl = new List<Operation_Record>();
|
List<Operation_Record> orl = new List<Operation_Record>();
|
||||||
@ -845,7 +845,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="or"></param>
|
/// <param name="or"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<ApiResult<string>> SavOpeRecord(Operation_Record or)
|
public async Task<ApiResult<string>> SavOpeRecord([FromBody] Operation_Record or)
|
||||||
{
|
{
|
||||||
ApiResult<string> apiResult = new ApiResult<string>();
|
ApiResult<string> apiResult = new ApiResult<string>();
|
||||||
|
|
||||||
@ -1012,7 +1012,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="or"></param>
|
/// <param name="or"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<ApiResult<string>> DelOpeRecord(Operation_Record or)
|
public async Task<ApiResult<string>> DelOpeRecord([FromBody] Operation_Record or)
|
||||||
{
|
{
|
||||||
ApiResult<string> apiResult = new ApiResult<string>();
|
ApiResult<string> apiResult = new ApiResult<string>();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user