wangxinhui
2025-03-05 33861e7fbf9cc4af3088f715ce7607a681f9c181
成品代码,板材巷道高度增加
已删除7个文件
已修改27个文件
已添加48个文件
1876 ■■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/53944191-d3e3-4dc3-a3d3-f76da5a49529.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c3720f0e-fb5a-46ef-9245-3c9faa5a877f.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c3952f00-6f03-46e1-a8c4-0c2746ff48ae.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c4ebba94-b522-42e2-9e35-4d78739b7bd8.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/dabe2c19-7075-4f3e-b4b4-ad475717f014.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService_Operate.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/成品仓/AGV_CPExtend.cs 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/成品仓/AGV_CPJob.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CP.cs 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/ConveyorLineJob_BC.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/042147bb-52cb-4805-9b14-80f5cec0e226.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/0f3806e6-14d4-496b-9b44-cf2ad051b337.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/16bda44f-cb60-43e3-8deb-16983a6c8720.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/19f2ce5e-ac6e-4a83-a8d8-de666adbd753.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3a86d184-9f6a-4b52-8eb2-6a125517673d.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b697bc68-cc10-4945-8b22-efceeb7bf056.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bcaff427-9b5a-40c5-b7b6-df06507540f9.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d50a9bd1-175b-443a-a8be-5e84630a8286.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/fed89d2c-c26e-4f31-9fa3-8a0b7f92a8fd.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpMesHelper.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpProOutOrderDTO.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesBagInfoModel.cs 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesShipmentOrderSync.cs 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPProInboundModel.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPReceiveModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IProOutOrderDetailRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IProOutOrderRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IProOutOrderDetailService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IProOutOrderService.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IProStockInfoDetailRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IProStockInfoDetail_HtyRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IProStockInfoRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IProStockInfo_HtyRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockRepository.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IProStockInfoDetailService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IProStockInfoDetail_HtyService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IProStockInfoService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IProStockInfo_HtyService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesProInOrderService.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrder.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrderDetail.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_ProOutOrder.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_ProOutOrderDetail.cs 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_ProStockInfo.cs 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail.cs 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail_Hty.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_ProStockInfo_Hty.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/ProOutOrderDetailRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/ProOutOrderRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderDetailService.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoDetailRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoDetail_HtyRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfo_HtyRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockRepository.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoDetailService.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoDetail_HtyService.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfo_HtyService.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetail_HtyService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/ProOutOrderController.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/ProOutOrderDetailController.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/ProStockInfoController.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/ProStockInfoDetailController.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/ProStockInfoDetail_HtyController.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/ProStockInfo_HtyController.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/接口文档/淮安特创科技智能制造项目MES-WMS接口规范.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/53944191-d3e3-4dc3-a3d3-f76da5a49529.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c3720f0e-fb5a-46ef-9245-3c9faa5a877f.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c3952f00-6f03-46e1-a8c4-0c2746ff48ae.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c4ebba94-b522-42e2-9e35-4d78739b7bd8.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/dabe2c19-7075-4f3e-b4b4-ad475717f014.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -218,7 +218,7 @@
        /// <param name="targetAddress">修改后的目标地址</param>
        /// <param name="currentAddress">修改后的当前地址</param>
        /// <param name="nextAddress">修改后的下一地址</param>
        void UpdateTask(Dt_Task task, TaskStatusEnum taskStatus, string deviceCode = "", string sourceAddress = "", string targetAddress = "", string currentAddress = "", string nextAddress = "", string roadwayNo = "");
        void UpdateTask(Dt_Task task, TaskStatusEnum taskStatus, string deviceCode = "", string sourceAddress = "", string targetAddress = "", string currentAddress = "", string nextAddress = "", string roadwayNo = "", int heightType = 0);
        /// <summary>
        /// è¯·æ±‚分配巷道
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs
@@ -161,7 +161,13 @@
        [ExporterHeader(DisplayName = "WMS任务主键")]
        [SugarColumn(IsNullable = false, ColumnDescription = "WMS任务主键")]
        public int WMSId { get; set; }
        /// <summary>
        /// é«˜åº¦ç±»åž‹
        /// </summary>
        [ImporterHeader(Name = "高度类型")]
        [ExporterHeader(DisplayName = "高度类型")]
        [SugarColumn(IsNullable = false, ColumnDescription = "高度类型")]
        public int HeightType { get; set; }
        /// <summary>
        /// ä»»åŠ¡ä¸‹å‘æ—¶é—´
        /// </summary>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService_Operate.cs
