Beispiel #1
0
        private void getCount(HttpContext context)
        {
            string capitalaccounttype = context.Request["capitalaccounttype"].ToString();
            string organizationid     = context.Request["organizationid"].ToString();
            string sql  = "";
            string json = "";

            if (!string.IsNullOrEmpty(capitalaccounttype) && capitalaccounttype != "全部")
            {
                sql += " and capitalaccounttype='" + capitalaccounttype + "'";
            }

            if (!string.IsNullOrEmpty(organizationid))
            {
                organizationid = CFunctions.getChildByParentId(organizationid);
                sql           += " and organizationid in(" + organizationid + ")";
            }
            try
            {
                int count = countBll.GetCount(sql);
                json = "{\"IsSuccess\":\"true\",\"Count\":" + count + "}";
            }
            catch
            {
                json = "{\"IsSuccess\":\"false\",\"Count\":0}";
            }

            context.Response.ContentType = "application/json";
            //返回JSON结果
            context.Response.Write(json);
            context.Response.End();
        }
Beispiel #2
0
        private void getPageList(HttpContext context)
        {
            //try
            //{
            //    string strUser = ((FormsIdentity)context.User.Identity).Ticket.UserData;
            //    TBL_USER user = JsonConvert.DeserializeObject<TBL_USER>(strUser);
            //}
            //catch (Exception e)
            //{

            //    throw;
            //}
            string json       = string.Empty;
            string sql        = "  and a.username <>'admin' ";
            int    pcount     = 0;
            int    totalcount = 0;
            // string strUser = ((FormsIdentity)context.User.Identity).Ticket.UserData;
            string username       = context.Request["username"];
            string role           = context.Request["role"];
            string organizationid = context.Request["organizationid"];
            string job            = context.Request["job"];

            if (!string.IsNullOrEmpty(username))
            {
                sql += " and  name like '%" + username + "%' ";
            }

            if (!string.IsNullOrEmpty(role))
            {
                sql += " and  d.roleid='" + role + "' ";
            }

            if (!string.IsNullOrEmpty(organizationid))
            {
                string Organization = CFunctions.getChildByParentId(organizationid);
                sql += " and b.organizationid in(" + Organization + ")";
                // sql += " and  b.organizationid  = '" + organizationid + "' ";
            }

            if (!string.IsNullOrEmpty(job))
            {
                sql += " and  a.job  like '%" + job + "%' ";
            }

            try
            {
                Dictionary <string, object> users = userBLL.GetPageList(sql, sort, page, rows, out pcount, out totalcount);
                json = JsonConvert.SerializeObject(users);
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                json = JsonConvert.SerializeObject("{IsSuccess:'false',Message:'服务器交互失败!'}");
            }

            context.Response.ContentType = "application/json";
            //返回JSON结果
            context.Response.Write(json);
            context.Response.End();
        }
Beispiel #3
0
        private void getContainer(HttpContext context)
        {
            //1.获取参数
            string json           = "";
            string organizationid = context.Request["organizationid"].ToString() == "全部" ? "" : context.Request["organizationid"].ToString();
            //2.t_sql语句
            string sql  = " select SUM(amount) amount,CONVERT(varchar(7),appeardate,120) appeardate from tbl_capitalaccount_flowrecord  where flowrecordtype='入账'  and CONVERT(varchar(4),appeardate,120)='" + DateTime.Now.Year + "'";
            string sql1 = " select SUM(amount) amount,CONVERT(varchar(7),appeardate,120) appeardate from tbl_capitalaccount_flowrecord  where flowrecordtype='出账'  and CONVERT(varchar(4),appeardate,120)='" + DateTime.Now.Year + "'";

            if (!string.IsNullOrEmpty(organizationid))
            {
                string organization = CFunctions.getChildByParentId(organizationid);
                sql  += " and organizationid in(" + organization + ")";
                sql1 += " and organizationid in(" + organizationid + ")";
            }
            sql  += " group by CONVERT(varchar(7),appeardate,120) ORDER BY appeardate";
            sql1 += " group by CONVERT(varchar(7),appeardate,120) ORDER BY appeardate";
            IList <MODEL.Capital.TBL_CAPITALACCOUNT_FLOWRECORD> flowList  = flowBll.GetListByOrgan(sql);
            IList <MODEL.Capital.TBL_CAPITALACCOUNT_FLOWRECORD> flowList1 = flowBll.GetListByOrgan(sql1);
            Dictionary <string, object> obj = new Dictionary <string, object>();

            //int days = DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month);
            // obj.Add("total", days);
            obj.Add("rows", flowList);
            //obj.Add("total1", days);
            obj.Add("rows1", flowList1);
            json = JsonConvert.SerializeObject(obj);
            context.Response.ContentType = "application/json";
            context.Response.Write(json);
            context.ApplicationInstance.CompleteRequest();
        }
Beispiel #4
0
        private void getList(HttpContext context)
        {
            //1.获取前端的参数
            string capitalaccounttype = context.Request["capitalaccounttype"].ToString();
            string organizationid     = context.Request["organizationid"].ToString();
            string sql  = " ";
            string json = "";

            if (!string.IsNullOrEmpty(capitalaccounttype) && capitalaccounttype != "全部")
            {
                sql += " and A.capitalaccounttype='" + capitalaccounttype + "'";
            }
            if (!string.IsNullOrEmpty(organizationid))
            {
                organizationid = CFunctions.getChildByParentId(organizationid);
                sql           += " and A.organizationid in(" + organizationid + ")";
            }
            int count   = 0;
            int tocount = 0;
            Dictionary <string, object> obj = countBll.GetPageListL(sql, sort + " " + order, page, rows, out count, out tocount);

            if (obj != null)
            {
                json = JsonConvert.SerializeObject(obj);
            }
            context.Response.ContentType = "application/json";
            context.Response.Write(json);
            context.ApplicationInstance.CompleteRequest();
        }
Beispiel #5
0
        private void getCount(HttpContext context)
        {
            //1. 获取前端参数
            string flowrecordtype = context.Request["flowrecordtype"].ToString();
            string source         = context.Request["source"].ToString();
            string organization   = "";

            if (context.Request["Oneself"].ToString() == "1")
            {
                string   strUser = ((FormsIdentity)context.User.Identity).Ticket.UserData;
                TBL_USER user    = JsonConvert.DeserializeObject <TBL_USER>(strUser);
                organization = user.organizationid;
            }
            else
            {
                organization = context.Request["Organization"].ToString();
            }

            string appeardate = context.Request["StartTime"].ToString();
            string endDate    = context.Request["EndTime"].ToString();
            string sql        = "";
            string json       = "";

            if (!string.IsNullOrEmpty(flowrecordtype) && flowrecordtype != "全部")
            {
                sql += " and  flowrecordtype='" + flowrecordtype + "'";
            }
            if (!string.IsNullOrEmpty(source) && source != "全部")
            {
                sql += " and  source='" + source + "'";
            }
            if (!string.IsNullOrEmpty(organization) && organization != "全部")
            {
                organization = CFunctions.getChildByParentId(organization);
                sql         += " and organizationid in(" + organization + ")";
            }
            if (!string.IsNullOrEmpty(appeardate))
            {
                sql += " and  Convert(varchar(10),appeardate,120)>='" + Convert.ToDateTime(appeardate) + "'";
            }
            if (!string.IsNullOrEmpty(endDate))
            {
                sql += " and  Convert(varchar(10),appeardate,120)<='" + Convert.ToDateTime(endDate) + "'";
            }
            try
            {
                int count = flowBll.GetCount(sql);
                json = "{\"IsSuccess\":\"true\",\"Count\":" + count + "}";
            }
            catch
            {
                json = "{\"IsSuccess\":\"false\",\"Count\":0}";
            }

            context.Response.ContentType = "application/json";
            //返回JSON结果
            context.Response.Write(json);
            context.Response.End();
        }
