updates order by
parent
a785a9ae27
commit
17453e4f4b
|
|
@ -78,7 +78,7 @@ namespace abbott_2024_event.BackEnd.api
|
||||||
|
|
||||||
filiterString += " and babyRec_months >= " + (int.Parse(min_age) * 12).ToString() + " and babyRec_months <= " + (int.Parse(max_age) * 12).ToString();
|
filiterString += " and babyRec_months >= " + (int.Parse(min_age) * 12).ToString() + " and babyRec_months <= " + (int.Parse(max_age) * 12).ToString();
|
||||||
|
|
||||||
List<babyDataRecView> babyDataRecViews = conn.Query<babyDataRecView>("select * from babyDataRecView " + filiterString + " ").ToList();
|
List<babyDataRecView> babyDataRecViews = conn.Query<babyDataRecView>("select * from babyDataRecView " + filiterString + " order by babyData_lastTestDate desc ").ToList();
|
||||||
|
|
||||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||||
MemoryStream ms = new MemoryStream();
|
MemoryStream ms = new MemoryStream();
|
||||||
|
|
|
||||||
|
|
@ -99,8 +99,9 @@ namespace abbott_2024_event.BackEnd.api
|
||||||
userData.line_uid = view.line_uid;
|
userData.line_uid = view.line_uid;
|
||||||
userData.line_displayName = view.line_displayName;
|
userData.line_displayName = view.line_displayName;
|
||||||
userData.line_phone = view.line_phone;
|
userData.line_phone = view.line_phone;
|
||||||
|
userData.testdate = view.babyData_lastTestDate.ToString("yyyy/MM/dd HH:mm:ss");
|
||||||
|
|
||||||
List<babyDataRecView> subViews = conn.Query<babyDataRecView>("select * from babyDataRecView " + filiterString + " and line_uid = @line_uid ", new { line_uid = view.line_uid }).ToList();
|
List<babyDataRecView> subViews = conn.Query<babyDataRecView>("select * from babyDataRecView " + filiterString + " and line_uid = @line_uid order by babyRec_recdate desc", new { line_uid = view.line_uid }).ToList();
|
||||||
|
|
||||||
foreach (babyDataRecView subView in subViews) {
|
foreach (babyDataRecView subView in subViews) {
|
||||||
babyData babyData = new babyData();
|
babyData babyData = new babyData();
|
||||||
|
|
|
||||||
|
|
@ -239,7 +239,7 @@ function loadDataTable() {
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
order: [[2, 'desc']],
|
order: [[3, 'desc']],
|
||||||
info: true,
|
info: true,
|
||||||
search: "搜尋:",
|
search: "搜尋:",
|
||||||
searching: true,
|
searching: true,
|
||||||
|
|
|
||||||
|
|
@ -200,5 +200,5 @@
|
||||||
</form><!-- /.modal -->
|
</form><!-- /.modal -->
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
|
||||||
<script src="assets/javascript/custom/userList.js?v=16"></script>
|
<script src="assets/javascript/custom/userList.js?v=17"></script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -239,7 +239,7 @@ function loadDataTable() {
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
order: [[2, 'desc']],
|
order: [[3, 'desc']],
|
||||||
info: true,
|
info: true,
|
||||||
search: "搜尋:",
|
search: "搜尋:",
|
||||||
searching: true,
|
searching: true,
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@
|
||||||
<th style="display:none;">Line UID </th>
|
<th style="display:none;">Line UID </th>
|
||||||
<th>電話 </th>
|
<th>電話 </th>
|
||||||
<th style="display:none;">測驗日期 </th>
|
<th style="display:none;">測驗日期 </th>
|
||||||
<th style="min-width: 40%;">寶寶資料</th>
|
<th style="min-width: 35%;">寶寶資料</th>
|
||||||
|
|
||||||
<th style="min-width: 60px;"> </th>
|
<th style="min-width: 60px;"> </th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -200,5 +200,5 @@
|
||||||
</form><!-- /.modal -->
|
</form><!-- /.modal -->
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
|
||||||
<script src="assets/javascript/custom/userList.js?v=14"></script>
|
<script src="assets/javascript/custom/userList.js?v=17"></script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -36,6 +36,10 @@ namespace abbott_2024_event.webapi
|
||||||
string utm_term = (context.Request["utm_term"] == null) ? "" : context.Request["utm_term"].ToString();
|
string utm_term = (context.Request["utm_term"] == null) ? "" : context.Request["utm_term"].ToString();
|
||||||
string utm_content = (context.Request["utm_content"] == null) ? "" : context.Request["utm_content"].ToString();
|
string utm_content = (context.Request["utm_content"] == null) ? "" : context.Request["utm_content"].ToString();
|
||||||
|
|
||||||
|
if (line_uid == "undefined") {
|
||||||
|
line_uid = "";
|
||||||
|
}
|
||||||
|
|
||||||
utm_source = (utm_source.Length > 20) ? utm_source.Substring(0, 20) : utm_source;
|
utm_source = (utm_source.Length > 20) ? utm_source.Substring(0, 20) : utm_source;
|
||||||
utm_medium = (utm_medium.Length > 20) ? utm_medium.Substring(0, 20) : utm_medium;
|
utm_medium = (utm_medium.Length > 20) ? utm_medium.Substring(0, 20) : utm_medium;
|
||||||
utm_campaign = (utm_campaign.Length > 20) ? utm_campaign.Substring(0, 20) : utm_campaign;
|
utm_campaign = (utm_campaign.Length > 20) ? utm_campaign.Substring(0, 20) : utm_campaign;
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,11 @@ namespace abbott_2024_event.webapi
|
||||||
string babyData_uid = (context.Request["babyData_uid"] == null) ? "" : context.Request["babyData_uid"].ToString();
|
string babyData_uid = (context.Request["babyData_uid"] == null) ? "" : context.Request["babyData_uid"].ToString();
|
||||||
string temp_key = (context.Request["temp_key"] == null) ? "" : context.Request["temp_key"].ToString();
|
string temp_key = (context.Request["temp_key"] == null) ? "" : context.Request["temp_key"].ToString();
|
||||||
|
|
||||||
|
if (line_uid == "undefined")
|
||||||
|
{
|
||||||
|
line_uid = "";
|
||||||
|
}
|
||||||
|
|
||||||
if (temp_key == "") {
|
if (temp_key == "") {
|
||||||
objRet.ret = "no";
|
objRet.ret = "no";
|
||||||
objRet.err_code = "3001";
|
objRet.err_code = "3001";
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,11 @@ namespace abbott_2024_event.webapi
|
||||||
string utm_term = (context.Request["utm_term"] == null) ? "" : context.Request["utm_term"].ToString();
|
string utm_term = (context.Request["utm_term"] == null) ? "" : context.Request["utm_term"].ToString();
|
||||||
string utm_content = (context.Request["utm_content"] == null) ? "" : context.Request["utm_content"].ToString();
|
string utm_content = (context.Request["utm_content"] == null) ? "" : context.Request["utm_content"].ToString();
|
||||||
|
|
||||||
|
if (line_uid == "undefined")
|
||||||
|
{
|
||||||
|
line_uid = "";
|
||||||
|
}
|
||||||
|
|
||||||
utm_source = (utm_source.Length > 20) ? utm_source.Substring(0, 20) : utm_source;
|
utm_source = (utm_source.Length > 20) ? utm_source.Substring(0, 20) : utm_source;
|
||||||
utm_medium = (utm_medium.Length > 20) ? utm_medium.Substring(0, 20) : utm_medium;
|
utm_medium = (utm_medium.Length > 20) ? utm_medium.Substring(0, 20) : utm_medium;
|
||||||
utm_campaign = (utm_campaign.Length > 20) ? utm_campaign.Substring(0, 20) : utm_campaign;
|
utm_campaign = (utm_campaign.Length > 20) ? utm_campaign.Substring(0, 20) : utm_campaign;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue