文档服务初步提交
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.ViewModel;
|
||||
|
||||
public class SysFileTypeView : SysFileTypeAddOrEdit
|
||||
{
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class SysFileTypeAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public ArchiveType ArchiveTypeEnum { get; set; }
|
||||
|
||||
public bool IsConfirmRecord { get; set; }
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string NameCN { get; set; }
|
||||
|
||||
public int SubIdentification { get; set; }
|
||||
}
|
||||
|
||||
public class SysFileTypeQuery : PageInput
|
||||
{
|
||||
public ArchiveType? ArchiveTypeEnum { get; set; }
|
||||
|
||||
public bool? IsConfirmRecord { get; set; }
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public string? NameCN { get; set; }
|
||||
|
||||
public int? SubIdentification { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.ViewModel;
|
||||
|
||||
public class TrialFileTypeView : TrialFileTypeAddOrEdit
|
||||
{
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class TrialFileTypeAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public ArchiveType ArchiveTypeEnum { get; set; }
|
||||
|
||||
public DateOnly FirstFinalDate { get; set; }
|
||||
|
||||
public bool IsConfirmRecord { get; set; }
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
public bool IsSelfDefine { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string NameCN { get; set; }
|
||||
|
||||
public int SubIdentification { get; set; }
|
||||
|
||||
public Guid? SysFileTypeId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
}
|
||||
|
||||
public class TrialFileTypeQuery : PageInput
|
||||
{
|
||||
public ArchiveType? ArchiveTypeEnum { get; set; }
|
||||
|
||||
public DateOnly? FirstFinalDate { get; set; }
|
||||
|
||||
public bool? IsConfirmRecord { get; set; }
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
|
||||
public bool? IsSelfDefine { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public string? NameCN { get; set; }
|
||||
|
||||
public int? SubIdentification { get; set; }
|
||||
|
||||
public Guid? SysFileTypeId { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.ViewModel;
|
||||
|
||||
public class TrialFinalRecordView : TrialFinalRecordAddOrEdit
|
||||
{
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class TrialFinalRecordAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public Guid HistoryFileRecordId { get; set; }
|
||||
|
||||
public bool IsAuthorizedView { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public Guid PDFFileRecordId { get; set; }
|
||||
|
||||
public Guid SignFileRecordId { get; set; }
|
||||
|
||||
public int State { get; set; }
|
||||
|
||||
public Guid TrialFileTypeId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public string Version { get; set; }
|
||||
|
||||
public Guid WordFileRecordId { get; set; }
|
||||
}
|
||||
|
||||
public class TrialFinalRecordQuery : PageInput
|
||||
{
|
||||
public Guid? HistoryFileRecordId { get; set; }
|
||||
|
||||
public bool? IsAuthorizedView { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public Guid? PDFFileRecordId { get; set; }
|
||||
|
||||
public Guid? SignFileRecordId { get; set; }
|
||||
|
||||
public int? State { get; set; }
|
||||
|
||||
public Guid? TrialFileTypeId { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
public string? Version { get; set; }
|
||||
|
||||
public Guid? WordFileRecordId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.ViewModel;
|
||||
|
||||
public class TrialNormalRecordView : TrialNormalRecordAddOrEdit
|
||||
{
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class TrialNormalRecordAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public bool IsAuthorizedView { get; set; }
|
||||
|
||||
public int? ReviewerFileType { get; set; }
|
||||
|
||||
public int State { get; set; }
|
||||
|
||||
public Guid TrialFileRecordId { get; set; }
|
||||
|
||||
public Guid TrialFileTypeId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
}
|
||||
|
||||
public class TrialNormalRecordQuery : PageInput
|
||||
{
|
||||
public bool? IsAuthorizedView { get; set; }
|
||||
|
||||
public int? ReviewerFileType { get; set; }
|
||||
|
||||
public int? State { get; set; }
|
||||
|
||||
public Guid? TrialFileRecordId { get; set; }
|
||||
|
||||
public Guid? TrialFileTypeId { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.ViewModel;
|
||||
|
||||
public class TrialTrianingRecordView : TrialTrianingRecordAddOrEdit
|
||||
{
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class TrialTrianingRecordAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public bool IsAuthorizedView { get; set; }
|
||||
|
||||
public string Note { get; set; }
|
||||
|
||||
public int State { get; set; }
|
||||
|
||||
public Guid TrialFileRecordId { get; set; }
|
||||
|
||||
public Guid TrialFileTypeId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public int TrianingCount { get; set; }
|
||||
|
||||
public DateOnly TrianingDate { get; set; }
|
||||
|
||||
public int TrianingState { get; set; }
|
||||
}
|
||||
|
||||
public class TrialTrianingRecordQuery : PageInput
|
||||
{
|
||||
public bool? IsAuthorizedView { get; set; }
|
||||
|
||||
public string? Note { get; set; }
|
||||
|
||||
public int? State { get; set; }
|
||||
|
||||
public Guid? TrialFileRecordId { get; set; }
|
||||
|
||||
public Guid? TrialFileTypeId { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
public int? TrianingCount { get; set; }
|
||||
|
||||
public DateOnly? TrianingDate { get; set; }
|
||||
|
||||
public int? TrianingState { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces;
|
||||
|
||||
public interface ISysFileTypeService
|
||||
{
|
||||
|
||||
Task<PageOutput<SysFileTypeView>> GetSysFileTypeList(SysFileTypeQuery inQuery);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateSysFileType(SysFileTypeAddOrEdit addOrEditSysFileType);
|
||||
|
||||
Task<IResponseOutput> DeleteSysFileType(Guid sysFileTypeId);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces;
|
||||
|
||||
public interface ITrialFileTypeService
|
||||
{
|
||||
|
||||
Task<PageOutput<TrialFileTypeView>> GetTrialFileTypeList(TrialFileTypeQuery inQuery);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateTrialFileType(TrialFileTypeAddOrEdit addOrEditTrialFileType);
|
||||
|
||||
Task<IResponseOutput> DeleteTrialFileType(Guid trialFileTypeId);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces;
|
||||
|
||||
public interface ITrialFinalRecordService
|
||||
{
|
||||
|
||||
Task<PageOutput<TrialFinalRecordView>> GetTrialFinalRecordList(TrialFinalRecordQuery inQuery);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateTrialFinalRecord(TrialFinalRecordAddOrEdit addOrEditTrialFinalRecord);
|
||||
|
||||
Task<IResponseOutput> DeleteTrialFinalRecord(Guid trialFinalRecordId);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces;
|
||||
|
||||
public interface ITrialNormalRecordService
|
||||
{
|
||||
|
||||
Task<PageOutput<TrialNormalRecordView>> GetTrialNormalRecordList(TrialNormalRecordQuery inQuery);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateTrialNormalRecord(TrialNormalRecordAddOrEdit addOrEditTrialNormalRecord);
|
||||
|
||||
Task<IResponseOutput> DeleteTrialNormalRecord(Guid trialNormalRecordId);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces;
|
||||
|
||||
public interface ITrialTrianingRecordService
|
||||
{
|
||||
|
||||
Task<PageOutput<TrialTrianingRecordView>> GetTrialTrianingRecordList(TrialTrianingRecordQuery inQuery);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateTrialTrianingRecord(TrialTrianingRecordAddOrEdit addOrEditTrialTrianingRecord);
|
||||
|
||||
Task<IResponseOutput> DeleteTrialTrianingRecord(Guid trialTrianingRecordId);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:24Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
namespace IRaCIS.Core.Application.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 系统文件类型
|
||||
/// </summary>
|
||||
/// <param name="_sysFileTypeRepository"></param>
|
||||
/// <param name="_mapper"></param>
|
||||
/// <param name="_userInfo"></param>
|
||||
/// <param name="_localizer"></param>
|
||||
[ApiExplorerSettings(GroupName = "FileRecord")]
|
||||
|
||||
public class SysFileTypeService(IRepository<SysFileType> _sysFileTypeRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ISysFileTypeService
|
||||
{
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<SysFileTypeView>> GetSysFileTypeList(SysFileTypeQuery inQuery)
|
||||
{
|
||||
|
||||
var sysFileTypeQueryable = _sysFileTypeRepository
|
||||
.ProjectTo<SysFileTypeView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await sysFileTypeQueryable.ToPagedListAsync(inQuery);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateSysFileType(SysFileTypeAddOrEdit addOrEditSysFileType)
|
||||
{
|
||||
|
||||
var entity = await _sysFileTypeRepository.InsertOrUpdateAsync(addOrEditSysFileType, true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete("{sysFileTypeId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteSysFileType(Guid sysFileTypeId)
|
||||
{
|
||||
var success = await _sysFileTypeRepository.DeleteFromQueryAsync(t => t.Id == sysFileTypeId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
namespace IRaCIS.Core.Application.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 项目文件类型
|
||||
/// </summary>
|
||||
/// <param name="_trialFileTypeRepository"></param>
|
||||
/// <param name="_mapper"></param>
|
||||
/// <param name="_userInfo"></param>
|
||||
/// <param name="_localizer"></param>
|
||||
[ApiExplorerSettings(GroupName = "FileRecord")]
|
||||
public class TrialFileTypeService(IRepository<TrialFileType> _trialFileTypeRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialFileTypeService
|
||||
{
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<TrialFileTypeView>> GetTrialFileTypeList(TrialFileTypeQuery inQuery)
|
||||
{
|
||||
|
||||
var trialFileTypeQueryable = _trialFileTypeRepository
|
||||
.ProjectTo<TrialFileTypeView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await trialFileTypeQueryable.ToPagedListAsync(inQuery);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateTrialFileType(TrialFileTypeAddOrEdit addOrEditTrialFileType)
|
||||
{
|
||||
// 在此处拷贝automapper 映射
|
||||
|
||||
|
||||
|
||||
var entity = await _trialFileTypeRepository.InsertOrUpdateAsync(addOrEditTrialFileType, true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete("{trialFileTypeId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTrialFileType(Guid trialFileTypeId)
|
||||
{
|
||||
var success = await _trialFileTypeRepository.DeleteFromQueryAsync(t => t.Id == trialFileTypeId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
namespace IRaCIS.Core.Application.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 项目定稿记录
|
||||
/// </summary>
|
||||
/// <param name="_trialFinalRecordRepository"></param>
|
||||
/// <param name="_mapper"></param>
|
||||
/// <param name="_userInfo"></param>
|
||||
/// <param name="_localizer"></param>
|
||||
[ApiExplorerSettings(GroupName = "FileRecord")]
|
||||
public class TrialFinalRecordService(IRepository<TrialFinalRecord> _trialFinalRecordRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialFinalRecordService
|
||||
{
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<TrialFinalRecordView>> GetTrialFinalRecordList(TrialFinalRecordQuery inQuery)
|
||||
{
|
||||
|
||||
var trialFinalRecordQueryable = _trialFinalRecordRepository
|
||||
.ProjectTo<TrialFinalRecordView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await trialFinalRecordQueryable.ToPagedListAsync(inQuery);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateTrialFinalRecord(TrialFinalRecordAddOrEdit addOrEditTrialFinalRecord)
|
||||
{
|
||||
// 在此处拷贝automapper 映射
|
||||
|
||||
|
||||
|
||||
|
||||
var entity = await _trialFinalRecordRepository.InsertOrUpdateAsync(addOrEditTrialFinalRecord, true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete("{trialFinalRecordId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTrialFinalRecord(Guid trialFinalRecordId)
|
||||
{
|
||||
var success = await _trialFinalRecordRepository.DeleteFromQueryAsync(t => t.Id == trialFinalRecordId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
namespace IRaCIS.Core.Application.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 项目-一般文件记录
|
||||
/// </summary>
|
||||
/// <param name="_trialNormalRecordRepository"></param>
|
||||
/// <param name="_mapper"></param>
|
||||
/// <param name="_userInfo"></param>
|
||||
/// <param name="_localizer"></param>
|
||||
[ApiExplorerSettings(GroupName = "FileRecord")]
|
||||
public class TrialNormalRecordService(IRepository<TrialNormalRecord> _trialNormalRecordRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialNormalRecordService
|
||||
{
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<TrialNormalRecordView>> GetTrialNormalRecordList(TrialNormalRecordQuery inQuery)
|
||||
{
|
||||
|
||||
var trialNormalRecordQueryable = _trialNormalRecordRepository
|
||||
.ProjectTo<TrialNormalRecordView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await trialNormalRecordQueryable.ToPagedListAsync(inQuery);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateTrialNormalRecord(TrialNormalRecordAddOrEdit addOrEditTrialNormalRecord)
|
||||
{
|
||||
// 在此处拷贝automapper 映射
|
||||
|
||||
|
||||
|
||||
|
||||
var entity = await _trialNormalRecordRepository.InsertOrUpdateAsync(addOrEditTrialNormalRecord, true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete("{trialNormalRecordId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTrialNormalRecord(Guid trialNormalRecordId)
|
||||
{
|
||||
var success = await _trialNormalRecordRepository.DeleteFromQueryAsync(t => t.Id == trialNormalRecordId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
namespace IRaCIS.Core.Application.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 项目-培训记录
|
||||
/// </summary>
|
||||
/// <param name="_trialTrianingRecordRepository"></param>
|
||||
/// <param name="_mapper"></param>
|
||||
/// <param name="_userInfo"></param>
|
||||
/// <param name="_localizer"></param>
|
||||
[ApiExplorerSettings(GroupName = "FileRecord")]
|
||||
public class TrialTrianingRecordService(IRepository<TrialTrianingRecord> _trialTrianingRecordRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialTrianingRecordService
|
||||
{
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<TrialTrianingRecordView>> GetTrialTrianingRecordList(TrialTrianingRecordQuery inQuery)
|
||||
{
|
||||
|
||||
var trialTrianingRecordQueryable = _trialTrianingRecordRepository
|
||||
.ProjectTo<TrialTrianingRecordView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await trialTrianingRecordQueryable.ToPagedListAsync(inQuery);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateTrialTrianingRecord(TrialTrianingRecordAddOrEdit addOrEditTrialTrianingRecord)
|
||||
{
|
||||
// 在此处拷贝automapper 映射
|
||||
|
||||
|
||||
|
||||
var entity = await _trialTrianingRecordRepository.InsertOrUpdateAsync(addOrEditTrialTrianingRecord, true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete("{trialTrianingRecordId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTrialTrianingRecord(Guid trialTrianingRecordId)
|
||||
{
|
||||
var success = await _trialTrianingRecordRepository.DeleteFromQueryAsync(t => t.Id == trialTrianingRecordId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -87,6 +87,26 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
CreateMap<TrialEmailNoticeUser, EmailUserInfoDto>();
|
||||
|
||||
|
||||
|
||||
|
||||
CreateMap<SysFileType, SysFileTypeView>();
|
||||
CreateMap<SysFileType, SysFileTypeAddOrEdit>().ReverseMap();
|
||||
|
||||
CreateMap<TrialFileType, TrialFileTypeView>();
|
||||
CreateMap<TrialFileType, TrialFileTypeAddOrEdit>().ReverseMap();
|
||||
|
||||
CreateMap<TrialFinalRecord, TrialFinalRecordView>();
|
||||
CreateMap<TrialFinalRecord, TrialFinalRecordAddOrEdit>().ReverseMap();
|
||||
|
||||
CreateMap<TrialNormalRecord, TrialNormalRecordView>();
|
||||
CreateMap<TrialNormalRecord, TrialNormalRecordAddOrEdit>().ReverseMap();
|
||||
|
||||
CreateMap<TrialTrianingRecord, TrialTrianingRecordView>();
|
||||
CreateMap<TrialTrianingRecord, TrialTrianingRecordAddOrEdit>().ReverseMap();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user