wangxinhui
2025-09-26 9ae0890dd74771ba9edd44d4830e0de37f8d9938
MES接口优化,老厂排程优化等
已添加36个文件
已重命名4个文件
已删除20个文件
已修改26个文件
8002 ■■■■ 文件已修改
项目代码/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Server/appsettings.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService_Operate.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPA.cs 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPB.cs 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPC.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPH.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/码垛/MDJob_CP.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/extend/PPStockSelect.vue 332 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/extend/ProSelectedStock.vue 261 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/extend/ProStockSelect.vue 448 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/extend/SelectedStock.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/extend/StockSelect.vue 318 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/extend/addMesOutOrder.vue 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/extend/mesPPCutOutOrderDetail.vue 443 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/extend/mesPPoutOrderDetail.vue 421 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/extend/outSGOrderDetail.vue 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/extend/proOutboundOrderDetail.vue 615 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/mesOutboundOrder.js 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/mesPPCutOutboundOrder.js 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/mesPPCutOutboundOrderDetail.js 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/mesPPOutboundOrderDetail.js 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/outBSTOrder.js 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/outMESOrder.js 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/outSGOrder.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/outSGOrderDetail.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/outbound/proOutOrder.js 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/router/viewGird.js 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/outbound/mesOutboundOrder.vue 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/outbound/mesPPCutOutboundOrder.vue 352 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/outbound/mesPPCutOutboundOrderDetail.vue 256 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/outbound/mesPPOutboundOrder.vue 265 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/outbound/mesPPOutboundOrderDetail.vue 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/outbound/outMESOrder.vue 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/outbound/outSGOrder.vue 283 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/outbound/outSGOrderDetail.vue 221 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/outbound/proOutOrder.vue 363 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/outbound/proOutOrderDetail.vue 278 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_DTO/ERP/SGOutOrderDTO.cs 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_DTO/MES/MESManualIssueDTO.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_DTO/MES/MESOrderStopDTO.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_DTO/MES/MESProInDTO.cs 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_DTO/MES/MESReturnIssueDTO.cs 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_DTO/MES/OutMESOrderDTO.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IInboundRepository/IInboundRepository.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IInboundRepository/IMESProInOrderInfoRepository.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IInboundService/IInboundService.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IInboundService/IMESProInOrderInfoService.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutSGOrderDetailRepository.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutSGOrderRepository.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutboundRepository.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IOutMESOrderService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IOutSGOrderDetailService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IOutSGOrderService.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IOutboundService.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_InboundRepository/InboundRepository.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_InboundRepository/MESProInOrderInfoRepository.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_InboundService/InboundService.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_InboundService/MESProInOrderInfoService.cs 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_Model/Models/Inbound/Dt_MESProInOrderInfo.cs 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutMESOrder.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrder.cs 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrderDetail.cs 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_OutboundRepository/OutSGOrderDetailRepository.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_OutboundRepository/OutSGOrderRepository.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_OutboundRepository/OutboundRepository.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderService.cs 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutboundService.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpBSTController.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Inbound/MESProInOrderInfoController.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutSGOrderController.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutSGOrderDetailController.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/接口协议/博思通利拓接口.V1.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/接口协议/博斯通利拓接口.V2.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/接口协议/龙利得MES接口.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/伸缩货叉接驳台IP分配表.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -208,13 +208,6 @@
        AgvResponseContent AgvUpdateTask(AgvUpdateDTO agvUpdateModel);
        /// <summary>
        ///
        /// </summary>
        /// <param name="taskNum"></param>
        /// <returns></returns>
        WebResponseContent SendSecureReplyToAgv(int taskNum);
        /// <summary>
        /// æ›´æ–°ä»»åŠ¡ä¿¡æ¯åŠæ·»åŠ ä»»åŠ¡æ˜Žç»†è®°å½•
        /// </summary>
        /// <param name="task">任务原对象实例(未修改的数据对象)</param>
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs
@@ -55,10 +55,6 @@
            AgvResponse agvResponse = new AgvResponse();
            try
            {
                if (secureApplyModel.ReceiveTaskID=="100")
                {
                    return agvResponse.OK("成功", "0");
                }
                var task = _taskRepository.QueryFirst(x => secureApplyModel.ReceiveTaskID.ObjToInt() == x.TaskNum);
                if (task == null) throw new Exception("未找到任务");
                if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
@@ -64,17 +64,6 @@
            return Service.RollbackTaskStatusToLast(taskNum);
        }
        /// <summary>
        /// å›žå¤AGV安全信号
        /// </summary>
        /// <param name="taskNum"></param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("SendSecureReplyToAgv")]
        public WebResponseContent SendSecureReplyToAgv(int taskNum)
        {
            return Service.SendSecureReplyToAgv(taskNum);
        }
        [HttpPost, HttpGet, Route("GetRouteEndPoint"), AllowAnonymous]
        public WebResponseContent GetRouteEndPoint(string startPoint, int routeType)
        {
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Server/appsettings.json
@@ -14,10 +14,10 @@
  //连接字符串
  //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
  //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WCSLLD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WCSLLD;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=192.168.35.3;Initial Catalog=WIDESEA_WCSLLD;User ID=sa;Password=Sa123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=192.168.35.3;Initial Catalog=TestWCS_TC;User ID=sa;Password=Sa123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=TESTWCSCP_WCS;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "WMSConnectionStrings": "Data Source=.;Initial Catalog=WIDESEA_WMSLLD;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "WMSConnectionStrings": "Data Source=192.168.35.3;Initial Catalog=WIDESEA_WMSLLD;User ID=sa;Password=Sa123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"WMSConnectionStrings": "Data Source=.;Initial Catalog=WIDESEA_WMSLLD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"WMSConnectionStrings": "Data Source=10.30.4.92;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //跨域
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -100,7 +100,9 @@
                }
            }
        }
        /// <summary>
        /// ä»»åŠ¡å®Œæˆ
        /// </summary>
        public WebResponseContent TaskCompleted(int taskNum)
        {
            try
@@ -482,41 +484,6 @@
            }
            return content;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="palletCode"></param>
        /// <param name="sourceAddress"></param>
        /// <param name="roadway"></param>
        /// <returns></returns>
        //public WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string roadway)
        //{
        //    WebResponseContent content = new WebResponseContent();
        //    try
        //    {
        //        string address = AppSettings.Get("WMSApiAddress");
        //        if (string.IsNullOrEmpty(address))
        //        {
        //            return WebResponseContent.Instance.Error($"未找到WMSApi地址");
        //        }
        //        string responseStr = HttpHelper.Get($"{address}/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={roadway}&palletCode={palletCode}");
        //        WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
        //        if (responseContent != null && responseContent.Status && responseContent.Data != null)
        //        {
        //            WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.ToString());
        //            if (taskDTO != null)
        //            {
        //                content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
        //            }
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        content = WebResponseContent.Instance.Error(ex.Message);
        //    }
        //    return content;
        //}
        /// <summary>
        /// å‘WMS申请分配货位
