12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using DbCommon.BusinessCore.BaseCore;
- using DbCommon.Enties.DbModels;
- using Pms.DataLibrary.Models;
- using Pms.DataLibrary.Order;
- using Pms.Models;
- using ProjectManagementSystem.Common.Config;
- using ProjectManagementSystem.Common.Extenions;
- using ProjectManagementSystem.Common.Logger;
- using ProjectManagementSystem.Common.WebApi;
- using ProjectManagementSystem.Common.Models;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using ProjectManagementSystem.Common.Service;
- using ProjectManagementSystem.Common.Core;
- namespace ProjectManagementSystem.TaskBookEvent
- {
- public class TaskBookBehavior_63022 : BaseTaskBookBehaviorV2
- {
- public TaskBookBehavior_63022() : base(63022, "上报任务状态(任务开始)")
- {
- }
- public override bool TaskBookOperator(TaskData taskDetailInfo, StepData stepInfo)
- {
- try
- {
- var t = PmsTaskService.Instance.GetTaskState(taskDetailInfo.TaskID);
- if (t == null)
- {
- Log(taskDetailInfo, stepInfo, $"获取任务状态失败");
- return false;
- }
- t.currentPositionCode = taskDetailInfo.StepList.OrderBy(d => d.StepID).FirstOrDefault(d => !string.IsNullOrEmpty(d.WareHouseID)).WareHouseID;
- t.method = "start";
- bool result = CustomerApi.AgvCallback(t, out string content);
- Log(taskDetailInfo, stepInfo, $"{Remark}{result.ToChineseString()} {content}");
- return true;
- }
- catch (Exception ex)
- {
- LogException(ex);
- }
- return false;
- }
- }
- }
|