From 659b0ed98c87b164b96ac43b3c0c8a7d2f975bf2 Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期五, 28 二月 2025 10:51:20 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn --- 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/00e22ada-36c2-42fa-ba01-39bb171b9b5f.vsidx | 0 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/AGV_PPJob.cs | 53 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPCutOutboundOrderService.cs | 38 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPCutOutboundOrderService.cs | 16 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPOutboundOrderService.cs | 143 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs | 429 +++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPCutOutboundOrderRepository.cs | 19 代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPOutboundOrder.js | 74 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs | 10 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IMesPPBackInboundOrderDetailRepository.cs | 14 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/TSJConveyorLineJob_PP.cs | 50 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs | 12 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPOutboundOrderRepository.cs | 14 代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/mesPPCutOutOrderDetail.vue | 441 +++++ 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/01b812bf-9885-4a77-95d8-f05c785d7354.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPOutboundOrderService.cs | 21 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 34 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesResponseContent.cs | 51 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/PPSubsectionModel.cs | 194 ++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs | 23 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesPPBackInboundOrderDetailService.cs | 37 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPOutboundOrderDetailService.cs | 17 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs | 67 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPOutboundOrderDetail.cs | 46 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/AGV_PPExtend.cs | 65 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3c53f8c2-2194-4cf0-8343-aca04ba405cc.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IMesPPBackInboundOrderRepository.cs | 15 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPOutboundOrderDetailService.cs | 38 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs | 11 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPOutboundOrder.cs | 123 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPCutOutboundOrderController.cs | 28 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPOutboundOrderDetailController.cs | 21 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f9166ebc-70d4-4adb-962f-3dde09ec62a1.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPCutOutboundOrderDetailRepository.cs | 15 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs | 10 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesPPBackInboundOrder.cs | 79 代码管理/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPOutboundOrderDetail.vue | 149 + 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7badb44d-00b3-43fa-954b-a0f65ce3bdd5.vsidx | 0 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c37c0d0d-502a-46ba-b0c6-e65f37fc1a15.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesPPBackInboundOrderService.cs | 39 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs | 6 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPCutOutboundOrderDetailController.cs | 28 代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPCutOutboundOrder.js | 74 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPOutboundOrderRepository.cs | 18 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPOutboundOrderController.cs | 27 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs | 7 代码管理/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrderDetail.vue | 256 +++ 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/7ed246f4-c665-4855-94f0-8ea64664545f.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPCutOutboundOrder.cs | 68 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/MesPPBackInboundOrderController.cs | 20 代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPOutboundOrderDetail.js | 57 代码管理/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrder.vue | 356 ++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/MesPPBackInboundOrderDetailRepository.cs | 18 代码管理/淮安PDA/pages.json | 7 代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/mesPPoutOrderDetail.vue | 421 +++++ 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 3 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs | 45 代码管理/WMS/WIDESEA_WMSClient/src/router/viewGird.js | 16 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IMesPPBackInboundOrderDetailService.cs | 14 项目资料/接口文档/MES业务流程图V1.0.xlsx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPCutOutboundOrderRepository.cs | 15 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 73 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPCutOutboundOrderDetail.cs | 106 + 代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPCutOutboundOrderDetail.js | 73 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesPPBackInboundOrderDetail.cs | 116 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/MesPPBackInboundOrderRepository.cs | 19 代码管理/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPOutboundOrder.vue | 259 +++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPCutOutboundOrderDetailService.cs | 14 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPOutboundOrderDetailRepository.cs | 19 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs | 6 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IMesPPBackInboundOrderService.cs | 15 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPOutboundOrderDetailRepository.cs | 15 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs | 10 代码管理/淮安PDA/pages/stash/AGVTasks.vue | 113 + 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/47dfe2fa-2b55-44f1-9467-56f17ea6232a.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPCutOutboundOrderDetailRepository.cs | 19 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPCutOutboundOrderDetailService.cs | 38 79 files changed, 4,705 insertions(+), 46 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/7ed246f4-c665-4855-94f0-8ea64664545f.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/7ed246f4-c665-4855-94f0-8ea64664545f.vsidx" new file mode 100644 index 0000000..d2ade94 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/7ed246f4-c665-4855-94f0-8ea64664545f.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c37c0d0d-502a-46ba-b0c6-e65f37fc1a15.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c37c0d0d-502a-46ba-b0c6-e65f37fc1a15.vsidx" new file mode 100644 index 0000000..64b457d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c37c0d0d-502a-46ba-b0c6-e65f37fc1a15.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f9166ebc-70d4-4adb-962f-3dde09ec62a1.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f9166ebc-70d4-4adb-962f-3dde09ec62a1.vsidx" new file mode 100644 index 0000000..0ea433d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f9166ebc-70d4-4adb-962f-3dde09ec62a1.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs" index f5ef2f3..0f3ddf8 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs" @@ -28,6 +28,12 @@ Agv_FLSendTask, /// <summary> + /// PPAGV浠诲姟鍙戦�� + /// </summary> + [Description("PPAGV浠诲姟鍙戦��")] + Agv_PPSendTask, + + /// <summary> /// 鍥炶皟WMS浠诲姟瀹屾垚 /// </summary> [Description("鍥炶皟WMS浠诲姟瀹屾垚")] diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs" index 760da8e..da58fe1 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs" @@ -31,7 +31,7 @@ return TaskTypeGroup.RelocationGroup; } else - { + { return TaskTypeGroup.OtherGroup; } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" index 6a74dc6..2d365d0 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" @@ -265,8 +265,7 @@ return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢遍厤缃俊鎭�"); } router = routers.FirstOrDefault(); - string stationCode = router?.NextPosi ?? ""; - Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == stationCode); + Dt_StationManger? stationManger = _stationMangerRepository.QueryData(x => true).FirstOrDefault(x=>x.StationCode== router?.NextPosi); if (stationManger == null) { return WebResponseContent.Instance.Error($"鏈壘鍒扮珯鍙伴厤缃俊鎭�"); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPExtend.cs" new file mode 100644 index 0000000..bfe1676 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPExtend.cs" @@ -0,0 +1,65 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_DTO.Agv; +using WIDESEAWCS_Common.APIEnum; +using WIDESEAWCS_Common.TaskEnum; +using WIDESEAWCS_Core; +using WIDESEAWCS_Core.Helper; +using WIDESEAWCS_Model.Models; +using WIDESEAWCS_Tasks.StackerCraneJob; + +namespace WIDESEAWCS_Tasks +{ + public partial class AGV_PPJob + { + public void SendAGVTask() + { + try + { + var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()||x.TaskState==TaskStatusEnum.AGV_Execute.ObjToInt()) && nameof(AGV_PPJob).Contains(x.DeviceCode) && !string.IsNullOrEmpty(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList(); + foreach (var task in newTasks) + { + try + { + AgvTaskDTO TaskDTO = new AgvTaskDTO() + { + TaskCode = task.AgvTaskNum, + ReqCode = DateTime.Now.ToString("yyyyMMddHHmmss") + task.AgvTaskNum, + TaskTyp = task.TaskType < TaskTypeEnum.Inbound.ObjToInt() ? "FLC" : "FLR", + ctnrCode = task.PalletCode, + PositionCodePath = new List<CodePath>() + { + new CodePath() + { + type="00", + positionCode=task.CurrentAddress + }, + new CodePath() + { + type="00", + positionCode=task.NextAddress + } + }, + }; + WebResponseContent content = _taskService.AgvSendTask(TaskDTO, APIEnum.Agv_PPSendTask); + if (!content.Status) throw new Exception(content.Message); + task.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt(); + } + catch (Exception ex) + { + task.TaskState = TaskStatusEnum.Exception.ObjToInt(); + task.ExceptionMessage = ex.Message; + } + } + _taskService.UpdateData(newTasks); + } + catch (Exception ex) + { + WriteError(nameof(AGV_FLJob), ex.Message, ex); + } + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPJob.cs" new file mode 100644 index 0000000..bd70db9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPJob.cs" @@ -0,0 +1,53 @@ +锘縰sing AutoMapper; +using Newtonsoft.Json; +using Quartz; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection.Metadata; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_DTO.Agv; +using WIDESEAWCS_Common.TaskEnum; +using WIDESEAWCS_Core; +using WIDESEAWCS_Core.Helper; +using WIDESEAWCS_DTO.TaskInfo; +using WIDESEAWCS_IBasicInfoRepository; +using WIDESEAWCS_ITaskInfoService; +using WIDESEAWCS_Model.Models; +using WIDESEAWCS_QuartzJob; +using WIDESEAWCS_QuartzJob.Service; + +namespace WIDESEAWCS_Tasks +{ + [DisallowConcurrentExecution] + public partial class AGV_PPJob : JobBase, IJob + { + public readonly ITaskService _taskService; + private readonly ITaskExecuteDetailService _taskExecuteDetailService; + private readonly IRouterService _routerService; + private readonly IStationMangerRepository _stationMangerRepository; + private readonly IMapper _mapper; + + public AGV_PPJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IStationMangerRepository stationMangerRepository, IMapper mapper) + { + _taskService = taskService; + _taskExecuteDetailService = taskExecuteDetailService; + _routerService = routerService; + _stationMangerRepository = stationMangerRepository; + _mapper = mapper; + } + public Task Execute(IJobExecutionContext context) + { + try + { + SendAGVTask(); + } + catch (Exception ex) + { + Console.Out.WriteLine(nameof(AGV_PPJob) + ":" + ex.Message); + } + return Task.CompletedTask; + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/TSJConveyorLineJob_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/TSJConveyorLineJob_PP.cs" index 3230c14..d52dd9a 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/TSJConveyorLineJob_PP.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/TSJConveyorLineJob_PP.cs" @@ -69,32 +69,34 @@ ConveyorLineSignal conveyorLineSignalRead = conveyorLineInfoRead.Signal.ByteToBoolObject<ConveyorLineSignal>(); ConveyorLineSignal conveyorLineSignalWrite = conveyorLineInfoWrite.Signal.ByteToBoolObject<ConveyorLineSignal>(); - if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt()) - { - if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK) - { - if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode)) - { - WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode); - if (content.Status) - { - device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); - } - } - } - else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK) - { - Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.PalletCode == conveyorLineInfoRead.Barcode && x.DeviceCode == item.StationDeviceCode && x.TaskState == TaskStatusEnum.New.ObjToInt()); - if (task != null) - { - _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, currentAddress: item.StackerCraneStationCode, deviceCode: task.Roadway, nextAddress: task.TargetAddress); - } + #region + //if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt()) + //{ + // if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK) + // { + // if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode)) + // { + // WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode); + // if (content.Status) + // { + // device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); + // } + // } + // } + // else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK) + // { + // Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.PalletCode == conveyorLineInfoRead.Barcode && x.DeviceCode == item.StationDeviceCode && x.TaskState == TaskStatusEnum.New.ObjToInt()); + // if (task != null) + // { + // _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, currentAddress: item.StackerCraneStationCode, deviceCode: task.Roadway, nextAddress: task.TargetAddress); + // } - device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode); - } + // device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode); + // } - } - else if (item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) + //} + #endregion + if (item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) { if (conveyorLineSignalRead.STB) { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/mesPPCutOutOrderDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/mesPPCutOutOrderDetail.vue" new file mode 100644 index 0000000..0f908fa --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/mesPPCutOutOrderDetail.vue" @@ -0,0 +1,441 @@ +a<template> + <div> + <vol-box + v-model="showDetialBox" + :lazy="true" + width="75%" + :padding="15" + title="鍗曟嵁鏄庣粏淇℃伅" + > + <div class="box-head"> + <el-alert :closable="false" style="width: 100%"> + <el-row> + <el-col :span="16"> + <span>宸查�変腑 {{ selection.length }} 椤�</span> + </el-col> + <el-col :span="8"> + <el-link + type="primary" + size="small" + style="float: right; height: 20px" + @click="lockstocks" + >閿佸畾搴撳瓨</el-link + > + <el-link + type="primary" + size="small" + style="float: right; height: 20px; margin-right: 10px" + @click="outbound" + >鐩存帴鍑哄簱</el-link + > + <el-link + type="primary" + size="small" + style="float: right; height: 20px; margin-right: 10px" + @click="getData" + >鍒锋柊</el-link + ></el-col + > + </el-row> + </el-alert> + </div> + <div class="box-table" style="margin-top: 1%"> + <el-table + ref="singleTable" + :data="tableData" + style="width: 100%; height: 100%" + highlight-current-row + @current-change="handleCurrentChange" + height="500px" + @row-click="handleRowClick" + @selection-change="handleSelectionChange" + > + <el-table-column type="selection" width="55"> </el-table-column> + <el-table-column + label="搴忓彿" + type="index" + fixed="left" + width="55" + align="center" + ></el-table-column> + <el-table-column + v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" + :key="index" + :prop="item.prop" + :label="item.title" + :width="item.width" + align="center" + > + <template #default="scoped"> + <div v-if="item.type == 'icon'"> + <el-tooltip + class="item" + effect="dark" + :content="item.title" + placement="bottom" + ><el-link + type="primary" + :disabled="getButtonEnable(item.prop, scoped.row)" + @click="tableButtonClick(scoped.row, item)" + ><i :class="item.icon" style="font-size: 22px"></i></el-link + ></el-tooltip> + </div> + + <div v-else-if="item.type == 'tag'"> + <el-tag size="small"> + {{ getDictionary(scoped.row, item) }} + </el-tag> + </div> + </template> + </el-table-column> + </el-table> + </div> + </vol-box> + <stock-select ref="child" @parentCall="parentCall"></stock-select> + <selected-stock + ref="selectedStock" + @parentCall="parentCall" + ></selected-stock> + </div> +</template> +<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 }, + data() { + return { + row: null, + showDetialBox: false, + flag: false, + currentRow: null, + selection: [], + tableData: [], + tableColumns: [ + { + prop: "id", + title: "Id", + type: "int", + width: 90, + hidden: true, + }, + { + prop: "orderId", + title: "鍑哄簱鍗曚富閿�", + type: "string", + width: 90, + hidden: true, + }, + { + prop: "materielCode", + title: "鐗╂枡缂栧彿", + type: "string", + width: 150, + }, + { + prop: "materielName", + title: "鐗╂枡鍚嶇О", + type: "string", + width: 150, + }, + { + field: "targetAddressCode", + title: "绾胯竟浠撳湴鍧�鐮�", + type: "string", + width: 100, + align: "left", + }, + { + field: "width", + title: "瑁佸垏瀹�", + type: "string", + width: 100, + align: "left", + }, + { + prop: "orderQuantity", + title: "鍗曟嵁鏁伴噺", + type: "string", + width: 90, + }, + { + prop: "lockQuantity", + title: "閿佸畾鏁伴噺", + type: "int", + width: 90, + }, + { + prop: "overOutQuantity", + title: "宸插嚭鏁伴噺", + type: "string", + width: 90, + }, + { + prop: "unit", + title: "鍗曚綅", + type: "string", + width: 90, + }, + { + prop: "orderDetailStatus", + title: "璁㈠崟鏄庣粏鐘舵��", + type: "tag", + width: 180, + bindKey: "orderDetailStatusEnum", + }, + { + prop: "assignStock", + title: "鎸囧畾搴撳瓨", + type: "icon", + width: 90, + icon: "el-icon-s-grid", + }, + { + prop: "viewDetail", + title: "鍑哄簱璇︾粏", + type: "icon", + width: 90, + icon: "el-icon-s-operation", + }, + { + prop: "creater", + title: "鍒涘缓浜�", + type: "string", + width: 90, + }, + { + prop: "createDate", + title: "鍒涘缓鏃堕棿", + type: "datetime", + width: 160, + }, + { + prop: "modifier", + title: "淇敼浜�", + type: "string", + width: 100, + }, + { + prop: "modifyDate", + title: "淇敼鏃堕棿", + type: "datetime", + width: 160, + }, + { + prop: "remark", + title: "澶囨敞", + type: "string", + }, + ], + paginations: { + sort: "id", + order: "desc", + Foots: "", + total: 0, + // 2020.08.29澧炲姞鑷畾涔夊垎椤垫潯澶у皬 + sizes: [30, 60, 100, 120], + size: 30, // 榛樿鍒嗛〉澶у皬 + Wheres: [], + page: 1, + rows: 30, + }, + searchFormOptions: [ + [ + { + title: "鍗曟嵁缂栧彿", + field: "allocation_code", + type: "like", + }, + { + title: "鍗曟嵁绫诲瀷", + field: "allocation_type", + type: "select", + dataKey: "OrderType", + data: [], + }, + { + title: "鍗曟嵁鐘舵��", + field: "allocation_state", + type: "select", + dataKey: "OrderState", + data: [], + }, + ], + ], + searchFormFields: { + allocation_code: "", + allocation_type: "", + allocation_state: "", + }, + dictionaryList: null, + }; + }, + methods: { + open(row) { + this.row = row; + this.showDetialBox = true; + this.getDictionaryData(); + this.getData(); + }, + getData() { + var wheres = [{ name: "orderId", value: this.row.id }]; + var param = { + page: this.paginations.page, + rows: this.paginations.rows, + sort: this.paginations.sort, + order: this.paginations.order, + wheres: JSON.stringify(wheres), // 鏌ヨ鏉′欢锛屾牸寮忎负[{ name: "瀛楁", value: "xx" }] + }; + this.http + .post("api/MesPPCutOutboundOrderDetail/GetPageData", param, "鏌ヨ涓�") + .then((x) => { + // console.log(x.rows); + this.tableData = x.rows; + }); + }, + tableButtonClick(row, column) { + if (column.prop == "assignStock") { + this.$refs.child.open(row); + } else { + //鐐瑰嚮鎵撳紑鍑哄簱璇︽儏 + this.$refs.selectedStock.open(row); + } + }, + 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("璇烽�夋嫨鍗曟嵁鏄庣粏"); + } + var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id + + this.http + .post("api/Task/GenerateOutboundTasks", keys, "鏁版嵁澶勭悊涓�") + .then((x) => { + if (!x.status) return this.$message.error(x.message); + this.$message.success("鎿嶄綔鎴愬姛"); + this.showDetialBox = false; + this.$emit("parentCall", ($vue) => { + $vue.getData(); + }); + }); + }, + setCurrent(row) { + this.$refs.singleTable.setCurrentRow(row); + }, + handleCurrentChange(val) { + this.currentRow = val; + }, + getButtonEnable(propName, row) { + if (propName == "assignStock") { + if ( + row.orderDetailStatus !== 0 && + row.orderDetailStatus !== 60 && + row.orderDetailStatus !== 70 && + row.orderDetailStatus !== 80 + ) { + return true; + } else { + return false; + } + } + return false; + }, + parentCall(fun) { + if (typeof fun != "function") { + return console.log("鎵╁睍缁勪欢闇�瑕佷紶鍏ヤ竴涓洖璋冩柟娉曟墠鑳借幏鍙栫埗绾ue瀵硅薄"); + } + fun(this); + }, + handleRowClick(row) { + this.$refs.singleTable.toggleRowSelection(row); + }, + handleSelectionChange(val) { + this.selection = val; + }, + getDictionaryData() { + if (this.dictionaryList) { + return; + } + var param = []; + this.tableColumns.forEach((x) => { + if (x.type == "tag" && x.bindKey != "") { + param.push(x.bindKey); + } + }); + this.http + .post("api/Sys_Dictionary/GetVueDictionary", param, "鏌ヨ涓�") + .then((x) => { + if (x.length > 0) { + this.dictionaryList = x; + } + }); + }, + getDictionary(row, column) { + if (this.dictionaryList) { + 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); + if (dicItem) { + return dicItem.value; + } else { + return row[column.prop]; + } + } else { + return row[column.prop]; + } + } + }, + }, +}; +</script> +<style scoped> +.text-button { + border: 0px; +} +</style> + +<style> +.text-button:hover { + background-color: #f0f9eb !important; +} + +.el-table .warning-row { + background: oldlace; +} + +.box-table .el-table tbody tr:hover > td { + background-color: #d8e0d4 !important; + /* color: #ffffff; */ +} + +.box-table .el-table tbody tr.current-row > td { + background-color: #f0f9eb !important; + /* color: #ffffff; */ +} + +.el-table .success-row { + background: #f0f9eb; +} + +.box-table .el-table { + border: 1px solid #ebeef5; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/mesPPoutOrderDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/mesPPoutOrderDetail.vue" new file mode 100644 index 0000000..c9243bf --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/mesPPoutOrderDetail.vue" @@ -0,0 +1,421 @@ +<template> + <div> + <vol-box + v-model="showDetialBox" + :lazy="true" + width="75%" + :padding="15" + title="鍗曟嵁鏄庣粏淇℃伅" + > + <div class="box-head"> + <el-alert :closable="false" style="width: 100%"> + <el-row> + <el-col :span="16"> + <span>宸查�変腑 {{ selection.length }} 椤�</span> + </el-col> + <el-col :span="8"> + <el-link + type="primary" + size="small" + style="float: right; height: 20px" + @click="lockstocks" + >閿佸畾搴撳瓨</el-link + > + <el-link + type="primary" + size="small" + style="float: right; height: 20px; margin-right: 10px" + @click="outbound" + >鐩存帴鍑哄簱</el-link + > + <el-link + type="primary" + size="small" + style="float: right; height: 20px; margin-right: 10px" + @click="getData" + >鍒锋柊</el-link + ></el-col + > + </el-row> + </el-alert> + </div> + <div class="box-table" style="margin-top: 1%"> + <el-table + ref="singleTable" + :data="tableData" + style="width: 100%; height: 100%" + highlight-current-row + @current-change="handleCurrentChange" + height="500px" + @row-click="handleRowClick" + @selection-change="handleSelectionChange" + > + <el-table-column type="selection" width="55"> </el-table-column> + <el-table-column + label="搴忓彿" + type="index" + fixed="left" + width="55" + align="center" + ></el-table-column> + <el-table-column + v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" + :key="index" + :prop="item.prop" + :label="item.title" + :width="item.width" + align="center" + > + <template #default="scoped"> + <div v-if="item.type == 'icon'"> + <el-tooltip + class="item" + effect="dark" + :content="item.title" + placement="bottom" + ><el-link + type="primary" + :disabled="getButtonEnable(item.prop, scoped.row)" + @click="tableButtonClick(scoped.row, item)" + ><i :class="item.icon" style="font-size: 22px"></i></el-link + ></el-tooltip> + </div> + + <div v-else-if="item.type == 'tag'"> + <el-tag size="small"> + {{ getDictionary(scoped.row, item) }} + </el-tag> + </div> + </template> + </el-table-column> + </el-table> + </div> + </vol-box> + <stock-select ref="child" @parentCall="parentCall"></stock-select> + <selected-stock + ref="selectedStock" + @parentCall="parentCall" + ></selected-stock> + </div> +</template> +<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 }, + data() { + return { + row: null, + showDetialBox: false, + flag: false, + currentRow: null, + selection: [], + tableData: [], + tableColumns: [ + { + prop: "id", + title: "Id", + type: "int", + width: 90, + hidden: true, + }, + { + prop: "orderId", + title: "鍑哄簱鍗曚富閿�", + type: "string", + width: 90, + hidden: true, + }, + { + prop: "warehouse", + title: "搴撳尯", + type: "string", + width: 150, + }, + { + prop: "carrierCode", + title: "杞藉叿鍙�", + type: "string", + width: 150, + }, + // { + // prop: "orderQuantity", + // title: "鍗曟嵁鏁伴噺", + // type: "string", + // width: 90, + // }, + // { + // prop: "lockQuantity", + // title: "閿佸畾鏁伴噺", + // type: "int", + // width: 90, + // }, + // { + // prop: "overOutQuantity", + // title: "宸插嚭鏁伴噺", + // type: "string", + // width: 90, + // }, + { + prop: "orderDetailStatus", + title: "璁㈠崟鏄庣粏鐘舵��", + type: "tag", + width: 180, + bindKey: "orderDetailStatusEnum", + }, + // { + // prop: "assignStock", + // title: "鎸囧畾搴撳瓨", + // type: "icon", + // width: 90, + // icon: "el-icon-s-grid", + // }, + // { + // prop: "viewDetail", + // title: "鍑哄簱璇︾粏", + // type: "icon", + // width: 90, + // icon: "el-icon-s-operation", + // }, + { + prop: "creater", + title: "鍒涘缓浜�", + type: "string", + width: 90, + }, + { + prop: "createDate", + title: "鍒涘缓鏃堕棿", + type: "datetime", + width: 160, + }, + { + prop: "modifier", + title: "淇敼浜�", + type: "string", + width: 100, + }, + { + prop: "modifyDate", + title: "淇敼鏃堕棿", + type: "datetime", + width: 160, + }, + { + prop: "remark", + title: "澶囨敞", + type: "string", + }, + ], + paginations: { + sort: "id", + order: "desc", + Foots: "", + total: 0, + // 2020.08.29澧炲姞鑷畾涔夊垎椤垫潯澶у皬 + sizes: [30, 60, 100, 120], + size: 30, // 榛樿鍒嗛〉澶у皬 + Wheres: [], + page: 1, + rows: 30, + }, + searchFormOptions: [ + [ + { + title: "鍗曟嵁缂栧彿", + field: "allocation_code", + type: "like", + }, + { + title: "鍗曟嵁绫诲瀷", + field: "allocation_type", + type: "select", + dataKey: "OrderType", + data: [], + }, + { + title: "鍗曟嵁鐘舵��", + field: "allocation_state", + type: "select", + dataKey: "OrderState", + data: [], + }, + ], + ], + searchFormFields: { + allocation_code: "", + allocation_type: "", + allocation_state: "", + }, + dictionaryList: null, + }; + }, + methods: { + open(row) { + this.row = row; + this.showDetialBox = true; + this.getDictionaryData(); + this.getData(); + }, + getData() { + var wheres = [{ name: "orderId", value: this.row.id }]; + var param = { + page: this.paginations.page, + rows: this.paginations.rows, + sort: this.paginations.sort, + order: this.paginations.order, + wheres: JSON.stringify(wheres), // 鏌ヨ鏉′欢锛屾牸寮忎负[{ name: "瀛楁", value: "xx" }] + }; + this.http + .post("api/MesPPOutboundOrderDetail/GetPageData", param, "鏌ヨ涓�") + .then((x) => { + // console.log(x.rows); + this.tableData = x.rows; + }); + }, + tableButtonClick(row, column) { + if (column.prop == "assignStock") { + this.$refs.child.open(row); + } else { + //鐐瑰嚮鎵撳紑鍑哄簱璇︽儏 + this.$refs.selectedStock.open(row); + } + }, + 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("璇烽�夋嫨鍗曟嵁鏄庣粏"); + } + var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id + + this.http + .post("api/Task/GenerateOutboundTasks", keys, "鏁版嵁澶勭悊涓�") + .then((x) => { + if (!x.status) return this.$message.error(x.message); + this.$message.success("鎿嶄綔鎴愬姛"); + this.showDetialBox = false; + this.$emit("parentCall", ($vue) => { + $vue.getData(); + }); + }); + }, + setCurrent(row) { + this.$refs.singleTable.setCurrentRow(row); + }, + handleCurrentChange(val) { + this.currentRow = val; + }, + getButtonEnable(propName, row) { + if (propName == "assignStock") { + if ( + row.orderDetailStatus !== 0 && + row.orderDetailStatus !== 60 && + row.orderDetailStatus !== 70 && + row.orderDetailStatus !== 80 + ) { + return true; + } else { + return false; + } + } + return false; + }, + parentCall(fun) { + if (typeof fun != "function") { + return console.log("鎵╁睍缁勪欢闇�瑕佷紶鍏ヤ竴涓洖璋冩柟娉曟墠鑳借幏鍙栫埗绾ue瀵硅薄"); + } + fun(this); + }, + handleRowClick(row) { + this.$refs.singleTable.toggleRowSelection(row); + }, + handleSelectionChange(val) { + this.selection = val; + }, + getDictionaryData() { + if (this.dictionaryList) { + return; + } + var param = []; + this.tableColumns.forEach((x) => { + if (x.type == "tag" && x.bindKey != "") { + param.push(x.bindKey); + } + }); + this.http + .post("api/Sys_Dictionary/GetVueDictionary", param, "鏌ヨ涓�") + .then((x) => { + if (x.length > 0) { + this.dictionaryList = x; + } + }); + }, + getDictionary(row, column) { + if (this.dictionaryList) { + 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); + if (dicItem) { + return dicItem.value; + } else { + return row[column.prop]; + } + } else { + return row[column.prop]; + } + } + }, + }, +}; +</script> +<style scoped> +.text-button { + border: 0px; +} +</style> + +<style> +.text-button:hover { + background-color: #f0f9eb !important; +} + +.el-table .warning-row { + background: oldlace; +} + +.box-table .el-table tbody tr:hover > td { + background-color: #d8e0d4 !important; + /* color: #ffffff; */ +} + +.box-table .el-table tbody tr.current-row > td { + background-color: #f0f9eb !important; + /* color: #ffffff; */ +} + +.el-table .success-row { + background: #f0f9eb; +} + +.box-table .el-table { + border: 1px solid #ebeef5; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPCutOutboundOrder.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPCutOutboundOrder.js" new file mode 100644 index 0000000..fa57908 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPCutOutboundOrder.js" @@ -0,0 +1,74 @@ + +//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜 +import gridBody from './extend/mesPPCutOutOrderDetail.vue' +let extension = { + components: { + //鏌ヨ鐣岄潰鎵╁睍缁勪欢 + gridHeader: '', + gridBody: gridBody, + gridFooter: '', + //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 + modelHeader: '', + modelBody: '', + modelFooter: '' + }, + tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓) + buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽� + methods: { + //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄� + 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); + } + }); + }, + onInited() { + //妗嗘灦鍒濆鍖栭厤缃悗 + //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔 + //this.detailOptions.columns.forEach(column=>{ }); + }, + searchBefore(param) { + //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟 + //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ + return true; + }, + searchAfter(result) { + //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊� + return true; + }, + addBefore(formData) { + //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫�� + return true; + }, + updateBefore(formData) { + //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d + return true; + }, + rowClick({ row, column, event }) { + //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠� + this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�; + }, + modelOpenAfter(row) { + //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁 + //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add'; + //(2)缁欏脊鍑烘璁剧疆榛樿鍊� + //(3)this.editFormFields.瀛楁='xxx'; + //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊� + //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions) + } + } + }; + export default extension; + \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPCutOutboundOrderDetail.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPCutOutboundOrderDetail.js" new file mode 100644 index 0000000..7d1cbad --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPCutOutboundOrderDetail.js" @@ -0,0 +1,73 @@ + +//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜 +let extension = { + components: { + //鏌ヨ鐣岄潰鎵╁睍缁勪欢 + gridHeader: '', + gridBody: gridBody, + gridFooter: '', + //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 + modelHeader: '', + modelBody: '', + modelFooter: '' + }, + tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓) + buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽� + methods: { + //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄� + 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); + } + }); + }, + onInited() { + //妗嗘灦鍒濆鍖栭厤缃悗 + //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔 + //this.detailOptions.columns.forEach(column=>{ }); + }, + searchBefore(param) { + //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟 + //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ + return true; + }, + searchAfter(result) { + //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊� + return true; + }, + addBefore(formData) { + //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫�� + return true; + }, + updateBefore(formData) { + //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d + return true; + }, + rowClick({ row, column, event }) { + //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠� + this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�; + }, + modelOpenAfter(row) { + //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁 + //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add'; + //(2)缁欏脊鍑烘璁剧疆榛樿鍊� + //(3)this.editFormFields.瀛楁='xxx'; + //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊� + //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions) + } + } + }; + export default extension; + \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPOutboundOrder.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPOutboundOrder.js" new file mode 100644 index 0000000..fa95931 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPOutboundOrder.js" @@ -0,0 +1,74 @@ + +//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜 +import gridBody from './extend/mesPPoutOrderDetail.vue' +let extension = { + components: { + //鏌ヨ鐣岄潰鎵╁睍缁勪欢 + gridHeader: '', + gridBody: gridBody, + gridFooter: '', + //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 + modelHeader: '', + modelBody: '', + modelFooter: '' + }, + tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓) + buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽� + methods: { + //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄� + 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); + } + }); + }, + onInited() { + //妗嗘灦鍒濆鍖栭厤缃悗 + //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔 + //this.detailOptions.columns.forEach(column=>{ }); + }, + searchBefore(param) { + //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟 + //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ + return true; + }, + searchAfter(result) { + //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊� + return true; + }, + addBefore(formData) { + //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫�� + return true; + }, + updateBefore(formData) { + //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d + return true; + }, + rowClick({ row, column, event }) { + //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠� + this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�; + }, + modelOpenAfter(row) { + //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁 + //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add'; + //(2)缁欏脊鍑烘璁剧疆榛樿鍊� + //(3)this.editFormFields.瀛楁='xxx'; + //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊� + //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions) + } + } + }; + export default extension; + \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPOutboundOrderDetail.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPOutboundOrderDetail.js" new file mode 100644 index 0000000..6e33fa6 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPOutboundOrderDetail.js" @@ -0,0 +1,57 @@ + +//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜 +let extension = { + components: { + //鏌ヨ鐣岄潰鎵╁睍缁勪欢 + gridHeader: '', + gridBody: gridBody, + gridFooter: '', + //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 + modelHeader: '', + modelBody: '', + modelFooter: '' + }, + tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓) + buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽� + methods: { + //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄� + onInit() { + }, + onInited() { + //妗嗘灦鍒濆鍖栭厤缃悗 + //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔 + //this.detailOptions.columns.forEach(column=>{ }); + }, + searchBefore(param) { + //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟 + //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ + return true; + }, + searchAfter(result) { + //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊� + return true; + }, + addBefore(formData) { + //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫�� + return true; + }, + updateBefore(formData) { + //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d + return true; + }, + rowClick({ row, column, event }) { + //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠� + this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�; + }, + modelOpenAfter(row) { + //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁 + //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add'; + //(2)缁欏脊鍑烘璁剧疆榛樿鍊� + //(3)this.editFormFields.瀛楁='xxx'; + //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊� + //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions) + } + } + }; + export default extension; + \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" index cd308da..03edcba 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" @@ -180,7 +180,23 @@ 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: '/returnOrder', name: 'returnOrder', component: () => import('@/views/inbound/returnOrder.vue') diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrder.vue" new file mode 100644 index 0000000..a647ba0 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrder.vue" @@ -0,0 +1,356 @@ + +<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/mesPPCutOutboundOrder.js"; +import { ref, defineComponent } from "vue"; +export default defineComponent({ + setup() { + const table = ref({ + key: "id", + footer: "Foots", + cnName: "PP浠撳皬鍗稭ES鍑哄簱鍗�", + name: "mesPPCutOutboundOrder", + url: "/mesPPCutOutboundOrder/", + sortName: "id", + }); + const editFormFields = ref({ + orderType: "", + orderNo: "", + upperOrderNo: "", + orderStatus: "", + remark: "", + warehouseId: "", + }); + const editFormOptions = ref([ + [ + { + title: "鍗曟嵁绫诲瀷", + required: true, + field: "orderType", + type: "select", + dataKey: "outOrderType", + data: [], + }, + { + field: "orderNo", + title: "鍗曟嵁缂栧彿", + type: "string", + readonly: true, + }, + { + title: "鍗曟嵁鐘舵��", + field: "orderStatus", + type: "select", + dataKey: "inboundState", + data: [], + readonly: true, + }, + { + title: "浠撳簱", + field: "warehouseId", + type: "select", + dataKey: "warehouses", + data: [], + required: true, + }, + { + title: "澶囨敞", + field: "remark", + type: "textarea", + }, + ], + ]); + const searchFormFields = ref({ + orderNo: "", + upperOrderNo: "", + orderType: "", + orderStatus: "", + createType: "", + creater: "", + createDate: "", + }); + const searchFormOptions = ref([ + [ + { title: "鍗曟嵁缂栧彿", field: "orderNo", type: "like" }, + { + title: "鍗曟嵁绫诲瀷", + field: "orderType", + type: "select", + dataKey: "outOrderType", + data: [], + }, + { + title: "鍗曟嵁鐘舵��", + field: "orderStatus", + type: "select", + dataKey: "outboundStatusEnum", + data: [], + }, + ], + [ + { + title: "鍒涘缓鏂瑰紡", + field: "createType", + type: "select", + dataKey: "createType", + data: [], + }, + { title: "鍒涘缓鑰�", field: "creater", type: "like" }, + { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" }, + ], + ]); + 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: "orderNo", + title: "鍗曟嵁缂栧彿", + type: "string", + width: 160, + align: "left", + // link: true + }, + { + field: "orderType", + title: "鍗曟嵁绫诲瀷", + type: "string", + width: 150, + align: "left", + bind: { key: "outOrderType", data: [] }, + }, + { + field: "orderStatus", + title: "鍗曟嵁鐘舵��", + type: "decimal", + width: 90, + align: "left", + bind: { key: "outboundStatusEnum", data: [] }, + }, + { + field: "createType", + title: "鍒涘缓鏂瑰紡", + type: "string", + width: 120, + align: "left", + bind: { key: "createType", data: [] }, + }, + { + 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", + }, + ]); + const detail = ref({ + cnName: "鍑哄簱鏄庣粏鍗�", + table: "OnboundOrderDetail", + columns: [ + { + field: "id", + title: "Id", + type: "int", + width: 90, + hidden: true, + readonly: true, + require: true, + align: "left", + }, + { + field: "orderId", + title: "鍑哄簱鍗曚富閿�", + type: "string", + width: 90, + align: "left", + hidden: true, + }, + { + field: "materielCode", + 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: "batchNo", + title: "鎵规鍙�", + type: "decimal", + width: 90, + align: "left", + edit: { type: "string" }, + required: true, + }, + { + field: "orderQuantity", + title: "鍗曟嵁鏁伴噺", + type: "string", + width: 90, + align: "left", + edit: { type: "number" }, + required: true, + }, + { + field: "rowNo", + title: "琛屽彿", + type: "string", + width: 90, + align: "left", + edit: { type: "number" }, + required: true, + }, + { + 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", + bind: { key: "orderDetailStatusEnum", data: [] }, + }, + { + field: "unit", + title: "鍗曚綅", + type: "string", + width: 90, + align: "left", + }, + { + field: "LayerCode", + title: "灞傚埆", + type: "string", + width: 180, + align: "left", + }, + { + field: "Sequence", + title: "搴忓垪", + type: "int", + 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", + }, + ], + sortName: "id", + key: "id", + }); + return { + table, + extend, + editFormFields, + editFormOptions, + searchFormFields, + searchFormOptions, + columns, + detail, + }; + }, +}); +</script> + \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrderDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrderDetail.vue" new file mode 100644 index 0000000..a51f590 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrderDetail.vue" @@ -0,0 +1,256 @@ + +<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/mesPPCutOutboundOrderDetail.js"; +import { ref, defineComponent } from "vue"; +export default defineComponent({ + setup() { + const table = ref({ + key: "id", + footer: "Foots", + cnName: "鍑哄簱鍗曟槑缁�", + name: "mesPPCutOutboundOrderDetail", + url: "/mesPPCutOutboundOrderDetail/", + 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: "orderId", + title: "鍑哄簱鍗曚富閿�", + type: "string", + width: 90, + align: "left", + hidden: true, + }, + { + field: "materielCode", + 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: "unit", + title: "鍗曚綅", + type: "string", + width: 90, + align: "left", + }, + { + field: "targetAddressCode", + title: "绾胯竟浠撳湴鍧�鐮�", + type: "string", + width: 100, + align: "left", + }, + { + field: "width", + title: "瑁佸垏瀹�", + type: "string", + width: 100, + align: "left", + }, + { + field: "orderDetailStatus", + title: "璁㈠崟鏄庣粏鐘舵��", + type: "string", + width: 180, + align: "left", + }, + { + field: "LayerCode", + title: "灞傚埆", + type: "string", + width: 180, + align: "left", + }, + { + field: "Sequence", + title: "搴忓垪", + type: "int", + 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> + \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPOutboundOrder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPOutboundOrder.vue" new file mode 100644 index 0000000..2c6d599 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPOutboundOrder.vue" @@ -0,0 +1,259 @@ + +<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/mesPPOutboundOrder.js"; +import { ref, defineComponent } from "vue"; +export default defineComponent({ + setup() { + const table = ref({ + key: "id", + footer: "Foots", + cnName: "PP浠撳ぇ鍗稭ES鍑哄簱鍗�", + name: "mesPPOutboundOrder", + url: "/mesPPOutboundOrder/", + sortName: "id", + }); + const editFormFields = ref({}); + const editFormOptions = ref([[]]); + const searchFormFields = ref({ + orderNo: "", + materialCode: "", + batchNo: "", + }); + const searchFormOptions = ref([ + [ + { title: "鍗曟嵁缂栧彿", field: "orderNo", type: "like" }, + { title: "鐗╂枡缂栧彿", field: "materialCode", type: "like" }, + { title: "鎵规鍙�", field: "batchNo", type: "like" }, + ], + ]); + const columns = ref([ + { + field: "id", + title: "Id", + type: "int", + width: 90, + hidden: true, + readonly: true, + align: "left", + }, + { + field: "warehouseId", + title: "鎵�灞炰粨搴�", + type: "string", + width: 80, + align: "left", + bind: { key: "warehouses", data: [] }, + }, + { + field: "orderNo", + title: "鍗曟嵁缂栧彿", + type: "string", + width: 150, + align: "left", + }, + { + field: "taskNo", + title: "浠诲姟鍗曞彿", + type: "string", + width: 150, + align: "left", + }, + // { + // field: "batchNo", + // title: "鎵规鍙�", + // type: "decimal", + // width: 90, + // align: "left", + // }, + { + field: "OrderStatus", + title: "璁㈠崟鐘舵��", + type: "string", + width: 180, + align: "left", + bind: { key: "orderDetailStatusEnum", data: [] }, + }, + { + field: "materialCode", + title: "鐗╂枡缂栧彿", + type: "string", + width: 200, + align: "left", + }, + { + field: "materialName", + title: "鐗╂枡鍚嶇О", + type: "string", + width: 180, + align: "left", + }, + { + field: "createType", + title: "鍒涘缓鏂瑰紡", + type: "string", + width: 120, + align: "left", + bind: { key: "createType", data: [] }, + }, + { + field: "unit", + title: "鍗曚綅", + type: "string", + width: 90, + align: "left", + }, + { + field: "orderQuantity", + title: "鍗曟嵁鏁伴噺", + type: "datetime", + width: 160, + align: "left", + }, + { + field: "lockQuantity", + title: "閿佸畾鏁伴噺", + type: "string", + width: 100, + align: "left", + }, + { + field: "overOutQuantity", + title: "宸插嚭鏁伴噺", + type: "datetime", + width: 160, + align: "left", + }, + { + field: "line", + title: "绾夸綋", + type: "string", + width: 100, + align: "left", + }, + { + field: "targetAddressCode", + title: "绾胯竟浠撳湴鍧�鐮�", + type: "string", + width: 100, + align: "left", + }, + { + field: "width", + title: "瑁佸垏瀹�", + type: "string", + width: 100, + align: "left", + }, + ]); + const detail = ref({ + cnName: "鍑哄簱鏄庣粏鍗�", + table: "OnboundOrderDetail", + columns: [ + { + field: "id", + title: "Id", + type: "int", + width: 90, + hidden: true, + readonly: true, + require: true, + align: "left", + }, + { + field: "orderId", + title: "鍑哄簱鍗曚富閿�", + type: "string", + width: 90, + align: "left", + hidden: true, + }, + { + field: "Warehouse", + title: "搴撳尯", + type: "string", + width: 150, + align: "left", + }, + { + field: "CarrierCode", + title: "杞藉叿鍙�", + type: "string", + width: 150, + align: "left", + }, + { + field: "orderDetailStatus", + title: "璁㈠崟鏄庣粏鐘舵��", + type: "string", + width: 180, + align: "left", + bind: { key: "orderDetailStatusEnum", data: [] }, + }, + { + 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", + }, + ], + sortName: "id", + key: "id", + }); + + return { + table, + extend, + editFormFields, + editFormOptions, + searchFormFields, + searchFormOptions, + columns, + detail, + }; + }, +}); +</script> + \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPOutboundOrderDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPOutboundOrderDetail.vue" new file mode 100644 index 0000000..4e77384 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPOutboundOrderDetail.vue" @@ -0,0 +1,149 @@ + +<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/mesPPOutboundOrderDetail.js"; + import { ref, defineComponent } from "vue"; + export default defineComponent({ + setup() { + const table = ref({ + key: "id", + footer: "Foots", + cnName: "PP浠撳ぇ鍗稭ES鍑哄簱鍗曟槑缁�", + name: "mesPPOutboundOrderDetail", + url: "/mesPPOutboundOrderDetail/", + sortName: "id", + }); + const editFormFields = ref({ + }); + const editFormOptions = ref([ + [ + ], + ]); + const searchFormFields = ref({ + orderNo: "", + materialCode: "", + batchNo: "", + }); + const searchFormOptions = ref([ + [ + { title: "鍗曟嵁缂栧彿", field: "orderNo", type:"like" }, + { title: "鐗╂枡缂栧彿", field: "materialCode" ,type:"like"}, + { title: "鎵规鍙�", field: "batchNo" ,type:"like"}, + ], + ]); + const columns = ref([ + { + field: "id", + title: "Id", + type: "int", + width: 90, + hidden: true, + readonly: true, + align: "left", + }, + { + field: "OrderId", + title: "鍑哄簱鍗曚富閿�", + type: "string", + width: 80, + align: "left", + bind: { key: "warehouses", data: [] }, + }, + { + field: "Warehouse", + title: "搴撳尯", + type: "string", + width: 150, + align: "left", + }, + { + field: "CarrierCode", + title: "杞藉叿鍙�", + type: "string", + width: 150, + align: "left", + }, + { + field: "createType", + title: "鍒涘缓鏂瑰紡", + type: "string", + width: 120, + align: "left", + bind: { key: "createType", data: [] }, + }, + { + 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> + \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/00e22ada-36c2-42fa-ba01-39bb171b9b5f.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/00e22ada-36c2-42fa-ba01-39bb171b9b5f.vsidx" new file mode 100644 index 0000000..4e3dabe --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/00e22ada-36c2-42fa-ba01-39bb171b9b5f.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/01b812bf-9885-4a77-95d8-f05c785d7354.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/01b812bf-9885-4a77-95d8-f05c785d7354.vsidx" new file mode 100644 index 0000000..2308d69 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/01b812bf-9885-4a77-95d8-f05c785d7354.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3c53f8c2-2194-4cf0-8343-aca04ba405cc.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3c53f8c2-2194-4cf0-8343-aca04ba405cc.vsidx" new file mode 100644 index 0000000..d590628 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3c53f8c2-2194-4cf0-8343-aca04ba405cc.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/47dfe2fa-2b55-44f1-9467-56f17ea6232a.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/47dfe2fa-2b55-44f1-9467-56f17ea6232a.vsidx" new file mode 100644 index 0000000..35ecc60 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/47dfe2fa-2b55-44f1-9467-56f17ea6232a.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7badb44d-00b3-43fa-954b-a0f65ce3bdd5.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7badb44d-00b3-43fa-954b-a0f65ce3bdd5.vsidx" new file mode 100644 index 0000000..11fd5d3 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7badb44d-00b3-43fa-954b-a0f65ce3bdd5.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs" index 79ecbbf..14a133d 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs" @@ -84,5 +84,15 @@ { return QueryData(x => x.LocationCode, x => x.WarehouseId == warehouseId && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())).Distinct().ToList(); } + + /// <summary> + /// 鑾峰彇MES鎸囧畾鍙嚭搴撹揣浣嶇紪鍙� + /// </summary> + /// <param name="warehouseId"></param> + /// <returns></returns> + public List<string> GetCanOutLocationCodes(string locationcode) + { + return QueryData(x => x.LocationCode, x => x.LocationCode == locationcode && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())).Distinct().ToList(); + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesResponseContent.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesResponseContent.cs" index 0a3d51b..ceeccfa 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesResponseContent.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesResponseContent.cs" @@ -28,32 +28,58 @@ /// <summary> /// /// </summary> - public string DataTime { get; set; } + public DateTime DataTime { get; set; } + /// <summary> + /// 鐗╂枡缂栫爜 + /// </summary> + public string MaterialCode { get; set; } + /// <summary> + /// 鏁伴噺 + /// </summary> + public float Quantity { get; set; } + /// <summary> + /// 鍗曚綅 + /// </summary> + public string Unit { get; set; } + /// <summary> + /// 搴撳尯 + /// </summary> + public string Warehouse { get; set; } + /// <summary> + /// 搴撳尯鍚嶇О + /// </summary> + public string WarehouseName { get; set; } + /// <summary> + /// 瑁佸垏鍚庡搴� + /// </summary> + public float CutedWidth { get; set; } + /// <summary> + /// 杞藉叿鍙� + /// </summary> + public string CarrierCode { get; set; } + /// <summary> + /// 鐗╂枡鎵规 + /// </summary> + public string MaterialLot { get; set; } public static MesResponseContent Instance { get { return new MesResponseContent(); } } - /// <summary> - /// 杩斿洖 - /// </summary> + public MesResponseContent OK(string message = null) { BSucc = true; StrCode = "0000"; StrMsg = message == null ? "鎵ц鎴愬姛" : message; - DataTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); return this; } - /// <summary> - /// 杩斿洖 - /// </summary> + public MesResponseContent Error(string message = null) { BSucc = false; StrCode = "404"; StrMsg = message == null ? "鎵ц澶辫触" : message; - DataTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); return this; } public ContentMes Content { get; set; } @@ -62,4 +88,11 @@ { public string Contacts { get; set; } } + /// <summary> + /// PP搴撳瓨鏌ヨ锛屽洖澶峂ES + /// </summary> + public class QueryPpByWidthModelCount + { + + } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/PPSubsectionModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/PPSubsectionModel.cs" new file mode 100644 index 0000000..e4fe6e9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/PPSubsectionModel.cs" @@ -0,0 +1,194 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.Attributes; + +namespace WIDESEA_DTO.MES +{ + /// <summary> + /// PP澶у嵎鍑哄簱 + /// </summary> + public class PPSubsectionOutModel + { + /// <summary> + /// 浠诲姟鍗曞彿 + /// </summary> + public string TaskNo { get; set; } + /// <summary> + /// 鐗╂枡缂栫爜 + /// </summary> + public string MaterialCode { get; set; } + /// <summary> + /// 鐗╂枡鍚嶇О + /// </summary> + public string MaterialName { get; set; } + /// <summary> + /// 闇�姹傛暟閲� + /// </summary> + public float RequiredQuantity { get; set; } + /// <summary> + /// 鍗曚綅 + /// </summary> + public string Unit { get; set; } + /// <summary> + /// 绾胯竟浠撳湴鍧�鐮� + /// </summary> + public string TargetAddressCode { get; set; } + /// <summary> + /// 瑁佸垏瀹� + /// </summary> + public float Width { get; set; } + /// <summary> + /// 杞藉叿鍒楄〃 + /// </summary> + public List<CarrierInfo> Carriers { get; set; } + } + /// <summary> + /// 杞藉叿鍒楄〃鏄庣粏 + /// </summary> + [ModelValidate] + public class CarrierInfo + { + /// <summary> + /// 搴撳尯 + /// </summary> + public string Warehouse { get; set; } + /// <summary> + /// 杞藉叿鍙� + /// </summary> + public string CarrierCode { get; set; } + } + /// <summary> + /// pp灏忓嵎鍑哄簱 + /// </summary> + public class PPCutOutModle + { + /// <summary> + /// 浠诲姟鍗曞彿 + /// </summary> + public string TaskNo { get; set; } + /// <summary> + /// 鐗╂枡璇︽儏 + /// </summary> + public List<MaterialDetail> MaterialDetails { get; set; } + } + /// <summary> + /// 鐗╂枡璇︽儏鏄庣粏 + /// </summary> + [ModelValidate] + public class MaterialDetail + { + /// <summary> + /// 鐗╂枡缂栫爜 + /// </summary> + public string MaterialCode { get; set; } + /// <summary> + /// 鐗╂枡鍚嶇О + /// </summary> + public string MaterialName { get; set; } + /// <summary> + /// 闇�姹傛暟閲� + /// </summary> + public float RequiredQuantity { get; set; } + /// <summary> + /// 鍗曚綅 + /// </summary> + public string Unit { get; set; } + /// <summary> + /// 灞傚埆 + /// </summary> + public string LayerCode { get; set; } + /// <summary> + /// 搴忓垪 + /// </summary> + public int Sequence { get; set; } + /// <summary> + /// 绾胯竟浠撳湴鍧� + /// </summary> + public string TargetAddressCode { get; set; } + /// <summary> + /// 瑁佸垏瀹� + /// </summary> + public float Width { get; set; } + } + /// <summary> + /// PP鍏ュ簱 + /// </summary> + public class PPBackModel + { + /// <summary> + /// 婧愬湴鍧�鐮� + /// </summary> + public string SourceAddressCode { get; set; } + /// <summary> + ///杞藉叿鍙� + /// </summary> + public string CarrierCode { get; set; } + /// <summary> + /// 鎵规淇℃伅 + /// </summary> + public List<MaterialLotInfo> MaterialLotInfo { get; set; } + + } + /// <summary> + /// 鎵规淇℃伅鏄庣粏 + /// </summary> + [ModelValidate] + public class MaterialLotInfo + { + /// <summary> + /// 鐗╂枡鎵规 + /// </summary> + public string MaterialLot { get; set; } + /// <summary> + /// 鐗╂枡缂栫爜 + /// </summary> + public string MaterialCode { get; set; } + /// <summary> + /// 閫�搴撴暟閲� + /// </summary> + public float Quantity { get; set; } + /// <summary> + /// 瑁佸垏鍚庡搴� + /// </summary> + public float CutedWidth { get; set; } + /// <summary> + /// 鍘熺墿鏂欐壒娆″彿 + /// </summary> + public string MaterialLotOld { get; set; } + /// <summary> + /// 鍗曚綅 + /// </summary> + public string Unit { get; set; } + /// <summary> + /// 鐢熶骇鏃ユ湡 + /// </summary> + public string ProductionDate { get; set; } + /// <summary> + /// 鏈夋晥鏈� + /// </summary> + public string ExpirationDate { get; set; } + } + /// <summary> + /// PP搴撳瓨鏌ヨ + /// </summary> + public class QueryPpByWidthModel + { + /// <summary> + /// 鐗╂枡缂栫爜 + /// </summary> + public string MaterialCode { get; set; } + /// <summary> + /// 瑁佸垏鍚庡搴� + /// </summary> + public float CutedWidth { get; set; } + /// <summary> + /// 搴撳尯绫诲瀷 + /// </summary> + public int WarehouseType { get; set; } + } + + +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs" index 1b9937c..0a0ca37 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs" @@ -52,5 +52,12 @@ /// <param name="warehouseId"></param> /// <returns></returns> List<string> GetCanOutLocationCodes(int warehouseId); + + /// <summary> + /// 鑾峰彇MES鎸囧畾鍙嚭搴撹揣浣嶇紪鍙� + /// </summary> + /// <param name="warehouseId"></param> + /// <returns></returns> + List<string> GetCanOutLocationCodes(string locationcode); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IMesPPBackInboundOrderDetailRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IMesPPBackInboundOrderDetailRepository.cs" new file mode 100644 index 0000000..edfbc3f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IMesPPBackInboundOrderDetailRepository.cs" @@ -0,0 +1,14 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseRepository; +using WIDESEA_Model.Models.Inbound; + +namespace WIDESEA_IInboundRepository +{ + public interface IMesPPBackInboundOrderDetailRepository : IRepository<Dt_MesPPBackInboundOrderDetail> + { + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IMesPPBackInboundOrderRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IMesPPBackInboundOrderRepository.cs" new file mode 100644 index 0000000..458876d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IMesPPBackInboundOrderRepository.cs" @@ -0,0 +1,15 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseRepository; +using WIDESEA_Model.Models.Inbound; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_IInboundRepository +{ + public interface IMesPPBackInboundOrderRepository : IRepository<Dt_MesPPBackInboundOrder> + { + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IMesPPBackInboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IMesPPBackInboundOrderDetailService.cs" new file mode 100644 index 0000000..ff6f549 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IMesPPBackInboundOrderDetailService.cs" @@ -0,0 +1,14 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseServices; +using WIDESEA_Model.Models.Inbound; + +namespace WIDESEA_IInboundService +{ + public interface IMesPPBackInboundOrderDetailService : IService<Dt_MesPPBackInboundOrderDetail> + { + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IMesPPBackInboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IMesPPBackInboundOrderService.cs" new file mode 100644 index 0000000..d923391 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IMesPPBackInboundOrderService.cs" @@ -0,0 +1,15 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseServices; +using WIDESEA_Model.Models; +using WIDESEA_Model.Models.Inbound; + +namespace WIDESEA_IInboundService +{ + public interface IMesPPBackInboundOrderService : IService<Dt_MesPPBackInboundOrder> + { + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPCutOutboundOrderDetailRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPCutOutboundOrderDetailRepository.cs" new file mode 100644 index 0000000..a8e4be4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPCutOutboundOrderDetailRepository.cs" @@ -0,0 +1,15 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseRepository; +using WIDESEA_Model.Models; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_IOutboundRepository +{ + public interface IMesPPCutOutboundOrderDetailRepository : IRepository<Dt_MesPPCutOutboundOrderDetail> + { + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPCutOutboundOrderRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPCutOutboundOrderRepository.cs" new file mode 100644 index 0000000..24bb52f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPCutOutboundOrderRepository.cs" @@ -0,0 +1,15 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseRepository; +using WIDESEA_Model.Models; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_IOutboundRepository +{ + public interface IMesPPCutOutboundOrderRepository : IRepository<Dt_MesPPCutOutboundOrder> + { + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPOutboundOrderDetailRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPOutboundOrderDetailRepository.cs" new file mode 100644 index 0000000..c00268c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPOutboundOrderDetailRepository.cs" @@ -0,0 +1,15 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseRepository; +using WIDESEA_Model.Models; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_IOutboundRepository +{ + public interface IMesPPOutboundOrderDetailRepository : IRepository<Dt_MesPPOutboundOrderDetail> + { + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPOutboundOrderRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPOutboundOrderRepository.cs" new file mode 100644 index 0000000..fb0d95d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesPPOutboundOrderRepository.cs" @@ -0,0 +1,14 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseRepository; +using WIDESEA_Model.Models; + +namespace WIDESEA_IOutboundRepository +{ + public interface IMesPPOutboundOrderRepository : IRepository<Dt_MesPPOutboundOrder> + { + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPCutOutboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPCutOutboundOrderDetailService.cs" new file mode 100644 index 0000000..9eec4bb --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPCutOutboundOrderDetailService.cs" @@ -0,0 +1,14 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseServices; +using WIDESEA_Model.Models; + +namespace WIDESEA_IOutboundService +{ + public interface IMesPPCutOutboundOrderDetailService : IService<Dt_MesPPCutOutboundOrderDetail> + { + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPCutOutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPCutOutboundOrderService.cs" new file mode 100644 index 0000000..66dc9f0 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPCutOutboundOrderService.cs" @@ -0,0 +1,16 @@ +锘縰sing 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.Outbound; + +namespace WIDESEA_IOutboundService +{ + public interface IMesPPCutOutboundOrderService : IService<Dt_MesPPCutOutboundOrder> + { + IMesPPCutOutboundOrderRepository Repository { get; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPOutboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPOutboundOrderDetailService.cs" new file mode 100644 index 0000000..6599eeb --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPOutboundOrderDetailService.cs" @@ -0,0 +1,17 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting.Server; +using WIDESEA_Core.BaseServices; +using WIDESEA_Model.Models; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_IOutboundService +{ + public interface IMesPPOutboundOrderDetailService : IService<Dt_MesPPOutboundOrderDetail> + { + + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPOutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPOutboundOrderService.cs" new file mode 100644 index 0000000..6ebb00b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPOutboundOrderService.cs" @@ -0,0 +1,21 @@ +锘縰sing 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; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_IOutboundService +{ + public interface IMesPPOutboundOrderService : IService<Dt_MesPPOutboundOrder> + { + IMesPPOutboundOrderRepository Repository { get; } + + (List<Dt_StockInfo>, Dt_MesPPOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_MesPPOutboundOrder mesOutboundOrder); + + (List<Dt_StockInfo>, Dt_MesPPCutOutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_MesPPCutOutboundOrder mesPPOutboundOrder, Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail); + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" index 55dbbd2..8132afb 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" @@ -9,6 +9,7 @@ using WIDESEA_Core.Enums; using WIDESEA_IOutboundRepository; using WIDESEA_Model.Models; +using WIDESEA_Model.Models.Outbound; namespace WIDESEA_IOutboundService { @@ -41,7 +42,7 @@ Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null); /// <summary> - /// + /// PP澶у嵎鍑哄簱 /// </summary> /// <param name="mesOutboundOrder"></param> /// <param name="outStock"></param> @@ -51,6 +52,26 @@ Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesOutboundOrder mesOutboundOrder, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null); /// <summary> + /// PP灏忓嵎鍑哄簱 + /// </summary> + /// <param name="mesOutboundOrder"></param> + /// <param name="outStock"></param> + /// <param name="assignQuantity"></param> + /// <param name="taskNum"></param> + /// <returns></returns> + Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder,Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null); + + /// <summary> + /// + /// </summary> + /// <param name="mesOutboundOrder"></param> + /// <param name="outStock"></param> + /// <param name="assignQuantity"></param> + /// <param name="taskNum"></param> + /// <returns></returns> + Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesPPOutboundOrder mesPPOutboundOrder, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null); + + /// <summary> /// /// </summary> /// <param name="orderDetailId"></param> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs" index b1d4b85..a584a50 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs" @@ -7,7 +7,7 @@ namespace WIDESEA_IOutboundService { - public interface IOutboundService:IDependency + public interface IOutboundService : IDependency { IMesOutboundOrderService MesOutboundOrderService { get; } @@ -16,5 +16,13 @@ IOutboundOrderService OutboundOrderService { get; } IOutStockLockInfoService OutboundStockLockInfoService { get; } + + IMesPPOutboundOrderService MesPPOutboundOrderService { get; } + + IMesPPOutboundOrderDetailService MesPPOutboundOrderDetailService { get; } + + IMesPPCutOutboundOrderService MesPPCutOutboundOrderService { get; } + + IMesPPCutOutboundOrderDetailService MesPPCutOutboundOrderDetailService { get; } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs" index 6447126..146ddb5 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs" @@ -21,6 +21,8 @@ List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, string materielCode, float needQuantity, out float residueQuantity); List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, int warehoseId); + + List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, string palletcode,int warehoseId); WebResponseContent StockQueryData(SaveModel saveModel); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" index fbdafca..eaa245d 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" @@ -225,6 +225,33 @@ MesResponseContent SubstrateBack(SubstrateBackModel model); /// <summary> + /// PP澶у嵎鍑哄簱-杩涜鍒嗗嵎 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + MesResponseContent PPSubsectionOut(PPSubsectionOutModel model); + + /// <summary> + /// PP灏忓嵎鍑哄簱 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + MesResponseContent PPCutOut(PPCutOutModle model); + + /// <summary> + /// PP鍏ュ簱(澶у嵎銆佸皬鍗枫�佸紶鏂�) + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + MesResponseContent PPBack(PPBackModel model); + /// <summary> + /// PP搴撳瓨鏌ヨ + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + MesResponseContent QueryPpByWidth(QueryPpByWidthModel model); + + /// <summary> /// /// </summary> /// <param name="roadwayNos"></param> @@ -271,6 +298,13 @@ /// <returns></returns> WebResponseContent UpdateTaskInfo(WCSTaskDTO task); + /// <summary> + /// PP浠揳gv鎼繍浠诲姟 + /// </summary> + /// <param name="task"></param> + /// <returns></returns> + WebResponseContent AGVTasks(SaveModel saveModel); + WebResponseContent GeneratePKOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews); } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/MesPPBackInboundOrderDetailRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/MesPPBackInboundOrderDetailRepository.cs" new file mode 100644 index 0000000..8cdce3f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/MesPPBackInboundOrderDetailRepository.cs" @@ -0,0 +1,18 @@ +锘縰sing 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.Inbound; + +namespace WIDESEA_InboundRepository +{ + public class MesPPBackInboundOrderDetailRepository : RepositoryBase<Dt_MesPPBackInboundOrderDetail>, IMesPPBackInboundOrderDetailRepository + { + public MesPPBackInboundOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) + { + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/MesPPBackInboundOrderRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/MesPPBackInboundOrderRepository.cs" new file mode 100644 index 0000000..c8a9e89 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/MesPPBackInboundOrderRepository.cs" @@ -0,0 +1,19 @@ +锘縰sing 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.Inbound; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_InboundRepository +{ + public class MesPPBackInboundOrderRepository : RepositoryBase<Dt_MesPPBackInboundOrder>, IMesPPBackInboundOrderRepository + { + public MesPPBackInboundOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) + { + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesPPBackInboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesPPBackInboundOrderDetailService.cs" new file mode 100644 index 0000000..2ab4d22 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesPPBackInboundOrderDetailService.cs" @@ -0,0 +1,37 @@ +锘縰sing 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_IInboundRepository; +using WIDESEA_IInboundService; +using WIDESEA_IOutboundService; +using WIDESEA_IRecordService; +using WIDESEA_IStockService; +using WIDESEA_Model.Models.Inbound; + +namespace WIDESEA_InboundService +{ + public class MesPPBackInboundOrderDetailService : ServiceBase<Dt_MesPPBackInboundOrderDetail, IMesPPBackInboundOrderDetailRepository>, IMesPPBackInboundOrderDetailService + { + private readonly IBasicRepository _basicRepository; + private readonly IStockService _stockService; + private readonly IOutStockLockInfoService _outStockLockInfoService; + private readonly IBasicService _basicService; + private readonly IRecordService _recordService; + + public IMesPPBackInboundOrderDetailRepository Repository => BaseDal; + + public MesPPBackInboundOrderDetailService(IMesPPBackInboundOrderDetailRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, IRecordService recordService) : base(BaseDal) + { + _basicRepository = basicRepository; + _stockService = stockService; + _outStockLockInfoService = outStockLockInfoService; + _basicService = basicService; + _recordService = recordService; + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesPPBackInboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesPPBackInboundOrderService.cs" new file mode 100644 index 0000000..0f2e999 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesPPBackInboundOrderService.cs" @@ -0,0 +1,39 @@ +锘縰sing 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_IInboundRepository; +using WIDESEA_IInboundService; +using WIDESEA_IOutboundRepository; +using WIDESEA_IOutboundService; +using WIDESEA_IRecordService; +using WIDESEA_IStockService; +using WIDESEA_Model.Models.Inbound; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_InboundService +{ + public class MesPPBackInboundOrderService : ServiceBase<Dt_MesPPBackInboundOrder, IMesPPBackInboundOrderRepository>, IMesPPBackInboundOrderService + { + private readonly IBasicRepository _basicRepository; + private readonly IStockService _stockService; + private readonly IOutStockLockInfoService _outStockLockInfoService; + private readonly IBasicService _basicService; + private readonly IRecordService _recordService; + + public IMesPPBackInboundOrderRepository Repository => BaseDal; + + public MesPPBackInboundOrderService(IMesPPBackInboundOrderRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, IRecordService recordService) : base(BaseDal) + { + _basicRepository = basicRepository; + _stockService = stockService; + _outStockLockInfoService = outStockLockInfoService; + _basicService = basicService; + _recordService = recordService; + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesPPBackInboundOrder.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesPPBackInboundOrder.cs" new file mode 100644 index 0000000..e27854e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesPPBackInboundOrder.cs" @@ -0,0 +1,79 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using SqlSugar; +using WIDESEA_Core.Attributes; +using WIDESEA_Core.CodeConfigEnum; +using WIDESEA_Core.DB.Models; + +namespace WIDESEA_Model.Models.Inbound +{ + /// <summary> + /// PP鍏ュ簱鍗� + /// </summary> + [SugarTable(nameof(Dt_MesPPBackInboundOrder), "PP鍏ュ簱鍗�")] + public class Dt_MesPPBackInboundOrder : 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> + [CodeRule(RuleCodeEnum.InboundOrderRule)] + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿")] + public string InboundOrderNo { get; set; } + /// <summary> + /// 鍘熷湴鍧�鐮� + /// </summary> + //[CodeRule(RuleCodeEnum.InboundOrderRule)] + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍘熷湴鍧�鐮�")] + public string SourceAddressCode { get; set; } + /// <summary> + /// 杞藉叿鍙� + /// </summary> + //[CodeRule(RuleCodeEnum.InboundOrderRule)] + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "杞藉叿鍙�")] + public string CarrierCode { get; set; } + /// <summary> + /// 鍗曟嵁绫诲瀷 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁绫诲瀷")] + public int OrderType { get; set; } + + /// <summary> + /// 鍗曟嵁鐘舵�� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鐘舵��")] + public int OrderStatus { get; set; } + + /// <summary> + /// 鍒涘缓鏂瑰紡 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏂瑰紡")] + public int CreateType { get; set; } + + /// <summary> + /// 澶囨敞 + /// </summary> + [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "澶囨敞")] + public string Remark { get; set; } + + /// <summary> + /// 鍏ュ簱鍗曟槑缁� + /// </summary> + [Navigate(NavigateType.OneToMany, nameof(Dt_MesPPBackInboundOrderDetail.OrderId), nameof(Id))] + public List<Dt_MesPPBackInboundOrderDetail> Details { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesPPBackInboundOrderDetail.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesPPBackInboundOrderDetail.cs" new file mode 100644 index 0000000..c6dbde2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesPPBackInboundOrderDetail.cs" @@ -0,0 +1,116 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using SqlSugar; +using WIDESEA_Core.DB.Models; + +namespace WIDESEA_Model.Models.Inbound +{ + /// <summary> + /// PP鍏ュ簱鍗曟槑缁� + /// </summary> + [SugarTable(nameof(Dt_MesPPBackInboundOrderDetail), "PP鍏ュ簱鍗曟槑缁�")] + public class Dt_MesPPBackInboundOrderDetail : BaseEntity + { + /// <summary> + /// 涓婚敭 + /// </summary> + [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")] + public int Id { get; set; } + + /// <summary> + /// 鍏ュ簱鍗曚富閿� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍏ュ簱鍗曚富閿�")] + public int OrderId { get; set; } + + /// <summary> + /// 鐗╂枡缂栧彿 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")] + public string MaterielCode { get; set; } + + /// <summary> + /// 鐗╂枡鍚嶇О + /// </summary> + [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")] + public string MaterielName { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵规鍙�")] + public string MaterialLot { get; set; } + + /// <summary> + /// 鐗╂枡瑙勬牸 + /// </summary> + [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "鐗╂枡瑙勬牸")] + public string MaterielSpec { get; set; } + + /// <summary> + /// 鍗曟嵁鏁伴噺 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鏁伴噺")] + public float OrderQuantity { get; set; } + + /// <summary> + /// 缁勭洏鏁伴噺 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "缁勭洏鏁伴噺", DefaultValue = "0")] + public float ReceiptQuantity { get; set; } + + /// <summary> + /// 涓婃灦鏁伴噺 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "涓婃灦鏁伴噺", DefaultValue = "0")] + public float OverInQuantity { get; set; } + + /// <summary> + /// 璁㈠崟鏄庣粏鐘舵�� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "璁㈠崟鏄庣粏鐘舵��")] + public int OrderDetailStatus { get; set; } + + /// <summary> + /// 鍗曚綅 + /// </summary> + [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "鍗曚綅")] + public string Unit { get; set; } + + /// <summary> + /// 鏀惰揣鍗曟槑缁嗚鍙� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鏀惰揣鍗曟槑缁嗚鍙�")] + public int RowNo { get; set; } + + /// <summary> + /// 澶囨敞 + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")] + public string Remark { get; set; } + /// <summary> + /// 瑁佸垏瀹� + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "瑁佸垏瀹�")] + public float CutedWidth { get; set; } + /// <summary> + /// 鍘熺墿鏂欐壒娆″彿 + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "鍘熺墿鏂欐壒娆″彿")] + public string MaterialLotOld { get; set; } + /// <summary> + /// 鐢熶骇鏃ユ湡 + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "鐢熶骇鏃ユ湡")] + public string ProductionDate { get; set; } + /// <summary> + /// 鏈夋晥鏃ユ湡 + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "鏈夋晥鏃ユ湡")] + public string EffectiveDate { get; set; } + + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPCutOutboundOrder.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPCutOutboundOrder.cs" new file mode 100644 index 0000000..eef6c74 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPCutOutboundOrder.cs" @@ -0,0 +1,68 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using SqlSugar; +using WIDESEA_Core.Attributes; +using WIDESEA_Core.CodeConfigEnum; +using WIDESEA_Core.DB.Models; + +namespace WIDESEA_Model.Models.Outbound +{ + /// <summary> + /// PP浠撳皬鍗稭ES鍑哄簱鍗� + /// </summary> + [SugarTable(nameof(Dt_MesPPCutOutboundOrder))] + public class Dt_MesPPCutOutboundOrder : 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> + [CodeRule(RuleCodeEnum.OutboundOrderRule)] + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿", IsOnlyIgnoreUpdate = true)] + public string OrderNo { get; set; } + + /// <summary> + /// 浠诲姟鍗曞彿 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "浠诲姟鍗曞彿")] + public string TaskNo { get; set; } + + /// <summary> + /// 鍗曟嵁绫诲瀷 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁绫诲瀷", IsOnlyIgnoreUpdate = true)] + public int OrderType { get; set; } + + /// <summary> + /// 鍗曟嵁鐘舵�� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鐘舵��")] + public int OrderStatus { get; set; } + + /// <summary> + /// 鍒涘缓鏂瑰紡 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏂瑰紡", IsOnlyIgnoreUpdate = true)] + public int CreateType { get; set; } + + /// <summary> + /// 鍑哄簱鍗曟槑缁� + /// </summary> + [Navigate(NavigateType.OneToMany, nameof(Dt_MesPPCutOutboundOrderDetail.OrderId), nameof(Id))] + public List<Dt_MesPPCutOutboundOrderDetail> Details { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPCutOutboundOrderDetail.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPCutOutboundOrderDetail.cs" new file mode 100644 index 0000000..cbdfe2a --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPCutOutboundOrderDetail.cs" @@ -0,0 +1,106 @@ +锘縰sing SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.DB.Models; + +namespace WIDESEA_Model.Models +{ + /// <summary> + /// PP浠撳皬鍗稭ES鍑哄簱鍗曟槑缁� + /// </summary> + [SugarTable(nameof(Dt_MesPPCutOutboundOrderDetail), "PP浠撳皬鍗稭ES鍑哄簱鍗曟槑缁�")] + public class Dt_MesPPCutOutboundOrderDetail : BaseEntity + { + /// <summary> + /// 涓婚敭 + /// </summary> + [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")] + public int Id { get; set; } + + /// <summary> + /// 鍑哄簱鍗曚富閿� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱鍗曚富閿�")] + public int OrderId { get; set; } + + /// <summary> + /// 鐗╂枡缂栧彿 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")] + public string MaterielCode { get; set; } + + /// <summary> + /// 鐗╂枡鍚嶇О + /// </summary> + [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")] + public string MaterielName { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鎵规鍙�")] + public string BatchNo { get; set; } + + /// <summary> + /// 鍗曟嵁鏁伴噺 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鏁伴噺")] + public float OrderQuantity { get; set; } + + /// <summary> + /// 閿佸畾鏁伴噺 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "閿佸畾鏁伴噺", DefaultValue = "0")] + public float LockQuantity { get; set; } + + /// <summary> + /// 宸插嚭鏁伴噺 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "宸插嚭鏁伴噺", DefaultValue = "0")] + public float OverOutQuantity { get; set; } + + /// <summary> + /// 璁㈠崟鏄庣粏鐘舵�� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "璁㈠崟鏄庣粏鐘舵��")] + public int OrderDetailStatus { get; set; } + /// <summary> + /// 鍗曚綅 + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "鍗曚綅")] + public string Unit { get; set; } + + /// <summary> + /// 灞傚埆 + /// </summary> + [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "灞傚埆")] + public string LayerCode { get; set; } + + /// <summary> + /// 搴忓垪 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "搴忓垪")] + public int Sequence { get; set; } + + /// <summary> + /// 瑁佸垏瀹� + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "瑁佸垏瀹�")] + public float Width { get; set; } + + /// <summary> + /// 绾胯竟浠撳湴鍧�鐮� + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "绾胯竟浠撳湴鍧�鐮�")] + public string TargetAddressCode { get; set; } + + /// <summary> + /// 澶囨敞 + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")] + public string Remark { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPOutboundOrder.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPOutboundOrder.cs" new file mode 100644 index 0000000..44af79b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPOutboundOrder.cs" @@ -0,0 +1,123 @@ +锘縰sing 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.Outbound; + +namespace WIDESEA_Model.Models +{ + /// <summary> + /// PP浠撳ぇ鍗稭ES鍑哄簱鍗� + /// </summary> + [SugarTable(nameof(Dt_MesPPOutboundOrder))] + public class Dt_MesPPOutboundOrder : 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> + [CodeRule(RuleCodeEnum.OutboundOrderRule)] + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿", IsOnlyIgnoreUpdate = true)] + public string OrderNo { get; set; } + + /// <summary> + /// 浠诲姟鍗曞彿 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "浠诲姟鍗曞彿")] + public string TaskNo { get; set; } + + /// <summary> + /// 鍗曟嵁绫诲瀷 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁绫诲瀷", IsOnlyIgnoreUpdate = true)] + public int OrderType { get; set; } + + /// <summary> + /// 鍗曟嵁鐘舵�� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鐘舵��")] + public int OrderStatus { get; set; } + + /// <summary> + /// 鍒涘缓鏂瑰紡 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏂瑰紡", IsOnlyIgnoreUpdate = true)] + public int CreateType { get; set; } + + /// <summary> + /// 鐗╂枡缂栧彿 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")] + public string MaterialCode { get; set; } + + /// <summary> + /// 鐗╂枡鍚嶇О + /// </summary> + [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")] + public string MaterialName { get; set; } + + /// <summary> + /// 鍗曚綅 + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "鍗曚綅")] + public string Unit { get; set; } + + /// <summary> + /// 鍗曟嵁鏁伴噺 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鏁伴噺")] + public float OrderQuantity { get; set; } + + /// <summary> + /// 閿佸畾鏁伴噺 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "閿佸畾鏁伴噺", DefaultValue = "0")] + public float LockQuantity { get; set; } + + /// <summary> + /// 宸插嚭鏁伴噺 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "宸插嚭鏁伴噺", DefaultValue = "0")] + public float OverOutQuantity { get; set; } + + /// <summary> + /// 绾夸綋 + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "绾夸綋")] + public string Line { get; set; } + + /// <summary> + /// 绾胯竟浠撳湴鍧�鐮� + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "绾胯竟浠撳湴鍧�鐮�")] + public string TargetAddressCode { get; set; } + + /// <summary> + /// 瑁佸垏瀹� + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "瑁佸垏瀹�")] + public float Width { get; set; } + + /// <summary> + /// 鍑哄簱鍗曟槑缁� + /// </summary> + [Navigate(NavigateType.OneToMany, nameof(Dt_MesPPOutboundOrderDetail.OrderId), nameof(Id))] + public List<Dt_MesPPOutboundOrderDetail> Details { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPOutboundOrderDetail.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPOutboundOrderDetail.cs" new file mode 100644 index 0000000..7365d45 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPOutboundOrderDetail.cs" @@ -0,0 +1,46 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using SqlSugar; +using WIDESEA_Core.DB.Models; + +namespace WIDESEA_Model.Models.Outbound +{ + /// <summary> + /// PP浠撳ぇ鍗稭ES鍑哄簱鍗曟槑缁� + /// </summary> + [SugarTable(nameof(Dt_MesPPOutboundOrderDetail))] + public class Dt_MesPPOutboundOrderDetail : BaseEntity + { + /// <summary> + /// 涓婚敭 + /// </summary> + [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")] + public int Id { get; set; } + + /// <summary> + /// 浠撳簱涓婚敭 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "浠撳簱涓婚敭")] + public int OrderId { get; set; } + + /// <summary> + /// 搴撳尯 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "搴撳尯")] + public string Warehouse { get; set; } + + /// <summary> + /// 杞藉叿鍙� + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "杞藉叿鍙�")] + public string CarrierCode { get; set; } + /// <summary> + /// 璁㈠崟鏄庣粏鐘舵�� + /// </summary> + [SugarColumn(IsNullable = false,ColumnDescription = "璁㈠崟鏄庣粏鐘舵��")] + public int OrderDetailStatus { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs" index a3dbe75..af23f91 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs" @@ -82,6 +82,12 @@ public float StockQuantity { get; set; } /// <summary> + /// 瑁佸垏鍚庡搴� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "瑁佸垏鍚庡搴�")] + public float CutedWidth { get; set; } + + /// <summary> /// 鍑哄簱鏁伴噺 /// </summary> [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱鏁伴噺", DefaultValue = "0")] diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPCutOutboundOrderDetailRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPCutOutboundOrderDetailRepository.cs" new file mode 100644 index 0000000..2e6a544 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPCutOutboundOrderDetailRepository.cs" @@ -0,0 +1,19 @@ +锘縰sing 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; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_OutboundRepository +{ + public class MesPPCutOutboundOrderDetailRepository : RepositoryBase<Dt_MesPPCutOutboundOrderDetail>, IMesPPCutOutboundOrderDetailRepository + { + public MesPPCutOutboundOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) + { + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPCutOutboundOrderRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPCutOutboundOrderRepository.cs" new file mode 100644 index 0000000..a56d152 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPCutOutboundOrderRepository.cs" @@ -0,0 +1,19 @@ +锘縰sing 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; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_OutboundRepository +{ + public class MesPPCutOutboundOrderRepository : RepositoryBase<Dt_MesPPCutOutboundOrder>, IMesPPCutOutboundOrderRepository + { + public MesPPCutOutboundOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) + { + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPOutboundOrderDetailRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPOutboundOrderDetailRepository.cs" new file mode 100644 index 0000000..3199fee --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPOutboundOrderDetailRepository.cs" @@ -0,0 +1,19 @@ +锘縰sing 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; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_OutboundRepository +{ + public class MesPPOutboundOrderDetailRepository : RepositoryBase<Dt_MesPPOutboundOrderDetail>, IMesPPOutboundOrderDetailRepository + { + public MesPPOutboundOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) + { + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPOutboundOrderRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPOutboundOrderRepository.cs" new file mode 100644 index 0000000..feace75 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesPPOutboundOrderRepository.cs" @@ -0,0 +1,18 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseRepository; +using WIDESEA_IOutboundRepository; +using WIDESEA_Model.Models; + +namespace WIDESEA_OutboundRepository +{ + public class MesPPOutboundOrderRepository : RepositoryBase<Dt_MesPPOutboundOrder>, IMesPPOutboundOrderRepository + { + public MesPPOutboundOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) + { + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPCutOutboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPCutOutboundOrderDetailService.cs" new file mode 100644 index 0000000..95c75d8 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPCutOutboundOrderDetailService.cs" @@ -0,0 +1,38 @@ +锘縰sing 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; +using WIDESEA_Model.Models.Outbound; +using WIDESEA_OutboundRepository; + +namespace WIDESEA_OutboundService +{ + public class MesPPCutOutboundOrderDetailService : ServiceBase<Dt_MesPPCutOutboundOrderDetail, IMesPPCutOutboundOrderDetailRepository>, IMesPPCutOutboundOrderDetailService + { + private readonly IBasicRepository _basicRepository; + private readonly IStockService _stockService; + private readonly IOutStockLockInfoService _outStockLockInfoService; + private readonly IBasicService _basicService; + private readonly IRecordService _recordService; + + public IMesPPCutOutboundOrderDetailRepository Repository => BaseDal; + + public MesPPCutOutboundOrderDetailService(IMesPPCutOutboundOrderDetailRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, IRecordService recordService) : base(BaseDal) + { + _basicRepository = basicRepository; + _stockService = stockService; + _outStockLockInfoService = outStockLockInfoService; + _basicService = basicService; + _recordService = recordService; + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPCutOutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPCutOutboundOrderService.cs" new file mode 100644 index 0000000..c1d36e0 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPCutOutboundOrderService.cs" @@ -0,0 +1,38 @@ +锘縰sing 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; +using WIDESEA_Model.Models.Outbound; +using WIDESEA_OutboundRepository; + +namespace WIDESEA_OutboundService +{ + public class MesPPCutOutboundOrderService : ServiceBase<Dt_MesPPCutOutboundOrder, IMesPPCutOutboundOrderRepository>, IMesPPCutOutboundOrderService + { + private readonly IBasicRepository _basicRepository; + private readonly IStockService _stockService; + private readonly IOutStockLockInfoService _outStockLockInfoService; + private readonly IBasicService _basicService; + private readonly IRecordService _recordService; + + public IMesPPCutOutboundOrderRepository Repository => BaseDal; + + public MesPPCutOutboundOrderService(IMesPPCutOutboundOrderRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, IRecordService recordService) : base(BaseDal) + { + _basicRepository = basicRepository; + _stockService = stockService; + _outStockLockInfoService = outStockLockInfoService; + _basicService = basicService; + _recordService = recordService; + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPOutboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPOutboundOrderDetailService.cs" new file mode 100644 index 0000000..afee0e9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPOutboundOrderDetailService.cs" @@ -0,0 +1,38 @@ +锘縰sing 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; +using WIDESEA_Model.Models.Outbound; +using WIDESEA_OutboundRepository; + +namespace WIDESEA_OutboundService +{ + public class MesPPOutboundOrderDetailService : ServiceBase<Dt_MesPPOutboundOrderDetail, IMesPPOutboundOrderDetailRepository>, IMesPPOutboundOrderDetailService + { + private readonly IBasicRepository _basicRepository; + private readonly IStockService _stockService; + private readonly IOutStockLockInfoService _outStockLockInfoService; + private readonly IBasicService _basicService; + private readonly IRecordService _recordService; + + public IMesPPOutboundOrderDetailRepository Repository => BaseDal; + + public MesPPOutboundOrderDetailService(IMesPPOutboundOrderDetailRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, IRecordService recordService) : base(BaseDal) + { + _basicRepository = basicRepository; + _stockService = stockService; + _outStockLockInfoService = outStockLockInfoService; + _basicService = basicService; + _recordService = recordService; + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPOutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPOutboundOrderService.cs" new file mode 100644 index 0000000..0ab70f1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPOutboundOrderService.cs" @@ -0,0 +1,143 @@ +锘縰sing 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; +using WIDESEA_Model.Models.Outbound; +using WIDESEA_OutboundRepository; + +namespace WIDESEA_OutboundService +{ + public class MesPPOutboundOrderService : ServiceBase<Dt_MesPPOutboundOrder, IMesPPOutboundOrderRepository>, IMesPPOutboundOrderService + { + private readonly IBasicRepository _basicRepository; + private readonly IStockService _stockService; + private readonly IOutStockLockInfoService _outStockLockInfoService; + private readonly IBasicService _basicService; + private readonly IRecordService _recordService; + + public IMesPPOutboundOrderRepository Repository => BaseDal; + + public MesPPOutboundOrderService(IMesPPOutboundOrderRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, IRecordService recordService) : base(BaseDal) + { + _basicRepository = basicRepository; + _stockService = stockService; + _outStockLockInfoService = outStockLockInfoService; + _basicService = basicService; + _recordService = recordService; + } + + public (List<Dt_StockInfo>, Dt_MesPPOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_MesPPOutboundOrder mesPPOutboundOrder) + { + List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>(); + + List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>(); + List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); + + float originalNeedQuantity = mesPPOutboundOrder.OrderQuantity; + + float needQuantity = originalNeedQuantity; + + List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(mesPPOutboundOrder.MaterialCode, "", mesPPOutboundOrder.Details.FirstOrDefault()?.CarrierCode ?? "",mesPPOutboundOrder.WarehouseId); + if (!stockInfos.Any()) + { + throw new Exception($"鏈壘鍒板彲鍒嗛厤搴撳瓨"); + } + List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, mesPPOutboundOrder.MaterialCode, needQuantity, out float residueQuantity); + mesPPOutboundOrder.LockQuantity += needQuantity - residueQuantity; + outStocks.AddRange(autoAssignStocks); + float assignQuantity = needQuantity - residueQuantity; + + float orderQuantity = mesPPOutboundOrder.OrderQuantity; + for (int j = 0; j < autoAssignStocks.Count; j++) + { + float detailAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == mesPPOutboundOrder.MaterialCode).Sum(x => x.AssignQuantity);//鍑哄簱璁㈠崟鏄庣粏宸插垎閰嶆暟閲� + + float palletAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == mesPPOutboundOrder.MaterialCode && x.PalletCode == autoAssignStocks[j].PalletCode).Sum(x => x.AssignQuantity);//鍑哄簱璇︽儏宸插垎閰嶆暟閲� + + float palletOutboundQuantity = autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity); + if (palletAssignQuantity < palletOutboundQuantity)//濡傛灉鍑哄簱璇︽儏宸插垎閰嶆暟閲忓皬浜庢墭鐩樺凡鍒嗛厤鏁伴噺锛屽垯鍙互缁х画娣诲姞璇ユ墭鐩樺嚭搴撲俊鎭� + { + float orderDetailNeedQuantity = mesPPOutboundOrder.OrderQuantity - detailAssignQuantity; + if (orderDetailNeedQuantity > autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity) + { + mesPPOutboundOrder.LockQuantity += autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity; + Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(mesPPOutboundOrder, autoAssignStocks[j], autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity); + outStockLockInfos.Add(outStockLockInfo); + } + else + { + Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(mesPPOutboundOrder, autoAssignStocks[j], mesPPOutboundOrder.OrderQuantity - mesPPOutboundOrder.LockQuantity); + outStockLockInfos.Add(outStockLockInfo); + mesPPOutboundOrder.LockQuantity = mesPPOutboundOrder.OrderQuantity; + break; + } + } + } + locationInfos.AddRange(_basicService.LocationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList())); + + return (outStocks, mesPPOutboundOrder, outStockLockInfos, locationInfos); + } + + + public (List<Dt_StockInfo>, Dt_MesPPCutOutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_MesPPCutOutboundOrder mesPPOutboundOrder, Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail) + { + List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>(); + + List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>(); + List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); + //Dt_MesPPCutOutboundOrder outboundOrder = BaseDal.Db.Queryable<Dt_MesPPCutOutboundOrder>().Where(x=>x.Id==mesPPOutboundOrder.OrderId).First(); + float originalNeedQuantity = mesPPCutOutboundOrderDetail.OrderQuantity; + + float needQuantity = originalNeedQuantity; + + List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(mesPPCutOutboundOrderDetail.MaterielCode, "", mesPPOutboundOrder.WarehouseId); + if (!stockInfos.Any()) + { + throw new Exception($"鏈壘鍒板彲鍒嗛厤搴撳瓨"); + } + List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, mesPPCutOutboundOrderDetail.MaterielCode, needQuantity, out float residueQuantity); + mesPPCutOutboundOrderDetail.LockQuantity += needQuantity - residueQuantity; + outStocks.AddRange(autoAssignStocks); + float assignQuantity = needQuantity - residueQuantity; + + float orderQuantity = mesPPCutOutboundOrderDetail.OrderQuantity; + for (int j = 0; j < autoAssignStocks.Count; j++) + { + float detailAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterielCode).Sum(x => x.AssignQuantity);//鍑哄簱璁㈠崟鏄庣粏宸插垎閰嶆暟閲� + + float palletAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterielCode && x.PalletCode == autoAssignStocks[j].PalletCode).Sum(x => x.AssignQuantity);//鍑哄簱璇︽儏宸插垎閰嶆暟閲� + + float palletOutboundQuantity = autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity); + if (palletAssignQuantity < palletOutboundQuantity)//濡傛灉鍑哄簱璇︽儏宸插垎閰嶆暟閲忓皬浜庢墭鐩樺凡鍒嗛厤鏁伴噺锛屽垯鍙互缁х画娣诲姞璇ユ墭鐩樺嚭搴撲俊鎭� + { + float orderDetailNeedQuantity = mesPPCutOutboundOrderDetail.OrderQuantity - detailAssignQuantity; + if (orderDetailNeedQuantity > autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity) + { + mesPPCutOutboundOrderDetail.LockQuantity += autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity; + Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(mesPPOutboundOrder, mesPPCutOutboundOrderDetail, autoAssignStocks[j], autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity); + outStockLockInfos.Add(outStockLockInfo); + } + else + { + Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(mesPPOutboundOrder, mesPPCutOutboundOrderDetail, autoAssignStocks[j], mesPPCutOutboundOrderDetail.OrderQuantity - mesPPCutOutboundOrderDetail.LockQuantity); + outStockLockInfos.Add(outStockLockInfo); + mesPPCutOutboundOrderDetail.LockQuantity = mesPPCutOutboundOrderDetail.OrderQuantity; + break; + } + } + } + locationInfos.AddRange(_basicService.LocationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList())); + + return (outStocks, mesPPCutOutboundOrderDetail, outStockLockInfos, locationInfos); + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" index 3599250..8fb3c42 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" @@ -13,6 +13,7 @@ using WIDESEA_IRecordService; using WIDESEA_IStockService; using WIDESEA_Model.Models; +using WIDESEA_Model.Models.Outbound; namespace WIDESEA_IOutboundService { @@ -84,7 +85,14 @@ return outStockLockInfo; } - + /// <summary> + /// PP澶у嵎鍑哄簱 + /// </summary> + /// <param name="mesOutboundOrder"></param> + /// <param name="outStock"></param> + /// <param name="assignQuantity"></param> + /// <param name="taskNum"></param> + /// <returns></returns> public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesOutboundOrder mesOutboundOrder, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null) { @@ -109,6 +117,63 @@ return outStockLockInfo; } + /// <summary> + /// PP灏忓嵎鍑哄簱 + /// </summary> + /// <param name="mesPPCutOutboundOrderDetail"></param> + /// <param name="outStock"></param> + /// <param name="assignQuantity"></param> + /// <param name="taskNum"></param> + /// <returns></returns> + public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder,Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null) + { + + Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo() + { + PalletCode = outStock.PalletCode, + AssignQuantity = assignQuantity, + MaterielCode = mesPPCutOutboundOrderDetail.MaterielCode, + BatchNo = outStock.Details.FirstOrDefault()?.BatchNo ?? "", + LocationCode = outStock.LocationCode, + MaterielName = mesPPCutOutboundOrderDetail.MaterielName, + OrderDetailId = mesPPCutOutboundOrderDetail.Id, + OrderNo = mesPPCutOutboundOrder.OrderNo, + OrderType = mesPPCutOutboundOrder.OrderType, + OriginalQuantity = outStock.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterielCode).Sum(x => x.StockQuantity), + Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(), + StockId = outStock.Id, + TaskNum = taskNum, + OrderQuantity = mesPPCutOutboundOrderDetail.OrderQuantity, + Unit = mesPPCutOutboundOrderDetail.Unit + }; + + return outStockLockInfo; + } + + public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesPPOutboundOrder mesPPOutboundOrder, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null) + { + + Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo() + { + PalletCode = outStock.PalletCode, + AssignQuantity = assignQuantity, + MaterielCode = mesPPOutboundOrder.MaterialCode, + BatchNo = outStock.Details.FirstOrDefault()?.BatchNo ?? "", + LocationCode = outStock.LocationCode, + MaterielName = mesPPOutboundOrder.MaterialName, + OrderDetailId = mesPPOutboundOrder.Id, + OrderNo = mesPPOutboundOrder.OrderNo, + OrderType = mesPPOutboundOrder.OrderType, + OriginalQuantity = outStock.Details.Where(x => x.MaterielCode == mesPPOutboundOrder.MaterialCode).Sum(x => x.StockQuantity), + Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(), + StockId = outStock.Id, + TaskNum = taskNum, + OrderQuantity = mesPPOutboundOrder.OrderQuantity, + Unit = mesPPOutboundOrder.Unit + }; + + return outStockLockInfo; + } public List<Dt_OutStockLockInfo> OutStockLockInfos(string OrderNo) { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" index 11576a6..eaaf4d8 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" @@ -17,12 +17,22 @@ public IOutStockLockInfoService OutboundStockLockInfoService { get; } - public OutboundService(IOutboundOrderDetailService outboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService, IMesOutboundOrderService mesOutboundOrderService) + public IMesPPOutboundOrderService MesPPOutboundOrderService { get; } + + public IMesPPOutboundOrderDetailService MesPPOutboundOrderDetailService { get; } + + public IMesPPCutOutboundOrderService MesPPCutOutboundOrderService { get; } + + public IMesPPCutOutboundOrderDetailService MesPPCutOutboundOrderDetailService { get; } + + public OutboundService(IOutboundOrderDetailService outboundOrderDetailService,IMesPPOutboundOrderService mesPPOutboundOrderService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService, IMesOutboundOrderService mesOutboundOrderService) { OutboundOrderDetailService = outboundOrderDetailService; OutboundOrderService = outboundOrderService; OutboundStockLockInfoService = outboundStockLockInfoService; MesOutboundOrderService = mesOutboundOrderService; + MesPPOutboundOrderService = mesPPOutboundOrderService; + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs" index 680641d..aa5fba1 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs" @@ -20,6 +20,7 @@ using WIDESEA_IStockRepository; using WIDESEA_IStockService; using WIDESEA_Model.Models; +using WIDESEA_StockRepository; namespace WIDESEA_StockService { @@ -221,5 +222,14 @@ return BaseDal.GetStockInfos(materielCode, batchNo, locationCodes); } + + public List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, string palletcode, int warehoseId) + { + Dt_StockInfo stockInfo = BaseDal.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletcode && x.WarehouseId == warehoseId).Includes(x => x.Details).First(); + + List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(stockInfo.LocationCode); + + return BaseDal.GetStockInfos(materielCode, batchNo, locationCodes); + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" index e74b420..2be269b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" @@ -24,6 +24,11 @@ using WIDESEA_ITaskInfoService; using WIDESEA_Model.Models; using WIDESEA_Common.OrderEnum; +using WIDESEA_Model.Models.Outbound; +using System.Diagnostics.Metrics; +using System.Reflection.Metadata; +using WIDESEA_Model.Models.Inbound; +using WIDESEA_DTO.Task; namespace WIDESEA_TaskInfoService { @@ -501,5 +506,429 @@ return MesResponseContent.Instance.Error(ex.Message); } } + + /// <summary> + /// PP澶у嵎鍑哄簱-杩涜鍒嗗嵎 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + public MesResponseContent PPSubsectionOut(PPSubsectionOutModel model) + { + MesResponseContent modelCount = new MesResponseContent(); + try + { + foreach (var item in model.Carriers) + { + Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == item.Warehouse); + if (warehouse == null) + { + return MesResponseContent.Instance.Error("浠撳簱淇℃伅鏈厤缃�"); + } + Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == item.CarrierCode); + if (stockInfo == null) + { + return MesResponseContent.Instance.Error("鏈壘鍒版杞藉叿缂栧彿搴撳瓨"); + } + Dt_MesPPOutboundOrder mesPPOutboundOrder = BaseDal.Db.Queryable<Dt_MesPPOutboundOrder>().Where(x => x.TaskNo == model.TaskNo).Includes(x => x.Details).First(); + if (mesPPOutboundOrder != null) + { + return MesResponseContent.Instance.Error("宸插瓨鍦ㄦ浠诲姟鍗曞彿"); + } + Dt_MesPPOutboundOrderDetail mesPPOutboundOrderDetail = new Dt_MesPPOutboundOrderDetail() + { + Warehouse = item.Warehouse, + CarrierCode = item.CarrierCode, + }; + + Dt_MesPPOutboundOrder mesOutboundOrder = new Dt_MesPPOutboundOrder() + { + CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(), + MaterialCode = model.MaterialCode, + MaterialName = model.MaterialName, + OrderQuantity = model.RequiredQuantity, + TaskNo = model.TaskNo, + Unit = model.Unit,//PP闇�瑕佽浆鎹㈡垚绫�(闇�姹傚钩鏂�(PNL鏁�*闈㈢Н)/瀹藉害) + Width = model.Width, + TargetAddressCode = model.TargetAddressCode, + OrderType = TaskTypeEnum.MesHandPickOutbound.ObjToInt(), + OrderStatus = OutOrderStatusEnum.鏈紑濮�.ObjToInt(), + WarehouseId = warehouse.WarehouseId, + Details = new List<Dt_MesPPOutboundOrderDetail> { mesPPOutboundOrderDetail } + }; + //Db.InsertNav(mesOutboundOrder).Include(x=>x.Details).ExecuteCommand(); + List<Dt_Task> tasks = new List<Dt_Task>(); + + List<Dt_StockInfo>? stockInfos = null; + List<Dt_OutStockLockInfo>? outStockLockInfos = null; + List<Dt_LocationInfo>? locationInfos = null; + { + (List<Dt_StockInfo>, Dt_MesPPOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.MesPPOutboundOrderService.AssignStockOutbound(mesOutboundOrder); + if (result.Item1 != null && result.Item1.Count > 0) + { + tasks = GetTasks(result.Item1, TaskTypeEnum.MesOutbound); + result.Item2.OrderStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); + result.Item3.ForEach(x => + { + x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(); + }); + + stockInfos = result.Item1; + mesOutboundOrder = result.Item2; + outStockLockInfos = result.Item3; + locationInfos = result.Item4; + mesPPOutboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); + + } + else + { + throw new Exception("鏃犲簱瀛�"); + } + } + tasks.ForEach(x => + { + x.TargetAddress = model.TargetAddressCode; + }); + _unitOfWorkManage.BeginTran(); + + int id = BaseDal.AddData(tasks); + outStockLockInfos.ForEach(x => + { + x.OrderNo = mesOutboundOrder.TaskNo; + x.OrderDetailId = id; + }); + //_outboundService.MesPPOutboundOrderService.Repository.AddData(mesOutboundOrder); + Db.InsertNav(mesOutboundOrder).Include(x => x.Details).ExecuteCommand(); + if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0) + { + WebResponseContent content = _outboundService.MesOutboundOrderService.LockOutboundStockDataUpdate(stockInfos, outStockLockInfos, locationInfos, tasks: tasks); + + if (!content.Status) + { + _unitOfWorkManage.RollbackTran(); + return MesResponseContent.Instance.Error(content.Message); + } + } + _unitOfWorkManage.CommitTran(); + PushTasksToWCS(tasks); + + } + return MesResponseContent.Instance.OK(); + } + catch (Exception ex) + { + return MesResponseContent.Instance.Error(ex.Message); + } + + } + + /// <summary> + /// PP灏忓嵎鍑哄簱 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + public MesResponseContent PPCutOut(PPCutOutModle model) + { + try + { + foreach (var item in model.MaterialDetails) + { + Dt_Warehouse warehouse = _basicService.WarehouseService.Repository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA58.ToString()); + if (warehouse == null) + { + return MesResponseContent.Instance.Error("浠撳簱鍩虹淇℃伅鏈厤缃�"); + } + Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == item.MaterialCode); + if (materielInfo == null) + { + return MesResponseContent.Instance.Error($"鏈壘鍒拌鐗╂枡淇℃伅"); + } + Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder = BaseDal.Db.Queryable<Dt_MesPPCutOutboundOrder>().Where(x => x.TaskNo == model.TaskNo).Includes(x => x.Details).First(); + if (mesPPCutOutboundOrder != null) + { + return MesResponseContent.Instance.Error("宸插瓨鍦ㄦ浠诲姟鍗曞彿"); + } + Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail = new Dt_MesPPCutOutboundOrderDetail() + { + MaterielCode = item.MaterialCode, + MaterielName = item.MaterialName, + OrderQuantity = item.RequiredQuantity, + Unit = item.Unit, + LayerCode = item.LayerCode, + Sequence = item.Sequence, + TargetAddressCode = item.TargetAddressCode, + Width = item.Width, + }; + Dt_MesPPCutOutboundOrder mesPPOutboundOrder = new Dt_MesPPCutOutboundOrder() + { + CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(), + TaskNo = model.TaskNo, + OrderType = TaskTypeEnum.MesOutbound.ObjToInt(), + OrderStatus = OutOrderStatusEnum.鏈紑濮�.ObjToInt(), + WarehouseId = warehouse.WarehouseId, + Details = new List<Dt_MesPPCutOutboundOrderDetail> { mesPPCutOutboundOrderDetail } + }; + List<Dt_Task> tasks = new List<Dt_Task>(); + + List<Dt_StockInfo>? stockInfos = null; + List<Dt_OutStockLockInfo>? outStockLockInfos = null; + List<Dt_LocationInfo>? locationInfos = null; + { + (List<Dt_StockInfo>, Dt_MesPPCutOutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.MesPPOutboundOrderService.AssignStockOutbound(mesPPOutboundOrder, mesPPCutOutboundOrderDetail); + if (result.Item1 != null && result.Item1.Count > 0) + { + tasks = GetTasks(result.Item1, TaskTypeEnum.MesOutbound); + result.Item2.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); + result.Item3.ForEach(x => + { + x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(); + }); + + stockInfos = result.Item1; + mesPPCutOutboundOrderDetail = result.Item2; + outStockLockInfos = result.Item3; + locationInfos = result.Item4; + + } + else + { + throw new Exception("鏃犲簱瀛�"); + } + } + tasks.ForEach(x => + { + x.TargetAddress = mesPPCutOutboundOrderDetail.TargetAddressCode; + }); + _unitOfWorkManage.BeginTran(); + + int id = BaseDal.AddData(tasks); + outStockLockInfos.ForEach(x => + { + x.OrderNo = mesPPOutboundOrder.TaskNo; + x.OrderDetailId = id; + }); + //_outboundService.MesPPOutboundOrderService.Repository.AddData(mesOutboundOrder); + Db.InsertNav(mesPPOutboundOrder).Include(x => x.Details).ExecuteCommand(); + if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0) + { + WebResponseContent content = _outboundService.MesOutboundOrderService.LockOutboundStockDataUpdate(stockInfos, outStockLockInfos, locationInfos, tasks: tasks); + + if (!content.Status) + { + _unitOfWorkManage.RollbackTran(); + return MesResponseContent.Instance.Error(content.Message); + } + } + _unitOfWorkManage.CommitTran(); + PushTasksToWCS(tasks, "AGV_PP"); + } + return MesResponseContent.Instance.OK(); + } + catch (Exception ex) + { + + return MesResponseContent.Instance.Error(ex.Message); + } + } + + /// <summary> + /// PP鍏ュ簱(澶у嵎銆佸皬鍗枫�佸紶鏂�) + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + public MesResponseContent PPBack(PPBackModel model) + { + try + { + foreach (var item in model.MaterialLotInfo) + { + //鑾峰彇鐗╂枡淇℃伅 + Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == item.MaterialCode); + if (materielInfo == null) + { + return MesResponseContent.Instance.Error($"鐗╂枡{item.MaterialCode}涓嶅瓨鍦�!"); + } + Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA58.ToString()); + if (warehouse == null) + { + return MesResponseContent.Instance.Error($"鏈壘鍒颁粨搴撲俊鎭�"); + } + Dt_MesPPBackInboundOrderDetail mesPPBackInboundOrderDetail = new Dt_MesPPBackInboundOrderDetail() + { + MaterialLot = item.MaterialLot, + MaterielCode = item.MaterialCode, + OrderQuantity = item.Quantity, + CutedWidth = item.CutedWidth, + MaterialLotOld = item.MaterialLotOld, + Unit = item.Unit, + ProductionDate = item.ProductionDate, + EffectiveDate = item.ExpirationDate, + OrderDetailStatus = OrderDetailStatusEnum.New.ObjToInt(), + }; + Dt_MesPPBackInboundOrder mesPPBackInboundOrder = new Dt_MesPPBackInboundOrder() + { + WarehouseId = warehouse.WarehouseId, + SourceAddressCode = model.SourceAddressCode, + CarrierCode = model.CarrierCode, + OrderStatus = InOrderStatusEnum.鏈紑濮�.ObjToInt(), + CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(), + Details = new List<Dt_MesPPBackInboundOrderDetail> { mesPPBackInboundOrderDetail } + }; + + Dt_StockInfoDetail stockInfoDetail = new Dt_StockInfoDetail() + { + BatchNo = mesPPBackInboundOrderDetail.MaterialLot, + MaterielCode = mesPPBackInboundOrderDetail.MaterielCode, + MaterielName = materielInfo.MaterielName, + OrderNo = "", + SerialNumber = "", + StockQuantity = mesPPBackInboundOrderDetail.OrderQuantity, + OutboundQuantity = 0, + Unit = materielInfo.MaterielUnit, + Status = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(), + ProductionDate = mesPPBackInboundOrderDetail.ProductionDate, + EffectiveDate = mesPPBackInboundOrderDetail.EffectiveDate, + InboundOrderRowNo = mesPPBackInboundOrderDetail.RowNo, + }; + + Dt_StockInfo stockInfo = new Dt_StockInfo() + { + PalletCode = model.CarrierCode, + StockStatus = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(), + WarehouseId = mesPPBackInboundOrder.WarehouseId, + Details = new List<Dt_StockInfoDetail> { stockInfoDetail } + }; + _unitOfWorkManage.BeginTran(); + Db.InsertNav(mesPPBackInboundOrder).Include(x => x.Details).ExecuteCommand(); + Db.InsertNav(stockInfo).Include(x => x.Details).ExecuteCommand(); + WebResponseContent content = DeviceRequestInboundTask(mesPPBackInboundOrder, stockInfo); + if (!content.Status) + { + _unitOfWorkManage.RollbackTran(); + return MesResponseContent.Instance.Error(content.Message); + } + _unitOfWorkManage.CommitTran(); + } + return MesResponseContent.Instance.OK(); + } + catch (Exception ex) + { + _unitOfWorkManage.RollbackTran(); + return MesResponseContent.Instance.Error(ex.Message); + } + + } + + public WebResponseContent DeviceRequestInboundTask(Dt_MesPPBackInboundOrder mesPPBackInboundOrder, Dt_StockInfo stockInfo) + { + try + { + Dt_Task task = Repository.QueryFirst(x => x.PalletCode == stockInfo.PalletCode); + if (task != null) + { + PushTasksToWCS(new List<Dt_Task> { task }); + return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡鐢熸垚浠诲姟"); + } + if (Repository.QueryFirst(x => x.SourceAddress == stockInfo.PalletCode && x.TaskStatus == TaskStatusEnum.New.ObjToInt()) != null) + { + return WebResponseContent.Instance.Error($"璇ョ珯鐐瑰凡鏈夋湭鎵ц鐨勪换鍔�"); + } + //Dt_StockInfo stockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First(); + //if (stockInfos == null) + //{ + // return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�"); + //} + //if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎷i�夊畬鎴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.閫�搴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MES閫�搴�.ObjToInt()) + //{ + // return WebResponseContent.Instance.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘,涓嶅彲鐢宠鍏ュ簱"); + //} + //if (!string.IsNullOrEmpty(stockInfo.LocationCode)) + //{ + // return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡缁戝畾璐т綅"); + //} + //鍙叆骞冲簱,闇�鍒ゆ柇骞冲簱瀹氫箟璐т綅绫诲瀷銆傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�� + Dt_LocationInfo? locationInfos = _basicRepository.LocationInfoRepository.QueryFirst(x => x.WarehouseId == stockInfo.WarehouseId && x.LocationType == LocationTypeEnum.MediumPallet.ObjToInt()); + Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(locationInfos.RoadwayNo, stockInfo.PalletType, stockInfo.WarehouseId); + if (locationInfo == null) + { + return WebResponseContent.Instance.Error($"璐т綅鍒嗛厤澶辫触,鏈壘鍒板彲鍒嗛厤璐т綅"); + } + + Dt_Task newTask = new Dt_Task() + { + CurrentAddress = mesPPBackInboundOrder.SourceAddressCode, + Grade = 0, + NextAddress = locationInfo.LocationCode, + PalletCode = stockInfo.PalletCode, + Roadway = locationInfo.RoadwayNo,//宸烽亾鍙峰寘鍚獳GV + SourceAddress = mesPPBackInboundOrder.SourceAddressCode, + TargetAddress = locationInfo.LocationCode, + TaskType = TaskTypeEnum.Inbound.ObjToInt(), + TaskStatus = TaskStatusEnum.New.ObjToInt(), + WarehouseId = stockInfo.WarehouseId, + PalletType = stockInfo.PalletType + }; + LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus; + _unitOfWorkManage.BeginTran(); + _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationStatusEnum.Lock, LocationChangeType.InboundAssignLocation); + _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, newTask.PalletType, LocationStatusEnum.Lock, newTask.WarehouseId); + BaseDal.AddData(newTask); + _stockRepository.StockInfoRepository.UpdateData(stockInfo); + _unitOfWorkManage.CommitTran(); + + PushTasksToWCS(new List<Dt_Task> { newTask }); + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + _unitOfWorkManage.RollbackTran(); + return WebResponseContent.Instance.Error(ex.Message); + } + } + + + + /// <summary> + /// PP搴撳瓨鏌ヨ + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + public MesResponseContent QueryPpByWidth(QueryPpByWidthModel model) + { + MesResponseContent content = new MesResponseContent(); + try + { + Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA58.ToString()); + List<Dt_StockInfo> stockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => + x.WarehouseId == warehouse.WarehouseId && + x.StockStatus == (int)StockStatusEmun.鍏ュ簱瀹屾垚).Includes(x => x.Details).ToList(); + Dt_StockInfo? stockInfo = stockInfos.FirstOrDefault(x => x.Details.Any(x => x.MaterielCode == model.MaterialCode && x.CutedWidth == model.CutedWidth)); + if (stockInfo == null) + { + return content.Error($"PP浠撶珛搴�/骞冲簱锛氱墿鏂欑紪鍙�:{model.MaterialCode},瑁佸垏瀹�:{model.CutedWidth},鏈壘鍒版鐗╂枡搴撳瓨淇℃伅"); + } + var stock = stockInfo.Details.FirstOrDefault(); + if (stock != null) + { + content.BSucc = true; + content.StrCode = "0000"; + content.StrMsg = "鎵ц鎴愬姛"; + content.DataTime = DateTime.Now; + content.MaterialCode = stock.MaterielCode; + content.Quantity = stock.StockQuantity; + content.Unit = stock.Unit; + content.Warehouse = warehouse.WarehouseCode; + content.WarehouseName = warehouse.WarehouseName; + content.CutedWidth = stock.CutedWidth; + content.CarrierCode = stockInfo.PalletCode; + content.MaterialLot = stock.BatchNo; + } + return content; + } + catch (Exception ex) + { + return MesResponseContent.Instance.Error(ex.Message); + } + } + } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" index beea70e..d0cb670 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" @@ -50,6 +50,7 @@ using WIDESEA_ITaskInfoRepository; using WIDESEA_ITaskInfoService; using WIDESEA_Model.Models; +using WIDESEA_Model.Models.Outbound; using WIDESEA_TaskInfoRepository; namespace WIDESEA_TaskInfoService @@ -150,6 +151,68 @@ } } + public WebResponseContent AGVTasks(SaveModel saveModel) + { + try + { + var palletCode = saveModel.MainData["barcode"].ToString(); + var stationCode = saveModel.MainData["address"].ToString(); + var warehouseId = saveModel.MainData["warehouseId"].ObjToInt(); + Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == warehouseId); + if (warehouse == null) + { + return WebResponseContent.Instance.Error("鏈壘鍒板簱鍖�"); + } + + Dt_Task task = Repository.QueryFirst(x => x.PalletCode == palletCode && x.WarehouseId == warehouseId); + if (task != null) + { + return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡鐢熸垚浠诲姟"); + } + if (Repository.QueryFirst(x => x.SourceAddress == stationCode && x.TaskStatus == TaskStatusEnum.New.ObjToInt()) != null && warehouse.WarehouseCode != WarehouseEnum.HA58.ToString()) + { + return WebResponseContent.Instance.Error($"璇ョ珯鐐瑰凡鏈夋湭鎵ц鐨勪换鍔�"); + } + Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First(); + if (stockInfo == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�"); + } + if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt()) + { + return WebResponseContent.Instance.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘"); + } + if (warehouseId != stockInfo.WarehouseId) + { + return WebResponseContent.Instance.Error($"浠撳簱涓嶆纭�"); + } + Dt_Task newTask = new Dt_Task() + { + CurrentAddress = stationCode, + Grade = 0, + NextAddress ="", + PalletCode = palletCode, + Roadway = warehouse.Remark,//鏌ヨ瀵瑰簲绾胯竟浠撳湴鍧�宸烽亾鍙� + SourceAddress = stationCode, + TargetAddress = "", + TaskType = TaskTypeEnum.OutAllocate.ObjToInt(), + TaskStatus = TaskStatusEnum.New.ObjToInt(), + WarehouseId = stockInfo.WarehouseId, + PalletType = stockInfo.PalletType + }; + _unitOfWorkManage.BeginTran(); + BaseDal.AddData(newTask); + PushTasksToWCS(new List<Dt_Task> { newTask}); + _unitOfWorkManage.CommitTran(); + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + _unitOfWorkManage.RollbackTran(); + return WebResponseContent.Instance.Error(ex.Message); + } + } + /// <summary> /// 鍏ュ簱浠诲姟瀹屾垚 /// </summary> @@ -209,7 +272,7 @@ stockInfo.LocationCode = locationInfo.LocationCode; #region 绌虹鍏ュ簱/鎷i�夊洖搴�/鐢熶骇閫�鏂� - if (task.TaskType == TaskTypeEnum.InEmpty.ObjToInt() || task.TaskType == TaskTypeEnum.InPick.ObjToInt() || (task.TaskType==TaskTypeEnum.ProductionReturn.ObjToInt() && warehouse.WarehouseCode==WarehouseEnum.HA64.ToString())) + if (task.TaskType == TaskTypeEnum.InEmpty.ObjToInt() || task.TaskType == TaskTypeEnum.InPick.ObjToInt() || (task.TaskType == TaskTypeEnum.ProductionReturn.ObjToInt() && warehouse.WarehouseCode == WarehouseEnum.HA64.ToString())) { stockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt(); task.TaskStatus = TaskStatusEnum.Finish.ObjToInt(); @@ -261,10 +324,10 @@ if (inboundOrder.OrderType == InOrderTypeEnum.Return.ObjToInt()) { returnOrder = _inboundRepository.ReturnOrderRepository.Db.Queryable<Dt_ReturnOrder>().Where(x => x.OrderNo == inboundOrder.UpperOrderNo).Includes(x => x.Details).First(); - returnOrder.ReturnOrderStatus=ReturnOrderStatusEnum.Returned.ObjToInt(); + returnOrder.ReturnOrderStatus = ReturnOrderStatusEnum.Returned.ObjToInt(); foreach (var item in inboundOrder.Details) { - Dt_ReturnOrderDetail returnOrderDetail = returnOrder.Details?.FirstOrDefault(x=>x.MCode==item.MaterielCode); + Dt_ReturnOrderDetail returnOrderDetail = returnOrder.Details?.FirstOrDefault(x => x.MCode == item.MaterielCode); if (returnOrderDetail != null) { returnOrderDetail.OverReturnQty = item.OverInQuantity; @@ -312,7 +375,7 @@ _inboundRepository.InboundOrderRepository.UpdateData(inboundOrder); _inboundRepository.InboundOrderDetailRepository.UpdateData(inboundOrderDetail); } - if (returnOrder!=null) + if (returnOrder != null) { _inboundRepository.ReturnOrderRepository.UpdateData(returnOrder); _inboundRepository.ReturnOrderDetailRepository.UpdateData(returnOrder.Details); @@ -411,7 +474,7 @@ task.TaskStatus = TaskStatusEnum.Finish.ObjToInt(); _unitOfWorkManage.BeginTran(); - if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt()|| task.TaskType == TaskTypeEnum.OutAllocate.ObjToInt() || task.TaskType == TaskTypeEnum.MesHandPickOutbound.ObjToInt() || task.TaskType == TaskTypeEnum.MesHandOutbound.ObjToInt()) + if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutAllocate.ObjToInt() || task.TaskType == TaskTypeEnum.MesHandPickOutbound.ObjToInt() || task.TaskType == TaskTypeEnum.MesHandOutbound.ObjToInt()) { //澶勭悊鍑哄簱璇︽儏 if (outboundOrderDetails.Count > 0) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/MesPPBackInboundOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/MesPPBackInboundOrderController.cs" new file mode 100644 index 0000000..adb7910 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/MesPPBackInboundOrderController.cs" @@ -0,0 +1,20 @@ +锘縰sing Microsoft.AspNetCore.Mvc; +using WIDESEA_Core.BaseController; +using WIDESEA_IOutboundService; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_WMSServer.Controllers.Inbound +{ + /// <summary> + /// PP浠撳皬鍗稭ES鍑哄簱鍗� + /// </summary> + [Route("api/mesPPBackInboundOrder")] + [ApiController] + public class MesPPBackInboundOrderController : ApiBaseController<IMesPPCutOutboundOrderService, Dt_MesPPCutOutboundOrder> + { + public MesPPBackInboundOrderController(IMesPPCutOutboundOrderService service) : base(service) + { + + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" index cebe431..7eb8436 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" @@ -70,7 +70,7 @@ /// <param name="toolSynInfo"></param> /// <returns></returns> [HttpPost, Route("TestSynStock"), AllowAnonymous] - public WebResponseContent TestSynStock([FromBody]TestToolSynInfo toolSynInfo) + public WebResponseContent TestSynStock([FromBody] TestToolSynInfo toolSynInfo) { return _taskService.TestSynStock(toolSynInfo); } @@ -96,6 +96,48 @@ { return _taskService.SubstrateBack(model.Content); } + /// <summary> + /// PP澶у嵎鍑哄簱-杩涜鍒嗗嵎 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + [HttpPost, Route("PPSubsectionOut"), AllowAnonymous] + public MesResponseContent PPSubsectionOut([FromBody] Root<PPSubsectionOutModel> model) + { + return _taskService.PPSubsectionOut(model.Content); + } + /// <summary> + /// PP灏忓嵎鍑哄簱 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + [HttpPost, Route("PPCutOut"), AllowAnonymous] + public MesResponseContent PPCutOut([FromBody] Root<PPCutOutModle> model) + { + return _taskService.PPCutOut(model.Content); + } + + /// <summary> + /// PP鍏ュ簱(澶у嵎銆佸皬鍗枫�佸紶鏂�) + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + [HttpPost, Route("PPBack"), AllowAnonymous] + public MesResponseContent PPBack([FromBody] Root<PPBackModel> model) + { + return _taskService.PPBack(model.Content); + } + + /// <summary> + /// PP搴撳瓨鏌ヨ + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + [HttpPost, Route("QueryPpByWidth"), AllowAnonymous] + public MesResponseContent QueryPpByWidth([FromBody] Root<QueryPpByWidthModel> model) + { + return _taskService.QueryPpByWidth(model.Content); + } /// <summary> /// 鐗╂枡鍑哄簱锛學MS鍚屾鍑哄簱鐗╂枡鎵规鑷矼ES @@ -107,5 +149,6 @@ { return _taskService.UploadMesMaterialLotaAcept(model); } + } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPCutOutboundOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPCutOutboundOrderController.cs" new file mode 100644 index 0000000..85248da --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPCutOutboundOrderController.cs" @@ -0,0 +1,28 @@ +锘縰sing Autofac.Core; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using WIDESEA_Core; +using WIDESEA_Core.BaseController; +using WIDESEA_DTO.Inbound; +using WIDESEA_DTO.MES; +using WIDESEA_DTO.Outbound; +using WIDESEA_IOutboundService; +using WIDESEA_Model.Models; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_WMSServer.Controllers.Outbound +{ + /// <summary> + /// PP浠撳皬鍗稭ES鍑哄簱鍗� + /// </summary> + [Route("api/mesPPCutOutboundOrder")] + [ApiController] + public class MesPPCutOutboundOrderController : ApiBaseController<IMesPPCutOutboundOrderService, Dt_MesPPCutOutboundOrder> + { + public MesPPCutOutboundOrderController(IMesPPCutOutboundOrderService service) : base(service) + { + + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPCutOutboundOrderDetailController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPCutOutboundOrderDetailController.cs" new file mode 100644 index 0000000..86074e8 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPCutOutboundOrderDetailController.cs" @@ -0,0 +1,28 @@ +锘縰sing Autofac.Core; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using WIDESEA_Core; +using WIDESEA_Core.BaseController; +using WIDESEA_DTO.Inbound; +using WIDESEA_DTO.MES; +using WIDESEA_DTO.Outbound; +using WIDESEA_IOutboundService; +using WIDESEA_Model.Models; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_WMSServer.Controllers.Outbound +{ + /// <summary> + /// PP浠撳皬鍗稭ES鍑哄簱鍗� + /// </summary> + [Route("api/mesPPCutOutboundOrderDetail")] + [ApiController] + public class MesPPCutOutboundOrderDetailController : ApiBaseController<IMesPPCutOutboundOrderDetailService, Dt_MesPPCutOutboundOrderDetail> + { + public MesPPCutOutboundOrderDetailController(IMesPPCutOutboundOrderDetailService service) : base(service) + { + + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPOutboundOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPOutboundOrderController.cs" new file mode 100644 index 0000000..ede9c81 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPOutboundOrderController.cs" @@ -0,0 +1,27 @@ +锘縰sing Autofac.Core; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using WIDESEA_Core; +using WIDESEA_Core.BaseController; +using WIDESEA_DTO.Inbound; +using WIDESEA_DTO.MES; +using WIDESEA_DTO.Outbound; +using WIDESEA_IOutboundService; +using WIDESEA_Model.Models; + +namespace WIDESEA_WMSServer.Controllers.Outbound +{ + /// <summary> + /// MES鍑哄簱鍗� + /// </summary> + [Route("api/mesPPOutboundOrder")] + [ApiController] + public class MesPPOutboundOrderController : ApiBaseController<IMesPPOutboundOrderService, Dt_MesPPOutboundOrder> + { + public MesPPOutboundOrderController(IMesPPOutboundOrderService service) : base(service) + { + + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPOutboundOrderDetailController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPOutboundOrderDetailController.cs" new file mode 100644 index 0000000..607f39a --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/MesPPOutboundOrderDetailController.cs" @@ -0,0 +1,21 @@ +锘縰sing Microsoft.AspNetCore.Mvc; +using WIDESEA_Core.BaseController; +using WIDESEA_IOutboundService; +using WIDESEA_Model.Models; +using WIDESEA_Model.Models.Outbound; + +namespace WIDESEA_WMSServer.Controllers.Outbound +{ + /// <summary> + /// MES鍑哄簱鍗� + /// </summary> + [Route("api/mesPPOutboundOrderDetail")] + [ApiController] + public class MesPPOutboundOrderDetailController : ApiBaseController<IMesPPOutboundOrderDetailService, Dt_MesPPOutboundOrderDetail> + { + public MesPPOutboundOrderDetailController(IMesPPOutboundOrderDetailService service) : base(service) + { + + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" index b4557ec..c50d709 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" @@ -303,5 +303,16 @@ { return Service.UpdateTaskInfo(task); } + + /// <summary> + /// PP浠揂GV鎼繍浠诲姟 + /// </summary> + /// <param name="task"></param> + /// <returns></returns> + [HttpPost, Route("AGVTasks"), AllowAnonymous] + public WebResponseContent AGVTasks([FromBody] SaveModel saveModel) + { + return Service.AGVTasks(saveModel); + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages.json" index 3830d1a..fc062ff 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages.json" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages.json" @@ -72,6 +72,13 @@ } }, { + "path": "pages/stash/AGVTasks", + "style": { + "navigationBarTitleText": "AGV鎼繍浠诲姟", + "enablePullDownRefresh": false + } + }, + { "path": "pages/stash/InEmpty", "style": { "navigationBarTitleText": "绌虹鍏ュ簱", diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/AGVTasks.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/AGVTasks.vue" new file mode 100644 index 0000000..5b77025 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/AGVTasks.vue" @@ -0,0 +1,113 @@ +<template> + <view> + <view class="itemstyle"> + <uni-forms label-width="180"> + <uni-forms-item label="鎵樼洏鏉$爜:"> + <uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="!focus" v-model="barcode" + @input="barcodeInput" /> + </uni-forms-item> + <uni-forms-item label="鍦板潃鐮�:"> + <uni-easyinput type="text" placeholder="璇锋壂鎻忓湴鍧�鐮�" ref='midInput' :focus="!focus" v-model="address" + @input="barcodeInput" /> + </uni-forms-item> + <uni-forms-item> + <button @click="AGVTasks" type="primary" size="default" style="margin-top: 2%;">纭瀹屾垚</button> + </uni-forms-item> + </uni-forms> + </view> + <u-toast ref="uToast" /> + </view> +</template> + +<script> + const innerAudioContext = uni.createInnerAudioContext(); + export default { + data() { + return { + focus: false, + barcode: "", + address: "", + warehouseId: "", + } + }, + onShow() {}, + onLoad(res) { + this.focus = false; + this.warehouseId=res.warehouseId; + }, + methods: { + voiceSpeech(src) { + innerAudioContext.src = src; // '../../static/success.mp3'; + innerAudioContext.play(); + }, + barcodeInput() { + this.$nextTick(function(x) { + if (this.barcode.length > 0) { + this.focus = true; + } + }) + }, + AGVTasks() { + if (this.barcode == "") { + this.$refs.uToast.show({ + title: "璇锋壂鎻忔墭鐩樼爜", + type: 'error' + }) + return; + } + if (this.address == "") { + this.$refs.uToast.show({ + title: "璇锋壂鎻忓湴鍧�鐮�", + type: 'error' + }) + return; + } + var postDate = { + MainData: { + barcode: this.barcode, + address: this.address, + warehouseId:this.warehouseId, + } + } + this.$u.post('http://127.0.0.1:9293/api/Task/AGVTasks', postDate).then( + res => { + if (res.status) { + this.$refs.uToast.show({ + title: "浠诲姟鍒涘缓鎴愬姛鎴愬姛", + type: "success" + }) + this.barcode = ""; + } else { + this.$refs.uToast.show({ + title: res.message, + type: "error" + }) + } + }) + }, + } + } +</script> + +<style lang="scss"> + @import '@/common/uni-ui.scss'; + + .content { + display: flex; + height: 150px; + } + + .content-text { + font-size: 14px; + color: #666; + } + + .itemstyle { + margin-top: 30px; + margin-left: 5%; + } + + .headerstyle { + width: 90%; + } +</style> \ No newline at end of file diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/MES\344\270\232\345\212\241\346\265\201\347\250\213\345\233\276V1.0.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/MES\344\270\232\345\212\241\346\265\201\347\250\213\345\233\276V1.0.xlsx" index c6054ff..927f6f2 100644 --- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/MES\344\270\232\345\212\241\346\265\201\347\250\213\345\233\276V1.0.xlsx" +++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/MES\344\270\232\345\212\241\346\265\201\347\250\213\345\233\276V1.0.xlsx" Binary files differ -- Gitblit v1.9.3