123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- // Copyright 2019 github.com. All rights reserved.
- // Use of this source code is governed by github.com.
- package v1
- import (
- "access-control-monitor/param/base"
- )
- // 登录接口
- type LoginBody struct {
- Sn string `form:"sn" json:"sn" binding:"required"`
- }
- type LoginRequest struct {
- LoginBody
- }
- type LoginResp struct {
- Key string `json:"key"`
- }
- type LoginResponse struct {
- base.Result
- Data LoginResp `json:"data"`
- }
- // 人员上传接口
- type RegisterBody struct {
- Sn string `form:"sn" json:"sn" binding:"required"`
- WorkNo string `form:"work_no" json:"work_no"`
- CorpCode string `form:"corp_code" json:"corp_code"`
- CorpName string `form:"corp_name" json:"corp_name"`
- TeamSysNo int `form:"team_sys_no" json:"team_sys_no"`
- TeamName string `form:"team_name" json:"team_name"`
- WorkName string `form:"work_name" json:"work_name"`
- IsTeamLeader string `form:"is_team_leader" json:"is_team_leader"`
- IDCardType int `form:"id_card_type" json:"id_card_type"`
- IDCardNumber string `form:"id_card_number" json:"id_card_number"`
- Age int `form:"age" json:"age"`
- Gender string `form:"gender" json:"gender"`
- Nation int `form:"nation" json:"nation"`
- Address string `form:"address" json:"address"`
- HeadImage string `form:"head_image" json:"head_image"`
- PoliticsType int `form:"politics_type" json:"politics_type"`
- CultureLevelType int `form:"colture_level_type" json:"colture_level_type"`
- GrantOrg string `form:"grant_org" json:"grant_org"`
- WorkType string `form:"work_type" json:"work_type"`
- NativePlace string `form:"native_place" json:"native_place"`
- Mobile string `form:"mobile" json:"mobile"`
- HasContract string `form:"has_contract" json:"has_contract"`
- }
- type RegisterRequest struct {
- RegisterBody
- }
- type RegisterResponse struct {
- base.Result
- }
- // 删除员工信息
- type StaffDeleteBody struct {
- Sn string `form:"sn" json:"sn" binding:"required"`
- WorkNos []string `form:"work_nos" json:"work_nos" binding:"required"`
- //AppKey string `json:"app_key" form:"app_key" binding:"required"`
- }
- type StaffDeleteRequest struct {
- StaffDeleteBody
- }
- type StaffDeleteResp struct {
- WorkNos []string `json:"work_nos"`
- }
- type StaffDeleteResponse struct {
- base.Result
- //Data StaffDeleteResp `json:"data"`
- }
- type StaffUpdateRequest struct {
- RegisterBody
- }
- type StaffUpdateResponse struct {
- base.Result
- }
- // 上传识别结果
- type AttendanceBody struct {
- Sn string `form:"sn" json:"sn" binding:"required"`
- // json 数组 Content 里面的内容用 des 加密 deskey: 对接的时候提供,
- // 加密前格式:
- //{
- //"count": 2,
- //"logs":[
- //{"sn": "XXXX","user_id": "XXXXX","recog_time":
- //"yyyy-Mm-dd HH:mm:SS"},
- //{"sn": "XXXX","user_id": "XXXXX","recog_time": "yyyy-M
- //m-dd HH:mm:SS"}
- //] }
- //AppKey string `form:"app_key" json:"app_key" binding:"required"`
- TeamSysNo int `form:"team_sys_no" json:"team_sys_no"`
- TeamName string `form:"team_name" json:"team_name"`
- WorkName string `form:"work_name" json:"work_name"`
- IDCardType int `form:"id_card_type" json:"id_card_type"`
- IDCardNumber string `form:"id_card_number" json:"id_card_number"`
- Datetime string `form:"datetime" json:"datetime"`
- Direction int `form:"direction" json:"direction"`
- WorkNo string `form:"work_no" json:"work_no"`
- }
- type AttendanceRequest struct {
- AttendanceBody
- }
- type AttendanceResponse struct {
- base.Result
- }
- // 人员批量下发
- type BatchDownload struct {
- Name string `json:"name"`
- WorkNo string `json:"work_no"`
- IdCert string `json:"id_cert"`
- Photo string `json:"photo"`
- }
- type BatchDownloadQuery struct {
- Sn string `json:"sn" form:"sn" binding:"required"`
- //AppKey string `json:"app_key" form:"app_key" binding:"required"`
- }
- type BatchDownloadRequet struct {
- BatchDownloadQuery
- }
- type BatchDownloadResponse struct {
- base.Result
- Data []BatchDownload `json:"data"`
- }
- // 反馈接口
- type FeedBackBody struct {
- Sn string `form:"sn" json:"sn" binding:"required"`
- //AppKey string `form:"app_key" json:"app_key" binding:"required"`
- // 反馈类型:
- //0-人员删除成功,
- //1-人员删除失败,
- //2-人员下发成功,
- //3-人员下发失败
- Type int `form:"type" json:"type" binding:"required"`
- Msg string `form:"msg" json:"msg" binding:"required"`
- }
- type FeedBackRequet struct {
- FeedBackBody
- }
- type FeedBackResponse struct {
- // 返回类型: -3(反馈类型不能为空),-2(设备序
- //列号不存在), -1(服务器异常-失败), 0(空闲
- //-成功)
- base.Result
- }
- type PingRequest struct {
- PingBody
- }
- type PingBody struct {
- Sn string `form:"sn" json:"sn" binding:"required"`
- }
- type PingResponse struct {
- base.Result
- }
- type TeamInfoBody struct {
- Sn string `form:"sn" json:"sn"`
- TeamSysNo int `form:"team_sys_no" json:"team_sys_no"`
- CorpCode string `form:"corp_code" json:"corp_code"`
- CorpName string `form:"corp_name" json:"corp_name"`
- TeamName string `form:"team_name" json:"team_name"`
- TeamLeaderName string `form:"team_leader_name" json:"team_leader_name"`
- TeamLeaderPhone string `form:"team_leader_phone" json:"team_leader_phone"`
- Remark string `form:"remark" json:"remark"`
- }
- type TeamInfoRequest struct {
- TeamInfoBody
- }
- type TeamInfoResponse struct {
- base.Result
- }
- type TeamDeleteBody struct {
- Sn string `form:"sn" json:"sn"`
- TeamSysNos []int `form:"team_sys_nos" json:"team_sys_nos"`
- }
- type TeamDeleteRequest struct {
- TeamDeleteBody
- }
- type TeamDeleteResponse struct {
- base.Result
- }
- type TeamUpdateRequest struct {
- TeamInfoBody
- }
- type TeamUpdateResponse struct {
- base.Result
- }
|