Files
2-BeiqiFutian-MES_Manage/submit/QualityData_SubLineDataQuery.ashx
2026-05-29 13:44:19 +08:00

89 lines
2.9 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<%@ WebHandler Language="C#" Class="QualityData_SubLineDataQuery" %>
using System;
using System.Web;
public class QualityData_SubLineDataQuery : IHttpHandler {
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
string type = HttpContext.Current.Request["type"];
string responseText = "";
switch (type)
{
//工位号查询查询
case "OpnameSelect":
responseText = OpnameSelect();
break;
//物料数据查询
case "dataMateralSelect":
responseText = dataMateralSelect();
break;
//查询物料条码批次
case "BarcodeBatchMaterialsSelect":
responseText = MaterialBatchSelect();
break;
}
context.Response.Write(responseText);
}
/// <summary>
///物料条码批次查询 2014-11-25
/// </summary>
/// <returns></returns>
private string MaterialBatchSelect()
{
System.Data.DataTable dt = null;
string dtStartTime = HttpContext.Current.Request["startdate"];
string dtEndTime = HttpContext.Current.Request["enddate"];
MES_SPC.QualityData_MaterialSelect.GetMaterial_SublineBarcodeBatchMaterials(dtStartTime, dtEndTime, out dt);
string text = JsonHelper.DataTableToJson(dt);
return text;
}
/// <summary>
///工位查询
/// </summary>
/// <returns></returns>
private string OpnameSelect()
{
System.Data.DataTable dt = null;
MES_SPC.CraftMana_step.OpnameSelect(out dt);
string text = JsonHelper.DataTableToJson(dt);
return text;
}
/// <summary>
/// 分线物料数据查询
/// </summary>
/// <returns></returns>
private string dataMateralSelect()
{
System.Data.DataTable dt = null;
string startdate = HttpContext.Current.Request["startdate"];
string enddate = HttpContext.Current.Request["enddate"];
bool checkbox_opname = Convert.ToBoolean(HttpContext.Current.Request["checkbox_opname"]);
string opName = HttpContext.Current.Request["opName"];
bool checkbox_MaterialsBatchBarcode = Convert.ToBoolean(HttpContext.Current.Request["checkbox_BarcodeBatchMaterials"]);
string comboBox_MaterialsBatchBarcode = HttpContext.Current.Request["comboBox_BarcodeBatchMaterials"];
MES_SPC.QualityData_MaterialSelect.SubLineSelect_material(startdate, enddate,checkbox_opname,
opName, checkbox_MaterialsBatchBarcode, comboBox_MaterialsBatchBarcode,out dt);
string text = JsonHelper.CreateJsonParameters(dt, true, 0);//这句话是将json数据对象化并且返回数据总条数
return text;
}
public bool IsReusable {
get {
return false;
}
}
}