项目代码/WCS/WIDESEAWCS_Client/config/buttons.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
项目代码/WCS/WIDESEAWCS_Client/src/extension/taskinfo/extend/HandInbound.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
项目代码/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Client/config/buttons.js
@@ -136,7 +136,16 @@ onClick: function () { this.export(); } } }, { name: "æ å¨ æ¬ è¿", // icon: 'el-icon-plus', value: 'HandInbound', type: 'success', onClick: function () { } }, ] ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Client/src/extension/taskinfo/extend/HandInbound.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,86 @@ <template> <vol-box v-model="show" title="æå¨å ¥åº" :width="900" :height="600"> <template #content> <el-form ref="form" :model="form" label-width="90px"> <el-form-item label="æ¬è¿åºå" prop="Area"> <el-select v-model="form.Area" placeholder="è¯·éæ©æ¬è¿åºå"> <el-option label="åºåä¸" value="1" /> <el-option label="åºåäº" value="2" /> <el-option label="åºåä¸" value="3" /> <el-option label="åºåå" value="4" /> </el-select> </el-form-item> <el-form-item label="èµ·ç¹"> <el-input type="text" v-model="form.SourceAddress"></el-input> </el-form-item> <el-form-item label="ç»ç¹"> <el-input type="text" v-model="form.TargetAddress"></el-input> </el-form-item> </el-form> </template> <template #footer> <div> <el-button type="danger" size="small" plain @click="submit"> <i class="el-icon-check">æ¬è¿</i> </el-button> <el-button size="small" type="primary" plain @click="() => { this.show = false; } "> <i class="el-icon-close">å ³é</i> </el-button> </div> </template> </vol-box> </template> <script> import VolBox from "@/components/basic/VolBox.vue"; export default { components: { "vol-box": VolBox, }, data() { return { form:{ Area:"", SourceAddress:"", TargetAddress:"", }, show: false, }; }, methods: { open() { this.show = true; }, submit() { this.$emit("parentCall", ($vue) => { if ( !this.form.TargetAddress || !this.form.Area || !this.form.SourceAddress|| this.form.Area==""|| this.form.SourceAddress==""|| this.form.TargetAddress=="" ) { this.$message.error("åæ°é误"); return; } this.http.post("api/Task/AddTask", this.form, "").then((x) => { if (!x.status) { this.$message.error(x.message); } else { this.$Message.success("æ°å»ºå ¥åºä»»å¡"); // $vue.success("æå."); this.show = false; this.form=''; $vue.refresh(); } }); }); }, }, }; </script> ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js
@@ -1,10 +1,11 @@ //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè éæ°é ç½®çæç代ç import gridBody from './extend/taskExecuteDetail.vue' import gridHeader from "./extend/HandInbound.vue" let extension = { components: { //æ¥è¯¢ç颿©å±ç»ä»¶ gridHeader: '', gridHeader: gridHeader, gridBody: gridBody, gridFooter: '', //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ @@ -42,6 +43,14 @@ this.$refs.gridBody.open(row); } }); var btnHandInbound = this.buttons.find(x => x.value == "HandInbound"); if (btnHandInbound != null) { btnHandInbound.onClick = () => { this.$refs.gridHeader.open(); this.refresh(); } } }, onInited() { //æ¡æ¶åå§åé ç½®å ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs
@@ -26,7 +26,7 @@ /// <summary> /// å··éå· /// </summary> public string RoadWay { get; set; } public string Area { get; set; } /// <summary> /// ä»»å¡ç±»å ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -55,7 +55,9 @@ /// <param name="taskDTOs">WMSä»»å¡å¯¹è±¡éå</param> /// <returns>è¿åå¤çç»æ</returns> WebResponseContent ReceiveWMSTask([NotNull] List<Dt_Task> taskDTOs); WebResponseContent AddTask(WMSTaskDTO WMSDTO); /// <summary> /// æ ¹æ®è®¾å¤ç¼å·ãå½åå°åæ¥è¯¢è¾éçº¿æªæ§è¡çä»»å¡ /// </summary> ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
@@ -25,6 +25,11 @@ { return Service.ReceiveWMSTask(taskDTOs); } [HttpPost, HttpGet, Route("AddTask"), AllowAnonymous] public WebResponseContent AddTask([FromBody] WMSTaskDTO WMSDTO) { return Service.AddTask(WMSDTO); } [HttpPost, HttpGet, Route("UpdateTaskExceptionMessage")] public WebResponseContent UpdateTaskExceptionMessage(int taskNum, string message) ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -46,11 +46,15 @@ using WIDESEAWCS_Core.Utilities; using WIDESEAWCS_DTO.Enum; using WIDESEAWCS_DTO.TaskInfo; using WIDESEAWCS_IBasicInfoRepository; using WIDESEAWCS_IBasicInfoService; using WIDESEAWCS_ITaskInfoRepository; using WIDESEAWCS_ITaskInfoService; using WIDESEAWCS_Model.Models; using WIDESEAWCS_QuartzJob; using WIDESEAWCS_QuartzJob.Models; using WIDESEAWCS_QuartzJob.Service; using WIDESEAWCS_TaskInfoRepository; using static Microsoft.IO.RecyclableMemoryStreamManager; namespace WIDESEAWCS_TaskInfoService @@ -62,6 +66,7 @@ private readonly ITaskExecuteDetailRepository _taskExecuteDetailRepository; private readonly ITask_HtyService _task_HtyService; private readonly IMapper _mapper; private readonly IDt_StationManagerRepository _stationManagerRepository; private Dictionary<string, OrderByType> _taskOrderBy = new() @@ -77,13 +82,14 @@ public List<int> TaskOutboundTypes => typeof(TaskOutboundTypeEnum).GetEnumIndexList(); public List<int> AGVTaskTypes => typeof(AGVTaskTypeEnum).GetEnumIndexList(); public TaskService(ITaskRepository BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IMapper mapper, ITask_HtyService task_HtyService) : base(BaseDal) public TaskService(ITaskRepository BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IMapper mapper, ITask_HtyService task_HtyService, IDt_StationManagerRepository stationManagerRepository) : base(BaseDal) { _routerService = routerService; _taskExecuteDetailService = taskExecuteDetailService; _taskExecuteDetailRepository = taskExecuteDetailRepository; _task_HtyService = task_HtyService; _mapper = mapper; _stationManagerRepository = stationManagerRepository; } /// <summary> @@ -117,6 +123,44 @@ return content; } public WebResponseContent AddTask(WMSTaskDTO WMSDTO) { var SourceAddress= _stationManagerRepository.QueryFirst(x=>x.stationCode == WMSDTO.SourceAddress&&x.stationArea==int.Parse( WMSDTO.Area)); var TargetAddress = _stationManagerRepository.QueryFirst(x=>x.stationCode == WMSDTO.TargetAddress && x.stationArea == int.Parse(WMSDTO.Area)); if(SourceAddress == null || TargetAddress == null) { return WebResponseContent.Instance.Error($"æªæ¾å°èµ·ç¹æç»ç¹ç«å°ä¿¡æ¯,èµ·ç¹:ã{WMSDTO.SourceAddress}ã,ç»ç¹:ã{WMSDTO.TargetAddress}ã"); } if (QueryConveyorLineTask(SourceAddress.stationName) != null) { return WebResponseContent.Instance.Error($"èµ·ç¹:ã{WMSDTO.SourceAddress}ãåå¨ä»»å¡"); ; } if (QueryConveyorLineTask(TargetAddress.stationName) != null) { return WebResponseContent.Instance.Error($"ç»ç¹:ã{WMSDTO.TargetAddress}ãåå¨ä»»å¡"); ; } Dt_Task taskDTO = new Dt_Task() { TaskNum = BaseDal.GetTaskNo().Result, Grade = 1, Roadway = SourceAddress.stationArea.ToString(), SourceAddress = SourceAddress.stationName, CurrentAddress = SourceAddress.stationName, TargetAddress = TargetAddress.stationName, NextAddress = TargetAddress.stationName, TaskState = (int)AGVTaskStatusEnum.AGVNew, TaskType = (int)AGVTaskTypeEnum.AGVCarry, AGVName = SourceAddress.stationArea switch { 1 => "AGV01", 4 => "AGV03", _ => "AGV02", } }; ReceiveWMSTask(new List<Dt_Task> { taskDTO }); return WebResponseContent.Instance.OK("任塿·»å æå"); } /// <summary> /// æ¥æ¾è¯¥ç«å°æ¯å¦æä»»å¡ /// </summary>