把资料库产色的几个文件提交,汇出挂单功能的数据,状态数据要有才能运行

This commit is contained in:
2025-09-12 13:48:04 +08:00
parent 0b0ddc82bd
commit 4419dfff64
12 changed files with 667 additions and 231 deletions

View File

@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
// 這個程式碼是由範本產生。
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
// 對這個檔案進行手動變更可能導致您的應用程式產生未預期的行為。
// 如果重新產生程式碼,將會覆寫對這個檔案的手動變更。
// </auto-generated>
//------------------------------------------------------------------------------
@@ -74,7 +74,6 @@ namespace Model
public virtual DbSet<stock_reason> stock_reason { get; set; }
public virtual DbSet<supplier> suppliers { get; set; }
public virtual DbSet<supplier_kind> supplier_kind { get; set; }
public virtual DbSet<sysdiagram> sysdiagrams { get; set; }
public virtual DbSet<act_bom> act_bom { get; set; }
public virtual DbSet<family_members> family_members { get; set; }
public virtual DbSet<PostCity> PostCitiy { get; set; }

View File

@@ -1,10 +1,10 @@
// T4 code generation is enabled for model 'D:\dev\ez\17168erp\git_17888\web\App_Code\Model\Model.edmx'.
// To enable legacy code generation, change the value of the 'Code Generation Strategy' designer
// property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model
// is open in the designer.
// 已啟用模型 'D:\17168erp_new_git\17168ERP\web\App_Code\Model\Model.edmx' 的 T4 程式碼產生。
// 若要啟用舊版程式碼產生,請將 [程式碼產生策略] 設計工具屬性的值
//變更為 [舊版 ObjectContext]。當模型在設計工具中開啟時,這個屬性便可
//以在 [屬性] 視窗中使用。
// If no context and entity classes have been generated, it may be because you created an empty model but
// have not yet chosen which version of Entity Framework to use. To generate a context class and entity
// classes for your model, open the model in the designer, right-click on the designer surface, and
// select 'Update Model from Database...', 'Generate Database from Model...', or 'Add Code Generation
// Item...'.
// 如果尚未產生任何內容和實體類型,可能是因為您建立了空的模型,但
//尚未選擇要使用的 Entity Framework 版本。若要為您的模型產生內容類別和
//實體類型,請在設計工具中開啟模型,以滑鼠右鍵按一下設計工具介面並
//選取 [從資料庫更新模型]、[由模型產生資料庫] 或 [加入程式碼產生
//項目]。

View File

@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
// 這個程式碼是由範本產生。
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
// 對這個檔案進行手動變更可能導致您的應用程式產生未預期的行為。
// 如果重新產生程式碼,將會覆寫對這個檔案的手動變更。
// </auto-generated>
//------------------------------------------------------------------------------
@@ -441,7 +441,7 @@ namespace Model
{
this.members = new HashSet<member>();
this.news = new HashSet<news>();
this.GuaDanOrders = new HashSet<GuaDanOrder>();
this.GuaDanOrder = new HashSet<GuaDanOrder>();
}
public int num { get; set; }
@@ -477,7 +477,7 @@ namespace Model
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<news> news { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<GuaDanOrder> GuaDanOrders { get; set; }
public virtual ICollection<GuaDanOrder> GuaDanOrder { get; set; }
}
}
namespace Model
@@ -768,8 +768,8 @@ namespace Model
this.family_members = new HashSet<family_members>();
this.transfer_register = new HashSet<transfer_register>();
this.transfer_register1 = new HashSet<transfer_register>();
this.GuaDanOrders = new HashSet<GuaDanOrder>();
this.GuaDanOrderGuests = new HashSet<GuaDanOrderGuest>();
this.GuaDanOrder = new HashSet<GuaDanOrder>();
this.GuaDanOrderGuest = new HashSet<GuaDanOrderGuest>();
}
public int num { get; set; }
@@ -830,9 +830,9 @@ namespace Model
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<transfer_register> transfer_register1 { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<GuaDanOrder> GuaDanOrders { get; set; }
public virtual ICollection<GuaDanOrder> GuaDanOrder { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<GuaDanOrderGuest> GuaDanOrderGuests { get; set; }
public virtual ICollection<GuaDanOrderGuest> GuaDanOrderGuest { get; set; }
}
}
namespace Model
@@ -869,9 +869,11 @@ namespace Model
public string BookerPhone { get; set; }
public bool IsDeleted { get; set; }
public System.Guid Uuid { get; set; }
public Nullable<int> ActivityNum { get; set; }
public bool IsCancel { get; set; }
public virtual admin admin { get; set; }
public virtual follower follower { get; set; }
public virtual follower followers { get; set; }
}
}
namespace Model
@@ -881,6 +883,12 @@ namespace Model
public partial class GuaDanOrderGuest
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public GuaDanOrderGuest()
{
this.RegionAndRoomAndBedSchedule = new HashSet<RegionAndRoomAndBedSchedule>();
}
public string GuaDanOrderNo { get; set; }
public Nullable<int> FollowerNum { get; set; }
public bool IsDeleted { get; set; }
@@ -889,12 +897,14 @@ namespace Model
public Nullable<System.Guid> BedUuid { get; set; }
public Nullable<System.DateTime> CheckInAt { get; set; }
public Nullable<System.DateTime> CheckOutAt { get; set; }
public Nullable<System.Guid> statusUuid { get; set; }
public string StatusCode { get; set; }
public virtual follower follower { get; set; }
public virtual follower followers { get; set; }
public virtual RegionRoomBed RegionRoomBed { get; set; }
public virtual Room Room { get; set; }
public virtual RegionRoomBedStatus RegionRoomBedStatus { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<RegionAndRoomAndBedSchedule> RegionAndRoomAndBedSchedule { get; set; }
}
}
namespace Model
@@ -1393,7 +1403,10 @@ namespace Model
public Nullable<System.Guid> TargetUuid { get; set; }
public string GuaDanOrderNo { get; set; }
public Nullable<System.DateTime> ScheduleDate { get; set; }
public bool IsActive { get; set; }
public bool IsCancel { get; set; }
public Nullable<System.Guid> GuaDanOrderGuestUuid { get; set; }
public virtual GuaDanOrderGuest GuaDanOrderGuest { get; set; }
}
}
namespace Model
@@ -1406,7 +1419,7 @@ namespace Model
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public RegionRoomBed()
{
this.GuaDanOrderGuests = new HashSet<GuaDanOrderGuest>();
this.GuaDanOrderGuest = new HashSet<GuaDanOrderGuest>();
}
public string Name { get; set; }
@@ -1415,12 +1428,12 @@ namespace Model
public bool IsDeleted { get; set; }
public System.Guid Uuid { get; set; }
public System.Guid RoomUuid { get; set; }
public Nullable<System.Guid> StatusUuid { get; set; }
public string StatusCode { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<GuaDanOrderGuest> GuaDanOrderGuests { get; set; }
public virtual RegionRoomBedStatus RegionRoomBedStatus { get; set; }
public virtual ICollection<GuaDanOrderGuest> GuaDanOrderGuest { get; set; }
public virtual Room Room { get; set; }
public virtual RegionRoomBedStatus RegionRoomBedStatus { get; set; }
}
}
namespace Model
@@ -1433,8 +1446,8 @@ namespace Model
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public RegionRoomBedStatus()
{
this.GuaDanOrderGuests = new HashSet<GuaDanOrderGuest>();
this.RegionRoomBeds = new HashSet<RegionRoomBed>();
this.GuaDanOrderGuest = new HashSet<GuaDanOrderGuest>();
this.RegionRoomBed = new HashSet<RegionRoomBed>();
}
public string Code { get; set; }
@@ -1442,12 +1455,11 @@ namespace Model
public string Description { get; set; }
public Nullable<int> Category { get; set; }
public bool IsDeleted { get; set; }
public System.Guid Uuid { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<GuaDanOrderGuest> GuaDanOrderGuests { get; set; }
public virtual ICollection<GuaDanOrderGuest> GuaDanOrderGuest { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<RegionRoomBed> RegionRoomBeds { get; set; }
public virtual ICollection<RegionRoomBed> RegionRoomBed { get; set; }
}
}
namespace Model
@@ -1460,7 +1472,7 @@ namespace Model
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public RegionType()
{
this.Regions = new HashSet<Region>();
this.Region = new HashSet<Region>();
}
public string Code { get; set; }
@@ -1471,7 +1483,7 @@ namespace Model
public System.Guid Uuid { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<Region> Regions { get; set; }
public virtual ICollection<Region> Region { get; set; }
}
}
namespace Model
@@ -1484,7 +1496,7 @@ namespace Model
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public Room()
{
this.GuaDanOrderGuests = new HashSet<GuaDanOrderGuest>();
this.GuaDanOrderGuest = new HashSet<GuaDanOrderGuest>();
this.RegionRoomBed = new HashSet<RegionRoomBed>();
}
@@ -1499,7 +1511,7 @@ namespace Model
public System.Guid RegionUuid { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<GuaDanOrderGuest> GuaDanOrderGuests { get; set; }
public virtual ICollection<GuaDanOrderGuest> GuaDanOrderGuest { get; set; }
public virtual Region Region { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<RegionRoomBed> RegionRoomBed { get; set; }
@@ -1685,20 +1697,6 @@ namespace Model
using System;
using System.Collections.Generic;
public partial class sysdiagram
{
public string name { get; set; }
public int principal_id { get; set; }
public int diagram_id { get; set; }
public Nullable<int> version { get; set; }
public byte[] definition { get; set; }
}
}
namespace Model
{
using System;
using System.Collections.Generic;
public partial class transfer_register
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]

View File

@@ -438,6 +438,8 @@
<Property Name="BookerPhone" Type="nvarchar" MaxLength="12" />
<Property Name="IsDeleted" Type="bit" Nullable="false" />
<Property Name="Uuid" Type="uniqueidentifier" Nullable="false" />
<Property Name="ActivityNum" Type="int" />
<Property Name="IsCancel" Type="bit" Nullable="false" />
</EntityType>
<EntityType Name="GuaDanOrderGuest">
<Key>
@@ -451,7 +453,7 @@
<Property Name="BedUuid" Type="uniqueidentifier" />
<Property Name="CheckInAt" Type="date" />
<Property Name="CheckOutAt" Type="date" />
<Property Name="statusUuid" Type="uniqueidentifier" />
<Property Name="StatusCode" Type="nvarchar" MaxLength="20" Nullable="false" />
</EntityType>
<EntityType Name="GuadanTimeSetting">
<Key>
@@ -733,7 +735,8 @@
<Property Name="TargetUuid" Type="uniqueidentifier" />
<Property Name="GuaDanOrderNo" Type="nvarchar" MaxLength="20" />
<Property Name="ScheduleDate" Type="date" />
<Property Name="IsActive" Type="bit" Nullable="false" />
<Property Name="IsCancel" Type="bit" Nullable="false" />
<Property Name="GuaDanOrderGuestUuid" Type="uniqueidentifier" />
</EntityType>
<EntityType Name="RegionRoomBed">
<Key>
@@ -745,18 +748,17 @@
<Property Name="IsDeleted" Type="bit" Nullable="false" />
<Property Name="Uuid" Type="uniqueidentifier" Nullable="false" />
<Property Name="RoomUuid" Type="uniqueidentifier" Nullable="false" />
<Property Name="StatusUuid" Type="uniqueidentifier" />
<Property Name="StatusCode" Type="nvarchar" MaxLength="20" Nullable="false" />
</EntityType>
<EntityType Name="RegionRoomBedStatus">
<Key>
<PropertyRef Name="Uuid" />
<PropertyRef Name="Code" />
</Key>
<Property Name="Code" Type="nvarchar" MaxLength="20" />
<Property Name="Code" Type="nvarchar" MaxLength="20" Nullable="false" />
<Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
<Property Name="Description" Type="nvarchar" MaxLength="50" />
<Property Name="Category" Type="int" />
<Property Name="IsDeleted" Type="bit" Nullable="false" />
<Property Name="Uuid" Type="uniqueidentifier" Nullable="false" />
</EntityType>
<EntityType Name="RegionType">
<Key>
@@ -876,16 +878,6 @@
<Property Name="range" Type="int" />
<Property Name="demo" Type="nvarchar(max)" />
</EntityType>
<EntityType Name="sysdiagrams">
<Key>
<PropertyRef Name="diagram_id" />
</Key>
<Property Name="name" Type="nvarchar" MaxLength="128" Nullable="false" />
<Property Name="principal_id" Type="int" Nullable="false" />
<Property Name="diagram_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="version" Type="int" />
<Property Name="definition" Type="varbinary(max)" />
</EntityType>
<EntityType Name="transfer_register">
<Key>
<PropertyRef Name="id" />
@@ -1392,15 +1384,15 @@
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_GuaDanOrderGuest_Status">
<End Role="RegionRoomBedStatus" Type="Self.RegionRoomBedStatus" Multiplicity="0..1" />
<Association Name="FK_GuaDanOrderGuest_StatusCode">
<End Role="RegionRoomBedStatus" Type="Self.RegionRoomBedStatus" Multiplicity="1" />
<End Role="GuaDanOrderGuest" Type="Self.GuaDanOrderGuest" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="RegionRoomBedStatus">
<PropertyRef Name="Uuid" />
<PropertyRef Name="Code" />
</Principal>
<Dependent Role="GuaDanOrderGuest">
<PropertyRef Name="statusUuid" />
<PropertyRef Name="StatusCode" />
</Dependent>
</ReferentialConstraint>
</Association>
@@ -1702,18 +1694,6 @@
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_RegionRoomBed_RegionRoomBedStatus">
<End Role="RegionRoomBedStatus" Type="Self.RegionRoomBedStatus" Multiplicity="0..1" />
<End Role="RegionRoomBed" Type="Self.RegionRoomBed" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="RegionRoomBedStatus">
<PropertyRef Name="Uuid" />
</Principal>
<Dependent Role="RegionRoomBed">
<PropertyRef Name="StatusUuid" />
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_RegionRoomBed_RoomUuid">
<End Role="Room" Type="Self.Room" Multiplicity="1" />
<End Role="RegionRoomBed" Type="Self.RegionRoomBed" Multiplicity="*" />
@@ -1726,6 +1706,18 @@
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_RegionRoomBed_StatusCode">
<End Role="RegionRoomBedStatus" Type="Self.RegionRoomBedStatus" Multiplicity="1" />
<End Role="RegionRoomBed" Type="Self.RegionRoomBed" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="RegionRoomBedStatus">
<PropertyRef Name="Code" />
</Principal>
<Dependent Role="RegionRoomBed">
<PropertyRef Name="StatusCode" />
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_Room_Region">
<End Role="Region" Type="Self.Region" Multiplicity="1" />
<End Role="Room" Type="Self.Room" Multiplicity="*" />
@@ -1738,6 +1730,18 @@
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_Schedule_GuaDanOrderGuest">
<End Role="GuaDanOrderGuest" Type="Self.GuaDanOrderGuest" Multiplicity="0..1" />
<End Role="RegionAndRoomAndBedSchedule" Type="Self.RegionAndRoomAndBedSchedule" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="GuaDanOrderGuest">
<PropertyRef Name="Uuid" />
</Principal>
<Dependent Role="RegionAndRoomAndBedSchedule">
<PropertyRef Name="GuaDanOrderGuestUuid" />
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_stock_actItem">
<End Role="actItem" Type="Self.actItem" Multiplicity="0..1">
<OnDelete Action="Cascade" />
@@ -1934,7 +1938,6 @@
</Dependent>
</ReferentialConstraint>
</Association>
<Function Name="fn_diagramobjects" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" ReturnType="int" />
<Function Name="pager_eztrust" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
<Parameter Name="StartRowIndex" Type="int" Mode="In" />
<Parameter Name="PageSize" Type="int" Mode="In" />
@@ -1944,36 +1947,6 @@
<Parameter Name="orderBy" Type="nvarchar" Mode="In" />
<Parameter Name="rowCount" Type="int" Mode="InOut" />
</Function>
<Function Name="sp_alterdiagram" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
<Parameter Name="diagramname" Type="nvarchar" Mode="In" />
<Parameter Name="owner_id" Type="int" Mode="In" />
<Parameter Name="version" Type="int" Mode="In" />
<Parameter Name="definition" Type="varbinary(max)" Mode="In" />
</Function>
<Function Name="sp_creatediagram" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
<Parameter Name="diagramname" Type="nvarchar" Mode="In" />
<Parameter Name="owner_id" Type="int" Mode="In" />
<Parameter Name="version" Type="int" Mode="In" />
<Parameter Name="definition" Type="varbinary(max)" Mode="In" />
</Function>
<Function Name="sp_dropdiagram" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
<Parameter Name="diagramname" Type="nvarchar" Mode="In" />
<Parameter Name="owner_id" Type="int" Mode="In" />
</Function>
<Function Name="sp_helpdiagramdefinition" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
<Parameter Name="diagramname" Type="nvarchar" Mode="In" />
<Parameter Name="owner_id" Type="int" Mode="In" />
</Function>
<Function Name="sp_helpdiagrams" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
<Parameter Name="diagramname" Type="nvarchar" Mode="In" />
<Parameter Name="owner_id" Type="int" Mode="In" />
</Function>
<Function Name="sp_renamediagram" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
<Parameter Name="diagramname" Type="nvarchar" Mode="In" />
<Parameter Name="owner_id" Type="int" Mode="In" />
<Parameter Name="new_diagramname" Type="nvarchar" Mode="In" />
</Function>
<Function Name="sp_upgraddiagrams" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
<EntityContainer Name="ModelStoreContainer">
<EntitySet Name="accounting" EntityType="Self.accounting" Schema="dbo" store:Type="Tables" />
<EntitySet Name="accounting_files" EntityType="Self.accounting_files" Schema="dbo" store:Type="Tables" />
@@ -2036,7 +2009,6 @@
<EntitySet Name="stock_reason" EntityType="Self.stock_reason" Schema="dbo" store:Type="Tables" />
<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="sysdiagrams" EntityType="Self.sysdiagrams" Schema="dbo" store:Type="Tables" />
<EntitySet Name="transfer_register" EntityType="Self.transfer_register" Schema="dbo" store:Type="Tables" />
<AssociationSet Name="FK_accounting_accounting_kind" Association="Self.FK_accounting_accounting_kind">
<End Role="accounting_kind" EntitySet="accounting_kind" />
@@ -2190,7 +2162,7 @@
<End Role="Room" EntitySet="Room" />
<End Role="GuaDanOrderGuest" EntitySet="GuaDanOrderGuest" />
</AssociationSet>
<AssociationSet Name="FK_GuaDanOrderGuest_Status" Association="Self.FK_GuaDanOrderGuest_Status">
<AssociationSet Name="FK_GuaDanOrderGuest_StatusCode" Association="Self.FK_GuaDanOrderGuest_StatusCode">
<End Role="RegionRoomBedStatus" EntitySet="RegionRoomBedStatus" />
<End Role="GuaDanOrderGuest" EntitySet="GuaDanOrderGuest" />
</AssociationSet>
@@ -2290,18 +2262,22 @@
<End Role="RegionType" EntitySet="RegionType" />
<End Role="Region" EntitySet="Region" />
</AssociationSet>
<AssociationSet Name="FK_RegionRoomBed_RegionRoomBedStatus" Association="Self.FK_RegionRoomBed_RegionRoomBedStatus">
<End Role="RegionRoomBedStatus" EntitySet="RegionRoomBedStatus" />
<End Role="RegionRoomBed" EntitySet="RegionRoomBed" />
</AssociationSet>
<AssociationSet Name="FK_RegionRoomBed_RoomUuid" Association="Self.FK_RegionRoomBed_RoomUuid">
<End Role="Room" EntitySet="Room" />
<End Role="RegionRoomBed" EntitySet="RegionRoomBed" />
</AssociationSet>
<AssociationSet Name="FK_RegionRoomBed_StatusCode" Association="Self.FK_RegionRoomBed_StatusCode">
<End Role="RegionRoomBedStatus" EntitySet="RegionRoomBedStatus" />
<End Role="RegionRoomBed" EntitySet="RegionRoomBed" />
</AssociationSet>
<AssociationSet Name="FK_Room_Region" Association="Self.FK_Room_Region">
<End Role="Region" EntitySet="Region" />
<End Role="Room" EntitySet="Room" />
</AssociationSet>
<AssociationSet Name="FK_Schedule_GuaDanOrderGuest" Association="Self.FK_Schedule_GuaDanOrderGuest">
<End Role="GuaDanOrderGuest" EntitySet="GuaDanOrderGuest" />
<End Role="RegionAndRoomAndBedSchedule" EntitySet="RegionAndRoomAndBedSchedule" />
</AssociationSet>
<AssociationSet Name="FK_stock_actItem" Association="Self.FK_stock_actItem">
<End Role="actItem" EntitySet="actItem" />
<End Role="stock" EntitySet="stock" />
@@ -2634,7 +2610,7 @@
<NavigationProperty Name="admin_group" Relationship="Self.FK_admin_admin_group" FromRole="admin" ToRole="admin_group" />
<NavigationProperty Name="members" Relationship="Self.FK_member_admin" FromRole="admin" ToRole="member" />
<NavigationProperty Name="news" Relationship="Self.FK_news_admin" FromRole="admin" ToRole="news" />
<NavigationProperty Name="GuaDanOrders" Relationship="Model.FK_GuaDanOrder_Admin_CreateUser" FromRole="admin" ToRole="GuaDanOrder" />
<NavigationProperty Name="GuaDanOrder" Relationship="Model.FK_GuaDanOrder_Admin_CreateUser" FromRole="admin" ToRole="GuaDanOrder" />
</EntityType>
<EntityType Name="admin_group">
<Key>
@@ -2824,8 +2800,8 @@
<NavigationProperty Name="family_members" Relationship="Model.FK_family_members_followers" FromRole="follower" ToRole="family_members" />
<NavigationProperty Name="transfer_register" Relationship="Model.FK_transfer_register_followers" FromRole="follower" ToRole="transfer_register" />
<NavigationProperty Name="transfer_register1" Relationship="Model.FK_transfer_register_followers_match" FromRole="follower" ToRole="transfer_register" />
<NavigationProperty Name="GuaDanOrders" Relationship="Model.FK_GuaDanOrder_Followers" FromRole="follower" ToRole="GuaDanOrder" />
<NavigationProperty Name="GuaDanOrderGuests" Relationship="Model.FK_GuaDanOrderGuest_FOLLOWERS" FromRole="follower" ToRole="GuaDanOrderGuest" />
<NavigationProperty Name="GuaDanOrder" Relationship="Model.FK_GuaDanOrder_Followers" FromRole="follower" ToRole="GuaDanOrder" />
<NavigationProperty Name="GuaDanOrderGuest" Relationship="Model.FK_GuaDanOrderGuest_FOLLOWERS" FromRole="follower" ToRole="GuaDanOrderGuest" />
</EntityType>
<EntityType Name="followers_tablet">
<Key>
@@ -3192,16 +3168,6 @@
<Property Name="demo" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
<NavigationProperty Name="suppliers" Relationship="Self.FK_supplier_supplier_kind" FromRole="supplier_kind" ToRole="supplier" />
</EntityType>
<EntityType Name="sysdiagram">
<Key>
<PropertyRef Name="diagram_id" />
</Key>
<Property Name="name" Type="String" MaxLength="128" FixedLength="false" Unicode="true" Nullable="false" />
<Property Name="principal_id" Type="Int32" Nullable="false" />
<Property Name="diagram_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="version" Type="Int32" />
<Property Name="definition" Type="Binary" MaxLength="Max" FixedLength="false" />
</EntityType>
<Association Name="FK_accounting_accounting_kind">
<End Role="accounting_kind" Type="Self.accounting_kind" Multiplicity="0..1" />
<End Role="accounting" Type="Self.accounting" Multiplicity="*" />
@@ -3992,7 +3958,6 @@
<EntitySet Name="stock_reason" EntityType="Self.stock_reason" />
<EntitySet Name="suppliers" EntityType="Self.supplier" />
<EntitySet Name="supplier_kind" EntityType="Self.supplier_kind" />
<EntitySet Name="sysdiagrams" EntityType="Self.sysdiagram" />
<AssociationSet Name="FK_accounting_accounting_kind" Association="Self.FK_accounting_accounting_kind">
<End Role="accounting_kind" EntitySet="accounting_kind" />
<End Role="accounting" EntitySet="accountings" />
@@ -4355,10 +4320,14 @@
<End Role="Room" EntitySet="Room" />
<End Role="GuaDanOrderGuest" EntitySet="GuaDanOrderGuest" />
</AssociationSet>
<AssociationSet Name="FK_GuaDanOrderGuest_Status" Association="Model.FK_GuaDanOrderGuest_Status">
<AssociationSet Name="FK_GuaDanOrderGuest_StatusCode" Association="Model.FK_GuaDanOrderGuest_StatusCode">
<End Role="RegionRoomBedStatus" EntitySet="RegionRoomBedStatus" />
<End Role="GuaDanOrderGuest" EntitySet="GuaDanOrderGuest" />
</AssociationSet>
<AssociationSet Name="FK_Schedule_GuaDanOrderGuest" Association="Model.FK_Schedule_GuaDanOrderGuest">
<End Role="GuaDanOrderGuest" EntitySet="GuaDanOrderGuest" />
<End Role="RegionAndRoomAndBedSchedule" EntitySet="RegionAndRoomAndBedSchedule" />
</AssociationSet>
<AssociationSet Name="FK_Region_ParentUuid" Association="Model.FK_Region_ParentUuid">
<End Role="Region" EntitySet="Region" />
<End Role="Region1" EntitySet="Region" />
@@ -4371,14 +4340,14 @@
<End Role="Region" EntitySet="Region" />
<End Role="Room" EntitySet="Room" />
</AssociationSet>
<AssociationSet Name="FK_RegionRoomBed_RegionRoomBedStatus" Association="Model.FK_RegionRoomBed_RegionRoomBedStatus">
<End Role="RegionRoomBedStatus" EntitySet="RegionRoomBedStatus" />
<End Role="RegionRoomBed" EntitySet="RegionRoomBed" />
</AssociationSet>
<AssociationSet Name="FK_RegionRoomBed_RoomUuid" Association="Model.FK_RegionRoomBed_RoomUuid">
<End Role="Room" EntitySet="Room" />
<End Role="RegionRoomBed" EntitySet="RegionRoomBed" />
</AssociationSet>
<AssociationSet Name="FK_RegionRoomBed_StatusCode" Association="Model.FK_RegionRoomBed_StatusCode">
<End Role="RegionRoomBedStatus" EntitySet="RegionRoomBedStatus" />
<End Role="RegionRoomBed" EntitySet="RegionRoomBed" />
</AssociationSet>
</EntityContainer>
<ComplexType Name="sp_helpdiagramdefinition_Result">
<Property Type="Int32" Name="version" Nullable="true" />
@@ -4668,8 +4637,10 @@
<Property Name="BookerPhone" Type="String" MaxLength="12" FixedLength="false" Unicode="true" />
<Property Name="IsDeleted" Type="Boolean" Nullable="false" />
<Property Name="Uuid" Type="Guid" Nullable="false" />
<Property Name="ActivityNum" Type="Int32" />
<Property Name="IsCancel" Type="Boolean" Nullable="false" />
<NavigationProperty Name="admin" Relationship="Model.FK_GuaDanOrder_Admin_CreateUser" FromRole="GuaDanOrder" ToRole="admin" />
<NavigationProperty Name="follower" Relationship="Model.FK_GuaDanOrder_Followers" FromRole="GuaDanOrder" ToRole="follower" />
<NavigationProperty Name="followers" Relationship="Model.FK_GuaDanOrder_Followers" FromRole="GuaDanOrder" ToRole="follower" />
</EntityType>
<EntityType Name="GuaDanOrderGuest">
<Key>
@@ -4683,11 +4654,12 @@
<Property Name="BedUuid" Type="Guid" />
<Property Name="CheckInAt" Type="DateTime" Precision="0" />
<Property Name="CheckOutAt" Type="DateTime" Precision="0" />
<Property Name="statusUuid" Type="Guid" />
<NavigationProperty Name="follower" Relationship="Model.FK_GuaDanOrderGuest_FOLLOWERS" FromRole="GuaDanOrderGuest" ToRole="follower" />
<Property Name="StatusCode" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
<NavigationProperty Name="followers" Relationship="Model.FK_GuaDanOrderGuest_FOLLOWERS" FromRole="GuaDanOrderGuest" ToRole="follower" />
<NavigationProperty Name="RegionRoomBed" Relationship="Model.FK_GuaDanOrderGuest_BedUuid" FromRole="GuaDanOrderGuest" ToRole="RegionRoomBed" />
<NavigationProperty Name="Room" Relationship="Model.FK_GuaDanOrderGuest_RoomUuid" FromRole="GuaDanOrderGuest" ToRole="Room" />
<NavigationProperty Name="RegionRoomBedStatus" Relationship="Model.FK_GuaDanOrderGuest_Status" FromRole="GuaDanOrderGuest" ToRole="RegionRoomBedStatus" />
<NavigationProperty Name="RegionRoomBedStatus" Relationship="Model.FK_GuaDanOrderGuest_StatusCode" FromRole="GuaDanOrderGuest" ToRole="RegionRoomBedStatus" />
<NavigationProperty Name="RegionAndRoomAndBedSchedule" Relationship="Model.FK_Schedule_GuaDanOrderGuest" FromRole="GuaDanOrderGuest" ToRole="RegionAndRoomAndBedSchedule" />
</EntityType>
<EntityType Name="GuadanTimeSetting">
<Key>
@@ -4736,7 +4708,9 @@
<Property Name="TargetUuid" Type="Guid" />
<Property Name="GuaDanOrderNo" Type="String" MaxLength="20" FixedLength="false" Unicode="true" />
<Property Name="ScheduleDate" Type="DateTime" Precision="0" />
<Property Name="IsActive" Type="Boolean" Nullable="false" />
<Property Name="IsCancel" Type="Boolean" Nullable="false" />
<Property Name="GuaDanOrderGuestUuid" Type="Guid" />
<NavigationProperty Name="GuaDanOrderGuest" Relationship="Model.FK_Schedule_GuaDanOrderGuest" FromRole="RegionAndRoomAndBedSchedule" ToRole="GuaDanOrderGuest" />
</EntityType>
<EntityType Name="RegionRoomBed">
<Key>
@@ -4748,23 +4722,22 @@
<Property Name="IsDeleted" Type="Boolean" Nullable="false" />
<Property Name="Uuid" Type="Guid" Nullable="false" />
<Property Name="RoomUuid" Type="Guid" Nullable="false" />
<Property Name="StatusUuid" Type="Guid" />
<NavigationProperty Name="GuaDanOrderGuests" Relationship="Model.FK_GuaDanOrderGuest_BedUuid" FromRole="RegionRoomBed" ToRole="GuaDanOrderGuest" />
<NavigationProperty Name="RegionRoomBedStatus" Relationship="Model.FK_RegionRoomBed_RegionRoomBedStatus" FromRole="RegionRoomBed" ToRole="RegionRoomBedStatus" />
<Property Name="StatusCode" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
<NavigationProperty Name="GuaDanOrderGuest" Relationship="Model.FK_GuaDanOrderGuest_BedUuid" FromRole="RegionRoomBed" ToRole="GuaDanOrderGuest" />
<NavigationProperty Name="Room" Relationship="Model.FK_RegionRoomBed_RoomUuid" FromRole="RegionRoomBed" ToRole="Room" />
<NavigationProperty Name="RegionRoomBedStatus" Relationship="Model.FK_RegionRoomBed_StatusCode" FromRole="RegionRoomBed" ToRole="RegionRoomBedStatus" />
</EntityType>
<EntityType Name="RegionRoomBedStatus">
<Key>
<PropertyRef Name="Uuid" />
<PropertyRef Name="Code" />
</Key>
<Property Name="Code" Type="String" MaxLength="20" FixedLength="false" Unicode="true" />
<Property Name="Code" 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="Description" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="Category" Type="Int32" />
<Property Name="IsDeleted" Type="Boolean" Nullable="false" />
<Property Name="Uuid" Type="Guid" Nullable="false" />
<NavigationProperty Name="GuaDanOrderGuests" Relationship="Model.FK_GuaDanOrderGuest_Status" FromRole="RegionRoomBedStatus" ToRole="GuaDanOrderGuest" />
<NavigationProperty Name="RegionRoomBeds" Relationship="Model.FK_RegionRoomBed_RegionRoomBedStatus" FromRole="RegionRoomBedStatus" ToRole="RegionRoomBed" />
<NavigationProperty Name="GuaDanOrderGuest" Relationship="Model.FK_GuaDanOrderGuest_StatusCode" FromRole="RegionRoomBedStatus" ToRole="GuaDanOrderGuest" />
<NavigationProperty Name="RegionRoomBed" Relationship="Model.FK_RegionRoomBed_StatusCode" FromRole="RegionRoomBedStatus" ToRole="RegionRoomBed" />
</EntityType>
<EntityType Name="RegionType">
<Key>
@@ -4776,7 +4749,7 @@
<Property Name="CreateAt" Type="DateTime" Precision="3" />
<Property Name="IsDeleted" Type="Boolean" Nullable="false" />
<Property Name="Uuid" Type="Guid" Nullable="false" />
<NavigationProperty Name="Regions" Relationship="Model.FK_Region_RegionTypeUuid" FromRole="RegionType" ToRole="Region" />
<NavigationProperty Name="Region" Relationship="Model.FK_Region_RegionTypeUuid" FromRole="RegionType" ToRole="Region" />
</EntityType>
<EntityType Name="Room">
<Key>
@@ -4791,7 +4764,7 @@
<Property Name="IsDeleted" Type="Boolean" Nullable="false" />
<Property Name="Uuid" Type="Guid" Nullable="false" />
<Property Name="RegionUuid" Type="Guid" Nullable="false" />
<NavigationProperty Name="GuaDanOrderGuests" Relationship="Model.FK_GuaDanOrderGuest_RoomUuid" FromRole="Room" ToRole="GuaDanOrderGuest" />
<NavigationProperty Name="GuaDanOrderGuest" Relationship="Model.FK_GuaDanOrderGuest_RoomUuid" FromRole="Room" ToRole="GuaDanOrderGuest" />
<NavigationProperty Name="Region" Relationship="Model.FK_Room_Region" FromRole="Room" ToRole="Region" />
<NavigationProperty Name="RegionRoomBed" Relationship="Model.FK_RegionRoomBed_RoomUuid" FromRole="Room" ToRole="RegionRoomBed" />
</EntityType>
@@ -4855,15 +4828,27 @@
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_GuaDanOrderGuest_Status">
<End Type="Model.RegionRoomBedStatus" Role="RegionRoomBedStatus" Multiplicity="0..1" />
<Association Name="FK_GuaDanOrderGuest_StatusCode">
<End Type="Model.RegionRoomBedStatus" Role="RegionRoomBedStatus" Multiplicity="1" />
<End Type="Model.GuaDanOrderGuest" Role="GuaDanOrderGuest" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="RegionRoomBedStatus">
<PropertyRef Name="Uuid" />
<PropertyRef Name="Code" />
</Principal>
<Dependent Role="GuaDanOrderGuest">
<PropertyRef Name="statusUuid" />
<PropertyRef Name="StatusCode" />
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_Schedule_GuaDanOrderGuest">
<End Type="Model.GuaDanOrderGuest" Role="GuaDanOrderGuest" Multiplicity="0..1" />
<End Type="Model.RegionAndRoomAndBedSchedule" Role="RegionAndRoomAndBedSchedule" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="GuaDanOrderGuest">
<PropertyRef Name="Uuid" />
</Principal>
<Dependent Role="RegionAndRoomAndBedSchedule">
<PropertyRef Name="GuaDanOrderGuestUuid" />
</Dependent>
</ReferentialConstraint>
</Association>
@@ -4903,18 +4888,6 @@
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_RegionRoomBed_RegionRoomBedStatus">
<End Type="Model.RegionRoomBedStatus" Role="RegionRoomBedStatus" Multiplicity="0..1" />
<End Type="Model.RegionRoomBed" Role="RegionRoomBed" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="RegionRoomBedStatus">
<PropertyRef Name="Uuid" />
</Principal>
<Dependent Role="RegionRoomBed">
<PropertyRef Name="StatusUuid" />
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_RegionRoomBed_RoomUuid">
<End Type="Model.Room" Role="Room" Multiplicity="1" />
<End Type="Model.RegionRoomBed" Role="RegionRoomBed" Multiplicity="*" />
@@ -4927,6 +4900,18 @@
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_RegionRoomBed_StatusCode">
<End Type="Model.RegionRoomBedStatus" Role="RegionRoomBedStatus" Multiplicity="1" />
<End Type="Model.RegionRoomBed" Role="RegionRoomBed" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="RegionRoomBedStatus">
<PropertyRef Name="Code" />
</Principal>
<Dependent Role="RegionRoomBed">
<PropertyRef Name="StatusCode" />
</Dependent>
</ReferentialConstraint>
</Association>
</Schema>
</edmx:ConceptualModels>
<!-- C-S mapping content -->
@@ -5666,42 +5651,7 @@
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="sysdiagrams">
<EntityTypeMapping TypeName="Model.sysdiagram">
<MappingFragment StoreEntitySet="sysdiagrams">
<ScalarProperty Name="name" ColumnName="name" />
<ScalarProperty Name="principal_id" ColumnName="principal_id" />
<ScalarProperty Name="diagram_id" ColumnName="diagram_id" />
<ScalarProperty Name="version" ColumnName="version" />
<ScalarProperty Name="definition" ColumnName="definition" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<FunctionImportMapping FunctionImportName="pager_eztrust" FunctionName="Model.Store.pager_eztrust" />
<FunctionImportMapping FunctionImportName="sp_alterdiagram" FunctionName="Model.Store.sp_alterdiagram" />
<FunctionImportMapping FunctionImportName="sp_creatediagram" FunctionName="Model.Store.sp_creatediagram" />
<FunctionImportMapping FunctionImportName="sp_dropdiagram" FunctionName="Model.Store.sp_dropdiagram" />
<FunctionImportMapping FunctionImportName="sp_helpdiagramdefinition" FunctionName="Model.Store.sp_helpdiagramdefinition">
<ResultMapping>
<ComplexTypeMapping TypeName="Model.sp_helpdiagramdefinition_Result">
<ScalarProperty Name="version" ColumnName="version" />
<ScalarProperty Name="definition" ColumnName="definition" />
</ComplexTypeMapping>
</ResultMapping>
</FunctionImportMapping>
<FunctionImportMapping FunctionImportName="sp_helpdiagrams" FunctionName="Model.Store.sp_helpdiagrams">
<ResultMapping>
<ComplexTypeMapping TypeName="Model.sp_helpdiagrams_Result">
<ScalarProperty Name="Database" ColumnName="Database" />
<ScalarProperty Name="Name" ColumnName="Name" />
<ScalarProperty Name="ID" ColumnName="ID" />
<ScalarProperty Name="Owner" ColumnName="Owner" />
<ScalarProperty Name="OwnerID" ColumnName="OwnerID" />
</ComplexTypeMapping>
</ResultMapping>
</FunctionImportMapping>
<FunctionImportMapping FunctionImportName="sp_renamediagram" FunctionName="Model.Store.sp_renamediagram" />
<FunctionImportMapping FunctionImportName="sp_upgraddiagrams" FunctionName="Model.Store.sp_upgraddiagrams" />
<EntitySetMapping Name="act_bom">
<EntityTypeMapping TypeName="Model.act_bom">
<MappingFragment StoreEntitySet="act_bom">
@@ -5803,6 +5753,8 @@
<EntitySetMapping Name="GuaDanOrder">
<EntityTypeMapping TypeName="Model.GuaDanOrder">
<MappingFragment StoreEntitySet="GuaDanOrder">
<ScalarProperty Name="IsCancel" ColumnName="IsCancel" />
<ScalarProperty Name="ActivityNum" ColumnName="ActivityNum" />
<ScalarProperty Name="Uuid" ColumnName="Uuid" />
<ScalarProperty Name="IsDeleted" ColumnName="IsDeleted" />
<ScalarProperty Name="BookerPhone" ColumnName="BookerPhone" />
@@ -5821,7 +5773,7 @@
<EntitySetMapping Name="GuaDanOrderGuest">
<EntityTypeMapping TypeName="Model.GuaDanOrderGuest">
<MappingFragment StoreEntitySet="GuaDanOrderGuest">
<ScalarProperty Name="statusUuid" ColumnName="statusUuid" />
<ScalarProperty Name="StatusCode" ColumnName="StatusCode" />
<ScalarProperty Name="CheckOutAt" ColumnName="CheckOutAt" />
<ScalarProperty Name="CheckInAt" ColumnName="CheckInAt" />
<ScalarProperty Name="BedUuid" ColumnName="BedUuid" />
@@ -5867,7 +5819,8 @@
<EntitySetMapping Name="RegionAndRoomAndBedSchedule">
<EntityTypeMapping TypeName="Model.RegionAndRoomAndBedSchedule">
<MappingFragment StoreEntitySet="RegionAndRoomAndBedSchedule">
<ScalarProperty Name="IsActive" ColumnName="IsActive" />
<ScalarProperty Name="GuaDanOrderGuestUuid" ColumnName="GuaDanOrderGuestUuid" />
<ScalarProperty Name="IsCancel" ColumnName="IsCancel" />
<ScalarProperty Name="ScheduleDate" ColumnName="ScheduleDate" />
<ScalarProperty Name="GuaDanOrderNo" ColumnName="GuaDanOrderNo" />
<ScalarProperty Name="TargetUuid" ColumnName="TargetUuid" />
@@ -5884,7 +5837,7 @@
<EntitySetMapping Name="RegionRoomBed">
<EntityTypeMapping TypeName="Model.RegionRoomBed">
<MappingFragment StoreEntitySet="RegionRoomBed">
<ScalarProperty Name="StatusUuid" ColumnName="StatusUuid" />
<ScalarProperty Name="StatusCode" ColumnName="StatusCode" />
<ScalarProperty Name="RoomUuid" ColumnName="RoomUuid" />
<ScalarProperty Name="Uuid" ColumnName="Uuid" />
<ScalarProperty Name="IsDeleted" ColumnName="IsDeleted" />
@@ -5897,7 +5850,6 @@
<EntitySetMapping Name="RegionRoomBedStatus">
<EntityTypeMapping TypeName="Model.RegionRoomBedStatus">
<MappingFragment StoreEntitySet="RegionRoomBedStatus">
<ScalarProperty Name="Uuid" ColumnName="Uuid" />
<ScalarProperty Name="IsDeleted" ColumnName="IsDeleted" />
<ScalarProperty Name="Category" ColumnName="Category" />
<ScalarProperty Name="Description" ColumnName="Description" />
@@ -5947,7 +5899,7 @@
<Options>
<DesignerInfoPropertySet>
<DesignerProperty Name="ValidateOnBuild" Value="true" />
<DesignerProperty Name="EnablePluralization" Value="true" />
<DesignerProperty Name="EnablePluralization" Value="False" />
<DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
<DesignerProperty Name="UseLegacyProvider" Value="false" />
<DesignerProperty Name="CodeGenerationStrategy" Value="無" />

View File

@@ -52,7 +52,6 @@
<EntityTypeShape EntityType="Model.stock_reason" Width="1.5" PointX="14.25" PointY="33.625" IsExpanded="true" />
<EntityTypeShape EntityType="Model.supplier" Width="1.5" PointX="14.25" PointY="36.5" IsExpanded="true" />
<EntityTypeShape EntityType="Model.supplier_kind" Width="1.5" PointX="12" PointY="37.5" IsExpanded="true" />
<EntityTypeShape EntityType="Model.sysdiagram" Width="1.5" PointX="0.75" PointY="6" IsExpanded="true" />
<AssociationConnector Association="Model.FK_accounting_accounting_kind" ManuallyRouted="false" />
<AssociationConnector Association="Model.FK_accounting_accounting_kind2" ManuallyRouted="false" />
<AssociationConnector Association="Model.FK_accounting_activity" ManuallyRouted="false" />
@@ -131,26 +130,27 @@
<AssociationConnector Association="Model.FK_transfer_register_actItem" />
<AssociationConnector Association="Model.FK_transfer_register_pro_order_detail" />
<AssociationConnector Association="Model.FK_pro_order_record_transfer_register" />
<EntityTypeShape EntityType="Model.GuaDanOrder" Width="1.5" PointX="13.375" PointY="21.25" />
<EntityTypeShape EntityType="Model.GuaDanOrderGuest" Width="2.125" PointX="30.375" PointY="13.75" />
<EntityTypeShape EntityType="Model.GuadanTimeSetting" Width="1.5" PointX="21.375" PointY="9.125" />
<EntityTypeShape EntityType="Model.Region" Width="1.5" PointX="23.625" PointY="3.875" />
<EntityTypeShape EntityType="Model.RegionAndRoomAndBedSchedule" Width="1.5" PointX="23.375" PointY="9.125" />
<EntityTypeShape EntityType="Model.RegionRoomBed" Width="2.125" PointX="28.125" PointY="4.625" />
<EntityTypeShape EntityType="Model.RegionRoomBedStatus" Width="1.5" PointX="25.875" PointY="0.75" />
<EntityTypeShape EntityType="Model.RegionType" Width="1.5" PointX="21.375" PointY="4.875" />
<EntityTypeShape EntityType="Model.Room" Width="1.5" PointX="25.875" PointY="4.375" />
<EntityTypeShape EntityType="Model.GuaDanOrder" Width="1.5" PointX="13.25" PointY="20.25" />
<EntityTypeShape EntityType="Model.GuaDanOrderGuest" Width="1.5" PointX="25.875" PointY="12.5" />
<EntityTypeShape EntityType="Model.GuadanTimeSetting" Width="1.5" PointX="21.375" PointY="7.75" />
<EntityTypeShape EntityType="Model.Region" Width="1.5" PointX="19.125" PointY="30.75" />
<EntityTypeShape EntityType="Model.RegionAndRoomAndBedSchedule" Width="1.5" PointX="28.125" PointY="12.625" />
<EntityTypeShape EntityType="Model.RegionRoomBed" Width="1.5" PointX="23.625" PointY="3.375" />
<EntityTypeShape EntityType="Model.RegionRoomBedStatus" Width="1.5" PointX="21.375" PointY="3.625" />
<EntityTypeShape EntityType="Model.RegionType" Width="1.5" PointX="16.875" PointY="31.625" />
<EntityTypeShape EntityType="Model.Room" Width="1.5" PointX="21.375" PointY="31.125" />
<AssociationConnector Association="Model.FK_GuaDanOrder_Admin_CreateUser" />
<AssociationConnector Association="Model.FK_GuaDanOrder_Followers" />
<AssociationConnector Association="Model.FK_GuaDanOrderGuest_FOLLOWERS" />
<AssociationConnector Association="Model.FK_GuaDanOrderGuest_BedUuid" />
<AssociationConnector Association="Model.FK_GuaDanOrderGuest_RoomUuid" />
<AssociationConnector Association="Model.FK_GuaDanOrderGuest_Status" />
<AssociationConnector Association="Model.FK_GuaDanOrderGuest_StatusCode" />
<AssociationConnector Association="Model.FK_Schedule_GuaDanOrderGuest" />
<AssociationConnector Association="Model.FK_Region_ParentUuid" />
<AssociationConnector Association="Model.FK_Region_RegionTypeUuid" />
<AssociationConnector Association="Model.FK_Room_Region" />
<AssociationConnector Association="Model.FK_RegionRoomBed_RegionRoomBedStatus" />
<AssociationConnector Association="Model.FK_RegionRoomBed_RoomUuid" />
<AssociationConnector Association="Model.FK_RegionRoomBed_StatusCode" />
</Diagram>
</edmx:Diagrams>
</edmx:Designer>

View File

@@ -162,7 +162,10 @@ public class guadanOrderController : ApiController
{
return NotFound();
}
if(_db.GuaDanOrderGuest.Any(a => a.GuaDanOrderNo == guadan.GuaDanOrderNo) )
{
return BadRequest($"该挂单已经存在挂单莲友,不能取消!");
}
using (var transaction = _db.Database.BeginTransaction())
{
try

View File

@@ -191,8 +191,6 @@ public class guadanOrderGuestController : ApiController
_db.RegionAndRoomAndBedSchedule.Add(schedul);
}
await _db.SaveChangesAsync();
await _db.SaveChangesAsync();
return Ok();
}
@@ -328,7 +326,56 @@ public class guadanOrderGuestController : ApiController
await _db.SaveChangesAsync();
return Ok();
}
[HttpPost]
[Route("api/guadanorderguest/xuzhu")]
public async Task<IHttpActionResult> ExtendStay([FromBody] XuZhuModel model)
{
//续住方法
if (model == null)
return BadRequest("请求数据为空");
if (model.GuestUuid == Guid.Empty || model.GuestBedUuid == Guid.Empty)
return BadRequest("GuestUuid 或 GuestBedUuid 无效");
var guest= await _db.GuaDanOrderGuest.FindAsync(model.GuestUuid);
if (guest == null)
{
return BadRequest("挂单不存在");
}
if(guest.BedUuid != model.GuestBedUuid)
{
return BadRequest("床位不正确");
}
var bedIsCanUse = await RegionAndRoomAndBedSchedule.IsBedAvailableAsync(_db,model.GuestBedUuid, model.CurrentCheckoutDate, model.NewCheckoutDate);
if(!bedIsCanUse)
{
return BadRequest("该床位在续住时间段内被预定,无法续住");
}
var newStartDate = model.CurrentCheckoutDate.Date;
var newEndDate = model.NewCheckoutDate.Date.AddDays(-1);
if (newEndDate < newStartDate)
return BadRequest("续住日期区间无效");
for (var date = newStartDate; date <= newEndDate; date = date.AddDays(1))
{
var newSchedule = new RegionAndRoomAndBedSchedule
{
GuaDanOrderNo = guest.GuaDanOrderNo,
Uuid = Guid.NewGuid(),
TargetUuid = model.GuestBedUuid,
GuaDanOrderGuestUuid = model.GuestUuid,
ScheduleDate = date,
Title = "续住挂单", // 一天一条,开始和结束是同一天
Description = "续住挂单",
UseType = 30,
CreatedAt = DateTime.UtcNow
};
_db.RegionAndRoomAndBedSchedule.Add(newSchedule);
}
guest.CheckOutAt = model.NewCheckoutDate.Date;
await _db.SaveChangesAsync(); // 保存数据库操作
return Ok(new { message = "续住成功" });
}
[HttpPost]
[Route("api/guadanorderguest/cancel")]
public async Task<IHttpActionResult> CancelGuadanGuest([FromUri] Guid uuid)
@@ -541,12 +588,23 @@ public class guadanOrderGuestController : ApiController
if (guest.BedUuid != null)
{
var bed = _db.RegionRoomBed.FirstOrDefault(b => b.Uuid == guest.BedUuid);
if (bed != null && StatusTransitionManager.CanTransition(bed.StatusCode, "102")) // 102 = 占用
if(bed == null)
{
return BadRequest("入住床位不存在");
}
if (StatusTransitionManager.CanTransition(bed.StatusCode, "102")) // 102 = 占用
{
bed.StatusCode = "102";
}
else
{
return BadRequest($"当前床位状态:{bed.RegionRoomBedStatus.Name} 不能入住");
}
}
else if(guest.BedUuid == null)
{
return BadRequest("入住床位不存在");
}
_db.SaveChanges();
return Ok(new { message = "入住成功", statusCode = guest.StatusCode });
@@ -593,5 +651,12 @@ public class guadanOrderGuestController : ApiController
public int num { get; set; }
public string u_name { get; set; }
}
public class XuZhuModel
{
public Guid GuestUuid { get; set; } // 不可为空
public Guid GuestBedUuid { get; set; } // 不可为空
public DateTime CurrentCheckoutDate { get; set; } // 当前退房时间
public DateTime NewCheckoutDate { get; set; } // 新退房时间
}
}

