|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Data;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Web;
|
|
|
using System.Web.Mvc;
|
|
|
using DSWeb.Areas.CommMng.DAL;
|
|
|
using DSWeb.Areas.RptMng.Comm;
|
|
|
using DSWeb.TruckMng.Helper;
|
|
|
using HcUtility.Comm;
|
|
|
using DSWeb.Areas.CommMng.Models;
|
|
|
using Microsoft.Practices.EnterpriseLibrary.Data;
|
|
|
using DSWeb.EntityDA;
|
|
|
using DSWeb.SoftMng.Filter;
|
|
|
|
|
|
namespace DSWeb.Areas.RptMng.Controllers
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 单车统计报表
|
|
|
/// </summary>
|
|
|
[JsonRequestBehavior]
|
|
|
public class MsRptPcStatQryController : Controller
|
|
|
{
|
|
|
//
|
|
|
// GET: /RptMng/MsRptPcStatQry
|
|
|
public ActionResult Index()
|
|
|
{
|
|
|
return View();
|
|
|
}
|
|
|
|
|
|
//
|
|
|
// GET:/RptMng/MsRptPcStatQry/QryData
|
|
|
|
|
|
public ContentResult QryData(int start, int limit, string condition)
|
|
|
{
|
|
|
var dbparams = new List<CustomDbParamter>();
|
|
|
|
|
|
var parampsOrgCode = new CustomDbParamter();
|
|
|
parampsOrgCode.ParameterName = "@PS_ORGCODE";
|
|
|
parampsOrgCode.DbType = DbType.String;
|
|
|
parampsOrgCode.Direction = ParameterDirection.Input;
|
|
|
parampsOrgCode.Value = RptHelper.JsonGetValue(condition, "PS_ORGCODE").ToString();
|
|
|
dbparams.Add(parampsOrgCode);
|
|
|
|
|
|
var parampsExpDateBgn = new CustomDbParamter();
|
|
|
parampsExpDateBgn.ParameterName = "@PS_EXPDATEBGN";
|
|
|
parampsExpDateBgn.DbType = DbType.String;
|
|
|
parampsExpDateBgn.Direction = ParameterDirection.Input;
|
|
|
parampsExpDateBgn.Value = RptHelper.JsonGetValue(condition, "PS_EXPDATEBGN").ToString();
|
|
|
dbparams.Add(parampsExpDateBgn);
|
|
|
|
|
|
var parampsExpDateEnd = new CustomDbParamter();
|
|
|
parampsExpDateEnd.ParameterName = "@PS_EXPDATEEND";
|
|
|
parampsExpDateEnd.DbType = DbType.String;
|
|
|
parampsExpDateEnd.Direction = ParameterDirection.Input;
|
|
|
parampsExpDateEnd.Value = RptHelper.JsonGetValue(condition, "PS_EXPDATEEND").ToString();
|
|
|
dbparams.Add(parampsExpDateEnd);
|
|
|
|
|
|
var parampsReturnDateBgn = new CustomDbParamter();
|
|
|
parampsReturnDateBgn.ParameterName = "@PS_RETURNDATEBGN";
|
|
|
parampsReturnDateBgn.DbType = DbType.String;
|
|
|
parampsReturnDateBgn.Direction = ParameterDirection.Input;
|
|
|
parampsReturnDateBgn.Value = RptHelper.JsonGetValue(condition, "PS_RETURNDATEBEGIN").ToString();
|
|
|
dbparams.Add(parampsReturnDateBgn);
|
|
|
|
|
|
var parampsReturnDateEnd = new CustomDbParamter();
|
|
|
parampsReturnDateEnd.ParameterName = "@PS_RETURNDATEEND";
|
|
|
parampsReturnDateEnd.DbType = DbType.String;
|
|
|
parampsReturnDateEnd.Direction = ParameterDirection.Input;
|
|
|
parampsReturnDateEnd.Value = RptHelper.JsonGetValue(condition, "PS_RETURNDATEEND").ToString();
|
|
|
dbparams.Add(parampsReturnDateEnd);
|
|
|
|
|
|
var paramPS_TRUCKNO = new CustomDbParamter();
|
|
|
paramPS_TRUCKNO.ParameterName = "@PS_TRUCKNO";
|
|
|
paramPS_TRUCKNO.DbType = DbType.String;
|
|
|
paramPS_TRUCKNO.Direction = ParameterDirection.Input;
|
|
|
paramPS_TRUCKNO.Value = RptHelper.JsonGetValue(condition, "PS_TRUCKNO").ToString();
|
|
|
dbparams.Add(paramPS_TRUCKNO);
|
|
|
|
|
|
var dbRptResult = PubSysDAL.GetMsSqlPrcDataSet("sMsRptPcStatQry", dbparams, "Result_Set");
|
|
|
var json = RptHelper.GetRptJsonResult(start, limit, dbRptResult, "Result_Set", false);
|
|
|
return new ContentResult() { Content = json };
|
|
|
}
|
|
|
|
|
|
public ContentResult QryData_Day ( int start, int limit, string condition )
|
|
|
{
|
|
|
var dbparams = new List<CustomDbParamter>();
|
|
|
|
|
|
var parampsOrgCode = new CustomDbParamter();
|
|
|
parampsOrgCode.ParameterName = "@PS_ORGCODE";
|
|
|
parampsOrgCode.DbType = DbType.String;
|
|
|
parampsOrgCode.Direction = ParameterDirection.Input;
|
|
|
parampsOrgCode.Value = RptHelper.JsonGetValue(condition, "PS_ORGCODE").ToString();
|
|
|
dbparams.Add(parampsOrgCode);
|
|
|
|
|
|
var parampsExpDateBgn = new CustomDbParamter();
|
|
|
parampsExpDateBgn.ParameterName = "@PS_EXPDATEBGN";
|
|
|
parampsExpDateBgn.DbType = DbType.String;
|
|
|
parampsExpDateBgn.Direction = ParameterDirection.Input;
|
|
|
parampsExpDateBgn.Value = RptHelper.JsonGetValue(condition, "PS_EXPDATEBGN").ToString();
|
|
|
dbparams.Add(parampsExpDateBgn);
|
|
|
|
|
|
var parampsExpDateEnd = new CustomDbParamter();
|
|
|
parampsExpDateEnd.ParameterName = "@PS_EXPDATEEND";
|
|
|
parampsExpDateEnd.DbType = DbType.String;
|
|
|
parampsExpDateEnd.Direction = ParameterDirection.Input;
|
|
|
parampsExpDateEnd.Value = RptHelper.JsonGetValue(condition, "PS_EXPDATEEND").ToString();
|
|
|
dbparams.Add(parampsExpDateEnd);
|
|
|
|
|
|
var parampsReturnDateBgn = new CustomDbParamter();
|
|
|
parampsReturnDateBgn.ParameterName = "@PS_RETURNDATEBGN";
|
|
|
parampsReturnDateBgn.DbType = DbType.String;
|
|
|
parampsReturnDateBgn.Direction = ParameterDirection.Input;
|
|
|
parampsReturnDateBgn.Value = RptHelper.JsonGetValue(condition, "PS_RETURNDATEBEGIN").ToString();
|
|
|
dbparams.Add(parampsReturnDateBgn);
|
|
|
|
|
|
var parampsReturnDateEnd = new CustomDbParamter();
|
|
|
parampsReturnDateEnd.ParameterName = "@PS_RETURNDATEEND";
|
|
|
parampsReturnDateEnd.DbType = DbType.String;
|
|
|
parampsReturnDateEnd.Direction = ParameterDirection.Input;
|
|
|
parampsReturnDateEnd.Value = RptHelper.JsonGetValue(condition, "PS_RETURNDATEEND").ToString();
|
|
|
dbparams.Add(parampsReturnDateEnd);
|
|
|
|
|
|
var paramPS_TRUCKNO = new CustomDbParamter();
|
|
|
paramPS_TRUCKNO.ParameterName = "@PS_TRUCKNO";
|
|
|
paramPS_TRUCKNO.DbType = DbType.String;
|
|
|
paramPS_TRUCKNO.Direction = ParameterDirection.Input;
|
|
|
paramPS_TRUCKNO.Value = RptHelper.JsonGetValue(condition, "PS_TRUCKNO").ToString();
|
|
|
dbparams.Add(paramPS_TRUCKNO);
|
|
|
|
|
|
var dbRptResult = PubSysDAL.GetMsSqlPrcDataSet("sMsRptPcStatQry_Day", dbparams, "Result_Set");
|
|
|
var json = RptHelper.GetRptJsonResult(start, limit, dbRptResult, "Result_Set", false);
|
|
|
return new ContentResult() { Content = json };
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region 参照部分
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|