zoukankan      html  css  js  c++  java
  • map的使用

    @Override
    public List<Map<String, Object>> findSchedule(Date beginTime, Date endTime, Long userId) {
           Map<String, Object> map = new HashMap<>();
           Map<String, Object> param = new HashMap<>();
           param.put("beginTime", beginTime);
           param.put("endTime", endTime);
           param.put("userId", userId);
           List<CrmSchedule> schedules = crmScheduleRepo.find(param);
           for (CrmSchedule schedule : schedules) {//日程的
                  map.put(DateUtil.format(DateUtil.shortDate(schedule.getDeadline()),

                                                                       DateUtil.yyyyMMddHHmmss),1);
           }
           for (CrmSchedule schedule : schedules) {//未完成的跟踪记录
                  if(schedule.getTrackId()==null){
                         map.put(DateUtil.format(DateUtil.shortDate(schedule.getDeadline()),

                                                DateUtil.yyyyMMddHHmmss),0);//当做所有是已经完成的
                  }
           }
           List<Map<String, Object>> rs = new ArrayList<>();
           Set<String> keySet = map.keySet();
           for (String key : keySet) {
                  Map<String, Object> info = new HashMap<>();
                  info.put("time", key);
                  info.put("state", map.get(key));
                  rs.add(info);
           }
           return rs;
    }

  • 相关阅读:
    最新可靠好用的DNS服务器地址汇总
    使用 MNIST 图像识别数据集
    MNIST手写数字数据库
    OCR学习及tesseract的一些测试
    Improving the quality of the output
    解决Web部署 svg/woff/woff2字体 404错误
    Bootstrap 网格系统(Grid System)的工作原理
    手写数字样本库的下载地址
    Tesseract-OCR 训练过程 V3.02
    tesseract-orc 合并识别结果
  • 原文地址:https://www.cnblogs.com/ctaixw/p/5474339.html
Copyright © 2011-2022 走看看