技师设置时间
This commit is contained in:
parent
e720100515
commit
80f9ed08a7
|
@ -186,7 +186,7 @@ public class ArtificerTimeServiceImpl extends ServiceImpl<ArtificerTimeDao, Arti
|
|||
Date startDate = DateUtils.stringToDate(startDateStr,"yyyy-MM-dd HH:mm");
|
||||
Date endDate = DateUtils.stringToDate(endDateStr,"yyyy-MM-dd HH:mm");
|
||||
Date current = startDate;
|
||||
while(current.getTime()<=endDate.getTime()){
|
||||
while(current.getTime()<endDate.getTime()){
|
||||
String day = DateUtils.format(current,"yyyy-MM-dd");
|
||||
String time = DateUtils.format(current,"HH:mm");
|
||||
if(map.get(day)!=null){
|
||||
|
@ -237,14 +237,14 @@ public class ArtificerTimeServiceImpl extends ServiceImpl<ArtificerTimeDao, Arti
|
|||
|
||||
public static void main(String[] args) {
|
||||
|
||||
String idleTime = "2024-08-28 12:00,2024-08-28 18:30";
|
||||
String idleTime = "2024-08-29 15:30,2024-08-29 23:30";
|
||||
String[] idelTimes = idleTime.split(",");
|
||||
|
||||
Map<String,List> dateMap = new HashMap();
|
||||
Date startDate = DateUtils.stringToDate(idelTimes[0],"yyyy-MM-dd HH:mm");
|
||||
Date endDate = DateUtils.stringToDate(idelTimes[1],"yyyy-MM-dd HH:mm");
|
||||
Date current = startDate;
|
||||
while(current.getTime()<=endDate.getTime()){
|
||||
while(current.getTime()<endDate.getTime()){
|
||||
String day = DateUtils.format(current,"yyyy-MM-dd");
|
||||
String time = DateUtils.format(current,"HH:mm");
|
||||
if(dateMap.get(day)!=null){
|
||||
|
|
Loading…
Reference in New Issue