| | |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) |
| | | { |
| | | // 判断任务目标地址和路径是否满足特定条件 |
| | | if (((task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001") && task.Roadway.Contains("JZ"))|| task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm) |
| | | if (((task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001") && task.Roadway.Contains("JZ")) || task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm) |
| | | { |
| | | // 设置任务状态为出库新建 |
| | | task.TaskState = (int)TaskOutStatusEnum.OutNew; |
| | |
| | | /// <param name="deviceNo">设备编号</param> |
| | | /// <param name="currentAddress">当前地址</param> |
| | | /// <returns></returns> |
| | | public Dt_Task QueryConveyorLineTask(string deviceNo, string currentAddress,string Barcode) |
| | | public Dt_Task QueryConveyorLineTask(string deviceNo, string currentAddress, string Barcode) |
| | | { |
| | | return BaseDal.QueryFirst(x => ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.SC_OutFinish)) && x.CurrentAddress == currentAddress && x.PalletCode == Barcode, TaskOrderBy); |
| | | } |
| | |
| | | /// 根据任务号、下一地址查询输送线执行中的任务 |
| | | /// </summary> |
| | | /// <param name="taskNum">任务号</param> |
| | | /// <param name="Barcode">下一地址</param> |
| | | /// <param name="currentAddress">下一地址</param> |
| | | /// <returns></returns> |
| | | public Dt_Task QueryExecutingCurrentConveyorLineTask(int taskNum, string Barcode, string currentAddress) |
| | | { |
| | | return BaseDal.QueryFirst(x => x.TaskNum == taskNum && x.PalletCode == Barcode && x.CurrentAddress == currentAddress && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting), TaskOrderBy); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据任务号、下一地址查询输送线执行中的任务 |
| | | /// </summary> |
| | | /// <param name="taskNum">任务号</param> |
| | | /// <param name="nextAddress">下一地址</param> |
| | | /// <returns></returns> |
| | | public Dt_Task QueryExecutingConveyorLineTask(int taskNum, string nextAddress,string Barcode) |
| | | public Dt_Task QueryExecutingConveyorLineTask(int taskNum, string nextAddress, string Barcode) |
| | | { |
| | | return BaseDal.QueryFirst(x => x.TaskNum == taskNum && x.NextAddress == nextAddress && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting), TaskOrderBy); |
| | | } |
| | |
| | | /// <returns></returns> |
| | | public Dt_Task QueryExecutingConveyorLineTask(string nextAddress, string Barcode) |
| | | { |
| | | return BaseDal.QueryFirst(x => (x.NextAddress == nextAddress||x.TargetAddress==nextAddress) && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting), TaskOrderBy); |
| | | return BaseDal.QueryFirst(x => (x.NextAddress == nextAddress || x.TargetAddress == nextAddress) && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting), TaskOrderBy); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | task.ModifyDate = DateTime.Now; |
| | | task.Modifier = "System"; |
| | | |
| | | |
| | | |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"系统自动流程,更新当前位置【{oldCurrentPos} ----> {task.CurrentAddress}】和下一位置【{oldNextPos} ----> {task.NextAddress}】"); |
| | | return task; |
| | |
| | | var result = HttpHelper.GetAsync(wmsIpAddress, keys).Result; |
| | | |
| | | QuartzLogger.WriteLogToFile($"Info_任务完成", $"任务完成,任务号:【{taskNum}】返回参数【{JsonConvert.SerializeObject(result)}】{Environment.NewLine}{Environment.NewLine}"); |
| | | if(result != null) |
| | | if (result != null) |
| | | { |
| | | |
| | | content = JsonConvert.DeserializeObject<WebResponseContent>(result); |