Beispiel #6
0
        private void getList(HttpContext context)
        {
            //1. 获取前端参数
            string flowrecordtype = context.Request["flowrecordtype"].ToString();
            string source         = context.Request["source"].ToString();
            string organization   = "";

            if (context.Request["Oneself"].ToString() == "1")
            {
                string   strUser = ((FormsIdentity)context.User.Identity).Ticket.UserData;
                TBL_USER user    = JsonConvert.DeserializeObject <TBL_USER>(strUser);
                organization = user.organizationid;
            }
            else
            {
                organization = context.Request["Organization"].ToString();
            }
            string appeardate = context.Request["StartTime"].ToString();
            string endDate    = context.Request["EndTime"].ToString();
            string json       = "";

            string sql = " select A.flowrecordid,A.organizationid,A.capitalaccountid,A.flowrecordtype,A.amount,convert(varchar(11),A.appeardate,120) appeardate,A.processnumber,A.source,B.organizationname from tbl_capitalaccount_flowrecord A inner join  TBL_ORGANIZATION B ON(A.organizationid=B.organizationid)";

            if (!string.IsNullOrEmpty(flowrecordtype) && flowrecordtype != "全部")
            {
                sql += " and  flowrecordtype='" + flowrecordtype + "'";
            }
            if (!string.IsNullOrEmpty(source) && source != "全部")
            {
                sql += " and  source='" + source + "'";
            }
            if (!string.IsNullOrEmpty(organization) && organization != "全部")
            {
                organization = CFunctions.getChildByParentId(organization);
                sql         += " and A.organizationid in(" + organization + ")";
            }
            if (!string.IsNullOrEmpty(appeardate))
            {
                sql += " and  Convert(varchar(10),A.appeardate,120)>='" + Convert.ToDateTime(appeardate) + "'";
            }
            if (!string.IsNullOrEmpty(endDate))
            {
                sql += " and  Convert(varchar(10),A.appeardate,120)<='" + Convert.ToDateTime(endDate) + "'";
            }
            int count   = 0;
            int tocount = 0;
            IList <MODEL.Capital.TBL_CAPITALACCOUNT_FLOWRECORD> obj = flowBll.GetPageList(sql, sort + " " + order, page, rows, out count, out tocount);

            if (obj.Count > 0)
            {
                json = JsonConvert.SerializeObject(obj);
            }
            context.Response.ContentType = "application/json";
            context.Response.Write(json);
            context.ApplicationInstance.CompleteRequest();
        }
        private void getPageList(HttpContext context)
        {
            string json       = string.Empty;
            string sql        = "  ";
            int    pcount     = 0;
            int    totalcount = 0;
            // string strUser = ((FormsIdentity)context.User.Identity).Ticket.UserData;
            string organizationid = context.Request["organizationid"];
            string processnumber  = context.Request["processnumber"];
            string userid         = context.Request["userid"];
            string submitdate     = context.Request["submitdate"];

            if (!string.IsNullOrEmpty(organizationid))
            {
                string Organization = CFunctions.getChildByParentId(organizationid);
                sql += " and a.organizationid in(" + Organization + ")";
                // sql += " and  a.organizationid = '" + organizationid + "' ";
            }

            if (!string.IsNullOrEmpty(processnumber))
            {
                sql += " and  processnumber='" + processnumber + "' ";
            }

            if (!string.IsNullOrEmpty(userid))
            {
                sql += "and b.userid='" + userid + "'";
            }

            if (!string.IsNullOrEmpty(submitdate))
            {
                sql += " and  submitdate  = '" + submitdate + "' ";
            }

            try
            {
                Dictionary <string, object> ma = maBLL.GetPageList(sql, sort, page, rows, out pcount, out totalcount);
                json = JsonConvert.SerializeObject(ma);
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                json = JsonConvert.SerializeObject("{IsSuccess:'false',Message:'服务器交互失败!'}");
            }

            context.Response.ContentType = "application/json";
            //返回JSON结果
            context.Response.Write(json);
            context.Response.End();
        }
Beispiel #8
0
        private void getList(HttpContext context)
        {
            string json = string.Empty;
            // string sql = "  and a.username <>'admin' ";
            string sql            = "   ";
            string username       = context.Request["username"];
            string role           = context.Request["role"];
            string organizationid = context.Request["organizationid"];
            string job            = context.Request["job"];

            if (!string.IsNullOrEmpty(username))
            {
                sql += " and  name like '%" + username + "%' ";
            }

            if (!string.IsNullOrEmpty(role))
            {
                sql += " and  d.roleid='" + role + "' ";
            }

            if (!string.IsNullOrEmpty(organizationid))
            {
                string Organization = CFunctions.getChildByParentId(organizationid);
                sql += " and b.organizationid in(" + Organization + ")";
                // sql += " and  b.organizationid  = '" + organizationid + "' ";
            }

            if (!string.IsNullOrEmpty(job))
            {
                sql += " and  a.job  like '%" + job + "%' ";
            }
            // string strUser = ((FormsIdentity)context.User.Identity).Ticket.UserData;

            try
            {
                List <TBL_USER> userList = userBLL.GetList(sql).ToList <TBL_USER>();
                json = JsonConvert.SerializeObject(userList);
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                json = JsonConvert.SerializeObject("{IsSuccess:'false',Message:'服务器交互失败!'}");
            }

            context.Response.ContentType = "application/json";
            //返回JSON结果
            context.Response.Write(json);
            context.Response.End();
        }
Beispiel #9
0
        private void getOutPageList(HttpContext context)
        {
            string sql            = " and inorout='出库'  "; //state='已完成' and b.organizationtype='2067DC4D-D0D1-4239-880E-9D7BE2EABE07'
            string json           = "";
            int    pcount         = 0;
            int    totalcount     = 0;
            string organizationid = context.Request["organizationid"];
            string processnumber  = context.Request["processnumber"];
            string inoroutdate    = context.Request["inoroutdate"];

            if (!string.IsNullOrEmpty(organizationid))
            {
                string Organization = CFunctions.getChildByParentId(organizationid);
                sql += " and b.organizationid in(" + Organization + ")";
                // sql += " and b.organizationid = '" + organizationid + "' ";
            }

            if (!string.IsNullOrEmpty(processnumber))
            {
                sql += " and processnumber = '" + processnumber + "'";
            }

            if (!string.IsNullOrEmpty(inoroutdate))
            {
                sql += " and CONVERT(varchar(20),inoroutdate,23) = '" + inoroutdate + "'";
            }

            try
            {
                Dictionary <string, object> irList = Bll.GetInOutPageList(sql, sort, page, rows, out pcount, out totalcount);



                json = JsonConvert.SerializeObject(irList);
                json = JsonConvert.SerializeObject("{IsSuccess:'true',Message:'" + json + "'}");
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                json = JsonConvert.SerializeObject("{IsSuccess:'false',Message:'服务器交互失败!'}");
            }

            context.Response.ContentType = "application/json";
            //返回JSON结果
            context.Response.Write(json);
            context.Response.End();
        }
Beispiel #10
0
        /// <summary>
        /// 获取库存列表
        /// </summary>
        /// <param name="context"></param>
        private void getPageList(HttpContext context)
        {
            int    pcount         = 0;
            int    totalcount     = 0;
            string json           = string.Empty;
            string sql            = " and a.state='未处理'  and   a. organizationid=' " + user.organizationid + "'";
            string organizationid = context.Request["organizationid"];
            string linliaor       = context.Request["linliaor"];
            string begindate      = context.Request["begindate"];
            string enddate        = context.Request["enddate"];

            if (!string.IsNullOrEmpty(organizationid))
            {
                string Organization = CFunctions.getChildByParentId(organizationid);
                sql += " and b.organizationid in(" + Organization + ")";
                // sql += " and b.organizationid = '" + organizationid + "' ";
            }
            if (!string.IsNullOrEmpty(linliaor))
            {
                sql += " and c.name like  '%" + linliaor + "%'";
            }

            if (!string.IsNullOrEmpty(begindate))
            {
                sql += " and CONVERT(varchar(20),b.submitdate,23) >= '" + begindate + "'";
            }

            if (!string.IsNullOrEmpty(enddate))
            {
                sql += " and CONVERT(varchar(20),b.submitdate,23) <= '" + enddate + "'";
            }
            try
            {
                Dictionary <string, object> lists = Bll.GetPageList(sql, sort, page, rows, out pcount, out totalcount);
                json = JsonConvert.SerializeObject(lists);
                json = JsonConvert.SerializeObject("{IsSuccess:'true',Message:'" + json + "'}");
            }
            catch
            {
                json = JsonConvert.SerializeObject("{IsSuccess:'false',Message:'服务器交互失败!'}");
            }

            context.Response.ContentType = "application/json";
            //返回JSON结果
            context.Response.Write(json);
            context.Response.End();
        }
        private void getList(HttpContext context)
        {
            string json = string.Empty;
            // string sql = "  and a.username <>'admin' ";
            string sql            = " and b.userid='" + CFunctions.getUserId(context) + "' ";
            string processnumber  = context.Request["processnumber"];
            string organizationid = context.Request["organizationid"];
            string userid         = context.Request["userid"];
            string submitdate     = context.Request["submitdate"];

            if (!string.IsNullOrEmpty(userid))
            {
                sql += " and b.userid='" + userid + "'";
            }
            if (!string.IsNullOrEmpty(processnumber))
            {
                sql += " and  processnumber='" + processnumber + "' ";
            }

            if (!string.IsNullOrEmpty(organizationid))
            {
                string Organization = CFunctions.getChildByParentId(organizationid);
                sql += " and a.organizationid in(" + Organization + ")";
            }

            if (!string.IsNullOrEmpty(submitdate))
            {
                sql += " and  submitdate  = '" + submitdate + "' ";
            }

            try
            {
                List <TBL_MATERIALAPPLICATION> maList = maBLL.GetList(sql).ToList <TBL_MATERIALAPPLICATION>();
                json = JsonConvert.SerializeObject(maList);
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                json = JsonConvert.SerializeObject("{IsSuccess:'false',Message:'服务器交互失败!'}");
            }

            context.Response.ContentType = "application/json";
            //返回JSON结果
            context.Response.Write(json);
            context.Response.End();
        }
