改太多
This commit is contained in:
1 parent
be5352efed
commit
1cb2a7a35e
48 files changed
+17970
-485
No files matched your search
@@ -119,6 +119,10 @@ namespace Model
|
||||
public virtual DbSet<TabletPaperSize> TabletPaperSize { get; set; }
|
||||
public virtual DbSet<TabletStyle> TabletStyle { get; set; }
|
||||
public virtual DbSet<TabletStyleDetail> TabletStyleDetail { get; set; }
|
||||
public virtual DbSet<default_page> default_page { get; set; }
|
||||
public virtual DbSet<GuadaoSubDetail> GuadaoSubDetail { get; set; }
|
||||
public virtual DbSet<GuaDanOrderDetail> GuaDanOrderDetail { get; set; }
|
||||
public virtual DbSet<GuaDanLimits> GuaDanLimits { get; set; }
|
||||
|
||||
public virtual int pager_eztrust(Nullable<int> startRowIndex, Nullable<int> pageSize, string tableName, string columnName, string sqlWhere, string orderBy, ObjectParameter rowCount)
|
||||
{
|
||||
|
||||
@@ -883,6 +883,17 @@ namespace Model
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class default_page
|
||||
{
|
||||
public string u_id { get; set; }
|
||||
public string default_url { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class family_members
|
||||
{
|
||||
public int num { get; set; }
|
||||
@@ -1057,6 +1068,18 @@ namespace Model
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class GuaDanLimits
|
||||
{
|
||||
public string ParamNo { get; set; }
|
||||
public string ParamName { get; set; }
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class GuaDanOrder
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
@@ -1091,6 +1114,25 @@ namespace Model
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class GuaDanOrderDetail
|
||||
{
|
||||
public System.Guid Uuid { get; set; }
|
||||
public Nullable<System.Guid> RoomUuid { get; set; }
|
||||
public Nullable<System.Guid> BedUuid { get; set; }
|
||||
public string GuaDanDate { get; set; }
|
||||
public string Remark { get; set; }
|
||||
public string GuaDanOrderNo { get; set; }
|
||||
public Nullable<System.Guid> GuestUuid { get; set; }
|
||||
public Nullable<System.DateTime> CheckInAt { get; set; }
|
||||
public Nullable<System.DateTime> CheckOutAt { get; set; }
|
||||
public string StatusCode { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class GuaDanOrderGuest
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
@@ -1109,6 +1151,10 @@ namespace Model
|
||||
public Nullable<System.DateTime> CheckOutAt { get; set; }
|
||||
public string StatusCode { get; set; }
|
||||
public Nullable<System.Guid> OrderUuid { get; set; }
|
||||
public string Sex { get; set; }
|
||||
public string Handi { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Limits { get; set; }
|
||||
|
||||
public virtual follower followers { get; set; }
|
||||
public virtual GuaDanOrder GuaDanOrder { get; set; }
|
||||
@@ -1139,6 +1185,22 @@ namespace Model
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class GuadaoSubDetail
|
||||
{
|
||||
public System.Guid GUuid { get; set; }
|
||||
public Nullable<System.Guid> RoomUuid { get; set; }
|
||||
public Nullable<System.Guid> BedUuid { get; set; }
|
||||
public System.DateTime CheckInAt { get; set; }
|
||||
public Nullable<System.DateTime> CheckOutAt { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string StatusCode { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class hr_arrange
|
||||
{
|
||||
public string company_id { get; set; }
|
||||
@@ -1719,6 +1781,7 @@ namespace Model
|
||||
public string print_id { get; set; }
|
||||
public Nullable<System.DateTime> UpdateTime { get; set; }
|
||||
public string style { get; set; }
|
||||
public Nullable<int> newid { get; set; }
|
||||
|
||||
public virtual actItem actItem { get; set; }
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
|
||||
@@ -445,6 +445,13 @@
|
||||
<Property Name="name_en" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="name_zh" Type="nvarchar" MaxLength="30" />
|
||||
</EntityType>
|
||||
<EntityType Name="default_page">
|
||||
<Key>
|
||||
<PropertyRef Name="u_id" />
|
||||
</Key>
|
||||
<Property Name="u_id" Type="varchar" MaxLength="50" Nullable="false" />
|
||||
<Property Name="default_url" Type="varchar" MaxLength="250" />
|
||||
</EntityType>
|
||||
<EntityType Name="family_members">
|
||||
<Key>
|
||||
<PropertyRef Name="num" />
|
||||
@@ -535,6 +542,14 @@
|
||||
<Property Name="tablet" Type="nvarchar(max)" />
|
||||
<Property Name="shuwen" Type="nvarchar(max)" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuaDanLimits">
|
||||
<Key>
|
||||
<PropertyRef Name="ParamNo" />
|
||||
</Key>
|
||||
<Property Name="ParamNo" Type="varchar" MaxLength="4" Nullable="false" />
|
||||
<Property Name="ParamName" Type="nvarchar" MaxLength="50" />
|
||||
<Property Name="Remark" Type="nvarchar" MaxLength="500" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuaDanOrder">
|
||||
<Key>
|
||||
<PropertyRef Name="Uuid" />
|
||||
@@ -554,6 +569,21 @@
|
||||
<Property Name="ActivityNum" Type="int" />
|
||||
<Property Name="IsCancel" Type="bit" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuaDanOrderDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="Uuid" />
|
||||
</Key>
|
||||
<Property Name="Uuid" Type="uniqueidentifier" Nullable="false" />
|
||||
<Property Name="RoomUuid" Type="uniqueidentifier" />
|
||||
<Property Name="BedUuid" Type="uniqueidentifier" />
|
||||
<Property Name="GuaDanDate" Type="varchar" MaxLength="10" />
|
||||
<Property Name="Remark" Type="nvarchar" MaxLength="50" />
|
||||
<Property Name="GuaDanOrderNo" Type="nvarchar" MaxLength="20" />
|
||||
<Property Name="GuestUuid" Type="uniqueidentifier" />
|
||||
<Property Name="CheckInAt" Type="date" />
|
||||
<Property Name="CheckOutAt" Type="date" />
|
||||
<Property Name="StatusCode" Type="nvarchar" MaxLength="20" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuaDanOrderGuest">
|
||||
<Key>
|
||||
<PropertyRef Name="Uuid" />
|
||||
@@ -568,6 +598,10 @@
|
||||
<Property Name="CheckOutAt" Type="date" />
|
||||
<Property Name="StatusCode" Type="nvarchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="OrderUuid" Type="uniqueidentifier" />
|
||||
<Property Name="Sex" Type="varchar" MaxLength="4" />
|
||||
<Property Name="Handi" Type="varchar" MaxLength="10" />
|
||||
<Property Name="Name" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="Limits" Type="varchar" MaxLength="100" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuadanTimeSetting">
|
||||
<Key>
|
||||
@@ -580,6 +614,19 @@
|
||||
<Property Name="CreatedAt" Type="datetime" />
|
||||
<Property Name="UpdatedAt" Type="datetime" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuadaoSubDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="GUuid" />
|
||||
<PropertyRef Name="CheckInAt" />
|
||||
</Key>
|
||||
<Property Name="GUuid" Type="uniqueidentifier" Nullable="false" />
|
||||
<Property Name="RoomUuid" Type="uniqueidentifier" />
|
||||
<Property Name="BedUuid" Type="uniqueidentifier" />
|
||||
<Property Name="CheckInAt" Type="date" Nullable="false" />
|
||||
<Property Name="CheckOutAt" Type="date" />
|
||||
<Property Name="Description" Type="nvarchar" MaxLength="500" />
|
||||
<Property Name="StatusCode" Type="nvarchar" MaxLength="20" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="hr_arrange">
|
||||
<Key>
|
||||
<PropertyRef Name="company_id" />
|
||||
@@ -994,6 +1041,7 @@
|
||||
<Property Name="printed_files" Type="nvarchar(max)" />
|
||||
<Property Name="UpdateTime" Type="datetime2" Precision="7" />
|
||||
<Property Name="style" Type="varchar" MaxLength="50" />
|
||||
<Property Name="newid" Type="int" />
|
||||
</EntityType>
|
||||
<EntityType Name="pro_order_record">
|
||||
<Key>
|
||||
@@ -1206,7 +1254,7 @@
|
||||
<PropertyRef Name="num" />
|
||||
</Key>
|
||||
<Property Name="num" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="shuwen_type" Type="varchar" MaxLength="4" Nullable="false" />
|
||||
<Property Name="shuwen_type" Type="nvarchar" MaxLength="4" />
|
||||
<Property Name="name" Type="nvarchar" MaxLength="50" />
|
||||
<Property Name="contents" Type="nvarchar(max)" />
|
||||
<Property Name="reg_time" Type="datetime" />
|
||||
@@ -2584,14 +2632,18 @@
|
||||
<EntitySet Name="bed_order_detail" EntityType="Self.bed_order_detail" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="company" EntityType="Self.company" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="country" EntityType="Self.country" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="default_page" EntityType="Self.default_page" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="family_members" EntityType="Self.family_members" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="files" EntityType="Self.files" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="followers" EntityType="Self.followers" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="followers_tablet" EntityType="Self.followers_tablet" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="followers_tablet_template" EntityType="Self.followers_tablet_template" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="GuaDanLimits" EntityType="Self.GuaDanLimits" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="GuaDanOrder" EntityType="Self.GuaDanOrder" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="GuaDanOrderDetail" EntityType="Self.GuaDanOrderDetail" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="GuaDanOrderGuest" EntityType="Self.GuaDanOrderGuest" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="GuadanTimeSetting" EntityType="Self.GuadanTimeSetting" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="GuadaoSubDetail" EntityType="Self.GuadaoSubDetail" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="hr_arrange" EntityType="Self.hr_arrange" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="hr_company" EntityType="Self.hr_company" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="hr_employee" EntityType="Self.hr_employee" Schema="dbo" store:Type="Tables" />
|
||||
@@ -3696,6 +3748,7 @@
|
||||
<NavigationProperty Name="accountings" Relationship="Model.FK_accounting_pro_order_detail" FromRole="pro_order_detail" ToRole="accounting" />
|
||||
<NavigationProperty Name="transfer_register" Relationship="Model.FK_transfer_register_pro_order_detail" FromRole="pro_order_detail" ToRole="transfer_register" />
|
||||
<Property Name="style" Type="String" Unicode="false" FixedLength="false" MaxLength="50" Nullable="true" />
|
||||
<Property Name="newid" Type="Int32" />
|
||||
</EntityType>
|
||||
<EntityType Name="pro_order_record">
|
||||
<Key>
|
||||
@@ -5090,6 +5143,10 @@
|
||||
<EntitySet Name="TabletPaperSize" EntityType="Model.TabletPaperSize" />
|
||||
<EntitySet Name="TabletStyle" EntityType="Model.TabletStyle" />
|
||||
<EntitySet Name="TabletStyleDetail" EntityType="Model.TabletStyleDetail" />
|
||||
<EntitySet Name="default_page" EntityType="Model.default_page" />
|
||||
<EntitySet Name="GuadaoSubDetail" EntityType="Model.GuadaoSubDetail" />
|
||||
<EntitySet Name="GuaDanOrderDetail" EntityType="Model.GuaDanOrderDetail" />
|
||||
<EntitySet Name="GuaDanLimits" EntityType="Model.GuaDanLimits" />
|
||||
</EntityContainer>
|
||||
<ComplexType Name="sp_helpdiagramdefinition_Result">
|
||||
<Property Type="Int32" Name="version" Nullable="true" />
|
||||
@@ -5734,6 +5791,10 @@
|
||||
<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="Sex" Type="String" MaxLength="4" FixedLength="false" Unicode="false" />
|
||||
<Property Name="Handi" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Limits" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
</EntityType>
|
||||
<Association Name="FK_GuaDanOrderGuest_FOLLOWERS">
|
||||
<End Type="Model.follower" Role="follower" Multiplicity="0..1" />
|
||||
@@ -6164,7 +6225,7 @@
|
||||
<PropertyRef Name="num" />
|
||||
</Key>
|
||||
<Property Name="num" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<Property Name="shuwen_type" Type="String" Nullable="false" MaxLength="4" FixedLength="false" Unicode="false" />
|
||||
<Property Name="shuwen_type" Type="String" MaxLength="4" FixedLength="false" Unicode="true" />
|
||||
<Property Name="name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="contents" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
||||
<Property Name="reg_time" Type="DateTime" Precision="3" />
|
||||
@@ -6250,6 +6311,49 @@
|
||||
<Property Name="TextHeight" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="TextSpan" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="default_page">
|
||||
<Key>
|
||||
<PropertyRef Name="u_id" />
|
||||
</Key>
|
||||
<Property Name="u_id" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="default_url" Type="String" MaxLength="250" FixedLength="false" Unicode="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuadaoSubDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="GUuid" />
|
||||
<PropertyRef Name="CheckInAt" />
|
||||
</Key>
|
||||
<Property Name="GUuid" Type="Guid" Nullable="false" />
|
||||
<Property Name="RoomUuid" Type="Guid" />
|
||||
<Property Name="BedUuid" Type="Guid" />
|
||||
<Property Name="CheckInAt" Type="DateTime" Nullable="false" Precision="0" />
|
||||
<Property Name="CheckOutAt" Type="DateTime" Precision="0" />
|
||||
<Property Name="Description" Type="String" MaxLength="500" FixedLength="false" Unicode="true" />
|
||||
<Property Name="StatusCode" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuaDanOrderDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="Uuid" />
|
||||
</Key>
|
||||
<Property Name="Uuid" Type="Guid" Nullable="false" />
|
||||
<Property Name="RoomUuid" Type="Guid" />
|
||||
<Property Name="BedUuid" Type="Guid" />
|
||||
<Property Name="GuaDanDate" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="Remark" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="GuaDanOrderNo" Type="String" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="GuestUuid" Type="Guid" />
|
||||
<Property Name="CheckInAt" Type="DateTime" Precision="0" />
|
||||
<Property Name="CheckOutAt" Type="DateTime" Precision="0" />
|
||||
<Property Name="StatusCode" Type="String" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuaDanLimits">
|
||||
<Key>
|
||||
<PropertyRef Name="ParamNo" />
|
||||
</Key>
|
||||
<Property Name="ParamNo" Type="String" Nullable="false" MaxLength="4" FixedLength="false" Unicode="false" />
|
||||
<Property Name="ParamName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Remark" Type="String" MaxLength="500" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
</Schema>
|
||||
</edmx:ConceptualModels>
|
||||
<!-- C-S mapping content -->
|
||||
@@ -6834,6 +6938,7 @@
|
||||
<EntitySetMapping Name="pro_order_detail">
|
||||
<EntityTypeMapping TypeName="Model.pro_order_detail">
|
||||
<MappingFragment StoreEntitySet="pro_order_detail">
|
||||
<ScalarProperty Name="newid" ColumnName="newid" />
|
||||
<ScalarProperty Name="UpdateTime" ColumnName="UpdateTime" />
|
||||
<ScalarProperty Name="print_id" ColumnName="print_id" />
|
||||
<ScalarProperty Name="parent_num" ColumnName="parent_num" />
|
||||
@@ -7296,6 +7401,10 @@
|
||||
<EntitySetMapping Name="GuaDanOrderGuest">
|
||||
<EntityTypeMapping TypeName="Model.GuaDanOrderGuest">
|
||||
<MappingFragment StoreEntitySet="GuaDanOrderGuest">
|
||||
<ScalarProperty Name="Limits" ColumnName="Limits" />
|
||||
<ScalarProperty Name="Name" ColumnName="Name" />
|
||||
<ScalarProperty Name="Handi" ColumnName="Handi" />
|
||||
<ScalarProperty Name="Sex" ColumnName="Sex" />
|
||||
<ScalarProperty Name="OrderUuid" ColumnName="OrderUuid" />
|
||||
<ScalarProperty Name="StatusCode" ColumnName="StatusCode" />
|
||||
<ScalarProperty Name="CheckOutAt" ColumnName="CheckOutAt" />
|
||||
@@ -7730,6 +7839,52 @@
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="default_page">
|
||||
<EntityTypeMapping TypeName="Model.default_page">
|
||||
<MappingFragment StoreEntitySet="default_page">
|
||||
<ScalarProperty Name="default_url" ColumnName="default_url" />
|
||||
<ScalarProperty Name="u_id" ColumnName="u_id" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="GuadaoSubDetail">
|
||||
<EntityTypeMapping TypeName="Model.GuadaoSubDetail">
|
||||
<MappingFragment StoreEntitySet="GuadaoSubDetail">
|
||||
<ScalarProperty Name="StatusCode" ColumnName="StatusCode" />
|
||||
<ScalarProperty Name="Description" ColumnName="Description" />
|
||||
<ScalarProperty Name="CheckOutAt" ColumnName="CheckOutAt" />
|
||||
<ScalarProperty Name="CheckInAt" ColumnName="CheckInAt" />
|
||||
<ScalarProperty Name="BedUuid" ColumnName="BedUuid" />
|
||||
<ScalarProperty Name="RoomUuid" ColumnName="RoomUuid" />
|
||||
<ScalarProperty Name="GUuid" ColumnName="GUuid" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="GuaDanOrderDetail">
|
||||
<EntityTypeMapping TypeName="Model.GuaDanOrderDetail">
|
||||
<MappingFragment StoreEntitySet="GuaDanOrderDetail">
|
||||
<ScalarProperty Name="StatusCode" ColumnName="StatusCode" />
|
||||
<ScalarProperty Name="CheckOutAt" ColumnName="CheckOutAt" />
|
||||
<ScalarProperty Name="CheckInAt" ColumnName="CheckInAt" />
|
||||
<ScalarProperty Name="GuestUuid" ColumnName="GuestUuid" />
|
||||
<ScalarProperty Name="GuaDanOrderNo" ColumnName="GuaDanOrderNo" />
|
||||
<ScalarProperty Name="Remark" ColumnName="Remark" />
|
||||
<ScalarProperty Name="GuaDanDate" ColumnName="GuaDanDate" />
|
||||
<ScalarProperty Name="BedUuid" ColumnName="BedUuid" />
|
||||
<ScalarProperty Name="RoomUuid" ColumnName="RoomUuid" />
|
||||
<ScalarProperty Name="Uuid" ColumnName="Uuid" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="GuaDanLimits">
|
||||
<EntityTypeMapping TypeName="Model.GuaDanLimits">
|
||||
<MappingFragment StoreEntitySet="GuaDanLimits">
|
||||
<ScalarProperty Name="Remark" ColumnName="Remark" />
|
||||
<ScalarProperty Name="ParamName" ColumnName="ParamName" />
|
||||
<ScalarProperty Name="ParamNo" ColumnName="ParamNo" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
</EntityContainerMapping>
|
||||
</Mapping>
|
||||
</edmx:Mappings>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||
<!-- Diagram content (shape and connector positions) -->
|
||||
<edmx:Diagrams>
|
||||
<Diagram DiagramId="b267a343dc0c4bf0ae194b775754b108" Name="Diagram1" ZoomLevel="116">
|
||||
<Diagram DiagramId="b267a343dc0c4bf0ae194b775754b108" Name="Diagram1" ZoomLevel="127">
|
||||
<EntityTypeShape EntityType="Model.accounting" Width="1.5" PointX="22.5" PointY="22.125" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="Model.accounting_files" Width="1.5" PointX="15.75" PointY="27.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="Model.accounting_kind" Width="1.5" PointX="11.25" PointY="27.625" IsExpanded="true" />
|
||||
@@ -189,6 +189,10 @@
|
||||
<EntityTypeShape EntityType="Model.TabletPaperSize" Width="1.5" PointX="27.375" PointY="31.75" />
|
||||
<EntityTypeShape EntityType="Model.TabletStyle" Width="1.5" PointX="32.375" PointY="4.75" />
|
||||
<EntityTypeShape EntityType="Model.TabletStyleDetail" Width="1.5" PointX="32.375" PointY="22.75" />
|
||||
<EntityTypeShape EntityType="Model.default_page" Width="1.5" PointX="8.375" PointY="7.75" />
|
||||
<EntityTypeShape EntityType="Model.GuadaoSubDetail" Width="1.5" PointX="32.375" PointY="29.75" />
|
||||
<EntityTypeShape EntityType="Model.GuaDanOrderDetail" Width="1.5" PointX="33.375" PointY="0.75" />
|
||||
<EntityTypeShape EntityType="Model.GuaDanLimits" Width="1.5" PointX="21.375" PointY="0.75" />
|
||||
</Diagram>
|
||||
</edmx:Diagrams>
|
||||
</edmx:Designer>
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace Model.ViewModel
|
||||
public string deadline { get; set; }
|
||||
public string startDate_solar { get; set; }
|
||||
public string endDate_solar { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class actItem
|
||||
|
||||
@@ -1066,7 +1066,8 @@ public class FollowerController : ApiController
|
||||
{
|
||||
return Ok();
|
||||
}
|
||||
var orderrecord = _db.pro_order.Where(x => x.f_num == id).Include(x => x.pro_order_detail).Include(x => x.follower).ToList();
|
||||
var orderrecord = _db.pro_order.AsQueryable();
|
||||
orderrecord = orderrecord.Where(x => x.f_num == id).Include(x => x.pro_order_detail).Include(x => x.follower);//.ToList();
|
||||
var data = new
|
||||
{
|
||||
list = orderrecord.Select(x => new
|
||||
|
||||
@@ -286,6 +286,109 @@ public class activityController : ApiController
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/activity/GetListNewYet")]
|
||||
public IHttpActionResult GetListNewYet([FromBody] Model.ViewModel.activity q, int page, int pageSize = 10,
|
||||
string sortBy = "", bool sortDesc = false)
|
||||
{
|
||||
var qry = _db.activities.AsQueryable();
|
||||
if (!string.IsNullOrEmpty(q.subject))
|
||||
qry = qry.Where(o => o.subject.Contains(q.subject));
|
||||
if (q.kind.HasValue && q.kind > 0)
|
||||
{
|
||||
var _subKinds = new TreeView().subKinds(_db.activity_kind.Select(o => new TreeItem()
|
||||
{
|
||||
num = o.num,
|
||||
root = o.root,
|
||||
}).ToList(), q.kind.Value);
|
||||
|
||||
//qry = qry.Where(o => o.kind == q.kind);
|
||||
qry = qry.Where(o => o.kind == q.kind.Value || _subKinds.Any(s => s == o.kind));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(q.up_time1))
|
||||
{
|
||||
var s = DateTime.Parse(q.up_time1);
|
||||
qry = qry.Where(o => o.startDate_solar >= s);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(q.kindTxt))
|
||||
qry = qry.Where(o => o.activity_kind.kind.Contains(q.kindTxt));
|
||||
|
||||
if (sortBy.Equals("subject"))
|
||||
{
|
||||
if (sortDesc)
|
||||
qry = qry.OrderByDescending(o => o.subject);
|
||||
else
|
||||
qry = qry.OrderBy(o => o.subject);
|
||||
}
|
||||
else if (sortBy.Equals("kind"))
|
||||
{
|
||||
if (sortDesc)
|
||||
qry = qry.OrderByDescending(o => o.kind);
|
||||
else
|
||||
qry = qry.OrderBy(o => o.kind);
|
||||
}
|
||||
else if (sortBy.Equals("startDate_solar"))
|
||||
{
|
||||
if (sortDesc)
|
||||
qry = qry.OrderByDescending(o => o.startDate_solar);
|
||||
else
|
||||
qry = qry.OrderBy(o => o.startDate_solar);
|
||||
}
|
||||
else if (sortBy.Equals("endDate_solar"))
|
||||
{
|
||||
if (sortDesc)
|
||||
qry = qry.OrderByDescending(o => o.endDate_solar);
|
||||
else
|
||||
qry = qry.OrderBy(o => o.endDate_solar);
|
||||
}
|
||||
else if (sortBy.Equals("dueDate"))
|
||||
{
|
||||
if (sortDesc)
|
||||
qry = qry.OrderByDescending(o => o.dueDate);
|
||||
else
|
||||
qry = qry.OrderBy(o => o.dueDate);
|
||||
}
|
||||
else
|
||||
qry = qry.OrderByDescending(o => o.num);
|
||||
|
||||
var count = qry.Count(); //pageSize = count;//一次取回??
|
||||
var qryList = (pageSize > 0) ? qry.ToPagedList(page, pageSize).ToList() : qry.ToList();
|
||||
|
||||
var ret = new
|
||||
{
|
||||
list = qryList.Select(x => new
|
||||
{
|
||||
num = x.num,
|
||||
subject = x.subject,
|
||||
kind = x.kind,
|
||||
kindTxt = x.kind.HasValue ? x.activity_kind.kind : "",
|
||||
kindsTxt = x.kind.HasValue ? new TreeView().kindText(_db.activity_kind.Select(o => new TreeItem()
|
||||
{
|
||||
kind = o.kind,
|
||||
num = o.num,
|
||||
root = o.root,
|
||||
}).ToList(), x.kind) : "",
|
||||
startDate_solar = x.startDate_solar,
|
||||
endDate_solar = x.endDate_solar,
|
||||
startDate = x.startDate_solar?.ToString("yyyy-MM-dd"),
|
||||
endDate = x.endDate_solar?.ToString("yyyy-MM-dd"),
|
||||
startDate_lunar = x.startDate_lunar,
|
||||
endDate_lunar = x.endDate_lunar,
|
||||
dueDate = x.dueDate,
|
||||
orderCounts = _db.pro_order.Where(y => y.activity_num == x.num).Count(),
|
||||
}),
|
||||
count = count,
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
if (ret.list == null) throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
return Ok(ret);
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/activity/GetListNew")]
|
||||
public IHttpActionResult GetListNew([FromBody] Model.ViewModel.activity q, int page, int pageSize = 10,
|
||||
@@ -311,6 +414,7 @@ public class activityController : ApiController
|
||||
qry = qry.Where(o => o.startDate_solar <=s&&o.endDate_solar>=s);
|
||||
}
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(q.startDate_solar)&& !string.IsNullOrEmpty(q.endDate_solar))
|
||||
{
|
||||
var sDate = DateTime.Parse(q.startDate_solar);
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Web.Http;
|
||||
using PagedList;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections;
|
||||
using System.Windows.Interop;
|
||||
|
||||
|
||||
// api/adminUser
|
||||
@@ -62,7 +63,15 @@ public class adminUserController : ApiController
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/adminUser/GetMyDefaultPage")]
|
||||
public IHttpActionResult GetMyDefaultPage([FromBody] Model.ViewModel.admin q)
|
||||
{
|
||||
var item = _db.default_page.Where(o => o.u_id == q.u_id).FirstOrDefault();
|
||||
if (item == null) throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
|
||||
return Ok(new {result="ok",data=item});
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("api/adminUser/count")]
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
using PagedList;
|
||||
using System;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
/// <summary>
|
||||
/// billController 的摘要描述
|
||||
/// </summary>
|
||||
[ezAuthorize]
|
||||
public class billController : BaseApiController
|
||||
{
|
||||
public billController()
|
||||
{
|
||||
//
|
||||
// TODO: 在這裡新增建構函式邏輯
|
||||
//
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/bill/GetAuditList")]
|
||||
public IHttpActionResult GetAuditList([FromBody] dynamic data, int page, int pageSize = 10,
|
||||
string sortBy = "", bool sortDesc = false)
|
||||
{
|
||||
var json = data;
|
||||
var start_date = (json == null || json.start_date == null) ? "" : (string)json.start_date;
|
||||
var end_date = (json == null || json.end_date == null) ? "" : (string)json.end_date;
|
||||
var activity_num = (json == null || json.activity_num == null||(string)json.activity_num=="") ? 0 : (int)json.activity_num;
|
||||
//var args = new List<SqlParameter>();
|
||||
//StringBuilder sb = new StringBuilder();
|
||||
var qry = _db.transfer_register.AsQueryable();
|
||||
if (!string.IsNullOrEmpty(start_date))
|
||||
{
|
||||
qry = qry.Where(x=>x.check_date.Value.ToString("yyyyMMdd").CompareTo(start_date) >=0);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(end_date))
|
||||
{
|
||||
qry = qry.Where(x => x.check_date.Value.ToString("yyyyMMdd").CompareTo(end_date) <= 0);
|
||||
}
|
||||
if (activity_num > 0)
|
||||
{
|
||||
qry = qry.Where(x=>x.activity_num== activity_num);
|
||||
}
|
||||
qry = qry.OrderBy(x => x.id);
|
||||
var count = qry.Count();
|
||||
var qryList = (pageSize > 0) ? qry.ToPagedList(page, pageSize).ToList() : qry.ToList();
|
||||
var ret = new
|
||||
{
|
||||
list = qryList.Select(x => new
|
||||
{
|
||||
x.activity_num,x.id,x.name,x.pay_type,x.pay_mode,
|
||||
acc_name=_db.accounting_kind2.Where(y=>y.num==x.acc_num).Select(y=>y.kind).FirstOrDefault(),
|
||||
check_date=x.check_date.Value.ToString("yyyyMMdd"),
|
||||
followerName=_db.followers.Where(z=>z.num==x.f_num).Select(z=>z.u_name).FirstOrDefault(),
|
||||
x.check_amount,x.check_status
|
||||
}),
|
||||
count = count
|
||||
|
||||
};
|
||||
|
||||
|
||||
if (ret.list == null) throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
return Ok(ret);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/bill/GetAuditDetailData")]
|
||||
public IHttpActionResult GetAuditDetailData([FromBody] dynamic data)
|
||||
{
|
||||
var json = data;
|
||||
var startDate =(json==null||json.startDate==null)?"": (string)json.startDate;
|
||||
var endDate = (json==null||json.endDate==null)?"":(string)json.endDate;
|
||||
var activityNum = (json == null || json.activityNum == null) ? 0 : (int)json.activityNum;
|
||||
var id = (json == null || json.id == null) ? 0 : (int)json.id;
|
||||
var args = new List<SqlParameter>();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("WITH Combined_JSON_Details AS ( ");
|
||||
sb.Append("SELECT ");
|
||||
sb.Append("t.id AS register_id, ");
|
||||
sb.Append("COALESCE(items.[f_num], CASE WHEN t.pay_mode = '個人' THEN t.f_num END) AS final_f_num, ");
|
||||
sb.Append("COALESCE(items.[follower_name], CASE WHEN t.pay_mode = '個人' THEN t.name END) AS final_follower_name, ");
|
||||
sb.Append("items.[pro_order_detail_num],items.[reconcile],items.[actitem_name],items.[activity_name], ");
|
||||
sb.Append("items.[register_date],items.[order_no],items.[price] ");
|
||||
sb.Append("FROM [transfer_register] AS t ");
|
||||
sb.Append("CROSS APPLY OPENJSON(t.[draft], CASE WHEN t.[draft] LIKE '%pro_order_detail_items%' THEN '$.pro_order_detail_items' ELSE '$' END) ");
|
||||
sb.Append("WITH ( ");
|
||||
sb.Append("[f_num] INT '$.f_num', ");
|
||||
sb.Append("[follower_name] NVARCHAR(50) '$.follower_name', ");
|
||||
sb.Append("[pro_order_detail_num] INT '$.pro_order_detail_num', ");
|
||||
sb.Append("[reconcile] DECIMAL(18,2) '$.reconcile', ");
|
||||
sb.Append("[actitem_name] NVARCHAR(100) '$.actitem_name', ");
|
||||
sb.Append(" [activity_name] NVARCHAR(100) '$.activity_name', ");
|
||||
sb.Append("[register_date] DATETIME2 '$.register_date', ");
|
||||
sb.Append("[order_no] VARCHAR(50) '$.order_no', ");
|
||||
sb.Append("[price] DECIMAL(18,2) '$.price' ");
|
||||
sb.Append(") AS items), ");
|
||||
sb.Append("Unique_Order_Activity AS ( ");
|
||||
sb.Append("SELECT pd.num AS pro_order_detail_num, MAX(p.activity_num) AS activity_num ");
|
||||
sb.Append("FROM pro_order_detail pd ");
|
||||
sb.Append("INNER JOIN pro_order p ON pd.order_no = p.order_no ");
|
||||
sb.Append("GROUP BY pd.num) ");
|
||||
sb.Append("SELECT ");
|
||||
sb.Append("t.id AS [轉帳序號], t.pay_mode AS [沖帳型態], convert(varchar(10),t.check_date,120) AS [沖帳日期], t.name AS [主要付款人], ");
|
||||
sb.Append("t.phone AS [付款人電話], t.amount AS [主單總金額], t.status AS [主單狀態], t.check_amount AS [已核對金額], ");
|
||||
sb.Append("t.f_num AS [付款人代號], k.kind AS [入帳帳戶], a.activity_num AS [法會編號], j.final_f_num AS [實際功德人代號], ");
|
||||
sb.Append("j.final_follower_name AS [實際功德人姓名], j.pro_order_detail_num AS [訂單明細編號], j.order_no AS [訂單編號], ");
|
||||
sb.Append("j.actitem_name AS [牌位/點燈項目], j.activity_name AS [法會名稱], j.price AS [項目原價], j.reconcile AS [本次實際沖帳金額], ");
|
||||
sb.Append("j.register_date AS [登記時間], [總金額] =(select sum(price) from pro_order_detail pd where pd.order_no in ( ");
|
||||
sb.Append("select order_no from pro_order p where activity_num=a.activity_num and p.f_num=j.final_f_num ) ) ");
|
||||
sb.Append("FROM [transfer_register] AS t ");
|
||||
sb.Append("INNER JOIN Combined_JSON_Details j ON t.id = j.register_id ");
|
||||
sb.Append("LEFT JOIN Unique_Order_Activity a ON a.pro_order_detail_num = j.pro_order_detail_num ");
|
||||
sb.Append("left join accounting_kind2 k on t.acc_num=k.num ");
|
||||
sb.Append("where 1=1 ");
|
||||
//and CONVERT(varchar,t.check_date,120)>='20260801' and convert(varchar,t.check_date,120)<='20260831'
|
||||
if (!string.IsNullOrEmpty(startDate))
|
||||
{
|
||||
sb.Append("and CONVERT(varchar,t.check_date,120)>=@startDate ");
|
||||
args.Add(new SqlParameter("startDate",startDate));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(endDate))
|
||||
{
|
||||
sb.Append("and CONVERT(varchar,t.check_date,120)<=@endDate ");
|
||||
args.Add(new SqlParameter("endDate", endDate));
|
||||
}
|
||||
if (activityNum>0)
|
||||
{
|
||||
sb.Append("and a.activity_num=@activityNum ");
|
||||
args.Add(new SqlParameter("activityNum", activityNum));
|
||||
}
|
||||
if (id > 0)
|
||||
{
|
||||
sb.Append("and t.id=@id ");
|
||||
args.Add(new SqlParameter("id", id));
|
||||
}
|
||||
sb.Append("ORDER BY a.activity_num,j.order_no ");
|
||||
sb.Append("for json auto ");
|
||||
var result=_db.Database.SqlQuery<string>(sb.ToString(),args.ToArray()).ToList();
|
||||
List<dynamic> list=new List<dynamic>();
|
||||
var fullJsonString = string.Join("", result);
|
||||
dynamic results = Newtonsoft.Json.JsonConvert.DeserializeObject<List<dynamic>>(fullJsonString);
|
||||
//foreach (var r in fullJsonString)
|
||||
//{
|
||||
// dynamic results = Newtonsoft.Json.JsonConvert.DeserializeObject<List<dynamic>>(r);
|
||||
// list.Add(results);
|
||||
//}
|
||||
return Ok(new
|
||||
{
|
||||
list= results
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,11 +14,13 @@ using System.Data.Entity;
|
||||
using System.Data.Entity.Core.Objects;
|
||||
using System.Diagnostics;
|
||||
using System.IdentityModel.Metadata;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Http;
|
||||
using static TreeView;
|
||||
@@ -211,6 +213,69 @@ public class orderController : ApiController
|
||||
return count;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/order/import")]
|
||||
public IHttpActionResult import() {
|
||||
|
||||
// 1. 檢查請求是否為 multipart/form-data
|
||||
if (!Request.Content.IsMimeMultipartContent())
|
||||
{
|
||||
return Content(HttpStatusCode.UnsupportedMediaType, "不支援的媒體類型,必須是表單資料。");
|
||||
}
|
||||
|
||||
// 2. 定義伺服器上的暫存/儲存資料夾路徑
|
||||
var rootUrl = HttpContext.Current.Server.MapPath("~/upload/temp");
|
||||
|
||||
// 確保資料夾存在
|
||||
if (!Directory.Exists(rootUrl))
|
||||
{
|
||||
Directory.CreateDirectory(rootUrl);
|
||||
}
|
||||
|
||||
// 3. 使用 StreamProvider 來自動接收並寫入檔案
|
||||
var provider = new MultipartFormDataStreamProvider(rootUrl);
|
||||
|
||||
try
|
||||
{
|
||||
// 非同步讀取表單內容,檔案會在此時被自動寫入 rootUrl 資料夾(檔名會變成 BodyPart_xxx 暫存名稱)
|
||||
Request.Content.ReadAsMultipartAsync(provider);
|
||||
|
||||
// 4. 取得前端傳過來的其他純文字欄位 (例如:formData.append('userId', '123'))
|
||||
string act_num = provider.FormData["act_num"];
|
||||
|
||||
// 5. 處理檔案(將暫存檔更名為原本的檔案名稱)
|
||||
foreach (var fileData in provider.FileData)
|
||||
{
|
||||
// 取得原始檔名(通常帶有雙引號,如 "photo.jpg",需要去除)
|
||||
string originalFileName = fileData.Headers.ContentDisposition.FileName.Trim('"');
|
||||
|
||||
// 取得當前寫入的暫存路徑
|
||||
string localFileName = fileData.LocalFileName;
|
||||
|
||||
// 組合最終要儲存的完整路徑
|
||||
string finalFilePath = Path.Combine(rootUrl, originalFileName);
|
||||
|
||||
// 如果已有同名檔案,先刪除或自行加上序號、GUID 防止覆蓋
|
||||
if (File.Exists(finalFilePath))
|
||||
{
|
||||
File.Delete(finalFilePath);
|
||||
}
|
||||
|
||||
// 將暫存檔重新命名/移動到最終目的地
|
||||
File.Move(localFileName, finalFilePath);
|
||||
}
|
||||
//讀取內容
|
||||
|
||||
|
||||
return Ok(new { message = "檔案上傳成功!" });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return InternalServerError(ex);
|
||||
}
|
||||
return Ok(new { result = "Y", message = "完成" });
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/order/BatchSave")]
|
||||
public IHttpActionResult BatchSave([FromBody] Model.ViewModel.pro_order po)
|
||||
|
||||
@@ -109,5 +109,40 @@ public class orderdetailController:ApiController
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/orderdetail/GetDetailToPrintByOrder")]
|
||||
public IHttpActionResult GetDetailToPrintByOrder([FromBody] dynamic data)
|
||||
{
|
||||
if (data.param is Newtonsoft.Json.Linq.JArray items)
|
||||
{
|
||||
string[] details = new string[items.Count];
|
||||
int i = 0;
|
||||
foreach (var item in items)
|
||||
{
|
||||
details[i] = item["order_no"].ToString();
|
||||
i++;
|
||||
}
|
||||
|
||||
var parameters = details.Select((s, j) => "@p" + j).ToArray();
|
||||
string sql = $"select * from pro_order_detail where order_no in ({string.Join(",", parameters)}) ";
|
||||
sql = sql + $"and num not in(select distinct parent_num from pro_order_detail where order_no in ({string.Join(",", parameters)}) and parent_num is not null)";
|
||||
int l = 0;
|
||||
List<SqlParameter> sqlList = new List<SqlParameter>();
|
||||
foreach (var item in details)
|
||||
{
|
||||
sqlList.Add(new SqlParameter("@p" + l, item));
|
||||
l++;
|
||||
}
|
||||
SqlParameter[] p = sqlList.ToArray();
|
||||
var ret = _db.Database.SqlQuery<pro_order_detail>(sql, p).ToList();
|
||||
if (ret == null) throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
return Ok(ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ public class pivot01Controller : ApiController
|
||||
|
||||
// 建立查詢 SQL
|
||||
string sql = @"
|
||||
SELECT * FROM [報名明細查詢]
|
||||
SELECT * FROM [報名明細查詢_功德主]
|
||||
WHERE 法會ID = @activityNum
|
||||
ORDER BY 報名日期 DESC, 報名編號 DESC
|
||||
";
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using Newtonsoft.Json;
|
||||
using PagedList;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using PagedList;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections;
|
||||
using System.Data.Entity;
|
||||
using static Model.admin_log;
|
||||
|
||||
// api/pivot
|
||||
[ezAuthorize]
|
||||
@@ -35,6 +36,10 @@ public class pivotController : ApiController
|
||||
{
|
||||
try
|
||||
{
|
||||
IQueryable<int> subQuery =_db.pro_order_detail
|
||||
.Where(d => d.parent_num != null)
|
||||
.Select(d => d.parent_num.Value)
|
||||
.Distinct();
|
||||
// 對應 README.md 中的視圖查詢結構,按顏色分類欄位
|
||||
var query = from pod in _db.pro_order_detail
|
||||
join po in _db.pro_order on pod.order_no equals po.order_no
|
||||
@@ -42,7 +47,8 @@ public class pivotController : ApiController
|
||||
join act in _db.activities on po.activity_num equals act.num
|
||||
join f in _db.followers on po.f_num equals f.num
|
||||
join aik in _db.actItem_kind on ai.kind equals aik.num
|
||||
select new
|
||||
|
||||
select new
|
||||
{
|
||||
// 🟠 橘色欄位 - 法會基礎資料 (法會相關的直接來源)
|
||||
法會ID = act.num,
|
||||
@@ -57,7 +63,7 @@ public class pivotController : ApiController
|
||||
報名日期 = po.up_time,
|
||||
|
||||
// 🟢綠色欄位 - 功德資訊欄位 (功德相關資訊)
|
||||
功德主 = pod.parent_num != null ? "是" : "否",
|
||||
功德主 = subQuery.Contains(pod.num) ? "是" : "否", //pod.parent_num != null ? "是" : "否",
|
||||
功德類型 = aik.kind,
|
||||
功德名稱 = ai.subject,
|
||||
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
using DocumentFormat.OpenXml;
|
||||
using DocumentFormat.OpenXml.Drawing.Charts;
|
||||
using DocumentFormat.OpenXml.Office2010.PowerPoint;
|
||||
//using DocumentFormat.OpenXml.Drawing.Charts;
|
||||
//using DocumentFormat.OpenXml.Office2010.PowerPoint;
|
||||
using DocumentFormat.OpenXml.Packaging;
|
||||
//using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using DocumentFormat.OpenXml.Wordprocessing;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PagedList;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
|
||||
/// <summary>
|
||||
/// shuwensController 的摘要描述
|
||||
@@ -146,13 +150,31 @@ public class shuwensController : BaseApiController
|
||||
public IHttpActionResult RenderShuWenByGong([FromBody] dynamic data)
|
||||
{
|
||||
var jsonData = data;
|
||||
var nums = (string)jsonData.activitynum;
|
||||
string[] numSplit = nums.Split(',');
|
||||
|
||||
var mode=(string)jsonData.mode;
|
||||
var xStart=(jsonData==null||jsonData.xStart==null)?"":(string)jsonData.xStart;
|
||||
var sStart = (jsonData == null || jsonData.sStart==null) ? "" : (string)jsonData.sStart;
|
||||
mode = "A";
|
||||
StringBuilder sb= new StringBuilder();
|
||||
List<int> args = new List<int>();
|
||||
List<string> parameters =new List<string>();
|
||||
List<SqlParameter> parameterList = new List<SqlParameter>();
|
||||
int a = 1;
|
||||
foreach (var num in numSplit)
|
||||
{
|
||||
args.Append(int.Parse(num));
|
||||
parameterList.Add(new SqlParameter($"num{a}", num));
|
||||
parameters.Add($"@num{a}");
|
||||
a++;
|
||||
}
|
||||
|
||||
|
||||
sb.Append("with gong as (select* from pro_order_detail ");
|
||||
sb.Append("where order_no in (select order_no from pro_order ");
|
||||
sb.Append("where activity_num in (72, 73)) ");
|
||||
sb.Append("and(actItem_num in ");
|
||||
sb.Append($"where activity_num in ({string.Join(",",parameters.ToArray())})) ");
|
||||
sb.Append("and (actItem_num in ");
|
||||
sb.Append("(select item_num from act_bom a ");
|
||||
sb.Append("left join actItem b on a.item_num = b.num ");
|
||||
sb.Append("where a.package_num is null)) ");
|
||||
@@ -160,13 +182,19 @@ public class shuwensController : BaseApiController
|
||||
sb.Append("select * from pro_order_detail a ");
|
||||
sb.Append("where (num in (select num from gong) ");
|
||||
sb.Append("or parent_num in (select num from gong)) ");
|
||||
var list=_db.Database.SqlQuery<Model.pro_order_detail>(sb.ToString()).ToList();
|
||||
Console.WriteLine(sb.ToString());
|
||||
var list=_db.Database.SqlQuery<Model.pro_order_detail>(sb.ToString(), parameterList.ToArray()).ToList();
|
||||
var head_list=list.Where(x=>x.parent_num==null).ToList();//消災,要參數化
|
||||
|
||||
var qry = _db.TabletStyleDetail.AsQueryable();
|
||||
var styles = qry.ToList();
|
||||
var ret = new object() { };
|
||||
using (WordprocessingDocument wordDocument = WordprocessingDocument.Create("d://HelloWorld.docx", WordprocessingDocumentType.Document))
|
||||
if( !Directory.Exists( Path.Combine(HttpContext.Current.Server.MapPath("~/rpt"), "shuwen")))
|
||||
{
|
||||
Directory.CreateDirectory(Path.Combine(HttpContext.Current.Server.MapPath("~/rpt"), "shuwen"));
|
||||
}
|
||||
string templatePath = Path.Combine(HttpContext.Current.Server.MapPath("~/rpt"), "shuwen", "template.docx");
|
||||
using (WordprocessingDocument wordDocument = WordprocessingDocument.Create(templatePath, WordprocessingDocumentType.Document))
|
||||
{
|
||||
// Add a main document part
|
||||
MainDocumentPart mainPart = wordDocument.AddMainDocumentPart();
|
||||
@@ -175,10 +203,31 @@ public class shuwensController : BaseApiController
|
||||
|
||||
List<string> result = new List<string>();
|
||||
var nowContent = new List<string>();
|
||||
|
||||
Paragraph para0 = new Paragraph();
|
||||
Run run0 = new Run();
|
||||
RunProperties runProps0 = new RunProperties(
|
||||
new Bold(),
|
||||
new FontSize() { Val = "36" },
|
||||
new RunFonts()
|
||||
{
|
||||
Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
}
|
||||
);
|
||||
run0.Append(runProps0);
|
||||
for (int gg=1;gg<=12;gg++)
|
||||
{
|
||||
Text txt = new Text($" ") { Space = DocumentFormat.OpenXml.SpaceProcessingModeValues.Preserve };
|
||||
run0.AppendChild(txt);
|
||||
}
|
||||
run0.AppendChild(new Text($"消災祈福名單"));
|
||||
para0.Append(run0);
|
||||
body.AppendChild(para0);
|
||||
foreach (var item in head_list)
|
||||
{
|
||||
//消災牌位
|
||||
var detail_list = list.Where(x => x.parent_num == item.num && x.print_id.Contains("X")).ToList();
|
||||
var detail_list = list.Where(x => x.parent_num == item.num && x.print_id.Contains(xStart)).ToList();
|
||||
|
||||
foreach (var d in detail_list)
|
||||
{
|
||||
@@ -360,115 +409,9 @@ public class shuwensController : BaseApiController
|
||||
if (leftItemsArray != null && leftItemsArray.Count > 0)
|
||||
nowContent.Add(string.Join(" ", leftItemsArray.Select(token => token["fam_name"]?.ToString().Replace("\r", "").Replace("\n", ""))) + ";");
|
||||
}
|
||||
//if (nowContent.Count > 6)
|
||||
//{
|
||||
// Paragraph para1 = new Paragraph();
|
||||
// //Run run1 = para1.AppendChild(new Run());
|
||||
// Run run1 = new Run();
|
||||
// RunProperties runProps1 = new RunProperties(
|
||||
// //new Bold(),
|
||||
// //new Italic(),
|
||||
// new FontSize() { Val = "36" }, // 12 pt
|
||||
// //new Color() { Val = "FF0000" }, // Red Text
|
||||
// new RunFonts()
|
||||
// {
|
||||
// Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
// EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
// }
|
||||
// );
|
||||
|
||||
// // 建立段落屬性
|
||||
// ParagraphProperties pPr1 = new ParagraphProperties();
|
||||
// pPr1.Append(new TextDirection() { Val = TextDirectionValues.TopToBottomRightToLeft });
|
||||
// // 建立縮排物件
|
||||
// // 設定左縮排為 0,首行縮排 480 dxa (約 2 中文字寬)
|
||||
// Indentation ind = new Indentation() { Left = "720", LeftChars = 300 };
|
||||
|
||||
// // 將縮排加入段落屬性
|
||||
// pPr1.Append(ind);
|
||||
// para1.Append(pPr1);
|
||||
// run1.Append(runProps1);
|
||||
// string[] splits = string.Join("", nowContent).Split(';');
|
||||
// int j = 0;
|
||||
// foreach (var txt in splits)
|
||||
// {
|
||||
// run1.Append(new Text($"{string.Join(" ", txt)}"));
|
||||
// if (j != splits.Length - 1)
|
||||
// {
|
||||
// run1.Append(new Break());
|
||||
// }
|
||||
// j++;
|
||||
// }
|
||||
// para1.Append(run1);
|
||||
// body.AppendChild(para1);
|
||||
// nowContent.Clear();
|
||||
//}
|
||||
//if(string.Join(" ",nowContent).Length > 6)
|
||||
//{
|
||||
// if (result.Count > 0)
|
||||
// {
|
||||
// Paragraph para = body.AppendChild(new Paragraph());
|
||||
// Run run = para.AppendChild(new Run());
|
||||
// RunProperties runProps = new RunProperties(
|
||||
// //new Bold(),
|
||||
// //new Italic(),
|
||||
// new FontSize() { Val = "36" }, // 12 pt
|
||||
// //new Color() { Val = "FF0000" }, // Red Text
|
||||
// new RunFonts()
|
||||
// {
|
||||
// Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
// EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
// }
|
||||
// );
|
||||
// run.Append(runProps);
|
||||
// run.AppendChild(new Text($"{string.Join(" ", result)}"));
|
||||
// }
|
||||
// result = new List<string>();
|
||||
|
||||
|
||||
// Paragraph para1 = body.AppendChild(new Paragraph());
|
||||
// Run run1 = para1.AppendChild(new Run());
|
||||
// RunProperties runProps1 = new RunProperties(
|
||||
// //new Bold(),
|
||||
// //new Italic(),
|
||||
// new FontSize() { Val = "36" }, // 12 pt
|
||||
// //new Color() { Val = "FF0000" }, // Red Text
|
||||
// new RunFonts()
|
||||
// {
|
||||
// Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
// EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
// }
|
||||
// );
|
||||
// run1.Append(runProps1);
|
||||
// run1.AppendChild(new Text($"{string.Join(" ", nowContent)}"));
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// result.AddRange(nowContent);
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
//if (result.Count > 5)
|
||||
//{
|
||||
// Paragraph para = body.AppendChild(new Paragraph());
|
||||
// Run run = para.AppendChild(new Run());
|
||||
// RunProperties runProps = new RunProperties(
|
||||
// //new Bold(),
|
||||
// //new Italic(),
|
||||
// new FontSize() { Val = "36" }, // 12 pt
|
||||
// //new Color() { Val = "FF0000" }, // Red Text
|
||||
// new RunFonts()
|
||||
// {
|
||||
// Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
// EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
// }
|
||||
// );
|
||||
// run.Append(runProps);
|
||||
// run.AppendChild(new Text($"{string.Join(" ", result)}"));
|
||||
|
||||
// result = new List<string>();
|
||||
//}
|
||||
|
||||
if (nowContent.Count > 10000)
|
||||
{
|
||||
Paragraph para1 = new Paragraph();
|
||||
@@ -524,7 +467,7 @@ public class shuwensController : BaseApiController
|
||||
if (nowContent.Count > 0)
|
||||
{
|
||||
Paragraph para1 = new Paragraph();
|
||||
//Run run1 = para1.AppendChild(new Run());
|
||||
|
||||
Run run1 = new Run();
|
||||
RunProperties runProps1 = new RunProperties(
|
||||
//new Bold(),
|
||||
@@ -572,27 +515,7 @@ public class shuwensController : BaseApiController
|
||||
body.AppendChild(para1);
|
||||
nowContent.Clear();
|
||||
}
|
||||
//if (result.Count > 0)
|
||||
//{
|
||||
// Paragraph para = body.AppendChild(new Paragraph());
|
||||
// Run run = para.AppendChild(new Run());
|
||||
// RunProperties runProps = new RunProperties(
|
||||
// //new Bold(),
|
||||
// //new Italic(),
|
||||
// new FontSize() { Val = "36" }, // 12 pt
|
||||
// //new Color() { Val = "FF0000" }, // Red Text
|
||||
// new RunFonts()
|
||||
// {
|
||||
// Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
// EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
// }
|
||||
// );
|
||||
// run.Append(runProps);
|
||||
// run.AppendChild(new Text($"{string.Join(" ", result)}"));
|
||||
|
||||
// result = new List<string>();
|
||||
//}
|
||||
|
||||
|
||||
Paragraph pageBreakParagraph = new Paragraph(
|
||||
new Run(
|
||||
new Break() { Type = BreakValues.Page }
|
||||
@@ -603,11 +526,31 @@ public class shuwensController : BaseApiController
|
||||
body.Append(pageBreakParagraph);
|
||||
//先強制換頁
|
||||
//在處理超薦牌位
|
||||
Paragraph para9 = new Paragraph();
|
||||
Run run9 = new Run();
|
||||
RunProperties runProps9 = new RunProperties(
|
||||
new Bold(),
|
||||
new FontSize() { Val = "36" },
|
||||
new RunFonts()
|
||||
{
|
||||
Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
}
|
||||
);
|
||||
run9.Append(runProps9);
|
||||
for (int gg = 1; gg <= 12; gg++)
|
||||
{
|
||||
Text txt= new Text($" ") { Space = DocumentFormat.OpenXml.SpaceProcessingModeValues.Preserve };
|
||||
run9.AppendChild(txt);
|
||||
}
|
||||
run9.AppendChild(new Text($"佛力超薦名單"));
|
||||
para9.Append(run9);
|
||||
body.AppendChild(para9);
|
||||
result = new List<string>();
|
||||
foreach (var item in head_list)
|
||||
{
|
||||
//S要參數化
|
||||
var detail_list = list.Where(x => x.parent_num == item.num && x.print_id.Contains("S")).ToList();
|
||||
var detail_list = list.Where(x => x.parent_num == item.num && x.print_id.Contains(sStart)).ToList();
|
||||
|
||||
//分兩種,一種每一張呈現,一種同樣陽上的拚在一起
|
||||
foreach(var d in detail_list)
|
||||
@@ -857,9 +800,9 @@ public class shuwensController : BaseApiController
|
||||
run1.Append(runProps1);
|
||||
string[] splits = string.Join("", nowContent).Split(';');
|
||||
int j = 0;
|
||||
foreach (var txt in splits)
|
||||
foreach (var txt1 in splits)
|
||||
{
|
||||
run1.Append(new Text($"{string.Join(" ", txt)}"));
|
||||
run1.Append(new Text($"{string.Join(" ", txt1)}"));
|
||||
if (j != splits.Length - 1)
|
||||
{
|
||||
run1.Append(new Break());
|
||||
@@ -900,7 +843,8 @@ public class shuwensController : BaseApiController
|
||||
}
|
||||
);
|
||||
run2.Append(runProps2);
|
||||
run2.AppendChild(new Text($"陽上報恩人 "));
|
||||
Text txt = new Text($"陽上報恩人 ") { Space = DocumentFormat.OpenXml.SpaceProcessingModeValues.Preserve };
|
||||
run2.AppendChild(txt);
|
||||
|
||||
Run run4 = para2.AppendChild(new Run());
|
||||
RunProperties runProps4 = new RunProperties(
|
||||
@@ -951,7 +895,8 @@ public class shuwensController : BaseApiController
|
||||
}
|
||||
return Ok(new
|
||||
{
|
||||
list= head_list
|
||||
//list= head_list,
|
||||
filePath="/rpt/shuwen/template.docx"
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -184,6 +184,7 @@ public class statisticsController: ApiController
|
||||
//{
|
||||
// query = query.Where(a => a.endDate_solar.Value.ToString("yyyyMMdd").CompareTo(e_date) <= 0);
|
||||
//}
|
||||
|
||||
var data = (from a in _db.activities
|
||||
join b in _db.pro_order on a.num equals b.activity_num
|
||||
join c in _db.pro_order_detail on b.order_no equals c.order_no
|
||||
@@ -200,17 +201,17 @@ public class statisticsController: ApiController
|
||||
item_subject = f.subject,
|
||||
c.qty,
|
||||
c.price,
|
||||
a.startDate_solar,
|
||||
a.endDate_solar
|
||||
startDate_solar=a.startDate_solar==null?DateTime.MinValue:a.startDate_solar,
|
||||
endDate_solar=a.endDate_solar==null?DateTime.MinValue:a.endDate_solar
|
||||
}).ToList();
|
||||
|
||||
if (!string.IsNullOrEmpty(s_date))
|
||||
{
|
||||
data = data.Where(a => a.startDate_solar.Value.ToString("yyyyMMdd").CompareTo(s_date) >= 0).ToList();
|
||||
data = data.Where(a => a.startDate_solar.Value.ToString("yyyyMMdd").CompareTo(s_date.Replace("-","")) >= 0).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(e_date))
|
||||
{
|
||||
data = data.Where(a => a.endDate_solar.Value.ToString("yyyyMMdd").CompareTo(e_date) <= 0).ToList();
|
||||
data = data.Where(a => a.endDate_solar.Value.ToString("yyyyMMdd").CompareTo(e_date.Replace("-", "")) <= 0).ToList();
|
||||
}
|
||||
int i = 0;
|
||||
i++;
|
||||
|
||||
Reference in new issue
Block a user