Пример #1
0
        public WorkOrderTrimmed GetWorkOrder(String at, int deviceId, int workOrderId)
        {
            new AuthSvc().AuthUser(at, -1, deviceId);
            BusinessLayer.WorkOrder       wo = BusinessLayer.WorkOrder.Populate(workOrderId);
            BusinessLayer.WorkApplication wa = BusinessLayer.WorkApplication.Populate(wo.ApplicationId);


            WorkOrderTrimmed wt = new WorkOrderTrimmed();

            wt.ApplicationId     = wo.ApplicationId;
            wt.CommPackageJson   = wo.CommPackageJson;
            wt.DeviceId          = wo.DeviceId;
            wt.ReceiveTime       = wo.ReceiveTime;
            wt.SlaveWorkerId     = wo.SlaveWorkerId;
            wt.SlaveWorkerSubmit = wo.SlaveWorkerSubmit;
            wt.SlaveWorkOrderLastCommunication = wo.SlaveWorkOrderLastCommunication;
            wt.WorkOrderId               = wo.WorkOrderId;
            wt.WorkOrderResultJson       = wo.WorkOrderResultJson;
            wt.WorkOrderStatus           = wo.WorkOrderStatus;
            wt.ComputeAppIntent          = wa.ApplicationWorkIntent;
            wt.ApplicationUIResultIntent = wa.ApplicationUIResultIntent;
            wt.DeviceLocalRequestId      = wo.LocalDeviceId;
            wt.SerialisationTime         = wo.SerialisationTime;
            wt.DeserialisationTime       = wo.DeserialiationTime;

            return(wt);
        }
Пример #2
0
        public WorkOrderTrimmed GetWorkOrder(String at, int deviceId, int workOrderId)
        {
            new AuthSvc().AuthUser(at, -1, deviceId);
            BusinessLayer.WorkOrder wo = BusinessLayer.WorkOrder.Populate(workOrderId);
            BusinessLayer.WorkApplication wa = BusinessLayer.WorkApplication.Populate(wo.ApplicationId);

            WorkOrderTrimmed wt = new WorkOrderTrimmed();
            wt.ApplicationId = wo.ApplicationId;
            wt.CommPackageJson = wo.CommPackageJson;
            wt.DeviceId = wo.DeviceId;
            wt.ReceiveTime = wo.ReceiveTime;
            wt.SlaveWorkerId = wo.SlaveWorkerId;
            wt.SlaveWorkerSubmit = wo.SlaveWorkerSubmit;
            wt.SlaveWorkOrderLastCommunication = wo.SlaveWorkOrderLastCommunication;
            wt.WorkOrderId = wo.WorkOrderId;
            wt.WorkOrderResultJson = wo.WorkOrderResultJson;
            wt.WorkOrderStatus = wo.WorkOrderStatus;
            wt.ComputeAppIntent = wa.ApplicationWorkIntent;
            wt.ApplicationUIResultIntent = wa.ApplicationUIResultIntent;
            wt.DeviceLocalRequestId = wo.LocalDeviceId;
            wt.SerialisationTime = wo.SerialisationTime;
            wt.DeserialisationTime = wo.DeserialiationTime;

            return wt;
        }