kazelee
2025-05-20 ef839d119eec2c28fac5f5ba175d71f926afae44
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
using System.Linq;
using HH.WCS.Mobox3.AnGang.ServiceCore;
using HH.WCS.Mobox3.AnGang.Devices;
using HH.WCS.Mobox3.AnGang.Dispatch;
using HH.WCS.Mobox3.AnGang.config;
using HH.WCS.Mobox3.AnGang.Helper;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Web.Http;
using static Opc.Ua.ContentFilter;
using System.Threading.Tasks;
 
using HH.WCS.Mobox3.AnGang.Models;
using HH.WCS.Mobox3.AnGang.Services;
using static HH.WCS.Mobox3.AnGang.Dtos.Request.AgvRequest;
using static HH.WCS.Mobox3.AnGang.Dtos.Response.AgvResponse;
using HH.WCS.Mobox3.AnGang.Helpers;
using HH.WCS.Mobox3.AnGang.Debug;
using static HH.WCS.Mobox3.AnGang.Dtos.Request.DebugRequest;
using static HH.WCS.Mobox3.AnGang.Dtos.Response.DebugResponse;
using static HH.WCS.Mobox3.AnGang.Models.DebugModel;
 
namespace HH.WCS.Mobox3.AnGang.Controllers
{
    /// <summary>
    /// 测试用,如果项目中要和设备对接,前期设备无法测试,用接口模拟
    /// </summary>
    [RoutePrefix("api")]
    public class DebugController : System.Web.Http.ApiController
    {
        /// <summary>
        /// 模拟 AGV 多次回报任务状态
        /// </summary>
        /// <param name="model">容器号</param>
        /// <returns></returns>
        [HttpPost]
        [Route("AgvSeriesReports")]
        public ReturnResults AgvSeriesReports(UpdateTaskState model) {
            return DebugService.AgvSeriesReports(model);
        }
 
        /// <summary>
        /// 初始化数据库
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        [Route("CreateDatabase")]
        public string CreateDatabase(CoverInfo model) {
            return DebugService.CreateDatabase(model.IsCover);
        }
 
        /// <summary>
        /// DEBUG:插入货位、容器、货品信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        [Route("InsertLocCntrCg")]
        public string InsertLocCntrCg(LocCntrCg model) {
            return DebugService.InsertLocCntrCg(model);
        }
 
        [HttpPost]
        [Route("SetTaskWeight")]
        public string SetTaskWeight(SetTaskWeightInfo model) {
            return DebugService.SetTaskWeight(model);
        }
    }
}