|  |  | 
 |  |  |  | 
 |  |  |                     oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); | 
 |  |  |                     oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); | 
 |  |  |                     oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); | 
 |  |  |                     oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now); | 
 |  |  |  | 
 |  |  |                     if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") | 
 |  |  |                     { | 
 |  |  | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         | 
 |  |  |         #region 设备开机单列表PDA 查询        | 
 |  |  |         [Route("Sb_EquipBeginBill/Sb_EquipBeginBillList_PDA")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object Sb_EquipBeginBillList_PDA(string sWhere, string user) | 
 |  |  |         { | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 List<object> columnNameList = new List<object>(); | 
 |  |  |  | 
 |  |  |                 //查看权限 | 
 |  |  |                 if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipBeginBillMain_Check", 1, false, user)) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "查询失败!无权限!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |                 if (sWhere == null || sWhere.Equals("")) | 
 |  |  |                 { | 
 |  |  |                     ds = oCN.RunProcReturn("select * from h_v_Sb_EquipBeginBillList_PDA order by 单据号 desc", "h_v_Sb_EquipBeginBillList_PDA"); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     string sql1 = "select * from  h_v_Sb_EquipBeginBillList_PDA  where 1 = 1 "; | 
 |  |  |                     string sql = sql1 + sWhere + " order by 单据号 desc"; | 
 |  |  |                     ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipBeginBillList_PDA"); | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 //添加列名 | 
 |  |  |                 foreach (DataColumn col in ds.Tables[0].Columns) | 
 |  |  |                 { | 
 |  |  |                     Type dataType = col.DataType; | 
 |  |  |                     string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; | 
 |  |  |                     columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 objJsonResult.list = columnNameList; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |             catch (Exception e) | 
 |  |  |             { | 
 |  |  |                 objJsonResult.code = "0"; | 
 |  |  |                 objJsonResult.count = 0; | 
 |  |  |                 objJsonResult.Message = "Exception!" + e.ToString(); | 
 |  |  |                 objJsonResult.data = null; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |     } | 
 |  |  | } |