|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Data;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Web;
|
|
|
using System.Web.Mvc;
|
|
|
using DSWeb.MvcShipping.Helper;
|
|
|
using DSWeb.MvcShipping.Comm.Cookie;
|
|
|
using DSWeb.Areas.CommMng.DAL;
|
|
|
using DSWeb.Areas.RptMng.Comm;
|
|
|
using HcUtility.Comm;
|
|
|
using HcUtility.Core;
|
|
|
using Microsoft.Practices.EnterpriseLibrary.Data;
|
|
|
using DSWeb.EntityDA;
|
|
|
using DSWeb.Areas.CommMng.Models;
|
|
|
using DSWeb.MvcShipping.DAL.MsRptSaleBalProfitShareDAL;
|
|
|
using DSWeb.MvcShipping.Models.MsOpBillProfit;
|
|
|
|
|
|
namespace DSWeb.MvcShipping.Controllers
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 利润报表查询
|
|
|
/// </summary>
|
|
|
[JsonRequestBehavior]
|
|
|
public class MsRptSaleBalProfitShareController : Controller
|
|
|
{
|
|
|
//
|
|
|
// GET: /MvcShipping/MsRptOpProfit
|
|
|
public ActionResult Index()
|
|
|
{
|
|
|
return View();
|
|
|
}
|
|
|
public ActionResult PlanIndex()
|
|
|
{
|
|
|
return View();
|
|
|
}
|
|
|
|
|
|
//
|
|
|
// GET:/RptMng/MsRptPcHeadQry/QryData
|
|
|
|
|
|
public ContentResult BsListData(int start, int limit, string condition, string stlcondition, bool isdrzero, string dcondition,bool isallstl,string sort, string printstr, string sortstr, string dcondition2="")
|
|
|
|
|
|
{
|
|
|
var dataList = MsRptSaleBalProfitShareDAL.GetDataList(condition, stlcondition, dcondition, dcondition2,isdrzero,isallstl, Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), sort);
|
|
|
var list = dataList.Skip(start).Take(limit);
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = list.ToList() });
|
|
|
return new ContentResult() { Content = json };
|
|
|
}
|
|
|
|
|
|
public ContentResult GetDataListStr(int start, int limit, string condition, string stlcondition, bool isdrzero, string dcondition, bool isallstl, string sort, string printstr, string sortstr, string dcondition2 = "")
|
|
|
{
|
|
|
var dataListStr = MsRptSaleBalProfitShareDAL.GetDataListStr(condition, stlcondition, dcondition, dcondition2, isdrzero,isallstl,Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), sort);
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = dataListStr });
|
|
|
return new ContentResult() { Content = json };
|
|
|
}
|
|
|
|
|
|
public ContentResult SetFee(string data)
|
|
|
{
|
|
|
|
|
|
var bodyList = JsonConvert.Deserialize<List<MsOpBillProfit>>(data);
|
|
|
|
|
|
DBResult result = MsRptSaleBalProfitShareDAL.SetFee(bodyList, Convert.ToString(Session["USERID"]));
|
|
|
|
|
|
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
}
|
|
|
|
|
|
public ContentResult CancelSetFee(string data)
|
|
|
{
|
|
|
|
|
|
var bodyList = JsonConvert.Deserialize<List<MsOpBillProfit>>(data);
|
|
|
|
|
|
DBResult result = MsRptSaleBalProfitShareDAL.CancelSetFee(bodyList, Convert.ToString(Session["USERID"]));
|
|
|
|
|
|
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
}
|
|
|
|
|
|
|
|
|
//public ContentResult SumListData(int start, int limit, string condition, string stlcondition, bool isdrzero, string sort, string printstr)
|
|
|
//{
|
|
|
// var dataList = MsRptSaleBalProfitShareDAL.GetDataList(condition, isdrzero,Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), sort);
|
|
|
// var list = dataList.Skip(start).Take(limit);
|
|
|
// var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = list.ToList() });
|
|
|
// return new ContentResult() { Content = json };
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 参照部分
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|