diff --git a/BackEnd/api/exportExcel.ashx.cs b/BackEnd/api/exportExcel.ashx.cs index 87fa53d..34c294b 100644 --- a/BackEnd/api/exportExcel.ashx.cs +++ b/BackEnd/api/exportExcel.ashx.cs @@ -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(); - List babyDataRecViews = conn.Query("select * from babyDataRecView " + filiterString + " ").ToList(); + List babyDataRecViews = conn.Query("select * from babyDataRecView " + filiterString + " order by babyData_lastTestDate desc ").ToList(); HSSFWorkbook workbook = new HSSFWorkbook(); MemoryStream ms = new MemoryStream(); diff --git a/BackEnd/api/userList.ashx.cs b/BackEnd/api/userList.ashx.cs index f99d2ed..c12e674 100644 --- a/BackEnd/api/userList.ashx.cs +++ b/BackEnd/api/userList.ashx.cs @@ -92,15 +92,16 @@ 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(); - List babyDataRecViews = conn.Query("select distinct line_uid, line_displayname, line_phone from babyDataRecView " + filiterString + " ").ToList(); + List babyDataRecViews = conn.Query("select distinct line_uid, line_displayname, line_phone from babyDataRecView " + filiterString + " ").ToList(); foreach (babyDataRecView view in babyDataRecViews) { userData userData = new userData(); userData.line_uid = view.line_uid; userData.line_displayName = view.line_displayName; userData.line_phone = view.line_phone; + userData.testdate = view.babyData_lastTestDate.ToString("yyyy/MM/dd HH:mm:ss"); - List subViews = conn.Query("select * from babyDataRecView " + filiterString + " and line_uid = @line_uid ", new { line_uid = view.line_uid }).ToList(); + List subViews = conn.Query("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) { babyData babyData = new babyData(); diff --git a/BackEnd/assets/javascript/custom/userList.js b/BackEnd/assets/javascript/custom/userList.js index b9da06c..60bf26d 100644 --- a/BackEnd/assets/javascript/custom/userList.js +++ b/BackEnd/assets/javascript/custom/userList.js @@ -239,7 +239,7 @@ function loadDataTable() { }, - order: [[2, 'desc']], + order: [[3, 'desc']], info: true, search: "搜尋:", searching: true, diff --git a/BackEnd/userList.aspx b/BackEnd/userList.aspx index 59d1fe4..8a71013 100644 --- a/BackEnd/userList.aspx +++ b/BackEnd/userList.aspx @@ -200,5 +200,5 @@ - + diff --git a/bin/abbott_2024_event.dll b/bin/abbott_2024_event.dll index 7ba3018..914b472 100644 Binary files a/bin/abbott_2024_event.dll and b/bin/abbott_2024_event.dll differ diff --git a/bin/app.publish/BackEnd/assets/javascript/custom/userList.js b/bin/app.publish/BackEnd/assets/javascript/custom/userList.js index b9da06c..60bf26d 100644 --- a/bin/app.publish/BackEnd/assets/javascript/custom/userList.js +++ b/bin/app.publish/BackEnd/assets/javascript/custom/userList.js @@ -239,7 +239,7 @@ function loadDataTable() { }, - order: [[2, 'desc']], + order: [[3, 'desc']], info: true, search: "搜尋:", searching: true, diff --git a/bin/app.publish/BackEnd/userList.aspx b/bin/app.publish/BackEnd/userList.aspx index 93fbe1f..8a71013 100644 --- a/bin/app.publish/BackEnd/userList.aspx +++ b/bin/app.publish/BackEnd/userList.aspx @@ -104,7 +104,7 @@ Line UID 電話 測驗日期 - 寶寶資料 + 寶寶資料   @@ -200,5 +200,5 @@ - + diff --git a/bin/app.publish/bin/abbott_2024_event.dll b/bin/app.publish/bin/abbott_2024_event.dll index 7ba3018..914b472 100644 Binary files a/bin/app.publish/bin/abbott_2024_event.dll and b/bin/app.publish/bin/abbott_2024_event.dll differ diff --git a/webapi/babyData.ashx.cs b/webapi/babyData.ashx.cs index 5a0b492..e11be5c 100644 --- a/webapi/babyData.ashx.cs +++ b/webapi/babyData.ashx.cs @@ -36,6 +36,10 @@ namespace abbott_2024_event.webapi 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(); + if (line_uid == "undefined") { + line_uid = ""; + } + 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_campaign = (utm_campaign.Length > 20) ? utm_campaign.Substring(0, 20) : utm_campaign; diff --git a/webapi/bindBabyData.ashx.cs b/webapi/bindBabyData.ashx.cs index 2a4189a..d567e97 100644 --- a/webapi/bindBabyData.ashx.cs +++ b/webapi/bindBabyData.ashx.cs @@ -28,6 +28,11 @@ namespace abbott_2024_event.webapi 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(); + if (line_uid == "undefined") + { + line_uid = ""; + } + if (temp_key == "") { objRet.ret = "no"; objRet.err_code = "3001"; diff --git a/webapi/lineLogin.ashx.cs b/webapi/lineLogin.ashx.cs index 99632a5..7afd051 100644 --- a/webapi/lineLogin.ashx.cs +++ b/webapi/lineLogin.ashx.cs @@ -33,6 +33,11 @@ namespace abbott_2024_event.webapi 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(); + if (line_uid == "undefined") + { + line_uid = ""; + } + 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_campaign = (utm_campaign.Length > 20) ? utm_campaign.Substring(0, 20) : utm_campaign;