Commit c970c015 by xin.yang
parents 675e0852 0185fb08
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Siger.Middlelayer.AccRepository.Request;
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
namespace Siger.ApiACC.Controllers
{
public class AutomationController : BaseController
{
/// <summary>
/// 设备状态接口 用于 保存 设备当前可用状态
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
public IActionResult MachineStatus([FromBody]RequestAutomationMachine request)
{
return new ObjectResult("1");
}
/// <summary>
/// 任务状态接口 用于保存PLC 实时任务状态
/// </summary>
/// <returns></returns>
public IActionResult TaskResult([FromBody]RequestAutomationTaskResult request)
{
return new ObjectResult("1");
}
/// <summary>
/// 产线模式 0:手动模式 /1:自动模式(产生自动任务)
/// </summary>
/// <param name="mode"></param>
/// <returns></returns>
public IActionResult LineMode(int mode)
{
return new ObjectResult("1");
}
}
}
...@@ -366,7 +366,7 @@ CREATE TABLE `siger_automation_line_mode` ( ...@@ -366,7 +366,7 @@ CREATE TABLE `siger_automation_line_mode` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`section` int(11) NOT NULL DEFAULT 0 COMMENT '产线ID', `section` int(11) NOT NULL DEFAULT 0 COMMENT '产线ID',
`projectid` int(11) NOT NULL DEFAULT 0, `projectid` int(11) NOT NULL DEFAULT 0,
`mode` int(11) NOT NULL DEFAULT 1 COMMENT '1:手动模式 2:自动模式', `mode` int(11) NOT NULL DEFAULT 1 COMMENT '0:手动模式 1:自动模式',
`updatetime` datetime(0) NULL DEFAULT NULL COMMENT '操作时间', `updatetime` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
......
test.html
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment