| | |
| | | try |
| | | { |
| | | //判断是否有查询权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "无权限查询!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无权限查询!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 工艺路线(维护工价) |
| | | /// <summary> |
| | | /// 返回工艺路线列表 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("LEMS/MES_Gy_RoutingBillMainRates_Json")] |
| | | [HttpGet] |
| | | public object MES_Gy_RoutingBillMainRates_Json(string sWhere, string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无权限查询!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList_MainRate order by hmainid desc", "h_v_Gy_RoutingBillList_MainRate"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Gy_RoutingBillList_MainRate where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by hmainid desc,cast(工序号 as int)"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillList_MainRate"); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | return GetObjectJson(ds); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | /// <summary> |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where 1 = 1 " + sWhere + " order by 单据号 desc", "h_v_IF_ICMOBillList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where 1 = 1 " + sWhere + " order by 制单日期 desc,单据号 desc", "h_v_IF_ICMOBillList"); |
| | | } |
| | | catch (Exception e) |
| | | { |