123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986 |
- using AIPlatform.Protocol.Entities;
- using AIPlatform.Protocol.Entities.Ventilator;
- using AIPlatform.Protocol.Model;
- using System;
- using System.Collections.Generic;
- using System.Threading.Tasks;
- namespace AIPlatform.Protocol.Services
- {
- public interface IAdminService
- {
- /// <summary>
- /// Login the system with admin name and password.
- /// </summary>
- /// <param name="name">The name of the admin</param>
- /// <param name="password">The password of the admin</param>
- /// <returns>The login result</returns>
- Task<AdminLoginResult> LoginAsync(string name, string password);
- /// <summary>
- /// SeniorLabeler login to the system to check the labeler statistics
- /// </summary>
- /// <param name="name">The name of the senior labeler</param>
- /// <param name="password">The password of the senior labeler</param>
- /// <returns>The login result.</returns>
- Task<LabelerLoginResult> SeniorLabelerLoginAsync(string name, string password);
- /// <summary>
- /// Logoff from system.
- /// </summary>
- /// <param name="sessionId">The session id.</param>
- /// <returns></returns>
- Task LogOff(long sessionId);
- #region organization management
- /// <summary>
- /// Get all organizations from system
- /// </summary>
- /// <param name="sessionId">The session of current admin</param>
- /// <returns>The loaded organizations.</returns>
- Task<List<Organization>> GetOrganizationsAsync(long sessionId);
- /// <summary>
- /// Get all organizations from system
- /// </summary>
- /// <param name="pageIndex">The index of page.</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <param name="keyword">The searched key word.</param>
- /// <returns>The loaded organizations.</returns>
- Task<List<Organization>> GetOrganizationsAsync(long sessionId, int pageIndex, int pageSize, string keyword);
- /// <summary>
- /// Get total organization count.
- /// </summary>
- /// <param name="keyword">The searched key word.</param>
- /// <returns>The organization count.</returns>
- Task<int> GetOrganizationCountAsync(long sessionId, string keyword);
- /// <summary>
- /// Create an organization
- /// </summary>
- /// <param name="name">The name of the organization.</param>
- /// <param name="description">The description of the organization.</param>
- /// <returns></returns>
- Task<Organization> CreateOrganizationAsync(long sessionId, string name, string description, List<AuthorityBase> authorities, List<SupportedDataType> supportedDataTypes);
- /// <summary>
- /// Delete an organization from the system.
- /// </summary>
- /// <returns>Void</returns>
- Task DeleteOrganizationAsync(long sessionId, long id);
- /// <summary>
- /// Check whether there are children in the organization.
- /// </summary>
- /// <param name="id">The id of organization.</param>
- /// <returns>The loaded organizations.</returns>
- Task<bool> ExistOrganizationChildrenAsync(long sessionId, long id);
- /// <summary>
- /// 检查组织下是否已绑定用户
- /// </summary>
- /// <param name="organizationId"></param>
- /// <returns></returns>
- Task<bool> ExistAccountByOrganizationAsync(long sessionId, long organizationId);
- /// <summary>
- /// Update one organization.
- /// </summary>
- /// <param name="id">The id of organization.</param>
- /// <param name="description">The description of the organization.</param>
- /// <returns>Void</returns>
- Task UpdateOrganizationAsync(long sessionId, long id, string description, List<AuthorityBase> authorities, List<SupportedDataType> supportedDataTypes);
- #endregion organization management
- #region 机构管理
- /// <summary>
- /// Get the Institution from system
- /// </summary>
- /// <returns>The loaded Institution.</returns>
- Task<Institution> GetInstitutionAsync(long sessionId, long id);
- /// <summary>
- /// Get the Institutions by organizationId
- /// </summary>
- /// <returns>The loaded Institutions.</returns>
- Task<List<Institution>> GetInstitutionsByOrganizationIdAsync(long sessionId, long organizationId);
- /// <summary>
- /// Get all Institutions from system
- /// </summary>
- /// <param name="pageIndex">The index of page.</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <param name="keyword">The searched key word.</param>
- /// <returns>The loaded Institutions.</returns>
- Task<List<Institution>> GetInstitutionsAsync(long sessionId, int pageIndex, int pageSize, string keyword);
- /// <summary>
- /// Get total Institution count.
- /// </summary>
- /// <param name="keyword">The searched key word.</param>
- /// <returns>The Institution count.</returns>
- Task<int> GetInstitutionCountAsync(long sessionId, string keyword);
- /// <summary>
- /// Create the Institution
- /// </summary>
- /// <param name="name">The name of the Institution.</param>
- /// <param name="description">The description of the Institution.</param>
- /// <returns></returns>
- Task<Institution> CreateInstitutionAsync(long sessionId, string name, string description, List<EntityBase> organizations, InstitutionType type, bool isPaid);
- /// <summary>
- /// Delete the Institution from the system.
- /// </summary>
- /// <returns>Void</returns>
- Task DeleteInstitutionAsync(long sessionId, long id);
- /// <summary>
- /// Update the Institution.
- /// </summary>
- /// <param name="id">The id of Institution.</param>
- /// <param name="description">The description of the Institution.</param>
- /// <returns>Void</returns>
- Task UpdateInstitutionAsync(long sessionId, long id, string description, List<EntityBase> organizations, InstitutionType type, bool isPaid);
- /// <summary>
- /// 检查机构下是否已绑定用户
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="institutionId"></param>
- /// <returns></returns>
- /// <exception cref="InvalidOperationException"></exception>
- Task<bool> ExistAccountByInstitutionIdAsync(long sessionId, long institutionId);
- #endregion 机构管理
- #region admin management
- /// <summary>
- /// Get all system admins.
- /// </summary>
- /// <param name="sessionId">The session of current admin</param>
- /// <returns>The loaded admins</returns>
- Task<List<Account>> GetAccountsAsync(long sessionId, Role role);
- /// <summary>
- /// Get all admins from system
- /// </summary>
- /// <param name="sessionId">The session of current admin</param>
- /// <param name="pageIndex">The index of page.</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <param name="keyword">The searched key word.</param>
- /// <returns>The loaded admins</returns>
- Task<List<Account>> GetAccountsAsync(long sessionId, int pageIndex, int pageSize, string keyword, long organizationId, long institutionId, Role role);
- /// <summary>
- /// Get total admin count.
- /// </summary>
- /// <param name="keyword">The searched key word.</param>
- /// <returns>The admin count.</returns>
- Task<int> GetAccountCountAsync(long sessionId, string keyword, long organizationId, long institutionId, Role role);
- /// <summary>
- /// Create a admin in system.
- /// </summary>
- /// <param name="sessionId">The session of current admin</param>
- /// <param name="name">The name of the admin</param>
- /// <param name="fullName">The full name of the admin</param>
- /// <param name="password">The password of the admin</param>
- /// <returns>The created admin</returns>
- Task<Account> CreateAccountAsync(long sessionId, string name, string fullName, string password, List<EntityBase> organizations, List<Role> roles, List<AuthorityBase> authorities,
- DeveloperAuthorityInfo developerAuthorityInfo, LabelerAuthorityInfo labelerAuthorityInfo, int handyToolExportDelay, long institutionId);
- /// <summary>
- /// Update one admin.
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="id"></param>
- /// <returns>Void</returns>
- Task UpdateAccountAsync(long sessionId, long id, string fullName, List<EntityBase> organizations, List<Role> roles, List<AuthorityBase> authorities,
- DeveloperAuthorityInfo developerAuthorityInfo, LabelerAuthorityInfo labelerAuthorityInfo, int handyToolExportDelay, long institutionId);
- /// <summary>
- /// Update a admin password.
- /// </summary>
- /// <param name="sessionId">The session id of current admin.</param>
- /// <param name="id">The admin id of the admin to operated.</param>
- /// <param name="password">The password of the admin.</param>
- /// <returns>Void</returns>
- Task UpdateAccountPasswordAsync(long sessionId, long id, string password);
- /// <summary>
- /// Delete one admin from the system.
- /// </summary>
- /// <param name="sessionId">The session id of current admin.</param>
- /// <param name="adminId">The admin id of the admin to process</param>
- /// <returns>Void</returns>
- Task DeleteAccountAsync(long sessionId, long adminId);
- /// <summary>
- /// Get the admin by admin id.
- /// </summary>
- /// <param name="adminId">The id of the admin</param>
- /// <returns>The admin</returns>
- Task<Account> GetAccountAsync(long sessionId, long adminId);
- #endregion admin management
- #region developer management
- /// <summary>
- /// Get total developer count.
- /// </summary>
- /// <param name="keyword">The searched key word</param>
- /// <param name="sessionId">The session id of the admin</param>
- /// <returns>The developer count.</returns>
- Task<int> GetDeveloperCountAsync(long sessionId, string keyword);
- /// <summary>
- /// Get all developers from system
- /// </summary>
- /// <returns>The loaded developers.</returns>
- Task<List<DeveloperAccount>> GetDevelopersAsync(long sessionId);
- /// <summary>
- /// Get all developers from the system.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="pageIndex">The page index of result.</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <returns>The developers in the system</returns>
- Task<List<DeveloperAccount>> GetDevelopersAsync(long sessionId, int pageIndex, int pageSize);
- /// <summary>
- /// Find a developer by search key.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="key">The search key.</param>
- /// <param name="pageIndex">The page index of result.</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <returns>The found developers.</returns>
- Task<List<DeveloperAccount>> FindDevelopersAsync(long sessionId, string key, int pageIndex, int pageSize);
- /// <summary>
- /// Create a developer in system.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="name">The name of the developer.</param>
- /// <param name="fullName">The full name of the developer.</param>
- /// <param name="password">The password of the developer.</param>
- /// <returns>The created developer.</returns>
- Task<DeveloperAccount> CreateDeveloperAsync(long sessionId, string name, string fullName, string password, DateTime expireTime, List<EntityBase> organizations);
- /// <summary>
- /// Update one developer account.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <param name="id">The id of developer to handle.</param>
- /// <param name="fullName">The full name of the developer.</param>
- /// <param name="expireTime">The token expire time.</param>
- /// <returns>Void</returns>
- Task UpdateDeveloperAsync(long sessionId, long id, string fullName, DateTime expireTime, List<EntityBase> organizations);
- /// <summary>
- /// Update one developer password.
- /// </summary>
- /// <param name="id">The id of developer to handle.</param>
- /// <param name="password">The password of the developer.</param>
- /// <returns>Void</returns>
- Task UpdateDeveloperPasswordAsync(long sessionId, long id, string password);
- /// <summary>
- /// Delete one developer from the system.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <param name="developerId">The developer id of the developer to process</param>
- /// <returns>Void</returns>
- Task DeleteDeveloperAsync(long sessionId, long developerId);
- /// <summary>
- /// Create a token for a developer.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <param name="developerId">The developer id of the developer to process</param>
- /// <param name="expireTime">The expired time for the token.</param>
- /// <returns>The created token.</returns>
- Task<string> CreateTokenAsync(long sessionId, long developerId, DateTime expireTime);
- /// <summary>
- /// Delete work token.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="developerId">The id of the developer.</param>
- /// <returns></returns>
- Task DeleteWorkTokenAsync(long sessionId, long developerId);
- #endregion developer management
- #region labeler management
- /// <summary>
- /// Get total labeler count.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="keyword">The searched keyword.</param>
- /// <param name="start">The start time.</param>
- /// <param name="end">The end time.</param>
- /// <returns>The labeler count.</returns>
- Task<int> GetLabelerCountAsync(long sessionId, string keyword, DateTime start, DateTime end);
- /// <summary>
- /// Get SameBatchLabelCase count.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="keyword">The searched keyword.</param>
- /// <param name="start">The start time.</param>
- /// <param name="end">The end time.</param>
- /// <returns>The SameBatchLabelCase count</returns>
- Task<int> GetSameBatchLabelCaseCountAsync(long sessionId, long organizationId, long imageCategoryId, string keyword, DateTime start, DateTime end, DateTime updateStart, DateTime updateEnd);
- /// <summary>
- /// Get labeler by labeler id.
- /// </summary>
- /// <param name="labelerId">The id of the labeler.</param>
- /// <returns>The found labeler.</returns>
- Task<LabelerAccount> GetLabelerAsync(long sessionId, long labelerId);
- /// <summary>
- /// Get all labelers.
- /// </summary>
- /// <returns>LabelerAccounts from the system.</returns>
- Task<List<LabelerAccount>> GetLabelersAsync(long sessionId);
- /// <summary>
- /// Get senior labelers from the system.
- /// </summary>
- Task<List<LabelerAccount>> GetSeniorLabelersAsync(long sessionId);
- /// <summary>
- /// Find a labeler by search key.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="key">The search key.</param>
- /// <param name="pageIndex">The page index of result.</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <returns>The found labelers.</returns>
- Task<List<LabelerAccount>> GetLabelersAsync(long sessionId, string key, int pageIndex, int pageSize);
- /// <summary>
- /// Find a labeler by search key.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="key">The search key.</param>
- /// <param name="pageIndex">The page index of result.</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <param name="start">The start time.</param>
- /// <param name="end">The end time.</param>
- /// <returns>The found labelers.</returns>
- Task<List<LabelerAccount>> GetLabelersAsync(long sessionId, string key, int pageIndex, int pageSize, DateTime start, DateTime end);
- /// <summary>
- /// Create a labeler in system.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="name">The name of the labeler.</param>
- /// <param name="fullName">The full name of the labeler.</param>
- /// <param name="password">The password of the labeler.</param>
- /// <param name="comeFrom">Where the labeler come from</param>
- /// <param name="qualification">The qualification of the labeler</param>
- /// <param name="seniorLabeler">The teacher of the labeler</param>
- /// <param name="organizations">The organizations of the labeler</param>
- /// <returns>The created labeler.</returns>
- Task<LabelerAccount> CreateLabelerAsync(long sessionId, string name, string fullName, string password, string comeFrom, string qualification, bool isRemote, EntityBase seniorLabeler, List<EntityBase> organizations);
- /// <summary>
- /// Update a labeler
- /// </summary>
- /// <param name="id">The id of the labeler</param>
- /// <param name="fullName">The full name of the labeler</param>
- /// <param name="comeFrom">where the labeler come from</param>
- /// <param name="qualification">The qualification of the labeler</param>
- /// <param name="seniorLabeler">The teacher of the labeler</param>
- /// <param name="organizations">The organizations of the labeler</param>
- /// <returns></returns>
- Task UpdateLabelerAsync(long sessionId, long id, string fullName, string comeFrom, string qualification, bool isRemote, EntityBase seniorLabeler, List<EntityBase> organizations);
- /// <summary>
- /// Update a labeler password.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <param name="labelerId">The labeler id of the labeler to operated.</param>
- /// <param name="password">The password of the labeler.</param>
- /// <returns>Void</returns>
- Task UpdateLabelerPasswordAsync(long sessionId, long labelerId, string password);
- /// <summary>
- /// Delete one labeler from the system.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <param name="labelerId">The labeler id of the labeler to process</param>
- /// <returns>Void</returns>
- Task DeleteLabelerAsync(long sessionId, long labelerId);
- /// <summary>
- /// Get all the SameBatchLabelCase.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <param name="pageIndex">The index of page.</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <param name="keyword">The searched keyword.</param>
- /// <param name="start">The start time.</param>
- /// <param name="end">The end time.</param>
- /// <returns>The loaded SameBatchLabelCase.</returns>
- Task<List<SameBatchLabelCase>> GetSameBatchLabelCasesAsync(long sessionId, int pageIndex, int pageSize, long organizationId, long imageCategoryId, string keyword, DateTime start, DateTime end, DateTime updateStart, DateTime updateEnd);
- /// <summary>
- /// Get all the SameBatchLabelCase.
- /// <param name="sessionId">The session id of the admin.</param>
- /// </summary>
- /// <returns>The loaded SameBatchLabelCase.</returns>
- Task<List<SameBatchLabelCase>> GetSameBatchLabelCasesAsync(long sessionId);
- /// <summary>
- /// Get the SameBatchLabelCases.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="id">The same batch label case id.</param>
- /// <returns>The loaded SameBatchLabelCase.</returns>
- Task<SameBatchLabelCase> GetSameBatchLabelCaseAsync(long sessionId, long id);
- /// <summary>
- /// Get SameBatchLabelCase statistics by case id..
- /// </summary>
- /// <param name="sessionId">The admin session id.</param>
- /// <param name="caseId">The id of the SameBatchLabelCase.</param>
- /// <returns>The SameBatchLabelCase general statistics.</returns>
- Task<SameBatchLabelCaseStatisticData> GetSameBatchLabelCaseStatisticsAsync(long sessionId, long caseId);
- /// <summary>
- /// Get labeler statistics by case id..
- /// </summary>
- /// <param name="sessionId">The admin session id.</param>
- /// <param name="caseId">The id of the label case.</param>
- /// <returns>The labeler statistics.</returns>
- Task<LabelCaseStatistic> GetLabelCaseStatisticAsync(long sessionId, long caseId);
- /// <summary>
- /// Get labeler case statistics by the same batch label case id
- /// </summary>
- /// <param name="sessionId">The admin session id.</param>
- /// <param name="sameBatchLabelCaseId">The same batch label case id</param>
- /// <returns></returns>
- Task<List<LabelCaseStatistic>> GetLabelCaseStatisticsBySameBatchLabelCaseIdAsync(long sessionId, long sameBatchLabelCaseId);
- #endregion labeler management
- #region agent management
- /// <summary>
- /// Register a agent into the system.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <param name="agentVersion">The version of the agent</param>
- /// <param name="agentName">The name of the agent.</param>
- /// <param name="description">The description of the agent.</param>
- /// <param name="hardwareCode">The hardware code of the agent.</param>
- /// <param name="ipAddress">The ip address of the agent.</param>
- /// <returns>Void</returns>
- Task RegisterAgentAsync(long sessionId, string agentVersion, string agentName, string description, string hardwareCode, string ipAddress, List<EntityBase> organizations);
- /// <summary>
- /// Un-register an agent from the system.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <param name="agentId">The agent id to un-register</param>
- /// <returns>Void</returns>
- Task UnRegisterAgentAsync(long sessionId, long agentId);
- /// <summary>
- /// Update agent organizations from the system.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <param name="agentId">The agent id</param>
- /// <param name="organizations">The organizations to update</param>
- /// <returns>Void</returns>
- Task UpdateAgentOrganizationsAsync(long sessionId, long agentId, List<EntityBase> organizations);
- /// <summary>
- /// Get all agents from the system.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <returns>The agents in the system</returns>
- Task<List<AgentInfoEx>> GetAgentsAsync(long sessionId);
- /// <summary>
- /// Get the agents count from the system.
- /// </summary>
- /// <returns>Void</returns>
- Task<int> GetAgentsCountAsync(long sessionId);
- #endregion agent management
- #region image management
- /// <summary>
- /// Get ultrasound groups count by image category id.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id.</param>
- /// <returns>Total group count</returns>
- Task<int> GetUltrasoundGroupCountAsync(long sessionId, long imageCategoryId, string keyword);
- /// <summary>
- /// Get labeled group count.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="imageCategoryId">The image category id to handle.</param>
- /// <returns>The group count.</returns>
- Task<int> GetLabeledGroupCountAsync(long sessionId, long imageCategoryId, string keyword);
- /// <summary>
- /// Get un-labeled group count.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="imageCategoryId">The image category id to handle.</param>
- /// <returns>The group count.</returns>
- Task<int> GetUnLabeledGroupCountAsync(long sessionId, long imageCategoryId, string keyword);
- /// <summary>
- /// Get gold standard groups count by image category id.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id.</param>
- /// <returns>Total group count</returns>
- Task<int> GetGoldStandardGroupCountAsync(long sessionId, long imageCategoryId, string keyword);
- /// <summary>
- /// Get labeled group count.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="imageCategoryId">The image category id to handle.</param>
- /// <returns>The group count.</returns>
- Task<int> GetLabeledFileCountAsync(long sessionId, long imageCategoryId, string keyword);
- /// <summary>
- /// Get un-labeled file count.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="imageCategoryId">The image category id to handle.</param>
- /// <returns>The image count.</returns>
- Task<int> GetUnLabeledFileCountAsync(long sessionId, long imageCategoryId, string keyword);
- /// <summary>
- /// Add un-labeled file into the system.
- /// </summary>
- /// <param name="sessionId">The sessionId of the admin</param>
- /// <param name="imageCategoryId">The image category id</param>
- /// <param name="imageBatchId">The image batch id</param>
- /// <returns>Void</returns>
- Task<OpResult> AddUnLabeledFileAsync(long sessionId, long organinzationId, long imageCategoryId, long imageBatchId, UploadFileModel file);
- /// <summary>
- /// 分段上传视频
- /// </summary>
- /// <param name="fileId"></param>
- /// <param name="fileName"></param>
- /// <param name="fileBytes"></param>
- /// <returns></returns>
- Task<OpResult> UploadVideoBatchSizeAsync(string fileId, string fileName, byte[] fileBytes);
- /// <summary>
- /// Get ultrasound images count by on combined tag id.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id of images</param>
- /// <returns>Total image count</returns>
- Task<int> GetUltrasoundFileCountAsync(long sessionId, long imageCategoryId, string keyword);
- /// <summary>
- /// Get gold standard images count by on combined tag id.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id of images</param>
- /// <returns>Total image count</returns>
- Task<int> GetGoldStandardFileCountAsync(long sessionId, long imageCategoryId, string keyword);
- /// <summary>
- /// Get un-gold standard images count by on combined tag id.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id of images</param>
- /// <returns>Total image count</returns>
- Task<int> GetUnGoldStandardFileCountAsync(long sessionId, long imageCategoryId, string keyword);
- /// <summary>
- /// Get Dispute labeled file count.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="imageCategoryId">The image category id to handle.</param>
- /// <returns>The image count.</returns>
- Task<int> GetDisputeLabeledFileCountAsync(long sessionId, long imageCategoryId, string keyword, bool isAssign, string keyWordLabele);
- /// <summary>
- /// Get files by ultrasoundGroupId
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The id of image category.</param>
- /// <param name="ultrasoundGroupId">The id of ultrasound group.</param>
- /// <returns>The loaded files.</returns>
- Task<List<PreviewFileModel>> GetUltrasoundFilesByGroupIdAsync(long sessionId, long imageCategoryId, long ultrasoundGroupId);
- /// <summary>
- /// Get ultrasound images by on image category id.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id of images</param>
- /// <param name="pageIndex">The page index</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <returns>found ultrasound images</returns>
- Task<List<PreviewFileModel>> GetUltrasoundFilesInGroupAsync(long sessionId, long imageCategoryId, string keyword, int pageIndex, int pageSize);
- /// <summary>
- /// Get labeled files by on image category id.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id of images</param>
- /// <param name="pageIndex">The page index</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <returns>found ultrasound images</returns>
- Task<List<PreviewFileModel>> GetLatestLabeledFilesInGroupAsync(long sessionId, long imageCategoryId, string keyword, int pageIndex, int pageSize);
- /// <summary>
- /// Get unlabeled files by on image category id.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id of images</param>
- /// <param name="pageIndex">The page index</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <returns>found ultrasound images</returns>
- Task<List<PreviewFileModel>> GetUnLabeledFilesInGroupAsync(long sessionId, long imageCategoryId, string keyword, int pageIndex, int pageSize);
- /// <summary>
- /// Get gold standard images by on image category id.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id of images</param>
- /// <param name="pageIndex">The page index</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <returns>found ultrasound images</returns>
- Task<List<PreviewFileModel>> GetGoldStandardFilesInGroupAsync(long sessionId, long imageCategoryId, string keyword, int pageIndex, int pageSize);
- /// <summary>
- /// Get labeled files by on image category id.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id of images</param>
- /// <param name="pageIndex">The page index</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <returns>found ultrasound images</returns>
- Task<List<LabeledUltrasoundFile>> GetLabeledFilesAsync(long sessionId, long imageCategoryId, int pageIndex, int pageSize);
- /// <summary>
- /// Delete ultrasound image by ultrasound image id
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="UltrasoundFileId">The id of the image</param>
- /// <returns>Void</returns>
- Task DeleteUltrasoundFileAsync(long sessionId, long UltrasoundFileId);
- /// <summary>
- /// Get archived image by archivedImageId
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="archivedImageId">The id of the archived image</param>
- /// <returns>The found archived image.</returns>
- Task<ArchivedImage> GetArchivedImageAsync(long sessionId, long archivedImageId);
- /// <summary>
- /// Get the labeled result by id.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="id"></param>
- /// <returns></returns>
- Task<LabeledResult> GetLabeledResultAsync(long sessionId, long id);
- /// <summary>
- /// Get the un assigned image count.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The tag id.</param>
- /// <returns>The count of the un-assigned images.</returns>
- Task<int> GetUnAssignedImageCountAsync(long sessionId, long imageCategoryId);
- /// <summary>
- /// Get un-adoptable image count.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The id of the tag.</param>
- /// <returns>The image's count.</returns>
- Task<int> GetUnAdoptableImageCountAsync(long sessionId, long imageCategoryId);
- /// <summary>
- /// Get all assignedLabelCases count of one labeler.
- /// </summary>
- /// <param name="labelerId">The labelerId which the cases assigned to.</param>
- /// <returns>The assigned label case count.</returns>
- Task<int> GetAssignedLabelCaseCountAsync(long sessionId, long labelerId, string keyword);
- /// <summary>
- /// Get cases which assigned to a labeler.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="labelerId">The id of the labeler.</param>
- /// <returns>The cases of the labeler.</returns>
- Task<List<AssignedLabelCase>> GetAssignedLabelCasesByLabelerIdAsync(long sessionId, long labelerId, int pageIndex, int pageSize, string keyword);
- /// <summary>
- /// Get the assigned label cases.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="sameBatchLabelCaseId">The id of the same batch label case</param>
- /// <returns>The cases</returns>
- Task<List<AssignedLabelCase>> GetAssignedLabelCasesBySameBatchLabelCaseIdAsync(long sessionId, long sameBatchLabelCaseId);
- /// <summary>
- /// Get total case image count in case.
- /// </summary>
- /// <param name="sessionId">The session id.</param>
- /// <param name="caseId">The case id.</param>
- /// <returns>The count.</returns>
- Task<int> GetCaseImageCountAsync(long sessionId, long caseId);
- /// <summary>
- /// Get labeled case image count of one case.
- /// </summary>
- /// <param name="sessionId">The session id.</param>
- /// <param name="caseId">The id of the case.</param>
- /// <returns>The count of the labeled case image</returns>
- Task<int> GetLabeledCaseImageCountAsync(long sessionId, long caseId);
- /// <summary>
- /// Get labeled files by on image category id.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id of images</param>
- /// <param name="pageIndex">The page index</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <returns>found ultrasound images</returns>
- Task<List<PreviewFileModel>> GetDisputeLabeledFilesAsync(long sessionId, long imageCategoryId, string keyword, int pageIndex, int pageSize, bool isAssign, string keyWordLabele);
- /// <summary>
- /// Get all labeler infos in the ultrasound file.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="ultrasoundFileId">The id of ultrasound file.</param>
- /// <param name="imageCategoryId">The id of image category.</param>
- /// <returns></returns>
- Task<List<LabelerInfo>> GetLabelerInfosAsync(long sessionId, long ultrasoundFileId, long imageCategoryId);
- /// <summary>
- /// Delete labeled ultrasound image by ultrasound image id
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="labeledUltrasoundFileId">The id of the image</param>
- /// <returns>Void</returns>
- Task DeleteLabeledUltrasoundFileAsync(long sessionId, long labeledUltrasoundFileId);
- /// <summary>
- /// Delete all labeled ultrasound image for one ultrasound image by the ultrasound image id.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="ultrasoundFileId">The id of the ultrasound image</param>
- /// <returns>Void</returns>
- Task DeleteAllLabeledUltrasoundFilesByUltrasoundFileIdAsync(long sessionId, long ultrasoundFileId);
- /// <summary>
- /// Update labeled ultrasound image.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="labeledImageId">The labeled ultrasound image id.</param>
- /// <param name="isGoldStandard">The value to indicate whether the labeled file is gold standard or not.</param>
- Task UpdateLabeledUltrasoundFileAsync(long sessionId, long labeledImageId, bool isGoldStandard);
- /// <summary>
- /// Update labeled ultrasound image's is adoptable state.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="labeledUltrasoundFileId">The id of the ultrasound image.</param>
- /// <param name="isAdoptable">The value to indicate whether the labeled file is adoptable or not.</param>
- /// <returns></returns>
- Task UpdateLabeledUltrasoundFileIsAdoptableAsync(long sessionId, long labeledUltrasoundFileId, bool isAdoptable);
- /// <summary>
- /// Get the latest labeled file info for one source image by labeledUltrasoundFileId.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <returns>found ultrasound image</returns>
- Task<LabeledUltrasoundFileInfo> GetLatestLabeledUltrasoundFileInfoAsync(long sessionId, long labeledUltrasoundFileId);
- /// <summary>
- /// Get all the labeled files for one source image by all labelers.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id of images</param>
- /// <param name="pageIndex">The page index</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <returns>found ultrasound images</returns>
- Task<List<LabeledUltrasoundFileInfo>> GetLabeledUltrasoundFilesByUltrasoundFileIdAsync(long sessionId, long ultrasoundFileId, long imageCategoryId);
- /// <summary>
- /// Get all the labeled files for one source image by all labelers.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id of images</param>
- /// <returns>found ultrasound images count</returns>
- Task<int> GetLabeledUltrasoundFilesCountByUltrasoundFileIdAsync(long sessionId, long ultrasoundFileId);
- /// <summary>
- /// Get all the labeled files for one source image by all labelers.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="imageCategoryId">The image category id of images</param>
- /// <returns>found ultrasound images count</returns>
- Task<int> GetValidAdoptableLabeledUltrasoundFilesCountOfImageCategoryIdAsync(long sessionId, long imageCategoryId);
- #endregion image management
- #region label item management
- /// <summary>
- /// Create a label package content.
- /// </summary>
- /// <param name="sessionId">The session id of current admin.</param>
- /// <param name="content">content of the label package.</param>
- /// <returns>The id of the label package content.</returns>
- Task<long> CreateLabelPackageContentAsync(long sessionId, string content);
- /// <summary>
- /// Get the LabelPackageContent by id
- /// </summary>
- /// <param name="sessionId">The session id of current admin.</param>
- /// <param name="labelPackageContentId">The id of the label package content.</param>
- /// <returns>The loaded label package content</returns>
- Task<LabelPackageContent> GetLabelPackageContentAsync(long sessionId, long labelPackageContentId);
- /// <summary>
- /// Update the label package content.
- /// </summary>
- /// <param name="sessionId">The session id of current admin.</param>
- /// <param name="labelPackageContentId">The id of the label package content.</param>
- /// <param name="content">The content of the label package content.</param>
- /// <returns>Void</returns>
- Task UpdateLabelPackageContentAsync(long sessionId, long labelPackageContentId, string content);
- /// <summary>
- /// Get all system label packages.
- /// </summary>
- /// <param name="sessionId">The session of current admin</param>
- /// <returns>The loaded admins</returns>
- Task<List<LabelPackage>> GetLabelPackagesAsync(long sessionId);
- /// <summary>
- /// Gets the label packages count by keyword.
- /// </summary>
- /// <returns>Label packages count from the system.</returns>
- Task<int> GetLabelPackagesCountAsync(long sessionId, string keyword);
- /// <summary>
- /// Gets the label packages by keyword.
- /// </summary>
- /// <returns>Label packages from the system.</returns>
- Task<List<LabelPackage>> GetLabelPackagesAsync(long sessionId, int pageIndex, int pageSize, string keyword);
- /// <summary>
- /// Create a label package in system.
- /// </summary>
- /// <param name="sessionId">The session of current admin</param>
- /// <param name="name">The name of the LabelPackage</param>
- /// <param name="organizations">The organizations of the LabelPackage.</param>
- /// <returns>The created LabelPackage</returns>
- Task<LabelPackage> CreateLabelPackageAsync(long sessionId, string name, List<EntityBase> organizations);
- /// <summary>
- /// Delete one label package from the system.
- /// </summary>
- /// <param name="sessionId">The session id of current admin.</param>
- /// <param name="labelPackageId">The id of the label package to process</param>
- /// <returns>Void</returns>
- Task DeleteLabelPackageAsync(long sessionId, long labelPackageId);
- #endregion label item management
- #region statistics
- /// <summary>
- /// Get labeler statistic data.
- /// </summary>
- /// <param name="sessionId">The admin session id.</param>
- /// <param name="labelerId">The id of the labeler.</param>
- /// <param name="start">The start time.</param>
- /// <param name="end">The end time.</param>
- /// <returns>The labeler statistic data.</returns>
- Task<LabelerStatisticData> GetLabelerStatisticDataAsync(long sessionId, long labelerId, DateTime start, DateTime end);
- /// <summary>
- /// Get committed count.
- /// </summary>
- /// <param name="sessionId">The admin session id.</param>
- /// <param name="labelerId">The id of the labeler.</param>
- /// <param name="start">The start time.</param>
- /// <param name="end">The end time.</param>
- /// <returns>The committed count.</returns>
- Task<int> GetLabeledImageCountAsync(long sessionId, long labelerId, DateTime start, DateTime end);
- /// <summary>
- /// Get committed count.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="day">The start time.</param>
- /// <returns>The commit count of the day</returns>
- Task<int> GetDayCommittedCountAsync(long sessionId, DateTime day);
- /// <summary>
- /// Get committed region count.
- /// </summary>
- /// <param name="sessionId">The admin session id.</param>
- /// <param name="labelerId">The id of the labeler.</param>
- /// <param name="start">The start time.</param>
- /// <param name="end">The end time.</param>
- /// <returns>Get committed region count.</returns>
- Task<int> GetLabeledRegionCountAsync(long sessionId, long labelerId, DateTime start, DateTime end);
- /// <summary>
- /// Get assigned image count.
- /// </summary>
- /// <param name="sessionId">The admin session id.</param>
- /// <param name="labelerId">The id of the labeler.</param>
- /// <returns>Get assigned image count.</returns>
- Task<int> GetAssignedImageCountAsync(long sessionId, long labelerId);
- /// <summary>
- /// Get assigned image count.
- /// </summary>
- /// <param name="sessionId">The admin session id.</param>
- /// <param name="labelerId">The id of the labeler.</param>
- /// <param name="start">The start time.</param>
- /// <param name="end">The end time.</param>
- /// <returns>Get assigned image count.</returns>
- Task<int> GetAssignedImageCountAsync(long sessionId, long labelerId, DateTime start, DateTime end);
- /// <summary>
- /// Get left image count.
- /// </summary>
- /// <param name="sessionId">The admin session id.</param>
- /// <param name="labelerId">The id of the labeler.</param>
- /// <returns>Get left image count.</returns>
- Task<int> GetUnlabeledAssignedImageCountAsync(long sessionId, long labelerId);
- /// <summary>
- /// Assign conflict labeled data to Senior labelers.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <returns></returns>
- Task AssignConflictLabeledDataAsync(long sessionId);
- #endregion statistics
- #region logs
- /// <summary>
- /// Get log item count.
- /// </summary>
- /// <param name="sessionId">The admin session id.</param>
- /// <returns>The count of log item.</returns>
- Task<int> GetLogItemCountAsync(long sessionId);
- /// <summary>
- /// Gets log item for one page.
- /// </summary>
- /// <param name="sessionId">The admin session id.</param>
- /// <param name="pageIndex">The index of the page.</param>
- /// <param name="pageSize">Items per page.</param>
- /// <returns>loaded log items.</returns>
- Task<List<LogItem>> GetLogItemsAsync(long sessionId, int pageIndex, int pageSize, string keyword);
- #endregion logs
- #region LabelerClient
- /// <summary>
- /// Add one labeler client.
- /// </summary>
- /// <param name="version">The version of labeler client.</param>
- /// <param name="description">The description of labeler client.</param>
- /// <param name="clientData">The data of the labeler client.</param>
- /// <param name="isDefault">True set to default.</param>
- /// <returns></returns>
- Task AddLabelerClientAsync(long sessionId, string fileName, string version, string description, byte[] clientData);
- /// <summary>
- /// Get all labeler client infos count.
- /// </summary>
- /// <returns>All labeler client infos count.</returns>
- Task<int> GetLabelerClientInfosCountAsync(long sessionId);
- /// <summary>
- /// Get all labeler client infos.
- /// </summary>
- /// <param name="pageIndex">The index of the page.</param>
- /// <param name="pageSize">Items per page.</param>
- /// <returns></returns>
- Task<List<ClientUpgradeInfo>> GetLabelerClientInfosAsync(long sessionId, int pageIndex, int pageSize, string keyword);
- /// <summary>
- /// Delete the labeler client info.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="labelerClientInfoId">The labeler client info's id</param>
- /// <returns></returns>
- Task DeleteLabelerClientInfoAsync(long sessionId, long labelerClientInfoId);
- /// <summary>
- /// Set the labeler client info to the default one.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="labelerClientInfoId">The labeler clientInfo id</param>
- /// <returns></returns>
- Task SetDefaultLabelerClientAsync(long sessionId, long labelerClientInfoId);
- /// <summary>
- /// Get the labeler client info by version.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="version">The version of the labeler client info..</param>
- /// <returns>The labeler client infos.</returns>
- Task<ClientUpgradeInfo> GetLabelerClientInfoByVersionAsync(long sessionId, string version);
- #endregion LabelerClient
- #region Assigned Label Case
- /// <summary>
- /// Get ths labeler group
- /// </summary>
- /// <param name="imageCategoryId">The image category id</param>
- /// <param name="labelerId">The labeler id</param>
- /// <returns></returns>
- Task<LabelerGroup> GetLabelerGroupAsync(long sessionId, long imageCategoryId, long labelerId);
- /// <summary>
- /// Get the sum of the assigned count of AssignedLabelCase.
- /// </summary>
- /// <param name="imageCategoryId">The image category id</param>
- /// <param name="labelerId">The labeler id</param>
- /// <returns></returns>
- Task<QuantityBase> GetAssignedCountForAssignedLabelCaseAsync(long sessionId, long imageCategoryId, long labelerId);
- /// <summary>
- /// Get the sum of the assigned ultrasound file count.
- /// </summary>
- /// <returns></returns>
- Task<int> GetAssignedUltrasoundFileCountAsync(long sessionId, long imageBatchId, AssignCondition condition, int assignGroupCount);
- /// <summary>
- /// Assign files to labelers.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <param name="caseName">The label case name.</param>
- /// <param name="organization">The organization of label case.</param>
- /// <param name="imageCategoryId">The tag id of the images.</param>
- /// <param name="labelerInfos">The labelers to assign.</param>
- /// <param name="mode">The assign mode.</param>
- /// <param name="type">The assign type.</param>
- /// <param name="condition">The assign condition.</param>
- /// <param name="assignCount">The image count to assign.</param>
- /// <returns>The id of the assign operation.</returns>
- Task<OpResult> AssignLabelCaseAsync(long sessionId, long operationId, string caseName, EntityBase organization, long imageCategoryId, long imageBatchId, IEnumerable<AssignLabelerInfoModal> labelerInfos, AssignMode mode, AssignType type,
- AssignCondition condition, QuantityBase assignCount, VideoItem videoItem);
- /// <summary>
- /// Assign files to labelers.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <param name="caseName">The label case name.</param>
- /// <param name="organization">The organization of label case.</param>
- /// <param name="imageCategoryId">The tag id of the images.</param>
- /// <param name="labelerInfos">The labelers to assign.</param>
- /// <param name="mode">The assign mode.</param>
- /// <param name="type">The assign type.</param>
- /// <param name="condition">The assign condition.</param>
- /// <param name="assignCount">The image count to assign.</param>
- /// <returns>The id of the assign operation.</returns>
- Task<long> AssignDisputeLabelCaseAsync(long sessionId, string caseName, EntityBase organization, long imageCategoryId, long imageBatchId, List<SameBatchLabelerInfo> labelerInfos, AssignMode mode,
- AssignType type, List<long> ultrasoundId);
- /// <summary>
- /// Assign files to labelers for relabeled.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <param name="caseName">The label case name.</param>
- /// <param name="sameBatchLabelCaseId">The same batch label case id.</param>
- /// <param name="assignedLabelCaseId">The assigned label case id.</param>
- /// <returns>The assign operation id.</returns>
- Task<long> AssignRelabelCaseAsync(long sessionId, string caseName, long sameBatchLabelCaseId, long assignedLabelCaseId, EntityBase imageBatch);
- /// <summary>
- /// Assign labeled files to reviewers.
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="sameBatchLabelCaseId"></param>
- /// <param name="reviewers">The labelers to review.</param>
- /// <returns></returns>
- Task<long> AssignReviewCaseAsync(long sessionId, long sameBatchLabelCaseId, List<EntityBase> reviewers, List<AssignReviewInfo> assignReviewInfos, bool isHideLabelerName, bool isHideReviewerName);
- /// <summary>
- /// Assign questioned label files to labeler.
- /// </summary>
- /// <param name="caseName">The label case name.</param>
- /// <param name="organization">The organization of label case.</param>
- /// <param name="imageCategoryId">The image category id.</param>
- /// <returns>The assign operation id.</returns>
- //Task<long> AssignQuestionedFilesAsync(long sessionId, EntityBase organization, long imageCategoryId, long imageBatchId, List<EntityBase> labelers, List<AssignQuestionCaseViewModel> assignQuestionCaseViews);
- /// <summary>
- ///
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="organization"></param>
- /// <param name="imageCategoryId"></param>
- /// <param name="imageBatchId"></param>
- /// <param name="labelers"></param>
- /// <param name="assignQuestionCaseViews"></param>
- /// <returns></returns>
- Task<long> AssignQuestionedFilesEachAsync(long sessionId, EntityBase organization, long imageCategoryId, long imageBatchId, List<EntityBase> labelers, List<AssignQuestionCaseViewModel> assignQuestionCaseViews);
- /// <summary>
- /// Assign labeled files to reviewers from Developer Import
- /// </summary>
- /// <param name="sameBatchLabelCaseId"></param>
- /// <param name="isHideLabelerName"></param>
- /// <returns></returns>
- Task<List<AssignedReviewCaseFile>> AssignReviewCaseForDeveloperAsync(long sameBatchLabelCaseId, List<EntityBase> reviewerList, bool isHideLabelerName);
- /// <summary>
- /// Get the progress of the assign operation.
- /// </summary>
- /// <param name="sessionId">The session id of the admin.</param>
- /// <param name="assignId">The id of the assign operation.</param>
- /// <returns>The progress of the assign operation.</returns>
- Task<int> GetAssignImagesProgressAsync(long sessionId, long assignId);
- /// <summary>
- /// Assign label case to labelers again.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="sameBatchLabelCaseId">The same batch label case id.</param>
- /// <param name="labelers">The labelers.</param>
- /// <returns></returns>
- Task<long> AssignLabelCaseAgainAsync(long sessionId, long sameBatchLabelCaseId, List<EntityBase> labelers);
- /// <summary>
- /// Update same batch label case
- /// </summary>
- /// <param name="id">The id of SameBatchLabelCase.</param>
- /// <param name="isHideLabelerName">Whether to hide Labeler Name.</param>
- /// <returns></returns>
- Task UpdateSameBatchLabelCaseAsync(long sessionId, long id, bool isHideLabelerName, bool isHideReviewerName);
- /// <summary>
- /// Set label case to unadoptable
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="sameBatchLabelCase">The SameBatchLabelCase.</param>
- /// <returns></returns>
- Task SetSameBatchLabelCaseToUnAdoptableAsync(long sessionId, SameBatchLabelCase sameBatchLabelCase);
- /// <summary>
- /// Clear labeled files
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="sameBatchLabelCaseId">The same batch label case id.</param>
- /// <returns></returns>
- Task ClearLabeledFilesAsync(long sessionId, long sameBatchLabelCaseId);
- /// <summary>
- /// Get Qusetion Info By Batch id
- /// </summary>
- /// <param name="batchId"></param>
- /// <param name="sessionId">The id of the session.</param>
- /// <returns></returns>
- Task<List<AssignQuestionCaseViewModel>> GetQusetionInfoByBatchId(long sessionId, long batchId);
- /// <summary>
- /// Delete the label case.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="caseId">The id of the case.</param>
- /// <returns>Void</returns>
- Task DeleteLabelCaseAsync(long sessionId, long caseId);
- /// <summary>
- /// Move up the label case.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="caseId">The id of the case.</param>
- /// <returns>Void</returns>
- Task MoveUpLabelCaseAsync(long sessionId, long caseId);
- /// <summary>
- /// Move down the label case.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="caseId">The id of the case.</param>
- /// <returns>Void</returns>
- Task MoveDownLabelCaseAsync(long sessionId, long caseId);
- #endregion Assigned Label Case
- #region Assigned Review Case
- /// <summary>
- /// Get cases which assigned to a reviewer.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="reviewerId">The id of the reviewer.</param>
- /// <returns>The cases of the labeler.</returns>
- Task<List<AssignedReviewCase>> GetAssignedReviewCasesByReviewerIdAsync(long sessionId, long reviewerId, int pageIndex, int pageSize, string keyword);
- /// <summary>
- /// Get all assignedReviewCases count of one reviewer.
- /// </summary>
- /// <param name="reviewerId">The reviewerId which the cases assigned to.</param>
- /// <returns>The assigned review case count.</returns>
- Task<int> GetAssignedReviewCaseCountAsync(long sessionId, long reviewerId, string keyword);
- /// <summary>
- /// Delete the review case.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="caseId">The id of the case.</param>
- /// <returns>Void</returns>
- Task DeleteReviewCaseAsync(long sessionId, long caseId);
- /// <summary>
- /// Move up the review case.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="caseId">The id of the case.</param>
- /// <returns>Void</returns>
- Task MoveUpReviewCaseAsync(long sessionId, long caseId);
- /// <summary>
- /// Move down the review case.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="caseId">The id of the case.</param>
- /// <returns>Void</returns>
- Task MoveDownReviewCaseAsync(long sessionId, long caseId);
- /// <summary>
- /// Relabel and reassign label case to labeler.
- /// </summary>
- /// <param name="sessionId">The session id of the admin</param>
- /// <param name="caseName">The same batch label case name.</param>
- /// <param name="labeler">The labeler.</param>
- /// <param name="isHideReviewerName">The value to indicate whether the labeler client hide reviewer name.</param>
- /// <param name="sourceAssignedLabelCaseId">The source assign label case id.</param>
- /// <returns></returns>
- Task<long> RelabelReassignedLabelCaseAsync(long sessionId, string caseName, EntityBase labeler, bool isHideReviewerName, long organizationId, long imageCategoryId, long imageCaseId, long sourceAssignedLabelCaseId, List<long> LabeledUltrasoundFileId = null, long reLabelRecordId = 0, long reLabelRecourdCountId = 0);
- #endregion Assigned Review Case
- #region ReviewerClient
- /// <summary>
- /// Add one reviewer client.
- /// </summary>
- /// <param name="version">The version of reviewer client.</param>
- /// <param name="description">The description of reviewer client.</param>
- /// <param name="clientData">The data of the reviewer client.</param>
- /// <returns></returns>
- Task AddReviewerClientAsync(long sessionId, string fileName, string version, string description, byte[] clientData);
- /// <summary>
- /// Set the reviewer client info to the default one.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="reviewerClientInfoId">The reviewer clientInfo id</param>
- /// <returns></returns>
- Task SetDefaultReviewerClientAsync(long sessionId, long reviewerClientInfoId);
- /// <summary>
- /// Get the reviewer client infos.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <returns>The found reviewer client infos.</returns>
- Task<List<ClientUpgradeInfo>> GetReviewerClientInfosAsync(long sessionId, int pageIndex, int pageSize, string keyword);
- /// <summary>
- /// Get all reviewer client infos count.
- /// </summary>
- /// <returns>All reviewer client infos count.</returns>
- Task<int> GetReviewerClientInfosCountAsync(long sessionId);
- /// <summary>
- /// Delete the reviewer client info.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="labelerClientInfoId">The reviewer client info's id</param>
- /// <returns></returns>
- Task DeleteReviewerClientInfoAsync(long sessionId, long reviewerClientInfoId);
- /// <summary>
- /// Get the reviewer client info by version.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="version">The version of the reviewer client info..</param>
- /// <returns>The reivewer client infos.</returns>
- Task<ClientUpgradeInfo> GetReviewerClientInfoByVersionAsync(long sessionId, string version);
- #endregion ReviewerClient
- #region Train Tasks
- /// <summary>
- /// Get the train tasks count by keyword.
- /// </summary>
- /// <param name="keyword">The searched keyword.</param>
- /// <returns>The searched train tasks count.</returns>
- Task<int> GetTrainTasksCountAsync(long sessionId, string keyword);
- /// <summary>
- /// Gets train tasks.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="keyword">The searched key word.</param>
- /// <returns>The searched train tasks.</returns>
- Task<List<TrainTaskModel>> GetTrainTasksAsync(long sessionId, int pageIndex, int pageSize, string keyword);
- /// <summary>
- /// Cancel train task.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="trainTaskId">The id of the train task.</param>
- /// <returns></returns>
- Task CancelTrainTaskAsync(long sessionId, long trainTaskId);
- /// <summary>
- /// Delete a train task from the system.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="trainTaskId">The id of the train task to be deleted.</param>
- /// <returns>Void</returns>
- Task DeleteTrainTaskAsync(long sessionId, long trainTaskId);
- #endregion Train Tasks
- #region LabelerStatistics
- /// <summary>
- /// Get labelers' label statistics.
- /// </summary>
- /// <param name="start">The start time</param>
- /// <param name="end">The end time</param>
- /// <returns>The labelers' label statistics.</returns>
- Task<List<LabelerLabelStatistic>> GetLabelerStatisticsAsync(long sessionId, int pageIndex, int pageSize, string keyword, long organizationId, long imageCategoryId, DateTime start, DateTime end);
- /// <summary>
- /// Get labelers' label Groups count.
- /// </summary>
- /// <param name="keyword">The searched keyword.</param>
- /// <returns>The labelers' label Groups count</returns>
- Task<int> GetLabelerGroupsCountAsync(long sessionId, string keyword, long organizationId, long imageCategoryId);
- #endregion LabelerStatistics
- #region Developer client
- /// <summary>
- /// Add one developer client.
- /// </summary>
- /// <param name="version">The version of developer client.</param>
- /// <param name="description">The description of developer client.</param>
- /// <param name="clientData">The data of the developer client.</param>
- /// <returns></returns>
- Task AddDeveloperClientAsync(long sessionId, string fileName, string version, string description, byte[] clientData);
- /// <summary>
- /// Set the developer client info to the default one.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="developerClientInfoId">The developer clientInfo id</param>
- /// <returns></returns>
- Task SetDefaultDeveloperClientAsync(long sessionId, long developerClientInfoId);
- /// <summary>
- /// Get the developer client infos.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <returns>The found developer client infos.</returns>
- Task<List<ClientUpgradeInfo>> GetDeveloperClientInfosAsync(long sessionId, int pageIndex, int pageSize, string keyword);
- /// <summary>
- /// Get all developer client infos.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <returns>All developer client infos.</returns>
- Task<int> GetDeveloperClientInfosCountAsync(long sessionId);
- /// <summary>
- /// Delete the developer client info.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="developerClientInfoId">The developer client info's id</param>
- /// <returns></returns>
- Task DeleteDeveloperClientInfoAsync(long sessionId, long developerClientInfoId);
- /// <summary>
- /// Get the developer client info by version.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="version">The version of the developer client info..</param>
- /// <returns>The reivewer client infos.</returns>
- Task<ClientUpgradeInfo> GetDeveloperClientInfoByVersionAsync(long sessionId, string version);
- #endregion Developer client
- #region Authority Menu
- /// <summary>
- /// Get all system menus.
- /// </summary>
- /// <param name="sessionId"></param>
- /// <returns></returns>
- Task<List<AuthorityMenu>> GetAuthorityMenusAsync(long sessionId);
- /// <summary>
- /// Get defaulr authorities
- /// </summary>
- /// <returns></returns>
- Task<List<AuthorityMenu>> GetDefaultAuthorityMenusAsync(long sessionId);
- #endregion Authority Menu
- #region image category
- /// <summary>
- /// Create a image category.
- /// </summary>
- /// <returns></returns>
- Task<ImageCategory> CreateImageCategoryAsync(long sessionId, string name, CategoryLevel level, EntityBase parent, long organizatinId, long labelPackageContentId, long sameBatchLabelCaseId);
- /// <summary>
- /// Delete a image category.
- /// </summary>
- /// <returns>Void</returns>
- Task DeleteImageCategoryAsync(long sessionId, long id);
- /// <summary>
- /// Get the image category by id.
- /// </summary>
- /// <param name="id">The searched id.</param>
- /// <returns>The loaded image category.</returns>
- Task<ImageCategory> GetImageCategoryAsync(long sessionId, long id);
- /// <summary>
- /// Get the image categories count by keyword.
- /// </summary>
- /// <param name="keyword">The searched keyword.</param>
- /// <returns>The found image categories count.</returns>
- Task<int> GetImageCategoriesCountAsync(long sessionId, string keyword);
- /// <summary>
- /// Get the image categories by keyword.
- /// </summary>
- /// <param name="keyword">The searched keyword.</param>
- /// <returns>The loaded image categories.</returns>
- Task<List<ImageCategory>> GetImageCategoriesAsync(long sessionId, int pageIndex, int pageSize, string keyword);
- /// <summary>
- /// Get all image categories.
- /// </summary>
- /// <param name="keyword">The searched keyword.</param>
- /// <returns>The loaded image categories.</returns>
- Task<List<ImageCategory>> GetImageCategoriesAsync(long sessionId, string keyword);
- /// <summary>
- /// Get the image categories by parent id.
- /// </summary>
- /// <param name="parentId">The searched parent id.</param>
- /// <returns>The loaded image categories.</returns>
- Task<List<ImageCategory>> GetImageCategoriesByParentIdAsync(long sessionId, long parentId);
- /// <summary>
- /// Get the image categories by category level.
- /// </summary>
- /// <param name="level">The searched category level.</param>
- /// <returns>The loaded image categories.</returns>
- Task<List<ImageCategory>> GetImageCategoriesByLevelAsync(long sessionId, CategoryLevel level);
- /// <summary>
- /// Get the cases of image categories by parent id.
- /// </summary>
- /// <param name="parentId">The searched parent id.</param>
- /// <returns>The loaded image categories.</returns>
- Task<List<ImageCategory>> GetImageCategoriesWithRelabeledCaseByParentIdAsync(long sessionId, long parentId);
- /// <summary>
- /// Get the image categories by labelPackageId.
- /// </summary>
- /// <param name="labelPackageId">The label package id.</param>
- /// <returns>The loaded ImageCategories</returns>
- Task<List<ImageCategory>> GetImageCategoriesHasChildrenAsync(long sessionId, long labelPackageId);
- /// <summary>
- /// Update the image category hasChildren in system.
- /// </summary>
- /// <returns></returns>
- Task UpdateImageCategoryHasChildrenAsync(long sessionId, long id, bool hasChildren);
- /// <summary>
- /// Update the image category that assigned users in system.
- /// </summary>
- /// <returns></returns>
- Task UpdateImageCategoryUsersAsync(long sessionId, long id, AccountType accountType, List<EntityBase> users);
- /// <summary>
- /// Update the image category gold standard and self-check image quantity item in system.
- /// </summary>
- /// <returns></returns>
- Task UpdateImageCategoryGoldStandardAndSelfCheckQuantityItemAsync(long sessionId, long id, double goldStandardProportion, int goldStandardQualifiedPeople, double selfCheckProportion, bool isSupportedSkipFrame, VideoItem videoItem, DifficultyLevel difficultyLevel);
- #endregion image category
- #region Developer share info
- /// <summary>
- /// Gets the developer share infos by keyword.
- /// </summary>
- /// <param name="keyword">The searched keyword.</param>
- /// <returns>The loaded developer share infos.</returns>
- Task<List<DeveloperShareInfo>> GetDeveloperShareInfosAsync(long sessionId, int pageIndex, int pageSize, string keyword);
- /// <summary>
- /// Gets the developer share infos count by keyword.
- /// </summary>
- /// <param name="keyword">The searched keyword.</param>
- /// <returns>The loaded ldeveloper share infos count.</returns>
- Task<int> GetDeveloperShareInfosCountAsync(long sessionId, string keyword);
- /// <summary>
- /// Update shared developer folder
- /// </summary>
- /// <param name="folderId">The developer folder id</param>
- /// <param name="state">The approval state</param>
- /// <returns></returns>
- Task UpdateSharedDeveloperFolderAsync(long sessionId, long id, ApprovalState state);
- #endregion Developer share info
- /// <summary>
- /// Get TreatingProcess by ultrasoundId
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="ultrasoundId"></param>
- /// <returns></returns>
- Task<TreatingProcess> GetTreatingProcessByultrasoundId(long sessionId, long ultrasoundId);
- /// <summary>
- /// Get ReLabelRecord By SameBatchLabelCaseI
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="SameBatchLabelCaseId"></param>
- /// <returns></returns>
- Task<List<ReLabelRecord>> GetReLabelRecordBySameBatchLabelCaseId(long sessionId, long SameBatchLabelCaseId);
- /// <summary>
- /// 重新分配审核人员
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="assignedLabelCaseId"></param>
- /// <param name="laberUltrasoundFileIds"></param>
- /// <param name="reviewer"></param>
- /// <param name="ImageCategoryId"></param>
- /// <param name="reLabelRecordId"></param>
- /// <param name="reLabelRecordCountId"></param>
- /// <returns></returns>
- Task ReAssignReviewCaseAsync(long sessionId, long assignedLabelCaseId, List<long> laberUltrasoundFileIds, EntityBase reviewer, long ImageCategoryId, long reLabelRecordCountId, long reLabelRecordId);
- #region 呼吸机数据管理
- /// <summary>
- /// Add un-labeled Ventilator file into the system.
- /// </summary>
- /// <param name="sessionId">The sessionId of the admin</param>
- /// <returns>Void</returns>
- Task<VentilatorOpResult> AddUnLabeledVentilatorFileAsync(long sessionId, long organizationId, VentilatorFile ventilatorFile, byte[] fileData, string fileName);
- /// <summary>
- /// upload un-labeled Ventilator file into the system.
- /// </summary>
- /// <param name="sessionId">The sessionId of the admin</param>
- /// <returns>Void</returns>
- Task<OpResult> UploadUnLabeledVentilatorFileAsync(long sessionId, VentilatorFile ventilatorFile);
- /// <summary>
- /// 获取呼吸文件数量
- /// </summary>
- /// <param name="sessionId">The sessionId of the admin</param>
- /// <returns></returns>
- Task<int> GetVentilatorFilesCountAsync(long sessionId, SearchVentilatorFileModel searchModel);
- /// <summary>
- /// 获取呼吸文件.
- /// <param name="sessionId">The sessionId of the admin</param>
- /// <param name="pageIndex">The index of page.</param>
- /// <param name="pageSize">The item count per page.</param>
- /// </summary>
- Task<List<VentilatorFile>> GetVentilatorFilesAsync(long sessionId, int pageIndex, int pageSize, SearchVentilatorFileModel searchModel);
- /// <summary>
- /// 获取呼吸文件.
- /// <param name="sessionId">The sessionId of the admin</param>
- /// <param name="ventilatorId">The index of page.</param>
- /// </summary>
- Task<VentilatorFile> GetVentilatorFileByIdAsync(long sessionId, long ventilatorId);
- /// <summary>
- /// 更新呼吸文件.
- /// <param name="sessionId">The sessionId of the admin</param>
- /// <param name="ventilatorFile">The ventilator file.</param>
- /// </summary>
- Task UpdateVentilatorFileByIdAsync(long sessionId, VentilatorFile ventilatorFile);
- /// <summary>
- /// Download the Ventilator Files
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="ventilatorIdList"></param>
- /// <param name="deviceParameterList"></param>
- /// <returns></returns>
- Task<byte[]> DownloadVentilatorFilesAsync(long sessionId, List<long> ventilatorIdList, List<DeviceParameter> deviceParameterList);
- /// <summary>
- /// Get the VentilatorFileVersion count.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="ventilatorFileId">The id of the ventilator file.</param>
- /// <returns>The count of the VentilatorFileVersion.</returns>
- Task<int> GetVentilatorFileVersionCountAsync(long sessionId, long ventilatorFileId);
- /// <summary>
- /// Get VentilatorFileVersion items.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="pageIndex">The index of the page.</param>
- /// <param name="pageSize">The size of the page.</param>
- /// <returns>The loaded VentilatorFileVersions</returns>
- Task<List<VentilatorFileVersion>> GetVentilatorFileVersionsAsync(long sessionId, long ventilatorFileId, int pageIndex, int pageSize);
- /// <summary>
- /// 删除呼吸文件.
- /// <param name="sessionId">The sessionId of the admin</param>
- /// <param name="ventilatorFileId">The ventilator file id</param>
- /// </summary>
- Task DeleteVentilatorFileByIdAsync(long sessionId, long ventilatorFileId);
- /// <summary>
- /// 同步呼吸机文件
- /// </summary>
- /// <param name="sessionId"></param>
- /// <returns></returns>
- Task<OpResult> SyncVentilatorFilesAsync(long sessionId, long organizationId);
- /// <summary>
- /// 获取呼吸机参数信息
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="ventilatorFileId"></param>
- /// <returns></returns>
- Task<VentilatorParameterInfo> GetVentilatorParameterInfoByIdAsync(long sessionId, long ventilatorFileId);
- #endregion 呼吸机数据管理
- #region HandyToolClient
- /// <summary>
- /// Add one HandyTool client.
- /// </summary>
- /// <param name="version">The version of HandyTool client.</param>
- /// <param name="description">The description of HandyTool client.</param>
- /// <param name="clientData">The data of the HandyTool client.</param>
- /// <returns></returns>
- Task AddHandyToolClientAsync(long sessionId, string fileName, string version, string description, byte[] clientData);
- /// <summary>
- /// Set the HandyTool client info to the default one.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="HandyToolClientInfoId">The HandyTool clientInfo id</param>
- /// <returns></returns>
- Task SetDefaultHandyToolClientAsync(long sessionId, long HandyToolClientInfoId);
- /// <summary>
- /// Get the HandyTool client infos.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <returns>The found HandyTool client infos.</returns>
- Task<List<ClientUpgradeInfo>> GetHandyToolClientInfosAsync(long sessionId, int pageIndex, int pageSize, string keyword);
- /// <summary>
- /// Get all HandyTool client infos count.
- /// </summary>
- /// <returns>All HandyTool client infos count.</returns>
- Task<int> GetHandyToolClientInfosCountAsync(long sessionId);
- /// <summary>
- /// Delete the HandyTool client info.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="labelerClientInfoId">The HandyTool client info's id</param>
- /// <returns></returns>
- Task DeleteHandyToolClientInfoAsync(long sessionId, long HandyToolClientInfoId);
- /// <summary>
- /// Get the HandyTool client info by version.
- /// </summary>
- /// <param name="sessionId">The id of the session.</param>
- /// <param name="version">The version of the HandyTool client info..</param>
- /// <returns>The reivewer client infos.</returns>
- Task<ClientUpgradeInfo> GetHandyToolClientInfoByVersionAsync(long sessionId, string version);
- #endregion HandyToolClient
- #region GatherCategory
- /// <summary>
- /// Create a new GatherCategory
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="name"></param>
- /// <param name="organziation"></param>
- /// <param name="gatherers"></param>
- /// <returns></returns>
- Task CreateGatherCategoryAsync(long sessionId, string name, EntityBase organziation, List<EntityBase> gatherers);
- /// <summary>
- /// Update a GatherCategory
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="id"></param>
- /// <param name="name"></param>
- /// <param name="gatherers"></param>
- /// <returns></returns>
- Task UpdateGatherCategoryAsync(long sessionId, long id, string name, List<EntityBase> gatherers);
- /// <summary>
- /// Get GatherCategory by id
- /// </summary>
- /// <param name="sessionId"></param>
- /// <returns></returns>
- Task<GatherCategory> GetGatherCategoryByIdAsync(long sessionId, long id);
- /// <summary>
- /// Get the GatherCategories
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="pageIndex"></param>
- /// <param name="pageSize"></param>
- /// <param name="searchGatherCategoryModel"></param>
- /// <returns></returns>
- Task<List<GatherCategory>> GetGatherCategoriesAsync(long sessionId, int pageIndex, int pageSize, SearchGatherCategoryModel searchGatherCategoryModel);
- /// <summary>
- /// Get the GatherCategories Count
- /// </summary>
- /// <param name="id"></param>
- /// <param name="searchGatherCategoryModel"></param>
- /// <returns></returns>
- Task<long> GetGatherCategoriesCountAsync(long sessionId, SearchGatherCategoryModel searchGatherCategoryModel);
- /// <summary>
- /// Get the GatherCategories by OrganizationId
- /// </summary>
- /// <param name="id"></param>
- /// <param name="organizationId"></param>
- /// <returns></returns>
- Task<List<GatherCategory>> GetGatherCategoriesByOrganizationIdAsync(long id, long organizationId);
- /// <summary>
- /// Create Gather Data
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="category"></param>
- /// <param name="organization"></param>
- /// <param name="gatherer"></param>
- /// <param name="modelType"></param>
- /// <param name="source"></param>
- /// <param name="collectionQuantity"></param>
- /// <param name="startTime"></param>
- /// <param name="endTime"></param>
- /// <param name="SettlementTime"></param>
- /// <returns></returns>
- Task CreateGatherDataAsync(long sessionId, CategoryItem category, EntityBase organization, EntityBase gatherer, string modelType, string source, int collectionQuantity, DateTime startTime, DateTime endTime, DateTime SettlementTime);
- /// <summary>
- /// Update Gather Data
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="id"></param>
- /// <param name="category"></param>
- /// <param name="organization"></param>
- /// <param name="gatherer"></param>
- /// <param name="modelType"></param>
- /// <param name="source"></param>
- /// <param name="collectionQuantity"></param>
- /// <param name="startTime"></param>
- /// <param name="endTime"></param>
- /// <param name="SettlementTime"></param>
- /// <returns></returns>
- Task UpdateGatherDataAsync(long sessionId, long id, CategoryItem category, EntityBase organization, EntityBase gatherer, string modelType, string source, int collectionQuantity, DateTime startTime, DateTime endTime, DateTime SettlementTime);
- /// <summary>
- /// Get Gather Data by id
- /// </summary>
- /// <param name="sessionId"></param>
- /// <returns></returns>
- Task<GatherData> GetGatherDataByIdAsync(long sessionId, long id);
- /// <summary>
- /// Get the Gather Datas
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="pageIndex"></param>
- /// <param name="pageSize"></param>
- /// <param name="searchGatherDataModel"></param>
- /// <returns></returns>
- Task<List<GatherData>> GetGatherDatasAsync(long sessionId, int pageIndex, int pageSize, SearchGatherDataModel searchGatherDataModel);
- /// <summary>
- /// Get the Gather Data Count
- /// </summary>
- /// <param name="sessionId"></param>
- /// <param name="searchGatherDataModel"></param>
- /// <returns></returns>
- Task<long> GetGatherDatasCountAsync(long sessionId, SearchGatherDataModel searchGatherDataModel);
- #endregion GatherCategory
- #region 定价管理
- /// <summary>
- /// 获取个体定价数据
- /// </summary>
- /// <param name="organizationId">组织Id</param>
- /// <param name="type">标注/审核/采集类型</param>
- /// <returns></returns>
- Task<List<IndividualPrice>> GetIndividualPricesAsync(long sessionId, long organizationId, DataProcessingType type);
- /// <summary>
- /// 新增个体定价
- /// </summary>
- /// <param name="item"></param>
- /// <returns></returns>
- Task CreateIndividualPriceAsync(long sessionId, IndividualPrice item);
- /// <summary>
- /// 更新个体定价
- /// </summary>
- /// <param name="price"></param>
- /// <returns></returns>
- Task UpdateIndividualPriceAsync(long sessionId, long id, double price);
- /// <summary>
- /// 获取个体系数
- /// </summary>
- /// <param name="pageIndex">The index of page.</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <param name="keyword">The searched keyword.</param>
- /// <returns>The loaded developers.</returns>
- Task<List<IndividualCoefficient>> GetIndividualCoefficientsAsync(long sessionId, int pageIndex, int pageSize, string keyword, long organizationId);
- /// <summary>
- /// 获取个体系数数量
- /// </summary>
- /// <param name="keyword">The searched keyword.</param>
- /// <returns>The developer count.</returns>
- Task<int> GetIndividualCoefficientsCountAsync(long sessionId, string keyword, long organizationId);
- /// <summary>
- /// 新增个体系数
- /// </summary>
- /// <param name="item"></param>
- /// <returns></returns>
- Task CreateIndividualCoefficientAsync(long sessionId, IndividualCoefficient item);
- /// <summary>
- /// 更新个体系数
- /// </summary>
- /// <param name="item"></param>
- /// <returns></returns>
- Task UpdateIndividualCoefficientAsync(long sessionId, long id, double labelPriceCoefficient, double labelQuantityCoefficient, DateTime? startEffectiveTime, DateTime? endEffectiveTime);
- /// <summary>
- /// 删除个体系数
- /// </summary>
- /// <returns></returns>
- Task DeleteIndividualCoefficientAsync(long sessionId, long id);
- /// <summary>
- /// 获取机构定价
- /// </summary>
- /// <param name="pageIndex">The index of page.</param>
- /// <param name="pageSize">The item count per page.</param>
- /// <returns>The loaded developers.</returns>
- Task<List<InstitutionalPrice>> GetInstitutionalPricesAsync(long sessionId, int pageIndex, int pageSize, long organizationId, long institutionId);
- /// <summary>
- /// 获取机构定价数量
- /// </summary>
- /// <returns>The developer count.</returns>
- Task<int> GetInstitutionalPricesCountAsync(long sessionId, long organizationId, long institutionId);
- /// <summary>
- /// 新增机构定价
- /// </summary>
- /// <param name="item"></param>
- /// <returns></returns>
- Task CreateInstitutionalPriceAsync(long sessionId, InstitutionalPrice item);
- /// <summary>
- /// 更新机构定价
- /// </summary>
- /// <param name="item"></param>
- /// <returns></returns>
- Task UpdateInstitutionalPriceAsync(long sessionId, long id, double labelPrice, double reviewPrice, double gatherPrice, double labelPriceCoefficient, double labelQuantityCoefficient, DateTime? startEffectiveTime, DateTime? endEffectiveTime);
- /// <summary>
- /// 删除机构定价
- /// </summary>
- /// <returns></returns>
- Task DeleteInstitutionalPriceAsync(long sessionId, long id);
- /// <summary>
- /// 创建定价相关操作记录
- /// </summary>
- /// <param name="item"></param>
- /// <returns></returns>
- Task CreatePricingOperateLogAsync(long sessionId, PricingOperateLog item);
- /// <summary>
- /// 获取定价相关操作记录
- /// </summary>
- /// <returns></returns>
- Task<List<PricingOperateLog>> GetPricingOperateLogsAsync(long sessionId, int pageIndex, int pageSize, long id, PricingType type);
- /// <summary>
- /// 获取定价相关操作记录数量
- /// </summary>
- /// <returns></returns>
- Task<int> GetPricingOperateLogsCountAsync(long sessionId, long id, PricingType type);
- #endregion 定价管理
- }
- }
|