Beispiel #12
0
        /// <summary>
        /// 获取库存总个数
        /// </summary>
        /// <param name="context"></param>
        private void GetCount(HttpContext context)
        {
            string json = string.Empty;
            string sql  = " and a.state='未处理'  and   a. organizationid=' " + user.organizationid + "'";

            string organizationid = context.Request["organizationid"];
            string linliaor       = context.Request["linliaor"];
            string begindate      = context.Request["begindate"];
            string enddate        = context.Request["enddate"];

            if (!string.IsNullOrEmpty(organizationid))
            {
                string Organization = CFunctions.getChildByParentId(organizationid);
                sql += " and b.organizationid in(" + Organization + ")";
                // sql += " and b.organizationid = '" + organizationid + "' ";
            }
            if (!string.IsNullOrEmpty(linliaor))
            {
                sql += " and c.name like  '%" + linliaor + "%'";
            }

            if (!string.IsNullOrEmpty(begindate))
            {
                sql += " and CONVERT(varchar(20),b.submitdate,23) >= '" + begindate + "'";
            }

            if (!string.IsNullOrEmpty(enddate))
            {
                sql += " and CONVERT(varchar(20),b.submitdate,23) <= '" + enddate + "'";
            }
            try
            {
                int count = Bll.GetCount(sql);
                json = "{\"IsSuccess\":\"true\",\"Count\":" + count + "}";
            }
            catch
            {
                //json = JsonConvert.SerializeObject("{IsSuccess:'false',Message:'服务器交互失败!'}");
                json = "{\"IsSuccess\":\"false\",\"Count\":0}";
            }

            context.Response.ContentType = "application/json";
            //返回JSON结果
            context.Response.Write(json);
            context.Response.End();
        }
Beispiel #13
0
        private void getCount(HttpContext context)
        {
            string State        = context.Request["State"].ToString();
            string Organization = context.Request["Organization"].ToString();
            string StartTime    = context.Request["StartTime"].ToString();
            string EndTime      = context.Request["EndTime"].ToString();
            string sql          = " select COUNT(*) from TBL_CAPITALAPPLICANT A left join TBL_ORGANIZATION B ON(A.organizationid=B.organizationid) left join FLOW_TASK t on(A.applicationno=t.TASK_CODE) LEFT JOIN dbo.FLOW_STEP E ON(t.DEFINE_CODE=E.DEFINE_CODE and t.SEQ=E.SEQ) where 1=1 ";
            string json         = "";

            if (!string.IsNullOrEmpty(State) && State != "全部")
            {
                sql += " and status='" + State + "'";
            }
            if (!string.IsNullOrEmpty(Organization) && Organization != "全部")
            {
                Organization = CFunctions.getChildByParentId(Organization);
                sql         += " and A.organizationid in(" + Organization + ")";
            }
            if (!string.IsNullOrEmpty(StartTime))
            {
                DateTime dt = Convert.ToDateTime(StartTime);
                sql += " AND Convert(varchar(10),submitdate,120)>='" + dt + "'";
            }
            if (!string.IsNullOrEmpty(EndTime))
            {
                DateTime dt1 = Convert.ToDateTime(EndTime);
                sql += " AND Convert(varchar(10),submitdate,120)<='" + dt1 + "'";
            }
            try
            {
                int count = cantBll.getCount(sql);
                json = "{\"IsSuccess\":\"true\",\"Count\":" + count + "}";
            }
            catch
            {
                json = "{\"IsSuccess\":\"false\",\"Count\":0}";
            }

            context.Response.ContentType = "application/json";
            //返回JSON结果
            context.Response.Write(json);
            context.Response.End();
        }
