|
|
@ -1292,50 +1292,55 @@ public class ExcelService implements IExcelService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public TableVo.SchedulePlan schedulePlanning(CompeteDto.CompeteTime params) { |
|
|
|
List<TableVo.SchedulePlanDetailAllIn> schedulePlanDetailListUp = new ArrayList<>(); |
|
|
|
List<TableVo.SchedulePlanDetailAllIn> schedulePlanDetailListDown = new ArrayList<>(); |
|
|
|
public List<TableVo.SchedulePlanDetail> schedulePlanning(CompeteDto.CompeteTime params) { |
|
|
|
List<TableVo.SchedulePlanDetail> schedulePlanDetailListMorning = new ArrayList<>(); |
|
|
|
List<TableVo.SchedulePlanDetail> schedulePlanDetailListAfternoon = new ArrayList<>(); |
|
|
|
List<TableVo.SchedulePlanDetail> schedulePlanDetailListNight = new ArrayList<>(); |
|
|
|
// List<TableVo.SchedulePlan> schedulePlanList = new ArrayList<>();
|
|
|
|
//关联查询项目名,该项目在config和project中都存在
|
|
|
|
List<TableVo.SchedulePlanDetail> schedulePlanDetailList = competeProjectConfigDao.selectDetail(); |
|
|
|
TableVo.SchedulePlan schedulePlan = new TableVo.SchedulePlan(); |
|
|
|
if (CollectionUtil.isNotEmpty(schedulePlanDetailList)) { |
|
|
|
for (TableVo.SchedulePlanDetail schedulePlanDetail : schedulePlanDetailList) { |
|
|
|
//项目名
|
|
|
|
String projectName = schedulePlanDetail.getProjectName(); |
|
|
|
//开始时间yyyy-MM-dd HH:mm:ss
|
|
|
|
long startTime = schedulePlanDetail.getStartTime(); |
|
|
|
Date date = new Date(startTime); |
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm"); |
|
|
|
String sm = simpleDateFormat.format(date); |
|
|
|
//结束时间
|
|
|
|
long endTime = schedulePlanDetail.getEndTime(); |
|
|
|
Date date1 = new Date(endTime); |
|
|
|
SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("HH:mm"); |
|
|
|
String em = simpleDateFormat1.format(date1); |
|
|
|
//拼接
|
|
|
|
String string = projectName + "(" + sm + "-" + em + ")"; |
|
|
|
//项目开始日期
|
|
|
|
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("MM-dd"); |
|
|
|
String md = simpleDateFormat2.format(date); |
|
|
|
//上午项目
|
|
|
|
if (Integer.parseInt(sm.substring(0, 2)) >= 6 && Integer.parseInt(sm.substring(0, 2)) <= 12) { |
|
|
|
TableVo.SchedulePlanDetailAllIn schedulePlanDetailAllIn = new TableVo.SchedulePlanDetailAllIn(); |
|
|
|
schedulePlanDetailAllIn.setData(md); |
|
|
|
schedulePlanDetailAllIn.setString(string); |
|
|
|
schedulePlanDetailListUp.add(schedulePlanDetailAllIn); |
|
|
|
}//下午项目
|
|
|
|
else if (Integer.parseInt(sm.substring(0, 2)) > 12 && Integer.parseInt(sm.substring(0, 2)) <= 18) { |
|
|
|
TableVo.SchedulePlanDetailAllIn schedulePlanDetailAllIn1 = new TableVo.SchedulePlanDetailAllIn(); |
|
|
|
schedulePlanDetailAllIn1.setData(md); |
|
|
|
schedulePlanDetailAllIn1.setString(string); |
|
|
|
schedulePlanDetailListDown.add(schedulePlanDetailAllIn1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
schedulePlan.setSchedulePlanDetailListDown(schedulePlanDetailListDown); |
|
|
|
schedulePlan.setSchedulePlanDetailListUp(schedulePlanDetailListUp); |
|
|
|
} |
|
|
|
return schedulePlan; |
|
|
|
// TableVo.SchedulePlanAll schedulePlanAll = new TableVo.SchedulePlanAll();
|
|
|
|
// Set set = new HashSet();
|
|
|
|
// if (CollectionUtil.isNotEmpty(schedulePlanDetailList)) {
|
|
|
|
// for (TableVo.SchedulePlanDetail schedulePlanDetail : schedulePlanDetailList) {
|
|
|
|
// //开始时间yyyy-MM-dd HH:mm:ss
|
|
|
|
// long startTime = schedulePlanDetail.getStartTime();
|
|
|
|
// Date date = new Date(startTime);
|
|
|
|
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
// String sm = simpleDateFormat.format(date);
|
|
|
|
// set.add(sm);
|
|
|
|
// //结束时间
|
|
|
|
// long endTime = schedulePlanDetail.getEndTime();
|
|
|
|
// Date date1 = new Date(endTime);
|
|
|
|
// SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("HH:mm");
|
|
|
|
// String em = simpleDateFormat1.format(date1);
|
|
|
|
//当前项目开始日期
|
|
|
|
// SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("MM-dd");
|
|
|
|
// String sd = simpleDateFormat2.format(date);
|
|
|
|
// //上个项目开始日期
|
|
|
|
// TableVo.SchedulePlanDetail schedulePlanDetail1 = schedulePlanDetailList.get(1);
|
|
|
|
// long startTime1 = schedulePlanDetail.getStartTime();
|
|
|
|
// Date date1 = new Date(startTime);
|
|
|
|
// String sd1 = simpleDateFormat2.format(date1);
|
|
|
|
//上午项目
|
|
|
|
// if (Integer.parseInt(sm.substring(0, 2)) >= 6 && Integer.parseInt(sm.substring(0, 2)) <= 12) {
|
|
|
|
// schedulePlanDetailListMorning.add(schedulePlanDetail);
|
|
|
|
// for (TableVo.SchedulePlanDetail schedulePlanDetail1 :schedulePlanDetailListMorning){
|
|
|
|
//
|
|
|
|
// }
|
|
|
|
// }//下午项目
|
|
|
|
// else if (Integer.parseInt(sm.substring(0, 2)) > 12 && Integer.parseInt(sm.substring(0, 2)) <= 18) {
|
|
|
|
// schedulePlanDetailListAfternoon.add(schedulePlanDetail);
|
|
|
|
// }//晚上
|
|
|
|
// else if (Integer.parseInt(sm.substring(0, 2)) > 18 && Integer.parseInt(sm.substring(0, 2)) <= 24){
|
|
|
|
// schedulePlanDetailListNight.add(schedulePlanDetail);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// }
|
|
|
|
return schedulePlanDetailList; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|