| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <%@ WebHandler Language="C#" Class="SmallKanban" %>
- using System;
- using System.Web;
- using System.Web.SessionState;
- using System.Configuration;
- using System.Data;
- using Curtain.DataAccess;
- using Curtain.Log;
- using DK.XuWei.WebMes;
- using Newtonsoft.Json.Linq;
- using System.Collections.Generic;
- public class SmallKanban : IHttpHandler {
- public void ProcessRequest (HttpContext context) {
- using (IDataAccess conn = DataAccess.Create())
- {
- if (context.Request["m"].ToString() == "s")
- {
- string sqlStr = @"
- SELECT ip.goodscode ,count(ip.barcode) qty FROM Tp_Pm_Inproduction ip
- left join tp_mst_goods g on ip.goodsid = g.goodsid
- left join tp_mst_goodstype gt on g.goodstypeid = gt.goodstypeid
- WHERE ip.procedureid in(10,9,57,67,15,16,81)
- and gt.goodstypecode like '001001%'
- and ip.reworkprocedureid is null
- group by ip.goodscode
- order by count(ip.barcode) desc
- ";
- //直接获取不分页数据
- DataTable dt = conn.ExecuteDatatable(sqlStr);
- context.Response.Write(new JsonResult(dt).ToJson());
- }
- //服务器时间
- if (context.Request["m"].ToString() == "fwq")
- {
- string time = DateTime.Now.ToString("yyyy年MM月dd日 HH:mm ");
- Dictionary<string, string> d = new Dictionary<string, string>();
- JObject json = new JObject(
- new JProperty("success", true),
- new JProperty("sj", time)
- );
- context.Response.Write(json.ToString());
- }
- }
- }
- public bool IsReusable {
- get {
- return false;
- }
- }
- }
|