總疏文
This commit is contained in:
@@ -112,6 +112,8 @@ namespace Model
|
||||
public virtual DbSet<hr_ins_ratio> hr_ins_ratio { get; set; }
|
||||
public virtual DbSet<hr_org> hr_org { get; set; }
|
||||
public virtual DbSet<hr_section> hr_section { get; set; }
|
||||
public virtual DbSet<activity_shuwen> activity_shuwen { get; set; }
|
||||
public virtual DbSet<shuwen_temp> shuwen_temp { get; set; }
|
||||
|
||||
public virtual int pager_eztrust(Nullable<int> startRowIndex, Nullable<int> pageSize, string tableName, string columnName, string sqlWhere, string orderBy, ObjectParameter rowCount)
|
||||
{
|
||||
|
||||
@@ -423,6 +423,20 @@ namespace Model
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class activity_shuwen
|
||||
{
|
||||
public int act_num { get; set; }
|
||||
public Nullable<int> shuwen_num { get; set; }
|
||||
public string shuwen_type { get; set; }
|
||||
public string contents { get; set; }
|
||||
public Nullable<System.DateTime> reg_time { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class activity_spares
|
||||
{
|
||||
public int num { get; set; }
|
||||
@@ -2061,6 +2075,20 @@ namespace Model
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class shuwen_temp
|
||||
{
|
||||
public int num { get; set; }
|
||||
public string shuwen_type { get; set; }
|
||||
public string name { get; set; }
|
||||
public string contents { get; set; }
|
||||
public Nullable<System.DateTime> reg_time { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class stock
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
|
||||
@@ -198,6 +198,17 @@
|
||||
<Property Name="yang_limit_count" Type="int" />
|
||||
<Property Name="chao_limit_count" Type="int" />
|
||||
</EntityType>
|
||||
<EntityType Name="activity_shuwen">
|
||||
<Key>
|
||||
<PropertyRef Name="act_num" />
|
||||
<PropertyRef Name="shuwen_type" />
|
||||
</Key>
|
||||
<Property Name="act_num" Type="int" Nullable="false" />
|
||||
<Property Name="shuwen_num" Type="int" />
|
||||
<Property Name="shuwen_type" Type="varchar" MaxLength="8" Nullable="false" />
|
||||
<Property Name="contents" Type="nvarchar(max)" />
|
||||
<Property Name="reg_time" Type="datetime" />
|
||||
</EntityType>
|
||||
<EntityType Name="activity_spares">
|
||||
<Key>
|
||||
<PropertyRef Name="num" />
|
||||
@@ -700,17 +711,6 @@
|
||||
<Property Name="license" Type="varchar" MaxLength="8" />
|
||||
<Property Name="car" Type="varchar" MaxLength="8" />
|
||||
</EntityType>
|
||||
<!--產生期間發現錯誤:
|
||||
警告 6013: 資料表/檢視 '17168erp_c1.dbo.hr_ins_condition' 未定義主索引鍵,也無法推斷有效的主索引鍵。此資料表/檢視已被排除。如果要使用此實體,您必須檢閱您的結構描述,加入正確的索引鍵,並將它取消註解。
|
||||
<EntityType Name="hr_ins_condition">
|
||||
<Property Name="ins_type" Type="varchar" MaxLength="8" />
|
||||
<Property Name="seq" Type="varchar" MaxLength="4" />
|
||||
<Property Name="descriptions" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="self_ratio" Type="decimal" Precision="18" Scale="4" />
|
||||
<Property Name="comp_ratio" Type="decimal" Precision="18" Scale="4" />
|
||||
<Property Name="gov_ratio" Type="decimal" Precision="18" Scale="4" />
|
||||
<Property Name="limit_amt" Type="decimal" Precision="18" Scale="0" />
|
||||
</EntityType>-->
|
||||
<EntityType Name="hr_ins_grade">
|
||||
<Key>
|
||||
<PropertyRef Name="ins_type" />
|
||||
@@ -1188,6 +1188,16 @@
|
||||
<Property Name="ShuWenList" Type="nvarchar(max)" />
|
||||
<Property Name="IsGenerating" Type="bit" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="shuwen_temp">
|
||||
<Key>
|
||||
<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="name" Type="nvarchar" MaxLength="50" />
|
||||
<Property Name="contents" Type="nvarchar(max)" />
|
||||
<Property Name="reg_time" Type="datetime" />
|
||||
</EntityType>
|
||||
<EntityType Name="stock">
|
||||
<Key>
|
||||
<PropertyRef Name="num" />
|
||||
@@ -2448,6 +2458,7 @@
|
||||
<EntitySet Name="activity_kind" EntityType="Self.activity_kind" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="activity_kind_detail" EntityType="Self.activity_kind_detail" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="activity_relating" EntityType="Self.activity_relating" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="activity_shuwen" EntityType="Self.activity_shuwen" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="activity_spares" EntityType="Self.activity_spares" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="admin" EntityType="Self.admin" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="admin_group" EntityType="Self.admin_group" Schema="dbo" store:Type="Tables" />
|
||||
@@ -2512,6 +2523,7 @@
|
||||
<EntitySet Name="RegionType" EntityType="Self.RegionType" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="Room" EntityType="Self.Room" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="ShuWen" EntityType="Self.ShuWen" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="shuwen_temp" EntityType="Self.shuwen_temp" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="stock" EntityType="Self.stock" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="stock_files" EntityType="Self.stock_files" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="stock_kind" EntityType="Self.stock_kind" Schema="dbo" store:Type="Tables" />
|
||||
@@ -4954,6 +4966,8 @@
|
||||
<EntitySet Name="hr_ins_ratio" EntityType="Model.hr_ins_ratio" />
|
||||
<EntitySet Name="hr_org" EntityType="Model.hr_org" />
|
||||
<EntitySet Name="hr_section" EntityType="Model.hr_section" />
|
||||
<EntitySet Name="activity_shuwen" EntityType="Model.activity_shuwen" />
|
||||
<EntitySet Name="shuwen_temp" EntityType="Model.shuwen_temp" />
|
||||
</EntityContainer>
|
||||
<ComplexType Name="sp_helpdiagramdefinition_Result">
|
||||
<Property Type="Int32" Name="version" Nullable="true" />
|
||||
@@ -5999,6 +6013,27 @@
|
||||
<Property Name="dinner_rest_end" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="work_time" Type="Decimal" Precision="18" Scale="2" />
|
||||
</EntityType>
|
||||
<EntityType Name="activity_shuwen">
|
||||
<Key>
|
||||
<PropertyRef Name="act_num" />
|
||||
<PropertyRef Name="shuwen_type" />
|
||||
</Key>
|
||||
<Property Name="act_num" Type="Int32" Nullable="false" />
|
||||
<Property Name="shuwen_num" Type="Int32" />
|
||||
<Property Name="shuwen_type" Type="String" Nullable="false" MaxLength="8" FixedLength="false" Unicode="false" />
|
||||
<Property Name="contents" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
||||
<Property Name="reg_time" Type="DateTime" Precision="3" />
|
||||
</EntityType>
|
||||
<EntityType Name="shuwen_temp">
|
||||
<Key>
|
||||
<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="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" />
|
||||
</EntityType>
|
||||
</Schema>
|
||||
</edmx:ConceptualModels>
|
||||
<!-- C-S mapping content -->
|
||||
@@ -7359,6 +7394,28 @@
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="activity_shuwen">
|
||||
<EntityTypeMapping TypeName="Model.activity_shuwen">
|
||||
<MappingFragment StoreEntitySet="activity_shuwen">
|
||||
<ScalarProperty Name="reg_time" ColumnName="reg_time" />
|
||||
<ScalarProperty Name="contents" ColumnName="contents" />
|
||||
<ScalarProperty Name="shuwen_type" ColumnName="shuwen_type" />
|
||||
<ScalarProperty Name="shuwen_num" ColumnName="shuwen_num" />
|
||||
<ScalarProperty Name="act_num" ColumnName="act_num" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="shuwen_temp">
|
||||
<EntityTypeMapping TypeName="Model.shuwen_temp">
|
||||
<MappingFragment StoreEntitySet="shuwen_temp">
|
||||
<ScalarProperty Name="reg_time" ColumnName="reg_time" />
|
||||
<ScalarProperty Name="contents" ColumnName="contents" />
|
||||
<ScalarProperty Name="name" ColumnName="name" />
|
||||
<ScalarProperty Name="shuwen_type" ColumnName="shuwen_type" />
|
||||
<ScalarProperty Name="num" ColumnName="num" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
</EntityContainerMapping>
|
||||
</Mapping>
|
||||
</edmx:Mappings>
|
||||
|
||||
@@ -182,6 +182,8 @@
|
||||
<EntityTypeShape EntityType="Model.hr_ins_ratio" Width="1.5" PointX="29.75" PointY="26.75" />
|
||||
<EntityTypeShape EntityType="Model.hr_org" Width="1.5" PointX="30.75" PointY="0.75" />
|
||||
<EntityTypeShape EntityType="Model.hr_section" Width="1.5" PointX="0.75" PointY="30.75" />
|
||||
<EntityTypeShape EntityType="Model.activity_shuwen" Width="1.5" PointX="10.375" PointY="30.75" />
|
||||
<EntityTypeShape EntityType="Model.shuwen_temp" Width="1.5" PointX="28.375" PointY="30.75" />
|
||||
</Diagram>
|
||||
</edmx:Diagrams>
|
||||
</edmx:Designer>
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
/// <summary>
|
||||
/// shuwensController 的摘要描述
|
||||
/// </summary
|
||||
[ezAuthorize]
|
||||
public class shuwensController: BaseApiController
|
||||
{
|
||||
public shuwensController()
|
||||
{
|
||||
//
|
||||
// TODO: 在這裡新增建構函式邏輯
|
||||
//
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/shuwens/GetShuwenTemplate")]
|
||||
public IHttpActionResult GetShuwenTemplate([FromBody] Model.shuwen_temp temp)
|
||||
{
|
||||
var qry = _db.shuwen_temp.AsQueryable();
|
||||
if (temp.num > 0)
|
||||
{
|
||||
qry = qry.Where(x => x.num == temp.num);
|
||||
}
|
||||
return Ok(new {result="Y", data = qry.Select(x => new
|
||||
{
|
||||
x.num,x.shuwen_type,x.name,x.contents
|
||||
}).FirstOrDefault() });
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/shuwens/ListShuwenTemplate")]
|
||||
public IHttpActionResult ListShuwenTemplate([FromBody] Model.shuwen_temp temp)
|
||||
{
|
||||
var qry = _db.shuwen_temp.AsQueryable();
|
||||
if (temp!=null&& !string.IsNullOrEmpty(temp.shuwen_type ))
|
||||
{
|
||||
qry = qry.Where(x => x.shuwen_type == temp.shuwen_type);
|
||||
}
|
||||
return Ok(new
|
||||
{
|
||||
result = "Y",
|
||||
data = qry.Select(x => new
|
||||
{
|
||||
x.num,
|
||||
x.shuwen_type,
|
||||
x.name,
|
||||
x.contents
|
||||
}).ToList()
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user