updates
parent
17453e4f4b
commit
1776a578d7
|
|
@ -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<babyDataRecView> babyDataRecViews = conn.Query<babyDataRecView>("select * from babyDataRecView " + filiterString + " order by babyData_lastTestDate desc ").ToList();
|
||||
List<babyDataRecView> babyDataRecViews = conn.Query<babyDataRecView>("select * from babyDataRecView " + filiterString + " order by babyRec_recdate desc ").ToList();
|
||||
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
MemoryStream ms = new MemoryStream();
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ namespace abbott_2024_event.BackEnd.api
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
string filiterString = "";
|
||||
|
||||
filiterString += " Where babyData_bindedLine = 'Y' and babyRec_newestRec = 'Y' and babyRec_recdate >= '" + dateStart.ToString("yyyy/MM/dd") + "' and babyRec_recdate <= '" + dateEnd.ToString("yyyy/MM/dd HH:mm:ss") + "' ";
|
||||
|
|
@ -92,14 +93,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<babyDataRecView> babyDataRecViews = conn.Query<babyDataRecView>("select distinct line_uid, line_displayname, line_phone from babyDataRecView " + filiterString + " ").ToList();
|
||||
|
||||
|
||||
List<babyDataRecView> babyDataRecViews = conn.Query<babyDataRecView>("select distinct line_uid, line_displayname, line_phone, lineUser_modifydate from babyDataRecView " + filiterString + " order by lineUser_modifydate desc ").ToList();
|
||||
//babyDataRecViews = babyDataRecViews.Distinct().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");
|
||||
userData.testdate = view.lineUser_modifydate.ToString("yyyy/MM/dd HH:mm:ss");
|
||||
|
||||
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();
|
||||
|
||||
|
|
@ -114,7 +117,7 @@ namespace abbott_2024_event.BackEnd.api
|
|||
babyData.baby_testdate = subView.babyRec_recdate.ToString("yyyy/MM/dd");
|
||||
babyData.baby_percent = subView.babyRec_inpercent;
|
||||
|
||||
userData.testdate = subView.babyRec_recdate.ToString("yyyy/MM/dd");
|
||||
//userData.testdate = subView.babyRec_recdate.ToString("yyyy/MM/dd");
|
||||
|
||||
userData.babyDatas.Add(babyData);
|
||||
|
||||
|
|
@ -144,6 +147,8 @@ namespace abbott_2024_event.BackEnd.api
|
|||
public string line_uid { get; set; } = "";
|
||||
public string line_displayName { get; set; } = "";
|
||||
public string line_phone { get; set; } = "";
|
||||
|
||||
|
||||
public string testdate { get; set; } = "";
|
||||
|
||||
public string utm_source { get; set; } = "";
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ function loadDataTable() {
|
|||
{ data: 'line_displayName', className: 'align-middle text-left', orderable: true, searchable: true },
|
||||
{ data: 'line_uid', className: 'align-middle text-left', orderable: false, searchable: true, visible: false },
|
||||
{ data: 'line_phone', className: 'align-middle text-left', orderable: false, searchable: true },
|
||||
{ data: 'testdate', className: 'align-top text-center', orderable: false, searchable: false, visible: false },
|
||||
{ data: 'testdate', className: 'align-top text-center', orderable: true, searchable: false, visible: false },
|
||||
{ data: 'line_uid', className: 'align-middle text-center', orderable: false, searchable: false },
|
||||
{ data: 'line_uid', className: 'align-middle text-center', orderable: false, searchable: false }
|
||||
],
|
||||
|
|
|
|||
|
|
@ -200,5 +200,5 @@
|
|||
</form><!-- /.modal -->
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
|
||||
<script src="assets/javascript/custom/userList.js?v=17"></script>
|
||||
<script src="assets/javascript/custom/userList.js?v=18"></script>
|
||||
</asp:Content>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -247,7 +247,7 @@ function loadDataTable() {
|
|||
{ data: 'line_displayName', className: 'align-middle text-left', orderable: true, searchable: true },
|
||||
{ data: 'line_uid', className: 'align-middle text-left', orderable: false, searchable: true, visible: false },
|
||||
{ data: 'line_phone', className: 'align-middle text-left', orderable: false, searchable: true },
|
||||
{ data: 'testdate', className: 'align-top text-center', orderable: false, searchable: false, visible: false },
|
||||
{ data: 'testdate', className: 'align-top text-center', orderable: true, searchable: false, visible: false },
|
||||
{ data: 'line_uid', className: 'align-middle text-center', orderable: false, searchable: false },
|
||||
{ data: 'line_uid', className: 'align-middle text-center', orderable: false, searchable: false }
|
||||
],
|
||||
|
|
|
|||
|
|
@ -200,5 +200,5 @@
|
|||
</form><!-- /.modal -->
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
|
||||
<script src="assets/javascript/custom/userList.js?v=17"></script>
|
||||
<script src="assets/javascript/custom/userList.js?v=18"></script>
|
||||
</asp:Content>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -120,6 +120,10 @@ namespace abbott_2024_event.webapi
|
|||
lineUser.lineUser_modifydate = DateTime.Now;
|
||||
conn.Update<lineUser>(lineUser);
|
||||
}
|
||||
else {
|
||||
lineUser.lineUser_modifydate = DateTime.Now;
|
||||
conn.Update<lineUser>(lineUser);
|
||||
}
|
||||
|
||||
List<babyData> babyDatas = conn.Query<babyData>("select * from babyData where line_uid = @line_uid", new { line_uid = line_uid }).ToList();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue