|
|
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.MsRptSaleJieSuanTiChengDAL;
|
|
|
using DSWeb.MvcShipping.Models.MsOpBillProfit;
|
|
|
|
|
|
namespace DSWeb.MvcShipping.Controllers
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 鼎视结算提成报表//需求编号:SR2017072100012
|
|
|
/// </summary>
|
|
|
[JsonRequestBehavior]
|
|
|
public class MsRptSaleJieSuanTiChengController : Controller
|
|
|
{
|
|
|
public ActionResult Index()
|
|
|
{
|
|
|
return View();
|
|
|
}
|
|
|
|
|
|
#region 查询
|
|
|
public ContentResult GetDataList(int start, int limit, string condition, string stlcondition, string dcondition, string INTEREST_FEE, string sort, string printstr, string sortstr, string dcondition2 = "")
|
|
|
|
|
|
{
|
|
|
var dataList = MsRptSaleJieSuanTiChengDAL.GetDataList(condition, stlcondition, dcondition, dcondition2, INTEREST_FEE, 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 GetDataList2(int start, int limit, string condition, string stlcondition, string dcondition, string INTEREST_FEE, string sort, string printstr, string sortstr, string dcondition2 = "")
|
|
|
{
|
|
|
var dataList = MsRptSaleJieSuanTiChengDAL.GetDataList2(condition, stlcondition, dcondition, dcondition2, INTEREST_FEE, 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 };
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region 查询_合计
|
|
|
public ContentResult GetDataListSum(int start, int limit, string condition, string stlcondition, string dcondition, string INTEREST_FEE, string sort, string printstr, string sortstr, string dcondition2 = "")
|
|
|
{
|
|
|
var dataList = MsRptSaleJieSuanTiChengDAL.GetDataListSum(condition, stlcondition, dcondition, dcondition2, INTEREST_FEE, 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 GetDataListSum2(int start, int limit, string condition, string stlcondition, string dcondition, string INTEREST_FEE, string sort, string printstr, string sortstr, string dcondition2 = "")
|
|
|
{
|
|
|
var dataList = MsRptSaleJieSuanTiChengDAL.GetDataListSum2(condition, stlcondition, dcondition, dcondition2, INTEREST_FEE, 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 };
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
#region 打印
|
|
|
public ContentResult GetDataListStr(int start, int limit, string condition, string stlcondition, string dcondition, string INTEREST_FEE, string sort, string printstr, string sortstr, string dcondition2 = "")
|
|
|
{
|
|
|
var dataListStr = MsRptSaleJieSuanTiChengDAL.GetDataListStr(condition, stlcondition, dcondition, dcondition2, INTEREST_FEE, 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 };
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
#region 发放提成
|
|
|
public ContentResult SetFee(string data)
|
|
|
{
|
|
|
|
|
|
var bodyList = JsonConvert.Deserialize<List<MsOpBillProfit>>(data);
|
|
|
|
|
|
DBResult result = MsRptSaleJieSuanTiChengDAL.SetFee(bodyList, Convert.ToString(Session["USERID"]));
|
|
|
|
|
|
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
#region 取消发放
|
|
|
public ContentResult CancelSetFee(string data)
|
|
|
{
|
|
|
|
|
|
var bodyList = JsonConvert.Deserialize<List<MsOpBillProfit>>(data);
|
|
|
|
|
|
DBResult result = MsRptSaleJieSuanTiChengDAL.CancelSetFee(bodyList, Convert.ToString(Session["USERID"]));
|
|
|
|
|
|
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
}
|
|
|
#endregion
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|