Commit e4d49c52 by wuwenlong

room status opt;

parent 5cf10dc1
...@@ -15,10 +15,7 @@ import share.system.domain.vo.RoomStatusVo; ...@@ -15,10 +15,7 @@ import share.system.domain.vo.RoomStatusVo;
import share.system.service.ISOrderService; import share.system.service.ISOrderService;
import share.system.service.ISStoreService; import share.system.service.ISStoreService;
import share.system.service.RoomStatusService; import share.system.service.RoomStatusService;
import java.text.ParseException;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
/** /**
* @Author wwl * @Author wwl
...@@ -51,15 +48,11 @@ public class RoomStatusServiceImpl implements RoomStatusService { ...@@ -51,15 +48,11 @@ public class RoomStatusServiceImpl implements RoomStatusService {
private List<RoomStatusVo> generatorRoomStatusList(SStore store,Long roomId,List<SOrder> orderList,Date day){ private List<RoomStatusVo> generatorRoomStatusList(SStore store,Long roomId,List<SOrder> orderList,Date day){
String nowTime = "00:00"; String nowTime = "00:00";
String dayStr = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,day); String dayStr = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,day);
//如果day等于当天,判断当前时间是否小于30分钟,小于改为30 //如果day等于当天,nowTime设置为当前时间+30分钟
if(StringUtils.equals(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,day) // if(StringUtils.equals(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,day)
,DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,DateUtils.getNowDate()))){ // ,DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,DateUtils.getNowDate()))){
String m = DateUtils.parseDateToStr("m", DateUtils.getNowDate());
if (Integer.valueOf(m).compareTo(new Integer(30)) < 0) {
nowTime = "30";
}
// nowTime = DateUtils.parseDateToStr("HH:mm",DateUtils.addMinutes(DateUtils.getNowDate(), Constants.ROOM_LOCK_DELAY_MINUTE)); // nowTime = DateUtils.parseDateToStr("HH:mm",DateUtils.addMinutes(DateUtils.getNowDate(), Constants.ROOM_LOCK_DELAY_MINUTE));
} // }
List<RoomStatusVo> voList = new ArrayList<>(); List<RoomStatusVo> voList = new ArrayList<>();
String finalNowTime = nowTime; String finalNowTime = nowTime;
Arrays.stream(LOCKS).forEach(lock -> { Arrays.stream(LOCKS).forEach(lock -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment