| | |
| | | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | /// <summary> |
| | | /// 返回进站扫描列表|工序进站接收单列表 |
| | | ///参数:string sql。 |
| | |
| | | objJsonResult.Message = "无查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //获取系统参数 |
| | | string Ret = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | //判断客户为龙山汽配 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配") |
| | | { |
| | | //获取需要拼接的字符串 |
| | | string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "工序派工单列表"); |
| | | |
| | | sWhere += sql_splice; |
| | | } |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | //获取系统参数 |
| | | string Ret = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | //判断客户为龙山汽配 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配") |
| | | { |
| | | //获取需要拼接的字符串 |
| | | string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "工序派工单明细列表"); |
| | | |
| | | sWhere += sql_splice; |
| | | } |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeIssueBillQuery where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeIssueBillQuery"); |
| | | objJsonResult.code = "1"; |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //获取系统参数 |
| | | string Ret = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | //判断客户为龙山汽配 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配") |
| | | { |
| | | //获取需要拼接的字符串 |
| | | string sql_splice = DBUtility.ClsPub.SpliceSQL(user,"工艺路线列表"); |
| | | |
| | | sWhere += sql_splice; |
| | | } |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select top 1000 * from h_v_Gy_RoutingBillList order by hmainid desc", "h_v_Gy_RoutingBillList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where 1 = 1" + sWhere + " order by hmainid desc", "h_v_Gy_RoutingBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select top 1000 * from h_v_Gy_RoutingBillList where 1 = 1 "; |
| | | string sql1 = "select * from h_v_Gy_RoutingBillList where 1 = 1 "; |
| | | //客户自定义 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "瑞与祺") |
| | | { |
| | | sql1 = "select top 1000 * from h_v_Gy_RoutingBillList where 1 = 1 "; |
| | | } |
| | | string sql = sql1 + sWhere + " order by hmainid desc,cast(工序号 as int)"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillList"); |
| | | } |
| | |
| | | return GetObjectJson(ds); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 查看工艺路线列表工价权限 |
| | | /// <summary> |
| | | /// 判断有无查看工价权限 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Web/CheckProcPrice")] |
| | | [HttpGet] |
| | | public object CheckProcPrice(string UserName) |
| | | { |
| | | try |
| | | { |
| | | //获取系统参数 |
| | | string Ret = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | //判断客户为龙山汽配 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配") |
| | | { |
| | | //判断是否有查询工价权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_CheckProcPrice", 1, false, UserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看工价权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "查看成功!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "异常!" + e.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 修改工艺路线工价权限 |
| | | /// <summary> |
| | | /// 判断有无修改工价权限 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Web/EditProcPrice")] |
| | | [HttpGet] |
| | | public object EditProcPrice(string UserName) |
| | | { |
| | | try |
| | | { |
| | | //获取系统参数 |
| | | string Ret = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | //判断客户为龙山汽配 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配") |
| | | { |
| | | //判断是否有查询工价权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_EditProcPrice", 1, false, UserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无修改工价权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "修改成功!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "异常!" + e.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 工艺路线 删除 |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //获取系统参数 |
| | | string Ret = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | //判断客户为龙山汽配 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配") |
| | | { |
| | | //获取需要拼接的字符串 |
| | | string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "生产订单列表"); |
| | | |
| | | sWhere += sql_splice; |
| | | } |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where 1 = 1 " + sWhere + " order by 制单日期 desc,单据号 desc", "h_v_IF_ICMOBillList"); |
| | | } |
| | | catch (Exception e) |