神祖牌位管理模組,掛單模組前端URL添加HTTP_HOST
This commit is contained in:
@@ -89,6 +89,11 @@ namespace Model
|
||||
public virtual DbSet<RegionRoomBedStatus> RegionRoomBedStatus { get; set; }
|
||||
public virtual DbSet<RegionType> RegionType { get; set; }
|
||||
public virtual DbSet<Room> Room { get; set; }
|
||||
public virtual DbSet<AncestralTabletArea> AncestralTabletArea { get; set; }
|
||||
public virtual DbSet<AncestralTabletPosition> AncestralTabletPosition { get; set; }
|
||||
public virtual DbSet<AncestralTabletPositionRecord> AncestralTabletPositionRecord { get; set; }
|
||||
public virtual DbSet<AncestralTabletRegistrant> AncestralTabletRegistrant { get; set; }
|
||||
public virtual DbSet<AncestralTabletStatus> AncestralTabletStatus { get; set; }
|
||||
|
||||
public virtual int pager_eztrust(Nullable<int> startRowIndex, Nullable<int> pageSize, string tableName, string columnName, string sqlWhere, string orderBy, ObjectParameter rowCount)
|
||||
{
|
||||
|
||||
@@ -523,6 +523,139 @@ namespace Model
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class AncestralTabletArea
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
public AncestralTabletArea()
|
||||
{
|
||||
this.AncestralTabletArea1 = new HashSet<AncestralTabletArea>();
|
||||
this.AncestralTabletPosition = new HashSet<AncestralTabletPosition>();
|
||||
}
|
||||
|
||||
public int AreaId { get; set; }
|
||||
public string AreaName { get; set; }
|
||||
public string AreaCode { get; set; }
|
||||
public Nullable<int> ParentAreaId { get; set; }
|
||||
public string AreaType { get; set; }
|
||||
public Nullable<int> Price { get; set; }
|
||||
public Nullable<int> SortOrder { get; set; }
|
||||
public bool IsDisabled { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<AncestralTabletArea> AncestralTabletArea1 { get; set; }
|
||||
public virtual AncestralTabletArea AncestralTabletArea2 { get; set; }
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<AncestralTabletPosition> AncestralTabletPosition { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class AncestralTabletPosition
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
public AncestralTabletPosition()
|
||||
{
|
||||
this.AncestralTabletRegistrant = new HashSet<AncestralTabletRegistrant>();
|
||||
}
|
||||
|
||||
public int PositionId { get; set; }
|
||||
public int AreaId { get; set; }
|
||||
public string PositionCode { get; set; }
|
||||
public string PositionName { get; set; }
|
||||
public Nullable<int> Price { get; set; }
|
||||
public string StatusCode { get; set; }
|
||||
public string Description { get; set; }
|
||||
public Nullable<int> RowNo { get; set; }
|
||||
public Nullable<int> ColumnNo { get; set; }
|
||||
|
||||
public virtual AncestralTabletArea AncestralTabletArea { get; set; }
|
||||
public virtual AncestralTabletStatus AncestralTabletStatus { get; set; }
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<AncestralTabletRegistrant> AncestralTabletRegistrant { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class AncestralTabletPositionRecord
|
||||
{
|
||||
public int RecordId { get; set; }
|
||||
public string RegistrantCode { get; set; }
|
||||
public string NPTitle { get; set; }
|
||||
public System.DateTime NPStandDate { get; set; }
|
||||
public string NPYangShang { get; set; }
|
||||
public string WPContent { get; set; }
|
||||
public System.DateTime CreatedAt { get; set; }
|
||||
public Nullable<System.DateTime> UpdatedAt { get; set; }
|
||||
|
||||
public virtual AncestralTabletRegistrant AncestralTabletRegistrant { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class AncestralTabletRegistrant
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
public AncestralTabletRegistrant()
|
||||
{
|
||||
this.AncestralTabletPositionRecord = new HashSet<AncestralTabletPositionRecord>();
|
||||
}
|
||||
|
||||
public string RegistrantCode { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Phone { get; set; }
|
||||
public string Address { get; set; }
|
||||
public System.DateTime RegisterDate { get; set; }
|
||||
public Nullable<int> Price { get; set; }
|
||||
public Nullable<int> PositionId { get; set; }
|
||||
public System.DateTime StartDate { get; set; }
|
||||
public Nullable<System.DateTime> EndDate { get; set; }
|
||||
public bool IsLongTerm { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public System.DateTime CreatedAt { get; set; }
|
||||
public Nullable<System.DateTime> UpdatedAt { get; set; }
|
||||
public bool IsEnd { get; set; }
|
||||
|
||||
public virtual AncestralTabletPosition AncestralTabletPosition { get; set; }
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<AncestralTabletPositionRecord> AncestralTabletPositionRecord { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class AncestralTabletStatus
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
public AncestralTabletStatus()
|
||||
{
|
||||
this.AncestralTabletPosition = new HashSet<AncestralTabletPosition>();
|
||||
}
|
||||
|
||||
public string StatusCode { get; set; }
|
||||
public string StatusName { get; set; }
|
||||
public string StatusType { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<AncestralTabletPosition> AncestralTabletPosition { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class appellation
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
@@ -857,6 +990,12 @@ namespace Model
|
||||
|
||||
public partial class GuaDanOrder
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
public GuaDanOrder()
|
||||
{
|
||||
this.GuaDanOrderGuest = new HashSet<GuaDanOrderGuest>();
|
||||
}
|
||||
|
||||
public Nullable<System.DateTime> StartDate { get; set; }
|
||||
public Nullable<System.DateTime> EndDate { get; set; }
|
||||
public Nullable<int> CreateUser { get; set; }
|
||||
@@ -874,6 +1013,8 @@ namespace Model
|
||||
|
||||
public virtual admin admin { get; set; }
|
||||
public virtual follower followers { get; set; }
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<GuaDanOrderGuest> GuaDanOrderGuest { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
@@ -898,6 +1039,7 @@ namespace Model
|
||||
public Nullable<System.DateTime> CheckInAt { get; set; }
|
||||
public Nullable<System.DateTime> CheckOutAt { get; set; }
|
||||
public string StatusCode { get; set; }
|
||||
public Nullable<System.Guid> OrderUuid { get; set; }
|
||||
|
||||
public virtual follower followers { get; set; }
|
||||
public virtual RegionRoomBed RegionRoomBed { get; set; }
|
||||
@@ -905,6 +1047,7 @@ namespace Model
|
||||
public virtual RegionRoomBedStatus RegionRoomBedStatus { get; set; }
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<RegionAndRoomAndBedSchedule> RegionAndRoomAndBedSchedule { get; set; }
|
||||
public virtual GuaDanOrder GuaDanOrder { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
|
||||
@@ -254,6 +254,74 @@
|
||||
<Property Name="word" Type="nvarchar(max)" />
|
||||
<Property Name="systems" Type="int" />
|
||||
</EntityType>
|
||||
<EntityType Name="AncestralTabletArea">
|
||||
<Key>
|
||||
<PropertyRef Name="AreaId" />
|
||||
</Key>
|
||||
<Property Name="AreaId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="AreaName" Type="nvarchar" MaxLength="10" Nullable="false" />
|
||||
<Property Name="AreaCode" Type="nvarchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="ParentAreaId" Type="int" />
|
||||
<Property Name="AreaType" Type="nvarchar" MaxLength="10" />
|
||||
<Property Name="Price" Type="int" />
|
||||
<Property Name="SortOrder" Type="int" />
|
||||
<Property Name="IsDisabled" Type="bit" Nullable="false" />
|
||||
<Property Name="Description" Type="nvarchar" MaxLength="200" />
|
||||
</EntityType>
|
||||
<EntityType Name="AncestralTabletPosition">
|
||||
<Key>
|
||||
<PropertyRef Name="PositionId" />
|
||||
</Key>
|
||||
<Property Name="PositionId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="AreaId" Type="int" Nullable="false" />
|
||||
<Property Name="PositionCode" Type="nvarchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="PositionName" Type="nvarchar" MaxLength="50" />
|
||||
<Property Name="Price" Type="int" />
|
||||
<Property Name="StatusCode" Type="nvarchar" MaxLength="20" />
|
||||
<Property Name="Description" Type="nvarchar" MaxLength="200" />
|
||||
<Property Name="RowNo" Type="int" />
|
||||
<Property Name="ColumnNo" Type="int" />
|
||||
</EntityType>
|
||||
<EntityType Name="AncestralTabletPositionRecord">
|
||||
<Key>
|
||||
<PropertyRef Name="RecordId" />
|
||||
</Key>
|
||||
<Property Name="RecordId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="RegistrantCode" Type="nvarchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="NPTitle" Type="nvarchar" MaxLength="30" />
|
||||
<Property Name="NPStandDate" Type="date" Nullable="false" />
|
||||
<Property Name="NPYangShang" Type="nvarchar" MaxLength="20" />
|
||||
<Property Name="WPContent" Type="nvarchar" MaxLength="1000" />
|
||||
<Property Name="CreatedAt" Type="datetime" Nullable="false" />
|
||||
<Property Name="UpdatedAt" Type="datetime" />
|
||||
</EntityType>
|
||||
<EntityType Name="AncestralTabletRegistrant">
|
||||
<Key>
|
||||
<PropertyRef Name="RegistrantCode" />
|
||||
</Key>
|
||||
<Property Name="RegistrantCode" Type="nvarchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
|
||||
<Property Name="Phone" Type="nvarchar" MaxLength="50" />
|
||||
<Property Name="Address" Type="nvarchar" MaxLength="60" />
|
||||
<Property Name="RegisterDate" Type="date" Nullable="false" />
|
||||
<Property Name="Price" Type="int" />
|
||||
<Property Name="PositionId" Type="int" />
|
||||
<Property Name="StartDate" Type="date" Nullable="false" />
|
||||
<Property Name="EndDate" Type="date" />
|
||||
<Property Name="IsLongTerm" Type="bit" Nullable="false" />
|
||||
<Property Name="IsActive" Type="bit" Nullable="false" />
|
||||
<Property Name="CreatedAt" Type="datetime" Nullable="false" />
|
||||
<Property Name="UpdatedAt" Type="datetime" />
|
||||
<Property Name="IsEnd" Type="bit" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="AncestralTabletStatus">
|
||||
<Key>
|
||||
<PropertyRef Name="StatusCode" />
|
||||
</Key>
|
||||
<Property Name="StatusCode" Type="nvarchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="StatusName" Type="nvarchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="StatusType" Type="nvarchar" MaxLength="20" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="appellation">
|
||||
<Key>
|
||||
<PropertyRef Name="num" />
|
||||
@@ -454,6 +522,7 @@
|
||||
<Property Name="CheckInAt" Type="date" />
|
||||
<Property Name="CheckOutAt" Type="date" />
|
||||
<Property Name="StatusCode" Type="nvarchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="OrderUuid" Type="uniqueidentifier" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuadanTimeSetting">
|
||||
<Key>
|
||||
@@ -910,6 +979,18 @@
|
||||
<Property Name="balance_act_item" Type="int" />
|
||||
<Property Name="balance_pro_order_detail" Type="int" />
|
||||
</EntityType>
|
||||
<Association Name="FK__Ancestral__Regis__5A1A5A11">
|
||||
<End Role="AncestralTabletRegistrant" Type="Self.AncestralTabletRegistrant" Multiplicity="1" />
|
||||
<End Role="AncestralTabletPositionRecord" Type="Self.AncestralTabletPositionRecord" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="AncestralTabletRegistrant">
|
||||
<PropertyRef Name="RegistrantCode" />
|
||||
</Principal>
|
||||
<Dependent Role="AncestralTabletPositionRecord">
|
||||
<PropertyRef Name="RegistrantCode" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_accounting_accounting_kind">
|
||||
<End Role="accounting_kind" Type="Self.accounting_kind" Multiplicity="0..1" />
|
||||
<End Role="accounting" Type="Self.accounting" Multiplicity="*" />
|
||||
@@ -1178,6 +1259,18 @@
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_AncestralTabletArea_Parent">
|
||||
<End Role="AncestralTabletArea" Type="Self.AncestralTabletArea" Multiplicity="0..1" />
|
||||
<End Role="AncestralTabletArea1" Type="Self.AncestralTabletArea" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="AncestralTabletArea">
|
||||
<PropertyRef Name="AreaId" />
|
||||
</Principal>
|
||||
<Dependent Role="AncestralTabletArea1">
|
||||
<PropertyRef Name="ParentAreaId" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_bed_kind_detail_bed_kind">
|
||||
<End Role="bed_kind" Type="Self.bed_kind" Multiplicity="0..1" />
|
||||
<End Role="bed_kind_detail" Type="Self.bed_kind_detail" Multiplicity="*" />
|
||||
@@ -1372,6 +1465,18 @@
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_GuaDanOrderGuest_Order">
|
||||
<End Role="GuaDanOrder" Type="Self.GuaDanOrder" Multiplicity="0..1" />
|
||||
<End Role="GuaDanOrderGuest" Type="Self.GuaDanOrderGuest" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="GuaDanOrder">
|
||||
<PropertyRef Name="Uuid" />
|
||||
</Principal>
|
||||
<Dependent Role="GuaDanOrderGuest">
|
||||
<PropertyRef Name="OrderUuid" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_GuaDanOrderGuest_RoomUuid">
|
||||
<End Role="Room" Type="Self.Room" Multiplicity="0..1" />
|
||||
<End Role="GuaDanOrderGuest" Type="Self.GuaDanOrderGuest" Multiplicity="*" />
|
||||
@@ -1506,6 +1611,30 @@
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Position_Area">
|
||||
<End Role="AncestralTabletArea" Type="Self.AncestralTabletArea" Multiplicity="1" />
|
||||
<End Role="AncestralTabletPosition" Type="Self.AncestralTabletPosition" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="AncestralTabletArea">
|
||||
<PropertyRef Name="AreaId" />
|
||||
</Principal>
|
||||
<Dependent Role="AncestralTabletPosition">
|
||||
<PropertyRef Name="AreaId" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Position_Status">
|
||||
<End Role="AncestralTabletStatus" Type="Self.AncestralTabletStatus" Multiplicity="0..1" />
|
||||
<End Role="AncestralTabletPosition" Type="Self.AncestralTabletPosition" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="AncestralTabletStatus">
|
||||
<PropertyRef Name="StatusCode" />
|
||||
</Principal>
|
||||
<Dependent Role="AncestralTabletPosition">
|
||||
<PropertyRef Name="StatusCode" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_pro_order_activity">
|
||||
<End Role="activity" Type="Self.activity" Multiplicity="0..1" />
|
||||
<End Role="pro_order" Type="Self.pro_order" Multiplicity="*" />
|
||||
@@ -1718,6 +1847,18 @@
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Registrant_Position">
|
||||
<End Role="AncestralTabletPosition" Type="Self.AncestralTabletPosition" Multiplicity="0..1" />
|
||||
<End Role="AncestralTabletRegistrant" Type="Self.AncestralTabletRegistrant" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="AncestralTabletPosition">
|
||||
<PropertyRef Name="PositionId" />
|
||||
</Principal>
|
||||
<Dependent Role="AncestralTabletRegistrant">
|
||||
<PropertyRef Name="PositionId" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Room_Region">
|
||||
<End Role="Region" Type="Self.Region" Multiplicity="1" />
|
||||
<End Role="Room" Type="Self.Room" Multiplicity="*" />
|
||||
@@ -1966,6 +2107,11 @@
|
||||
<EntitySet Name="admin" EntityType="Self.admin" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="admin_group" EntityType="Self.admin_group" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="admin_log" EntityType="Self.admin_log" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="AncestralTabletArea" EntityType="Self.AncestralTabletArea" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="AncestralTabletPosition" EntityType="Self.AncestralTabletPosition" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="AncestralTabletPositionRecord" EntityType="Self.AncestralTabletPositionRecord" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="AncestralTabletRegistrant" EntityType="Self.AncestralTabletRegistrant" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="AncestralTabletStatus" EntityType="Self.AncestralTabletStatus" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="appellation" EntityType="Self.appellation" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="bed_kind" EntityType="Self.bed_kind" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="bed_kind_detail" EntityType="Self.bed_kind_detail" Schema="dbo" store:Type="Tables" />
|
||||
@@ -2010,6 +2156,10 @@
|
||||
<EntitySet Name="supplier" EntityType="Self.supplier" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="supplier_kind" EntityType="Self.supplier_kind" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="transfer_register" EntityType="Self.transfer_register" Schema="dbo" store:Type="Tables" />
|
||||
<AssociationSet Name="FK__Ancestral__Regis__5A1A5A11" Association="Self.FK__Ancestral__Regis__5A1A5A11">
|
||||
<End Role="AncestralTabletRegistrant" EntitySet="AncestralTabletRegistrant" />
|
||||
<End Role="AncestralTabletPositionRecord" EntitySet="AncestralTabletPositionRecord" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_accounting_accounting_kind" Association="Self.FK_accounting_accounting_kind">
|
||||
<End Role="accounting_kind" EntitySet="accounting_kind" />
|
||||
<End Role="accounting" EntitySet="accounting" />
|
||||
@@ -2094,6 +2244,10 @@
|
||||
<End Role="admin_group" EntitySet="admin_group" />
|
||||
<End Role="admin" EntitySet="admin" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_AncestralTabletArea_Parent" Association="Self.FK_AncestralTabletArea_Parent">
|
||||
<End Role="AncestralTabletArea" EntitySet="AncestralTabletArea" />
|
||||
<End Role="AncestralTabletArea1" EntitySet="AncestralTabletArea" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_bed_kind_detail_bed_kind" Association="Self.FK_bed_kind_detail_bed_kind">
|
||||
<End Role="bed_kind" EntitySet="bed_kind" />
|
||||
<End Role="bed_kind_detail" EntitySet="bed_kind_detail" />
|
||||
@@ -2158,6 +2312,10 @@
|
||||
<End Role="followers" EntitySet="followers" />
|
||||
<End Role="GuaDanOrderGuest" EntitySet="GuaDanOrderGuest" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_GuaDanOrderGuest_Order" Association="Self.FK_GuaDanOrderGuest_Order">
|
||||
<End Role="GuaDanOrder" EntitySet="GuaDanOrder" />
|
||||
<End Role="GuaDanOrderGuest" EntitySet="GuaDanOrderGuest" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_GuaDanOrderGuest_RoomUuid" Association="Self.FK_GuaDanOrderGuest_RoomUuid">
|
||||
<End Role="Room" EntitySet="Room" />
|
||||
<End Role="GuaDanOrderGuest" EntitySet="GuaDanOrderGuest" />
|
||||
@@ -2202,6 +2360,14 @@
|
||||
<End Role="news_kind" EntitySet="news_kind" />
|
||||
<End Role="news" EntitySet="news" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Position_Area" Association="Self.FK_Position_Area">
|
||||
<End Role="AncestralTabletArea" EntitySet="AncestralTabletArea" />
|
||||
<End Role="AncestralTabletPosition" EntitySet="AncestralTabletPosition" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Position_Status" Association="Self.FK_Position_Status">
|
||||
<End Role="AncestralTabletStatus" EntitySet="AncestralTabletStatus" />
|
||||
<End Role="AncestralTabletPosition" EntitySet="AncestralTabletPosition" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_pro_order_activity" Association="Self.FK_pro_order_activity">
|
||||
<End Role="activity" EntitySet="activity" />
|
||||
<End Role="pro_order" EntitySet="pro_order" />
|
||||
@@ -2270,6 +2436,10 @@
|
||||
<End Role="RegionRoomBedStatus" EntitySet="RegionRoomBedStatus" />
|
||||
<End Role="RegionRoomBed" EntitySet="RegionRoomBed" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Registrant_Position" Association="Self.FK_Registrant_Position">
|
||||
<End Role="AncestralTabletPosition" EntitySet="AncestralTabletPosition" />
|
||||
<End Role="AncestralTabletRegistrant" EntitySet="AncestralTabletRegistrant" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Room_Region" Association="Self.FK_Room_Region">
|
||||
<End Role="Region" EntitySet="Region" />
|
||||
<End Role="Room" EntitySet="Room" />
|
||||
@@ -4348,6 +4518,35 @@
|
||||
<End Role="RegionRoomBedStatus" EntitySet="RegionRoomBedStatus" />
|
||||
<End Role="RegionRoomBed" EntitySet="RegionRoomBed" />
|
||||
</AssociationSet>
|
||||
<EntitySet Name="AncestralTabletArea" EntityType="Model.AncestralTabletArea" />
|
||||
<EntitySet Name="AncestralTabletPosition" EntityType="Model.AncestralTabletPosition" />
|
||||
<EntitySet Name="AncestralTabletPositionRecord" EntityType="Model.AncestralTabletPositionRecord" />
|
||||
<EntitySet Name="AncestralTabletRegistrant" EntityType="Model.AncestralTabletRegistrant" />
|
||||
<EntitySet Name="AncestralTabletStatus" EntityType="Model.AncestralTabletStatus" />
|
||||
<AssociationSet Name="FK_AncestralTabletArea_Parent" Association="Model.FK_AncestralTabletArea_Parent">
|
||||
<End Role="AncestralTabletArea" EntitySet="AncestralTabletArea" />
|
||||
<End Role="AncestralTabletArea1" EntitySet="AncestralTabletArea" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Position_Area" Association="Model.FK_Position_Area">
|
||||
<End Role="AncestralTabletArea" EntitySet="AncestralTabletArea" />
|
||||
<End Role="AncestralTabletPosition" EntitySet="AncestralTabletPosition" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Position_Status" Association="Model.FK_Position_Status">
|
||||
<End Role="AncestralTabletStatus" EntitySet="AncestralTabletStatus" />
|
||||
<End Role="AncestralTabletPosition" EntitySet="AncestralTabletPosition" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Registrant_Position" Association="Model.FK_Registrant_Position">
|
||||
<End Role="AncestralTabletPosition" EntitySet="AncestralTabletPosition" />
|
||||
<End Role="AncestralTabletRegistrant" EntitySet="AncestralTabletRegistrant" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK__Ancestral__Regis__5A1A5A11" Association="Model.FK__Ancestral__Regis__5A1A5A11">
|
||||
<End Role="AncestralTabletRegistrant" EntitySet="AncestralTabletRegistrant" />
|
||||
<End Role="AncestralTabletPositionRecord" EntitySet="AncestralTabletPositionRecord" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_GuaDanOrderGuest_Order" Association="Model.FK_GuaDanOrderGuest_Order">
|
||||
<End Role="GuaDanOrder" EntitySet="GuaDanOrder" />
|
||||
<End Role="GuaDanOrderGuest" EntitySet="GuaDanOrderGuest" />
|
||||
</AssociationSet>
|
||||
</EntityContainer>
|
||||
<ComplexType Name="sp_helpdiagramdefinition_Result">
|
||||
<Property Type="Int32" Name="version" Nullable="true" />
|
||||
@@ -4641,6 +4840,7 @@
|
||||
<Property Name="IsCancel" Type="Boolean" Nullable="false" />
|
||||
<NavigationProperty Name="admin" Relationship="Model.FK_GuaDanOrder_Admin_CreateUser" FromRole="GuaDanOrder" ToRole="admin" />
|
||||
<NavigationProperty Name="followers" Relationship="Model.FK_GuaDanOrder_Followers" FromRole="GuaDanOrder" ToRole="follower" />
|
||||
<NavigationProperty Name="GuaDanOrderGuest" Relationship="Model.FK_GuaDanOrderGuest_Order" FromRole="GuaDanOrder" ToRole="GuaDanOrderGuest" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuaDanOrderGuest">
|
||||
<Key>
|
||||
@@ -4660,6 +4860,8 @@
|
||||
<NavigationProperty Name="Room" Relationship="Model.FK_GuaDanOrderGuest_RoomUuid" FromRole="GuaDanOrderGuest" ToRole="Room" />
|
||||
<NavigationProperty Name="RegionRoomBedStatus" Relationship="Model.FK_GuaDanOrderGuest_StatusCode" FromRole="GuaDanOrderGuest" ToRole="RegionRoomBedStatus" />
|
||||
<NavigationProperty Name="RegionAndRoomAndBedSchedule" Relationship="Model.FK_Schedule_GuaDanOrderGuest" FromRole="GuaDanOrderGuest" ToRole="RegionAndRoomAndBedSchedule" />
|
||||
<Property Name="OrderUuid" Type="Guid" />
|
||||
<NavigationProperty Name="GuaDanOrder" Relationship="Model.FK_GuaDanOrderGuest_Order" FromRole="GuaDanOrderGuest" ToRole="GuaDanOrder" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuadanTimeSetting">
|
||||
<Key>
|
||||
@@ -4912,6 +5114,156 @@
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<EntityType Name="AncestralTabletArea">
|
||||
<Key>
|
||||
<PropertyRef Name="AreaId" />
|
||||
</Key>
|
||||
<Property Name="AreaId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<Property Name="AreaName" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="true" />
|
||||
<Property Name="AreaCode" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ParentAreaId" Type="Int32" />
|
||||
<Property Name="AreaType" Type="String" MaxLength="10" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Price" Type="Int32" />
|
||||
<Property Name="SortOrder" Type="Int32" />
|
||||
<Property Name="IsDisabled" Type="Boolean" Nullable="false" />
|
||||
<Property Name="Description" Type="String" MaxLength="200" FixedLength="false" Unicode="true" />
|
||||
<NavigationProperty Name="AncestralTabletArea1" Relationship="Model.FK_AncestralTabletArea_Parent" FromRole="AncestralTabletArea" ToRole="AncestralTabletArea1" />
|
||||
<NavigationProperty Name="AncestralTabletArea2" Relationship="Model.FK_AncestralTabletArea_Parent" FromRole="AncestralTabletArea1" ToRole="AncestralTabletArea" />
|
||||
<NavigationProperty Name="AncestralTabletPosition" Relationship="Model.FK_Position_Area" FromRole="AncestralTabletArea" ToRole="AncestralTabletPosition" />
|
||||
</EntityType>
|
||||
<EntityType Name="AncestralTabletPosition">
|
||||
<Key>
|
||||
<PropertyRef Name="PositionId" />
|
||||
</Key>
|
||||
<Property Name="PositionId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<Property Name="AreaId" Type="Int32" Nullable="false" />
|
||||
<Property Name="PositionCode" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="PositionName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Price" Type="Int32" />
|
||||
<Property Name="StatusCode" Type="String" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Description" Type="String" MaxLength="200" FixedLength="false" Unicode="true" />
|
||||
<Property Name="RowNo" Type="Int32" />
|
||||
<Property Name="ColumnNo" Type="Int32" />
|
||||
<NavigationProperty Name="AncestralTabletArea" Relationship="Model.FK_Position_Area" FromRole="AncestralTabletPosition" ToRole="AncestralTabletArea" />
|
||||
<NavigationProperty Name="AncestralTabletStatus" Relationship="Model.FK_Position_Status" FromRole="AncestralTabletPosition" ToRole="AncestralTabletStatus" />
|
||||
<NavigationProperty Name="AncestralTabletRegistrant" Relationship="Model.FK_Registrant_Position" FromRole="AncestralTabletPosition" ToRole="AncestralTabletRegistrant" />
|
||||
</EntityType>
|
||||
<EntityType Name="AncestralTabletPositionRecord">
|
||||
<Key>
|
||||
<PropertyRef Name="RecordId" />
|
||||
</Key>
|
||||
<Property Name="RecordId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<Property Name="RegistrantCode" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="NPTitle" Type="String" MaxLength="30" FixedLength="false" Unicode="true" />
|
||||
<Property Name="NPStandDate" Type="DateTime" Nullable="false" Precision="0" />
|
||||
<Property Name="NPYangShang" Type="String" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="WPContent" Type="String" MaxLength="1000" FixedLength="false" Unicode="true" />
|
||||
<Property Name="CreatedAt" Type="DateTime" Nullable="false" Precision="3" />
|
||||
<Property Name="UpdatedAt" Type="DateTime" Precision="3" />
|
||||
<NavigationProperty Name="AncestralTabletRegistrant" Relationship="Model.FK__Ancestral__Regis__5A1A5A11" FromRole="AncestralTabletPositionRecord" ToRole="AncestralTabletRegistrant" />
|
||||
</EntityType>
|
||||
<EntityType Name="AncestralTabletRegistrant">
|
||||
<Key>
|
||||
<PropertyRef Name="RegistrantCode" />
|
||||
</Key>
|
||||
<Property Name="RegistrantCode" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Name" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Phone" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Address" Type="String" MaxLength="60" FixedLength="false" Unicode="true" />
|
||||
<Property Name="RegisterDate" Type="DateTime" Nullable="false" Precision="0" />
|
||||
<Property Name="Price" Type="Int32" />
|
||||
<Property Name="PositionId" Type="Int32" />
|
||||
<Property Name="StartDate" Type="DateTime" Nullable="false" Precision="0" />
|
||||
<Property Name="EndDate" Type="DateTime" Precision="0" />
|
||||
<Property Name="IsLongTerm" Type="Boolean" Nullable="false" />
|
||||
<Property Name="IsActive" Type="Boolean" Nullable="false" />
|
||||
<Property Name="CreatedAt" Type="DateTime" Nullable="false" Precision="3" />
|
||||
<Property Name="UpdatedAt" Type="DateTime" Precision="3" />
|
||||
<Property Name="IsEnd" Type="Boolean" Nullable="false" />
|
||||
<NavigationProperty Name="AncestralTabletPosition" Relationship="Model.FK_Registrant_Position" FromRole="AncestralTabletRegistrant" ToRole="AncestralTabletPosition" />
|
||||
<NavigationProperty Name="AncestralTabletPositionRecord" Relationship="Model.FK__Ancestral__Regis__5A1A5A11" FromRole="AncestralTabletRegistrant" ToRole="AncestralTabletPositionRecord" />
|
||||
</EntityType>
|
||||
<EntityType Name="AncestralTabletStatus">
|
||||
<Key>
|
||||
<PropertyRef Name="StatusCode" />
|
||||
</Key>
|
||||
<Property Name="StatusCode" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="StatusName" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="StatusType" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<NavigationProperty Name="AncestralTabletPosition" Relationship="Model.FK_Position_Status" FromRole="AncestralTabletStatus" ToRole="AncestralTabletPosition" />
|
||||
</EntityType>
|
||||
<Association Name="FK_AncestralTabletArea_Parent">
|
||||
<End Type="Model.AncestralTabletArea" Role="AncestralTabletArea" Multiplicity="0..1" />
|
||||
<End Type="Model.AncestralTabletArea" Role="AncestralTabletArea1" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="AncestralTabletArea">
|
||||
<PropertyRef Name="AreaId" />
|
||||
</Principal>
|
||||
<Dependent Role="AncestralTabletArea1">
|
||||
<PropertyRef Name="ParentAreaId" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Position_Area">
|
||||
<End Type="Model.AncestralTabletArea" Role="AncestralTabletArea" Multiplicity="1" />
|
||||
<End Type="Model.AncestralTabletPosition" Role="AncestralTabletPosition" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="AncestralTabletArea">
|
||||
<PropertyRef Name="AreaId" />
|
||||
</Principal>
|
||||
<Dependent Role="AncestralTabletPosition">
|
||||
<PropertyRef Name="AreaId" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Position_Status">
|
||||
<End Type="Model.AncestralTabletStatus" Role="AncestralTabletStatus" Multiplicity="0..1" />
|
||||
<End Type="Model.AncestralTabletPosition" Role="AncestralTabletPosition" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="AncestralTabletStatus">
|
||||
<PropertyRef Name="StatusCode" />
|
||||
</Principal>
|
||||
<Dependent Role="AncestralTabletPosition">
|
||||
<PropertyRef Name="StatusCode" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Registrant_Position">
|
||||
<End Type="Model.AncestralTabletPosition" Role="AncestralTabletPosition" Multiplicity="0..1" />
|
||||
<End Type="Model.AncestralTabletRegistrant" Role="AncestralTabletRegistrant" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="AncestralTabletPosition">
|
||||
<PropertyRef Name="PositionId" />
|
||||
</Principal>
|
||||
<Dependent Role="AncestralTabletRegistrant">
|
||||
<PropertyRef Name="PositionId" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK__Ancestral__Regis__5A1A5A11">
|
||||
<End Type="Model.AncestralTabletRegistrant" Role="AncestralTabletRegistrant" Multiplicity="1" />
|
||||
<End Type="Model.AncestralTabletPositionRecord" Role="AncestralTabletPositionRecord" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="AncestralTabletRegistrant">
|
||||
<PropertyRef Name="RegistrantCode" />
|
||||
</Principal>
|
||||
<Dependent Role="AncestralTabletPositionRecord">
|
||||
<PropertyRef Name="RegistrantCode" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_GuaDanOrderGuest_Order">
|
||||
<End Type="Model.GuaDanOrder" Role="GuaDanOrder" Multiplicity="0..1" />
|
||||
<End Type="Model.GuaDanOrderGuest" Role="GuaDanOrderGuest" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="GuaDanOrder">
|
||||
<PropertyRef Name="Uuid" />
|
||||
</Principal>
|
||||
<Dependent Role="GuaDanOrderGuest">
|
||||
<PropertyRef Name="OrderUuid" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
</Schema>
|
||||
</edmx:ConceptualModels>
|
||||
<!-- C-S mapping content -->
|
||||
@@ -5773,6 +6125,7 @@
|
||||
<EntitySetMapping Name="GuaDanOrderGuest">
|
||||
<EntityTypeMapping TypeName="Model.GuaDanOrderGuest">
|
||||
<MappingFragment StoreEntitySet="GuaDanOrderGuest">
|
||||
<ScalarProperty Name="OrderUuid" ColumnName="OrderUuid" />
|
||||
<ScalarProperty Name="StatusCode" ColumnName="StatusCode" />
|
||||
<ScalarProperty Name="CheckOutAt" ColumnName="CheckOutAt" />
|
||||
<ScalarProperty Name="CheckInAt" ColumnName="CheckInAt" />
|
||||
@@ -5885,6 +6238,79 @@
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="AncestralTabletArea">
|
||||
<EntityTypeMapping TypeName="Model.AncestralTabletArea">
|
||||
<MappingFragment StoreEntitySet="AncestralTabletArea">
|
||||
<ScalarProperty Name="Description" ColumnName="Description" />
|
||||
<ScalarProperty Name="IsDisabled" ColumnName="IsDisabled" />
|
||||
<ScalarProperty Name="SortOrder" ColumnName="SortOrder" />
|
||||
<ScalarProperty Name="Price" ColumnName="Price" />
|
||||
<ScalarProperty Name="AreaType" ColumnName="AreaType" />
|
||||
<ScalarProperty Name="ParentAreaId" ColumnName="ParentAreaId" />
|
||||
<ScalarProperty Name="AreaCode" ColumnName="AreaCode" />
|
||||
<ScalarProperty Name="AreaName" ColumnName="AreaName" />
|
||||
<ScalarProperty Name="AreaId" ColumnName="AreaId" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="AncestralTabletPosition">
|
||||
<EntityTypeMapping TypeName="Model.AncestralTabletPosition">
|
||||
<MappingFragment StoreEntitySet="AncestralTabletPosition">
|
||||
<ScalarProperty Name="ColumnNo" ColumnName="ColumnNo" />
|
||||
<ScalarProperty Name="RowNo" ColumnName="RowNo" />
|
||||
<ScalarProperty Name="Description" ColumnName="Description" />
|
||||
<ScalarProperty Name="StatusCode" ColumnName="StatusCode" />
|
||||
<ScalarProperty Name="Price" ColumnName="Price" />
|
||||
<ScalarProperty Name="PositionName" ColumnName="PositionName" />
|
||||
<ScalarProperty Name="PositionCode" ColumnName="PositionCode" />
|
||||
<ScalarProperty Name="AreaId" ColumnName="AreaId" />
|
||||
<ScalarProperty Name="PositionId" ColumnName="PositionId" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="AncestralTabletPositionRecord">
|
||||
<EntityTypeMapping TypeName="Model.AncestralTabletPositionRecord">
|
||||
<MappingFragment StoreEntitySet="AncestralTabletPositionRecord">
|
||||
<ScalarProperty Name="UpdatedAt" ColumnName="UpdatedAt" />
|
||||
<ScalarProperty Name="CreatedAt" ColumnName="CreatedAt" />
|
||||
<ScalarProperty Name="WPContent" ColumnName="WPContent" />
|
||||
<ScalarProperty Name="NPYangShang" ColumnName="NPYangShang" />
|
||||
<ScalarProperty Name="NPStandDate" ColumnName="NPStandDate" />
|
||||
<ScalarProperty Name="NPTitle" ColumnName="NPTitle" />
|
||||
<ScalarProperty Name="RegistrantCode" ColumnName="RegistrantCode" />
|
||||
<ScalarProperty Name="RecordId" ColumnName="RecordId" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="AncestralTabletRegistrant">
|
||||
<EntityTypeMapping TypeName="Model.AncestralTabletRegistrant">
|
||||
<MappingFragment StoreEntitySet="AncestralTabletRegistrant">
|
||||
<ScalarProperty Name="IsEnd" ColumnName="IsEnd" />
|
||||
<ScalarProperty Name="UpdatedAt" ColumnName="UpdatedAt" />
|
||||
<ScalarProperty Name="CreatedAt" ColumnName="CreatedAt" />
|
||||
<ScalarProperty Name="IsActive" ColumnName="IsActive" />
|
||||
<ScalarProperty Name="IsLongTerm" ColumnName="IsLongTerm" />
|
||||
<ScalarProperty Name="EndDate" ColumnName="EndDate" />
|
||||
<ScalarProperty Name="StartDate" ColumnName="StartDate" />
|
||||
<ScalarProperty Name="PositionId" ColumnName="PositionId" />
|
||||
<ScalarProperty Name="Price" ColumnName="Price" />
|
||||
<ScalarProperty Name="RegisterDate" ColumnName="RegisterDate" />
|
||||
<ScalarProperty Name="Address" ColumnName="Address" />
|
||||
<ScalarProperty Name="Phone" ColumnName="Phone" />
|
||||
<ScalarProperty Name="Name" ColumnName="Name" />
|
||||
<ScalarProperty Name="RegistrantCode" ColumnName="RegistrantCode" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="AncestralTabletStatus">
|
||||
<EntityTypeMapping TypeName="Model.AncestralTabletStatus">
|
||||
<MappingFragment StoreEntitySet="AncestralTabletStatus">
|
||||
<ScalarProperty Name="StatusType" ColumnName="StatusType" />
|
||||
<ScalarProperty Name="StatusName" ColumnName="StatusName" />
|
||||
<ScalarProperty Name="StatusCode" ColumnName="StatusCode" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
</EntityContainerMapping>
|
||||
</Mapping>
|
||||
</edmx:Mappings>
|
||||
|
||||
@@ -151,6 +151,17 @@
|
||||
<AssociationConnector Association="Model.FK_Room_Region" />
|
||||
<AssociationConnector Association="Model.FK_RegionRoomBed_RoomUuid" />
|
||||
<AssociationConnector Association="Model.FK_RegionRoomBed_StatusCode" />
|
||||
<EntityTypeShape EntityType="Model.AncestralTabletArea" Width="1.5" PointX="25.375" PointY="22.375" />
|
||||
<EntityTypeShape EntityType="Model.AncestralTabletPosition" Width="1.5" PointX="27.625" PointY="18.375" />
|
||||
<EntityTypeShape EntityType="Model.AncestralTabletPositionRecord" Width="1.5" PointX="32.125" PointY="18.625" />
|
||||
<EntityTypeShape EntityType="Model.AncestralTabletRegistrant" Width="1.5" PointX="29.875" PointY="18" />
|
||||
<EntityTypeShape EntityType="Model.AncestralTabletStatus" Width="1.5" PointX="25.375" PointY="19.125" />
|
||||
<AssociationConnector Association="Model.FK_AncestralTabletArea_Parent" />
|
||||
<AssociationConnector Association="Model.FK_Position_Area" />
|
||||
<AssociationConnector Association="Model.FK_Position_Status" />
|
||||
<AssociationConnector Association="Model.FK_Registrant_Position" />
|
||||
<AssociationConnector Association="Model.FK__Ancestral__Regis__5A1A5A11" />
|
||||
<AssociationConnector Association="Model.FK_GuaDanOrderGuest_Order" />
|
||||
</Diagram>
|
||||
</edmx:Diagrams>
|
||||
</edmx:Designer>
|
||||
|
||||
180
web/App_Code/api/AncestralTabletAreaController.cs
Normal file
180
web/App_Code/api/AncestralTabletAreaController.cs
Normal file
@@ -0,0 +1,180 @@
|
||||
using Model;
|
||||
using PagedList;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using static AncestralTabletPositionController;
|
||||
using static regionController;
|
||||
|
||||
/// <summary>
|
||||
/// AncestralTabletController 的摘要描述
|
||||
/// </summary>
|
||||
public class AncestralTabletAreaController: ApiController
|
||||
{
|
||||
private Model.ezEntities _db = new Model.ezEntities();
|
||||
public class AreaViewModel
|
||||
{
|
||||
public int? AreaId { get; set; }
|
||||
public string AreaName { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "區域編號為必填")]
|
||||
public string AreaCode { get; set; }
|
||||
public int? ParentAreaId { get; set; }
|
||||
public string AreaType { get; set; }
|
||||
public int? Price { get; set; }
|
||||
public int? SortOrder { get; set; }
|
||||
public bool IsDisabled { get; set; } = false;
|
||||
public string Description { get; set; }
|
||||
}
|
||||
public class RegionDto
|
||||
{
|
||||
public int AreaId { get; set; }
|
||||
public string AreaName { get; set; }
|
||||
public string AreaCode { get; set; }
|
||||
public int? SortOrder { get; set; }
|
||||
public int? ParentAreaId { get; set; }
|
||||
public string AreaType { get; set; }
|
||||
public bool IsDisabled { get; set; }
|
||||
public string Description { get; set; }
|
||||
public int? Price { set; get; }
|
||||
|
||||
public List<RegionDto> Children { get; set; } = new List<RegionDto>();
|
||||
}
|
||||
[HttpGet]
|
||||
[Route("api/ancestraltablet/area/getlist")]
|
||||
public IHttpActionResult GetList()
|
||||
{
|
||||
var allArea = _db.AncestralTabletArea.ToList();
|
||||
|
||||
var rootRegions = allArea
|
||||
.Where(r => r.ParentAreaId == null)
|
||||
.OrderBy(r => r.SortOrder)
|
||||
.ToList();
|
||||
|
||||
var tree = rootRegions
|
||||
.Select(r => BuildRegionDto(r, allArea))
|
||||
.ToList();
|
||||
return Ok(tree);
|
||||
|
||||
}
|
||||
[HttpGet]
|
||||
[Route("api/ancestraltablet/area/getereawithposition")]
|
||||
public IHttpActionResult GetEreaWithPosition()
|
||||
{
|
||||
//获取有神位位置的区域
|
||||
var allArea = _db.AncestralTabletArea
|
||||
.Where(a => a.AncestralTabletPosition.Count()>0)
|
||||
.Select(a => new
|
||||
{
|
||||
a.AreaId,
|
||||
a.AreaName,
|
||||
})
|
||||
.ToList();
|
||||
return Ok(allArea);
|
||||
|
||||
}
|
||||
private RegionDto BuildRegionDto(AncestralTabletArea area, List<AncestralTabletArea> allArea)
|
||||
{
|
||||
return new RegionDto
|
||||
{
|
||||
AreaId = area.AreaId,
|
||||
AreaName = area.AreaName,
|
||||
AreaCode = area.AreaCode,
|
||||
SortOrder = area.SortOrder,
|
||||
ParentAreaId = area.ParentAreaId,
|
||||
AreaType = area.AreaType,
|
||||
IsDisabled = area.IsDisabled,
|
||||
Description = area.Description,
|
||||
Price = area.Price,
|
||||
Children = allArea
|
||||
.Where(r => r.ParentAreaId == area.AreaId)
|
||||
.OrderBy(r => r.SortOrder)
|
||||
.Select(child => BuildRegionDto(child, allArea))
|
||||
.ToList(),
|
||||
};
|
||||
}
|
||||
[HttpPost]
|
||||
[Route("api/ancestraltablet/area/create")]
|
||||
public async Task<IHttpActionResult> CreateArea([FromBody] AreaViewModel tabletArea)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(ModelState);
|
||||
try
|
||||
{
|
||||
var area = new AncestralTabletArea
|
||||
{
|
||||
AreaName = tabletArea.AreaName,
|
||||
AreaCode = tabletArea.AreaCode,
|
||||
ParentAreaId = tabletArea.ParentAreaId,
|
||||
AreaType = tabletArea.AreaType,
|
||||
Price = tabletArea.Price,
|
||||
SortOrder = tabletArea.SortOrder,
|
||||
IsDisabled = tabletArea.IsDisabled,
|
||||
Description = tabletArea.Description
|
||||
};
|
||||
_db.AncestralTabletArea.Add(area);
|
||||
await _db.SaveChangesAsync();
|
||||
tabletArea.AreaId = area.AreaId;
|
||||
return Ok(new { message = "區域建立成功", area = tabletArea });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return InternalServerError(ex);
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
[Route("api/ancestraltablet/area/edit")]
|
||||
public async Task<IHttpActionResult> EditArea([FromBody] AreaViewModel tabletArea)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(ModelState);
|
||||
try
|
||||
{
|
||||
var oldArea = _db.AncestralTabletArea.Find(tabletArea.AreaId);
|
||||
if (oldArea == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
oldArea.AreaName = tabletArea.AreaName;
|
||||
oldArea.AreaCode = tabletArea.AreaCode;
|
||||
oldArea.ParentAreaId = tabletArea.ParentAreaId;
|
||||
oldArea.Price = tabletArea.Price;
|
||||
oldArea.SortOrder = tabletArea.SortOrder;
|
||||
oldArea.Description = tabletArea.Description;
|
||||
oldArea.IsDisabled = tabletArea.IsDisabled;
|
||||
await _db.SaveChangesAsync();
|
||||
return Ok(new { message = "區域修改成功", area = tabletArea });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return InternalServerError(ex);
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
[Route("api/ancestraltablet/area/position/getlist")]
|
||||
public IHttpActionResult GetPositionList([FromUri] int areaId)
|
||||
{
|
||||
var positions = _db.AncestralTabletPosition
|
||||
.Where(p => p.AreaId == areaId)
|
||||
.Select(p => new AncestralTabletPositionDto
|
||||
{
|
||||
PositionId = p.PositionId,
|
||||
AreaId = p.AreaId,
|
||||
PositionCode = p.PositionCode,
|
||||
PositionName = p.PositionName,
|
||||
Price = p.Price,
|
||||
StatusCode = p.StatusCode,
|
||||
Description = p.Description,
|
||||
RowNo = p.RowNo,
|
||||
ColumnNo = p.ColumnNo
|
||||
})
|
||||
.ToList();
|
||||
|
||||
return Ok(positions);
|
||||
}
|
||||
}
|
||||
184
web/App_Code/api/AncestralTabletPositionController.cs
Normal file
184
web/App_Code/api/AncestralTabletPositionController.cs
Normal file
@@ -0,0 +1,184 @@
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
/// <summary>
|
||||
/// AncestralTabletPositionController 的摘要描述
|
||||
/// </summary>
|
||||
public class AncestralTabletPositionController: ApiController
|
||||
{
|
||||
private Model.ezEntities _db = new Model.ezEntities();
|
||||
|
||||
[HttpGet]
|
||||
[Route("api/ancestraltablet/position/getlist")]
|
||||
public IHttpActionResult GetList([FromUri] int areaId)
|
||||
{
|
||||
var positions = _db.AncestralTabletPosition
|
||||
.Where(p => p.AreaId == areaId)
|
||||
.Select(p => new
|
||||
{
|
||||
PositionId = p.PositionId,
|
||||
AreaId = p.AreaId,
|
||||
PositionCode = p.PositionCode,
|
||||
PositionName = p.PositionName,
|
||||
Price = p.Price,
|
||||
StatusCode = p.StatusCode,
|
||||
Description = p.Description,
|
||||
RowNo = p.RowNo,
|
||||
ColumnNo = p.ColumnNo,
|
||||
AncestralTabletRegistrant = _db.AncestralTabletRegistrant
|
||||
.Where(r => r.PositionId == p.PositionId && r.IsActive == true)
|
||||
.Select(r => new
|
||||
{
|
||||
r.RegistrantCode,
|
||||
r.Name,
|
||||
r.Phone,
|
||||
r.Address,
|
||||
r.RegisterDate,
|
||||
r.Price,
|
||||
r.StartDate,
|
||||
r.EndDate,
|
||||
r.IsLongTerm,
|
||||
r.IsActive,
|
||||
|
||||
// 嵌套查询牌位记录(PositionRecord)
|
||||
TabletRecord = r.AncestralTabletPositionRecord
|
||||
.Select(pr => new
|
||||
{
|
||||
pr.RecordId,
|
||||
pr.RegistrantCode,
|
||||
pr.NPTitle,
|
||||
pr.NPStandDate,
|
||||
pr.NPYangShang,
|
||||
pr.WPContent
|
||||
})
|
||||
.FirstOrDefault()
|
||||
})
|
||||
.FirstOrDefault()
|
||||
})
|
||||
.ToList();
|
||||
|
||||
return Ok(positions);
|
||||
}
|
||||
[HttpGet]
|
||||
[Route("api/ancestraltablet/position/shortlist")]
|
||||
public IHttpActionResult GetListWithShort([FromUri] int areaId)
|
||||
{
|
||||
//获取位置列表,简单信息
|
||||
var positions = _db.AncestralTabletPosition
|
||||
.Where(p => p.AreaId == areaId)
|
||||
.Select(p => new
|
||||
{
|
||||
PositionId = p.PositionId,
|
||||
AreaId = p.AreaId,
|
||||
PositionCode = p.PositionCode,
|
||||
PositionName = p.PositionName,
|
||||
Price = p.Price,
|
||||
StatusCode = p.StatusCode,
|
||||
Description = p.Description,
|
||||
RowNo = p.RowNo,
|
||||
ColumnNo = p.ColumnNo,
|
||||
isCanUse = p.StatusCode == "available" ? true : false,
|
||||
})
|
||||
.ToList();
|
||||
|
||||
return Ok(positions);
|
||||
}
|
||||
[HttpPost]
|
||||
[Route("api/ancestraltablet/position/batchcreate")]
|
||||
public IHttpActionResult BatchCreatePosition([FromBody] List<AncestralTabletPositionDto> positions)
|
||||
{
|
||||
if (positions == null || positions.Count == 0)
|
||||
return BadRequest("未接收到任何位置数据");
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var dto in positions)
|
||||
{
|
||||
var entity = new AncestralTabletPosition
|
||||
{
|
||||
AreaId = dto.AreaId,
|
||||
PositionCode = dto.PositionCode,
|
||||
PositionName = dto.PositionName,
|
||||
Price = dto.Price,
|
||||
StatusCode = dto.StatusCode,
|
||||
Description = dto.Description,
|
||||
RowNo = dto.RowNo,
|
||||
ColumnNo = dto.ColumnNo
|
||||
};
|
||||
|
||||
_db.AncestralTabletPosition.Add(entity);
|
||||
}
|
||||
|
||||
_db.SaveChanges();
|
||||
|
||||
return Ok(new { message = "批量新增成功", count = positions.Count });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string message = ex.InnerException?.InnerException?.Message ?? ex.Message;
|
||||
|
||||
return Content(HttpStatusCode.InternalServerError, new
|
||||
{
|
||||
message = "批量新增失败",
|
||||
exceptionMessage = message
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/ancestraltablet/position/edit")]
|
||||
public IHttpActionResult EditPosition([FromBody] AncestralTabletPositionDto pos)
|
||||
{
|
||||
var oldPos = _db.AncestralTabletPosition
|
||||
.FirstOrDefault(p => p.AreaId == pos.AreaId && p.PositionCode == pos.PositionCode);
|
||||
if(oldPos == null) return NotFound();
|
||||
try
|
||||
{
|
||||
oldPos.PositionName = pos.PositionName;
|
||||
oldPos.Price = pos.Price;
|
||||
oldPos.StatusCode = pos.StatusCode;
|
||||
|
||||
// 保存到数据库
|
||||
_db.SaveChanges();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return InternalServerError(ex);
|
||||
}
|
||||
return Ok(new { message="更新成功", code=200});
|
||||
}
|
||||
[HttpDelete]
|
||||
[Route("api/ancestraltablet/position/delete/{positionId}")]
|
||||
public IHttpActionResult DeletePosition(int positionId)
|
||||
{
|
||||
var pos = _db.AncestralTabletPosition.FirstOrDefault(p => p.PositionId == positionId);
|
||||
|
||||
if (pos == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
_db.AncestralTabletPosition.Remove(pos);
|
||||
_db.SaveChanges();
|
||||
|
||||
return Ok("删除成功");
|
||||
}
|
||||
public class AncestralTabletPositionDto
|
||||
{
|
||||
public int PositionId { get; set; }
|
||||
public int AreaId { get; set; }
|
||||
public string PositionCode { get; set; }
|
||||
public string PositionName { get; set; }
|
||||
public int? Price { get; set; }
|
||||
public string StatusCode { get; set; }
|
||||
public string Description { get; set; }
|
||||
public int? RowNo { get; set; }
|
||||
public int? ColumnNo { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
361
web/App_Code/api/AncestralTabletRecordController.cs
Normal file
361
web/App_Code/api/AncestralTabletRecordController.cs
Normal file
@@ -0,0 +1,361 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
/// <summary>
|
||||
/// AncestralTabletRecordController 的摘要描述
|
||||
/// </summary>
|
||||
public class AncestralTabletRecordController: ApiController
|
||||
{
|
||||
private Model.ezEntities _db = new Model.ezEntities();
|
||||
[HttpGet]
|
||||
[Route("api/ancestraltablet/registrant/getlist")]
|
||||
public IHttpActionResult GetRegistrantList()
|
||||
{
|
||||
//获取登记人列表
|
||||
var data = _db.AncestralTabletRegistrant.Select(x => new
|
||||
{
|
||||
x.RegistrantCode,
|
||||
x.Name,
|
||||
x.Phone,
|
||||
x.Address,
|
||||
x.RegisterDate,
|
||||
x.Price,
|
||||
x.PositionId,
|
||||
x.StartDate,
|
||||
x.EndDate,
|
||||
x.IsLongTerm,
|
||||
x.IsActive,
|
||||
x.CreatedAt,
|
||||
x.UpdatedAt
|
||||
})
|
||||
.Take(1000) // 取前1000条
|
||||
.ToList(); ;
|
||||
return Ok(data);
|
||||
}
|
||||
[HttpPost]
|
||||
[Route("api/ancestraltablet/registrant/getlistbypage")]
|
||||
public IHttpActionResult GetRegistrantListByPage([FromBody] RegistrantSearchDto searchDto)
|
||||
{
|
||||
//获取登记人列表
|
||||
var query = _db.AncestralTabletRegistrant.AsQueryable();
|
||||
if( !string.IsNullOrEmpty(searchDto.searchName))
|
||||
{
|
||||
query = query.Where(r => r.Name == searchDto.searchName);
|
||||
}
|
||||
var tatol = query.Count();
|
||||
var data = query.Select(x => new
|
||||
{
|
||||
x.RegistrantCode,
|
||||
x.Name,
|
||||
x.Phone,
|
||||
x.Address,
|
||||
x.RegisterDate,
|
||||
x.Price,
|
||||
x.PositionId,
|
||||
x.StartDate,
|
||||
x.EndDate,
|
||||
x.IsLongTerm,
|
||||
x.IsActive,
|
||||
x.CreatedAt,
|
||||
x.UpdatedAt
|
||||
})
|
||||
.OrderByDescending(a => a.CreatedAt)
|
||||
.Skip((searchDto.page - 1) * searchDto.pageSize)
|
||||
.Take(searchDto.pageSize) // 取前1000条
|
||||
.ToList();
|
||||
return Ok(new
|
||||
{
|
||||
data = data,
|
||||
total = tatol
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("api/ancestraltablet/registrant/getbycode")]
|
||||
public IHttpActionResult GetRegistrantByCode([FromUri] string registrantCode)
|
||||
{
|
||||
var r = _db.AncestralTabletRegistrant.Find(registrantCode);
|
||||
if (r == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
var rDto = new
|
||||
{
|
||||
r.RegistrantCode,
|
||||
r.Name,
|
||||
r.Phone,
|
||||
r.Address,
|
||||
r.RegisterDate,
|
||||
r.Price,
|
||||
r.StartDate,
|
||||
r.EndDate,
|
||||
r.IsLongTerm,
|
||||
r.IsActive,
|
||||
r.PositionId,
|
||||
positionName = r.AncestralTabletPosition?.PositionName,
|
||||
|
||||
|
||||
// 嵌套查询牌位记录(PositionRecord)
|
||||
TabletRecord = r.AncestralTabletPositionRecord
|
||||
.Select(pr => new
|
||||
{
|
||||
pr.RecordId,
|
||||
pr.RegistrantCode,
|
||||
pr.NPTitle,
|
||||
pr.NPStandDate,
|
||||
pr.NPYangShang,
|
||||
pr.WPContent,
|
||||
})
|
||||
.FirstOrDefault()
|
||||
};
|
||||
return Ok(rDto);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/ancestraltablet/registrant/create")]
|
||||
public IHttpActionResult CreateRegistrant([FromBody] AncestralTabletRegistrantDto dto)
|
||||
{
|
||||
//新增登记人api
|
||||
if (dto == null)
|
||||
{
|
||||
return BadRequest("请求体不能为空");
|
||||
}
|
||||
if(!string.IsNullOrEmpty(dto.RegistrantCode))
|
||||
{
|
||||
return BadRequest("RegistrantCode 应传递空");
|
||||
}
|
||||
try
|
||||
{
|
||||
dto.RegistrantCode = GenerateRegistrantCode();
|
||||
|
||||
// 设置默认创建时间
|
||||
dto.CreatedAt = DateTime.Now;
|
||||
var entity = new Model.AncestralTabletRegistrant
|
||||
{
|
||||
RegistrantCode = dto.RegistrantCode,
|
||||
Name = dto.Name,
|
||||
Phone = dto.Phone,
|
||||
Address = dto.Address,
|
||||
RegisterDate = dto.RegisterDate,
|
||||
Price = dto.Price,
|
||||
PositionId = dto.PositionId,
|
||||
StartDate = dto.startDate,
|
||||
EndDate = dto.endDate,
|
||||
IsLongTerm = dto.isLongTerm,
|
||||
IsActive = dto.isActive,
|
||||
CreatedAt = dto.CreatedAt,
|
||||
UpdatedAt = dto.UpdatedAt
|
||||
};
|
||||
|
||||
// 假设你有一个 EF DbContext(如 _db)
|
||||
_db.AncestralTabletRegistrant.Add(entity);
|
||||
if (dto.PositionId != null)
|
||||
{
|
||||
var position = _db.AncestralTabletPosition
|
||||
.FirstOrDefault(p => p.PositionId == dto.PositionId);
|
||||
|
||||
if (position != null)
|
||||
{
|
||||
position.StatusCode = "used"; // 或者根据你的枚举/字段设置
|
||||
}
|
||||
}
|
||||
|
||||
_db.SaveChanges();
|
||||
|
||||
return Ok(new { message = "登记成功", registrantCode = entity.RegistrantCode });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return InternalServerError(ex);
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
[Route("api/ancestraltablet/registrant/update")]
|
||||
public IHttpActionResult UpdateRegistrant([FromBody] AncestralTabletRegistrantDto dto)
|
||||
{
|
||||
if (dto == null)
|
||||
{
|
||||
return BadRequest("请求体不能为空");
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(dto.RegistrantCode))
|
||||
{
|
||||
return BadRequest("缺少 RegistrantCode,无法进行更新操作");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// 查找原始资料
|
||||
var entity = _db.AncestralTabletRegistrant
|
||||
.FirstOrDefault(r => r.RegistrantCode == dto.RegistrantCode);
|
||||
|
||||
if (entity == null)
|
||||
{
|
||||
return NotFound(); // 没有对应记录
|
||||
}
|
||||
|
||||
// ===== 处理安位状态 =====
|
||||
if (entity.PositionId != dto.PositionId)
|
||||
{
|
||||
// 1. 原来的安位设置为可用
|
||||
if (entity.PositionId != null)
|
||||
{
|
||||
var oldPosition = _db.AncestralTabletPosition
|
||||
.FirstOrDefault(p => p.PositionId == entity.PositionId);
|
||||
|
||||
if (oldPosition != null)
|
||||
{
|
||||
oldPosition.StatusCode = "available"; // 可用
|
||||
}
|
||||
}
|
||||
|
||||
// 2. 新的安位设置为已使用
|
||||
if (dto.PositionId != null)
|
||||
{
|
||||
var newPosition = _db.AncestralTabletPosition
|
||||
.FirstOrDefault(p => p.PositionId == dto.PositionId);
|
||||
|
||||
if (newPosition != null)
|
||||
{
|
||||
newPosition.StatusCode = "used"; // 已使用
|
||||
}
|
||||
}
|
||||
|
||||
// 更新登记人安位
|
||||
entity.PositionId = dto.PositionId;
|
||||
}
|
||||
|
||||
// 更新其它字段
|
||||
entity.Name = dto.Name;
|
||||
entity.Phone = dto.Phone;
|
||||
entity.Address = dto.Address;
|
||||
entity.RegisterDate = dto.RegisterDate;
|
||||
entity.Price = dto.Price;
|
||||
entity.StartDate = dto.startDate;
|
||||
entity.EndDate = dto.endDate;
|
||||
entity.IsLongTerm = dto.isLongTerm;
|
||||
entity.IsActive = dto.isActive;
|
||||
entity.UpdatedAt = DateTime.Now;
|
||||
|
||||
_db.SaveChanges();
|
||||
|
||||
return Ok(new { message = "登记人更新成功", registrantCode = entity.RegistrantCode });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return InternalServerError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/ancestraltablet/pw/create")]
|
||||
public IHttpActionResult CreatePW([FromBody] AncestralTabletPositionRecordDto dto)
|
||||
{
|
||||
if (dto == null)
|
||||
return BadRequest("请求体不能为空");
|
||||
|
||||
if (string.IsNullOrEmpty(dto.RegistrantCode))
|
||||
return BadRequest("登记人编号(RegistrantCode)不能为空");
|
||||
|
||||
try
|
||||
{
|
||||
// 映射到数据库实体
|
||||
var entity = new Model.AncestralTabletPositionRecord
|
||||
{
|
||||
RegistrantCode = dto.RegistrantCode,
|
||||
NPTitle = dto.NPTitle,
|
||||
NPStandDate = dto.NPStandDate,
|
||||
NPYangShang = dto.NPYangShang,
|
||||
WPContent = dto.WPContent,
|
||||
CreatedAt = DateTime.Now,
|
||||
UpdatedAt = null
|
||||
};
|
||||
|
||||
_db.AncestralTabletPositionRecord.Add(entity);
|
||||
_db.SaveChanges();
|
||||
|
||||
return Ok(new { message = "牌位登记成功", recordId = entity.RecordId });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return InternalServerError(ex);
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
[Route("api/ancestraltablet/pw/update")]
|
||||
public IHttpActionResult UpdatePW([FromBody] AncestralTabletPositionRecordDto dto)
|
||||
{
|
||||
if (dto == null)
|
||||
return BadRequest("请求体不能为空");
|
||||
try
|
||||
{
|
||||
var entity = _db.AncestralTabletPositionRecord.Find(dto.RecordId);
|
||||
// 映射到数据库实体
|
||||
if (entity == null)
|
||||
return BadRequest("牌位不存在,更新失败");
|
||||
entity.RegistrantCode = dto.RegistrantCode;
|
||||
entity.NPTitle = dto.NPTitle;
|
||||
entity.NPStandDate = dto.NPStandDate;
|
||||
entity.NPYangShang = dto.NPYangShang;
|
||||
entity.WPContent = dto.WPContent;
|
||||
entity.UpdatedAt = DateTime.Now;
|
||||
_db.SaveChanges();
|
||||
|
||||
return Ok(new { message = "牌位更新成功", recordId = entity.RecordId });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return InternalServerError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public string GenerateRegistrantCode(string prefix = "REG", int randomLength = 6)
|
||||
{
|
||||
string datePart = DateTime.Now.ToString("yyyyMMdd");
|
||||
|
||||
string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
var random = new Random();
|
||||
var suffix = new string(Enumerable.Repeat(chars, randomLength)
|
||||
.Select(s => s[random.Next(s.Length)]).ToArray());
|
||||
|
||||
return $"{prefix}{datePart}{suffix}";
|
||||
}
|
||||
public class AncestralTabletRegistrantDto
|
||||
{
|
||||
public string RegistrantCode { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Phone { get; set; }
|
||||
public string Address { get; set; }
|
||||
public DateTime RegisterDate { get; set; }
|
||||
public int? Price { get; set; }
|
||||
public int? PositionId { get; set; }
|
||||
public DateTime startDate { get; set; }
|
||||
public DateTime? endDate { get; set; }
|
||||
public bool isLongTerm { get; set; } = false;
|
||||
public bool isActive { get; set; } = true;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
}
|
||||
public class AncestralTabletPositionRecordDto
|
||||
{
|
||||
public int? RecordId { get; set; }
|
||||
public string RegistrantCode { get; set; }
|
||||
public string NPTitle { get; set; }
|
||||
public DateTime NPStandDate { get; set; }
|
||||
public string NPYangShang { get; set; }
|
||||
public string WPContent { get; set; }
|
||||
}
|
||||
public class RegistrantSearchDto
|
||||
{
|
||||
public int page { get; set; } = 1;
|
||||
public int pageSize { get; set; } = 10;
|
||||
public string searchName { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
38
web/App_Code/api/AncestralTabletStatisticsController.cs
Normal file
38
web/App_Code/api/AncestralTabletStatisticsController.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
/// <summary>
|
||||
/// AncestralTabletStatisticsController 的摘要描述
|
||||
/// </summary>
|
||||
public class AncestralTabletStatisticsController:ApiController
|
||||
{
|
||||
private Model.ezEntities db = new Model.ezEntities();
|
||||
[HttpGet]
|
||||
[Route("api/ancestraltablet/statistics/positions/availablepositions")]
|
||||
public IHttpActionResult GetAvailablePositions()
|
||||
{
|
||||
var query =
|
||||
from a in db.AncestralTabletArea // 区域表
|
||||
join p in db.AncestralTabletPosition
|
||||
on a.AreaId equals p.AreaId into ap
|
||||
from p in ap.DefaultIfEmpty()
|
||||
join r in db.AncestralTabletRegistrant
|
||||
on p.PositionId equals r.PositionId into pr
|
||||
from r in pr.DefaultIfEmpty()
|
||||
group new { a, p, r } by new { a.AreaId, a.AreaName } into g
|
||||
select new
|
||||
{
|
||||
AreaId = g.Key.AreaId,
|
||||
AreaName = g.Key.AreaName,
|
||||
TotalPositions = g.Count(x => x.p != null), // 总位置数
|
||||
AvailableCount = g.Count(x => x.p != null && x.r == null) // 可用位置数(未登记)
|
||||
};
|
||||
|
||||
var result = query.ToList();
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
}
|
||||
29
web/App_Code/api/AncestralTabletStatusController.cs
Normal file
29
web/App_Code/api/AncestralTabletStatusController.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
/// <summary>
|
||||
/// AncestralTabletStatusController 的摘要描述
|
||||
/// </summary>
|
||||
public class AncestralTabletStatusController:ApiController
|
||||
{
|
||||
private Model.ezEntities _db = new Model.ezEntities();
|
||||
[HttpGet]
|
||||
[Route("api/ancestraltablet/status/list")]
|
||||
public IHttpActionResult GetStatusList()
|
||||
{
|
||||
var statusList = _db.AncestralTabletStatus
|
||||
.Select(s => new
|
||||
{
|
||||
s.StatusCode,
|
||||
s.StatusName,
|
||||
s.StatusType
|
||||
})
|
||||
.ToList();
|
||||
|
||||
return Ok(statusList);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,8 +7,6 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using static regionController;
|
||||
|
||||
/// <summary>
|
||||
/// guadanOderController 的摘要描述
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user