Beispiel #14
0
        private void getList(HttpContext context)
        {
            //1.获取前端的参数
            string State        = context.Request["State"].ToString();
            string Organization = context.Request["Organization"].ToString();
            string StartTime    = context.Request["StartTime"].ToString();
            string EndTime      = context.Request["EndTime"].ToString();
            string sql          = "";
            string json         = "";

            if (!string.IsNullOrEmpty(State) && State != "全部")
            {
                sql += " and status='" + State + "'";
            }
            if (!string.IsNullOrEmpty(Organization) && Organization != "全部")
            {
                Organization = CFunctions.getChildByParentId(Organization);
                sql         += " and A.organizationid in(" + Organization + ")";
            }
            if (!string.IsNullOrEmpty(StartTime))
            {
                DateTime dt = Convert.ToDateTime(StartTime);
                sql += " AND Convert(varchar(10),submitdate,120)>='" + dt + "'";
            }
            if (!string.IsNullOrEmpty(EndTime))
            {
                DateTime dt1 = Convert.ToDateTime(EndTime);
                sql += " AND Convert(varchar(10),submitdate,120)<='" + dt1 + "'";
            }
            int count   = 0;
            int tocount = 0;
            Dictionary <string, object> obj = cantBll.GetPageList(sql, sort + " " + order, page, rows, out count, out tocount);

            if (obj.Count > 0)
            {
                json = JsonConvert.SerializeObject(obj);
            }
            context.Response.ContentType = "application/json";
            context.Response.Write(json);
            context.ApplicationInstance.CompleteRequest();
        }
Beispiel #15
0
        private void GetInOutList(HttpContext context)
        {
            string sql              = "  "; //and inorout='入库'  state='已完成' and b.organizationtype='2067DC4D-D0D1-4239-880E-9D7BE2EABE07'
            string json             = "";
            string organizationid   = context.Request["organizationid"];
            string processnumber    = context.Request["processnumber"];
            string begindate        = context.Request["begindate"];
            string enddate          = context.Request["enddate"];
            string inorout          = context.Request["inorout"];
            string state            = context.Request["state"];
            string organizationtype = context.Request["organizationtype"];
            string userId           = context.Request["userId"];

            if (!string.IsNullOrEmpty(organizationid))
            {
                string Organization = CFunctions.getChildByParentId(organizationid);
                sql += " and b.organizationid in(" + Organization + ")";
                // sql += " and b.organizationid = '" + organizationid + "' ";
            }

            if (!string.IsNullOrEmpty(processnumber))
            {
                sql += " and processnumber = '" + processnumber + "'";
            }

            if (!string.IsNullOrEmpty(begindate))
            {
                sql += " and CONVERT(varchar(20),inoroutdate,23) >= '" + begindate + "'";
            }

            if (!string.IsNullOrEmpty(enddate))
            {
                sql += " and CONVERT(varchar(20),inoroutdate,23) <= '" + enddate + "'";
            }

            if (!string.IsNullOrEmpty(inorout))
            {
                sql += " and CONVERT(varchar(20),inoroutdate,23) > = '" + inorout + "'";
            }

            if (!string.IsNullOrEmpty(state))
            {
                sql += " and state = '" + state + "'";
            }

            if (!string.IsNullOrEmpty(organizationtype))
            {
                sql += " and b.organizationtype = '" + organizationtype + "'";
            }
            if (!string.IsNullOrEmpty(userId))
            {
                sql += " and b.organizationid = '" + user.organizationid + "'";
            }
            try
            {
                List <TBL_DEPARTMENT_INOROUTRECORD> lists = Bll.GetInOutList(sql) as List <TBL_DEPARTMENT_INOROUTRECORD>;
                json = JsonConvert.SerializeObject(lists);
            }
            catch
            {
                json = JsonConvert.SerializeObject("{IsSuccess:'false',Message:'服务器交互失败!'}");
            }

            context.Response.ContentType = "application/json";
            //返回JSON结果
            context.Response.Write(json);
            context.Response.End();
        }