示例#1
0
 /// <summary>
 /// 检查云矿机运行结果
 /// </summary>
 /// <param name="modelGet"></param>
 /// <returns></returns>
 public IHttpActionResult CheckCloudMiner(RunCloudMinerModelGet_ modelGet)
 {
     try
     {
         IHttpActionResult iHttpActionResult =
             Json(new ResultDataModel <object> {
             Code = 0, Messages = CloudMinerServer.Single.State
         });
         if (CloudMinerServer.Single.State != "1")
         {
             CloudMinerServer.Single.State = "0";
             if (SystemMaintenanceId != 0)
             {
                 _systemMaintenanceDal.UpdateSystemMaintenance(modelGet.EmployeeId, SystemMaintenanceId);
             }
             SystemMaintenance.Refresh();
         }
         return(iHttpActionResult);
     }
     catch (Exception e)
     {
         LogHelper.error(e.Message);
         return(Json(new ResultDataModel <object> {
             Code = -1, Messages = e.Message
         }));
     }
 }
        public IHttpActionResult UpdateSystemMaintenanceRecord(SystemMaintenanceModelGet_ modelGet)
        {
            int result = _systemMaintenanceDal.UpdateSystemMaintenance(modelGet.EmployeeId, modelGet.Id);

            if (result > 0)
            {
                SystemMaintenance.Refresh();
            }
            return(Json(new ResultDataModel <IList <SystemMaintenanceModelResult_> > {
                Code = result > 0 ? 0 : -1, Messages = result > 0 ? "" : "修改维护记录失败"
            }));
        }