You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
102 lines
2.7 KiB
C#
102 lines
2.7 KiB
C#
using System;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Web.Mvc;
|
|
using DSWeb.MvcShipping.Helper;
|
|
using DSWeb.MvcShipping.Comm.Cookie;
|
|
using HcUtility.Comm;
|
|
using HcUtility.Core;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Data;
|
|
using DSWeb.Areas.CommMng.DAL;
|
|
using DSWeb.TruckMng.Helper.Repository;
|
|
using DSWeb.Areas.MvcShipping.DAL.BIReport;
|
|
using DSWeb.MvcShipping.Models.BIReport;
|
|
|
|
using DSWeb.Areas.OA.Models.WorkFlow;
|
|
|
|
using DSWeb.EntityDA;
|
|
using DSWeb.MvcShipping.DAL.MsSysParamSet;
|
|
using Microsoft.Practices.EnterpriseLibrary.Data;
|
|
|
|
using DSWeb.MvcShipping.DAL.MsSysBillNoSet;//编码规则
|
|
|
|
using DSWeb.Areas.SysMng.DAL.SysTask;
|
|
|
|
using DSWeb.MvcShipping.DAL.MsOpSeaiDAL;
|
|
using DSWeb.MvcShipping.Models.MsOpSeai;//海运进口业务
|
|
|
|
using DSWeb.Areas.Import.Models.Comm;//用于生成费用
|
|
using DSWeb.Areas.CommMng.Models;
|
|
using DSWeb.MvcShipping.DAL.MsBaseInfoDAL;//查询OP权限
|
|
using DSWeb.MvcShipping.DAL.MsCodeOpDef;
|
|
using DSWeb.MvcShipping.DAL.MsInfoClient;
|
|
using DSWeb.MvcShipping.DAL.MsOpSeaeDAL;
|
|
using DSWeb.Common.DB;
|
|
using DSWeb.MvcShipping.DAL.MsChFeeDAL;
|
|
|
|
namespace DSWeb.MvcShipping.Controllers
|
|
{
|
|
/// <summary>
|
|
/// BI报告
|
|
/// 需求编号 张工
|
|
/// </summary>
|
|
[JsonRequestBehavior]
|
|
public class BIReportController : Controller
|
|
{
|
|
//
|
|
// GET: /RptMng/MsRptPcHeadQry
|
|
public ActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
//封装的BI报告 1 按客户、所属分部、销售、会计期间 应收应付利润
|
|
public ContentResult GetBI_BILL_1(int start, int limit,string USERID, string condition)
|
|
{
|
|
var _count = 0;
|
|
|
|
//, string GroupFields,string SumFields
|
|
|
|
var GroupFields = "CUSTOMERNAME,SALECOMPANYNAME,SALE,ACCDATE";
|
|
var SumFields = "TTLDR,TTLCR,TTLPROFIT";
|
|
|
|
var list1 = GroupFields.Split(',').ToList();
|
|
var list2 = SumFields.Split(',').ToList();
|
|
|
|
var dataList = BIReportDAL.GetSumList_BILL(start, limit, condition, USERID, out _count, list1, list2, list1[0]);
|
|
|
|
//var list = new List<Dictionary<string, string>>();
|
|
|
|
var list_2 = ModelObjectBill.getDicList(ModelObjectConvert<BIREPORT_BILLmb>.ToModelObjectList(dataList));
|
|
|
|
var json = JsonConvert.Serialize(new
|
|
{
|
|
Success = true,
|
|
Message = "查询成功",
|
|
totalCount = _count,
|
|
data = list_2.ToList()
|
|
|
|
//totalCount = dataList.Count,
|
|
//data = list.ToList()
|
|
|
|
//,fieldlist = fieldlist.ToList()
|
|
});
|
|
return new ContentResult() { Content = json };
|
|
}
|
|
|
|
|
|
#region BI通用报告
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|