季铭对接T+畅捷通,看板API
yl
2023-12-25 72a27b4fd84622ebc51150a07b16d13b7135ebf9
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using VueWebApi.DLL.BLL;
using VueWebApi.Tools;
 
namespace VueWebApi.Controllers
{
    [RoutePrefix(prefix: "api/AppAnalytics")]
    [ControllerGroup("App智能分析", "在线接口")]
    [ChannelActionFilterAttributeApp]
    public class AppAnalyticsController : ApiController
    {
        //定义全局信息返回变量
        ToMessage mes = new ToMessage();
        RedisHelper redis = new RedisHelper();
 
        #region[App生产看板]
        /// <summary>
        /// App生产看板
        /// </summary>
        /// <param name="stu_torgcode">组织编码</param>
        /// <param name="stu_torgtypecode">组织类型</param>
        /// <param name="usercode">登录人员</param>
        /// <param name="Ratetime">时间</param>
        /// <param name="defecttype">缺陷统计类型</param>
        /// <returns></returns>
        [Route(template: "ProductionKanban")]
        [HttpGet]
        public HttpResponseMessage ProductionKanban(string stu_torgcode,string stu_torgtypecode,string usercode, string Ratetime,string defecttype)
        {
            string startopendate = "";  //开始时间
            string endclosedate = "";    //结束时间
            if (Ratetime != "" && Ratetime != null)
            {
                startopendate = Ratetime.Split('~')[0].ToString();
                endclosedate = Ratetime.Split('~')[1].ToString();
            }
            mes = AppAnalyticsBLL.ProductionKanban(stu_torgcode, stu_torgtypecode,usercode, startopendate, endclosedate, defecttype);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[App生产进度看板单据信息]
        /// <summary>
        /// App生产进度看板单据信息
        /// </summary>
        /// <param name="stu_torgcode">组织编码</param>
        /// <param name="stu_torgtypecode">组织类型</param>
        /// <param name="ordertype">单据类型(SO:销售订单、MO:生产订单、PO:生产工单)</param>
        /// <param name="partcode">产品信息(可多个)</param>
        /// <param name="Ratetime">单据日期范围</param>
        /// <returns></returns>
        [Route(template: "ProductionScheduleKanban")]
        [HttpGet]
        public HttpResponseMessage ProductionScheduleKanban(string stu_torgcode, string stu_torgtypecode, string ordertype, string partcode=null, string Ratetime=null)
        {
            string startopendate = "";  //开始时间
            string endclosedate = "";    //结束时间
            if (Ratetime != "" && Ratetime != null)
            {
                startopendate = Ratetime.Split('~')[0].ToString();
                endclosedate = Ratetime.Split('~')[1].ToString();
            }
            mes = AppAnalyticsBLL.ProductionScheduleKanban(stu_torgcode, stu_torgtypecode,ordertype, partcode, startopendate, endclosedate);
            return TJson.toJson(mes);
        }
        #endregion
    }
}