更新报警记录
This commit is contained in:
@@ -80,16 +80,16 @@ namespace ZR.Admin.WebApi.Controllers.andon
|
|||||||
public IActionResult UpdateAndonAlarmRecord([FromBody] AndonAlarmRecordDto parm)
|
public IActionResult UpdateAndonAlarmRecord([FromBody] AndonAlarmRecordDto parm)
|
||||||
{
|
{
|
||||||
var modal = parm.Adapt<AndonAlarmRecord>().ToUpdate(HttpContext);
|
var modal = parm.Adapt<AndonAlarmRecord>().ToUpdate(HttpContext);
|
||||||
if (parm.Area != null && parm.Area.Length > 0)
|
//if (parm.Area != null && parm.Area.Length > 0)
|
||||||
{
|
//{
|
||||||
modal.Area1 = parm.Area.Length > 0 ? parm.Area[0] : string.Empty;
|
// modal.Area1 = parm.Area.Length > 0 ? parm.Area[0] : string.Empty;
|
||||||
modal.Area2 = parm.Area.Length > 1 ? parm.Area[1] : string.Empty;
|
// modal.Area2 = parm.Area.Length > 1 ? parm.Area[1] : string.Empty;
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
modal.Area1 = string.Empty;
|
// modal.Area1 = string.Empty;
|
||||||
modal.Area2 = string.Empty;
|
// modal.Area2 = string.Empty;
|
||||||
}
|
//}
|
||||||
var response = _AndonAlarmRecordService.UpdateAndonAlarmRecord(modal);
|
var response = _AndonAlarmRecordService.UpdateAndonAlarmRecord(modal);
|
||||||
|
|
||||||
return ToResponse(response);
|
return ToResponse(response);
|
||||||
@@ -175,16 +175,16 @@ namespace ZR.Admin.WebApi.Controllers.andon
|
|||||||
public IActionResult CreateAndonAlarmRecord([FromBody] AndonAlarmRecordDto parm)
|
public IActionResult CreateAndonAlarmRecord([FromBody] AndonAlarmRecordDto parm)
|
||||||
{
|
{
|
||||||
var modal = parm.Adapt<AndonAlarmRecord>().ToCreate(HttpContext);
|
var modal = parm.Adapt<AndonAlarmRecord>().ToCreate(HttpContext);
|
||||||
if (parm.Area != null && parm.Area.Length > 0)
|
//if (parm.Area != null && parm.Area.Length > 0)
|
||||||
{
|
//{
|
||||||
modal.Area1 = parm.Area.Length > 0 ? parm.Area[0] : string.Empty;
|
// modal.Area1 = parm.Area.Length > 0 ? parm.Area[0] : string.Empty;
|
||||||
modal.Area2 = parm.Area.Length > 1 ? parm.Area[1] : string.Empty;
|
// modal.Area2 = parm.Area.Length > 1 ? parm.Area[1] : string.Empty;
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
modal.Area1 = string.Empty;
|
// modal.Area1 = string.Empty;
|
||||||
modal.Area2 = string.Empty;
|
// modal.Area2 = string.Empty;
|
||||||
}
|
//}
|
||||||
var response = _AndonAlarmRecordService.CreateAndonAlarmRecord(modal);
|
var response = _AndonAlarmRecordService.CreateAndonAlarmRecord(modal);
|
||||||
|
|
||||||
return SUCCESS(response);
|
return SUCCESS(response);
|
||||||
|
|||||||
Reference in New Issue
Block a user