@@ -723,35 +690,7 @@
            return content;
        }
        public WebResponseContent SendSecureReplyToAgv(int taskNum)
        {
            try
            {
                Dt_Task WaitToTask = BaseDal.QueryFirst(x => x.TaskState == TaskStatusEnum.AGV_WaitToExecute.ObjToInt() && x.TaskNum == taskNum);
                AgvSecureReplyDTO replyDTO = new AgvSecureReplyDTO()
                {
                    ReqCode = Guid.NewGuid().ToString().Replace("-", ""), //WaitToTask.TaskNum.ToString(),
                    taskCode = WaitToTask.AgvTaskNum,
                };
                WebResponseContent content = AgvSecureReply(replyDTO);
                if (content.Status)
                {
                    WaitToTask.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt();
                }
                else
                {
                    WaitToTask.TaskState = TaskStatusEnum.Exception.ObjToInt();
                    WaitToTask.ExceptionMessage = content.Message;
                }
                UpdateData(WaitToTask);
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        /// <summary>
        /// //判断移库货位任务是否已存在,如存在先执行
        /// </summary>
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService_Operate.cs
@@ -99,11 +99,11 @@
            BaseDal.UpdateData(task);
            //同步到WMS
            string address = AppSettings.Get("WMSApiAddress");
            if (!string.IsNullOrEmpty(address))
            {
                HttpHelper.Post($"{address}/api/Task/UpdateTaskInfo", task.Serialize());
            }
            //string address = AppSettings.Get("WMSApiAddress");
            //if (!string.IsNullOrEmpty(address))
            //{
            //    HttpHelper.Post($"{address}/api/Task/UpdateTaskInfo", task.Serialize());
            //}
            _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, stringBuilder.ToString());
        }
    }
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs
@@ -97,6 +97,7 @@
        ///7:申请料框
        ///8:料框到位
        ///9:执行命令中
        ///10:空盘准备
        ///11:满盘准备
        /// </summary>
        public short Command { get; set; }
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/³ÉÆ·²Ö/ConveyorLineJob_CPA.cs
@@ -68,7 +68,7 @@
                OtherDevice device = (OtherDevice)value;
                List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList();
                //获取有协议的输送线
                List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
                List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData();
                foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
                {
                    DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
@@ -82,16 +82,32 @@
                            Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode);
                            if (task != null)
                            {
                                //分配货位
                                string? local = "SC01_CP-002-064-008-01";
                                if (!string.IsNullOrEmpty(local))
                                Dt_StationManger stationManger = stationMangers.FirstOrDefault(x => x.StationCode == task.SourceAddress);
                                if (stationManger != null)
                                {
                                    task.CurrentAddress = item.StackerCraneStationCode;
                                    task.TargetAddress = local;
                                    task.NextAddress = local;
                                    task.DeviceCode = item.StackerCraneCode;
                                    _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute);
                                    WriteInfo(item.StationName, $"任务号:{task.TaskNum}进行堆垛机入库");
                                    string? local = "";
                                    switch (stationManger.AGVStationCode.ObjToInt() % 2)
                                    {
                                        case 1:
                                            local = task.Roadway + "-001-062-001-01";
                                            break;
                                        case 0:
                                            local = task.Roadway + "-002-062-001-01";
                                            break;
                                        default:
                                            WriteError(item.StationName, $"未找到可分配巷道{task.TaskNum}");
                                            break;
                                    }
                                    //分配货位
                                    if (!string.IsNullOrEmpty(local))
                                    {
                                        task.CurrentAddress = item.StackerCraneStationCode;
                                        task.TargetAddress = local;
                                        task.NextAddress = local;
                                        task.DeviceCode = item.StackerCraneCode;
                                        _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute);
                                        WriteInfo(item.StationName, $"任务号:{task.TaskNum}进行堆垛机入库");
                                    }
                                }
                            }
                        }
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/³ÉÆ·²Ö/ConveyorLineJob_CPB.cs
@@ -68,7 +68,7 @@
            {
                OtherDevice device = (OtherDevice)value;
                List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).Distinct().ToList();
                List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
                List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData();
                foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
                {
                    DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
@@ -87,36 +87,65 @@
                                //string roadWay = _taskService.AssignCPRoadwayNo().Data.ToString();
                                //if (!string.IsNullOrEmpty(roadWay))
                                //{
                                    List<Dt_Router> routers = _routerService.QueryNextRoutes(item.StationCode, "SC01_CP", task.TaskType);
                                    Dt_Router? router = routers.FirstOrDefault();
                                    if (routers == null || routers.Count == 0 || router == null)
                                    {
                                        WriteError(item.StationName, $"未找到对应路由信息,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                        continue;
                                    }
                                    if (routers.Count > 1)
                                    {
                                        WriteError(item.StationName, $"路由信息配置错误,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                        continue;
                                    }
                                    device.SetValue(W_ConveyorLineCPDB.W_TargetAddress, router.NextPosi, item.StationCode);
                                    device.SetValue(W_ConveyorLineCPDB.W_TaskNo, task.TaskNum, item.StationCode);
                                    device.SetValue(W_ConveyorLineCPDB.W_Command, 1, item.StationCode);
                                    task.CurrentAddress = item.StationCode;
                                    task.NextAddress = router.NextPosi;
                                    task.PalletCode = DateTime.Now.ToString("yyMMddHHmmss");//todo临时
                                    task.Roadway = "SC01_CP";
                                    task.DeviceCode = router.ChildPosiDeviceCode;
                                    _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing);
                                    WriteInfo(item.StationName, $"任务号{conveyorLineInfoRead.TaskNo}下一步");
                                //}
                                Dt_StationManger stationManger = stationMangers.FirstOrDefault(x=>x.StationCode== task.SourceAddress);
                                if (stationManger != null)
                                {
                                    string roadWay = "";
                                    switch (stationManger.AGVStationCode.ObjToInt() % 5)
                                    {
                                        case 1:
                                            roadWay = "SC01_CP";
                                            break;
                                        case 2:
                                            roadWay = "SC02_CP";
                                            break;
                                        case 3:
                                            roadWay = "SC03_CP";
                                            break;
                                        case 4:
                                            roadWay = "SC04_CP";
                                            break;
                                        case 0:
                                            roadWay = "SC05_CP";
                                            break;
                                        default:
                                            WriteError(item.StationName, $"未找到可分配巷道{task.TaskNum}");
                                            break;
                                    }
                                    if (!string.IsNullOrEmpty(roadWay))
                                    {
                                        List<Dt_Router> routers = _routerService.QueryNextRoutes(item.StationCode, roadWay, task.TaskType);
                                        Dt_Router? router = routers.FirstOrDefault();
                                        if (routers == null || routers.Count == 0 || router == null)
                                        {
                                            WriteError(item.StationName, $"未找到对应路由信息,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                            continue;
                                        }
                                        if (routers.Count > 1)
                                        {
                                            WriteError(item.StationName, $"路由信息配置错误,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                            continue;
                                        }
                                        device.SetValue(W_ConveyorLineCPDB.W_TargetAddress, router.NextPosi, item.StationCode);
                                        device.SetValue(W_ConveyorLineCPDB.W_TaskNo, task.TaskNum, item.StationCode);
                                        device.SetValue(W_ConveyorLineCPDB.W_Command, 1, item.StationCode);
                                        task.CurrentAddress = item.StationCode;
                                        task.NextAddress = router.NextPosi;
                                        task.PalletCode = DateTime.Now.ToString("yyMMddHHmmss");//todo临时
                                        task.Roadway = roadWay;
                                        task.DeviceCode = router.ChildPosiDeviceCode;
                                        _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing);
                                        WriteInfo(item.StationName, $"任务号{conveyorLineInfoRead.TaskNo}下一步");
                                    }
                                }
                            }
                        }
                    }
                    else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && deviceProRead != null)
                    {
                    {//入库RGV接驳位交互
                        R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
                        //入库RGV接驳位交互
                        if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 4 && conveyorLineInfoRead.TaskNo > 0)
                        {
                            Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == device.DeviceCode);
@@ -145,41 +174,41 @@
                    {//叠盘机工位叫料
                        R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
                        
                        if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 7 && conveyorLineInfoRead.TaskNo <= 0)
                        {
                            Dt_Task task = _taskRepository.QueryFirst(x =>  x.TargetAddress == item.StationCode && _taskService.TaskOutboundTypes.Contains(x.TaskType));
                            if (task == null)
                            {
                                //请求任务
                                WMSTaskDTO taskDTO = new WMSTaskDTO()
                                {
                                    Id = 1,
                                    SourceAddress = "SC02_CP-001-064-001-01",
                                    TaskNum = DateTime.Now.ToString("mmss").ObjToInt(),
                                    PalletCode = "" + DateTime.Now.ToString("mmss"),
                                    RoadWay = "SC02_CP",
                                    TaskType = 160,
                                    TaskStatus = TaskStatusEnum.New.ObjToInt(),
                                    TargetAddress = item.StationCode,
                                    Grade = 0,
                                    WarehouseId = 1,
                                    PalletType = 1
                                };
                                WriteInfo(item.StationName, $"任务号{conveyorLineInfoRead.TaskNo}生成,下一步");
                                _taskService.ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
                            }
                        }
                        //叠盘任务完成交互
                        else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 8 && conveyorLineInfoRead.TaskNo > 0)
                        {
                            Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode);
                            if (task != null)
                            {
                                //任务完成
                                device.SetValue(W_ConveyorLineCPDB.W_Command, 2, item.StationCode);
                                WriteInfo(item.StationName, $"任务号{conveyorLineInfoRead.TaskNo}叠盘位出库完成");
                            }
                        }
                        //if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 7 && conveyorLineInfoRead.TaskNo <= 0)
                        //{
                        //    Dt_Task task = _taskRepository.QueryFirst(x =>  x.TargetAddress == item.StationCode && _taskService.TaskOutboundTypes.Contains(x.TaskType));
                        //    if (task == null)
                        //    {
                        //        //请求任务
                        //        WMSTaskDTO taskDTO = new WMSTaskDTO()
                        //        {
                        //            Id = 1,
                        //            SourceAddress = "SC02_CP-001-064-001-01",
                        //            TaskNum = DateTime.Now.ToString("mmss").ObjToInt(),
                        //            PalletCode = "" + DateTime.Now.ToString("mmss"),
                        //            RoadWay = "SC02_CP",
                        //            TaskType = 160,
                        //            TaskStatus = TaskStatusEnum.New.ObjToInt(),
                        //            TargetAddress = item.StationCode,
                        //            Grade = 0,
                        //            WarehouseId = 1,
                        //            PalletType = 1
                        //        };
                        //        WriteInfo(item.StationName, $"任务号{conveyorLineInfoRead.TaskNo}生成,下一步");
                        //        _taskService.ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
                        //    }
                        //}
                        ////叠盘任务完成交互
                        //else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 8 && conveyorLineInfoRead.TaskNo > 0)
                        //{
                        //    Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode);
                        //    if (task != null)
                        //    {
                        //        //任务完成
                        //        device.SetValue(W_ConveyorLineCPDB.W_Command, 2, item.StationCode);
                        //        WriteInfo(item.StationName, $"任务号{conveyorLineInfoRead.TaskNo}叠盘位出库完成");
                        //    }
                        //}
                    }
                    else
                    {
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/³ÉÆ·²Ö/ConveyorLineJob_CPC.cs
@@ -82,7 +82,7 @@
                            if (task == null)
                            {
                                //获取站台生成任务
                                WebResponseContent content = _taskService.RequestWMSTaskSimple("", item.StationCode,taskType:TaskTypeEnum.InProduct.ObjToInt());
                                WebResponseContent content = _taskService.RequestWMSTaskSimple(DateTime.Now.ToString("yyyyMMddHHmmss"), item.StationCode,taskType:TaskTypeEnum.InProduct.ObjToInt());
                                if (content.Status)
                                {
                                    Dt_Task taskNew = _taskRepository.QueryFirst(x => x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && (x.TaskState == TaskStatusEnum.New.ObjToInt()));
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/³ÉÆ·²Ö/ConveyorLineJob_CPH.cs
@@ -82,13 +82,13 @@
                                {
                                    //获取当前设备
                                    OtherDevice device = (OtherDevice)value;
                                    List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).Distinct().ToList();
                                    List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
                                    foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
                                    Dt_StationManger? RequestIn = stationMangers.FirstOrDefault(x => x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt());
                                    if (RequestIn != null)
                                    {
                                        DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                                        DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(W_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                                        if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && deviceProRead != null && deviceProWrite != null)
                                        DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == RequestIn.StationCode && x.DeviceProParamType == nameof(R_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                                        DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == RequestIn.StationCode && x.DeviceProParamType == nameof(W_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                                        if (deviceProRead != null && deviceProWrite != null)
                                        {
                                            R_CLineCPHInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_CLineCPHInfo>(deviceProRead.DeviceProAddress);
                                            //码垛环线请求任务 
@@ -100,18 +100,34 @@
                                                //{
                                                //}
                                                //写入执行数据
                                                device.SetValue(W_CLineCPHDB.W_TaskNo, 1002, item.StationCode);
                                                device.SetValue(W_CLineCPHDB.W_Channel, 5, item.StationCode);
                                                device.SetValue(W_CLineCPHDB.W_Long, 400, item.StationCode);
                                                device.SetValue(W_CLineCPHDB.W_Wide, 370, item.StationCode);
                                                device.SetValue(W_CLineCPHDB.W_High, 300, item.StationCode);
                                                device.SetValue(W_CLineCPHDB.W_TMID, conveyorLineInfoRead.R_BoxCode, item.StationCode);
                                                device.SetValue(W_CLineCPHDB.W_Request, 1, item.StationCode);
                                                string[] strings = conveyorLineInfoRead.R_BoxCode.Split("-");
                                                if (strings.Length==2)
                                                {
                                                    //写入执行数据
                                                    device.SetValue(W_CLineCPHDB.W_TaskNo, 100 + strings[1].ObjToInt(), RequestIn.StationCode);
                                                    device.SetValue(W_CLineCPHDB.W_Channel, strings[1].ObjToInt(), RequestIn.StationCode);
                                                    device.SetValue(W_CLineCPHDB.W_Long, 425, RequestIn.StationCode);
                                                    device.SetValue(W_CLineCPHDB.W_Wide, 325, RequestIn.StationCode);
                                                    device.SetValue(W_CLineCPHDB.W_High, 400, RequestIn.StationCode);
                                                    device.SetValue(W_CLineCPHDB.W_TMID, conveyorLineInfoRead.R_BoxCode, RequestIn.StationCode);
                                                    device.SetValue(W_CLineCPHDB.W_Request, 1, RequestIn.StationCode);
                                                }
                                                else
                                                {
                                                    WriteError(RequestIn.StationName, $"数据截取错误:{strings}");
                                                }
                                            }
                                        }
                                        else if (item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt() && deviceProRead != null)
                                        else
                                        {
                                            WriteError(RequestIn.StationName, $"未找到设备子编号{RequestIn.StationCode}的协议信息");
                                        }
                                    }
                                    foreach (var item in stationMangers.Where(x=>x.StationType==StationTypeEnum.StationType_OnlyOutbound.ObjToInt()))
                                    {
                                        DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                                        if (deviceProRead != null)
                                        {
                                            R_CLineCPHInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_CLineCPHInfo>(deviceProRead.DeviceProAddress);
                                            //获取码垛口任务更新任务状态
@@ -127,14 +143,9 @@
                                                }
                                            }
                                        }
                                        else
                                        {
                                            WriteError(item.StationName, $"未找到设备子编号{item.StationCode}的协议信息");
                                        }
                                    }
                                    Thread.Sleep(100);
                                }
                                Thread.Sleep(100);
                            }
                        }
                        catch (Exception ex)
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob_CP.cs
@@ -109,18 +109,20 @@
                        var axis = _packaxisRepository.QueryFirst(x => x.DeviceCode == item.StackerCraneCode && x.StationCode == Convert.ToInt32(item.StackerCraneStationCode));
                        if (axis != null)
                        {
                            //进行结托
                            if (Convert.ToInt32(PackNum) == axis.PackNum)
                            {
                                device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.StackerCraneStationCode).ToString()).DeviceProDataBlock, 2);
                            }
                            ConsoleHelper.WriteInfoLine($"码垛工位{item.StationCode}状态{Allow}");
                            //码垛申请
                            if (Allow == 3 || Allow == 7)
                            {
                                //获取当前任务
                                Dt_Task task = _taskRepository.QueryData(x => x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.MD_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode).OrderBy(x => x.TaskNum).FirstOrDefault();
                                if (task != null) //码垛申请
                                if (task != null)
                                {
                                    device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.StackerCraneStationCode).ToString()).DeviceProDataBlock, 1);
@@ -139,14 +141,7 @@
                                    #endregion
                                    if (device.DeviceCode == "MD8_CP")
                                    {
                                        device.Communicator.Write<float>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDA.ToString()).DeviceProDataBlock, -1);
                                    }
                                    else
                                    {
                                        device.Communicator.Write<float>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDA.ToString()).DeviceProDataBlock, 1);
                                    }
                                    device.Communicator.Write<float>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDA.ToString()).DeviceProDataBlock, 1);
                                    device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDReceiveDone.ToString()).DeviceProDataBlock, 3);
@@ -156,6 +151,7 @@
                                    //_taskRepository.UpdateData(task);
                                    Thread.Sleep(1500);
                                    WriteInfo(item.StationName, $"任务号{task.TaskNum}码垛");
                                    return Task.CompletedTask;
                                }
                            }
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/PPStockSelect.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/ProSelectedStock.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/ProStockSelect.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/SelectedStock.vue
@@ -11,7 +11,7 @@
        <el-alert :closable="false" style="width: 100%">
          <el-row>
            <el-col :span="24">
              <span class="less-style">物料名称: {{ row.materielName }} </span>
              <span class="less-style">物料名称: {{ row.materialName }} </span>
              <el-divider direction="vertical"></el-divider>
              <span class="less-style">物料编号: {{ row.materialNo }} </span>
              <el-divider direction="vertical"></el-divider>
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/StockSelect.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/addMesOutOrder.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/mesPPCutOutOrderDetail.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/mesPPoutOrderDetail.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/outSGOrderDetail.vue
ÎļþÃû´Ó ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/outOrderDetail.vue ÐÞ¸Ä
@@ -3,7 +3,7 @@
    <vol-box
      v-model="showDetialBox"
      :lazy="true"
      width="75%"
      width="80%"
      :padding="15"
      title="单据明细信息"
    >
@@ -12,6 +12,8 @@
          <el-row>
            <el-col :span="16">
              <span>已选中 {{ selection.length }} é¡¹</span>
              <el-divider direction="vertical"></el-divider>
              <span>单号 {{ row.orderId }} </span>
            </el-col>
            <el-col :span="8">
              <!-- <el-link