@@ -24,7 +24,7 @@
        /// <param name="targetAddress">修改后的目标地址</param>
        /// <param name="currentAddress">修改后的当前地址</param>
        /// <param name="nextAddress">修改后的下一地址</param>
        public void UpdateTask(Dt_Task task, TaskStatusEnum taskStatus, string deviceCode = "", string sourceAddress = "", string targetAddress = "", string currentAddress = "", string nextAddress = "", string roadwayNo = "")
        public void UpdateTask(Dt_Task task, TaskStatusEnum taskStatus, string deviceCode = "", string sourceAddress = "", string targetAddress = "", string currentAddress = "", string nextAddress = "", string roadwayNo = "", int heightType = 0)
        {
            StringBuilder stringBuilder = new StringBuilder(App.User?.UserId == 0 ? $"系统自动流程" : "人工手动流程");
            if (task.DeviceCode != deviceCode && !string.IsNullOrEmpty(deviceCode))
@@ -57,6 +57,10 @@
                stringBuilder.Append($",巷道号由{task.Roadway}变更为{roadwayNo}");
                task.Roadway = roadwayNo;
            }
            if (heightType!=0)
            {
                task.HeightType= heightType;
            }
            if (task.TaskState != taskStatus.ObjToInt())
            {
                string newStatus = $"{taskStatus}";
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/³ÉÆ·²Ö/AGV_CPExtend.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,103 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_DTO.Agv;
using WIDESEAWCS_Common.APIEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_Tasks
{
    public partial class AGV_CPJob
    {
        public void SendAGVTask()
        {
            try
            {
                var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && nameof(AGV_FLJob).Contains(x.DeviceCode) && !string.IsNullOrEmpty(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList();
                foreach (var task in newTasks)
                {
                    try
                    {
                        if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutEmpty.ObjToInt() || task.TaskType == TaskTypeEnum.OutAllocate.ObjToInt())
                            task.CurrentAddress = GetAGVAddress(task.CurrentAddress);
                        else
                            task.NextAddress = GetAGVAddress(task.NextAddress);
                        AgvTaskDTO taskDTO = new AgvTaskDTO()
                        {
                            TaskCode = task.AgvTaskNum,
                            ReqCode = DateTime.Now.ToString("yyyyMMddHHmmss") + task.AgvTaskNum,
                            TaskTyp = task.TaskType < TaskTypeEnum.Inbound.ObjToInt() ? "FLC" : "FLR",
                            ctnrCode = task.PalletCode,
                            PositionCodePath = new List<CodePath>()
                        {
                            new CodePath()
                            {
                                type="05",
                                positionCode=task.CurrentAddress
                            },
                            new CodePath()
                            {
                                type="05",
                                positionCode=task.NextAddress
                            }
                        },
                        };
                        WebResponseContent content = _taskService.AgvSendTask(taskDTO, APIEnum.Agv_FLSendTask);
                        if (!content.Status) throw new Exception(content.Message);
                        task.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt();
                    }
                    catch (Exception ex)
                    {
                        task.TaskState = TaskStatusEnum.Exception.ObjToInt();
                        task.ExceptionMessage = ex.Message;
                    }
                }
                _taskService.UpdateData(newTasks);
            }
            catch (Exception ex)
            {
                WriteError(nameof(AGV_FLJob), ex.Message, ex);
            }
        }
        /// <summary>
        /// èŽ·å–AGV地址
        /// </summary>
        /// <param name="Address"></param>
        /// <returns></returns>
        public static string GetAGVAddress(string Address)
        {
            string[] targetCodes = Address.Split("-");
            if (targetCodes.Length == 5)
            {
                var Row = Convert.ToInt16(targetCodes[1]);
                var Column = Convert.ToInt16(targetCodes[2]);
                var Layer = Convert.ToInt16(targetCodes[3]);
                var a = Row switch
                {
                    1 => "A1",
                    2 => "B1",
                    3 => "C1",
                    4 => "D1",
                    5 => "E1",
                    _ => throw new Exception($"未定义的排,地址:【{Address}】"),
                };
                var b = Layer > 9 ? "" + Layer : "0" + Layer;
                var c = Column > 9 ? "" + Column : "0" + Column;
                if (Column == 10) c = "010";
                Address = a + b + c;
            }
            else
            {
                throw new Exception($"地址有误,地址:【{Address}】");
            }
            return Address;
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/³ÉÆ·²Ö/AGV_CPJob.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
using AutoMapper;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.Service;
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public partial class AGV_CPJob : JobBase, IJob
    {
        public readonly ITaskService _taskService;
        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
        private readonly IRouterService _routerService;
        private readonly IStationMangerRepository _stationMangerRepository;
        private readonly IMapper _mapper;
        public AGV_CPJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IStationMangerRepository stationMangerRepository, IMapper mapper)
        {
            _taskService = taskService;
            _taskExecuteDetailService = taskExecuteDetailService;
            _routerService = routerService;
            _stationMangerRepository = stationMangerRepository;
            _mapper = mapper;
        }
        public Task Execute(IJobExecutionContext context)
        {
            try
            {
                SendAGVTask();
            }
            catch (Exception ex)
            {
                Console.Out.WriteLine(nameof(AGV_CPJob) + ":" + ex.Message);
            }
            return Task.CompletedTask;
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/³ÉÆ·²Ö/ConveyorLineJob_CP.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,70 @@
using Newtonsoft.Json;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.Repository;
using WIDESEAWCS_QuartzJob.Service;
using ICacheService = WIDESEAWCS_Core.Caches.ICacheService;
namespace WIDESEAWCS_Tasks.成品仓
{
    [DisallowConcurrentExecution]
    public class ConveyorLineJob_CP : JobBase, IJob
    {
        private readonly ICacheService _cacheService;
        private readonly ITaskService _taskService;
        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
        private readonly ITaskRepository _taskRepository;
        private readonly IStationMangerRepository _stationMangerRepository;
        private readonly IRouterRepository _routerRepository;
        private readonly IRouterService _routerService;
        private readonly IRouterExtension _routerExtension;
        private readonly List<Dt_WarehouseDevice> warehouseDevices;
        public ConveyorLineJob_CP(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension)
        {
            _cacheService = cacheService;
            _taskService = taskService;
            _taskExecuteDetailService = taskExecuteDetailService;
            _taskRepository = taskRepository;
            _stationMangerRepository = stationMangerRepository;
            _routerRepository = routerRepository;
            _routerService = routerService;
            _routerExtension = routerExtension;
            string? warehouseDevicesStr = _cacheService.Get<string>(nameof(Dt_WarehouseDevice));
            if (!string.IsNullOrEmpty(warehouseDevicesStr))
            {
                warehouseDevices = JsonConvert.DeserializeObject<List<Dt_WarehouseDevice>>(warehouseDevicesStr) ?? new List<Dt_WarehouseDevice>();
            }
            else
            {
                warehouseDevices = new List<Dt_WarehouseDevice>();
            }
        }
        public Task Execute(IJobExecutionContext context)
        {
            bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
            if (flag && value != null)
            {
                OtherDevice device = (OtherDevice)value;
                Dt_WarehouseDevice? warehouseDevice = warehouseDevices.FirstOrDefault(x => x.DeviceCode == device.DeviceCode);
                if (warehouseDevice == null)
                {
                    WriteError(device.DeviceName, $"请配置仓库设备信息");
                    return Task.CompletedTask;
                }
            }
            return Task.CompletedTask;
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/°å²Ä²Ö/ConveyorLineJob_BC.cs
@@ -142,7 +142,7 @@
                                            WebResponseContent responseContent = _taskService.RequestWMSAssignRoadway(stations, task.TaskNum, conveyorLineInfoRead.Spare2);
                                            if (responseContent.Status)
                                            {
                                                _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, roadwayNo: responseContent.Data.ToString() ?? "");
                                                _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, roadwayNo: responseContent.Data.ToString() ?? "",heightType: conveyorLineInfoRead.Spare2);
                                            }
                                        }
@@ -272,7 +272,7 @@
                                            device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode);
                                            device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode);
                                            device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
                                            _taskService.UpdateTask(task, taskState, currentAddress: currentAddress, nextAddress: nextAddress, targetAddress: targetAddress, deviceCode: deviceCode, roadwayNo: roadwayNo);
                                            _taskService.UpdateTask(task, taskState, currentAddress: currentAddress, nextAddress: nextAddress, targetAddress: targetAddress, deviceCode: deviceCode, roadwayNo: roadwayNo,heightType: conveyorLineInfoRead.Spare2);
                                        }
                                       
                                    }
@@ -298,7 +298,7 @@
                                        if (router.IsEnd)
                                        {
                                            string? targetLoca = _taskService.RequestAssignLocationByHeight(taskIn.TaskNum, taskIn.Roadway, conveyorLineInfoRead.Spare2);
                                            string? targetLoca = _taskService.RequestAssignLocationByHeight(taskIn.TaskNum, taskIn.Roadway, taskIn.HeightType);
                                            if (!string.IsNullOrEmpty(targetLoca))
                                            {
                                                currentAddress = item.StackerCraneStationCode;
@@ -340,10 +340,10 @@
                                    device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode);
                                    device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
                                }
                                else //调拨使用
                                {
                                    device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
                                }
                                //else //调拨使用
                                //{
                                //    device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
                                //}
                                //{
                                //    task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && string.IsNullOrEmpty(x.DeviceCode) && x.TaskState == TaskStatusEnum.New.ObjToInt() && x.WarehouseId == warehouseDevice.WarehouseId);
                                //    if (task != null)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/042147bb-52cb-4805-9b14-80f5cec0e226.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/0f3806e6-14d4-496b-9b44-cf2ad051b337.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/16bda44f-cb60-43e3-8deb-16983a6c8720.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/19f2ce5e-ac6e-4a83-a8d8-de666adbd753.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3a86d184-9f6a-4b52-8eb2-6a125517673d.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b697bc68-cc10-4945-8b22-efceeb7bf056.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bcaff427-9b5a-40c5-b7b6-df06507540f9.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d50a9bd1-175b-443a-a8be-5e84630a8286.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/fed89d2c-c26e-4f31-9fa3-8a0b7f92a8fd.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs
@@ -174,7 +174,7 @@
            {
                Dt_LocationInfo? nearLocation = null;
                if (emptyLocation.RoadwayNo != "SC01_BC" && emptyLocation.Column % 2 == 1)
                    nearLocation = locationInfos.FirstOrDefault(x => x.Row == emptyLocation.Row && x.Layer == emptyLocation.Layer && x.Depth == emptyLocation.Depth && x.Column == emptyLocation.Column + 1);
                    nearLocation = locationInfos.FirstOrDefault(x => x.Row == emptyLocation.Row && x.Layer == emptyLocation.Layer && x.Depth == emptyLocation.Depth && x.Column == emptyLocation.Column - 1);
                else if (emptyLocation.RoadwayNo == "SC01_BC" && emptyLocation.Column % 2 == 0)
                    nearLocation = locationInfos.FirstOrDefault(x => x.Row == emptyLocation.Row && x.Layer == emptyLocation.Layer && x.Depth == emptyLocation.Depth && x.Column == emptyLocation.Column + 1);
                if (nearLocation != null && DepthLocationIsEmpty_BC(locationInfos, nearLocation) != null)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs
@@ -36,6 +36,11 @@
        /// MES同步板料出库
        /// </summary>
        [Description("MES同步板料出库")]
        WMS_MES_MaterialLotaAcept
        WMS_MES_MaterialLotaAcept,
        /// <summary>
        /// MES同步成品出库
        /// </summary>
        [Description("MES同步成品出库")]
        WMS_MES_ShipmentOrderSync
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpMesHelper.cs
@@ -23,11 +23,15 @@
                    
                    using HttpClient httpClient = new HttpClient();
                    httpClient.Timeout = new TimeSpan(0, 0, 60);
                    string authorization = "AppKey 1830415116987195392";
                    //string authorization = "AppKey 1830415116987195392";
                    string authorization = "AppKey 1773317109539201024";
                    headers = new Dictionary<string, string>
                    {
                        { "Authorization", authorization },
                        { "Site_tenant_id", "0dc2d164-8a62-417e-8a00-808007464feb" }
                        //{ "Site_tenant_id", "0dc2d164-8a62-417e-8a00-808007464feb" }
                        { "Site_tenant_id", "ced19269-2b83-4577-be43-8cc2f700251e" }
                    };
                    if (headers != null)
                    {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpProOutOrderDTO.cs
@@ -33,6 +33,10 @@
        [PropertyValidate("订单类型", NotNullAndEmpty = true, Check = new object[] { 1, 2})]
        public int OType { get; set; }
        /// <summary>
        /// ä»“库类型
        /// </summary>
        public string WaType { get; set; }
        /// <summary>
        /// è®¡åˆ’出货时间
        /// </summary>
        public string PlantShipDate { get; set; }
@@ -65,7 +69,7 @@
        /// <summary>
        /// å·¥åŽ‚
        /// </summary>
        public string FactoryCode { get; set; } = "HA02";
        public string FactoryCode { get; set; }
        /// <summary>
        /// äº§å“ç¼–码
        /// </summary>
@@ -81,7 +85,7 @@
        /// <summary>
        /// äº§å“å‘¨æœŸ
        /// </summary>
        public int DateCode { get; set; }
        public string DateCode { get; set; }
        /// <summary>
        /// åˆæ ¼PCS数
        /// </summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesBagInfoModel.cs
@@ -24,9 +24,31 @@
        /// </summary>
        public int UnPackStock { get; set; }
        /// <summary>
        /// å·¥ä½œä¸­å¿ƒ
        /// </summary>
        public string WorkCenter { get; set; }
        /// <summary>
        /// å†…包信息
        /// </summary>
        public List<MESBagDetail> BagDetails { get; set; }
    }
    /// <summary>
    /// MES内包入库
    /// </summary>
    public class MesBoxInfoModel
    {
        /// <summary>
        /// å¤–箱号
        /// </summary>
        public string BoxNo { get; set; }
        /// <summary>
        /// å‡ºåº“单号
        /// </summary>
        public string ShipmentOrder { get; set; }
        /// <summary>
        /// å‡ºè´§å•号
        /// </summary>
        public List<MESBagDetail> Bags { get; set; }
    }
    /// <summary>
    /// å†…包信息
@@ -66,6 +88,32 @@
        /// </summary>
        public string XSite { get; set; }
        /// <summary>
        /// å†…包重量
        /// </summary>
        public float Weight { get; set; }
        /// <summary>
        /// åŒ…装时间
        /// </summary>
        public DateTime PackingDate { get; set; }
        /// <summary>
        /// å†…包明细
        /// </summary>
        public List<MESBagItem> BagItems { get; set; }
    }
    /// <summary>
    /// å†…包明细
    /// </summary>
    public class MESBagItem
    {
        /// <summary>
        /// åˆ¶é€ è®¢å•
        /// </summary>
        public string MoNumber { get; set; }
        /// <summary>
        /// æ‰¹æ¬¡å·
        /// </summary>
        public string LotNumber { get; set; }
        /// <summary>
        /// ERP工单
        /// </summary>
        public string ERPOrder { get; set; }
@@ -74,21 +122,20 @@
        /// </summary>
        public string SaleOrder { get; set; }
        /// <summary>
        /// å®¢æˆ·åŽŸå§‹å‘¨æœŸ
        /// åŒ…装SET数量
        /// </summary>
        public string CustomDateCode { get; set; }
        public float SETQty { get;set; }
        /// <summary>
        /// å†…包重量
        /// åˆæ ¼PCS数
        /// </summary>
        public float Weight { get; set; }
        public float OKPCSQTY { get; set; }
        /// <summary>
        /// å·¥ä½œä¸­å¿ƒ
        /// X数
        /// </summary>
        public string WorkCenter { get; set; }
        public float XQty { get; set; }
        /// <summary>
        /// åŒ…装时间
        /// X位
        /// </summary>
        public DateTime PackingDate { get; set; }
        public string XSite { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesShipmentOrderSync.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,77 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_DTO.MES
{
    /// <summary>
    /// WMS同步成品至MES
    /// </summary>
    public class MesShipmentOrderSync
    {
        /// <summary>
        /// å‡ºè´§å•号
        /// </summary>
        public string ShipmentOrder { get; set; }
        /// <summary>
        /// å®¢æˆ·
        /// </summary>
        public string Customer { get; set; }
        /// <summary>
        /// å·¥åŽ‚
        /// </summary>
        public string FactoryCode { get; set; }
        /// <summary>
        /// å‡ºè´§åœ°åç§°
        /// </summary>
        public string ShipName { get; set; }
        /// <summary>
        /// å‡ºè´§åœ°å€
        /// </summary>
        public string ShippingAddress { get; set; }
        /// <summary>
        /// è®¡åˆ’出货时间
        /// </summary>
        public string PlantShipDate { get; set; }
        /// <summary>
        /// è¯¦æƒ…
        /// </summary>
        public List<MesShipOrderDetail> OrderDetails { get; set; }
    }
    /// <summary>
    /// è¯¦æƒ…
    /// </summary>
    public class MesShipOrderDetail
    {
        /// <summary>
        /// äº§å“ç¼–码
        /// </summary>
        public string ProductCode { get; set; }
        /// <summary>
        /// äº§å“ç‰ˆæœ¬
        /// </summary>
        public string ProductVersion { get; set; }
        /// <summary>
        /// å‡ºè´§æ•°é‡
        /// </summary>
        public float Qty { get; set; }
        /// <summary>
        /// å‘¨æœŸ
        /// </summary>
        public string DateCode { get; set; }
        /// <summary>
        /// é”€å”®è®¢å•
        /// </summary>
        public string SaleOrder { get; set; }
        /// <summary>
        /// åºå·
        /// </summary>
        public int Sequence { get; set; }
        /// <summary>
        /// å·¥ä½œä¸­å¿ƒ
        /// </summary>
        public string WorkCenter { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs
@@ -142,6 +142,40 @@
            return response;
        }
        /// <summary>
        /// ERP成品出库上报接口调用
        /// </summary>
        public string InvokeProOutApi(ERPProOutOrderModel outOrderModel)
        {
            Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.InvokeErpApi.ToString());
            ERPBaseModel<ERPProOutOrderModel> model = new ERPBaseModel<ERPProOutOrderModel>()
            {
                Data = outOrderModel,
                Desc = "出库成品通知",
                Type = "toOrderAssignment",
                SecurityCode = "TeChuang"
            };
            string request = JsonConvert.SerializeObject(model, settings);
            string response = HttpHelper.Post(apiInfo.ApiAddress, request);
            return response;
        }
        /// <summary>
        /// ERP成品入库上报接口调用
        /// </summary>
        public string InvokeProInApi(ERPProInboundModel inboundModel)
        {
            Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.InvokeErpApi.ToString());
            ERPBaseModel<ERPProInboundModel> model = new ERPBaseModel<ERPProInboundModel>()
            {
                Data = inboundModel,
                Desc = "成品入库",
                Type = "toWOStockForm",
                SecurityCode = "TeChuang"
            };
            string request = JsonConvert.SerializeObject(model, settings);
            string response = HttpHelper.Post(apiInfo.ApiAddress, request);
            return response;
        }
        /// <summary>
        /// ERP物料出库接口调用
        /// </summary>
        /// <param name="outboundModel"></param>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs
@@ -45,5 +45,17 @@
        /// ERP盘赢/亏上报接口调用
        /// </summary>
        string InvokeTakeStockApi(ERPTakeStockModel takeModel);
        /// <summary>
        /// ERP成品出库完成上报
        /// </summary>
        /// <param name="outOrderModel"></param>
        /// <returns></returns>
        string InvokeProOutApi(ERPProOutOrderModel outOrderModel);
        /// <summary>
        /// ERP成品入库完成上报
        /// </summary>
        /// <param name="inboundModel"></param>
        /// <returns></returns>
        string InvokeProInApi(ERPProInboundModel inboundModel);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPProInboundModel.cs
@@ -26,11 +26,11 @@
        /// <summary>
        /// å…¬å¸ä»£ç 
        /// </summary>
        public string CompanyCode { get; set; } = "HATC";
        public string CompanyCode { get; set; }
        /// <summary>
        /// å·¥åŽ‚ä»£å·
        /// </summary>
        public string FactoryCode { get; set; } = "HA02";
        public string FactoryCode { get; set; }
        /// <summary>
        /// ä»“库代码
        /// </summary>
@@ -44,13 +44,13 @@
        /// </summary>
        public string StockDate { get; set; }
        /// <summary>
        /// å…¥åº“日期
        /// å¤‡æ³¨(胶框码)
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// å…¥åº“类型
        /// </summary>
        public string StockFormType { get; set; } = "Production";
        public string StockFormType { get; set; }
        /// <summary>
        /// å…¥åº“明细
        /// </summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPReceiveModel.cs
@@ -104,7 +104,7 @@
        /// <summary>
        /// æ”¶è´§æ•°é‡
        /// </summary>
        public int QtyRecieved { get; set; }
        public float QtyRecieved { get; set; }
        /// <summary>
        /// æ”¶è´§æ‰¹æ¬¡
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IProOutOrderDetailRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IOutboundRepository
{
    public interface IProOutOrderDetailRepository : IRepository<Dt_ProOutOrderDetail>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IProOutOrderRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IOutboundRepository
{
    public interface IProOutOrderRepository : IRepository<Dt_ProOutOrder>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs
@@ -24,5 +24,7 @@
        IMesPPCutOutboundOrderService MesPPCutOutboundOrderService { get; }
        IMesPPCutOutboundOrderDetailService MesPPCutOutboundOrderDetailService { get; }
        IProOutOrderService ProOutOrderService { get; }
        IProOutOrderDetailService ProOutOrderDetailService { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IProOutOrderDetailService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_IOutboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IOutboundService
{
    public interface IProOutOrderDetailService : IService<Dt_ProOutOrderDetail>
    {
        IProOutOrderDetailRepository Repository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IProOutOrderService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.ERP;
using WIDESEA_IOutboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IOutboundService
{
    public interface IProOutOrderService : IService<Dt_ProOutOrder>
    {
        IProOutOrderRepository Repository { get; }
        /// <summary>
        /// æŽ¥æ”¶æˆå“å‡ºåº“单
        /// </summary>
        /// <returns></returns>
        WebResponseContent ProductDeliveryOrder(ErpProOutOrderDTO outOrderDTO);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IProStockInfoDetailRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockRepository
{
    public interface IProStockInfoDetailRepository : IRepository<Dt_ProStockInfoDetail>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IProStockInfoDetail_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockRepository
{
    public interface IProStockInfoDetail_HtyRepository : IRepository<Dt_ProStockInfoDetail_Hty>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IProStockInfoRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockRepository
{
    public interface IProStockInfoRepository : IRepository<Dt_ProStockInfo>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IProStockInfo_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockRepository
{
    public interface IProStockInfo_HtyRepository : IRepository<Dt_ProStockInfo_Hty>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockRepository.cs
@@ -16,5 +16,9 @@
        IStockInfoDetail_HtyRepository StockInfoDetail_HtyRepository { get; }
        IStockInfo_HtyRepository StockInfo_HtyRepository { get; }
        IProStockInfoRepository ProStockInfoRepository { get; }
        IProStockInfoDetailRepository ProStockInfoDetailRepository { get; }
        IProStockInfo_HtyRepository ProStockInfo_HtyRepository { get; }
        IProStockInfoDetail_HtyRepository ProStockInfoDetail_HtyRepository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IProStockInfoDetailService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockService
{
    public interface IProStockInfoDetailService : IService<Dt_ProStockInfoDetail>
    {
        IProStockInfoDetailRepository Repository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IProStockInfoDetail_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockService
{
    public interface IProStockInfoDetail_HtyService : IService<Dt_ProStockInfoDetail_Hty>
    {
        IProStockInfoDetail_HtyRepository Repository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IProStockInfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockService
{
    public interface IProStockInfoService : IService<Dt_ProStockInfo>
    {
        IProStockInfoRepository Repository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IProStockInfo_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockService
{
    public interface IProStockInfo_HtyService : IService<Dt_ProStockInfo_Hty>
    {
        IProStockInfo_HtyRepository Repository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -315,9 +315,20 @@
        WebResponseContent GeneratePKOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews);
        /// <summary>
        /// MES成品入库单接收
        /// MES成品内包信息接收
        /// </summary>
        /// <returns></returns>
        MesResponseContent BagInfoSync(MesBagInfoModel bagInfoModel);
        /// <summary>
        /// MES成品外包信息接收
        /// </summary>
        /// <param name="boxInfoModel"></param>
        /// <returns></returns>
        MesResponseContent BoxStockin(MesBoxInfoModel boxInfoModel);
        /// <summary>
        /// MES成品出库接口调用
        /// </summary>
        /// <returns></returns>
        WebResponseContent ShipmentOrderSync(MesShipmentOrderSync model);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesProInOrderService.cs
@@ -51,14 +51,25 @@
                    return content.Error("当前单据已入库或关闭状态");
                }
                ProSerNumAnalysisModel model = CodeAnalysisHelper.CodeAnalysis<ProSerNumAnalysisModel>(AnalysisCodeEnum.ProSerNumAnalysis, serNum);
                Dt_MesProInOrderDetail? proInOrderDetail = mesProInOrder.Details.FirstOrDefault(x => x.BagNo == model.BagNO);
                //判断扫描和单据中是否匹配
                if (proInOrderDetail == null)
                {
                    return content.Error($"框码{mesProInOrder.BatchNo}中无内包{model.BagNO}信息");
                }
                if ((proInOrderDetail.OverInQuantity + model.OKPCSQTY.ObjToInt())> proInOrderDetail.OKPCSQTY)
                {
                    return content.Error($"内包数量溢出{(proInOrderDetail.OverInQuantity + model.OKPCSQTY.ObjToInt()) - proInOrderDetail.OKPCSQTY}");
                }
                float SumPCSQty = mesProInOrder.Details.Sum(x => x.OKPCSQTY);
                float OverPCSQty = mesProInOrder.Details.Sum(x=>x.OverInQuantity);
                if ((OverPCSQty+model.OKPCSQTY.ObjToInt())>SumPCSQty)
                {
                    return content.Error($"当前入库订单数量溢出{(OverPCSQty + model.OKPCSQTY.ObjToInt())- SumPCSQty}");
                }
                //获取对应内包明细
                Dt_MesProInOrderDetail? proInOrderDetail = mesProInOrder.Details.FirstOrDefault(x=>x.BagNo==model.BagNO) ?? throw new Exception($"未找到");
                proInOrderDetail.OverInQuantity += model.OKPCSQTY.ObjToInt();
                _inboundRepository.MesProInOrderDetailRepository.UpdateData(proInOrderDetail);
                return content.OK($"内包{proInOrderDetail.BagNo}已扫数量:{proInOrderDetail.OverInQuantity},剩余:{proInOrderDetail.OKPCSQTY-proInOrderDetail.OverInQuantity}");
            }
            catch (Exception ex)
            {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrder.cs
@@ -48,6 +48,11 @@
        [SugarColumn(IsNullable = false, ColumnDescription = "是否拆箱入库")]
        public int UnPackStock { get; set; }
        /// <summary>
        /// å·¥ä½œä¸­å¿ƒ
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "工作中心")]
        public string WorkCenter { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "备注")]
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrderDetail.cs
@@ -72,30 +72,30 @@
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "X位")]
        public string XSite { get; set; }
        /// <summary>
        /// å†…包重量
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "内包重量")]
        public float Weight { get; set; }
        /// <summary>
        /// ERP工单
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ERP工单")]
        public string ERPOrder { get; set; }
        /// <summary>
        /// åˆ¶é€ è®¢å•
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "制造订单")]
        public string MoNumber { get; set; }
        /// <summary>
        /// é”€å”®è®¢å•
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "销售订单")]
        public string SaleOrder { get; set; }
        /// <summary>
        /// å®¢æˆ·åŽŸå§‹å‘¨æœŸ
        /// æ‰¹æ¬¡å·
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "客户原始周期")]
        public string CustomDateCode { get; set; }
        /// <summary>
        /// å†…包重量
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "内包重量")]
        public float Weight { get; set; }
        /// <summary>
        /// å·¥ä½œä¸­å¿ƒ
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "工作中心")]
        public string WorkCenter { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "批次号")]
        public string LotNumber { get; set; }
        /// <summary>
        /// åŒ…装时间
        /// </summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_ProOutOrder.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,65 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// æˆå“å‡ºåº“单
    /// </summary>
    [SugarTable(nameof(Dt_ProOutOrder), "成品出库单")]
    public class Dt_ProOutOrder : BaseEntity
    {
        /// <summary>
        /// ä¸»é”®
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        /// <summary>
        /// ä»“库主键
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "仓库主键")]
        public int WarehouseId { get; set; }
        /// <summary>
        /// å‡ºåº“单号
        /// </summary>
        [SugarColumn(IsNullable = false,Length = 20, ColumnDescription = "出库单号")]
        public string ProOutOrderNo { get; set; }
        /// <summary>
        /// è®¢å•类型
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "订单类型")]
        public int ProOrderType { get; set; }
        /// <summary>
        /// è®¢å•状态
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "订单状态")]
        public int ProOrderStatus { get; set; }
        /// <summary>
        /// è®¡åˆ’出货时间
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "计划出货时间")]
        public DateTime PlantShipDate { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
        [SugarColumn(IsNullable = true,Length = 200, ColumnDescription = "备注")]
        public string Remark { get; set; }
        /// <summary>
        /// æˆå“å‡ºåº“单详情
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(Dt_ProOutOrderDetail.ProOrderId), nameof(Id))]
        public List<Dt_ProOutOrderDetail> Details { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_ProOutOrderDetail.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,114 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// æˆå“å‡ºåº“明细单
    /// </summary>
    [SugarTable(nameof(Dt_ProOutOrderDetail), "成品出库明细单")]
    public class Dt_ProOutOrderDetail: BaseEntity
    {
        /// <summary>
        /// ä¸»é”®
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        /// <summary>
        /// æˆå“å‡ºåº“单主键
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "出库单主键")]
        public int ProOrderId { get; set; }
        /// <summary>
        /// å‡ºåº“单行号
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "出库单行号")]
        public int RowId { get; set; }
        /// <summary>
        /// å‡ºåº“单明细状态
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "出库单明细状态")]
        public int ProOrderDetailStatus { get; set; }
        /// <summary>
        /// é”€å”®è®¢å•号
        /// </summary>
        [SugarColumn(IsNullable = false,Length = 50, ColumnDescription = "销售订单号")]
        public string SaleOrder { get; set; }
        /// <summary>
        /// å®¢æˆ·
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "客户")]
        public string Customer { get; set; }
        /// <summary>
        /// å·¥åŽ‚
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "工厂")]
        public string FactoryCode { get; set; }
        /// <summary>
        /// äº§å“ç¼–码
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产品编码")]
        public string PCode { get; set; }
        /// <summary>
        /// äº§å“ç‰ˆæœ¬
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产品版本")]
        public string PVer { get; set; }
        /// <summary>
        /// äº§å“æ‰¹æ¬¡
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "产品批次")]
        public string PLot { get; set; }
        /// <summary>
        /// äº§å“å‘¨æœŸ
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "产品周期")]
        public string DateCode { get; set; }
        /// <summary>
        /// åˆæ ¼PCS数
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "合格PCS数")]
        public float QtyPcs { get; set; }
        /// <summary>
        /// å·²å‡ºæ•°é‡
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "已出数量")]
        public float OverQtyPcs { get; set; }
        /// <summary>
        /// X板数
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "X板数")]
        public string XQty { get; set; }
        /// <summary>
        /// X板位
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "X板位")]
        public string XSite { get; set; }
        /// <summary>
        /// å•位
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "单位")]
        public string Unit { get; set; }
        /// <summary>
        /// å¤‡å“æ•°
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "备品数")]
        public float SpareQty { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_ProStockInfo.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// æˆå“åº“存信息
    /// </summary>
    [SugarTable(nameof(Dt_ProStockInfo), "成品库存信息")]
    public class Dt_ProStockInfo : BaseEntity
    {
        /// <summary>
        /// ä¸»é”®
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        /// <summary>
        /// èƒ¶æ¡†å·
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "胶框号/外箱号")]
        public string PalletCode { get; set; }
        /// <summary>
        /// èƒ¶æ¡†ç±»åž‹
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "胶框类型")]
        public int PalletType { get; set; }
        /// <summary>
        /// è´§ä½ç¼–号
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 30, ColumnDescription = "货位编号")]
        public string LocationCode { get; set; }
        /// <summary>
        /// å‡ºè´§å•号
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 30, ColumnDescription = "出货单号")]
        public string ShipmentOrder { get; set; }
        /// <summary>
        /// ä»“库主键
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "仓库主键")]
        public int WarehouseId { get; set; }
        /// <summary>
        /// åº“存状态
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "库存状态")]
        public int StockStatus { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "备注")]
        public string Remark { get; set; }
        /// <summary>
        /// åº“存明细
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(Dt_ProStockInfoDetail.ProStockId), nameof(Id))]
        public List<Dt_ProStockInfoDetail> proStockInfoDetails { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,115 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// æˆå“åº“存信息明细
    /// </summary>
    [SugarTable(nameof(Dt_ProStockInfoDetail), "成品库存信息明细")]
    public class Dt_ProStockInfoDetail : BaseEntity
    {
        /// <summary>
        /// ä¸»é”®
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        /// <summary>
        /// æˆå“åº“存主键
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "成品库存主键")]
        public int ProStockId { get; set; }
        /// <summary>
        /// å†…包号
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "内包号")]
        public string BagNo { get; set; }
        /// <summary>
        /// äº§å“ç¼–码
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产品编码")]
        public string ProductCode { get; set; }
        /// <summary>
        /// å‡ºåº“数量
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "出库数量")]
        public float OutboundQuantity { get; set; }
        /// <summary>
        /// æˆå“åº“存明细状态
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "成品库存明细状态")]
        public int ProOutDetailStatus { get; set; }
        /// <summary>
        /// ç‰ˆæœ¬
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "版本")]
        public string ProductVersion { get; set; }
        /// <summary>
        /// åŒ…装SET数量
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "包装SET数量")]
        public float SETQty { get; set; }
        /// <summary>
        /// åˆæ ¼PCS数
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "合格PCS数")]
        public float OKPCSQTY { get; set; }
        /// <summary>
        /// å‘¨æœŸ
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "周期")]
        public string DateCode { get; set; }
        /// <summary>
        /// X数
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "X数")]
        public float XQty { get; set; }
        /// <summary>
        /// X位
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "X位")]
        public string XSite { get; set; }
        /// <summary>
        /// å†…包重量
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "内包重量")]
        public float Weight { get; set; }
        /// <summary>
        /// åŒ…装时间
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "包装时间")]
        public DateTime PackingDate { get; set; }
        /// <summary>
        /// æ‰¹æ¬¡å·
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "批次号")]
        public string LotNumber { get; set; }
        /// <summary>
        /// ERP工单
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ERP工单")]
        public string ERPOrder { get; set; }
        /// <summary>
        /// åˆ¶é€ è®¢å•
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "制造订单")]
        public string MoNumber { get; set; }
        /// <summary>
        /// é”€å”®è®¢å•
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "销售订单")]
        public string SaleOrder { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "备注")]
        public string Remark { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail_Hty.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,43 @@
using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// æˆå“åº“存历史信息明细
    /// </summary>
    [SugarTable(nameof(Dt_ProStockInfoDetail_Hty), "成品库存历史信息明细")]
    public class Dt_ProStockInfoDetail_Hty:Dt_ProStockInfoDetail, IBaseHistoryEntity
    {
        /// <summary>
        /// åŽŸè¡¨ä¸»é”®
        /// </summary>
        [ImporterHeader(Name = "原表主键")]
        [ExporterHeader(DisplayName = "原表主键")]
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "原表主键")]
        public int SourceId { get; set; }
        /// <summary>
        /// æ“ä½œç±»åž‹
        /// </summary>
        [ImporterHeader(Name = "操作类型")]
        [ExporterHeader(DisplayName = "操作类型")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "操作类型")]
        public string OperateType { get; set; }
        /// <summary>
        /// ç§»å…¥åŽ†å²æ—¶é—´
        /// </summary>
        [ImporterHeader(Name = "移入历史时间")]
        [ExporterHeader(DisplayName = "移入历史时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "移入历史时间")]
        public DateTime InsertTime { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_ProStockInfo_Hty.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,43 @@
using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// æˆå“åº“存历史信息
    /// </summary>
    [SugarTable(nameof(Dt_ProStockInfo_Hty), "成品库存历史信息")]
    public class Dt_ProStockInfo_Hty:Dt_ProStockInfo, IBaseHistoryEntity
    {
        /// <summary>
        /// åŽŸè¡¨ä¸»é”®
        /// </summary>
        [ImporterHeader(Name = "原表主键")]
        [ExporterHeader(DisplayName = "原表主键")]
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "原表主键")]
        public int SourceId { get; set; }
        /// <summary>
        /// æ“ä½œç±»åž‹
        /// </summary>
        [ImporterHeader(Name = "操作类型")]
        [ExporterHeader(DisplayName = "操作类型")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "操作类型")]
        public string OperateType { get; set; }
        /// <summary>
        /// ç§»å…¥åŽ†å²æ—¶é—´
        /// </summary>
        [ImporterHeader(Name = "移入历史时间")]
        [ExporterHeader(DisplayName = "移入历史时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "移入历史时间")]
        public DateTime InsertTime { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/ProOutOrderDetailRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IOutboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_OutboundRepository
{
    public class ProOutOrderDetailRepository : RepositoryBase<Dt_ProOutOrderDetail>, IProOutOrderDetailRepository
    {
        public ProOutOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/ProOutOrderRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IOutboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_OutboundRepository
{
    public class ProOutOrderRepository : RepositoryBase<Dt_ProOutOrder>, IProOutOrderRepository
    {
        public ProOutOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs
@@ -24,15 +24,18 @@
        public IMesPPCutOutboundOrderService MesPPCutOutboundOrderService { get; }
        public IMesPPCutOutboundOrderDetailService MesPPCutOutboundOrderDetailService { get; }
        public IProOutOrderService ProOutOrderService { get; }
        public IProOutOrderDetailService ProOutOrderDetailService { get; }
        public OutboundService(IOutboundOrderDetailService outboundOrderDetailService,IMesPPOutboundOrderService mesPPOutboundOrderService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService, IMesOutboundOrderService mesOutboundOrderService)
        public OutboundService(IOutboundOrderDetailService outboundOrderDetailService,IMesPPOutboundOrderService mesPPOutboundOrderService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService, IMesOutboundOrderService mesOutboundOrderService, IProOutOrderService proOutOrderService, IProOutOrderDetailService proOutOrderDetailService)
        {
            OutboundOrderDetailService = outboundOrderDetailService;
            OutboundOrderService = outboundOrderService;
            OutboundStockLockInfoService = outboundStockLockInfoService;
            MesOutboundOrderService = mesOutboundOrderService;
            MesPPOutboundOrderService = mesPPOutboundOrderService;
            ProOutOrderService = proOutOrderService;
            ProOutOrderDetailService = proOutOrderDetailService;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderDetailService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_IOutboundRepository;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
namespace WIDESEA_OutboundService
{
    public partial class ProOutOrderDetailService : ServiceBase<Dt_ProOutOrderDetail, IProOutOrderDetailRepository>, IProOutOrderDetailService
    {
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        public IProOutOrderDetailRepository Repository => BaseDal;
        public ProOutOrderDetailService(IProOutOrderDetailRepository BaseDal, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
        {
            _unitOfWorkManage = unitOfWorkManage;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,140 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.OrderEnum;
using WIDESEA_Common.WareHouseEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.ERP;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_IOutboundRepository;
using WIDESEA_IOutboundService;
using WIDESEA_IRecordService;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_OutboundService
{
    public partial class ProOutOrderService : ServiceBase<Dt_ProOutOrder, IProOutOrderRepository>, IProOutOrderService
    {
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        private readonly IBasicRepository _basicRepository;
        private readonly IMapper _mapper;
        public IProOutOrderRepository Repository => BaseDal;
        public ProOutOrderService(IProOutOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IBasicRepository basicRepository, IMapper mapper) : base(BaseDal)
        {
            _unitOfWorkManage = unitOfWorkManage;
            _basicRepository = basicRepository;
            _mapper = mapper;
        }
        /// <summary>
        /// æŽ¥æ”¶ERP成品出库单
        /// </summary>
        /// <returns></returns>
        public WebResponseContent ProductDeliveryOrder(ErpProOutOrderDTO outOrderDTO)
        {
            try
            {
                return outOrderDTO.Way switch
                {
                    1 => AddDeliveryOrder(outOrderDTO),
                    2 => UpdateDeliveryOrder(outOrderDTO),
                    3 => DeleteDeliveryOrder(outOrderDTO),
                    _ => WebResponseContent.Instance.Error($"操作类型不存在,Way:{outOrderDTO.Way}"),
                };
            }
            catch (Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        /// <summary>
        /// æ–°å¢žæˆå“å‡ºåº“单
        /// </summary>
        /// <returns></returns>
        public WebResponseContent AddDeliveryOrder(ErpProOutOrderDTO outOrderDTO)
        {
            WebResponseContent content=new WebResponseContent();
            try
            {
                if (BaseDal.QueryFirst(x => x.ProOutOrderNo == outOrderDTO.OrderNo) != null)
                {
                    return content.Error($"出库单号{outOrderDTO.OrderNo}已存在!");
                }
                Dt_Warehouse warehouse=null;
                if (outOrderDTO.OType==1 && string.IsNullOrEmpty(outOrderDTO.WaType))
                {
                    warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode==WarehouseEnum.HA71.ToString());
                }
                else if (outOrderDTO.OType==2)
                {
                    warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA101.ToString());
                }
                List<Dt_ProOutOrderDetail> proOutOrderDetails = new List<Dt_ProOutOrderDetail>();
                foreach (var item in outOrderDTO.OrderDetails)
                {
                    proOutOrderDetails.Add(_mapper.Map<Dt_ProOutOrderDetail>(item));
                }
                Dt_ProOutOrder  proOutOrder= new Dt_ProOutOrder()
                {
                    ProOutOrderNo= outOrderDTO.OrderNo,
                    WarehouseId= warehouse.WarehouseId,
                    ProOrderType= outOrderDTO.OType,
                    ProOrderStatus=OutOrderStatusEnum.未开始.ObjToInt(),
                    PlantShipDate= outOrderDTO.PlantShipDate.ObjToDate(),
                    Remark= outOrderDTO.Note,
                    Details= proOutOrderDetails
                };
                Db.InsertNav(proOutOrder).Include(x => x.Details).ExecuteCommand();
                content.OK("成功");
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        /// <summary>
        /// æ›´æ–°æˆå“å‡ºåº“单
        /// </summary>
        /// <returns></returns>
        public WebResponseContent UpdateDeliveryOrder(ErpProOutOrderDTO outOrderDTO)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        /// <summary>
        /// åˆ é™¤æˆå“å‡ºåº“单
        /// </summary>
        /// <returns></returns>
        public WebResponseContent DeleteDeliveryOrder(ErpProOutOrderDTO outOrderDTO)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoDetailRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_StockRepository
{
    public class ProStockInfoDetailRepository : RepositoryBase<Dt_ProStockInfoDetail>, IProStockInfoDetailRepository
    {
        public ProStockInfoDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoDetail_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_StockRepository
{
    public class ProStockInfoDetail_HtyRepository : RepositoryBase<Dt_ProStockInfoDetail_Hty>, IProStockInfoDetail_HtyRepository
    {
        public ProStockInfoDetail_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_StockRepository
{
    public class ProStockInfoRepository : RepositoryBase<Dt_ProStockInfo>, IProStockInfoRepository
    {
        public ProStockInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfo_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_StockRepository
{
    public class ProStockInfo_HtyRepository : RepositoryBase<Dt_ProStockInfo_Hty>, IProStockInfo_HtyRepository
    {
        public ProStockInfo_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockRepository.cs
@@ -16,13 +16,21 @@
        public IStockInfoDetail_HtyRepository StockInfoDetail_HtyRepository { get; }
        public IStockInfo_HtyRepository StockInfo_HtyRepository { get; }
        public IProStockInfoRepository ProStockInfoRepository { get; }
        public IProStockInfoDetailRepository ProStockInfoDetailRepository { get; }
        public IProStockInfo_HtyRepository ProStockInfo_HtyRepository { get; }
        public IProStockInfoDetail_HtyRepository ProStockInfoDetail_HtyRepository { get; }
        public StockRepository(IStockInfoDetailRepository stockInfoDetailRepository, IStockInfoRepository stockInfoRepository, IStockInfoDetail_HtyRepository stockInfoDetail_HtyRepository,IStockInfo_HtyRepository stockInfo_HtyRepository)
        public StockRepository(IStockInfoDetailRepository stockInfoDetailRepository, IStockInfoRepository stockInfoRepository, IStockInfoDetail_HtyRepository stockInfoDetail_HtyRepository,IStockInfo_HtyRepository stockInfo_HtyRepository,IProStockInfoRepository proStockInfoRepository,IProStockInfoDetailRepository proStockInfoDetailRepository,IProStockInfo_HtyRepository proStockInfo_HtyRepository,IProStockInfoDetail_HtyRepository proStockInfoDetail_HtyRepository)
        {
            StockInfoDetailRepository = stockInfoDetailRepository;
            StockInfoRepository = stockInfoRepository;
            StockInfoDetail_HtyRepository = stockInfoDetail_HtyRepository;
            StockInfo_HtyRepository = stockInfo_HtyRepository;
            ProStockInfoRepository=proStockInfoRepository;
            ProStockInfoDetailRepository = proStockInfoDetailRepository;
            ProStockInfo_HtyRepository = proStockInfo_HtyRepository;
            ProStockInfoDetail_HtyRepository = proStockInfoDetail_HtyRepository;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoDetailService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_IStockRepository;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_StockService
{
    public partial class ProStockInfoDetailService : ServiceBase<Dt_ProStockInfoDetail, IProStockInfoDetailRepository>, IProStockInfoDetailService
    {
        public IProStockInfoDetailRepository Repository => BaseDal;
        public ProStockInfoDetailService(IProStockInfoDetailRepository BaseDal) : base(BaseDal)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoDetail_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_IStockRepository;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_StockService
{
    public partial class ProStockInfoDetail_HtyService : ServiceBase<Dt_ProStockInfoDetail_Hty, IProStockInfoDetail_HtyRepository>, IProStockInfoDetail_HtyService
    {
        public IProStockInfoDetail_HtyRepository Repository => BaseDal;
        public ProStockInfoDetail_HtyService(IProStockInfoDetail_HtyRepository BaseDal) : base(BaseDal)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_IStockRepository;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_StockService
{
    public partial class ProStockInfoService : ServiceBase<Dt_ProStockInfo, IProStockInfoRepository>, IProStockInfoService
    {
        public IProStockInfoRepository Repository => BaseDal;
        public IStockRepository _stockRepository;
        public ProStockInfoService(IProStockInfoRepository BaseDal,IStockRepository stockRepository) : base(BaseDal)
        {
            _stockRepository = stockRepository;
        }
        public WebResponseContent UnBindStock(List<Dt_ProStockInfoDetail> proStockInfoDetails)
        {
            WebResponseContent content = new WebResponseContent();
            //根据内包号进行库存扣除
            try
            {
                List<Dt_ProStockInfoDetail> delProStockDetails=new List<Dt_ProStockInfoDetail>();
                //foreach (var item in collection)
                //{
                //    Dt_ProStockInfoDetail delProStockDetal=
                //}
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfo_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_IStockRepository;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_StockService
{
    public partial class ProStockInfo_HtyService : ServiceBase<Dt_ProStockInfo_Hty, IProStockInfo_HtyRepository>, IProStockInfo_HtyService
    {
        public IProStockInfo_HtyRepository Repository => BaseDal;
        public ProStockInfo_HtyService(IProStockInfo_HtyRepository BaseDal) : base(BaseDal)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetail_HtyService.cs
@@ -12,9 +12,9 @@
{
    public partial class StockInfoDetail_HtyService : ServiceBase<Dt_StockInfoDetail_Hty, IStockInfoDetail_HtyRepository>, IStockInfoDetail_HtyService
    {
        public IStockInfoDetail_HtyRepository Repository => BaseDal;
        public StockInfoDetail_HtyService(IStockInfoDetail_HtyRepository BaseDal) : base(BaseDal)
        {
        }
        public IStockInfoDetail_HtyRepository Repository => BaseDal;
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs
@@ -291,7 +291,46 @@
            }
            return content;
        }
        /// <summary>
        /// WMS同步成品出库至MES
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public WebResponseContent ShipmentOrderSync(MesShipmentOrderSync model)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.WMS_MES_ShipmentOrderSync.ToString());
                MESRoot<MesShipmentOrderSync> root = new MESRoot<MesShipmentOrderSync>()
                {
                    From = "WMS",
                    DateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                    Content = model
                };
                JsonSerializerSettings settings = new JsonSerializerSettings
                {
                    ContractResolver = new CamelCasePropertyNamesContractResolver()
                };
                string request = JsonConvert.SerializeObject(root, settings);
                string response = HttpMesHelper.Post(apiInfo.ApiAddress, request);
                MesResponseContent mesResponseContent = response.DeserializeObject<MesResponseContent>();
                //调用接口
                if (mesResponseContent.BSucc == true)
                {
                    content.OK(mesResponseContent.StrMsg);
                }
                else
                {
                    content.Error(mesResponseContent.StrMsg);
                }
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        /// <summary>
        /// 
        /// </summary>
@@ -939,21 +978,117 @@
                {
                    return content.Error("未找到仓库信息");
                }
                //判断是否MES内包信息是否重复
                List<Dt_MesProInOrderDetail> mesProInOrderDetails = new List<Dt_MesProInOrderDetail>();
                foreach (var item in bagInfoModel.BagDetails)
                {
                    mesProInOrderDetails.Add(_mapper.Map<Dt_MesProInOrderDetail>(item));
                    foreach (var child in item.BagItems)
                    {
                        Dt_MesProInOrderDetail mesProInOrderDetail=new Dt_MesProInOrderDetail()
                        {
                            BagNo=item.BagNo,
                            ProductCode=item.ProductCode,
                            ProductVersion=item.ProductVersion,
                            SETQty=child.SETQty,
                            OKPCSQTY=child.OKPCSQTY,
                            DateCode=item.DateCode,
                            XQty=child.XQty,
                            XSite=child.XSite,
                            Weight=item.Weight,
                            PackingDate=item.PackingDate,
                            LotNumber=child.LotNumber,
                            ERPOrder=child.ERPOrder,
                            SaleOrder=child.SaleOrder,
                            MoNumber=child.MoNumber,
                        };
                        mesProInOrderDetails.Add(mesProInOrderDetail);
                    }
                }
                List<Dt_ProStockInfoDetail> proStockInfoDetails = new List<Dt_ProStockInfoDetail>();
                foreach (var item in mesProInOrderDetails)
                {
                    proStockInfoDetails.Add(_mapper.Map<Dt_ProStockInfoDetail>(item));
                }
                Dt_MesProInOrder mesProInOrder = new Dt_MesProInOrder()
                {
                    WarehouseId = warehouse.WarehouseId,
                    BatchNo = bagInfoModel.BatchNo,
                    WorkCenter=bagInfoModel.WorkCenter,
                    MesProStatus = InOrderStatusEnum.未开始.ObjToInt(),
                    UnPackStock=bagInfoModel.UnPackStock,
                    Details= mesProInOrderDetails
                };
                Dt_ProStockInfo proStockInfo = new Dt_ProStockInfo()
                {
                    PalletCode = bagInfoModel.BatchNo,
                    PalletType = 1,
                    WarehouseId = warehouse.WarehouseId,
                    StockStatus = StockStatusEmun.组盘暂存.ObjToInt(),
                    proStockInfoDetails= proStockInfoDetails
                };
                _unitOfWorkManage.BeginTran();
                Db.InsertNav(mesProInOrder).Include(x=>x.Details).ExecuteCommand();
                Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand();
                _unitOfWorkManage.CommitTran();
                return content.OK("接收成功");
            }
            catch (Exception ex)
            {
                _unitOfWorkManage.RollbackTran();
                content.Error(ex.Message);
            }
            return content;
        }
        public MesResponseContent BoxStockin(MesBoxInfoModel boxInfoModel)
        {
            MesResponseContent content = new MesResponseContent();
            try
            {
                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode==WarehouseEnum.HA101.ToString());
                //获取MES内包信息
                List<Dt_MesProInOrderDetail> mesProInOrderDetails = new List<Dt_MesProInOrderDetail>();
                foreach (var item in boxInfoModel.Bags)
                {
                    foreach (var child in item.BagItems)
                    {
                        Dt_MesProInOrderDetail mesProInOrderDetail = new Dt_MesProInOrderDetail()
                        {
                            BagNo = item.BagNo,
                            ProductCode = item.ProductCode,
                            ProductVersion = item.ProductVersion,
                            SETQty = child.SETQty,
                            OKPCSQTY = child.OKPCSQTY,
                            DateCode = item.DateCode,
                            XQty = child.XQty,
                            XSite = child.XSite,
                            Weight = item.Weight,
                            PackingDate = item.PackingDate,
                            LotNumber = child.LotNumber,
                            ERPOrder = child.ERPOrder,
                            SaleOrder = child.SaleOrder,
                            MoNumber = child.MoNumber,
                        };
                        mesProInOrderDetails.Add(mesProInOrderDetail);
                    }
                }
                List<Dt_ProStockInfoDetail> proStockInfoDetails = new List<Dt_ProStockInfoDetail>();
                foreach (var item in mesProInOrderDetails)
                {
                    proStockInfoDetails.Add(_mapper.Map<Dt_ProStockInfoDetail>(item));
                }
                Dt_ProStockInfo proStockInfo = new Dt_ProStockInfo()
                {
                    PalletCode = boxInfoModel.BoxNo,
                    PalletType = 0,
                    WarehouseId = warehouse.WarehouseId,
                    ShipmentOrder= boxInfoModel.ShipmentOrder,
                    StockStatus = StockStatusEmun.入库完成.ObjToInt(),
                    proStockInfoDetails = proStockInfoDetails
                };
                _unitOfWorkManage.BeginTran();
                Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand();
                _unitOfWorkManage.CommitTran();
                return content.OK("外包接收成功");
            }
            catch (Exception ex)
            {
@@ -961,7 +1096,6 @@
            }
            return content;
        }
        /// <summary>
        /// æˆå“è¿”工提库
        /// </summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs
@@ -152,7 +152,7 @@
                        (int)OutOrderTypeEnum.Quality => TaskTypeEnum.OutQuality,
                        _ => new TaskTypeEnum()
                    };
                    tasks = GetTasks(result.Item1, TaskTypeEnum.Outbound);
                    tasks = GetTasks(result.Item1, typeEnum);
                    result.Item2.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
                    result.Item3.ForEach(x =>
                    {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs
@@ -124,7 +124,17 @@
            if (content.Status) return Instance.OK();
            else return Instance.Error(content.Message);
        }
        /// <summary>
        /// æŽ¥æ”¶ERP成品出库单信息
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ProductDeliveryOrder"), AllowAnonymous, MethodParamsValidate]
        public ErpResponseContent ProductDeliveryOrder([FromBody] Root<ErpProOutOrderDTO> erpProOutOrder)
        {
            WebResponseContent content = _outboundService.ProOutOrderService.ProductDeliveryOrder(erpProOutOrder.Content);
            if (content.Status) return Instance.OK();
            else return Instance.Error(content.Message);
        }
        /// <summary>
        /// æŽ¥æ”¶ERP退料单信息
        /// </summary>
@@ -189,5 +199,22 @@
        {
            return _invokeERPService.InvokeTakeStockApi(takeModel);
        }
        /// <summary>
        /// ERP成品入库上报接口调用
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("InvokeProInApi"), AllowAnonymous]
        public string InvokeProInApi([FromBody] ERPProInboundModel inboundModel)
        {
            return _invokeERPService.InvokeProInApi(inboundModel);
        }
        /// <summary>
        /// ERP成品出库上报接口调用
        /// </summary>
        [HttpPost, Route("InvokeProOutApi"), AllowAnonymous]
        public string InvokeProOutApi([FromBody] ERPProOutOrderModel outOrderModel)
        {
            return _invokeERPService.InvokeProOutApi(outOrderModel);
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs
@@ -160,7 +160,7 @@
            return _taskService.RworkTask(model);
        }
        /// <summary>
        /// MES成品入库单接收
        /// MES成品内包信息接收
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
@@ -169,5 +169,24 @@
        {
            return _taskService.BagInfoSync(model.Content);
        }
        /// <summary>
        /// MES成品外包信息接收
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost, Route("BoxStockin"), AllowAnonymous]
        public MesResponseContent BoxStockin([FromBody] Root<MesBoxInfoModel> model)
        {
            return _taskService.BoxStockin(model.Content);
        }
        /// <summary>
        /// MES成品出库接口调用
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ShipmentOrderSync"), AllowAnonymous]
        public WebResponseContent ShipmentOrderSync([FromBody] MesShipmentOrderSync model)
        {
            return _taskService.ShipmentOrderSync(model);
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/ProOutOrderController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Outbound
{
    /// <summary>
    /// æˆå“å‡ºåº“单
    /// </summary>
    [Route("api/ProOutOrder")]
    [ApiController]
    public class ProOutOrderController : ApiBaseController<IProOutOrderService, Dt_ProOutOrder>
    {
        public ProOutOrderController(IProOutOrderService service) : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/ProOutOrderDetailController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Outbound
{
    /// <summary>
    /// æˆå“å‡ºåº“单明细
    /// </summary>
    [Route("api/ProOutOrderDetail")]
    [ApiController]
    public class ProOutOrderDetailController : ApiBaseController<IProOutOrderDetailService, Dt_ProOutOrderDetail>
    {
        public ProOutOrderDetailController(IProOutOrderDetailService service) : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/ProStockInfoController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Stock
{
    /// <summary>
    /// æˆå“åº“å­˜
    /// </summary>
    [Route("api/ProStockInfo")]
    [ApiController]
    public class ProStockInfoController : ApiBaseController<IProStockInfoService, Dt_ProStockInfo>
    {
        public ProStockInfoController(IProStockInfoService service) : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/ProStockInfoDetailController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Stock
{
    /// <summary>
    /// æˆå“åº“存明细
    /// </summary>
    [Route("api/ProStockInfoDetail")]
    [ApiController]
    public class ProStockInfoDetailController : ApiBaseController<IProStockInfoDetailService, Dt_ProStockInfoDetail>
    {
        public ProStockInfoDetailController(IProStockInfoDetailService service) : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/ProStockInfoDetail_HtyController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Stock
{
    /// <summary>
    /// æˆå“åº“存历史
    /// </summary>
    [Route("api/ProStockInfoDetail_Hty")]
    [ApiController]
    public class ProStockInfoDetail_HtyController : ApiBaseController<IProStockInfoDetail_HtyService, Dt_ProStockInfoDetail_Hty>
    {
        public ProStockInfoDetail_HtyController(IProStockInfoDetail_HtyService service) : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/ProStockInfo_HtyController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Stock
{
    /// <summary>
    /// æˆå“åº“存历史
    /// </summary>
    [Route("api/ProStockInfo_Hty")]
    [ApiController]
    public class ProStockInfo_HtyController : ApiBaseController<IProStockInfo_HtyService, Dt_ProStockInfo_Hty>
    {
        public ProStockInfo_HtyController(IProStockInfo_HtyService service) : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs
@@ -6,8 +6,10 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.OrderEnum;
using WIDESEA_Common.StockEnum;
using WIDESEA_Core.Helper;
using WIDESEA_DTO;
using WIDESEA_DTO.ERP;
using WIDESEA_DTO.Inbound;
using WIDESEA_DTO.MES;
using WIDESEA_DTO.Outbound;
@@ -35,6 +37,8 @@
            CreateMap<Dt_Task, WMSTaskDTO>();
            CreateMap<MESBagDetail, Dt_MesProInOrderDetail>().ForMember(x => x.OverInQuantity, b => b.MapFrom(b => 0));
            CreateMap<ErpProOutOrderDetailds, Dt_ProOutOrderDetail>().ForMember(x => x.ProOrderDetailStatus, b => b.MapFrom(b => 0)).ForMember(x => x.OverQtyPcs, b => b.MapFrom(b => 0));
            CreateMap<Dt_MesProInOrderDetail, Dt_ProStockInfoDetail>().ForMember(x => x.ProOutDetailStatus, b => b.MapFrom(b => StockStatusEmun.组盘暂存.ObjToInt())).ForMember(x => x.OutboundQuantity, b => b.MapFrom(b => 0));
        }
    }
}
ÏîÄ¿×ÊÁÏ/½Ó¿ÚÎĵµ/»´°²ÌØ´´¿Æ¼¼ÖÇÄÜÖÆÔìÏîÄ¿MES-WMS½Ó¿Ú¹æ·¶.xlsx
Binary files differ