|
|
|
|
|
|
25
|
_sys_departmentRepository = sys_departmentRepository;
|
25
|
_sys_departmentRepository = sys_departmentRepository;
|
|
26
|
_sys_useraccountRepository = sys_useraccountRepository;
|
26
|
_sys_useraccountRepository = sys_useraccountRepository;
|
|
27
|
}
|
27
|
}
|
|
|
|
28
|
+ /// <summary>
|
|
|
|
29
|
+ /// 实时销售行为分析
|
|
|
|
30
|
+ /// </summary>
|
|
|
|
31
|
+ /// <param name="time"></param>
|
|
|
|
32
|
+ /// <returns></returns>
|
|
28
|
[HttpGet("realtimesales")]
|
33
|
[HttpGet("realtimesales")]
|
|
29
|
public async Task<IActionResult> Realtimesales(string time)
|
34
|
public async Task<IActionResult> Realtimesales(string time)
|
|
30
|
{
|
35
|
{
|
|
31
|
if (string.IsNullOrEmpty(time))
|
36
|
if (string.IsNullOrEmpty(time))
|
|
32
|
time = DateTime.Now.ToString("yyyy-MM-dd");
|
37
|
time = DateTime.Now.ToString("yyyy-MM-dd");
|
|
33
|
- int newcustomer = _cus_vip_infoRepository.GetListALL(x => x.F_CreateOn >= DateTime.Parse(time + "00:00:00")).Result!=null ? _cus_vip_infoRepository.GetListALL(x => x.F_CreateOn >= DateTime.Parse(time + "00:00:00")).Result.Count:0;//新增客户
|
|
|
|
34
|
- int oldcustomer = _cus_vip_infoRepository.GetListALL(x => x.F_CreateOn >= DateTime.Parse(time + "00:00:00").AddDays (-1)).Result != null ? _cus_vip_infoRepository.GetListALL(x => x.F_CreateOn >= DateTime.Parse(time + "00:00:00").AddDays(-1)).Result.Count : 0;//昨日新增客户
|
|
|
|
|
|
38
|
+ var customer = _cus_vip_infoRepository.GetListALL(x => x.F_CreateOn >= DateTime.Parse(time + "00:00:00").AddDays (-1) && x.F_CreateOn <= DateTime.Parse(time + "23:59:59")).Result;
|
|
|
|
39
|
+ int newcustomer = customer .Select (x=>x.F_CreateOn >= DateTime.Parse(time + "00:00:00")&& x.F_CreateOn <= DateTime.Parse(time + "23:59:59")) != null ? customer .Select(x => x.F_CreateOn >= DateTime.Parse(time + "00:00:00") && x.F_CreateOn <= DateTime.Parse(time + "23:59:59")).Count ():0;//新增客户
|
|
|
|
40
|
+ int oldcustomer = customer.Select(x => x.F_CreateOn >= DateTime.Parse(time + "00:00:00").AddDays (-1) && x.F_CreateOn <= DateTime.Parse(time + "23:59:59").AddDays(-1)) != null ? customer.Select(x => x.F_CreateOn >= DateTime.Parse(time + "00:00:00").AddDays(-1) && x.F_CreateOn <= DateTime.Parse(time + "23:59:59").AddDays(-1)).Count() : 0;//昨日新增客户
|
|
|
|
41
|
+ int newaftersale = 0;//售后订单量
|
|
|
|
42
|
+ int oldaftersale = 0;//昨日订单量
|
|
|
|
43
|
+ int customerorder = 0;
|
|
35
|
|
44
|
|
|
36
|
|
45
|
|
|
37
|
return null;
|
46
|
return null;
|