|
@@ -17,6 +17,7 @@ using Ropin.Inspection.Model;
|
|
|
using System.Collections.Generic;
|
|
|
using System;
|
|
|
using Newtonsoft.Json;
|
|
|
+using Microsoft.AspNetCore.Identity;
|
|
|
|
|
|
namespace Ropin.Inspection.Api.Controllers.Base
|
|
|
{
|
|
@@ -75,7 +76,7 @@ namespace Ropin.Inspection.Api.Controllers.Base
|
|
|
public async Task<ApiResult> AiAlmSaveMessage()
|
|
|
{
|
|
|
//40124884581189;33379713109829
|
|
|
- var data = await aIHelper.GetAlmDispose("", 1, 100, 40124884581189);
|
|
|
+ var data = await aIHelper.GetAlmDispose("", 1, 100, 40124884581189);
|
|
|
//var data = await aIHelper.GetHistoricAlmrecord("", 7, 10, 33379713109829);
|
|
|
if (data!=null)
|
|
|
{
|
|
@@ -111,16 +112,32 @@ namespace Ropin.Inspection.Api.Controllers.Base
|
|
|
bool bol = await _pushMsgService.PushAlarmMsgAsync(model, model.Subject);
|
|
|
if (bol)
|
|
|
{
|
|
|
- bool result = await aIHelper.UpdateAlmIsDelete(item.Id);
|
|
|
+ DateTime updTime = DateTime.Now;
|
|
|
+ var updData = new
|
|
|
+ {
|
|
|
+ Id = item.Id,
|
|
|
+ ConfrimContent = "环保测试数据,自动确认",
|
|
|
+ Mistake = false,
|
|
|
+ Confirmed = true,
|
|
|
+ ConfirmTime = updTime,
|
|
|
+ ConfirmUserName = "环保同步程序",
|
|
|
+ Closed = true,
|
|
|
+ CloseContent = "环保测试数据,自动关闭",
|
|
|
+ EndTime = updTime,
|
|
|
+ CloseUserName = "环保同步程序"
|
|
|
+ };
|
|
|
+ var dataStr = JsonConvert.SerializeObject(updData);
|
|
|
+ bool result = await aIHelper.UpdateAlm(dataStr);
|
|
|
+ //bool result = await aIHelper.UpdateAlmIsDelete(item.Id);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- TsysMessageSearchModel searchModel = new TsysMessageSearchModel();
|
|
|
- searchModel.IsPagination = true;
|
|
|
- searchModel.C_MsgTypeCode = "MSG_TYPE_024";
|
|
|
- var msgData = await _TsysMessageService.GetConditionAsync(searchModel);
|
|
|
- return new ApiResult<IEnumerable<TsysMessageViewModel>>(msgData, ReturnCode.Success);
|
|
|
+ //TsysMessageSearchModel searchModel = new TsysMessageSearchModel();
|
|
|
+ //searchModel.IsPagination = true;
|
|
|
+ //searchModel.C_MsgTypeCode = "MSG_TYPE_024";
|
|
|
+ //var msgData = await _TsysMessageService.GetConditionAsync(searchModel);
|
|
|
+ return new ApiResult(ReturnCode.Success);
|
|
|
}
|
|
|
}
|
|
|
}
|