DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
fe1bc25bf2
  1. 8
      src/Shentun.Peis.Application.Contracts/Asbitems/AsbitemDto.cs
  2. 4
      src/Shentun.Peis.Application.Contracts/Asbitems/CreateAsbitemDto.cs
  3. 4
      src/Shentun.Peis.Application.Contracts/Asbitems/UpdateAsbitemDto.cs
  4. 27
      src/Shentun.Peis.Application.Contracts/CollectItemTypes/CollectItemTypeDto.cs
  5. 11
      src/Shentun.Peis.Application.Contracts/CollectItemTypes/CollectItemTypeIdInputDto.cs
  6. 22
      src/Shentun.Peis.Application.Contracts/CollectItemTypes/CreateCollectItemTypeDto.cs
  7. 23
      src/Shentun.Peis.Application.Contracts/CollectItemTypes/UpdateCollectItemTypeDto.cs
  8. 1
      src/Shentun.Peis.Application/Asbitems/AsbitemAppService.cs
  9. 164
      src/Shentun.Peis.Application/CollectItemTypes/CollectItemTypeAppService.cs
  10. 7
      src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs
  11. 2
      src/Shentun.Peis.Domain/CollectItemTypes/CollectItemType.cs
  12. 116
      src/Shentun.Peis.Domain/CollectItemTypes/CollectItemTypeManager.cs
  13. 16
      src/Shentun.Peis.Domain/HelperDto/UpdateSortManyDto.cs
  14. 33
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/CollectItemTypes/CollectItemTypeDbMapping.cs
  15. 7
      src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
  16. 14165
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240502143341_init20240502003.Designer.cs
  17. 242
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240502143341_init20240502003.cs
  18. 152
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

8
src/Shentun.Peis.Application.Contracts/Asbitems/AsbitemDto.cs

@ -42,10 +42,10 @@ namespace Shentun.Peis.Asbitems
public Guid? DeviceTypeId { get; set; }
///// <summary>
///// 发票类别
///// </summary>
//public Guid InvoiceItemTypeId { get; set; }
/// <summary>
/// 汇总项目类别ID
/// </summary>
public Guid CollectItemTypeId { get; set; }
/// <summary>

4
src/Shentun.Peis.Application.Contracts/Asbitems/CreateAsbitemDto.cs

@ -40,9 +40,9 @@ namespace Shentun.Peis.Asbitems
/// <summary>
/// 发票类别
/// 汇总项目类别ID
/// </summary>
public Guid InvoiceItemTypeId { get; set; }
public Guid CollectItemTypeId { get; set; }
/// <summary>

4
src/Shentun.Peis.Application.Contracts/Asbitems/UpdateAsbitemDto.cs

@ -40,9 +40,9 @@ namespace Shentun.Peis.Asbitems
/// <summary>
/// 发票类别
/// 汇总项目类别ID
/// </summary>
public Guid InvoiceItemTypeId { get; set; }
public Guid CollectItemTypeId { get; set; }
/// <summary>

27
src/Shentun.Peis.Application.Contracts/CollectItemTypes/CollectItemTypeDto.cs

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace Shentun.Peis.CollectItemTypes
{
public class CollectItemTypeDto : AuditedEntityDtoName
{
/// <summary>
/// 名称
/// </summary>
public string DisplayName { get; set; }
public string SimpleCode { get; set; }
/// <summary>
/// 发票项目类别ID
/// </summary>
public Guid InvoiceItemTypeId { get; set; }
public int DisplayOrder { get; set; }
}
}

11
src/Shentun.Peis.Application.Contracts/CollectItemTypes/CollectItemTypeIdInputDto.cs

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.CollectItemTypes
{
public class CollectItemTypeIdInputDto
{
public Guid Id { get; set; }
}
}

22
src/Shentun.Peis.Application.Contracts/CollectItemTypes/CreateCollectItemTypeDto.cs

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace Shentun.Peis.CollectItemTypes
{
public class CreateCollectItemTypeDto
{
/// <summary>
/// 名称
/// </summary>
public string DisplayName { get; set; }
/// <summary>
/// 发票项目类别ID
/// </summary>
public Guid InvoiceItemTypeId { get; set; }
}
}

23
src/Shentun.Peis.Application.Contracts/CollectItemTypes/UpdateCollectItemTypeDto.cs

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.CollectItemTypes
{
public class UpdateCollectItemTypeDto
{
public Guid Id { get; set; }
/// <summary>
/// 名称
/// </summary>
public string DisplayName { get; set; }
/// <summary>
/// 发票项目类别ID
/// </summary>
public Guid InvoiceItemTypeId { get; set; }
}
}

1
src/Shentun.Peis.Application/Asbitems/AsbitemAppService.cs

@ -122,6 +122,7 @@ namespace Shentun.Peis.Asbitems
DisplayOrder = s.a.DisplayOrder,
ForSexId = s.a.ForSexId,
Id = s.a.Id,
CollectItemTypeId = s.a.CollectItemTypeId,
//InvoiceItemTypeId = s.a.InvoiceItemTypeId,
IsActive = s.a.IsActive,
IsBeforeEat = s.a.IsBeforeEat,

164
src/Shentun.Peis.Application/CollectItemTypes/CollectItemTypeAppService.cs

@ -0,0 +1,164 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Shentun.Peis.ColumnReferences;
using Shentun.Peis.HelperDto;
using Shentun.Peis.InvoiceItemTypes;
using Shentun.Peis.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity;
using Volo.Abp.Users;
namespace Shentun.Peis.CollectItemTypes
{
/// <summary>
/// 汇总项目类别
/// </summary>
[ApiExplorerSettings(GroupName = "Work")]
[Authorize]
public class CollectItemTypeAppService : ApplicationService
{
private readonly IRepository<CollectItemType, Guid> _collectItemTypeRepository;
private readonly CacheService _cacheService;
private readonly CollectItemTypeManager _manager;
private readonly IRepository<IdentityUser, Guid> _userRepository;
public CollectItemTypeAppService(
IRepository<CollectItemType, Guid> collectItemTypeRepository,
IRepository<IdentityUser, Guid> userRepository,
CollectItemTypeManager manager,
CacheService cacheService)
{
_collectItemTypeRepository = collectItemTypeRepository;
_cacheService = cacheService;
_manager = manager;
_userRepository = userRepository;
}
/// <summary>
/// 根据ID查实体内容
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/CollectItemType/GetById")]
public async Task<CollectItemTypeDto> GetByIdAsync(CollectItemTypeIdInputDto input)
{
var entity = await _collectItemTypeRepository.GetAsync(input.Id);
var entityDto = ObjectMapper.Map<CollectItemType, CollectItemTypeDto>(entity);
entityDto.CreatorName = _cacheService.GetSurnameAsync(entityDto.CreatorId).Result;
entityDto.LastModifierName = _cacheService.GetSurnameAsync(entityDto.LastModifierId).Result;
return entityDto;
}
/// <summary>
/// 查询列表
/// </summary>
/// <returns></returns>
[HttpPost("api/app/CollectItemType/GetList")]
public async Task<List<CollectItemTypeDto>> GetListAsync()
{
var userQueryable = await _userRepository.GetQueryableAsync();
var entlist = (from a in await _collectItemTypeRepository.GetQueryableAsync()
join b in userQueryable on a.CreatorId equals b.Id into bb
from ab in bb.DefaultIfEmpty()
join c in userQueryable on a.LastModifierId equals c.Id into cc
from ac in cc.DefaultIfEmpty()
select new
{
a,
CreatorName = ab != null ? ab.Surname : "",
LastModifierName = ac != null ? ac.Surname : ""
})
.Select(s => new CollectItemTypeDto
{
CreationTime = s.a.CreationTime,
CreatorId = s.a.CreatorId,
LastModifierId = s.a.LastModifierId,
Id = s.a.Id,
DisplayOrder = s.a.DisplayOrder,
DisplayName = s.a.DisplayName,
InvoiceItemTypeId = s.a.InvoiceItemTypeId,
SimpleCode = s.a.SimpleCode,
LastModificationTime = s.a.LastModificationTime,
CreatorName = s.CreatorName,
LastModifierName = s.LastModifierName
}).OrderBy(o => o.DisplayOrder).ToList();
return entlist;
}
/// <summary>
/// 创建
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/CollectItemType/Create")]
public async Task<CollectItemTypeDto> CreateAsync(CreateCollectItemTypeDto input)
{
var createEntity = ObjectMapper.Map<CreateCollectItemTypeDto, CollectItemType>(input);
var entity = await _manager.CreateAsync(createEntity);
entity = await _collectItemTypeRepository.InsertAsync(entity);
var dto = ObjectMapper.Map<CollectItemType, CollectItemTypeDto>(entity);
return dto;
}
/// <summary>
/// 修改
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/CollectItemType/Update")]
public async Task<CollectItemTypeDto> UpdateAsync(UpdateCollectItemTypeDto input)
{
var entity = await _collectItemTypeRepository.GetAsync(input.Id);
var sourceEntity = ObjectMapper.Map<UpdateCollectItemTypeDto, CollectItemType>(input);
await _manager.UpdateAsync(sourceEntity, entity);
entity = await _collectItemTypeRepository.UpdateAsync(entity);
return ObjectMapper.Map<CollectItemType, CollectItemTypeDto>(entity);
}
/// <summary>
/// 删除
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/CollectItemType/Delete")]
public async Task DeleteAsync(CollectItemTypeIdInputDto input)
{
var entity = await _collectItemTypeRepository.GetAsync(input.Id);
await _manager.CheckAndDeleteAsync(entity);
}
/// <summary>
/// 修改排序 置顶,置底
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/CollectItemType/UpdateManySort")]
public async Task UpdateManySortAsync(UpdateManySortInput input)
{
await _manager.UpdateManySortAsync(input.Id, input.SortType);
}
/// <summary>
/// 修改排序 拖拽
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/CollectItemType/UpdateSortMany")]
public async Task UpdateSortManyAsync(UpdateSortManyDto input)
{
await _manager.UpdateSortManyAsync(input);
}
}
}

7
src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs

@ -6,6 +6,7 @@ using Shentun.Peis.BirthPlaces;
using Shentun.Peis.Books;
using Shentun.Peis.CardRegisters;
using Shentun.Peis.CardTypes;
using Shentun.Peis.CollectItemTypes;
using Shentun.Peis.ColumnReferences;
using Shentun.Peis.CommonChars;
using Shentun.Peis.CommonCharTypes;
@ -456,7 +457,11 @@ public class PeisApplicationAutoMapperProfile : Profile
CreateMap<ThirdInterface, ThirdInterfaceDto>();
CreateMap<CreateThirdInterfaceDto, ThirdInterface>();
CreateMap<UpdateThirdInterfaceDto, ThirdInterface>();
CreateMap<CollectItemType, CollectItemTypeDto>();
CreateMap<CreateCollectItemTypeDto, CollectItemType>();
CreateMap<UpdateCollectItemTypeDto, CollectItemType>();
}
}

2
src/Shentun.Peis.Domain/CollectItemTypes/CollectItemType.cs

@ -9,7 +9,7 @@ using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using Shentun.Peis.Models;
namespace Shentun.Peis.CollectItemTypes
namespace Shentun.Peis.Models
{
/// <summary>
/// 汇总项目类别

116
src/Shentun.Peis.Domain/CollectItemTypes/CollectItemTypeManager.cs

@ -0,0 +1,116 @@
using Shentun.Peis.Enums;
using Shentun.Peis.HelperDto;
using Shentun.Peis.Models;
using Shentun.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Domain.Services;
namespace Shentun.Peis.CollectItemTypes
{
public class CollectItemTypeManager : DomainService
{
private readonly IRepository<CollectItemType, Guid> _repository;
private readonly IRepository<Asbitem, Guid> _asbitemRepository;
public CollectItemTypeManager(
IRepository<CollectItemType, Guid> repository,
IRepository<Asbitem, Guid> asbitemRepository)
{
_repository = repository;
_asbitemRepository = asbitemRepository;
}
/// <summary>
/// 创建
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
public async Task<CollectItemType> CreateAsync(
CollectItemType entity
)
{
Verify(entity);
await EntityHelper.CheckSameName(_repository, entity.DisplayName);
return new CollectItemType(
GuidGenerator.Create()
)
{
DisplayName = entity.DisplayName,
InvoiceItemTypeId = entity.InvoiceItemTypeId,
SimpleCode = LanguageConverter.GetPYSimpleCode(entity.DisplayName),
DisplayOrder = await EntityHelper.CreateMaxDisplayOrder(_repository)
};
}
public async Task UpdateAsync(
CollectItemType sourceEntity,
CollectItemType targetEntity
)
{
DataHelper.CheckEntityIsNull(targetEntity);
Verify(sourceEntity);
if (sourceEntity.DisplayName != targetEntity.DisplayName)
{
await EntityHelper.CheckSameName<CollectItemType, Guid>(_repository, sourceEntity.DisplayName, targetEntity);
targetEntity.DisplayName = sourceEntity.DisplayName;
targetEntity.SimpleCode = LanguageConverter.GetPYSimpleCode(sourceEntity.DisplayName);
}
targetEntity.InvoiceItemTypeId = sourceEntity.InvoiceItemTypeId;
}
public async Task CheckAndDeleteAsync(CollectItemType entity)
{
var asbitemEnt = await _asbitemRepository.FirstOrDefaultAsync(m => m.CollectItemTypeId == entity.Id);
if (asbitemEnt != null)
{
throw new UserFriendlyException($"汇总项目类别\"{entity.DisplayName}\"已被组合项目\"{asbitemEnt.DisplayName}\"使用,不能删除");
}
await _repository.DeleteAsync(entity);
}
/// <summary>
/// 修改排序 置顶,置底
/// </summary>
/// <param name="id">需要修改的ID</param>
/// <param name="SortType">修改方式:1 置顶 2 置底</param>
/// <returns></returns>
public async Task UpdateManySortAsync(Guid id, int SortType)
{
await EntityHelper.UpdateManySortAsync(_repository, id, SortType);
}
/// <summary>
/// 修改排序 拖拽
/// </summary>
/// <typeparam name="TEntity"></typeparam>
/// <param name="repository"></param>
/// <param name="input"></param>
/// <returns></returns>
public async Task UpdateSortManyAsync(UpdateSortManyDto input)
{
await EntityHelper.UpdateSortManyAsync(_repository, input);
}
private void Verify(CollectItemType entity)
{
DataHelper.CheckEntityIsNull(entity);
DataHelper.CheckStringIsNull(entity.DisplayName, "名称");
DataHelper.CheckGuidIsDefaultValue(entity.InvoiceItemTypeId, "配置参数");
}
}
}

16
src/Shentun.Peis.Domain/HelperDto/UpdateSortManyDto.cs

@ -54,4 +54,20 @@ namespace Shentun.Peis.HelperDto
public int DisplayOrder { get; set; }
}
/// <summary>
/// 修改排序 置顶,置底
/// </summary>
public class UpdateManySortInput
{
/// <summary>
/// 需要修改的ID
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// 修改方式:1 置顶 2 置底
/// </summary>
public int SortType { get; set; }
}
}

33
src/Shentun.Peis.EntityFrameworkCore/DbMapping/CollectItemTypes/CollectItemTypeDbMapping.cs

@ -0,0 +1,33 @@
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;
using Shentun.Peis.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Shentun.Peis.CollectItemTypes;
using Shentun.Peis.EntityFrameworkCore;
namespace Shentun.Peis.DbMapping
{
internal class CollectItemTypeDbMapping : IEntityTypeConfiguration<CollectItemType>
{
public void Configure(EntityTypeBuilder<CollectItemType> entity)
{
entity.HasComment("汇总项目类别");
entity.Property(t => t.DisplayName).HasComment("名称").IsRequired();
entity.Property(t => t.DisplayOrder).HasComment("显示顺序").IsRequired();
entity.Property(t => t.InvoiceItemTypeId).HasComment("发票项目类别ID").IsRequired();
entity.Property(t => t.SimpleCode).HasComment("简码").IsRequired();
entity.Property(e => e.Id)
.IsFixedLength()
.HasComment("编号").HasColumnName("id");
entity.ConfigureByConvention();
}
}
}

7
src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs

@ -331,6 +331,10 @@ public class PeisDbContext :
#region 第三方接口
public DbSet<ThirdInterface> ThirdInterfaces { get; set; } = null!;
#endregion
public DbSet<CollectItemType> CollectItemTypes { get; set; } = null!;
public PeisDbContext(DbContextOptions<PeisDbContext> options)
: base(options)
{
@ -561,7 +565,8 @@ public class PeisDbContext :
.ApplyConfiguration(new ThirdLisRequestDbMapping())
.ApplyConfiguration(new ChargeRequestDbMapping())
.ApplyConfiguration(new ChargeRequestAsbitemDbMapping())
.ApplyConfiguration(new ThirdInterfaceDbMapping());
.ApplyConfiguration(new ThirdInterfaceDbMapping())
.ApplyConfiguration(new CollectItemTypeDbMapping());
#endregion

14165
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240502143341_init20240502003.Designer.cs
File diff suppressed because it is too large
View File

242
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240502143341_init20240502003.cs

@ -0,0 +1,242 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class init20240502003 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Id",
table: "collect_item_type",
newName: "id");
migrationBuilder.RenameColumn(
name: "LastModifierId",
table: "collect_item_type",
newName: "last_modifier_id");
migrationBuilder.RenameColumn(
name: "LastModificationTime",
table: "collect_item_type",
newName: "last_modification_time");
migrationBuilder.RenameColumn(
name: "CreatorId",
table: "collect_item_type",
newName: "creator_id");
migrationBuilder.RenameColumn(
name: "CreationTime",
table: "collect_item_type",
newName: "creation_time");
migrationBuilder.RenameColumn(
name: "ConcurrencyStamp",
table: "collect_item_type",
newName: "concurrency_stamp");
migrationBuilder.AlterTable(
name: "collect_item_type",
comment: "汇总项目类别");
migrationBuilder.AlterColumn<string>(
name: "simple_code",
table: "collect_item_type",
type: "character varying(50)",
maxLength: 50,
nullable: false,
defaultValue: "",
comment: "简码",
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<Guid>(
name: "invoice_item_type_id",
table: "collect_item_type",
type: "uuid",
nullable: false,
comment: "发票项目类别ID",
oldClrType: typeof(Guid),
oldType: "uuid");
migrationBuilder.AlterColumn<int>(
name: "display_order",
table: "collect_item_type",
type: "integer",
nullable: false,
comment: "显示顺序",
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn<string>(
name: "display_name",
table: "collect_item_type",
type: "character varying(50)",
maxLength: 50,
nullable: false,
defaultValue: "",
comment: "名称",
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<Guid>(
name: "id",
table: "collect_item_type",
type: "uuid",
fixedLength: true,
nullable: false,
comment: "编号",
oldClrType: typeof(Guid),
oldType: "uuid");
migrationBuilder.AlterColumn<Guid>(
name: "last_modifier_id",
table: "collect_item_type",
type: "uuid",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
oldClrType: typeof(Guid),
oldType: "uuid",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "last_modification_time",
table: "collect_item_type",
type: "timestamp without time zone",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<Guid>(
name: "creator_id",
table: "collect_item_type",
type: "uuid",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
oldClrType: typeof(Guid),
oldType: "uuid",
oldNullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "id",
table: "collect_item_type",
newName: "Id");
migrationBuilder.RenameColumn(
name: "last_modifier_id",
table: "collect_item_type",
newName: "LastModifierId");
migrationBuilder.RenameColumn(
name: "last_modification_time",
table: "collect_item_type",
newName: "LastModificationTime");
migrationBuilder.RenameColumn(
name: "creator_id",
table: "collect_item_type",
newName: "CreatorId");
migrationBuilder.RenameColumn(
name: "creation_time",
table: "collect_item_type",
newName: "CreationTime");
migrationBuilder.RenameColumn(
name: "concurrency_stamp",
table: "collect_item_type",
newName: "ConcurrencyStamp");
migrationBuilder.AlterTable(
name: "collect_item_type",
oldComment: "汇总项目类别");
migrationBuilder.AlterColumn<string>(
name: "simple_code",
table: "collect_item_type",
type: "character varying(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldComment: "简码");
migrationBuilder.AlterColumn<Guid>(
name: "invoice_item_type_id",
table: "collect_item_type",
type: "uuid",
nullable: false,
oldClrType: typeof(Guid),
oldType: "uuid",
oldComment: "发票项目类别ID");
migrationBuilder.AlterColumn<int>(
name: "display_order",
table: "collect_item_type",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldComment: "显示顺序");
migrationBuilder.AlterColumn<string>(
name: "display_name",
table: "collect_item_type",
type: "character varying(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldComment: "名称");
migrationBuilder.AlterColumn<Guid>(
name: "Id",
table: "collect_item_type",
type: "uuid",
nullable: false,
oldClrType: typeof(Guid),
oldType: "uuid",
oldFixedLength: true,
oldComment: "编号");
migrationBuilder.AlterColumn<Guid>(
name: "LastModifierId",
table: "collect_item_type",
type: "uuid",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uuid");
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "collect_item_type",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<Guid>(
name: "CreatorId",
table: "collect_item_type",
type: "uuid",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uuid");
}
}
}

152
src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

@ -414,58 +414,6 @@ namespace Shentun.Peis.Migrations
b.ToTable("test_ct");
});
modelBuilder.Entity("Shentun.Peis.CollectItemTypes.CollectItemType", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DisplayName")
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("display_name");
b.Property<int>("DisplayOrder")
.HasColumnType("integer")
.HasColumnName("display_order");
b.Property<Guid>("InvoiceItemTypeId")
.HasColumnType("uuid")
.HasColumnName("invoice_item_type_id");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("SimpleCode")
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("simple_code");
b.HasKey("Id");
b.HasIndex("InvoiceItemTypeId");
b.ToTable("collect_item_type");
});
modelBuilder.Entity("Shentun.Peis.Models.AbpUserDepartment", b =>
{
b.Property<Guid>("UserId")
@ -1901,6 +1849,72 @@ namespace Shentun.Peis.Migrations
b.HasComment("收费申请包含组合项目");
});
modelBuilder.Entity("Shentun.Peis.Models.CollectItemType", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid")
.HasColumnName("id")
.IsFixedLength()
.HasComment("编号");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("concurrency_stamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("creation_time");
b.Property<Guid?>("CreatorId")
.IsRequired()
.HasColumnType("uuid")
.HasColumnName("creator_id");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("display_name")
.HasComment("名称");
b.Property<int>("DisplayOrder")
.HasColumnType("integer")
.HasColumnName("display_order")
.HasComment("显示顺序");
b.Property<Guid>("InvoiceItemTypeId")
.HasColumnType("uuid")
.HasColumnName("invoice_item_type_id")
.HasComment("发票项目类别ID");
b.Property<DateTime?>("LastModificationTime")
.IsRequired()
.HasColumnType("timestamp without time zone")
.HasColumnName("last_modification_time");
b.Property<Guid?>("LastModifierId")
.IsRequired()
.HasColumnType("uuid")
.HasColumnName("last_modifier_id");
b.Property<string>("SimpleCode")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("simple_code")
.HasComment("简码");
b.HasKey("Id");
b.HasIndex("InvoiceItemTypeId");
b.ToTable("collect_item_type");
b.HasComment("汇总项目类别");
});
modelBuilder.Entity("Shentun.Peis.Models.ColumnReference", b =>
{
b.Property<Guid>("Id")
@ -12370,20 +12384,9 @@ namespace Shentun.Peis.Migrations
b.Navigation("TestAs");
});
modelBuilder.Entity("Shentun.Peis.CollectItemTypes.CollectItemType", b =>
{
b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType")
.WithMany("CollectItemTypes")
.HasForeignKey("InvoiceItemTypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("InvoiceItemType");
});
modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b =>
{
b.HasOne("Shentun.Peis.CollectItemTypes.CollectItemType", "CollectItemType")
b.HasOne("Shentun.Peis.Models.CollectItemType", "CollectItemType")
.WithMany("Asbitems")
.HasForeignKey("CollectItemTypeId")
.IsRequired()
@ -12622,6 +12625,17 @@ namespace Shentun.Peis.Migrations
b.Navigation("ChargeRequest");
});
modelBuilder.Entity("Shentun.Peis.Models.CollectItemType", b =>
{
b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType")
.WithMany("CollectItemTypes")
.HasForeignKey("InvoiceItemTypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("InvoiceItemType");
});
modelBuilder.Entity("Shentun.Peis.Models.ColumnReferenceCode", b =>
{
b.HasOne("Shentun.Peis.Models.ColumnReference", "ColumnReference")
@ -13721,11 +13735,6 @@ namespace Shentun.Peis.Migrations
b.Navigation("TestBs");
});
modelBuilder.Entity("Shentun.Peis.CollectItemTypes.CollectItemType", b =>
{
b.Navigation("Asbitems");
});
modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b =>
{
b.Navigation("AsbitemDetails");
@ -13789,6 +13798,11 @@ namespace Shentun.Peis.Migrations
b.Navigation("ChargeRequestAsbitems");
});
modelBuilder.Entity("Shentun.Peis.Models.CollectItemType", b =>
{
b.Navigation("Asbitems");
});
modelBuilder.Entity("Shentun.Peis.Models.ColumnReference", b =>
{
b.Navigation("ColumnReferenceCodes");

Loading…
Cancel
Save