| | |
| | | #region 工艺路线分页列表 |
| | | [Route("Gy_RoutingBill/page")] |
| | | [HttpGet] |
| | | public json Gy_RoutingBillPage(string sWhere, string user, int page, int size) |
| | | public object Gy_RoutingBillPage(string sWhere, string user, int page, int size) |
| | | { |
| | | DataSet ds; |
| | | json res = new json(); |
| | |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_RoutingBill_Query", 1, false, user)) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "无查看权限!"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | //if (!DBUtility.ClsPub.Security_Log_second("Gy_RoutingBill_Query", 1, false, user)) |
| | | //{ |
| | | // res.code = "0"; |
| | | // res.count = 0; |
| | | // res.Message = "无查看权限!"; |
| | | // res.data = null; |
| | | // return res; |
| | | //} |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Gy_RoutingBillList " + page + "," + size + ",''", "h_p_Gy_RoutingBillList"); |
| | |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "Exception!" + e.ToString(); |
| | | res.data = null; |
| | | return objJsonResult; |
| | | return res; |
| | | } |
| | | } |
| | | #endregion |
| | |
| | | { |
| | | string sql1 = "select * from h_v_Gy_RoutingBillList where 1 = 1 "; |
| | | //客户自定义 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "瑞与祺" || oSystemParameter.omodel.WMS_CampanyName == "凯贝奈特" || oSystemParameter.omodel.WMS_CampanyName == "添康科技") |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "瑞与祺" || oSystemParameter.omodel.WMS_CampanyName == "凯贝奈特" ) |
| | | { |
| | | sql1 = "select top 1000 * from h_v_Gy_RoutingBillList where 1 = 1 "; |
| | | } |
| | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据已经审核,不能删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | string HBillStatus = Convert.ToString(ds.Tables[0].Rows[0]["HBillStatus"]); |
| | | //string hdeleteman = Convert.ToString(ds.Tables[0].Rows[0]["hdeleteman"]); |
| | | if (HBillStatus == "6") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据在审核中,不能删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | //获取系统参数判断工艺路线是否启用多级审批禁用普通审批 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | string sReturn = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn) == true) |
| | | { |
| | | if (oSystemParameter.omodel.Gy_RoutingBill_EnableMultiLevel.ToUpper() == "Y") //系统参数 启用自动审核 |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "工艺路线已启用多级审批普通审核禁用"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | if (string.IsNullOrWhiteSpace(HInterID)) |
| | | { |
| | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "添康科技") //系统参数 |
| | | { |
| | | //刷新默认工艺路线 |
| | | oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID); |
| | | oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID + ",'" + user + "'"); |
| | | } |
| | | } |
| | | |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | string HBillStatus = Convert.ToString(ds.Tables[0].Rows[0]["HBillStatus"]); |
| | | //string hdeleteman = Convert.ToString(ds.Tables[0].Rows[0]["hdeleteman"]); |
| | | if (HBillStatus == "6") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据在审核中,不能关闭!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //关闭单据 |
| | | if (!BillOld.CloseBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | { |
| | |
| | | objJsonResult.Message = "关闭失败!原因:" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //获取系统参数设置失效时间 |
| | | string Ret = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | //判断客户 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "添康科技") //系统参数 |
| | | { |
| | | //刷新失效时间 |
| | | oCN.RunProc("update Gy_RoutingBillMain set HEndDate = CONVERT(date, DATEADD(day, -1, GETDATE())) where HInterID = " + HInterID); |
| | | } |
| | | } |
| | | } |
| | | else |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | string HBillStatus = Convert.ToString(ds.Tables[0].Rows[0]["HBillStatus"]); |
| | | //string hdeleteman = Convert.ToString(ds.Tables[0].Rows[0]["hdeleteman"]); |
| | | if (HBillStatus == "6") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据在审核中,不能反关闭!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //反关闭单据 |
| | | if (!BillOld.CancelClose(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | { |