/// <summary> /// 逻辑层处理报警数据 /// </summary> /// <param name="message"></param> /// <returns></returns> public string HandleLogicAlarmData([FromBody] InterfaceData info) { //Log4NetHelp.Info("业务层接收数据"); BusinessLogicBLL businessLogicBll = new BusinessLogicBLL(); bool bl = businessLogicBll.HandleBusiness(info); //Log4NetHelp.Info("业务层数据处理完成"); if (bl == true) { return(JsonHelper.ObjectToString(RetMsgHelper.RetMsg(1, "已接收数据"))); } else { return(JsonHelper.ObjectToString(RetMsgHelper.RetMsg(0, "报警数据处理失败"))); } }
/// <summary> /// 处理转发层数据 /// </summary> /// <param name="info"></param> /// <returns></returns> public string HandleSystemData([FromBody] InterfaceData info) { //Log4NetHelp.Info("过滤层接收数据"); FilterBLL filterBll = new FilterBLL(); bool bl = filterBll.HandleSystemData(info); // Log4NetHelp.Info("过滤层数据处理完成"); if (bl == true) { return(JsonHelper.ObjectToString(RetMsgHelper.RetMsg(1, "已接收数据"))); } else { return(JsonHelper.ObjectToString(RetMsgHelper.RetMsg(0, "数据处理失败"))); } }
/// <summary> /// 测试接口(心跳接口) /// </summary> /// <returns></returns> public string GetStatus() { return(JsonHelper.ObjectToString(RetMsgHelper.RetMsg(1, DateTime.Now.ToString()))); }