예제 #1
0
        public override JobExecuteState ExecuteCustomImp(string strJobKey)
        {
            JobExecuteState jobExecuteState1 = new JobExecuteState();
            DTOResponse     dtoResponse1     = new DTOResponse();
            DCSInfService   dcsInfService    = new DCSInfService();
            string          str1             = "AcceptWcsUpdateInfEquitmentStaus";
            DTOResponse     dtoResponse2     = SysParamsService.CheckPrarams(new SysParamsReuqest()
            {
                ParamsName = str1
            });
            bool isSuccess;

            if (dtoResponse2.IsSuccess)
            {
                SysParams resultObject = dtoResponse2.ResultObject as SysParams;
                if (resultObject == null)
                {
                    jobExecuteState1.MessageText = "系统参数为空";
                    return(jobExecuteState1);
                }
                if (resultObject.PARAVALUE == "TRUE")
                {
                    DTOResponse     dtoResponse3     = dcsInfService.UpdateEquipmentStatus();
                    JobExecuteState jobExecuteState2 = jobExecuteState1;
                    isSuccess = dtoResponse3.IsSuccess;
                    string str2 = isSuccess.ToString();
                    jobExecuteState2.ReturnValue = str2;
                    jobExecuteState1.MessageCode = dtoResponse3.MessageCode;
                    jobExecuteState1.MessageText = dtoResponse3.MessageText;
                }
            }
            string      str3         = "UpdateKanbanFormInfEquitmentStaus";
            DTOResponse dtoResponse4 = SysParamsService.CheckPrarams(new SysParamsReuqest()
            {
                ParamsName = str3
            });

            if (dtoResponse4.IsSuccess)
            {
                SysParams resultObject = dtoResponse4.ResultObject as SysParams;
                if (resultObject == null)
                {
                    jobExecuteState1.MessageText = "系统参数为空";
                    return(jobExecuteState1);
                }
                if (resultObject.PARAVALUE == "TRUE")
                {
                    DTOResponse     dtoResponse3     = dcsInfService.UpdateKanbanFormEquipmentStatus();
                    JobExecuteState jobExecuteState2 = jobExecuteState1;
                    isSuccess = dtoResponse3.IsSuccess;
                    string str2 = isSuccess.ToString();
                    jobExecuteState2.ReturnValue = str2;
                    jobExecuteState1.MessageCode = dtoResponse3.MessageCode;
                    jobExecuteState1.MessageText = dtoResponse3.MessageText;
                }
            }
            return(jobExecuteState1);
        }
예제 #2
0
        public override JobExecuteState ExecuteCustomImp(string strJobKey)
        {
            JobExecuteState jobExecuteState = new JobExecuteState();
            DTOResponse     dtoResponse     = new DCSInfService().EquipmentRequestHandle();

            jobExecuteState.ReturnValue = dtoResponse.IsSuccess.ToString();
            jobExecuteState.MessageCode = dtoResponse.MessageCode;
            jobExecuteState.MessageText = dtoResponse.MessageText;
            return(jobExecuteState);
        }
예제 #3
0
 /// <summary>
 /// 继续执行任务
 /// </summary>
 /// <param name="parentId">上级任务ID</param>
 /// <param name="methodCall">执行方法</param>
 /// <param name="options">配置</param>
 /// <returns>当前任务ID</returns>
 public static string ContinueWith(string parentId, Expression <Action> methodCall, JobExecuteState options)
 {
     return(BackgroundJob.ContinueWith(parentId, methodCall, options: (JobContinuationOptions)options));
 }
예제 #4
0
 /// <summary>
 /// 继续执行任务
 /// </summary>
 /// <param name="parentId">上级任务ID</param>
 /// <param name="methodCall">执行方法</param>
 /// <param name="options">配置</param>
 /// <returns>当前任务ID</returns>
 public static string ContinueWith(string parentId, Expression <Func <Task> > methodCall, JobExecuteState options = JobExecuteState.OnlyOnSucceededState)
 {
     return(BackgroundJob.ContinueWith(parentId, methodCall, options: (JobContinuationOptions)options));
 }