潘志宝
2024-09-05 7fd198b8ebe97cd06b10f96b9179caebe679783c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.iailab.module.model.mcs.sche.service.impl;
 
import com.iailab.framework.common.service.impl.BaseServiceImpl;
import com.iailab.module.model.mcs.sche.dao.StScheduleSchemeDetailesDao;
import com.iailab.module.model.mcs.sche.entity.StScheduleSchemeDetailesEntity;
import com.iailab.module.model.mcs.sche.service.StScheduleSchemeDetailesService;
import com.iailab.module.model.mcs.sche.vo.ScheduleSchemeDetailesVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
 
/**
 * @author PanZhibao
 * @date 2021年07月26日 16:50
 */
@Service("stScheduleSchemeDetailesService")
public class StScheduleSchemeDetailesServiceImpl extends BaseServiceImpl<StScheduleSchemeDetailesDao, StScheduleSchemeDetailesEntity>
        implements StScheduleSchemeDetailesService {
 
    private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
    @Override
    public List<ScheduleSchemeDetailesVo> queryScheduleSchemeDetailes(Map<String, Object> params) {
        Calendar calendar = Calendar.getInstance();
        calendar.add(Calendar.HOUR_OF_DAY, -1);
        if (StringUtils.isBlank((String)params.get("startTime"))) {
            params.put("startTime", calendar.getTime());
        }
        return baseDao.queryScheduleSchemeDetailes(params);
    }
}