@@ -103,10 +105,9 @@
<script>
import VolBox from "@/components/basic/VolBox.vue";
import VolForm from "@/components/basic/VolForm.vue";
import StockSelect from "./StockSelect.vue";
import SelectedStock from "./SelectedStock.vue";
export default {
  components: { VolBox, VolForm, StockSelect, SelectedStock },
  components: { VolBox, VolForm, SelectedStock },
  data() {
    return {
      row: null,
@@ -124,17 +125,18 @@
          hidden: true,
        },
        {
          prop: "outBSTOrderId",
          prop: "outSGOrderId",
          title: "出库单主键",
          type: "string",
          type: "int",
          width: 90,
          hidden: true,
        },
        {
          prop: "materialId",
          title: "上游物料ID",
          type: "string",
          width: 120,
          prop: "关联的明细ID(上游)",
          title: "出库单号",
          type: "int",
          width: 90,
          hidden: true,
        },
        {
          prop: "materialNo",
@@ -143,11 +145,22 @@
          width: 150,
        },
        {
          prop: "materielName",
          prop: "materialName",
          title: "物料名称",
          type: "string",
          width: 150,
          hidden: true,
        },
        {
          prop: "boardFluteNo",
          title: "楞别",
          type: "string",
          width: 110,
        },
        {
          prop: "machineName",
          title: "机台",
          type: "string",
          width: 110,
        },
        {
          prop: "width",
@@ -180,7 +193,7 @@
          width: 130,
        },
        {
          prop: "outBSTOrderDetailStatus",
          prop: "outSGOrderDetailStatus",
          title: "订单明细状态",
          type: "tag",
          width: 180,
@@ -206,12 +219,12 @@
          type: "datetime",
          width: 170,
        },
        {
          prop: "modifyDate",
          title: "修改时间",
          type: "datetime",
          width: 170,
        },
        // {
        //   prop: "modifyDate",
        //   title: "修改时间",
        //   type: "datetime",
        //   width: 170,
        // },
      ],
      paginations: {
        sort: "id",
@@ -219,7 +232,7 @@
        Foots: "",
        total: 0,
        // 2020.08.29增加自定义分页条大小
        sizes: [60, 100, 120],
        sizes: [60],
        size: 60, // é»˜è®¤åˆ†é¡µå¤§å°
        Wheres: [],
        page: 1,
@@ -260,6 +273,7 @@
    open(row) {
      this.row = row;
      this.showDetialBox = true;
      console.log(row);
      this.getDictionaryData();
      this.getData();
    },
@@ -276,12 +290,11 @@
        // ä»…对数值列求和
        if (column.property === 'xqLen' || column.property === 'assignTotalUsage' || column.property === 'outTotalUsage' || column.property === 'totalUsage') {
          const values = data.map(item => Number(item[column.property]))
        console.log(values);
        if (!values.every(value => isNaN(value))) {
          sums[index] = values.reduce((prev, curr) => {
            return prev + (isNaN(curr) ? 0 : curr)
          }, 0);
          //保留两位小数
          //保留4位小数
          sums[index] = sums[index].toFixed(4)
        } else {
          sums[index] = '-'
@@ -293,7 +306,7 @@
      return sums
    },
    getData() {
      var wheres = [{ name: "outBSTOrderId", value: this.row.id }];
      var wheres = [{ name: "outSGOrderId", value: this.row.id }];
      var param = {
        page: this.paginations.page,
        rows: this.paginations.rows,
@@ -302,7 +315,7 @@
        wheres: JSON.stringify(wheres), // æŸ¥è¯¢æ¡ä»¶ï¼Œæ ¼å¼ä¸º[{ name: "字段", value: "xx" }]
      };
      this.http
        .post("api/OutBSTOrderDetail/GetPageData", param, "查询中")
        .post("api/OutSGOrderDetail/GetPageData", param, "查询中")
        .then((x) => {
          this.tableData = x.rows;
        });
@@ -315,22 +328,6 @@
        this.$refs.selectedStock.open(row,this.row.outBSTOrderNo);
      }
    },
    // lockstocks() {
    //   if (this.selection.length === 0) {
    //     return this.$message.error("请选择单据明细");
    //   }
    //   var keys = this.selection.map((item) => item.id); // èŽ·å–é€‰ä¸­è¡Œçš„id
    //   this.http
    //     .post("api/OutboundOrderDetail/LockOutboundStocks", keys, "数据处理中")
    //     .then((x) => {
    //       if (!x.status) return this.$message.error(x.message);
    //       this.$message.success("操作成功");
    //       this.showDetialBox = false;
    //       this.$emit("parentCall", ($vue) => {
    //         $vue.getData();
    //       });
    //     });
    // },
    outbound() {
      if (this.selection.length === 0) {
        return this.$message.error("请选择单据明细");
@@ -357,10 +354,10 @@
    getButtonEnable(propName, row) {
      if (propName == "assignStock") {
        if (
          row.orderDetailStatus !== 0 &&
          row.orderDetailStatus !== 60 &&
          row.orderDetailStatus !== 70 &&
          row.orderDetailStatus !== 80
          row.outSGOrderDetailStatus !== 0 &&
          row.outSGOrderDetailStatus !== 60 &&
          row.outSGOrderDetailStatus !== 70 &&
          row.outSGOrderDetailStatus !== 80
        ) {
          return true;
        } else {
@@ -404,7 +401,7 @@
        var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey);
        if (item) {
          var dicItem = item.data.find((x) => x.key == row[column.prop]);
          console.log(dicItem);
          // console.log(dicItem);
          if (dicItem) {
            return dicItem.value;
          } else {
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/proOutboundOrderDetail.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/mesOutboundOrder.js
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/mesPPCutOutboundOrder.js
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/mesPPCutOutboundOrderDetail.js
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/mesPPOutboundOrderDetail.js
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/outBSTOrder.js
@@ -1,11 +1,10 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import gridBody from './extend/outOrderDetail.vue'
let extension = {
    components: {
      //查询界面扩展组件
      gridHeader: '',
      gridBody: gridBody,
      gridBody: '',
      gridFooter: '',
      //新建、编辑弹出框扩展组件
      modelHeader: '',
@@ -18,21 +17,21 @@
       //下面这些方法可以保留也可以删除
      onInit() {  
        //扩展页面初始化操作
        this.columns.push({
          field: '操作',
          title: '操作',
          width: 90,
          fixed: 'right',
          align: 'center',
          formatter: (row) => {
              return (
                  '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">查看明细</i>'
              );
          },
          click: (row) => {
              this.$refs.gridBody.open(row);
          }
      });
      //   this.columns.push({
      //     field: '操作',
      //     title: '操作',
      //     width: 90,
      //     fixed: 'right',
      //     align: 'center',
      //     formatter: (row) => {
      //         return (
      //             '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">查看明细</i>'
      //         );
      //     },
      //     click: (row) => {
      //         this.$refs.gridBody.open(row);
      //     }
      // });
      },
      onInited() {
        //框架初始化配置后
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/outMESOrder.js
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/outSGOrder.js
ÎļþÃû´Ó ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/mesPPOutboundOrder.js ÐÞ¸Ä
@@ -1,6 +1,6 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import gridBody from './extend/mesPPoutOrderDetail.vue'
import gridBody from './extend/outSGOrderDetail.vue'
let extension = {
    components: {
      //查询界面扩展组件
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/outSGOrderDetail.js
ÎļþÃû´Ó ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/proOutOrderDetail.js ÐÞ¸Ä
@@ -1,6 +1,5 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
let extension = {
    components: {
      //查询界面扩展组件
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/proOutOrder.js
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/router/viewGird.js
@@ -171,37 +171,7 @@
    name: 'userInfo',
    component: () => import('@/views/basic/userInfo.vue')
  }
  , {
    path: '/mesOutboundOrder',
    name: 'mesOutboundOrder',
    component: () => import('@/views/outbound/mesOutboundOrder.vue')
  },{
    path: '/mesPPOutboundOrder',
    name: 'mesPPOutboundOrder',
    component: () => import('@/views/outbound/mesPPOutboundOrder.vue')
  },{
    path: '/mesPPOutboundOrderDetail',
    name: 'mesPPOutboundOrderDetail',
    component: () => import('@/views/outbound/mesPPOutboundOrderDetail.vue')
  },{
    path: '/mesPPCutOutboundOrder',
    name: 'mesPPCutOutboundOrder',
    component: () => import('@/views/outbound/mesPPCutOutboundOrder.vue')
  }, {
    path: '/mesPPCutOutboundOrderDetail',
    name: 'mesPPCutOutboundOrderDetail',
    component: () => import('@/views/outbound/mesPPCutOutboundOrderDetail.vue')
  },
  {
    path: '/mesPPBackInboundOrder',
    name: 'mesPPBackInboundOrder',
    component: () => import('@/views/inbound/mesPPBackInboundOrder.vue')
  },
  {
    path: '/mesPPBackInboundOrderDetail',
    name: 'mesPPBackInboundOrderDetail',
    component: () => import('@/views/inbound/mesPPBackInboundOrderDetail.vue')
  },
  ,
  {
    path: '/returnOrder',
    name: 'returnOrder',
@@ -230,14 +200,6 @@
    path: '/proStockInfoDetail_Hty',
    name: 'proStockInfoDetail_Hty',
    component: () => import('@/views/stock/proStockInfoDetail_Hty.vue')
  },{
    path: '/proOutOrder',
    name: 'proOutOrder',
    component: () => import('@/views/outbound/proOutOrder.vue')
  }, {
    path: '/proOutOrderDetail',
    name: 'proOutOrderDetail',
    component: () => import('@/views/outbound/proOutOrderDetail.vue')
  },
  {
    path: '/mesProInOrder',
@@ -278,6 +240,11 @@
    path: '/agvStationInfo',
    name: 'agvStationInfo',
    component: () => import('@/views/basic/agvStationInfo.vue')
  },
  {
    path: '/outSGOrder',
    name: 'outSGOrder',
    component: () => import('@/views/outbound/outSGOrder.vue')
  }
]
export default viewgird
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/outbound/mesOutboundOrder.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/outbound/mesPPCutOutboundOrder.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/outbound/mesPPCutOutboundOrderDetail.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/outbound/mesPPOutboundOrder.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/outbound/mesPPOutboundOrderDetail.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/outbound/outMESOrder.vue
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/outbound/outSGOrder.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,283 @@
<template>
    <view-grid
      ref="grid"
      :columns="columns"
      :detail="detail"
      :editFormFields="editFormFields"
      :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields"
      :searchFormOptions="searchFormOptions"
      :table="table"
      :extend="extend"
    >
    </view-grid>
  </template>
      <script>
  import extend from "@/extension/outbound/outSGOrder.js";
  import { ref, defineComponent } from "vue";
  export default defineComponent({
    setup() {
      const table = ref({
        key: "id",
        footer: "Foots",
        cnName: "生管排程单",
        name: "outSGOrder",
        url: "/OutSGOrder/",
        sortName: "id",
      });
      const editFormFields = ref({
        boardMpsNo:""
      });
      const editFormOptions = ref([
        [
          {
            field: "boardMpsNo",
            title: "单据编号",
            type: "string",
            readonly:true
          }
        ],
      ]);
      const searchFormFields = ref({
        outSGOrderNo: "",
        boardMpsId: "",
        orderId: "",
        outSGOrderStatus: "",
        warehouseId: "",
        shortName: "",
      });
      const searchFormOptions = ref([
        [
          { title: "WMS单号", field: "outSGOrderNo", type: "like" },
          { title: "出库上游ID", field: "boardMpsId", type: "like" },
          { title: "上游生产单号", field: "orderId", type: "like" },
          {
            title: "单据状态",
            field: "outSGOrderStatus",
            type: "select",
            dataKey: "outboundStatusEnum",
            data: [],
          },
        ],
        [
          { title: "仓库", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],},
          { title: "客户简称", field: "shortName", type: "like" },
        ],
      ]);
      const columns = ref([
        {
          field: "id",
          title: "Id",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          require: true,
          align: "left",
        },
        {
          field: "warehouseId",
          title: "仓库",
          type: "string",
          width: 90,
          align: "left",
          bind:{key: "warehouses", data: []}
        },
        {
          field: "outSGOrderNo",
          title: "WMS单号",
          type: "string",
          width: 160,
          align: "left",
          // link: true,
        },
        {
          field: "boardMpsId",
          title: "上游单据ID",
          type: "int",
          width: 160,
          align: "left",
          // link: true,
        },
        {
          field: "orderId",
          title: "上游生产单号",
          type: "string",
          width: 160,
          align: "left",
        },
        {
          field: "shortName",
          title: "客户简称",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "outSGOrderStatus",
          title: "出库单状态",
          type: "string",
          width: 110,
          align: "left",
          bind: { key: "outboundStatusEnum", data: [] },
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 160,
          align: "left",
        },
      ]);
      const detail = ref({
        cnName: "出库明细单",
        table: "OutSGOrderDetail",
        columns: [
          {
            field: "id",
            title: "Id",
            type: "int",
            width: 90,
            hidden: true,
            readonly: true,
            require: true,
            align: "left",
          },
          {
            field: "outSGOrderId",
            title: "出库单主键",
            type: "string",
            width: 90,
            align: "left",
            hidden: true,
          },
          {
            field: "boardMpsId",
            title: "关联的主表ID(上游)",
            type: "string",
            width: 90,
            align: "left",
          },
          {
            field: "boardMpsDetailId",
            title: "关联明细ID(上游)",
            type: "string",
            width: 90,
            align: "left",
          },
          {
            field: "materialNo",
            title: "物料编号",
            type: "string",
            width: 150,
            align: "left",
            edit: { type: "string" },
            required: true,
          },
          {
            field: "materielName",
            title: "物料名称",
            type: "string",
            width: 150,
            align: "left",
            edit: { type: "string" },
          },
          {
            field: "boardFluteNo",
            title: "楞别",
            type: "string",
            width: 110,
            align: "left",
            edit: { type: "string" },
          },
          {
            field: "machineName",
            title: "机台位",
            type: "string",
            width: 110,
            align: "left",
            edit: { type: "string" },
            required: true,
          },
          {
            field: "width",
            title: "幅宽",
            type: "string",
            width: 110,
            align: "left",
            edit: { type: "string" },
            required: true,
          },
          {
            field: "xqLen",
            title: "需求长度",
            type: "string",
            width: 110,
            align: "left",
            edit: { type: "number" },
            required: true,
          },
          {
            field: "totalUsage",
            title: "总用量",
            type: "string",
            width: 90,
            align: "left",
            edit: { type: "number" },
            required: true,
          },
          {
            field: "procurementLength",
            title: "采购长度",
            type: "string",
            width: 110,
            align: "left",
          },
          {
            field: "assignTotalUsage",
            title: "已分配用量",
            type: "string",
            width: 110,
            align: "left",
          },
          {
            field: "outTotalUsage",
            title: "已出用量",
            type: "string",
            width: 110,
            align: "left",
          },
          {
            field: "outBSTOrderDetailStatus",
            title: "订单明细状态",
            type: "string",
            width: 180,
            align: "left",
            bind: { key: "outboundStatusEnum", data: [] },
          },
          {
            field: "createDate",
            title: "创建时间",
            type: "datetime",
            width: 160,
            align: "left",
          }
        ],
        sortName: "id",
        key: "id",
      });
      return {
        table,
        extend,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
      };
    },
  });
  </script>
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/outbound/outSGOrderDetail.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,221 @@
<template>
    <view-grid
      ref="grid"
      :columns="columns"
      :detail="detail"
      :editFormFields="editFormFields"
      :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields"
      :searchFormOptions="searchFormOptions"
      :table="table"
      :extend="extend"
    >
    </view-grid>
  </template>
    <script>
  import extend from "@/extension/outbound/outSGOrderDetail.js";
  import { ref, defineComponent } from "vue";
  export default defineComponent({
    setup() {
      const table = ref({
        key: "id",
        footer: "Foots",
        cnName: "出库单明细",
        name: "outSGOrderDetail",
        url: "/OutSGOrderDetail/",
        sortName: "id",
      });
      const editFormFields = ref({
        deviceCode: "",
        deviceName: "",
        deviceType: "",
        deviceStatus: "",
        deviceIp: "",
        devicePort: "",
        devicePlcType: "",
        deviceRemark: "",
      });
      const editFormOptions = ref([
        [
          {
            title: "设备编号",
            required: true,
            field: "deviceCode",
            type: "string",
          },
          {
            title: "设备名称",
            required: true,
            field: "deviceName",
            type: "string",
          },
          {
            title: "设备类型",
            required: true,
            field: "deviceType",
            type: "string",
          },
          {
            title: "设备状态",
            required: true,
            field: "deviceStatus",
            type: "string",
          },
        ],
        [
          { title: "设备IP", required: true, field: "deviceIp", type: "string" },
          {
            title: "设备端口",
            required: true,
            field: "devicePort",
            type: "string",
          },
          {
            title: "PLC类型",
            required: true,
            field: "devicePlcType",
            type: "string",
          },
          {
            title: "备注",
            field: "deviceRemark",
            type: "string",
          },
        ],
      ]);
      const searchFormFields = ref({
        deviceCode: "",
        deviceType: "",
        deviceStatus: "",
      });
      const searchFormOptions = ref([
        [
          { title: "设备编号", field: "deviceCode" },
          { title: "设备类型", field: "deviceType" },
          { title: "设备状态", field: "deviceStatus" },
        ],
      ]);
      const columns = ref([
      {
          field: "id",
          title: "Id",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          align: "left",
        },
        {
          field: "outSGOrderId",
          title: "出库单主键",
          type: "string",
          width: 90,
          align: "left",
          hidden: true,
        },
        {
          field: "MaterialNo",
          title: "物料编号",
          type: "string",
          width: 150,
          align: "left",
        },
        {
          field: "materielName",
          title: "物料名称",
          type: "string",
          width: 150,
          align: "left",
        },
        {
          field: "batchNo",
          title: "批次号",
          type: "decimal",
          width: 90,
          align: "left",
        },
        {
          field: "orderQuantity",
          title: "单据数量",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "lockQuantity",
          title: "锁定数量",
          type: "int",
          width: 120,
          align: "left",
        },
        {
          field: "overOutQuantity",
          title: "已出数量",
          type: "string",
          width: 200,
          align: "left",
        },
        {
          field: "orderDetailStatus",
          title: "订单明细状态",
          type: "string",
          width: 180,
          align: "left",
        },
        {
          field: "creater",
          title: "创建人",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 160,
          align: "left",
        },
        {
          field: "modifier",
          title: "修改人",
          type: "string",
          width: 100,
          align: "left",
        },
        {
          field: "modifyDate",
          title: "修改时间",
          type: "datetime",
          width: 160,
          align: "left",
        },
        {
          field: "remark",
          title: "备注",
          type: "string",
          width: 100,
          align: "left",
        },
      ]);
      const detail = ref({
        cnName: "#detailCnName",
        table: "",
        columns: [],
        sortName: "",
      });
      return {
        table,
        extend,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
      };
    },
  });
  </script>
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/outbound/proOutOrder.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/outbound/proOutOrderDetail.vue
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_DTO/ERP/SGOutOrderDTO.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,93 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
namespace WIDESEA_DTO.ERP
{
    /// <summary>
    /// ç”Ÿç®¡æŽ’程接收实体
    /// </summary>
    public class SGOutOrderDTO
    {
        /// <summary>
        /// ä¸»æŽ’程Id
        /// </summary>
        [PropertyValidate("主排程Id", NotNullAndEmpty = true)]
        public int BoardMpsId { get; set; }
        /// <summary>
        /// æŽ’程明细ID
        /// </summary>
        [PropertyValidate("排程明细ID", NotNullAndEmpty = true)]
        public int BoardMpsDetailId { get; set; }
        /// <summary>
        /// å¹…宽
        /// </summary>
        [PropertyValidate("幅宽", NotNullAndEmpty = true)]
        public decimal Width { get; set; }
        /// <summary>
        /// éœ€æ±‚长度
        /// </summary>
        [PropertyValidate("需求长度", NotNullAndEmpty = true)]
        public decimal XqLen { get; set; }
        /// <summary>
        /// æ€»ç”¨é‡
        /// </summary>
        [PropertyValidate("总用量", NotNullAndEmpty = true)]
        public decimal TotalUsage { get; set; }
        /// <summary>
        /// ç‰©æ–™æ¥æºID(上游)
        /// </summary>
        [PropertyValidate("物料ID", NotNullAndEmpty = true)]
        public int MaterialId { get; set; }
        /// <summary>
        /// ç‰©æ–™ç¼–号
        /// </summary>
        [PropertyValidate("物料编号", NotNullAndEmpty = true)]
        public string MaterialNo { get; set; }
        /// <summary>
        /// é‡‡è´­é•¿åº¦
        /// </summary>
        [PropertyValidate("采购长度", NotNullAndEmpty = true)]
        public decimal ProcurementLength { get; set; }
        /// <summary>
        /// æ¥žåˆ«
        /// </summary>
        [PropertyValidate("楞别", NotNullAndEmpty = true)]
        public string BoardFluteNo { get; set; }
        /// <summary>
        /// æœºå°ä½ç½®
        /// </summary>
        [PropertyValidate("机台位置", NotNullAndEmpty = true)]
        public string MachineName { get; set; }
        /// <summary>
        /// å®¢æˆ·ç®€ç§°
        /// </summary>
        [PropertyValidate("客户简称", NotNullAndEmpty = true)]
        public string ShortName { get; set; }
        /// <summary>
        /// æ€»é•¿
        /// </summary>
        [PropertyValidate("总长", NotNullAndEmpty = true)]
        public decimal TotalLenth { get; set; }
        /// <summary>
        /// ç”Ÿäº§å·¥å•号(上游)
        /// </summary>
        [PropertyValidate("生产工单号", NotNullAndEmpty = true)]
        public string OrderId { get; set; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_DTO/MES/MESManualIssueDTO.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
namespace WIDESEA_DTO.MES
{
    /// <summary>
    /// MES领料自动叫料接收实体
    /// </summary>
    [ModelValidate]
    public class MESManualIssueDTO
    {
        /// <summary>
        /// å‡ºåº“来源明细ID
        /// </summary>
        [PropertyValidate("出库来源明细ID", NotNullAndEmpty = true)]
        public int OutDetailId { get; set; }
        /// <summary>
        /// å‘¼å«Id
        /// </summary>
        [PropertyValidate("呼叫Id", NotNullAndEmpty = true)]
        public string IssueId { get; set; }
        /// <summary>
        /// å‘¨è½¬ä½ç½®ç¼–号
        /// </summary>
        [PropertyValidate("周转位置编号", NotNullAndEmpty = true)]
        public string PointCode { get; set; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_DTO/MES/MESOrderStopDTO.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
namespace WIDESEA_DTO.MES
{
    /// <summary>
    /// MES工单停止叫料接收实体
    /// </summary>
    [ModelValidate]
    public class MESOrderStopDTO
    {
        /// <summary>
        /// ç”Ÿäº§è®¢å•编码
        /// </summary>
        [PropertyValidate("生产订单编码", NotNullAndEmpty = true)]
        public string ProductOrderNo { get; set; }
        /// <summary>
        /// åœæ­¢æ ‡è¯†
        /// </summary>
        [PropertyValidate("停止标识", NotNullAndEmpty = true)]
        public int IsStop { get; set; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_DTO/MES/MESProInDTO.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,119 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
namespace WIDESEA_DTO.MES
{
    /// <summary>
    /// MES成品/半成品接收实体
    /// </summary>
    [ModelValidate]
    public class MESProInDTO
    {
        /// <summary>
        /// ç”Ÿäº§è®¢å•编码(上游)
        /// </summary>
        [PropertyValidate("生产订单编码", NotNullAndEmpty = true)]
        public string ProductOrderNo { get; set; }
        /// <summary>
        /// æ´¾å•工单编码(上游)
        /// </summary>
        [PropertyValidate("派单工单编码", NotNullAndEmpty = true)]
        public string SendOrderNo { get; set; }
        /// <summary>
        /// ç‰©æ–™ç¼–码
        /// </summary>
        [PropertyValidate("物料编码", NotNullAndEmpty = true)]
        public string MaterialCode { get; set; }
        /// <summary>
        /// ç‰©æ–™æ‰¹æ¬¡
        /// </summary>
        [PropertyValidate("物料批次", NotNullAndEmpty = true)]
        public string MaterialLot { get; set; }
        /// <summary>
        /// ç‰©æ–™ç­‰çº§
        /// </summary>
        [PropertyValidate("物料等级", NotNullAndEmpty = true)]
        public string GradeCode { get; set; }
        /// <summary>
        /// ç‰©æ–™æ•°é‡
        /// </summary>
        [PropertyValidate("物料数量", NotNullAndEmpty = true)]
        public decimal ProQuantity { get; set; }
        /// <summary>
        /// ç‰©æ–™æ¡ç 
        /// </summary>
        [PropertyValidate("物料条码", NotNullAndEmpty = true)]
        public string BarCode { get; set; }
        /// <summary>
        /// åŠ å·¥ä¸­å¿ƒç¼–ç (机台)
        /// </summary>
        [PropertyValidate("加工中心编码", NotNullAndEmpty = true)]
        public string MakeCode { get; set; }
        /// <summary>
        /// æ˜¯å¦å°¾ç®±
        /// </summary>
        [PropertyValidate("是否尾箱", NotNullAndEmpty = true)]
        public bool IsMantissa { get; set; }
        /// <summary>
        /// ä½ç½®ç¼–号
        /// </summary>
        [PropertyValidate("位置编号", NotNullAndEmpty = true)]
        public string PointCode { get; set; }
        /// <summary>
        /// å·å¾„
        /// </summary>
        [PropertyValidate("卷径", NotNullAndEmpty = true)]
        public decimal Thickness { get; set; }
        /// <summary>
        /// å¹…宽
        /// </summary>
        [PropertyValidate("幅宽", NotNullAndEmpty = true)]
        public decimal Wide { get; set; }
        /// <summary>
        /// é‡é‡
        /// </summary>
        [PropertyValidate("重量", NotNullAndEmpty = true)]
        public decimal Weight { get; set; }
        /// <summary>
        /// æˆå“åŒ…材纸箱物料编码
        /// </summary>
        [PropertyValidate("成品包材纸箱物料编码", NotNullAndEmpty = true)]
        public string ProPackCode { get; set; }
        /// <summary>
        /// ç®±é•¿
        /// </summary>
        [PropertyValidate("箱长", NotNullAndEmpty = true)]
        public decimal Length { get; set; }
        /// <summary>
        /// ç®±å®½
        /// </summary>
        [PropertyValidate("箱宽", NotNullAndEmpty = true)]
        public decimal Width { get; set; }
        /// <summary>
        /// ç®±é«˜
        /// </summary>
        [PropertyValidate("箱高", NotNullAndEmpty = true)]
        public decimal Height { get; set; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_DTO/MES/MESReturnIssueDTO.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,90 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
namespace WIDESEA_DTO.MES
{
    /// <summary>
    /// MES空托/余料接收实体
    /// </summary>
    [ModelValidate]
    public class MESReturnIssueDTO
    {
        /// <summary>
        /// å‡ºåº“来源明细ID
        /// </summary>
        [PropertyValidate("出库来源明细ID", NotNullAndEmpty = true)]
        public int OutDetailId { get; set; }
        /// <summary>
        /// å‘¼å«Id
        /// </summary>
        [PropertyValidate("呼叫Id", NotNullAndEmpty = true)]
        public string IssueId { get; set; }
        /// <summary>
        /// å‘¨è½¬ä½ç½®ç¼–号
        /// </summary>
        [PropertyValidate("周转位置编号", NotNullAndEmpty = true)]
        public string PointCode { get; set; }
        /// <summary>
        /// ä½™æ–™ä¿¡æ¯
        /// </summary>
        [PropertyValidate("余料信息", NotNullAndEmpty = false)]
        public MESReturnMaterial? ReturnMaterial { get; set; }
    }
    /// <summary>
    /// ä½™æ–™ä¿¡æ¯
    /// </summary>
    public class MESReturnMaterial
    {
        /// <summary>
        /// æ¡ç ä¿¡æ¯
        /// </summary>
        [PropertyValidate("条码信息", NotNullAndEmpty = true)]
        public string BarCode { get; set; }
        /// <summary>
        /// ç‰©æ–™ä»£ç 
        /// </summary>
        [PropertyValidate("物料代码", NotNullAndEmpty = true)]
        public string MaterialCode { get; set; }
        /// <summary>
        /// ç‰©æ–™æ‰¹æ¬¡
        /// </summary>
        [PropertyValidate("物料批次", NotNullAndEmpty = true)]
        public string MaterialLot { get; set; }
        /// <summary>
        /// é€€æ–™æ•°é‡
        /// </summary>
        [PropertyValidate("退料数量", NotNullAndEmpty = true)]
        public decimal ReturnQuantity { get; set; }
        /// <summary>
        /// æ˜¯å¦é¢†æ–™ï¼ˆ1未领料 0已临料)
        /// </summary>
        [PropertyValidate("是否领料(1未领料 0已临料)", NotNullAndEmpty = true)]
        public string Whether { get; set; }
        /// <summary>
        /// é€€æ–™å·¥å•号(ERP相关)
        /// </summary>
        [PropertyValidate("退料工单号(ERP相关)", NotNullAndEmpty = false)]
        public string ReturnOrderNo { get; set; }
        /// <summary>
        /// ç›´å¾„
        /// </summary>
        [PropertyValidate("直径", NotNullAndEmpty = true)]
        public string Thickness { get; set; }
        /// <summary>
        /// å¹…宽
        /// </summary>
        [PropertyValidate("幅宽", NotNullAndEmpty = true)]
        public decimal Wide { get; set; }
        /// <summary>
        /// é‡é‡
        /// </summary>
        [PropertyValidate("重量", NotNullAndEmpty = true)]
        public decimal Weight { get; set; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_DTO/MES/OutMESOrderDTO.cs
@@ -22,7 +22,7 @@
        /// <summary>
        /// ä»“库代号
        /// </summary>
        [PropertyValidate("纸质收货单主表ID", NotNullAndEmpty = false)]
        [PropertyValidate("仓库代号", NotNullAndEmpty = true)]
        public string WarehouseCode { get; set; }
        /// <summary>
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IInboundRepository/IInboundRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IInboundRepository
{
    /// <summary>
    /// å…¥åº“仓储接口层集成
    /// </summary>
    public interface IInboundRepository : IDependency
    {
        /// <summary>
        /// åšæ€é€šé‡‡è´­ä¸»è¡¨ä»“储接口
        /// </summary>
        IPurchaseBSTOrderRepository PurchaseBSTOrderRepository { get; }
        /// <summary>
        /// åšæ€é€šé‡‡è´­æ˜Žç»†ä»“储接口
        /// </summary>
        IPurchaseBSTOrderDetailRepository PurchaseBSTOrderDetailRepository { get; }
        /// <summary>
        /// åšæ€é€šé€€æ–™ä¸»è¡¨ä»“储接口
        /// </summary>
        IReturnBSTOrderRepository ReturnBSTOrderRepository { get; }
        /// <summary>
        /// åšæ€é€šé€€æ–™æ˜Žç»†ä»“储接口
        /// </summary>
        IReturnBSTOrderDetailRepository ReturnBSTOrderDetailRepository { get; }
        /// <summary>
        /// MES成品/半成品仓储接口
        /// </summary>
        IMESProInOrderInfoRepository MESProInOrderInfoRepository { get; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IInboundRepository/IMESProInOrderInfoRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
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_IInboundRepository
{
    /// <summary>
    /// MES成品/半成品仓储接口层
    /// </summary>
    public interface IMESProInOrderInfoRepository : IRepository<Dt_MESProInOrderInfo>
    {
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IInboundService/IInboundService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IInboundService
{
    /// <summary>
    /// å…¥åº“业务接口层集成
    /// </summary>
    public interface IInboundService : IDependency
    {
        /// <summary>
        /// MES成品/半成品业务层
        /// </summary>
        IMESProInOrderInfoService MESProInOrderInfoService { get; }
        /// <summary>
        /// åšæ€é€šé‡‡è´­å•业务层
        /// </summary>
        IPurchaseBSTOrderService PurchaseBSTOrderService { get; }
        /// <summary>
        /// åšæ€é€šé‡‡è´­å•明细业务层
        /// </summary>
        IPurchaseBSTOrderDetailService PurchaseBSTOrderDetailService { get; }
        /// <summary>
        /// åšæ€é€šé€€æ–™å•业务层
        /// </summary>
        IReturnBSTOrderService ReturnBSTOrderService { get; }
        /// <summary>
        /// åšæ€é€šé€€æ–™å•明细业务层
        /// </summary>
        IReturnBSTOrderDetailService ReturnBSTOrderDetailService { get; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IInboundService/IMESProInOrderInfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
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.MES;
using WIDESEA_IInboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IInboundService
{
    public interface IMESProInOrderInfoService : IService<Dt_MESProInOrderInfo>
    {
        IMESProInOrderInfoRepository Repository { get; }
        /// <summary>
        /// æˆå“/半成品信息同步接口
        /// </summary>
        WebResponseContent ReceiveProCodeInfo(List<MESProInDTO> proInDTOs);
        /// <summary>
        /// MES工单停止接口
        /// </summary>
        WebResponseContent ReceiveProOrderStop(MESOrderStopDTO orderStopDTO);
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutSGOrderDetailRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
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
{
    /// <summary>
    /// ç”Ÿç®¡å‡ºåº“信息仓储接口层
    /// </summary>
    public interface IOutSGOrderDetailRepository : IRepository<Dt_OutSGOrderDetail>
    {
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutSGOrderRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
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
{
    /// <summary>
    /// ç”Ÿç®¡å‡ºåº“信息仓储接口层
    /// </summary>
    public interface IOutSGOrderRepository : IRepository<Dt_OutSGOrder>
    {
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutboundRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IOutboundRepository
{
    /// <summary>
    /// å‡ºåº“仓储接口层集成
    /// </summary>
    public interface IOutboundRepository : IDependency
    {
        /// <summary>
        /// MES领料单仓储接口层
        /// </summary>
        IOutMESOrderRepository OutMESOrderRepository { get; }
        /// <summary>
        /// ç”Ÿç®¡æŽ’程仓储接口层
        /// </summary>
        IOutSGOrderRepository OutSGOrderRepository { get; }
        /// <summary>
        /// ç”Ÿç®¡æŽ’程明细仓储接口层
        /// </summary>
        IOutSGOrderDetailRepository OutSGOrderDetailRepository { get; }
        /// <summary>
        /// å‡ºåº“详情仓储接口层
        /// </summary>
        IOutStockLockInfoRepository OutStockLockInfoRepository { get; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IOutboundService/IOutMESOrderService.cs
@@ -18,6 +18,6 @@
        /// <summary>
        /// æŽ¥æ”¶MES领料计划
        /// </summary>
        WebResponseContent ReceiveOutBound(OutMESOrderDTO outMESOrderDTO);
        WebResponseContent ReceiveOutBound(List<OutMESOrderDTO> outMESOrderDTO);
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IOutboundService/IOutSGOrderDetailService.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 IOutSGOrderDetailService : IService<Dt_OutSGOrderDetail>
    {
        IOutSGOrderDetailRepository Repository { get; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IOutboundService/IOutSGOrderService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.StockEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.ERP;
using WIDESEA_IOutboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IOutboundService
{
    public interface IOutSGOrderService : IService<Dt_OutSGOrder>
    {
        IOutSGOrderRepository Repository { get; }
        /// <summary>
        /// æ·»åŠ ç”Ÿç®¡æŽ’ç¨‹
        /// </summary>
        WebResponseContent AddOutSGOrder(List<SGOutOrderDTO> outOrderDTOs);
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IOutboundService/IOutboundService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IOutboundService
{
    /// <summary>
    /// å‡ºåº“业务接口层集成
    /// </summary>
    public interface IOutboundService : IDependency
    {
        /// <summary>
        /// MES领料业务接口层
        /// </summary>
        IOutMESOrderService OutMESOrderService { get; }
        /// <summary>
        /// ç”Ÿç®¡æŽ’程业务接口层
        /// </summary>
        IOutSGOrderService OutSGOrderService { get; }
        /// <summary>
        /// ç”Ÿç®¡æŽ’程明细业务接口层
        /// </summary>
        IOutSGOrderDetailService OutSGOrderDetailService { get; }
        /// <summary>
        /// å‡ºåº“详情业务接口层
        /// </summary>
        IOutStockLockInfoService OutStockLockInfoService { get; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -201,5 +201,15 @@
        /// </summary>
        /// <returns></returns>
        WebResponseContent ReceiveAutoIssue(MESAutoIssueDTO autoIssueDTO);
        /// <summary>
        /// MES手动叫料接口
        /// </summary>
        /// <returns></returns>
        WebResponseContent ReceiveManualIssue(MESManualIssueDTO manualIssueDTO);
        /// <summary>
        /// MES空托/余料呼叫接口
        /// </summary>
        /// <returns></returns>
        WebResponseContent ReceiveReturnIssue(List<MESReturnIssueDTO> returnIssueDTOs);
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_InboundRepository/InboundRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IInboundRepository;
namespace WIDESEA_InboundRepository
{
    /// <summary>
    /// å…¥åº“仓储实现层集成
    /// </summary>
    public class InboundRepository : IInboundRepository
    {
        public IPurchaseBSTOrderRepository PurchaseBSTOrderRepository { get; }
        public IPurchaseBSTOrderDetailRepository PurchaseBSTOrderDetailRepository { get; }
        public IReturnBSTOrderRepository ReturnBSTOrderRepository { get; }
        public IReturnBSTOrderDetailRepository ReturnBSTOrderDetailRepository { get; }
        public IMESProInOrderInfoRepository MESProInOrderInfoRepository { get; }
        public InboundRepository(IPurchaseBSTOrderRepository purchaseBSTOrderRepository,IPurchaseBSTOrderDetailRepository purchaseBSTOrderDetailRepository, IReturnBSTOrderRepository returnBSTOrderRepository, IReturnBSTOrderDetailRepository returnBSTOrderDetailRepository, IMESProInOrderInfoRepository mESProInOrderInfoRepository)
        {
            PurchaseBSTOrderRepository = purchaseBSTOrderRepository;
            PurchaseBSTOrderDetailRepository = purchaseBSTOrderDetailRepository;
            ReturnBSTOrderRepository = returnBSTOrderRepository;
            ReturnBSTOrderDetailRepository = returnBSTOrderDetailRepository;
            MESProInOrderInfoRepository = mESProInOrderInfoRepository;
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_InboundRepository/MESProInOrderInfoRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IInboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_InboundRepository
{
    /// <summary>
    /// MES成品/半成品仓储实现层
    /// </summary>
    public class MESProInOrderInfoRepository : RepositoryBase<Dt_MESProInOrderInfo>, IMESProInOrderInfoRepository
    {
        public MESProInOrderInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_InboundService/InboundService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IInboundService;
namespace WIDESEA_InboundService
{
    /// <summary>
    /// å…¥åº“业务实现层集成
    /// </summary>
    public class InboundService : IInboundService
    {
        public IMESProInOrderInfoService MESProInOrderInfoService { get; }
        public IPurchaseBSTOrderService PurchaseBSTOrderService { get; }
        public IPurchaseBSTOrderDetailService PurchaseBSTOrderDetailService { get; }
        public IReturnBSTOrderService ReturnBSTOrderService { get; }
        public IReturnBSTOrderDetailService ReturnBSTOrderDetailService { get; }
        public InboundService(IMESProInOrderInfoService mESProInOrderInfoService,IPurchaseBSTOrderService purchaseBSTOrderService,IPurchaseBSTOrderDetailService purchaseBSTOrderDetailService,IReturnBSTOrderService returnBSTOrderService,IReturnBSTOrderDetailService returnBSTOrderDetailService)
        {
            MESProInOrderInfoService = mESProInOrderInfoService;
            PurchaseBSTOrderService = purchaseBSTOrderService;
            PurchaseBSTOrderDetailService = purchaseBSTOrderDetailService;
            ReturnBSTOrderService = returnBSTOrderService;
            ReturnBSTOrderDetailService = returnBSTOrderDetailService;
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_InboundService/MESProInOrderInfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,130 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.MaterielEnum;
using WIDESEA_Common.OrderEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.MES;
using WIDESEA_IBasicRepository;
using WIDESEA_IInboundRepository;
using WIDESEA_IInboundService;
using WIDESEA_Model.Models;
namespace WIDESEA_InboundService
{
    public class MESProInOrderInfoService : ServiceBase<Dt_MESProInOrderInfo, IMESProInOrderInfoRepository>, IMESProInOrderInfoService
    {
        public IMESProInOrderInfoRepository Repository => BaseDal;
        private readonly IBasicRepository _basicRepository;
        private readonly IAGVStationInfoRepository _agvStationInfoRepository;
        private readonly IMapper _mapper;
        public MESProInOrderInfoService(IMESProInOrderInfoRepository BaseDal,IBasicRepository basicRepository,IMapper mapper, IAGVStationInfoRepository agvStationInfoRepository) : base(BaseDal)
        {
            _basicRepository = basicRepository;
            _mapper = mapper;
            _agvStationInfoRepository = agvStationInfoRepository;
        }
        public class TEMp
        {
            public int ID { get; set; }
            public string Name { get; set; }
        }
        /// <summary>
        /// æˆå“/半成品信息同步接口
        /// </summary>
        public WebResponseContent ReceiveProCodeInfo(List<MESProInDTO> proInDTOs)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                if (proInDTOs==null || proInDTOs.Count<=0)
                {
                    return content.Error("传入信息为空");
                }
                //获取所有成品,半成品信息
                List<Dt_MESProInOrderInfo> proInOrderInfos = BaseDal.QueryData();
                List<TEMp> temp = BaseDal.QueryData().Select(x => new TEMp() { ID=x.Id,Name=x.BarCode}).Where(x => x.Name.Split("-")[1].StartsWith("U1")).ToList();
                //获取所有物料信息
                List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x => x.MaterielInvOrgId == MaterielInvOrgEnum.新厂.ObjToInt());
                //获取所有领料计划
                MESProInDTO? CheckMaterialCode = proInDTOs.FirstOrDefault(x => !materielInfos.Select(x => x.MaterielCode).Contains(x.MaterialCode));
                if (CheckMaterialCode != null)
                {
                    return content.Error($"物料编码{nameof(MESProInDTO.MaterialCode)}:{CheckMaterialCode.MaterialCode}信息不存在");
                }
                //获取所有AGV点位
                List<Dt_AGVStationInfo> aGVStationInfos = _agvStationInfoRepository.QueryData(x => !string.IsNullOrEmpty(x.MESPointCode));
                MESProInDTO? CheckPointCode = proInDTOs.FirstOrDefault(x => !aGVStationInfos.Select(x => x.MESPointCode).Contains(x.PointCode));
                if (CheckPointCode != null)
                {
                    return content.Error($"周转位{nameof(MESReturnIssueDTO.PointCode)}{CheckPointCode.PointCode}不存在");
                }
                //判断是否存在重复
                MESProInDTO? proInDTO = proInDTOs.FirstOrDefault(x=>x.IsMantissa==false && proInOrderInfos.Select(x=>x.BarCode).Contains(x.BarCode));
                if (proInDTO!=null)
                {
                    return content.Error($"{proInDTO.ProductOrderNo}生产工单{proInDTO.BarCode}条码已存在");
                }
                Dt_MESProInOrderInfo? proInOrderInfo = proInOrderInfos.FirstOrDefault(x=>x.MESProInStatus==InOrderStatusEnum.关闭.ObjToInt() && proInDTOs.Select(x=>x.ProductOrderNo).Distinct().Contains(x.ProductOrderNo));
                if (proInOrderInfo != null)
                {
                    return content.Error($"{proInOrderInfo.ProductOrderNo}生产工单已关闭");
                }
                List<Dt_MESProInOrderInfo> AddMESProInOrders = new List<Dt_MESProInOrderInfo>();
                foreach (var item in proInDTOs)
                {
                    Dt_MaterielInfo materielInfo = materielInfos.FirstOrDefault(x=>x.MaterielCode== item.MaterialCode);
                    Dt_MESProInOrderInfo AddproInOrderInfo = _mapper.Map<Dt_MESProInOrderInfo>(item);
                    AddproInOrderInfo.WarehouseId = materielInfo.WarehouseId;
                    AddproInOrderInfo.MESProOrderType = materielInfo.MaterielSourceType;
                    AddMESProInOrders.Add(AddproInOrderInfo);
                }
                BaseDal.AddData(AddMESProInOrders);
                content.OK("接收成功");
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        /// <summary>
        /// MES工单停止接口
        /// </summary>
        /// <summary>
        public WebResponseContent ReceiveProOrderStop(MESOrderStopDTO orderStopDTO)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                if (orderStopDTO == null)
                {
                    return content.Error("传入信息不能为空");
                }
                //获取对应单据
                List<Dt_MESProInOrderInfo>? mESProInOrderInfos = BaseDal.QueryData(x => x.ProductOrderNo == orderStopDTO.ProductOrderNo && x.MESProInStatus != OutOrderStatusEnum.关闭.ObjToInt());
                if (mESProInOrderInfos == null || mESProInOrderInfos.Count <= 0)
                {
                    return content.Error($"成品或半成品工单{nameof(MESOrderStopDTO.ProductOrderNo)}{orderStopDTO.ProductOrderNo}不存在或已关闭");
                }
                mESProInOrderInfos.ForEach(x =>
                {
                    x.MESProInStatus = OutOrderStatusEnum.关闭.ObjToInt();
                });
                BaseDal.UpdateData(mESProInOrderInfos);
                content.OK($"工单{nameof(MESOrderStopDTO.ProductOrderNo)}{orderStopDTO.ProductOrderNo}停止成功");
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_Model/Models/Inbound/Dt_MESProInOrderInfo.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,139 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// MES成品/半成品单
    /// </summary>
    [SugarTable(nameof(Dt_MESProInOrderInfo), "MES成品/半成品单")]
    public class Dt_MESProInOrderInfo : 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 = 50, ColumnDescription = "生产订单编码(上游)")]
        public string ProductOrderNo { get; set; }
        /// <summary>
        /// è®¢å•类型
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "订单类型")]
        public int MESProOrderType { get; set; }
        /// <summary>
        /// æ´¾å•工单编码(上游)
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "派单工单编码")]
        public string SendOrderNo { get; set; }
        /// <summary>
        /// ç‰©æ–™ç¼–码
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "物料编码")]
        public string MaterialCode { get; set; }
        /// <summary>
        /// ç‰©æ–™æ‰¹æ¬¡
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "物料批次")]
        public string MaterialLot { get; set; }
        /// <summary>
        /// ç‰©æ–™ç­‰çº§
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "物料等级")]
        public string GradeCode { get; set; }
        /// <summary>
        /// ç‰©æ–™æ•°é‡
        /// </summary>
        [SugarColumn(IsNullable = false,  ColumnDescription = "物料数量")]
        public decimal ProQuantity { get; set; }
        /// <summary>
        /// ç‰©æ–™æ¡ç 
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "物料条码")]
        public string BarCode { get; set; }
        /// <summary>
        /// åŠ å·¥ä¸­å¿ƒç¼–ç (机台)
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "加工中心编码(机台)")]
        public string MakeCode { get; set; }
        /// <summary>
        /// ä½ç½®ç¼–号
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "位置编号")]
        public string PointCode { get; set; }
        /// <summary>
        /// å·å¾„
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "卷径")]
        public decimal Thickness { get; set; }
        /// <summary>
        /// å¹…宽
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "幅宽")]
        public decimal Wide { get; set; }
        /// <summary>
        /// é‡é‡
        /// </summary>
        [SugarColumn(IsNullable = true,  ColumnDescription = "重量")]
        public decimal Weight { get; set; }
        /// <summary>
        /// æˆå“åŒ…材纸箱物料编码
        /// </summary>
        [SugarColumn(IsNullable = true,  ColumnDescription = "成品包材纸箱物料编码")]
        public string ProPackCode { get; set; }
        /// <summary>
        /// ç®±é•¿
        /// </summary>
        [SugarColumn(IsNullable = true,  ColumnDescription = "箱长")]
        public decimal Length { get; set; }
        /// <summary>
        /// ç®±å®½
        /// </summary>
        [SugarColumn(IsNullable = true,  ColumnDescription = "箱宽")]
        public decimal Width { get; set; }
        /// <summary>
        /// ç®±é«˜
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "箱高")]
        public decimal Height { get; set; }
        /// <summary>
        /// çŠ¶æ€
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "状态")]
        public int MESProInStatus { get; set; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutMESOrder.cs
@@ -22,11 +22,11 @@
        [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, ColumnDescription = "仓库主键")]
        public int WarehouseId { get; set; }
        /// <summary>
        /// å‡ºåº“来源明细ID
@@ -102,9 +102,9 @@
        public DateTime EndDate { get; set; }
        /// <summary>
        /// åˆ†é…éœ€æ±‚数量
        /// å·²åˆ†é…éœ€æ±‚数量
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "分配需求数量")]
        [SugarColumn(IsNullable = true, ColumnDescription = "已分配需求数量")]
        public decimal AssignTotalUsage { get; set; }
        /// <summary>
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrder.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,75 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
using WIDESEA_Core.CodeConfigEnum;
using WIDESEA_Core.DB.Models;
using WIDESEA_Model.Models;
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// SG出库排程单
    /// </summary>
    [SugarTable(nameof(Dt_OutSGOrder), "SG出库排程单")]
    public class Dt_OutSGOrder : 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>
        /// å‡ºåº“来源ID
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "出库来源ID")]
        public int BoardMpsId { get; set; }
        /// <summary>
        /// WMS单据编号
        /// </summary>
        [CodeRule(RuleCodeEnum.OutboundOrderRule)]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "WMS单据编号", IsOnlyIgnoreUpdate = true)]
        public string OutSGOrderNo { get; set; }
        /// <summary>
        /// ç”Ÿäº§å·¥å•号(上游)
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "生产工单号(上游)")]
        public string OrderId { get; set; }
        /// <summary>
        /// å®¢æˆ·ç®€ç§°
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "客户简称")]
        public string ShortName { get; set; }
        /// <summary>
        /// å‡ºåº“单状态
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "出库单状态")]
        public int OutSGOrderStatus { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "备注")]
        public string Remark { get; set; }
        /// <summary>
        /// é‡‡è´­åˆ—表
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(Dt_OutSGOrderDetail.OutSGOrderId), nameof(Id))]
        public List<Dt_OutSGOrderDetail> Details { get; set; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrderDetail.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,119 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// SG出库排程明细
    /// </summary>
    [SugarTable(nameof(Dt_OutSGOrderDetail), "SG出库排程明细")]
    public class Dt_OutSGOrderDetail : BaseEntity
    {
        /// <summary>
        /// ä¸»é”®
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        /// <summary>
        /// å‡ºåº“主表ID
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "出库主表ID")]
        public int OutSGOrderId { get; set; }
        /// <summary>
        /// å…³è”的主表ID(上游)
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "关联的主表ID(上游)")]
        public int BoardMpsId { get; set; }
        /// <summary>
        /// å…³è”的明细ID(上游)
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "关联的主表ID(上游)")]
        public int BoardMpsDetailId { get; set; }
        /// <summary>
        /// å¹…宽
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "幅宽")]
        public decimal Width { get; set; }
        /// <summary>
        /// éœ€æ±‚长度
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "需求长度")]
        public decimal XqLen { get; set; }
        /// <summary>
        /// æ€»ç”¨é‡
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "总用量")]
        public decimal TotalUsage { get; set; }
        /// <summary>
        /// ç‰©æ–™æ¥æºID(上游)
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "物料来源ID(上游)")]
        public int MaterialId { get; set; }
        /// <summary>
        /// ç‰©æ–™ç¼–号
        /// </summary>
        [SugarColumn(IsNullable = false,Length =50, ColumnDescription = "物料编号")]
        public string MaterialNo { get; set; }
        /// <summary>
        /// é‡‡è´­é•¿åº¦
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "采购长度")]
        public decimal ProcurementLength { get; set; }
        /// <summary>
        /// æ¥žåˆ«
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "楞别")]
        public string BoardFluteNo { get; set; }
        /// <summary>
        /// æœºå°ä½ç½®
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "机台位置")]
        public string MachineName { get; set; }
        /// <summary>
        /// æ€»é•¿
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "总长")]
        public decimal TotalLenth { get; set; }
        /// <summary>
        /// å·²åˆ†é…ç”¨é‡
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "已分配用量")]
        public decimal AssignTotalUsage { get; set; }
        /// <summary>
        /// å·²å‡ºç”¨é‡
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "已出用量")]
        public decimal OutTotalUsage { get; set; }
        /// <summary>
        /// ç‰©æ–™åç§°
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "物料名称")]
        public string MaterialName { get; set; }
        /// <summary>
        /// å‡ºåº“单明细状态
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "出库单明细状态")]
        public int OutSGOrderDetailStatus { get; set; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_OutboundRepository/OutSGOrderDetailRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
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
{
    /// <summary>
    /// ç”Ÿç®¡å‡ºåº“信息仓储实现层
    /// </summary>
    public class OutSGOrderDetailRepository : RepositoryBase<Dt_OutSGOrderDetail>, IOutSGOrderDetailRepository
    {
        public OutSGOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_OutboundRepository/OutSGOrderRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
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
{
    /// <summary>
    /// ç”Ÿç®¡å‡ºåº“信息仓储实现层
    /// </summary>
    public class OutSGOrderRepository : RepositoryBase<Dt_OutSGOrder>, IOutSGOrderRepository
    {
        public OutSGOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_OutboundRepository/OutboundRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IOutboundRepository;
namespace WIDESEA_OutboundRepository
{
    /// <summary>
    /// å‡ºåº“仓储实现层集成
    /// </summary>
    public class OutboundRepository : IOutboundRepository
    {
        public IOutMESOrderRepository OutMESOrderRepository { get; }
        public IOutSGOrderRepository OutSGOrderRepository { get; }
        public IOutSGOrderDetailRepository OutSGOrderDetailRepository { get; }
        public IOutStockLockInfoRepository OutStockLockInfoRepository { get; }
        public OutboundRepository(IOutMESOrderRepository outMESOrderRepository, IOutSGOrderRepository outSGOrderRepository, IOutSGOrderDetailRepository outSGOrderDetailRepository, IOutStockLockInfoRepository outStockLockInfoRepository)
        {
            OutMESOrderRepository = outMESOrderRepository;
            OutSGOrderRepository = outSGOrderRepository;
            OutSGOrderDetailRepository = outSGOrderDetailRepository;
            OutStockLockInfoRepository = outStockLockInfoRepository;
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs
@@ -38,44 +38,60 @@
            _locationStatusChangeRecordService = locationStatusChangeRecordService;
            _mapper = mapper;
        }
        List<string> GradeCodes = new List<string>
        {
            "001"
        };
        /// <summary>
        /// æŽ¥æ”¶MES领料计划
        /// </summary>
        /// <returns></returns>
        public WebResponseContent ReceiveOutBound(OutMESOrderDTO outMESOrderDTO)
        public WebResponseContent ReceiveOutBound(List<OutMESOrderDTO> outMESOrderDTOs)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                if (outMESOrderDTO==null)
                if (outMESOrderDTOs==null || outMESOrderDTOs.Count <= 0)
                {
                    return content.Error("领料计划传入信息为空");
                }
                if (outMESOrderDTO.OutDetailId <= 0)
                outMESOrderDTOs.Select(x => x.OutDetailId);
                List<Dt_Warehouse> warehouses = _basicRepository.WarehouseRepository.QueryData();
                OutMESOrderDTO? CheckWarehouseCode = outMESOrderDTOs.FirstOrDefault(x => !warehouses.Select(x => x.WarehouseCode).Contains(x.WarehouseCode));
                if (CheckWarehouseCode!=null)
                {
                    return content.Error($"领料计划{nameof(OutMESOrderDTO.OutDetailId)}:{outMESOrderDTO.OutDetailId}需要大于0");
                    return content.Error($"领料计划库区{nameof(OutMESOrderDTO.WarehouseCode)}:{CheckWarehouseCode.WarehouseCode}不存在");
                }
                if (outMESOrderDTO.ReqQuantity <= 0)
                OutMESOrderDTO? CheckGradeCode = outMESOrderDTOs.FirstOrDefault(x => !GradeCodes.Contains(x.GradeCode));
                if (CheckGradeCode != null)
                {
                    return content.Error($"领料计划{nameof(OutMESOrderDTO.ReqQuantity)}:{outMESOrderDTO.ReqQuantity}需要大于0");
                    return content.Error($"领料计划库区{nameof(OutMESOrderDTO.GradeCode)}:{CheckGradeCode.GradeCode}不存在");
                }
                OutMESOrderDTO? CheckOutDetailId = outMESOrderDTOs.FirstOrDefault(x => x.OutDetailId <= 0);
                if (CheckOutDetailId != null)
                {
                    return content.Error($"领料计划{nameof(OutMESOrderDTO.OutDetailId)}:{CheckOutDetailId.ProductOrderNo}需要大于0");
                }
                OutMESOrderDTO? CheckReqQuantity = outMESOrderDTOs.FirstOrDefault(x => x.ReqQuantity <= 0);
                if (CheckReqQuantity != null)
                {
                    return content.Error($"领料计划{nameof(OutMESOrderDTO.ReqQuantity)}:{CheckReqQuantity.ProductOrderNo}需要大于0");
                }
                //获取所有物料信息
                List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x=>x.MaterielInvOrgId==MaterielInvOrgEnum.新厂.ObjToInt());
                //获取所有临料计划
                //获取所有领料计划
                List<Dt_OutMESOrder> outMESOrders = BaseDal.QueryData();
                Dt_MaterielInfo? ExistmaterielInfo = materielInfos.FirstOrDefault(x=>x.MaterielCode== outMESOrderDTO.MaterialCode);
                if (ExistmaterielInfo == null)
                OutMESOrderDTO? CheckMaterialCode = outMESOrderDTOs.FirstOrDefault(x=> !materielInfos.Select(x=>x.MaterielCode).Contains(x.MaterialCode));
                if (CheckMaterialCode != null)
                {
                    return content.Error($"物料编码{nameof(OutMESOrderDTO.MaterialCode)}:{outMESOrderDTO.MaterialCode}信息不存在");
                    return content.Error($"物料编码{nameof(OutMESOrderDTO.MaterialCode)}:{CheckMaterialCode.MaterialCode}信息不存在");
                }
                Dt_OutMESOrder? OldoutMESOrder = outMESOrders.FirstOrDefault(x=>x.OutDetailId==outMESOrderDTO.OutDetailId);
                Dt_OutMESOrder? OldoutMESOrder = outMESOrders.FirstOrDefault(x=> outMESOrderDTOs.Select(x=>x.OutDetailId).Contains(x.OutDetailId));
                if (OldoutMESOrder!=null)
                {
                    return content.Error($"领料计划{nameof(OutMESOrderDTO.OutDetailId)}:{outMESOrderDTO.OutDetailId}信息已存在");
                    return content.Error($"领料计划{nameof(OutMESOrderDTO.OutDetailId)}:{OldoutMESOrder.OutDetailId}信息已存在");
                }
                return content.Error($"领料计划{nameof(OutMESOrderDTO.ProductOrderNo)}:{outMESOrderDTO.ProductOrderNo},物料{outMESOrderDTO.MaterialCode}无可分配库存");
                Dt_OutMESOrder outMESOrder = _mapper.Map<Dt_OutMESOrder>(outMESOrderDTO);
                List<Dt_OutMESOrder> outMESOrder = outMESOrderDTOs.Select(x=> _mapper.Map<Dt_OutMESOrder>(x)).ToList();
                BaseDal.AddData(outMESOrder);
                return content.OK("接收成功");
            }
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
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 class OutSGOrderDetailService : ServiceBase<Dt_OutSGOrderDetail, IOutSGOrderDetailRepository>, IOutSGOrderDetailService
    {
        public IOutSGOrderDetailRepository Repository => BaseDal;
        private IBasicRepository _basicRepository;
        private IStockService _stockService;
        private IOutStockLockInfoService _outStockLockInfoService;
        private IBasicService _basicService;
        private ILocationStatusChangeRecordService _locationStatusChangeRecordService;
        private readonly IMapper _mapper;
        public OutSGOrderDetailService(IOutSGOrderDetailRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, ILocationStatusChangeRecordService locationStatusChangeRecordService, IMapper mapper) : base(BaseDal)
        {
            _basicRepository = basicRepository;
            _stockService = stockService;
            _outStockLockInfoService = outStockLockInfoService;
            _basicService = basicService;
            _locationStatusChangeRecordService = locationStatusChangeRecordService;
            _mapper = mapper;
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,98 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core;
using WIDESEA_DTO.MES;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_IOutboundRepository;
using WIDESEA_IOutboundService;
using WIDESEA_IRecordService;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
using WIDESEA_DTO.ERP;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Common.MaterielEnum;
using WIDESEA_Common.WareHouseEnum;
using WIDESEA_Core.Helper;
namespace WIDESEA_OutboundService
{
    public class OutSGOrderService : ServiceBase<Dt_OutSGOrder, IOutSGOrderRepository>, IOutSGOrderService
    {
        public IOutSGOrderRepository Repository => BaseDal;
        private IBasicRepository _basicRepository;
        private IStockService _stockService;
        private IBasicService _basicService;
        private ILocationStatusChangeRecordService _locationStatusChangeRecordService;
        private readonly IMapper _mapper;
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        public OutSGOrderService(IOutSGOrderRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IBasicService basicService, ILocationStatusChangeRecordService locationStatusChangeRecordService, IMapper mapper,IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
        {
            _basicRepository = basicRepository;
            _stockService = stockService;
            _basicService = basicService;
            _locationStatusChangeRecordService = locationStatusChangeRecordService;
            _mapper = mapper;
            _unitOfWorkManage = unitOfWorkManage;
        }
        public WebResponseContent AddOutSGOrder(List<SGOutOrderDTO> outOrderDTOs)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                //获取所有排程单
                List<Dt_OutSGOrder> outSGOrders=BaseDal.Db.Queryable<Dt_OutSGOrder>().Includes(x => x.Details).ToList();
                //判断单据
                Dt_OutSGOrder? ExistAddOutOrder = outSGOrders.FirstOrDefault(x => outOrderDTOs.Select(x => x.OrderId).Distinct().Contains(x.OrderId));
                if (ExistAddOutOrder != null)
                {
                    return content.Error($"出库排程单号{nameof(SGOutOrderDTO.OrderId)}:{ExistAddOutOrder.OrderId}已存在");
                }
                //获取所有物料
                List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt() && x.MaterielInvOrgId == MaterielInvOrgEnum.老厂.ObjToInt() && x.MaterialSourceId != 0);
                SGOutOrderDTO?  sGOutOrderDTO = outOrderDTOs.FirstOrDefault(x => !materielInfos.Select(x => x.MaterielCode).Contains(x.MaterialNo));
                if (sGOutOrderDTO != null)
                {
                    return content.Error($"生产排程{sGOutOrderDTO.OrderId}物料:{sGOutOrderDTO.MaterialNo}不存在");
                }
                List<Dt_OutSGOrder> AddOutSGOrders = new List<Dt_OutSGOrder>();
                foreach (var item in outOrderDTOs)
                {
                    //获取工单
                    Dt_OutSGOrder? ExistOutSGOrder = AddOutSGOrders.FirstOrDefault(x=>x.OrderId== item.OrderId);
                    //获取物料
                    Dt_MaterielInfo materielInfo = materielInfos.FirstOrDefault(x => x.MaterielCode == item.MaterialNo);
                    //明细提前转换
                    Dt_OutSGOrderDetail outSGOrderDetail = _mapper.Map<Dt_OutSGOrderDetail>(item);
                    outSGOrderDetail.MaterialName = materielInfo.MaterielName;
                    //判断工单是否已经存在
                    if (ExistOutSGOrder!=null)
                    {
                        ExistOutSGOrder.Details.Add(outSGOrderDetail);
                    }
                    else
                    {
                        Dt_OutSGOrder outSGOrder=_mapper.Map<Dt_OutSGOrder>(item);
                        outSGOrder.Details=new List<Dt_OutSGOrderDetail>() { outSGOrderDetail };
                        AddOutSGOrders.Add(outSGOrder);
                    }
                }
                BaseDal.Db.InsertNav(AddOutSGOrders).Include(x => x.Details).ExecuteCommand();
                content.OK("接收排程成功");
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_OutboundService/OutboundService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IOutboundService;
namespace WIDESEA_OutboundService
{
    /// <summary>
    /// å‡ºåº“业务层集成
    /// </summary>
    public class OutboundService : IOutboundService
    {
        /// <summary>
        /// MES领料业务接口层
        /// </summary>
        public IOutMESOrderService OutMESOrderService { get; }
        /// <summary>
        /// ç”Ÿç®¡æŽ’程业务接口层
        /// </summary>
        public IOutSGOrderService OutSGOrderService { get; }
        /// <summary>
        /// ç”Ÿç®¡æŽ’程明细业务接口层
        /// </summary>
        public IOutSGOrderDetailService OutSGOrderDetailService { get; }
        /// <summary>
        /// å‡ºåº“详情业务接口层
        /// </summary>
        public IOutStockLockInfoService OutStockLockInfoService { get; }
        public OutboundService(IOutMESOrderService outMESOrderService, IOutSGOrderService outSGOrderService, IOutSGOrderDetailService outSGOrderDetailService, IOutStockLockInfoService outStockLockInfoService)
        {
            OutMESOrderService = outMESOrderService;
            OutSGOrderService = outSGOrderService;
            OutSGOrderDetailService = outSGOrderDetailService;
            OutStockLockInfoService = outStockLockInfoService;
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs
@@ -45,11 +45,19 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                if (autoIssueDTO == null)
                {
                    return content.Error("传入信息不能为空");
                }
                //获取对应单据
                Dt_OutMESOrder? outMESOrder = _outMESOrderRepository.QueryFirst(x=>x.OutDetailId==autoIssueDTO.OutDetailId);
                if (outMESOrder==null)
                {
                    return content.Error($"领料计划{nameof(MESAutoIssueDTO.OutDetailId)}{autoIssueDTO.OutDetailId}不存在");
                }
                if (outMESOrder.OutMESOrderStatus==OutOrderStatusEnum.关闭.ObjToInt())
                {
                    return content.Error($"领料计划{nameof(MESAutoIssueDTO.OutDetailId)}{outMESOrder.ProductOrderNo}工单已关闭");
                }
                //获取周转位置编号
                Dt_AGVStationInfo? stationInfo = _agvStationInfoRepository.QueryFirst(x=>x.MESPointCode==autoIssueDTO.PointCode);
@@ -61,15 +69,15 @@
                {
                    return content.Error($"领料计划周转位{nameof(MESAutoIssueDTO.PointCode)}{autoIssueDTO.PointCode}存在空托");
                }
                Dt_Task? task = BaseDal.QueryData(x => x.OrderNo == outMESOrder.OutMESOrderNo && x.TaskStatus==TaskStatusEnum.CallPending.ObjToInt()).OrderByDescending(x=>x.Grade).ThenBy(x=>x.TaskNum).FirstOrDefault();
                //获取任务
                if (task==null)
                {
                    return content.Error($"未找到领料计划编号{outMESOrder.ProductOrderNo}可配送任务");
                }
                task.TaskStatus = TaskStatusEnum.New.ObjToInt();
                task.TargetAddress= stationInfo.AGVStationCode;
                PushTasksToWCS(new List<Dt_Task> { task });
                //Dt_Task? task = BaseDal.QueryData(x => x.OrderNo == outMESOrder.OutMESOrderNo && x.TaskStatus==TaskStatusEnum.CallPending.ObjToInt()).OrderByDescending(x=>x.Grade).ThenBy(x=>x.TaskNum).FirstOrDefault();
                ////获取任务
                //if (task==null)
                //{
                //    return content.Error($"未找到领料计划编号{outMESOrder.ProductOrderNo}可配送任务");
                //}
                //task.TaskStatus = TaskStatusEnum.New.ObjToInt();
                //task.TargetAddress= stationInfo.AGVStationCode;
                //PushTasksToWCS(new List<Dt_Task> { task });
                return content.OK("叫料成功");
            }
            catch (Exception ex)
@@ -78,5 +86,74 @@
            }
            return content;
        }
        public WebResponseContent ReceiveManualIssue(MESManualIssueDTO manualIssueDTO)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                if (manualIssueDTO == null)
                {
                    return content.Error("传入信息不能为空");
                }
                //获取对应单据
                Dt_OutMESOrder? outMESOrder = _outMESOrderRepository.QueryFirst(x => x.OutDetailId == manualIssueDTO.OutDetailId);
                if (outMESOrder == null)
                {
                    return content.Error($"领料计划{nameof(MESAutoIssueDTO.OutDetailId)}{manualIssueDTO.OutDetailId}不存在");
                }
                if (outMESOrder.OutMESOrderStatus == OutOrderStatusEnum.关闭.ObjToInt())
                {
                    return content.Error($"领料计划{nameof(MESAutoIssueDTO.OutDetailId)}{outMESOrder.ProductOrderNo}工单已关闭");
                }
                //获取周转位置编号
                Dt_AGVStationInfo? stationInfo = _agvStationInfoRepository.QueryFirst(x => x.MESPointCode == manualIssueDTO.PointCode);
                if (stationInfo == null)
                {
                    return content.Error($"领料计划周转位{nameof(MESAutoIssueDTO.PointCode)}{manualIssueDTO.PointCode}不存在");
                }
                //Dt_Task? task = BaseDal.QueryData(x => x.OrderNo == outMESOrder.OutMESOrderNo && x.TaskStatus == TaskStatusEnum.CallPending.ObjToInt()).OrderByDescending(x => x.Grade).ThenBy(x => x.TaskNum).FirstOrDefault();
                ////获取任务
                //if (task == null)
                //{
                //    return content.Error($"未找到领料计划编号{outMESOrder.ProductOrderNo}可配送任务");
                //}
                //task.TaskStatus = TaskStatusEnum.New.ObjToInt();
                //task.TargetAddress = stationInfo.AGVStationCode;
                //PushTasksToWCS(new List<Dt_Task> { task });
                return content.OK("叫料成功");
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        public WebResponseContent ReceiveReturnIssue(List<MESReturnIssueDTO> returnIssueDTOs)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                if (returnIssueDTOs==null || returnIssueDTOs.Count<=0)
                {
                    return content.Error("传入信息不能为空");
                }
                //获取所有AGV点位
                List<Dt_AGVStationInfo> aGVStationInfos= _agvStationInfoRepository.QueryData(x => !string.IsNullOrEmpty(x.MESPointCode));
                MESReturnIssueDTO? returnIssueDTO = returnIssueDTOs.FirstOrDefault(x=> !aGVStationInfos.Select(x=>x.MESPointCode).Contains(x.PointCode));
                if (returnIssueDTO != null)
                {
                    return content.Error($"周转位{nameof(MESReturnIssueDTO.PointCode)}{returnIssueDTO.PointCode}不存在");
                }
                content.OK("呼叫成功");
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpBSTController.cs
@@ -18,6 +18,7 @@
using WIDESEA_IInboundService;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
using WIDESEA_OutboundService;
using static WIDESEA_DTO.ErpResponseContent;
namespace WIDESEA_WMSServer.Controllers.ERP
@@ -34,14 +35,16 @@
        private readonly IPurchaseBSTOrderService _purchaseBSTOrderService;
        private readonly IOutBSTOrderService _outBSTOrderService;
        private readonly IReturnBSTOrderService _returnBSTOrderService;
        private readonly IOutboundService _outboundService;
        public ErpBSTController(IBasicService basicService, IInvokeERPService invokeERPService,IPurchaseBSTOrderService purchaseBSTOrderService,IOutBSTOrderService outBSTOrderService,IReturnBSTOrderService returnBSTOrderService)
        public ErpBSTController(IBasicService basicService, IInvokeERPService invokeERPService,IPurchaseBSTOrderService purchaseBSTOrderService,IOutBSTOrderService outBSTOrderService,IReturnBSTOrderService returnBSTOrderService, IOutboundService outboundService)
        {
            _basicService = basicService;
            _invokeERPService = invokeERPService;
            _purchaseBSTOrderService = purchaseBSTOrderService;
            _outBSTOrderService = outBSTOrderService;
            _returnBSTOrderService = returnBSTOrderService;
            _outboundService = outboundService;
        }
        /// <summary>
        /// æ·»åŠ è€åŽ‚ç‰©æ–™
@@ -75,14 +78,23 @@
            return _purchaseBSTOrderService.AddPurchaseBSTOrder(bSTPurchaseOrderDTOs);
        }
        ///// <summary>
        ///// æŽ¥æ”¶å‡ºåº“排程信息
        ///// </summary>
        ///// <returns></returns>
        //[HttpPost, HttpGet, Route("ReceiveOutOrder"), AllowAnonymous]
        //public WebResponseContent AddOutBSTOrder([FromBody] List<BSTOutOrderDTO> bSTOutOrderDTOs)
        //{
        //    return _outBSTOrderService.AddOutBSTOrder(bSTOutOrderDTOs);
        //}
        /// <summary>
        /// æŽ¥æ”¶å‡ºåº“排程信息
        /// æŽ¥æ”¶ä¸€æœŸç”Ÿç®¡æŽ’程信息
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("ReceiveOutOrder"), AllowAnonymous]
        public WebResponseContent AddOutBSTOrder([FromBody] List<BSTOutOrderDTO> bSTOutOrderDTOs)
        public WebResponseContent AddOutBSTOrder([FromBody] List<SGOutOrderDTO> outOrderDTOs)
        {
            return _outBSTOrderService.AddOutBSTOrder(bSTOutOrderDTOs);
            return _outboundService.OutSGOrderService.AddOutSGOrder(outOrderDTOs);
        }
        /// <summary>
        /// æŽ¥æ”¶åšæ€é€šé¢†æ–™ä¿¡æ¯
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Inbound/MESProInOrderInfoController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IInboundService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Inbound
{
    /// <summary>
    /// MES成品/半成品
    /// </summary>
    [Route("api/MESProInOrderInfo")]
    [ApiController]
    public class MESProInOrderInfoController : ApiBaseController<IMESProInOrderInfoService, Dt_MESProInOrderInfo>
    {
        public MESProInOrderInfoController(IMESProInOrderInfoService service) : base(service)
        {
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs
@@ -14,6 +14,7 @@
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.MES;
using WIDESEA_IOutboundService;
using WIDESEA_IInboundService;
namespace WIDESEA_WMSServer.Controllers.MES
{
@@ -26,11 +27,13 @@
    {
        private readonly ITaskService _taskService;
        private readonly IOutMESOrderService _outMESOrderService;
        private readonly IMESProInOrderInfoService _proInOrderInfoService;
        public MesController(ITaskService taskService,IOutMESOrderService outMESOrderService)
        public MesController(ITaskService taskService,IOutMESOrderService outMESOrderService,IMESProInOrderInfoService proInOrderInfoService)
        {
            _taskService = taskService;
            _outMESOrderService = outMESOrderService;
            _proInOrderInfoService=proInOrderInfoService;
        }
        /// <summary>
        /// æŽ¥æ”¶MES领料计划
@@ -38,15 +41,14 @@
        /// <returns></returns>
        [HttpPost, HttpGet, Route("ReceiveOutBound"), AllowAnonymous]
        public WebResponseContent ReceiveOutBound([FromBody] OutMESOrderDTO outMESOrderDTO)
        public WebResponseContent ReceiveOutBound([FromBody] List<OutMESOrderDTO> outMESOrderDTOs)
        {
            return _outMESOrderService.ReceiveOutBound(outMESOrderDTO);
            return _outMESOrderService.ReceiveOutBound(outMESOrderDTOs);
        }
        /// <summary>
        /// MES自动叫料接口
        /// </summary>
        /// <returns></returns>
        /// <summary>
        [HttpPost, HttpGet, Route("ReceiveAutoIssue"), AllowAnonymous]
        public WebResponseContent ReceiveAutoIssue([FromBody] MESAutoIssueDTO autoIssueDTO)
        {
@@ -57,44 +59,40 @@
        /// MES手动叫料接口
        /// </summary>
        /// <returns></returns>
        /// <summary>
        [HttpPost, HttpGet, Route("ReceiveManualIssue"), AllowAnonymous]
        public WebResponseContent ReceiveManualIssue([FromBody] MESAutoIssueDTO autoIssueDTO)
        public WebResponseContent ReceiveManualIssue([FromBody] MESManualIssueDTO manualIssueDTO)
        {
            return _taskService.ReceiveAutoIssue(autoIssueDTO);
            return _taskService.ReceiveManualIssue(manualIssueDTO);
        }
        /// <summary>
        /// MES空托/余料呼叫接口
        /// </summary>
        /// <returns></returns>
        /// <summary>
        [HttpPost, HttpGet, Route("ReceiveReturnIssue"), AllowAnonymous]
        public WebResponseContent ReceiveReturnIssue([FromBody] MESAutoIssueDTO autoIssueDTO)
        public WebResponseContent ReceiveReturnIssue([FromBody] List<MESReturnIssueDTO> returnIssueDTOs)
        {
            return _taskService.ReceiveAutoIssue(autoIssueDTO);
            return _taskService.ReceiveReturnIssue(returnIssueDTOs);
        }
        /// <summary>
        /// æˆå“/半成品信息同步接口
        /// </summary>
        /// <returns></returns>
        /// <summary>
        [HttpPost, HttpGet, Route("ReceiveProCodeInfo"), AllowAnonymous]
        public WebResponseContent ReceiveProCodeInfo([FromBody] MESAutoIssueDTO autoIssueDTO)
        public WebResponseContent ReceiveProCodeInfo([FromBody] List<MESProInDTO> proInDTOs)
        {
            return _taskService.ReceiveAutoIssue(autoIssueDTO);
            return _proInOrderInfoService.ReceiveProCodeInfo(proInDTOs);
        }
        /// <summary>
        /// MES工单停止接口
        /// </summary>
        /// <returns></returns>
        /// <summary>
        [HttpPost, HttpGet, Route("ReceiveProOrderStop"), AllowAnonymous]
        public WebResponseContent ReceiveProOrderStop([FromBody] MESAutoIssueDTO autoIssueDTO)
        public WebResponseContent ReceiveProOrderStop([FromBody] MESOrderStopDTO orderStopDTO)
        {
            return _taskService.ReceiveAutoIssue(autoIssueDTO);
            return _proInOrderInfoService.ReceiveProOrderStop(orderStopDTO);
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutSGOrderController.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/OutSGOrder")]
    [ApiController]
    public class OutSGOrderController : ApiBaseController<IOutSGOrderService, Dt_OutSGOrder>
    {
        public OutSGOrderController(IOutSGOrderService service) : base(service)
        {
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutSGOrderDetailController.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/OutSGOrderDetail")]
    [ApiController]
    public class OutSGOrderDetailController : ApiBaseController<IOutSGOrderDetailService, Dt_OutSGOrderDetail>
    {
        public OutSGOrderDetailController(IOutSGOrderDetailService service) : base(service)
        {
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs
@@ -46,6 +46,11 @@
            CreateMap<BSTReturnOrderDTOItem, Dt_ReturnBSTOrderDetail>().ForMember(x => x.ReturnBSTOrderDetailStatus, b => b.MapFrom(b => OutOrderStatusEnum.未开始.ObjToInt())).ForMember(x => x.MaterialWide, b => b.MapFrom(b => b.W)).ForMember(x => x.MaterialThick, b => b.MapFrom(b => b.Thick));
            //MES领料计划实体转换
            CreateMap<OutMESOrderDTO, Dt_OutMESOrder>().ForMember(x => x.OutMESOrderStatus, b => b.MapFrom(b => OutOrderStatusEnum.未开始.ObjToInt()));
            //生管排程实体转换
            CreateMap<SGOutOrderDTO, Dt_OutSGOrder>().ForMember(x => x.OutSGOrderStatus, b => b.MapFrom(b => OutOrderStatusEnum.未开始.ObjToInt())).ForMember(x => x.WarehouseId, b => b.MapFrom(b => WarehouseEnum.LLDYL.ObjToInt()));
            CreateMap<SGOutOrderDTO, Dt_OutSGOrderDetail>().ForMember(x => x.OutSGOrderDetailStatus, b => b.MapFrom(b => OutOrderStatusEnum.未开始.ObjToInt()));
            //成品半成品实体转换
            CreateMap<MESProInDTO, Dt_MESProInOrderInfo>().ForMember(x => x.MESProInStatus, b => b.MapFrom(b => InOrderStatusEnum.未开始.ObjToInt()));
        }
    }
}
ÏîÄ¿×ÊÁÏ/½Ó¿ÚЭÒé/²©Ë¼Í¨ÀûÍØ½Ó¿Ú.V1.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/½Ó¿ÚЭÒé/²©Ë¹Í¨ÀûÍØ½Ó¿Ú.V2.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/½Ó¿ÚЭÒé/ÁúÀûµÃMES½Ó¿Ú.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/ÉìËõ»õ²æ½Ó²µÌ¨IP·ÖÅä±í.xlsx
Binary files differ