更新报警记录
This commit is contained in:
parent
c4a9c0ea3d
commit
d0c2714607
@ -80,16 +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;
|
||||
}
|
||||
//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);
|
||||
@ -175,16 +175,16 @@ namespace ZR.Admin.WebApi.Controllers.andon
|
||||
public IActionResult CreateAndonAlarmRecord([FromBody] AndonAlarmRecordDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<AndonAlarmRecord>().ToCreate(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;
|
||||
}
|
||||
//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.CreateAndonAlarmRecord(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user