zhao
2021-07-09 0821715ebc11d3934d0594a1cc2c39686d808906
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
using HH.AutoBom.Core;
using HH.WMS.Entitys.Common;
using HH.WMS.WebUI.Controllers;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
 
namespace HH.WMS.WebUI.Areas.AllQuery.Controllers
{
    public class ReportController : BaseController
    {
        public ActionResult kpi()
        {
            return View();
        }
        public string GetKpiList(int pageIndex, int pageSize, string stockCode, string userName, string startMonth, string endMonth)
        {
            var loginer = FormsAuth.GetUserData<LoginerBase>();
            SearchModel searchModel = new SearchModel()
            {
                TokenId = loginer.Extend1,
                PageIndex = pageIndex,
                PageSize = pageSize,
                SearchCondition = new
                {
                    CN_S_STOCK_CODE = stockCode,
                    CN_S_USER_NAME = userName,
                    CN_T_START = !string.IsNullOrEmpty(startMonth) ? startMonth : "",
                    CN_T_END = !string.IsNullOrEmpty(endMonth) ? endMonth : ""
                }
            };
            return HttpWMS_Post("api/Report/GetKpiList", JsonConvert.SerializeObject(searchModel));
        }
 
        public ActionResult Logistics()
        {
            return View();
        }
 
        public string GetLogisticsReport(int pageIndex, int pageSize, string logisticsFlag, string startTime, string endTime)
        {
            SearchModel searchModel = new SearchModel()
            {
                TokenId = ViewConstants.TokenId,
                PageIndex = pageIndex,
                PageSize = pageSize,
                SearchCondition = new
                {
                    LogisticsFlag = logisticsFlag,
                    StartTime = startTime,
                    EndTime = endTime,
                }
            };
            return HttpWMS_Post("api/Report/GetLogisticsReport", JsonConvert.SerializeObject(searchModel));
        }
 
        public string GetLogisticsDetail(string logisticsFlag, string startTime, string endTime)
        {
            SearchModel searchModel = new SearchModel()
            {
                TokenId = ViewConstants.TokenId,
                SearchCondition = new
                {
                    LogisticsFlag = logisticsFlag,
                    StartTime = startTime,
                    EndTime = endTime,
                }
            };
            return HttpWMS_Post("api/Report/GetLogisticsDetail", JsonConvert.SerializeObject(searchModel));
        }
    }
}