andon区域下拉
This commit is contained in:
@@ -103,13 +103,21 @@ namespace ZR.Admin.WebApi.Controllers.andon
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("getPullDown")]
|
||||
[HttpGet("getPullDownP")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmarea:list")]
|
||||
public ApiResult GetPullDown()
|
||||
public ApiResult GetPullDownP()
|
||||
{
|
||||
var response = _AndonAlarmAreaService.GetPullDown();
|
||||
var response = _AndonAlarmAreaService.GetPullDownP();
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
[HttpPost("getPullDownByPID")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmarea:list")]
|
||||
public ApiResult GetPullDownByPID([FromBody] AlarmAreaPullDownDto parm)
|
||||
{
|
||||
var response = _AndonAlarmAreaService.GetPullDownByPID(parm);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,6 +80,16 @@ namespace ZR.Admin.WebApi.Controllers.andon
|
||||
public IActionResult UpdateAndonAlarmRecord([FromBody] AndonAlarmRecordDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<AndonAlarmRecord>().ToUpdate(HttpContext);
|
||||
if (parm.Area != null && parm.Area.Length > 0)
|
||||
{
|
||||
modal.Area1 = parm.Area.Length > 0 ? parm.Area[0] : string.Empty;
|
||||
modal.Area2 = parm.Area.Length > 1 ? parm.Area[1] : string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
modal.Area1 = string.Empty;
|
||||
modal.Area2 = string.Empty;
|
||||
}
|
||||
var response = _AndonAlarmRecordService.UpdateAndonAlarmRecord(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
|
||||
Reference in New Issue
Block a user