|  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         #region 用户设置 | 
 |  |  |         #region 获取用户信息 | 
 |  |  |         [Route("Gy_USERSet_PDA/GetGy_Czygl_Info")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object GetGy_Czygl_Info(string Czybm, string user) | 
 |  |  |         { | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 //查看权限 | 
 |  |  |                 //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) | 
 |  |  |                 //{ | 
 |  |  |                 //    objJsonResult.code = "0"; | 
 |  |  |                 //    objJsonResult.count = 0; | 
 |  |  |                 //    objJsonResult.Message = "无查看权限!"; | 
 |  |  |                 //    objJsonResult.data = null; | 
 |  |  |                 //    return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |  | 
 |  |  |                 string sql = @"select Czybm, Czymc, HWhID, HWhName, HSecManagerID, HSecManager, HKeeperID, HKeeper, HDeptID, HDept, HCloudUserName, HCloudUserPsd from Gy_Czygl where Czybm = '" + Czybm + "'"; | 
 |  |  |                 ds = oCN.RunProcReturn(sql, "Gy_Czygl"); | 
 |  |  |  | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count == 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "未找到相关数据!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |             catch (Exception e) | 
 |  |  |             { | 
 |  |  |                 objJsonResult.code = "0"; | 
 |  |  |                 objJsonResult.count = 0; | 
 |  |  |                 objJsonResult.Message = "Exception!" + e.ToString(); | 
 |  |  |                 objJsonResult.data = null; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |         #region 保存用户信息 | 
 |  |  |         [Route("Gy_USERSet_PDA/SaveGy_Czygl_Info")] | 
 |  |  |         [HttpPost] | 
 |  |  |         public object SaveGy_Czygl_Info([FromBody] JObject sMainSub) | 
 |  |  |         { | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 //获取参数 | 
 |  |  |                 var _value = sMainSub["sMainSub"].ToString(); | 
 |  |  |                 string msg1 = _value.ToString(); | 
 |  |  |                 string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); | 
 |  |  |  | 
 |  |  |                 Int64 HWhID = Int64.Parse(sArray[0].ToString()); | 
 |  |  |                 string HWhName = sArray[1].ToString(); | 
 |  |  |                 Int64 HSecManagerID = Int64.Parse(sArray[2].ToString()); | 
 |  |  |                 string HSecManager = sArray[3].ToString(); | 
 |  |  |                 Int64 HKeeperID = Int64.Parse(sArray[4].ToString()); | 
 |  |  |                 string HKeeper = sArray[5].ToString(); | 
 |  |  |                 Int64 HDeptID = Int64.Parse(sArray[6].ToString()); | 
 |  |  |                 string HDept = sArray[7].ToString(); | 
 |  |  |                 string HCloudUserName = sArray[8].ToString().Trim(); | 
 |  |  |                 string HCloudUserPsd = sArray[9].ToString().Trim(); | 
 |  |  |  | 
 |  |  |                 string Czybm = sArray[10].ToString(); | 
 |  |  |                 string user = sArray[11].ToString();                     //操作用户的用户名 | 
 |  |  |  | 
 |  |  |                 ////判断是否有新增权限 | 
 |  |  |                 //if (!DBUtility.ClsPub.Security_Log("Sc_ICMOBillQualityStatus_Tmp_Edit", 1, false, user)) | 
 |  |  |                 //{ | 
 |  |  |                 //    objJsonResult.code = "0"; | 
 |  |  |                 //    objJsonResult.count = 0; | 
 |  |  |                 //    objJsonResult.Message = "无新增权限!"; | 
 |  |  |                 //    objJsonResult.data = null; | 
 |  |  |                 //    return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |  | 
 |  |  |                 string sql = "update Gy_Czygl set " +  | 
 |  |  |                     "HWhID = " + HWhID +  | 
 |  |  |                     ", HWhName = '" + HWhName + | 
 |  |  |                     "', HSecManagerID = " + HSecManagerID + | 
 |  |  |                     ", HSecManager = '" + HSecManager + | 
 |  |  |                     "', HKeeperID = " + HKeeperID + | 
 |  |  |                     ", HKeeper = '" + HKeeper + | 
 |  |  |                     "', HDeptID = " + HDeptID + | 
 |  |  |                     ", HDept = '" + HDept + | 
 |  |  |                     "', HCloudUserName = '" + HCloudUserName + | 
 |  |  |                     "', HCloudUserPsd = '" + HCloudUserPsd + | 
 |  |  |                     "' where Czybm = '" + Czybm + "'"; | 
 |  |  |  | 
 |  |  |                 oCN.RunProc(sql); | 
 |  |  |  | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = null; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |             catch (Exception e) | 
 |  |  |             { | 
 |  |  |                 objJsonResult.code = "0"; | 
 |  |  |                 objJsonResult.count = 0; | 
 |  |  |                 objJsonResult.Message = "Exception!" + e.ToString(); | 
 |  |  |                 objJsonResult.data = null; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         //撤销缓存列表记录 | 
 |  |  |         [Route("Web/Rescind_Json")] | 
 |  |  | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
 |  |  |                 string sql = "Select a.HItemID ,HNumber 核算方式组代码,HName 核算方式组名称,HDeptID,b.部门名称 部门 from Gy_ClassTimePrjGroup a left join h_v_Gy_Department b on a.HDeptID=b.HItemID"; | 
 |  |  |                 string sql = "Select a.HItemID ,HNumber 核算方式组代码,HName 核算方式组名称,HDeptID,b.部门代码,b.部门名称 部门 from Gy_ClassTimePrjGroup a left join h_v_Gy_Department b on a.HDeptID=b.HItemID"; | 
 |  |  |                 if (sWhere == null || sWhere.Equals("")) | 
 |  |  |                 { | 
 |  |  |                     ds = oCN.RunProcReturn(sql, "Gy_ClassTimePrjGroup"); | 
 |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 获取当前生产资源下已经开工的生产任务单列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         [Route("Web/GetSc_ICMOBillListView3")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object GetSc_ICMOBillListView3(string ICMOBill, int OrganizationID,int HSourceID) | 
 |  |  |         { | 
 |  |  |             if (ICMOBill != "") | 
 |  |  |             { | 
 |  |  |                 sWhere = " where 1=1 and (单据号 like '%" + ICMOBill + "%' or 产品代码 like '%" + ICMOBill + "%' or 产品名称 like '%" + ICMOBill + "%' or 规格型号 like '%" + ICMOBill + "%' )"; | 
 |  |  |             } | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
 |  |  |                 if (sWhere == null || sWhere.Equals("")) | 
 |  |  |                 { | 
 |  |  |                     ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where 1=1 and isnull(审核人,'')<>'' and isnull(关闭人,'')='' and isnull(行关闭人,'')=''  and 状态 = '开工' and HSourceID_b = " + HSourceID + " order by 单据号,hsubid ", "h_v_IF_ICMOBillList"); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     string sql = "select * from h_v_IF_ICMOBillList " + sWhere + " and isnull(审核人,'')<>'' and isnull(关闭人,'')='' and isnull(行关闭人,'')='' " + | 
 |  |  |                         "and 状态 = '开工' and HSourceID_b = " + HSourceID + " order by 单据号,hsubid "; | 
 |  |  |                     ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOBillList"); | 
 |  |  |                 } | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objjson.code = "0"; | 
 |  |  |                     objjson.count = 0; | 
 |  |  |                     objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo; | 
 |  |  |                     objjson.data = null; | 
 |  |  |                     return objjson; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objjson.code = "0"; | 
 |  |  |                     objjson.count = 1; | 
 |  |  |                     objjson.Message = "获取成功!"; | 
 |  |  |                     objjson.data = ds.Tables[0]; | 
 |  |  |                     return objjson; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  |  | 
 |  |  |                 objjson.code = "0"; | 
 |  |  |                 objjson.count = 0; | 
 |  |  |                 objjson.Message = "获取失败" + ex.ToString(); | 
 |  |  |                 objjson.data = null; | 
 |  |  |                 return objjson; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 获取工序流转卡列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 获取抽样方案列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         [Route("Web/GetGy_SampleScheme")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object GetSampleScheme(string SampleScheme, int OrganizationID) | 
 |  |  |         { | 
 |  |  |             if (SampleScheme != "") | 
 |  |  |             { | 
 |  |  |                 sWhere = " and ( 抽样方案代码 like '%" + SampleScheme + "%' or 抽样方案名称 like '%" + SampleScheme + "%' ) "; | 
 |  |  |             } | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 List<object> columnNameList = new List<object>(); | 
 |  |  |  | 
 |  |  |                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
 |  |  |                 string sql = "Select * from h_v_Gy_GetSampleSchemeListView where 1 = 1 " + sWhere + "Order by hmainid "; | 
 |  |  |                 ds = oCN.RunProcReturn(sql, "h_v_Gy_GetSampleSchemeListView"); | 
 |  |  |  | 
 |  |  |                 //添加列名 | 
 |  |  |                 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列对象的列名 | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objjson.code = "0"; | 
 |  |  |                     objjson.count = 0; | 
 |  |  |                     objjson.Message = "获取失败" + ",没有查询到数据"; | 
 |  |  |                     objjson.data = null; | 
 |  |  |                     return objjson; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objjson.code = "1"; | 
 |  |  |                     objjson.count = 1; | 
 |  |  |                     objjson.Message = "获取成功!"; | 
 |  |  |                     objjson.data = ds.Tables[0]; | 
 |  |  |                     objjson.list = columnNameList; | 
 |  |  |                     return objjson; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  |                 objjson.code = "0"; | 
 |  |  |                 objjson.count = 0; | 
 |  |  |                 objjson.Message = "获取失败" + ex.ToString(); | 
 |  |  |                 objjson.data = null; | 
 |  |  |                 return objjson; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 获取检验值列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         [Route("Web/GetGy_InspectValue")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object GetInspectValue(string InspectValue, int OrganizationID) | 
 |  |  |         { | 
 |  |  |             if (InspectValue != "") | 
 |  |  |             { | 
 |  |  |                 sWhere = " and ( 检验值代码 like '%" + InspectValue + "%' or 检验值名称 like '%" + InspectValue + "%' ) "; | 
 |  |  |             } | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 List<object> columnNameList = new List<object>(); | 
 |  |  |  | 
 |  |  |                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
 |  |  |                 string sql = "Select * from h_v_Gy_GetInspectValueList where 1 = 1 " + sWhere + "Order by hmainid "; | 
 |  |  |                 ds = oCN.RunProcReturn(sql, "h_v_Gy_GetInspectValueList"); | 
 |  |  |  | 
 |  |  |                 //添加列名 | 
 |  |  |                 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列对象的列名 | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objjson.code = "0"; | 
 |  |  |                     objjson.count = 0; | 
 |  |  |                     objjson.Message = "获取失败" + ",没有查询到数据"; | 
 |  |  |                     objjson.data = null; | 
 |  |  |                     return objjson; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objjson.code = "1"; | 
 |  |  |                     objjson.count = 1; | 
 |  |  |                     objjson.Message = "获取成功!"; | 
 |  |  |                     objjson.data = ds.Tables[0]; | 
 |  |  |                     objjson.list = columnNameList; | 
 |  |  |                     return objjson; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  |                 objjson.code = "0"; | 
 |  |  |                 objjson.count = 0; | 
 |  |  |                 objjson.Message = "获取失败" + ex.ToString(); | 
 |  |  |                 objjson.data = null; | 
 |  |  |                 return objjson; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 获取检仪器列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         [Route("Web/GetGy_InspectInstruMent")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object GetGy_InspectInstruMent(string InspectInstruMent, int OrganizationID) | 
 |  |  |         { | 
 |  |  |             if (InspectInstruMent != "") | 
 |  |  |             { | 
 |  |  |                 sWhere = " and ( 检验仪器代码 like '%" + InspectInstruMent + "%' or 检验仪器名称 like '%" + InspectInstruMent + "%' ) "; | 
 |  |  |             } | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 List<object> columnNameList = new List<object>(); | 
 |  |  |  | 
 |  |  |                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
 |  |  |                 string sql = "Select * from h_v_Gy_InspectInstruMent where 1 = 1 " + sWhere + "Order by HItemID "; | 
 |  |  |                 ds = oCN.RunProcReturn(sql, "h_v_Gy_InspectInstruMent"); | 
 |  |  |  | 
 |  |  |                 //添加列名 | 
 |  |  |                 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列对象的列名 | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objjson.code = "0"; | 
 |  |  |                     objjson.count = 0; | 
 |  |  |                     objjson.Message = "获取失败" + ",没有查询到数据"; | 
 |  |  |                     objjson.data = null; | 
 |  |  |                     return objjson; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objjson.code = "1"; | 
 |  |  |                     objjson.count = 1; | 
 |  |  |                     objjson.Message = "获取成功!"; | 
 |  |  |                     objjson.data = ds.Tables[0]; | 
 |  |  |                     objjson.list = columnNameList; | 
 |  |  |                     return objjson; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  |                 objjson.code = "0"; | 
 |  |  |                 objjson.count = 0; | 
 |  |  |                 objjson.Message = "获取失败" + ex.ToString(); | 
 |  |  |                 objjson.data = null; | 
 |  |  |                 return objjson; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 根据检验方案主内码获取检验项目 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         [Route("Web/GetCheckItemByCheckProjectID")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object GetCheckItemByCheckProjectID(int CheckProjectID) | 
 |  |  |         public object GetCheckItemByCheckProjectID(int CheckProjectID,int HBatchQty) | 
 |  |  |         { | 
 |  |  |             if (CheckProjectID <= 0) | 
 |  |  |             { | 
 |  |  | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
 |  |  |                 string sql = "select c.HItemID HQCCheckItemID,c.HName 检验项目,b.HQCStd,b.HQCUnit HUnit from Gy_QCCheckProjectMain a left join Gy_QCCheckProjectSub b on a.HInterID = b.HInterID left join Gy_QCCheckItem c on b.HQCCheckItemID = c.HItemID where a.HInterID = " + CheckProjectID; | 
 |  |  |                 ds = oCN.RunProcReturn(sql, "Gy_QCCheckProjectMain"); | 
 |  |  |                 string sql = "exec h_p_Gy_GetQCCheckItemByProject " + CheckProjectID + "," + HBatchQty; | 
 |  |  |                 ds = oCN.RunProcReturn(sql, "h_p_Gy_GetQCCheckItemByProject"); | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objjson.code = "0"; | 
 |  |  | 
 |  |  |             return objJsonResult; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 获取运输公司列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         [Route("Web/GetConveyCompList_Json")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object GetConveyCompList_Json(string ConveyComp) | 
 |  |  |         { | 
 |  |  |             if (ConveyComp != "") | 
 |  |  |             { | 
 |  |  |                 sWhere = sWhere + " and ( HNumber like '%" + ConveyComp + "%' or HName like '%" + ConveyComp + "%' ) "; | 
 |  |  |             } | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
 |  |  |                 if (sWhere == null || sWhere.Equals("")) | 
 |  |  |                 { | 
 |  |  |                     ds = oCN.RunProcReturn("Select HItemID,HNumber ,HName  from Gy_ConveyComp where HStopflag=0 Order by HItemID ", "Gy_ConveyComp"); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     string sql1 = "Select HItemID,HNumber ,HName  from Gy_ConveyComp where HStopflag=0 and HEndFlag=1 "; | 
 |  |  |                     string sql = sql1 + sWhere; | 
 |  |  |                     ds = oCN.RunProcReturn(sql, "Gy_ConveyComp"); | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objjson.code = "0"; | 
 |  |  |                     objjson.count = 0; | 
 |  |  |                     objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo; | 
 |  |  |                     objjson.data = null; | 
 |  |  |                     return objjson; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objjson.code = "0"; | 
 |  |  |                     objjson.count = 1; | 
 |  |  |                     objjson.Message = "获取成功!"; | 
 |  |  |                     objjson.data = ds.Tables[0]; | 
 |  |  |                     return objjson; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  |  | 
 |  |  |                 objjson.code = "0"; | 
 |  |  |                 objjson.count = 0; | 
 |  |  |                 objjson.Message = "获取失败" + ex.ToString(); | 
 |  |  |                 objjson.data = null; | 
 |  |  |                 return objjson; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 获取运输方式列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         [Route("Web/GetConveyTypeList_Json")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object GetConveyTypeList_Json(string ConveyType) | 
 |  |  |         { | 
 |  |  |             if (ConveyType != "") | 
 |  |  |             { | 
 |  |  |                 sWhere = sWhere + " and ( HNumber like '%" + ConveyType + "%' or HName like '%" + ConveyType + "%' ) "; | 
 |  |  |             } | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
 |  |  |                 if (sWhere == null || sWhere.Equals("")) | 
 |  |  |                 { | 
 |  |  |                     ds = oCN.RunProcReturn("Select HItemID,HNumber ,HName  from Gy_ConveyType where HStopflag=0 Order by HItemID ", "Gy_ConveyType"); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     string sql1 = "Select HItemID,HNumber ,HName  from Gy_ConveyType where HStopflag=0 and HEndFlag=1 "; | 
 |  |  |                     string sql = sql1 + sWhere; | 
 |  |  |                     ds = oCN.RunProcReturn(sql, "Gy_ConveyType"); | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objjson.code = "0"; | 
 |  |  |                     objjson.count = 0; | 
 |  |  |                     objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo; | 
 |  |  |                     objjson.data = null; | 
 |  |  |                     return objjson; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objjson.code = "0"; | 
 |  |  |                     objjson.count = 1; | 
 |  |  |                     objjson.Message = "获取成功!"; | 
 |  |  |                     objjson.data = ds.Tables[0]; | 
 |  |  |                     return objjson; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  |  | 
 |  |  |                 objjson.code = "0"; | 
 |  |  |                 objjson.count = 0; | 
 |  |  |                 objjson.Message = "获取失败" + ex.ToString(); | 
 |  |  |                 objjson.data = null; | 
 |  |  |                 return objjson; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | } |