GithubHelp home page GithubHelp logo

Comments (2)

kelp404 avatar kelp404 commented on June 21, 2024

功能是這樣對嗎?

要做兩個 API,輸入欄位都有 project id,計算總時數的 API 還需要開始時間結束時間

計算每月工作時數:
螢幕快照 2019-11-12 下午11 06 52
從 ProjectTripModel 以 studyAreas.cameraLocations.cameraLocation 以及月份做 group-by,統計每個月的 startActiveDate 到 endActiveDate 經過的小時數。

計算範圍內總時數:
螢幕快照 2019-11-12 下午11 06 22
從 ProjectTripModel 以 studyAreas.cameraLocations.cameraLocation 做 group-by 在時間範圍內統計 startActiveDate 到 endActiveDate 經過的小時數。

  {
    "_id": "5dce51a92910eb3efeca32f4",
    "project": "5dce48ce2910eb2f12ca315b",
    "sn": "去高雄好開心01",
    "date": "2011-07-19T00:00:00.000Z",
    "member": "吳敦義",
    "mark": "國家機器動得好厲害",
    "studyAreas": [
      {
        "cameraLocations": [
          {
            "projectCameras": [
              {
                "_id": "5dce51a92910eb0137ca32f7",
                "cameraSn": "TEST1115002",
                "cameraState": "active",
                "cameraBatteryType": "鎳氫電池(充電電池)",
                "cameraBatteryRemainingCapacity": "0.01",
                "cameraBrightness": "自動",
                "cameraSensitivity": "",
                "cameraVideoLength": 0.333333,
                "cameraContinuousShots": 2,
                "startActiveDate": "2011-10-06T00:00:00.000Z",
                "endActiveDate": "2011-08-18T00:00:00.000Z",
                "cameraPosition": "30",
                "cameraDepressionAngle": "88",
                "cameraSensingDistance": 65,
                "cameraMemoryCardNumber": 30,
                "cameraMark": "很好很好"
              }
            ],
            "_id": "5dce51a92910eb33faca32f6",
            "cameraLocation": "5dce4b1c2910eb04daca31fc",
            "title": "CF-13",
            "cameraLocationEvent": "setting",
            "cameraLocationMark": "高雄市政府男廁"
          }
        ],
        "_id": "5dce51a92910eb8aa1ca32f5",
        "studyArea": "5dce4a852910ebd566ca31e2",
        "title": "高雄市政府"
      }
    ],
    "createTime": "2019-11-15T07:20:09.688Z",
    "updateTime": "2019-11-15T07:20:09.689Z",
    "__v": 0
  }

from camera-trap-api.

ts00617355 avatar ts00617355 commented on June 21, 2024

輸入欄位

  1. 都有 project id (array)
  2. 開始時間 start_time、結束時間 end_time
  3. 基本上 filter 的條件都要有 (但若太多、其他條件可先不加、之後我們再 query 加上)
    image

from camera-trap-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.