示例#1
0
 public QualityProblemService(
     IAuthInfoProvider authInfoProvider,
     IAppRepositoryBase <QualityProblem> problemRepository,
     IAppRepositoryBase <QualityProblemRectification> rectificationRepository,
     // IAppRepositoryBase<Project> projectRepository,
     IAppDbContextProvider dbContextProvider,
     IDbOperator op,
     IEventBus eventBus,
     IWfEngine wfEngine,
     IProjectHelper projectHelper
     )
 {
     _projectHelper           = projectHelper;
     _authInfoProvider        = authInfoProvider;
     _problemRepository       = problemRepository;
     _rectificationRepository = rectificationRepository;
     //_projectRepository = projectRepository;
     _dbContextProvider = dbContextProvider;
     _eventBus          = eventBus;
     _op = op;
     _runtimeProvider   = wfEngine.GetRuntimeProvider();
     _taskProvider      = wfEngine.GetTaskProvider();
     _definitionProvder = wfEngine.GetDefinitionProvider();
     _historyProvider   = wfEngine.GetHistoryProvider();
 }
示例#2
0
 public QualityAccidentService(
     IAuthInfoProvider authInfoProvider,
     IAppRepositoryBase <QualityAccident> accidentRepository,
     IAppRepositoryBase <QualityAccidentDisposal> disposalRepository,
     //  IAppRepositoryBase<Project> projectRepository,
     IAppDbContextProvider dbContextProvider,
     IDbOperator op,
     IEventBus eventBus,
     IWfEngine wfEngine,
     IProjectHelper projectHelper
     )
 {
     _projectHelper      = projectHelper;
     _authInfoProvider   = authInfoProvider;
     _accidentRepository = accidentRepository;
     _disposalRepository = disposalRepository;
     // _projectRepository = projectRepository;
     _dbContextProvider = dbContextProvider;
     _eventBus          = eventBus;
     _op = op;
     _runtimeProvider   = wfEngine.GetRuntimeProvider();
     _taskProvider      = wfEngine.GetTaskProvider();
     _definitionProvder = wfEngine.GetDefinitionProvider();
     _historyProvider   = wfEngine.GetHistoryProvider();
 }
示例#3
0
 public ProjectService(
     IAppRepositoryBase <Project> projectRepository,
     IAppRepositoryBase <ProjectUnit> projectUnitRepository,
     IAuthInfoProvider authInfoProvider,
     IWfEngine wfEngine,
     IAuthorizationRepositoryBase <User> userRepository,
     IAuthorizationRepositoryBase <UserUnit> userUnitRepository,
     IAppDbContextProvider dbContextProvider,
     IMessagingProvider messagingProvider,
     IProjectHelper projectHelper
     )
 {
     _projectHelper         = projectHelper;
     _messagingProvider     = messagingProvider;
     _authInfoProvider      = authInfoProvider;
     _userRepository        = userRepository;
     _userUnitRepository    = userUnitRepository;
     _runtimeProvider       = wfEngine.GetRuntimeProvider();
     _taskProvider          = wfEngine.GetTaskProvider();
     _definitionProvder     = wfEngine.GetDefinitionProvider();
     _historyProvider       = wfEngine.GetHistoryProvider();
     _dbContextProvider     = dbContextProvider;
     _projectRepository     = projectRepository;
     _projectUnitRepository = projectUnitRepository;
 }
示例#4
0
        public string GetSuperiorUserList(ProcessInstance processInstance, string nodeUid)
        {
            var task = _wfEngine.GetHistoryProvider().GetTaskHistory(u => u.ProcessInstanceId == processInstance.Id && u.NodeUid == nodeUid).FirstOrDefault();

            if (task == null)
            {
                throw new AppCoreException($"找不到ProcessInstanceId为{processInstance.Id}, nodeUid为{nodeUid}的历史任务");
            }
            if (task.AssigneeList.Count == 0)
            {
                throw new EntityPropertyException("NodeUid", nodeUid, "Wf_Hi_TaskInstance", "Assignee", "不存在");
            }
            var assignee = Convert.ToInt32(task.AssigneeList[0]);
            var user     = _userService.Get(assignee);

            if (user == null)
            {
                throw new EntityException("id", assignee, "User", "不存在");
            }
            if (user.SuperiorId == null)
            {
                throw new EntityPropertyException("name", user.Name, "User", "SuperiorId", "不存在");
            }
            return(user.SuperiorId.ToString());
        }
示例#5
0
 public TaskService(
     IWfEngine wfEgine,
     IAuthInfoProvider authInfoProvider)
 {
     _taskProvider     = wfEgine.GetTaskProvider();
     _historyProvider  = wfEgine.GetHistoryProvider();
     _authInfoProvider = authInfoProvider;
 }
示例#6
0
 public ContractPaymentService(
     IAuthInfoProvider authInfoProvider,
     IAppRepositoryBase <ContractPayment> contractPaymentRepository,
     IAppDbContextProvider dbContextProvider,
     IWfEngine wfEngine
     )
 {
     _authInfoProvider          = authInfoProvider;
     _contractPaymentRepository = contractPaymentRepository;
     _dbContextProvider         = dbContextProvider;
     _runtimeProvider           = wfEngine.GetRuntimeProvider();
     _taskProvider      = wfEngine.GetTaskProvider();
     _definitionProvder = wfEngine.GetDefinitionProvider();
     _historyProvider   = wfEngine.GetHistoryProvider();
 }
示例#7
0
 public EarlyStageService(
     IAuthInfoProvider authInfoProvider,
     IAppRepositoryBase <EarlyStage> earlyStageRepository,
     IAppDbContextProvider dbContextProvider,
     IEventBus eventBus,
     IWfEngine wfEngine
     )
 {
     _authInfoProvider     = authInfoProvider;
     _earlyStageRepository = earlyStageRepository;
     _dbContextProvider    = dbContextProvider;
     _eventBus             = eventBus;
     _runtimeProvider      = wfEngine.GetRuntimeProvider();
     _taskProvider         = wfEngine.GetTaskProvider();
     _definitionProvder    = wfEngine.GetDefinitionProvider();
     _historyProvider      = wfEngine.GetHistoryProvider();
 }
示例#8
0
 public RecordService(
     IAppRepositoryBase <Record> recordRepository,
     IAuthInfoProvider authInfoProvider,
     IWfEngine wfEngine,
     IAuthorizationRepositoryBase <User> userRepository,
     IAppDbContextProvider dbContextProvider,
     IMessagingProvider messagingProvider)
 {
     _recordRepository  = recordRepository;
     _messagingProvider = messagingProvider;
     _authInfoProvider  = authInfoProvider;
     _userRepository    = userRepository;
     _runtimeProvider   = wfEngine.GetRuntimeProvider();
     _taskProvider      = wfEngine.GetTaskProvider();
     _definitionProvder = wfEngine.GetDefinitionProvider();
     _historyProvider   = wfEngine.GetHistoryProvider();
     _dbContextProvider = dbContextProvider;
 }
示例#9
0
        public MemorabiliaRecordService(
            IAuthInfoProvider authInfoProvider,
            IWfEngine wfEngine,
            IAppRepositoryBase <MemorabiliaRecord> recordRepository,
            //IAppRepositoryBase<Project> projectRepository,
            IAppDbContextProvider dbContextProvider,
            IProjectHelper projectHelper


            )
        {
            _projectHelper    = projectHelper;
            _authInfoProvider = authInfoProvider;
            _recordRepository = recordRepository;
            // _projectRepository = projectRepository;
            _dbContextProvider = dbContextProvider;
            _runtimeProvider   = wfEngine.GetRuntimeProvider();
            _taskProvider      = wfEngine.GetTaskProvider();
            _definitionProvder = wfEngine.GetDefinitionProvider();
            _historyProvider   = wfEngine.GetHistoryProvider();
        }
示例#10
0
 public ProjectTaskService(
     IAppRepositoryBase <ProjectTask> taskRepository,
     IAppRepositoryBase <ProjectGantt> ganttRepository,
     IAuthInfoProvider authInfoProvider,
     IWfEngine wfEngine,
     IAuthorizationRepositoryBase <User> userRepository,
     IAppDbContextProvider dbContextProvider,
     IProjectHelper projectHelper
     )
 {
     _ganttRepository       = ganttRepository;
     _projectHelper         = projectHelper;
     _authInfoProvider      = authInfoProvider;
     _userRepository        = userRepository;
     _runtimeProvider       = wfEngine.GetRuntimeProvider();
     _taskProvider          = wfEngine.GetTaskProvider();
     _definitionProvder     = wfEngine.GetDefinitionProvider();
     _historyProvider       = wfEngine.GetHistoryProvider();
     _dbContextProvider     = dbContextProvider;
     _projectTaskRepository = taskRepository;
 }