GithubHelp home page GithubHelp logo

0vally1 / h5app-attendance-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from open-dingtalk/h5app-attendance-demo

0.0 0.0 0.0 11.35 MB

钉钉考勤相关功能demo

Shell 6.99% JavaScript 34.45% Java 47.35% CSS 2.60% HTML 7.72% Batchfile 0.89%

h5app-attendance-demo's Introduction

考勤模块--demo

  • 此demo主要展示考勤相关模块功能,包括考勤规则模块、考勤打卡模块、考勤统计模块、假期审批模块等。
  • 项目结构
    • backend:后端模块,springboot构建,接口功能包括:创建考勤组、创建考勤班次、考勤排班安排、查询考勤数据、上传考勤打卡记录、查询考勤假期状态等功能。
    • frontend:前端模块,react构建,场景功能包括:自动登录,设置考勤组信息、构建班次信息、上传打卡记录、展示考勤记录、展示假期状态等。

研发环境准备

  1. 需要有一个钉钉注册企业,如果没有可以创建:https://oa.dingtalk.com/register_new.htm#/

  2. 成为钉钉开发者,参考文档:https://developers.dingtalk.com/document/app/become-a-dingtalk-developer

  3. 登录钉钉开放平台后台创建一个H5应用: https://open-dev.dingtalk.com/#/index

  4. 配置应用

    配置开发管理,参考文档:https://developers.dingtalk.com/document/app/configure-orgapp

image-20210706171740868

配置相关权限:https://developers.dingtalk.com/document/app/address-book-permissions

本demo使用接口相关权限:

  • 通讯录管理——成员信息读权限
  • 考勤——企业考勤数据上传权限
  • 考勤——考勤组管理权限
  • 考勤——查询企业考勤数据权限

image-20210706172027870

运行前准备

下载demo

git clone https://github.com/open-dingtalk/h5app-attendance-demo.git

获取相应参数

获取到以下参数,修改后端application.yaml

app:
  app_key: *****
  app_secret: *****
  agent_id: *****
  corp_id: *****

参数获取方法:登录开发者后台

  1. 获取corpId:https://open-dev.dingtalk.com/#/index
  2. 进入应用开发-企业内部开发-点击进入应用-基础信息-获取appKey、appSecret、agentId

修改前端页面

打开项目,命令行中执行以下命令,编译打包生成build文件

cd frontend
npm install
npm run build

将打包好的静态资源文件放入后端

image-20210706173224172

启动项目

  • 启动springboot
  • 移动端钉钉点击工作台,找到创建的应用,进入应用

运行展示(部分)

image-20210909163138817

应用首页

image-20210909164323214

自动登录

image-20210909163811222

创建考勤组

6

系统提示

image-20210909164100930

上传打卡

image-20210909164358523

获取打卡记录

参考文档

  1. 创建考勤组,文档链接:https://developers.dingtalk.com/document/app/attendance-group-write
  2. 创建班次信息,文档链接:https://developers.dingtalk.com/document/app/create-modify-shifts
  3. 考勤组排班,文档链接:https://developers.dingtalk.com/document/app/scheduling-system-attendance-group-scheduling
  4. 上传打卡记录,文档链接:https://developers.dingtalk.com/document/app/upload-punch-records
  5. 获取打卡结果,文档链接:https://developers.dingtalk.com/document/app/open-attendance-clock-in-data
  6. 查询请假状态,文档链接:https://developers.dingtalk.com/document/app/query-status

h5app-attendance-demo's People

Contributors

nannanness avatar wanzhiqiang avatar

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.