fix estimate monday

master
luoyang 6 years ago
parent 8580e7e4ce
commit 3e814c663a

@ -82,7 +82,15 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
//今天 //今天
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); calendar.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
Date todayDate = new Date();
//如果是周一,显示周五的数据
Calendar cal=Calendar.getInstance();
cal.setTime(new Date());
int week=cal.get(Calendar.DAY_OF_WEEK);
if (week ==2) {
cal.add(Calendar.DATE, -3);
}
Date todayDate = cal.getTime();
String dateStr = DateFormatUtils.format(todayDate, "yyyy/MM/dd"); String dateStr = DateFormatUtils.format(todayDate, "yyyy/MM/dd");
if (estimateAnalysisMapper.checkDayIsCleanDay(dateStr) != null) { if (estimateAnalysisMapper.checkDayIsCleanDay(dateStr) != null) {
JSONObject today = getDaySettleInfo(todayDate); JSONObject today = getDaySettleInfo(todayDate);

Loading…
Cancel
Save