// Implementation of abstract method (AbsractWsClient.GetStatus()). /// <summary>Get the job status</summary> /// <param name="jobId">Job identifier to get the status of.</param> /// <returns>A string describing the status</returns> public override string GetStatus(string jobId) { PrintDebugMessage("GetStatus", "Begin", 1); string status = "PENDING"; this.ServiceProxyConnect(); // Ensure we have a service proxy status = SrvProxy.getStatus(jobId); PrintDebugMessage("GetStatus", "status: " + status, 2); PrintDebugMessage("GetStatus", "End", 1); return status; }
// Implementation of abstract method (AbsractWsClient.GetResult()). public override byte[] GetResult(string jobId, string format) { PrintDebugMessage("GetResult", "Begin", 1); PrintDebugMessage("GetResult", "jobId: " + jobId, 1); PrintDebugMessage("GetResult", "format: " + format, 1); byte[] result = null; result = SrvProxy.getResult(jobId, format, null); PrintDebugMessage("GetResult", "End", 1); return(result); }
/// <summary> /// Get detailed information about a named parameter. /// </summary> /// <param name="paramName">Name of the parameter to get the detailed description of. /// A <see cref="System.String"/> /// </param> /// <returns>Object describing the parameter. /// A <see cref="wsParameterDetails"/> /// </returns> public wsParameterDetails GetParamDetail(string paramName) { PrintDebugMessage("GetParamDetail", "Begin", 1); PrintDebugMessage("GetParamDetail", "paramName: " + paramName, 2); ServiceProxyConnect(); wsParameterDetails paramDetail = SrvProxy.getParameterDetails(paramName); PrintDebugMessage("GetParamDetail", "End", 1); return(paramDetail); }
// Implementation of abstract method (AbsractWsClient.ServiceProxyConnect()). protected override void ServiceProxyConnect() { PrintDebugMessage("ServiceProxyConnect", "Begin", 11); if (SrvProxy == null) { SrvProxy = new ClustalConnector.JDispatcherServiceClient(); } PrintDebugMessage("ServiceProxyConnect", "SrvProxy: " + SrvProxy.ToString(), 12); PrintDebugMessage("ServiceProxyConnect", "End", 11); }
/// <summary> /// Get details of the available result types/formats for a completed job. /// </summary> /// <param name="jobId">Job identifier /// A <see cref="System.String"/> /// </param> /// <returns>An array of result type descriptions. /// A <see cref="wsResultType"/> /// </returns> public wsResultType[] GetResultTypes(string jobId) { PrintDebugMessage("GetResultTypes", "Begin", 2); if (jobId == null || jobId.Length < 1) { throw new ClientException("A job identifier is required to get result types for a job."); } wsResultType[] resultTypes = SrvProxy.getResultTypes(jobId); PrintDebugMessage("GetResultTypes", "End", 2); return(resultTypes); }
public SMESJsonResult QueryPackMatInfo(DateTime?plandate) { DateTime dtime = DateTime.Now; if (plandate.Value != null) { dtime = plandate.Value; } DataTable dt = SrvProxy.CreateServices <ICutProduceAncestry>().QueryPackMatInfo(dtime); return(JsonSMES(dt)); }
public SMESJsonResult QueryPackBatchInfo(DateTime?plandate, string team, string product, string stamp, string codeone, int type) { DateTime dtime = DateTime.Now; if (plandate.Value != null) { dtime = plandate.Value; } DataTable dt = SrvProxy.CreateServices <ICutProduceAncestry>().QueryPackBatchInfo(dtime, team, product, stamp, codeone, type); return(JsonSMES(dt)); }
public JsonResult GetEqusOutputList(string code, int EquModelId, string EquModelNm, string StartDate, string EndDate) { paras.Clear(); string[,] rangeList = new string[5, 2]; for (int i = 0; i < 5; i++) { for (int j = 0; j < 2; j++) { rangeList[i, j] = ""; } } DataSet ds = new DataSet(); paras.Add(new SQLParameter { DbType = DbType.Int32, Name = "@EquModelId", Value = EquModelId }); paras.Add(new SQLParameter { DbType = DbType.String, Name = "@StartDate", Value = StartDate }); paras.Add(new SQLParameter { DbType = DbType.String, Name = "@EndDate", Value = EndDate }); SrvProxy.CreateServices <ISqlCommandConfigService>().Query(code, paras, out ds); if (ds != null && ds.Tables.Count > 0) { int rows = ds.Tables[0].Rows.Count; for (int i = 0; i < rows / 2 && i < 5 && i < rows - i - 1; i++) { rangeList[i, 0] = ds.Tables[0].Rows[i]["SHORTNAME"].ToString(); rangeList[i, 1] = ds.Tables[0].Rows[rows - i - 1]["SHORTNAME"].ToString(); } } var data = new { EquModelNm = EquModelNm, StartFirst = rangeList[0, 0], EndFirst = rangeList[0, 1], StartSecond = rangeList[1, 0], EndSecond = rangeList[1, 1], StartThird = rangeList[2, 0], EndThird = rangeList[2, 1], StartFourth = rangeList[3, 0], EndtFourth = rangeList[3, 1], StartFifty = rangeList[4, 0], EndFifty = rangeList[4, 1], }; return(JsonSMES(data)); }
// Implementation of abstract method (AbsractWsClient.ServiceProxyConnect()). protected override void ServiceProxyConnect() { PrintDebugMessage("ServiceProxyConnect", "Begin", 11); if (SrvProxy == null) { SrvProxy = new JDispatcherService(); SetProxyEndPoint(); // Set explicit service endpoint, if defined. SetProxyUserAgent(); // Set user-agent for client. // Enable HTTP response compression (MS .NET 2.0 or Mono 2.4.1 onward). SrvProxy.EnableDecompression = true; } PrintDebugMessage("ServiceProxyConnect", "SrvProxy: " + SrvProxy.ToString(), 12); PrintDebugMessage("ServiceProxyConnect", "End", 11); }
public SMESJsonResult QueryCutBatchInfo(DateTime?plandate, string productkey) { DateTime dtime = DateTime.Now; if (plandate.Value != null) { dtime = plandate.Value; } //DataTable dt = SrvProxy.CreateServices<ICutProduceAncestry>().QueryCutBatchInfo(dtime, productkey); DataTable dt = SrvProxy.CreateServices <ICutProduceAncestry>().QueryCutBatchInfo(dtime, productkey); return(JsonSMES(dt)); }
public SMESJsonResult QueryCutWorkOrder(string id) { DataTable dt = SrvProxy.CreateServices <ICutProduceAncestry>().GetCutWorkOrder(id); if (dt.Rows.Count > 0) { return(JsonSMES(dt.Rows[0])); } else { return(JsonSMES(null)); } }
public JsonResult GetRunningWoSegments(string code, string strDate) { DataSet ds = new DataSet(); SQLParameter dataPara = new SQLParameter(); dataPara.DbType = DbType.String; dataPara.Name = "@QueryDate"; dataPara.Value = strDate; paras.Add(dataPara); SrvProxy.CreateServices <ISqlCommandConfigService>().Query(code, paras, out ds); return(JsonSMES(ds.Tables[0])); }
public SMESJsonResult GetAllProductMonthCutBatchSorce(string woid) { DataTable dt = SrvProxy.CreateServices <ICutProduceAncestry>().GetAllProductMonthCutBatchSorce(woid); if (dt.Rows.Count > 0) { return(JsonSMES(dt.Rows[0])); } else { return(JsonSMES(null)); } }
/// <summary> /// Get detailed information about a named parameter. /// </summary> /// <param name="paramName">Name of the parameter to get the detailed description of. /// A <see cref="System.String"/> /// </param> /// <returns>Object describing the parameter. /// A <see cref="wsParameterDetails"/> /// </returns> public wsParameterDetails GetParamDetail(string paramName) { PrintDebugMessage("GetParamDetail", "Begin", 1); if (paramName == null || paramName.Length < 1) { throw new ClientException("Parameter name is required to fetch parameter details."); } PrintDebugMessage("GetParamDetail", "paramName: " + paramName, 2); ServiceProxyConnect(); wsParameterDetails paramDetail = SrvProxy.getParameterDetails(paramName); PrintDebugMessage("GetParamDetail", "End", 1); return(paramDetail); }
// Implementation of abstract method (AbsractWsClient.GetResult()). public override byte[] GetResult(string jobId, string format) { PrintDebugMessage("GetResult", "Begin", 1); if (jobId == null || jobId.Length < 1) { throw new ClientException("A job identifier is required to get result."); } PrintDebugMessage("GetResult", "jobId: " + jobId, 1); PrintDebugMessage("GetResult", "format: " + format, 1); byte[] result = null; result = SrvProxy.getResult(jobId, format, null); PrintDebugMessage("GetResult", "End", 1); return(result); }
/// <summary>Submit a job to the service</summary> /// <param name="input">Structure describing the input parameters</param> /// <param name="content">Structure containing the input data</param> /// <returns>A string containing the job identifier</returns> public string RunApp(string email, string title, InputParameters input) { PrintDebugMessage("RunApp", "Begin", 1); PrintDebugMessage("RunApp", "email: " + email, 2); PrintDebugMessage("RunApp", "title: " + title, 2); PrintDebugMessage("RunApp", "input:\n" + ObjectValueToString(input), 2); string jobId = null; this.ServiceProxyConnect(); // Ensure we have a service proxy // Submit the job jobId = SrvProxy.run(email, title, input); PrintDebugMessage("RunApp", "jobId: " + jobId, 2); PrintDebugMessage("RunApp", "End", 1); return jobId; }
public JsonResult GetAllBrandExeStd(string code) { DataSet ds = new DataSet(); paras.Clear(); SrvProxy.CreateServices <ISqlCommandConfigService>().Query(code, paras, out ds); if (ds == null || ds.Tables.Count == 0) { return(null); } return(JsonSMES(ds.Tables[0])); }
// Implementation of abstract method (AbsractWsClient.GetStatus()). /// <summary>Get the job status</summary> /// <param name="jobId">Job identifier to get the status of.</param> /// <returns>A string describing the status</returns> public override string GetStatus(string jobId) { PrintDebugMessage("GetStatus", "Begin", 1); if (jobId == null || jobId.Length < 1) { throw new ClientException("A job identifier is required to get job status."); } string status = "PENDING"; this.ServiceProxyConnect(); // Ensure we have a service proxy status = SrvProxy.getStatus(jobId); PrintDebugMessage("GetStatus", "status: " + status, 2); PrintDebugMessage("GetStatus", "End", 1); return(status); }
// public int GetNAlignments(string jobId) { PrintDebugMessage("GetNAlignments", "Begin", 1); PrintDebugMessage("GetNAlignments", "jobId: " + jobId, 1); byte[] result = null; result = SrvProxy.getResult(jobId, "nalignments", null); string s = System.Text.Encoding.UTF8.GetString(result); PrintDebugMessage("GetNAlignments", " ret: " + s, 1); PrintDebugMessage("GetNAlignments", "End", 1); int ret = Int32.Parse(s); return(ret); }
public JsonResult GetDayWoStatics(string code, string strDate) { strDate = Convert.ToDateTime(strDate).ToString("yyyy-MM-dd"); DataSet ds = new DataSet(); paras.Clear(); SQLParameter dataPara = new SQLParameter(); dataPara.DbType = DbType.String; dataPara.Name = "@QueryDate"; dataPara.Value = strDate; paras.Add(dataPara); SrvProxy.CreateServices <ISqlCommandConfigService>().Query(code, paras, out ds); return(JsonSMES(ds.Tables[0])); }
public JsonResult GetBrandExeStdById(string code, int matid) { DataSet ds = new DataSet(); paras.Clear(); paras.Add(new SQLParameter { DbType = DbType.Int32, Name = "@MatId", Value = matid }); SrvProxy.CreateServices <ISqlCommandConfigService>().Query(code, paras, out ds); if (ds == null || ds.Tables.Count == 0) { return(null); } return(JsonSMES(ds.Tables[0])); }
public JsonResult GetEquModelList(string code, string EquTypeNm) { DataSet ds = new DataSet(); paras.Clear(); paras.Add(new SQLParameter { DbType = DbType.String, Name = "@TypeName", Value = EquTypeNm }); SrvProxy.CreateServices <ISqlCommandConfigService>().Query(code, paras, out ds); if (ds == null || ds.Tables.Count == 0) { return(null); } return(JsonSMES(ds.Tables[0])); }
/// <summary> /// 根据sql脚本记录的id查询业务数据 /// </summary> /// <param name="id">脚本记录id</param> /// <param name="paralist">参数列表</param> /// <returns></returns> public SMESJsonResult QueryDatasById(string id, List <SQLParameter> paralist) { DataSet ds = new DataSet(); DataTable dt; SrvProxy.CreateServices <ISqlCommandConfigService>().QueryById(id, paralist, out ds); if (ds == null || ds.Tables.Count == 0) { dt = null; } else { dt = ds.Tables[0]; } return(JsonSMES(dt)); }
public JsonResult GetAreaTemHumData(string code, string BussiDate) { DataSet ds = new DataSet(); paras.Clear(); paras.Add(new SQLParameter { DbType = DbType.String, Name = "@BussinessDate", Value = BussiDate }); SrvProxy.CreateServices <ISqlCommandConfigService>().Query(code, paras, out ds); if (ds == null || ds.Tables.Count == 0) { return(null); } return(JsonSMES(ds.Tables[0])); }
// public byte[] GetResultForAlignment(string jobId, string format, int alignment) { PrintDebugMessage("GetResultForAlignment", "Begin", 1); PrintDebugMessage("GetResultForAlignment", "jobId: " + jobId, 1); PrintDebugMessage("GetResultForAlignment", "format: " + format, 1); byte[] result = null; wsRawOutputParameter[] outparams = new wsRawOutputParameter[1]; outparams[0] = new wsRawOutputParameter(); outparams[0].name = "alignmentno"; outparams[0].value = new string[1]; outparams[0].value[0] = alignment.ToString("G"); PrintDebugMessage("GetResultForAlignment", "alignmentno:" + outparams[0].value[0], 1); result = SrvProxy.getResult(jobId, format, outparams); PrintDebugMessage("GetResultForAlignment", "End", 1); return(result); }
public JsonResult GetPackPeriodOutput(string code, string start, string end) { DataSet ds = new DataSet(); paras.Clear(); paras.Add(new SQLParameter { DbType = DbType.String, Name = "@SARTDT", Value = start }); paras.Add(new SQLParameter { DbType = DbType.String, Name = "@ENDDT", Value = end }); SrvProxy.CreateServices <ISqlCommandConfigService>().Query(code, paras, out ds); if (ds == null || ds.Tables.Count == 0) { return(null); } return(JsonSMES(ds.Tables[0])); }
/// <summary>Submit a job to the service</summary> /// <param name="input">Structure describing the input parameters</param> /// <param name="content">Structure containing the input data</param> /// <returns>A string containing the job identifier</returns> public string RunApp(string email, string title, InputParameters input) { PrintDebugMessage("RunApp", "Begin", 1); if (email == null || email.Length < 1) { throw new ClientException("E-mail address is required to submit a job."); } PrintDebugMessage("RunApp", "email: " + email, 2); PrintDebugMessage("RunApp", "title: " + title, 2); PrintDebugMessage("RunApp", "input: " + input, 2); PrintDebugMessage("RunApp", "input:\n" + ObjectValueToString(input), 2); string jobId = null; this.ServiceProxyConnect(); // Ensure we have a service proxy // Submit the job jobId = SrvProxy.run(email, title, input); PrintDebugMessage("RunApp", "jobId: " + jobId, 2); PrintDebugMessage("RunApp", "End", 1); return(jobId); }
public JsonResult QueryPhysicalInspectInfo(string code, string startdt, string enddt) { DataSet ds = new DataSet(); paras.Clear(); paras.Add(new SQLParameter { DbType = DbType.String, Name = "@Startdt", Value = startdt }); paras.Add(new SQLParameter { DbType = DbType.String, Name = "@Enddt", Value = enddt }); SrvProxy.CreateServices <ISqlCommandConfigService>().Query(code, paras, out ds); if (ds == null || ds.Tables.Count == 0) { return(null); } return(JsonSMES(ds.Tables[0])); }
public JsonResult GetDefectItemList(string code, int ProId, int RankId) { DataSet ds = new DataSet(); paras.Clear(); paras.Add(new SQLParameter { DbType = DbType.Int32, Name = ":SegmentId", Value = ProId }); paras.Add(new SQLParameter { DbType = DbType.Int32, Name = ":RankId", Value = RankId }); SrvProxy.CreateServices <ISqlCommandConfigService>().Query(code, paras, out ds); if (ds == null || ds.Tables.Count == 0) { return(null); } return(JsonSMES(ds.Tables[0])); }
/// <summary> /// 根据sql脚本记录的code码查询业务数据 /// </summary> /// <param name="code">脚本记录code</param> /// <param name="paralist">参数列表</param> /// <returns></returns> public SMESJsonResult QueryDatasByCd(string code, List <SQLParameter> paralist) { try { DataSet ds = new DataSet(); DataTable dt; SrvProxy.CreateServices <ISqlCommandConfigService>().Query(code, paralist, out ds); if (ds == null || ds.Tables.Count == 0) { dt = null; } else { dt = ds.Tables[0]; } return(JsonSMES(dt)); } catch (Exception ex) { throw ex; } }