| | |
| | | /// </summary> |
| | | [Route("Gy_BadReason/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere) |
| | | public object list(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_BadReason", 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_IF_BadReasonList where 禁用标记='' " + sWhere, "h_v_IF_BadReasonList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_BadReasonList " + sWhere+ " order by 不良原因代码 ", "h_v_IF_BadReasonList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_IF_BadReasonList where 禁用标记='' "; |
| | | string sql = sql1 + sWhere; |
| | | string sql1 = "select * from h_v_IF_BadReasonList where 1 = 1"; |
| | | string sql = sql1 + sWhere+ " order by 不良原因代码 "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_BadReasonList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |