wangxinhui
2024-12-18 26f2e904ba44c900e6c61ebf15f97b063324f65b
更新代码
已删除7个文件
已修改2个文件
已添加11个文件
320 ■■■■■ 文件已修改
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/0f2de342-959b-4075-9776-5b88fd484124.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2f4187bd-8911-48bb-9104-01eaf1e80abd.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4ad14622-4b05-4fc3-abc0-0f0df9191418.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4b9d13b5-464a-47d4-8dae-9937d5273cc6.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5023b4f8-50f2-4301-b3ca-8d83fa478bdc.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9b53cffc-065b-40ee-a779-a99d0cdd29b8.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bb9c5c98-5de4-43c8-8a36-34ad166b9c7a.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c11191d7-3a6f-4b94-8bef-d18e80535b88.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d6701bb1-0090-4502-a2ca-a4e0726e92d8.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/efdfd79b-e601-448c-a03c-b67eceb80782.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ffdc57a2-11a0-4784-96ef-3f73a9839656.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/AGV/AgvResponseContent.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/AGVService/InvokeAGVService.cs 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/IAGVService/IInvokeAGVService.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/AgvSecureModel.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/AgvTaskModel.cs 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/WIDESEA_External.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_Customer.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/AGV/AgvController.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/0f2de342-959b-4075-9776-5b88fd484124.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2f4187bd-8911-48bb-9104-01eaf1e80abd.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4ad14622-4b05-4fc3-abc0-0f0df9191418.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4b9d13b5-464a-47d4-8dae-9937d5273cc6.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5023b4f8-50f2-4301-b3ca-8d83fa478bdc.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9b53cffc-065b-40ee-a779-a99d0cdd29b8.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bb9c5c98-5de4-43c8-8a36-34ad166b9c7a.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c11191d7-3a6f-4b94-8bef-d18e80535b88.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d6701bb1-0090-4502-a2ca-a4e0726e92d8.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/efdfd79b-e601-448c-a03c-b67eceb80782.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ffdc57a2-11a0-4784-96ef-3f73a9839656.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_Common.APIEnum
{
    public enum APIEnum
    {
        [Description("AGV发送任务接口")]
        AgvSendTask,
        [Description("AGV安全信号回复")]
        AGVSecureReply
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/AGV/AgvResponseContent.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_DTO.AGV
{
    public class AgvResponseContent
    {
        /// <summary>
        /// è¿”回码
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// è¿”回消息
        /// </summary>
        public string Message { get; set; }
        /// <summary>
        /// è¯·æ±‚编号
        /// </summary>
        public string ReqCode { get; set; }
        /// <summary>
        /// è‡ªå®šä¹‰è¿”回(返回任务单号)
        /// </summary>
        public string Data { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_External/AGVService/InvokeAGVService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,73 @@
using Autofac.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.APIEnum;
using WIDESEA_Core;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.AGV;
using WIDESEA_External.Model;
namespace WIDESEA_External.AGVService
{
    public class InvokeAGVService : IInvokeAGVService
    {
        public static IInvokeAGVService Intance
        {
            get { return App.GetService<IInvokeAGVService>(); }
        }
        /// <summary>
        /// å‘送AGV任务
        /// </summary>
        /// <param name="taskModel"></param>
        /// <returns></returns>
        public WebResponseContent SendAgvTask(AgvTaskModel taskModel)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                string apiAddress = AppSettings.Get(APIEnum.AgvSendTask.ToString());
                string response = HttpHelper.Post(apiAddress, taskModel.Serialize());
                AgvResponseContent agvContent= response.DeserializeObject<AgvResponseContent>();
                if (agvContent.Code=="200")
                {
                    content.OK(agvContent.Message);
                }
                else
                {
                    content.Error(agvContent.Message);
                }
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        public WebResponseContent AGVSecureReply(AgvSecureModel secureModel)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                string apiAddress = AppSettings.Get(APIEnum.AGVSecureReply.ToString());
                string response = HttpHelper.Post(apiAddress, secureModel.Serialize());
                AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>();
                if (agvContent.Code == "200")
                {
                    content.OK(agvContent.Message);
                }
                else
                {
                    content.Error(agvContent.Message);
                }
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_External/IAGVService/IInvokeAGVService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_External.Model;
namespace WIDESEA_External.AGVService
{
    public interface IInvokeAGVService:IDependency
    {
        /// <summary>
        /// å‘送AGV任务
        /// </summary>
        /// <param name="taskModel"></param>
        /// <returns></returns>
        WebResponseContent SendAgvTask(AgvTaskModel taskModel);
        /// <summary>
        /// AGV安全信号回复
        /// </summary>
        /// <returns></returns>
        WebResponseContent AGVSecureReply(AgvSecureModel secureModel);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/AgvSecureModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_External.Model
{
    public class AgvSecureModel
    {
        /// <summary>
        /// è¯·æ±‚编号 æ¯ä¸ªè¯·æ±‚都要一个唯一编号,同一个请求重复提交,使用同一编号
        /// </summary>
        public string ReqCode { get; set; }
        /// <summary>
        /// è¯·æ±‚æ—¶é—´ æ ¼å¼:yyyy-MM-dd HH:mm:ss
        /// </summary>
        public string ReqTime { get; set; }
        /// <summary>
        /// å®¢æˆ·ç«¯ç¼–号
        /// </summary>
        public string ClientCode { get; set; }
        /// <summary>
        /// ä»¤ç‰Œå· ç”±è°ƒåº¦ç³»ç»Ÿé¢å‘
        /// </summary>
        public string TokenCode { get; set; }
        /// <summary>
        /// å·¥ä½œä½ ä¸ŽRCS-2000端配置的位置名称一致
        /// </summary>
        public string WbCode { get; set; }
        /// <summary>
        /// è½½å…·ç¼–号
        /// </summary>
        public string podCode { get; set; }
        /// <summary>
        /// AGV编号
        /// </summary>
        public string agvCode { get; set; }
        /// <summary>
        /// ä»»åŠ¡å·
        /// </summary>
        public string taskCode { get; set; }
        /// <summary>
        /// ä¸‹ä¸€ä¸ªå­ä»»åŠ¡åºåˆ— æŒ‡å®šç¬¬å‡ ä¸ªå­ä»»åŠ¡å¼€å§‹æ‰§è¡Œ,校验子任务执行是否正确,不填默认执行下一个子任务。
        /// </summary>
        public string taskSeq { get; set; }
        /// <summary>
        /// ä¸‹ä¸€ä¸ªä½ç½®ä¿¡æ¯
        /// positionCode:位置编号
        /// type:对象类型定义:
        /// 00:代表 nextPositionCode是一个位置
        /// 02:代表 nextPositionCode是一个策略
        /// </summary>
        public object nextPositionCode { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/AgvTaskModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,72 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_External.Model
{
    /// <summary>
    /// AGV任务
    /// </summary>
    public class AgvTaskModel
    {
        /// <summary>
        /// è¯·æ±‚编号 æ¯ä¸ªè¯·æ±‚都要一个唯一编号,同一个请求重复提交,使用同一编号
        /// </summary>
        public string ReqCode { get; set; }
        /// <summary>
        /// ä»»åŠ¡ç±»åž‹
        /// </summary>
        public string TaskTyp { get; set; }
        /// <summary>
        /// å·¥ä½œä½
        /// </summary>
        public string WbCode { get; set; }
        /// <summary>
        /// ä½ç½®è·¯å¾„
        /// </summary>
        public List<object> PositionCodePath { get; set; }
        /// <summary>
        /// è½½å…·ç¼–号
        /// </summary>
        public string PodCode { get; set; }
        /// <summary>
        /// è½½å…·ç±»åž‹
        /// </summary>
        public string PodTyp { get; set; }
        /// <summary>
        /// ç‰©æ–™æ‰¹æ¬¡
        /// </summary>
        public string MaterialLot { get; set; }
        /// <summary>
        /// ä¼˜å…ˆçº§(1~127)最大优先级最高 ä¸ºç©ºæ—¶,采用任务模板的优先级
        /// </summary>
        public string Priority { get; set; }
        /// <summary>
        /// AGV任务号
        /// </summary>
        public string TaskCode { get; set; }
        /// <summary>
        /// AGV设备编号 å¡«å†™å¯æŒ‡å®šæŸä¸€ç¼–号的AGV执行该任务
        /// </summary>
        public string AgvCode { get; set; }
        /// <summary>
        /// AGV设备类型
        /// </summary>
        public string AgvTyp { get; set; }
        /// <summary>
        /// åŒºåŸŸ/策略<br/>
        /// æŒ‘选货架以及根据物料批次挑选货架时的先进先出规则,支持以下4个值:<br/>
        /// 1:按照货架到达储位的时间顺序,先进先出<br/>
        /// 2:按照货架到达储位的时间顺序,先进后出<br/>
        /// 9:按照货架绑定物料批次的时间顺序,先进先出<br/>
        /// 10:按照货架绑定物料批次的时间顺序,先进后出<br/>
        /// </summary>
        public string PositionSelStrategy { get; set; }
        /// <summary>
        /// è‡ªå®šä¹‰å­—段
        /// </summary>
        public string Data { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_External/WIDESEA_External.csproj
@@ -7,7 +7,9 @@
  </PropertyGroup>
  <ItemGroup>
    <ProjectReference Include="..\WIDESEA_Common\WIDESEA_Common.csproj" />
    <ProjectReference Include="..\WIDESEA_Core\WIDESEA_Core.csproj" />
    <ProjectReference Include="..\WIDESEA_DTO\WIDESEA_DTO.csproj" />
  </ItemGroup>
</Project>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_Customer.cs
@@ -6,7 +6,7 @@
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models.Basic
namespace WIDESEA_Model.Models
{
    [SugarTable(nameof(Dt_Customer),"客户信息")]
    public class Dt_Customer : BaseEntity
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/AGV/AgvController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using WIDESEA_Common.CommonEnum;
using WIDESEA_Common.MaterielEnum;
using WIDESEA_Common.OrderEnum;
using WIDESEA_Core;
using WIDESEA_Core.Attributes;
using WIDESEA_Core.Helper;
using WIDESEA_DTO;
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.ERP;
using WIDESEA_External.AGVService;
using WIDESEA_External.ERPService;
using WIDESEA_External.Model;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_IInboundRepository;
using WIDESEA_IInboundService;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
using static WIDESEA_DTO.ErpResponseContent;
namespace WIDESEA_WMSServer.Controllers.ERP
{
    [Route("api/Agv")]
    [ApiController]
    public class AgvController : ControllerBase
    {
        public AgvController()
        {
        }
        /// <summary>
        /// å‘送AGV任务
        /// </summary>
        /// <param name="taskModel"></param>
        /// <returns></returns>
        [HttpPost,Route("SendAgvTask"),AllowAnonymous]
        public WebResponseContent SendAgvTask([FromBody] AgvTaskModel taskModel)
        {
            return InvokeAGVService.Intance.SendAgvTask(taskModel);
        }
    }
}