mbas

package
v0.15.64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGroup added in v0.15.30

func CreateGroup(param Group) error

func CreateRecord

func CreateRecord(param Record) error

func CreateSchema added in v0.15.35

func CreateSchema(param Schema) error

func DelGroup added in v0.15.30

func DelGroup(tangentId, id string) error

func DelSchema added in v0.15.35

func DelSchema(tangentId, id string) error

func Destroy

func Destroy()

func Init

func Init(baseUrl string, timeoutSec time.Duration)

func RecordAddRemark

func RecordAddRemark(param RecordAddRemarkParam) error

func UptGroup added in v0.15.30

func UptGroup(param Group) error

func UptSchema added in v0.15.35

func UptSchema(param Schema) error

Types

type ClockInMode added in v0.15.30

type ClockInMode struct {
	Id   string `json:"id"`
	Mode uint8  `json:"mode"`
	// Setting 打卡方式配置明细
	Setting []any `json:"setting"`
}

ClockInMode 打卡方式

type ConflictDetail added in v0.15.34

type ConflictDetail struct {
	User  string `json:"user"`
	Group string `json:"group"`
}

func InGroup added in v0.15.34

func InGroup(tangentId, groupId string, userIds []string) ([]ConflictDetail, error)

type DeptUser added in v0.15.30

type DeptUser struct {
	DeptId   string   `json:"deptId"`
	Num      int      `json:"num"`
	UserIds  []string `json:"userIds"`
	AutoJoin bool     `json:"autoJoin"`
}

DeptUser 部门考勤人员信息

type GetGroupParam added in v0.15.35

type GetGroupParam struct {
	Id        string `form:"id"`
	TangentId string `form:"tangentId"`
	Name      string `form:"name"`
	UserId    string `form:"userId"`
	PageNo    int    `form:"pageNo"`
	PageSize  int    `form:"pageSize"`
}

type GetRecordParam

type GetRecordParam struct {
	TangentId   string `validate:"required,len=32" form:"tangentId"`
	UserId      string `validate:"required,len=32" form:"userId"`
	Start       string `form:"start"`
	End         string `form:"end"`
	CheckInDate string `form:"checkIndDate"`
	RecordType  uint8  `form:"recordType"`
	PageNo      int    `form:"pageNo"`
	PageSize    int    `form:"pageSize"`
}

type GetSchemaParam added in v0.15.35

type GetSchemaParam struct {
	Schema
	PageNo   int `form:"pageNo"`
	PageSize int `form:"pageSize"`
}

type Group added in v0.15.30

type Group struct {
	Id        string        `json:"id"`
	Name      string        `json:"name"`
	TangentId string        `json:"tangentId"`
	SchemaId  string        `json:"schemaId"`
	Modes     []ClockInMode `json:"modes"`
	AllowOut  bool          `json:"allowOut"`
	User      `json:"user"`
}

Group 考勤组

type Info added in v0.15.35

type Info struct {
	Id        string        `json:"id"`
	Name      string        `json:"name"`
	TangentId string        `json:"tangentId"`
	Modes     []ClockInMode `json:"modes"`
	AllowOut  bool          `json:"allowOut"`
	User      `json:"user"`
	Schema    `json:"schema"`
}

Info 考勤组信息

func GroupDetail added in v0.15.30

func GroupDetail(tangentId, id string) (*Info, error)

type MiniGroup added in v0.15.30

type MiniGroup struct {
	Id         string  `json:"id"`
	Name       string  `json:"name"`
	SchemaId   string  `json:"schemaId"`
	SchemaName string  `json:"schemaName"`
	UserNum    int     `json:"userNum"`
	TangentId  string  `json:"tangentId"`
	CreatedAt  string  `json:"createdAt"`
	ClockModes []uint8 `json:"clockMode"`
	AllowOut   bool    `json:"allowOut"`
}

type PlaceClockInSetting added in v0.15.30

type PlaceClockInSetting struct {
	Id        string  `json:"id"`
	Lat       float64 `json:"lat"`
	Lng       float64 `json:"lng"`
	ShortName string  `json:"shortName"`
	Addr      string  `json:"addr"`
	Range     int     `json:"range"`
}

PlaceClockInSetting 地点打卡配置

type Record

type Record struct {
	Id          string  `json:"id"`
	TangentId   string  `validate:"required,len=32" json:"tangentId"`
	UserId      string  `validate:"required,len=32" json:"userId"`
	CheckInTime string  `validate:"required" json:"checkInTime"`
	Img         string  `json:"img"`
	Lat         float64 `json:"lat"`
	Lng         float64 `json:"lng"`
	Addr        string  `json:"addr"`
	Type        uint8   `json:"type"`
	Status      uint8   `json:"status"`
	Remark      string  `json:"remark"`
	Way         uint8   `json:"way"`
	TimeOffset  float64 `json:"timeOffset"`
}

type RecordAddRemarkParam

type RecordAddRemarkParam struct {
	TangentId string `validate:"required,len=32" json:"tangentId"`
	RecordId  string `validate:"required,len=32" json:"recordId"`
	Remark    string `validate:"required,min=1,max=1024" json:"remark"`
}

type Resp

type Resp[T any] struct {
	Data T      `json:"data"`
	Code int    `json:"code"`
	Suc  bool   `json:"success"`
	Msg  string `json:"msg"`
}

type Result

type Result[T any] struct {
	Info       []T `json:"info"`
	TotalCount int `json:"totalCount"`
	PageNo     int `json:"pageNo"`
}

func GetBigDataRecords added in v0.15.52

func GetBigDataRecords(param GetRecordParam) (Result[Record], error)

func GetGroup added in v0.15.30

func GetGroup(param GetGroupParam) (Result[MiniGroup], error)

func GetRecords

func GetRecords(param GetRecordParam) (Result[Record], error)

func GetSchema added in v0.15.35

func GetSchema(param GetSchemaParam) (Result[Schema], error)

type Schema added in v0.15.30

type Schema struct {
	Id                          string `json:"id" form:"id"`
	Name                        string `validate:"required,min=1,max=20" json:"name" form:"name"`
	TangentId                   string `validate:"required,len=32" json:"tangentId" form:"tangentId"`
	Mode                        uint8  `validate:"required" json:"mode" form:"mode"`
	ClockInTimeEnd              string `json:"clockInTimeEnd" form:"clockInTimeEnd"`
	ClockInTimeStart            string `json:"clockInTimeStart" form:"clockInTimeStart"`
	ClockOffTimeStart           string `json:"clockOffTimeStart" form:"clockOffTimeStart"`
	ClockOffTimeEnd             string `json:"clockOffTimeEnd" form:"clockOffTimeEnd"`
	MorningWorkTimeStart        string `json:"morningWorkTimeStart" form:"morningWorkTimeStart"`
	MorningWorkTimeEnd          string `json:"morningWorkTimeEnd" form:"morningWorkTimeEnd"`
	AfternoonWorkTimeStart      string `json:"afternoonWorkTimeStart" form:"afternoonWorkTimeStart"`
	AfternoonWorkTimeEnd        string `json:"afternoonWorkTimeEnd" form:"afternoonWorkTimeEnd"`
	MorningWorkOffClockOutStart string `json:"morningWorkOffClockInStart" form:"morningWorkOffClockOutStart"`
	MorningWorkOffClockOutEnd   string `json:"morningWorkOffClockInEnd" form:"morningWorkOffClockOutEnd"`
	AfternoonWorkClockInStart   string `json:"afternoonWorkClockInStart" form:"afternoonWorkClockInStart"`
	AfternoonWorkClockInEnd     string `json:"afternoonWorkClockInEnd" form:"afternoonWorkClockInEnd"`
	Remark                      string `json:"remark" form:"remark"`
}

Schema 考勤方案

type User added in v0.15.30

type User struct {
	JoinUser []string   `json:"joinUser"`
	Ignore   []string   `json:"ignore"`
	Dept     []DeptUser `json:"dept"`
}

User 考勤人员配置

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL