|  |  |  | 
|---|
|  |  |  | #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(); | 
|---|
|  |  |  | 
|---|
|  |  |  | res.count = CountConstant.FAIL; | 
|---|
|  |  |  | res.Message = "Exception!" + e.ToString(); | 
|---|
|  |  |  | res.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | return res; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #endregion | 
|---|
|  |  |  | 
|---|
|  |  |  | if (oSystemParameter.ShowBill(ref Ret)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //判断客户为龙山汽配 | 
|---|
|  |  |  | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配") | 
|---|
|  |  |  | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配" || oSystemParameter.omodel.WMS_CampanyName == "添康科技") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //判断是否有查询工价权限 | 
|---|
|  |  |  | if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_CheckProcPrice", 1, false, UserName)) | 
|---|
|  |  |  | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "单据已经审核,不能删除!"; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | DataSet dss; | 
|---|
|  |  |  | //判断工艺路线是否被引用 | 
|---|
|  |  |  | dss = oCN.RunProcReturn("select COUNT(*) as number from Sc_ProcessExchangeBillMain where HRoutingBillID = " + lngBillKey, "Gy_RoutingBillMain"); | 
|---|
|  |  |  | //判断是否可编辑 | 
|---|
|  |  |  | if (dss.Tables[0].Rows[0]["number"].ToString() != "0") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "此单据已经被引用,不允许删除!"; | 
|---|
|  |  |  | objJsonResult.data = 1; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //if (hdeleteman != "") | 
|---|
|  |  |  | 
|---|
|  |  |  | 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)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //审核工艺路线 | 
|---|
|  |  |  | oCN.RunProc(" Update Gy_RoutingBillMain set HChecker='" + user + "',HCheckDate=getdate(),HBillStatus=2 Where HInterID=" + HInterID.ToString()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ////刷新默认工艺路线 | 
|---|
|  |  |  | //oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //获取系统参数 | 
|---|
|  |  |  | string Ret = ""; | 
|---|
|  |  |  | if (oSystemParameter.ShowBill(ref Ret)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //判断客户 | 
|---|
|  |  |  | if (oSystemParameter.omodel.WMS_CampanyName == "添康科技") //系统参数 | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //刷新默认工艺路线 | 
|---|
|  |  |  | oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ////审核单据 | 
|---|
|  |  |  | //if (!BillOld.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) | 
|---|