View File

@@ -0,0 +1,70 @@
using Model;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Http;
/// <summary>
/// guadanGuestQueryController 的摘要描述
/// </summary>
public class guadanGuestQueryController: ApiController
{
private Model.ezEntities _db = new Model.ezEntities();
public guadanGuestQueryController()
{
//
// TODO: 在這裡新增建構函式邏輯
//
}
[HttpPost]
[Route("api/guadan/guest/query/list")]
public async Task<IHttpActionResult> GetList([FromBody] SearchGuestModel search)
{
var query = _db.GuaDanOrderGuest
.Where(guest => guest.StatusCode != "404");
if(search.SearchName != null)
{
query = query.Where(guest => guest.followers.u_name.Contains(search.SearchName));
}
var data = await query.ToListAsync();
var data1 = data.Select(a => new
{
name = a.followers != null ? a.followers.u_name : null,
checkindate = a.CheckInAt,
checkoutdate = a.CheckOutAt,
guadanorderno = a.GuaDanOrderNo,
roomName = GetRoomAndBedString(a.RegionRoomBed),
}).ToList();
return Ok(new
{
items = data1,
total = data1.Count(),
});
}
public string GetRoomAndBedString(RegionRoomBed bed)
{
if (bed == null || bed.Room == null) return "";
var room = bed.Room;
var region = room.Region;
var name = room.Name + "/" + bed.Name;
if(region != null)
{
name = region.Name + "/" + name;
}
var parentRegion = region.Region2;
while (parentRegion != null)
{
name = parentRegion.Name + "/" + name;
parentRegion = parentRegion.Region2;
}
return name;
}
public class SearchGuestModel
{
public string SearchName = null;
}
}