Commit 635f7401e3334b25918470987178c94f07ca5da8
1 parent
fc82a963
Exists in
master
晨午检 判断
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
cloud/search_smartCampus/src/main/java/com/sincere/smartSearch/service/impl/UserServiceImpl.java
... | ... | @@ -81,9 +81,9 @@ public class UserServiceImpl implements UserService { |
81 | 81 | String today = DateUtils.getToday(DateUtils.format1); |
82 | 82 | record.setType(1); |
83 | 83 | for(CwCheck cwCheck : list){ |
84 | - Date begin = DateUtils.string2Date(today+cwCheck.getBegintime()+":00",DateUtils.format2); | |
85 | - Date end = DateUtils.string2Date(today+cwCheck.getEndtime()+":00",DateUtils.format2); | |
86 | - if(end.compareTo(record.getIntime()) > 1 && record.getIntime().compareTo(begin) > 1){ | |
84 | + Date begin = DateUtils.string2Date(today+ " "+ cwCheck.getBegintime()+":00",DateUtils.format2); | |
85 | + Date end = DateUtils.string2Date(today+ " "+ cwCheck.getEndtime()+":00",DateUtils.format2); | |
86 | + if(end.compareTo(record.getIntime()) == 1 && record.getIntime().compareTo(begin) == 1){ | |
87 | 87 | record.setType(cwCheck.getCheckname().equals("晨检")?1:2); |
88 | 88 | } |
89 | 89 | } | ... | ... |