public string GetFixtureInfoByCode(string data)
 {
     try
     {
         string res = string.Empty;
         FixtureControlModel model = db.GetFixtureInfoByCode(data);
         if (model != null)
         {
             res = TDCommom.ObjectExtensions.ToJsonString(model);
         }
         TDCommom.Logs.Info(string.Format("根据夹具条码查询夹具记录:接收信息:{0} \r\n 返回信息:{1} \r\n", data, res));
         return(res);
     }
     catch (Exception ex)
     {
         TDCommom.Logs.Error(string.Format("根据夹具条码查询夹具记录异常:接收数据:{0} \r\n 异常信息:{1}", data, ex.Message));
         return(null);
     }
 }
 public string InsertFixture(string data)
 {
     try
     {
         string res = string.Empty;
         FixtureControlModel model = TDCommom.ObjectExtensions.FromJsonString <FixtureControlModel>(data);
         int i = db.InsertFixture(model);
         res = TDCommom.ObjectExtensions.ToJsonString(new ApiModel()
         {
             ResultCode = i
         });
         TDCommom.Logs.Info(string.Format("夹具管控添加夹具信息:接收信息:{0} \r\n 返回信息:{1} \r\n", data, res));
         return(res);
     }
     catch (Exception ex)
     {
         TDCommom.Logs.Error(string.Format("夹具管控添加夹具信息异常:接收数据:{0} \r\n 异常信息:{1}", data, ex.Message));
         return(null);
     }
 }