using FluentValidation;
using OASystem.Domain.Dtos.System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Globalization;
using OASystem.Domain.ViewModels.Groups;
namespace OASystem.Domain.Dtos.Statistics
{
public class MarketingSalesUserPageFuncDtoBase
{
///
/// 请求端口分类
/// 1 Web 2 Android 3 IOS
///
public int PortType { get; set; } = 1;
///
/// 用户Id
///
public int UserId { get; set; }
///
/// 页面Id
///
public int PageId { get; set; } = 180;
}
public class MarketingSalesUserPageFuncDtoBaseFoalidator : AbstractValidator
{
public MarketingSalesUserPageFuncDtoBaseFoalidator()
{
RuleFor(it => it.PortType).InclusiveBetween(1,3).WithMessage(MsgTips.Port);
RuleFor(it => it.UserId).GreaterThan(1).WithMessage(MsgTips.UserId);
RuleFor(it => it.PageId).GreaterThan(1).WithMessage(MsgTips.PageId);
}
}
///
/// 市场部销售额 Dto
///
public class MarketingSalesDto { }
///
/// 市场部销售额
/// 市场部人员列表
/// Dto
///
public class MarketingSalesInitDataDto : MarketingSalesUserPageFuncDtoBase { }
public class MarketingSalesInitDataDtoFoalidator : AbstractValidator
{
public MarketingSalesInitDataDtoFoalidator()
{
Include(new MarketingSalesUserPageFuncDtoBaseFoalidator());
}
}
///
/// 市场部销售额
/// 年度/季度/月度 报表
///
public class MarketingSalesStatisticsDto : MarketingSalesUserPageFuncDtoBase
{
///
/// 公司Id
///
public int CompanyId { get; set; }
///
/// 接团人Id
///
public int GroupPickupUserId { get; set; }
public string BeginDt { get; set; }
public string EndDt { get; set; }
}
public class MarketingSalesStatisticsDtoFoalidator : AbstractValidator
{
public MarketingSalesStatisticsDtoFoalidator()
{
Include(new MarketingSalesUserPageFuncDtoBaseFoalidator());
RuleFor(it => it.BeginDt)
.Must(dateString => DateTime.TryParse(dateString, out _))
.WithMessage("请输入有效开始的日期");
RuleFor(it => it.EndDt)
.Must(dateString => DateTime.TryParse(dateString, out _))
.WithMessage("请输入有效结束的日期");
}
}
///
/// 市场部销售额
/// 团组列表
///
public class MarketingSalesGroupListDto : MarketingSalesStatisticsDto {
public int PageIndex { get; set; } = 1;
public int PageSize { get; set; } = 10;
public string SearchCriteria { get; set; }
}
///
/// 市场部销售额
/// 客户类型、客户等级 统计
///
public class MarketingSalesGroupStatisticsDto : MarketingSalesStatisticsDto
{
///
/// 图形统计类型
/// 1 客户类型 2 客户等级
///
public int StatisticsType { get; set; } = 1;
}
///
/// 市场部销售额
/// 接单排名
///
public class MarketingSalesOrderRankingDto : MarketingSalesStatisticsDto
{
public int PageIndex { get; set; } = 1;
public int PageSize { get; set; } = 5;
}
public class MarketingSalesVCListDto: MarketingSalesUserPageFuncDtoBase
{
public int PageIndex { get; set; } = 1;
public int PageSize { get; set; } = 10;
public int DiId { get; set; }
public string Search { get; set; }
}
public class MarketingSalesVCOperrateDto : MarketingSalesUserPageFuncDtoBase
{
///
/// opearate 时
/// Id > 0 修改
/// Id < 1 添加
///
public int Id { get; set; }
/// diid
///
public int DiId { get; set; }
///
/// 拜访时间 - 开始
///
public string BeginDt { get; set; }
///
/// 拜访时间 - 结束
///
public string EndDt { get; set; }
///
/// 客户单位
///
public string CustomerUnit { get; set; }
///
/// 客户工作
///
public string CustomerJob { get; set; }
///
/// 客户姓名
///
public string CustomerName { get; set; }
///
/// 客户联系方式
///
public string CustomerContact { get; set; }
///
/// 拜访内容
///
public string Remark { get; set; }
}
public class MarketingSalesVCSaveDto: MarketingSalesUserPageFuncDtoBase
{
public int DiId { get; set; }
public List Items { get; set; }
}
public class MarketingSalesVCDelDto
{
public int UserId { get; set; }
public int Id { get; set; }
}
#region YOY-Dto
public class YOYDto
{
public int Year { get; set; }
}
#endregion
public class StatisticsOPDto
{
public int Year { get; set; }
///
/// 1 年、2 月
///
public int Type { get; set; }
}
public class StatisticsBRCostDto : DtoBase
{
public int Year { get; set; }
public string Search { get; set; }
}
public class StatisticsNowCityOfGroupDto : PortDtoBase
{
/////
///// 当前时间
/////
//public string Now { get; set; }
}
}