改太多
This commit is contained in:
1 parent
be5352efed
commit
1cb2a7a35e
48 files changed
+17970
-485
No files matched your search
@@ -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,
|
||||
|
||||
|
||||
Reference in new issue
Block a user