public ResultStatus GetActions( Rework rework, Rework_Request request, out Rework_Result result) { return(this.GetActions(rework, (Rework_Parameters)null, request, out result)); }
public ResultStatus ProcessComputation( Rework rework, Rework_Request request, out Rework_Result result) { return(this.ProcessComputation(rework, (Rework_Parameters)null, request, out result)); }
public ResultStatus CreateParametricData( Rework rework, Rework_Request request, out Rework_Result result) { return(this.CreateParametricData(rework, (Rework_Parameters)null, request, out result)); }
public ResultStatus ValidateReworkReason( Rework rework, Rework_Request request, out Rework_Result result) { return(this.ValidateReworkReason(rework, (Rework_Parameters)null, request, out result)); }
public ResultStatus LoadESigDetails( Rework rework, Rework_Request request, out Rework_Result result) { return(this.LoadESigDetails(rework, (Rework_LoadESigDetails_Parameters)null, request, out result)); }
public ResultStatus GetEnvironment( Rework cdo, Rework_Request request, out Rework_Result result) { result = (Rework_Result)null; try { return(((IReworkService)this._Channel).GetEnvironment(this._UserProfile, cdo, request, out result)); } catch (Exception ex) { return(this.OnThrowException(ex)); } }
public ResultStatus AddDataTransaction(Rework cdo) { this.OnBeforeCall(nameof(AddDataTransaction), (DCObject)cdo, (Parameters)null, (Request)null); ResultStatus res; try { res = !this._IsTransactionOpened ? this.GetAddDataTransactionException() : this.AddMethod((Method) new ReworkMethod(cdo, ReworkMethods.AddDataTransaction, (Rework_Parameters)null)); } catch (Exception ex) { res = this.OnThrowException(ex); } if (res.IsSuccess) { Result result; this.OnAfterCall(nameof(AddDataTransaction), res, (DCObject)cdo, (Parameters)null, (Request)null, result); } return(res); }
public ResultStatus ExecuteTransaction( Rework cdo, Rework_Request request, out Rework_Result result) { result = (Rework_Result)null; this.OnBeforeCall(nameof(ExecuteTransaction), (DCObject)cdo, (Parameters)null, (Request)request); ResultStatus res; try { res = !this._IsTransactionOpened ? ((IReworkService)this._Channel).ExecuteTransaction(this._UserProfile, cdo, request, out result) : this.AddMethod((Method) new ReworkMethod(cdo, ReworkMethods.ExecuteTransaction, (Rework_Parameters)null)); } catch (Exception ex) { res = this.OnThrowException(ex); } if (res.IsSuccess) { this.OnAfterCall(nameof(ExecuteTransaction), res, (DCObject)cdo, (Parameters)null, (Request)request, (Result)result); } return(res); }
public ResultStatus GetActions( Rework rework, Rework_Parameters parameters, Rework_Request request, out Rework_Result result) { result = (Rework_Result)null; this.OnBeforeCall(nameof(GetActions), (DCObject)rework, (Parameters)parameters, (Request)request); ResultStatus res; try { res = !this._IsTransactionOpened ? ((IReworkService)this._Channel).GetActions(this._UserProfile, rework, parameters, request, out result) : this.AddMethod((Method) new ReworkMethod(rework, ReworkMethods.GetActions, parameters)); } catch (Exception ex) { res = this.OnThrowException(ex); } if (res.IsSuccess) { this.OnAfterCall(nameof(GetActions), res, (DCObject)rework, (Parameters)parameters, (Request)request, (Result)result); } return(res); }
public ResultStatus GetActions(Rework rework) { return(this.GetActions(rework, (Rework_Parameters)null, (Rework_Request)null, out Rework_Result _)); }
public ResultStatus ExecuteTransaction(Rework cdo) { return(this.ExecuteTransaction(cdo, (Rework_Request)null, out Rework_Result _)); }
public ResultStatus LoadESigDetails(Rework rework) { return(this.LoadESigDetails(rework, (Rework_LoadESigDetails_Parameters)null, (Rework_Request)null, out Rework_Result _)); }
public ResultStatus CreateParametricData(Rework rework) { return(this.CreateParametricData(rework, (Rework_Parameters)null, (Rework_Request)null, out Rework_Result _)); }
public ResultStatus ValidateReworkReason(Rework rework) { return(this.ValidateReworkReason(rework, (Rework_Parameters)null, (Rework_Request)null, out Rework_Result _)); }
public ResultStatus ProcessComputation(Rework rework) { return(this.ProcessComputation(rework, (Rework_Parameters)null, (Rework_Request)null, out Rework_Result _)); }
public ReworkMethod(Rework Cdo, ReworkMethods Method, Rework_Parameters Parameters) { this.Cdo = Cdo; this.ServiceMethod = Method; this.Parameters = Parameters; }
/// <summary> /// 工序调整(返工) /// </summary> /// <param name="context"></param> void ProcessAdjustion(HttpContext context) { string _service = "ProcessHandler/OperationAdjustion"; Result rs = new Result(); ResultHelper rh = new ResultHelper(); DbHelper db = new DbHelper(); Log log = new Log(); string strUserName = HttpContext.Current.Request["user_name"]; string strSubOrders = HttpContext.Current.Request["sub_orders"]; string strReworkNote = HttpContext.Current.Request["rwk_note"]; string strReceiver = HttpContext.Current.Request["receiver"]; string strReworkUser = HttpContext.Current.Request["rwk_user"]; string strIssProcess = HttpContext.Current.Request["issue_process"]; string strToProcess = HttpContext.Current.Request["to_process"]; string strReasonCate = HttpContext.Current.Request["reason_cate"]; var json = HttpContext.Current.Request["json"]; var jsetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; Rework rework = (Rework)JsonConvert.DeserializeObject <Rework>(json, jsetting);//反序列化 string sql_insert_rework = @"insert into hrework (wo_number, from_process, to_process, issue_process, receiver, rwk_user, reason_cate, reason_sub_cate, branch_type, rwk_note, creation_date, created_by) values( '#wo_number', (select cur_process from horder where sub_order='#wo_number'), '{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', getdate(), '{8}');" ; sql_insert_rework = string.Format(sql_insert_rework, rework.to_process, rework.issue_process, rework.receiver, rework.rwk_user, rework.reason_cate, rework.reason_sub_cate, rework.branch_type, rework.rwk_note, strUserName); sql_insert_rework = sql_insert_rework.Replace("#wo_number", "{0}"); //string sql_update_order = @"updade horder // set next_process=(select cur_process from horder where sub_order='{0}') // where sub_order='{0}';"; string sql_update_order = @"update horder set cur_process='',next_process=(select process_name from hprocess where process_id={0}), status='WAIT' where sub_order='{1}';"; string sql_insert_prdroute = @"insert into hprdroute (wo_number, process_id, process_name, sequence, creation_date, created_by) select '{0}', process_id, process_name, (select sequence + 0.1 from dbo.hprdroute where wo_number = '{0}' and process_name = (select case cur_process when null then next_process when '' then next_process else cur_process end from horder where sub_order = '{0}')), Getdate(), 'ProcessHandler/ProcessAdjustion' from hprocess where process_id = '{1}';"; //而然要求按需作业(条码采集、检验等),暂时注释代码 //string sql_insert_task = @"insert into htasks // (wo_number // ,parts_no // ,process_name // ,process_step // ,task_type // ,task // ,perform_type // ,creation_date // ,created_by) // select // {0}, // '-1', // '{1}', // '', // 'NOTE', // '{2}', // 'MANUAL', // getdate(), // 'ProcessHandler/OperationAdjustion' // from htasks where wo_number='{0}' and process_name in ( // select process_name from hprdroute where wo_number='{0}' and sequence>=( // select sequence from hprdroute where wo_number='{0}' and process_name='{1}') // );"; StringReader sr = new StringReader(strSubOrders); string strSubOrder = string.Empty; string sql_insert_rework_t = string.Empty; string sql_update_order_t = string.Empty; string sql_insert_task_t = string.Empty; string sql_insert_prdroute_t = string.Empty; while ((strSubOrder = sr.ReadLine()) != null) { //查看目标工序是否在订单的工艺路线中 DataTable dt = db.ExecuteDataTable("select 1 from hprdroute where wo_number='" + strSubOrder + "' and process_id=" + rework.to_process + ";"); if (dt.Rows.Count == 0) { sql_insert_prdroute_t += string.Format(sql_insert_prdroute, strSubOrder, rework.to_process); db.ExecuteNonQuery(sql_insert_prdroute_t); } sql_insert_rework_t += string.Format(sql_insert_rework, strSubOrder) + "\r\n"; sql_update_order_t += string.Format(sql_update_order, rework.to_process, strSubOrder) + "\r\n"; //sql_insert_task_t += string.Format(sql_insert_task, strSubOrder, rework.to_process, strReworkNote); } //if (db.ExecuteNonQuery(sql_insert_prdroute_t) == -1) { // rs.status = 0; // rs.msg = rh.GenMsg(_service, rs.msg, sql_insert_rework_t); // rs.item = rh.GenItem(strSubOrder); // //rh.Response(context, rs); //} else if (db.ExecuteNonQuery(sql_update_order_t) == -1) { rs.status = 0; rs.msg = rh.GenMsg(_service, rs.msg, sql_update_order_t); rs.item = rh.GenItem(strSubOrder); //rh.Response(context, rs); } else if (db.ExecuteNonQuery(sql_insert_rework_t) == -1) { rs.status = 0; rs.msg = rh.GenMsg(_service, rs.msg, sql_insert_task_t); rs.item = rh.GenItem(strSubOrder); //rh.Response(context, rs); } else { rs.status = 1; rs.msg = ""; rh.Response(context, rs); } string strJson = JsonConvert.SerializeObject(rs); strJson = JsonConvert.SerializeObject(rs); context.Response.Clear(); context.Response.ContentEncoding = Encoding.UTF8; context.Response.ContentType = "application/json"; context.Response.Write(strJson); context.Response.Flush(); context.Response.End(); }
public ResultStatus Load(Rework rework) { return(this.Load(rework, (Rework_Parameters)null, (Rework_Request)null, out Rework_Result _)); }