Commit 0de69d15c417f7cb14e447db6b5602339ee9ae8f
1 parent
78a5bf0931
Exists in
master
and in
8 other branches
code update
Showing 2 changed files with 15 additions and 6 deletions
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
0de69d1
... | ... | @@ -742,18 +742,23 @@ |
742 | 742 | // System.out.println(s); |
743 | 743 | // Date s = addDay(parseYMD("2016-02-26"), 168); |
744 | 744 | |
745 | - int start = 3; | |
746 | - int end = 3; | |
745 | + int start = 1; | |
746 | + int end = 1; | |
747 | 747 | // |
748 | 748 | // |
749 | 749 | // Date startDate = DateUtil.getNewDate(-end-1,"周",1+1); |
750 | 750 | // Date endDate = DateUtil.getNewDate(-start,"周",0+1); |
751 | 751 | |
752 | 752 | |
753 | - Date startDate = DateUtil.getNewDate(-end-1,"月",1); | |
754 | - Date endDate = DateUtil.getNewDate(-start,"月",1); | |
753 | + Date startDate = DateUtil.getNewDate(-end-1,"周",2+1); | |
754 | + Date endDate = DateUtil.getNewDate(-start,"周",2); | |
755 | 755 | |
756 | - System.out.println(startDate + "==="+ endDate); | |
756 | + | |
757 | + String date = y_m_d_h_m_s.format(startDate.getTime()); | |
758 | +// Date startDate = DateUtil.getNewDate(-end-1,"月",1); | |
759 | +// Date endDate = DateUtil.getNewDate(-start,"月",1); | |
760 | + | |
761 | + System.out.println(date + "==="); | |
757 | 762 | |
758 | 763 | |
759 | 764 | // Date startDate = getRangeDate(parseYMD("2016-09-07"),2,"周",-1); |
platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
View file @
0de69d1
... | ... | @@ -788,6 +788,8 @@ |
788 | 788 | { |
789 | 789 | Date startDate = DateUtil.getNewDate(-end-1,"周",sendTimeType+1); |
790 | 790 | Date endDate = DateUtil.getNewDate(-start,"周",sendTimeType); |
791 | + startDate = DateUtil.formatDate(startDate); | |
792 | + endDate = DateUtil.formatDate(endDate); | |
791 | 793 | patientsQuery.setLastMensesStart(startDate); |
792 | 794 | patientsQuery.setLastMensesEnd(endDate); |
793 | 795 | //查询符合条件的孕妇 |
794 | 796 | |
... | ... | @@ -1012,8 +1014,10 @@ |
1012 | 1014 | if (end != null && start != null) |
1013 | 1015 | { |
1014 | 1016 | |
1015 | - Date startDate = DateUtil.getNewDate(-end-1,"周",sendTimeType); | |
1017 | + Date startDate = DateUtil.getNewDate(-end-1,"周",sendTimeType+1); | |
1016 | 1018 | Date endDate = DateUtil.getNewDate(-start,"周",sendTimeType); |
1019 | + startDate = DateUtil.formatDate(startDate); | |
1020 | + endDate = DateUtil.formatDate(endDate); | |
1017 | 1021 | patientsQuery.setLastMensesStart(startDate); |
1018 | 1022 | patientsQuery.setLastMensesEnd(endDate); |
1019 | 1023 |