This commit is contained in:
itcsx committed 2026-09-15 08:58:09 +08:00
commit fcbeba7287
7 files changed
+169 -154

No files matched your search

@@ -396,11 +396,17 @@ namespace CloudBuilder.Master.Service
[UnitOfWork] [UnitOfWork]
public FamilyTreeData Update(FamilyTreeData data) public FamilyTreeData Update(FamilyTreeData data)
{ {
FamilyTreeEntity d = repository.DetachedEntities.Where(x => x.TreeName == data.FamilyTree.TreeName).FirstOrDefault(); FamilyTreeEntity d = null;
if (d == null) if (data.FamilyTree.TreeName != data.FamilyTree.OrgTreeName)
{ {
throw new ValidatedException("家族名称不存在."); d = repository.DetachedEntities.Where(x => x.TreeName == data.FamilyTree.TreeName).FirstOrDefault();
if (d != null)
{
throw new ValidatedException("家族名称已存在.");
} }
}
d = repository.DetachedEntities.Where(x => x.TreeId == data.FamilyTree.TreeId).FirstOrDefault();
Validate(data.FamilyTree); Validate(data.FamilyTree);
@@ -26,5 +26,7 @@ namespace CloudBuilder.Master.Data
public string? AncestorPersonGenealogyName { get; set; } public string? AncestorPersonGenealogyName { get; set; }
public string? OrgTreeName { get; set; }
} }
} }
@@ -105,7 +105,8 @@ builder.Entity<DmsFileUploadDeleteLogViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<DmsFileUploadDeleteLogViewEntity>(eb => { eb.HasNoKey(); }); builder.Entity<DmsFileUploadDeleteLogViewEntity>(eb => { eb.HasNoKey(); });
//***END***
//***END***
} }
} }
} }
@@ -14,140 +14,144 @@ namespace CloudBuilder.Master.Entity
{ {
} }
[Column("created_datetime")]
public DateTime CreatedDatetime { get; set; }
[Column("created_by")]
public string CreatedBy { get; set; }
[Column("updated_datetime")]
public DateTime UpdatedDatetime { get; set; }
[Column("updated_by")]
public string UpdatedBy { get; set; }
[Key]
[Column("person_id")]
public string PersonId { get; set; }
[Column("avatar_filename")]
public string? AvatarFilename { get; set; }
[Column("surname")]
public string Surname { get; set; }
[Column("genealogy_name")]
public string? GenealogyName { get; set; }
[Column("common_name")]
public string? CommonName { get; set; }
[Column("alias")] [Column("alias")]
public string? Alias { get; set; } public string? Alias { get; set; }
[Column("zi")] [Column("avatar_filename")]
public string? Zi { get; set; } public string? AvatarFilename { get; set; }
[Column("hao")] [Column("bind_user_id")]
public string? Hao { get; set; } public string? BindUserId { get; set; }
[Column("father_id")]
public string? FatherId { get; set; }
[Column("mother_name")]
public string? MotherName { get; set; }
[Column("birth_order")]
public string? BirthOrder { get; set; }
[Column("gender")]
public string? Gender { get; set; }
[Column("marital_status")]
public string? MaritalStatus { get; set; }
[Column("school")]
public string? School { get; set; }
[Column("major")]
public string? Major { get; set; }
[Column("education")]
public string? Education { get; set; }
[Column("graduation_status")]
public string? GraduationStatus { get; set; }
[Column("duty")]
public string? Duty { get; set; }
[Column("title")]
public string? Title { get; set; }
[Column("birth_text")]
public string? BirthText { get; set; }
[Column("birth_date")] [Column("birth_date")]
public Nullable<DateTime> BirthDate { get; set; } public Nullable<DateTime> BirthDate { get; set; }
[Column("death_text")] [Column("birth_order")]
public string? DeathText { get; set; } public string? BirthOrder { get; set; }
[Column("birth_text")]
public string? BirthText { get; set; }
[Column("common_name")]
public string? CommonName { get; set; }
[Column("created_by")]
public string CreatedBy { get; set; }
[Column("created_datetime")]
public DateTime CreatedDatetime { get; set; }
[Column("death_date")] [Column("death_date")]
public Nullable<DateTime> DeathDate { get; set; } public Nullable<DateTime> DeathDate { get; set; }
[Column("privacy")] [Column("death_text")]
public string? Privacy { get; set; } public string? DeathText { get; set; }
[Column("live_status")] [Column("duty")]
public string LiveStatus { get; set; } public string? Duty { get; set; }
[Column("education")]
public string? Education { get; set; }
[Column("father_id")]
public string? FatherId { get; set; }
[Column("gender")]
public string? Gender { get; set; }
[Column("genealogy_name")]
public string? GenealogyName { get; set; }
[Column("graduation_status")]
public string? GraduationStatus { get; set; }
[Column("hao")]
public string? Hao { get; set; }
[Column("introduction")] [Column("introduction")]
public string? Introduction { get; set; } public string? Introduction { get; set; }
[Column("is_bind_user")] [Column("is_bind_user")]
public string? IsBindUser { get; set; } public string? IsBindUser { get; set; }
[Column("bind_user_id")] [Column("live_status")]
public string? BindUserId { get; set; } public string LiveStatus { get; set; }
[Column("major")]
public string? Major { get; set; }
[Column("marital_status")]
public string? MaritalStatus { get; set; }
[Column("mother_name")]
public string? MotherName { get; set; }
[Key]
[Column("person_id")]
public string PersonId { get; set; }
[Column("privacy")]
public string? Privacy { get; set; }
[Column("school")]
public string? School { get; set; }
[Column("surname")]
public string Surname { get; set; }
[Column("title")]
public string? Title { get; set; }
[Column("tree_id")]
public string TreeId { get; set; }
[Column("updated_by")]
public string UpdatedBy { get; set; }
[Column("updated_datetime")]
public DateTime UpdatedDatetime { get; set; }
[Column("zi")]
public string? Zi { get; set; }
public const string CREATED_DATETIME = "CreatedDatetime";
public const string CREATED_BY = "CreatedBy";
public const string UPDATED_DATETIME = "UpdatedDatetime";
public const string UPDATED_BY = "UpdatedBy";
public const string PERSON_ID = "PersonId";
public const string AVATAR_FILENAME = "AvatarFilename";
public const string SURNAME = "Surname";
public const string GENEALOGY_NAME = "GenealogyName";
public const string COMMON_NAME = "CommonName";
public const string ALIAS = "Alias"; public const string ALIAS = "Alias";
public const string ZI = "Zi"; public const string AVATAR_FILENAME = "AvatarFilename";
public const string HAO = "Hao"; public const string BIND_USER_ID = "BindUserId";
public const string FATHER_ID = "FatherId";
public const string MOTHER_NAME = "MotherName";
public const string BIRTH_ORDER = "BirthOrder";
public const string GENDER = "Gender";
public const string MARITAL_STATUS = "MaritalStatus";
public const string SCHOOL = "School";
public const string MAJOR = "Major";
public const string EDUCATION = "Education";
public const string GRADUATION_STATUS = "GraduationStatus";
public const string DUTY = "Duty";
public const string TITLE = "Title";
public const string BIRTH_TEXT = "BirthText";
public const string BIRTH_DATE = "BirthDate"; public const string BIRTH_DATE = "BirthDate";
public const string DEATH_TEXT = "DeathText"; public const string BIRTH_ORDER = "BirthOrder";
public const string BIRTH_TEXT = "BirthText";
public const string COMMON_NAME = "CommonName";
public const string CREATED_BY = "CreatedBy";
public const string CREATED_DATETIME = "CreatedDatetime";
public const string DEATH_DATE = "DeathDate"; public const string DEATH_DATE = "DeathDate";
public const string PRIVACY = "Privacy"; public const string DEATH_TEXT = "DeathText";
public const string LIVE_STATUS = "LiveStatus"; public const string DUTY = "Duty";
public const string EDUCATION = "Education";
public const string FATHER_ID = "FatherId";
public const string GENDER = "Gender";
public const string GENEALOGY_NAME = "GenealogyName";
public const string GRADUATION_STATUS = "GraduationStatus";
public const string HAO = "Hao";
public const string INTRODUCTION = "Introduction"; public const string INTRODUCTION = "Introduction";
public const string IS_BIND_USER = "IsBindUser"; public const string IS_BIND_USER = "IsBindUser";
public const string BIND_USER_ID = "BindUserId"; public const string LIVE_STATUS = "LiveStatus";
public const string MAJOR = "Major";
public const string MARITAL_STATUS = "MaritalStatus";
public const string MOTHER_NAME = "MotherName";
public const string PERSON_ID = "PersonId";
public const string PRIVACY = "Privacy";
public const string SCHOOL = "School";
public const string SURNAME = "Surname";
public const string TITLE = "Title";
public const string TREE_ID = "TreeId";
public const string UPDATED_BY = "UpdatedBy";
public const string UPDATED_DATETIME = "UpdatedDatetime";
public const string ZI = "Zi";
public const string DB_NAME_FAMILY_PERSON = "family_person"; public const string DB_NAME_FAMILY_PERSON = "family_person";
public const string DB_NAME_FIELDS="created_datetime,created_by,updated_datetime,updated_by,person_id,avatar_filename,surname,genealogy_name,common_name,alias,zi,hao,father_id,mother_name,birth_order,gender,marital_status,school,major,education,graduation_status,duty,title,birth_text,birth_date,death_text,death_date,privacy,live_status,introduction,is_bind_user,bind_user_id"; public const string DB_NAME_FIELDS="alias,avatar_filename,bind_user_id,birth_date,birth_order,birth_text,common_name,created_by,created_datetime,death_date,death_text,duty,education,father_id,gender,genealogy_name,graduation_status,hao,introduction,is_bind_user,live_status,major,marital_status,mother_name,person_id,privacy,school,surname,title,tree_id,updated_by,updated_datetime,zi";
public const string DB_CREATED_DATETIME = "created_datetime";
public const string DB_CREATED_BY = "created_by";
public const string DB_UPDATED_DATETIME = "updated_datetime";
public const string DB_UPDATED_BY = "updated_by";
public const string DB_PERSON_ID = "person_id";
public const string DB_AVATAR_FILENAME = "avatar_filename";
public const string DB_SURNAME = "surname";
public const string DB_GENEALOGY_NAME = "genealogy_name";
public const string DB_COMMON_NAME = "common_name";
public const string DB_ALIAS = "alias"; public const string DB_ALIAS = "alias";
public const string DB_ZI = "zi"; public const string DB_AVATAR_FILENAME = "avatar_filename";
public const string DB_HAO = "hao"; public const string DB_BIND_USER_ID = "bind_user_id";
public const string DB_FATHER_ID = "father_id";
public const string DB_MOTHER_NAME = "mother_name";
public const string DB_BIRTH_ORDER = "birth_order";
public const string DB_GENDER = "gender";
public const string DB_MARITAL_STATUS = "marital_status";
public const string DB_SCHOOL = "school";
public const string DB_MAJOR = "major";
public const string DB_EDUCATION = "education";
public const string DB_GRADUATION_STATUS = "graduation_status";
public const string DB_DUTY = "duty";
public const string DB_TITLE = "title";
public const string DB_BIRTH_TEXT = "birth_text";
public const string DB_BIRTH_DATE = "birth_date"; public const string DB_BIRTH_DATE = "birth_date";
public const string DB_DEATH_TEXT = "death_text"; public const string DB_BIRTH_ORDER = "birth_order";
public const string DB_BIRTH_TEXT = "birth_text";
public const string DB_COMMON_NAME = "common_name";
public const string DB_CREATED_BY = "created_by";
public const string DB_CREATED_DATETIME = "created_datetime";
public const string DB_DEATH_DATE = "death_date"; public const string DB_DEATH_DATE = "death_date";
public const string DB_PRIVACY = "privacy"; public const string DB_DEATH_TEXT = "death_text";
public const string DB_LIVE_STATUS = "live_status"; public const string DB_DUTY = "duty";
public const string DB_EDUCATION = "education";
public const string DB_FATHER_ID = "father_id";
public const string DB_GENDER = "gender";
public const string DB_GENEALOGY_NAME = "genealogy_name";
public const string DB_GRADUATION_STATUS = "graduation_status";
public const string DB_HAO = "hao";
public const string DB_INTRODUCTION = "introduction"; public const string DB_INTRODUCTION = "introduction";
public const string DB_IS_BIND_USER = "is_bind_user"; public const string DB_IS_BIND_USER = "is_bind_user";
public const string DB_BIND_USER_ID = "bind_user_id"; public const string DB_LIVE_STATUS = "live_status";
public const string DB_MAJOR = "major";
public const string DB_MARITAL_STATUS = "marital_status";
public const string DB_MOTHER_NAME = "mother_name";
public const string DB_PERSON_ID = "person_id";
public const string DB_PRIVACY = "privacy";
public const string DB_SCHOOL = "school";
public const string DB_SURNAME = "surname";
public const string DB_TITLE = "title";
public const string DB_TREE_ID = "tree_id";
public const string DB_UPDATED_BY = "updated_by";
public const string DB_UPDATED_DATETIME = "updated_datetime";
public const string DB_ZI = "zi";
private string ProviderName { get; set; } private string ProviderName { get; set; }
@@ -168,45 +172,46 @@ namespace CloudBuilder.Master.Entity
throw new NullReferenceException("Source entity is null."); throw new NullReferenceException("Source entity is null.");
} }
this.CreatedDatetime = source.CreatedDatetime;
this.CreatedBy = source.CreatedBy;
this.UpdatedDatetime = source.UpdatedDatetime;
this.UpdatedBy = source.UpdatedBy;
this.PersonId = source.PersonId;
this.AvatarFilename = source.AvatarFilename;
this.Surname = source.Surname;
this.GenealogyName = source.GenealogyName;
this.CommonName = source.CommonName;
this.Alias = source.Alias; this.Alias = source.Alias;
this.Zi = source.Zi; this.AvatarFilename = source.AvatarFilename;
this.Hao = source.Hao; this.BindUserId = source.BindUserId;
this.FatherId = source.FatherId;
this.MotherName = source.MotherName;
this.BirthOrder = source.BirthOrder;
this.Gender = source.Gender;
this.MaritalStatus = source.MaritalStatus;
this.School = source.School;
this.Major = source.Major;
this.Education = source.Education;
this.GraduationStatus = source.GraduationStatus;
this.Duty = source.Duty;
this.Title = source.Title;
this.BirthText = source.BirthText;
this.BirthDate = source.BirthDate; this.BirthDate = source.BirthDate;
this.DeathText = source.DeathText; this.BirthOrder = source.BirthOrder;
this.BirthText = source.BirthText;
this.CommonName = source.CommonName;
this.CreatedBy = source.CreatedBy;
this.CreatedDatetime = source.CreatedDatetime;
this.DeathDate = source.DeathDate; this.DeathDate = source.DeathDate;
this.Privacy = source.Privacy; this.DeathText = source.DeathText;
this.LiveStatus = source.LiveStatus; this.Duty = source.Duty;
this.Education = source.Education;
this.FatherId = source.FatherId;
this.Gender = source.Gender;
this.GenealogyName = source.GenealogyName;
this.GraduationStatus = source.GraduationStatus;
this.Hao = source.Hao;
this.Introduction = source.Introduction; this.Introduction = source.Introduction;
this.IsBindUser = source.IsBindUser; this.IsBindUser = source.IsBindUser;
this.BindUserId = source.BindUserId; this.LiveStatus = source.LiveStatus;
this.Major = source.Major;
this.MaritalStatus = source.MaritalStatus;
this.MotherName = source.MotherName;
this.PersonId = source.PersonId;
this.Privacy = source.Privacy;
this.School = source.School;
this.Surname = source.Surname;
this.Title = source.Title;
this.TreeId = source.TreeId;
this.UpdatedBy = source.UpdatedBy;
this.UpdatedDatetime = source.UpdatedDatetime;
this.Zi = source.Zi;
if (includeSystemFields) if (includeSystemFields)
{ {
this.CreatedDatetime = source.CreatedDatetime;
this.CreatedBy = source.CreatedBy; this.CreatedBy = source.CreatedBy;
this.UpdatedDatetime = source.UpdatedDatetime; this.CreatedDatetime = source.CreatedDatetime;
this.UpdatedBy = source.UpdatedBy; this.UpdatedBy = source.UpdatedBy;
this.UpdatedDatetime = source.UpdatedDatetime;
} }
} }
@@ -16,13 +16,13 @@
@on-select-change="onSelectChange" @on-select-change="onSelectChange"
> >
<template #control> <template #control>
<a-button <!-- <a-button
type="primary" type="primary"
v-if="canCreate && !isModal" v-if="canCreate && !isModal"
:icon="h(FileAddOutlined)" :icon="h(FileAddOutlined)"
@click.prevent="onCreate" @click.prevent="onCreate"
>新增</a-button >新增</a-button
> > -->
</template> </template>
<template #bodyCell="{ column, record, index }"> <template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === FamilyPersonEntity.GENDER"> <template v-if="column.dataIndex === FamilyPersonEntity.GENDER">
@@ -51,7 +51,7 @@
@click.prevent="onAmend" @click.prevent="onAmend"
>修改</a-button >修改</a-button
> >
<a-popconfirm <!-- <a-popconfirm
title="确定是否删除这条记录?" title="确定是否删除这条记录?"
ok-text="是" ok-text="是"
cancel-text="否" cancel-text="否"
@@ -65,7 +65,7 @@
:disabled="!(keys && keys.length > 0)" :disabled="!(keys && keys.length > 0)"
>删除</a-button >删除</a-button
> >
</a-popconfirm> </a-popconfirm> -->
</a-space> </a-space>
</a-row> </a-row>
</a-col> </a-col>
@@ -48,13 +48,13 @@
@click.prevent="onReset" @click.prevent="onReset"
>重置</a-button >重置</a-button
> >
<a-button <!-- <a-button
type="primary" type="primary"
:disabled="isEdit" :disabled="isEdit"
:icon="h(FileAddOutlined)" :icon="h(FileAddOutlined)"
@click.prevent="onCreate" @click.prevent="onCreate"
>新增</a-button >新增</a-button
> > -->
</a-space> </a-space>
</a-col> </a-col>
</a-row> </a-row>
@@ -479,7 +479,7 @@
@click.prevent="onAmend" @click.prevent="onAmend"
>修改</a-button >修改</a-button
> >
<a-popconfirm <!-- <a-popconfirm
:disabled="!hasData" :disabled="!hasData"
title="确定是否删除这条记录?" title="确定是否删除这条记录?"
ok-text="是" ok-text="是"
@@ -494,7 +494,7 @@
v-if="canDelete" v-if="canDelete"
>删除</a-button >删除</a-button
> >
</a-popconfirm> </a-popconfirm> -->
</a-space> </a-space>
</a-row> </a-row>
</div> </div>
@@ -187,7 +187,7 @@
<a-select <a-select
size="large" size="large"
v-model:value="data.CurrentPerson.FamilyPerson.Gender" v-model:value="data.CurrentPerson.FamilyPerson.Gender"
:disabled="!isEdit" :disabled="true"
placeholder="请选择性别" placeholder="请选择性别"
style="width: 100%" style="width: 100%"
> >
@@ -202,7 +202,7 @@
<div class="ft-label">族谱名</div> <div class="ft-label">族谱名</div>
<a-input <a-input
size="large" size="large"
:disabled="!isEdit" :disabled="true"
v-model:value="data.CurrentPerson.FamilyPerson.GenealogyName" v-model:value="data.CurrentPerson.FamilyPerson.GenealogyName"
placeholder="请输入族谱名" placeholder="请输入族谱名"
/> />
@@ -211,7 +211,7 @@
<div class="ft-label">常用名</div> <div class="ft-label">常用名</div>
<a-input <a-input
size="large" size="large"
:disabled="!isEdit" :disabled="true"
v-model:value="data.CurrentPerson.FamilyPerson.CommonName" v-model:value="data.CurrentPerson.FamilyPerson.CommonName"
placeholder="请输入常用名" placeholder="请输入常用名"
/> />
@@ -220,6 +220,7 @@
<div class="ft-label">族员ID</div> <div class="ft-label">族员ID</div>
<a-input-search <a-input-search
size="large" size="large"
:disabled="isEdit"
v-model:value="data.CurrentPerson.FamilyPerson.PersonId" v-model:value="data.CurrentPerson.FamilyPerson.PersonId"
placeholder="请输入族员ID" placeholder="请输入族员ID"
@search="onModalCurrentPerson" @search="onModalCurrentPerson"