mbjm

package
v0.15.18 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignIdentity

func AssignIdentity(tangentID string, userID string, identification uint8) error

func ChangeIdentity

func ChangeIdentity(tangentID string, userID string, identification uint8) error

func ClearIdentity

func ClearIdentity(tangentID string, userID string) error

func DeletePoster

func DeletePoster(posterID string) error

func DeleteQrPoster

func DeleteQrPoster(qrPosterID string) error

func Destroy

func Destroy()

func DriverScanQr

func DriverScanQr(params *DriverScanQrParams) error

func EpidemicQuery

func EpidemicQuery() (bool, bool, error)

func GenerateCarQrPoster

func GenerateCarQrPoster(params GenerateCarQrPosterParams) (string, error)

func GenerateStationQrPoster

func GenerateStationQrPoster(params *GenerateStationQrPosterParams) (string, error)

func Init

func Init(baseUrl string, timeoutSec time.Duration)

func PassengerScanQr

func PassengerScanQr(params *PassengerScanQrParams) error

func SavePoster

func SavePoster(name string, objName string) error

func UpdatePoster

func UpdatePoster(id string, objName string, name string) error

func UpdateQrPoster

func UpdateQrPoster(tangentID string, id string, plateNumber string, originPlace string,
	terminus string, stationName string, posterID string) error

func UploadDriverNucleicAcid

func UploadDriverNucleicAcid(photo *multipart.FileHeader) (string, string, error)

func UploadPassengerNucleicAcid

func UploadPassengerNucleicAcid(photo *multipart.FileHeader) (string, string, error)

func UploadPoster

func UploadPoster(poster *multipart.FileHeader) (string, string, error)

func UploadSuperviseDisinfectPhoto

func UploadSuperviseDisinfectPhoto(photo *multipart.FileHeader, watermark string) (string, string, error)

func UploadWorkerNucleicAcid

func UploadWorkerNucleicAcid(photo *multipart.FileHeader) (string, string, error)

func WorkerScanQr

func WorkerScanQr(params *WorkerScanQrParams) error

Types

type AssignIdentityRequest

type AssignIdentityRequest struct {
	TangentID      string `json:"tangentId"`
	UserID         string `json:"userId"`
	Identification uint8  `json:"identification"`
}

type CarRecordInfo

type CarRecordInfo struct {
	ID            string `json:"id"`
	PlateNumber   string `json:"plateNumber"`
	OriginPlace   string `json:"originPlace"`
	Terminus      string `json:"terminus"`
	DepartureTime string `json:"departureTime"`
	PassengerNum  int    `json:"passengerNum"`
}

func GetCarRecord

func GetCarRecord(plateNumber string, originPlace string, terminus string, startTime string,
	endTime string, pageNo int, pageSize int) ([]CarRecordInfo, int64, error)

type ChangeIdentityRequest

type ChangeIdentityRequest struct {
	TangentID      string `json:"tangentId"`
	UserID         string `json:"userId"`
	Identification uint8  `json:"identification"`
}

type ClearIdentityRequest

type ClearIdentityRequest struct {
	TangentID string `json:"tangentId"`
	UserID    string `json:"userId"`
}

type DriverScanQrParams

type DriverScanQrParams struct {
	Name                          string
	IDCard                        string
	Phone                         string
	UserID                        string
	PlateNumber                   string
	OriginPlace                   string
	Address                       string
	Longitude                     float64
	Latitude                      float64
	QrID                          string
	Terminus                      string
	Temperature                   float64
	CompanyID                     string
	CompanyName                   string
	WearMask                      bool
	OutsideProvinceSojournHistory bool
	BeenEpidemicArea              bool
	SuperviseDisinfectName        string
	SuperviseDisinfectPhoto       string
	YunCheng                      bool
	NucleicAcids                  []string
}

type DriverScanQrRecordInfo

type DriverScanQrRecordInfo struct {
	ID                            string    `json:"id"`
	Name                          string    `json:"name"`
	IDCard                        string    `json:"idCard"`
	Phone                         string    `json:"phone"`
	UserID                        string    `json:"userId"`
	PlateNumber                   string    `json:"plateNumber"`
	OriginPlace                   string    `json:"originPlace"`
	Terminus                      string    `json:"terminus"`
	Address                       string    `json:"address"`
	Longitude                     float64   `json:"longitude"`
	Latitude                      float64   `json:"latitude"`
	ScanTime                      string    `json:"scanTime"`
	Temperature                   float64   `json:"temperature"`
	CompanyID                     string    `json:"companyId"`
	CompanyName                   string    `json:"companyName"`
	WearMask                      bool      `json:"wearMask"`
	OutsideProvinceSojournHistory bool      `json:"outsideProvinceSojournHistory"`
	BeenEpidemicArea              bool      `json:"beenEpidemicArea"`
	SuperviseDisinfectName        string    `json:"superviseDisinfectName"`
	SuperviseDisinfectPhoto       *PicInfo  `json:"superviseDisinfectPhoto"`
	YunCheng                      bool      `json:"yunCheng"`
	NucleicAcids                  []PicInfo `json:"nucleicAcids"`
	ScanType                      uint8     `json:"scanType"`
}

func GetDriverScanQrRecord

func GetDriverScanQrRecord(userID string, plateNumber string, originPlace string, terminus string, scanStartTime string,
	scanEndTime string, pageNo int, pageSize int) ([]DriverScanQrRecordInfo, int64, error)

type DriverScanQrRequest

type DriverScanQrRequest struct {
	Name                          string   `json:"name" binding:"required"`
	IDCard                        string   `json:"idCard" binding:"required"`
	Phone                         string   `json:"phone" binding:"required"`
	UserID                        string   `json:"userId" binding:"required"`
	PlateNumber                   string   `json:"plateNumber" binding:"required"`
	OriginPlace                   string   `json:"originPlace" binding:"required"`
	Address                       string   `json:"address" binding:"required"`
	Longitude                     float64  `json:"longitude" binding:"required"`
	Latitude                      float64  `json:"latitude" binding:"required"`
	QrID                          string   `json:"qrId" binding:"required"`
	Terminus                      string   `json:"terminus" binding:"required"`
	Temperature                   float64  `json:"temperature" binding:"required"`
	CompanyID                     string   `json:"companyId" binding:"required"`
	CompanyName                   string   `json:"companyName" binding:"required"`
	WearMask                      bool     `json:"wearMask" binding:"required"`
	OutsideProvinceSojournHistory bool     `json:"outsideProvinceSojournHistory" binding:"required"`
	BeenEpidemicArea              bool     `json:"beenEpidemicArea" binding:"required"`
	SuperviseDisinfectName        string   `json:"superviseDisinfectName" binding:"required"`
	SuperviseDisinfectPhoto       string   `json:"superviseDisinfectPhoto" binding:"required"`
	YunCheng                      bool     `json:"yunCheng" binding:"required"`
	NucleicAcids                  []string `json:"nucleicAcids"`
}

type EpidemicQueryResponse

type EpidemicQueryResponse struct {
	Coming   bool `json:"coming"`
	YunCheng bool `json:"yunCheng"`
	// contains filtered or unexported fields
}

type GenerateCarQrPosterParams

type GenerateCarQrPosterParams struct {
	TangentID   string
	AppID       string
	AppSecret   string
	Page        string
	PosterID    string
	PlateNumber string
	OriginPlace string
	Terminus    string
}

type GenerateCarQrPosterRequest

type GenerateCarQrPosterRequest struct {
	TangentID   string `json:"tangentId"`
	AppID       string `json:"appId"`
	AppSecret   string `json:"appSecret"`
	Page        string `json:"page"`
	PosterID    string `json:"posterId"`
	PlateNumber string `json:"plateNumber"`
	OriginPlace string `json:"originPlace"`
	Terminus    string `json:"terminus"`
}

type GenerateCarQrPosterResponse

type GenerateCarQrPosterResponse struct {
	Url string `json:"url"`
	// contains filtered or unexported fields
}

type GenerateStationQrPosterParams

type GenerateStationQrPosterParams struct {
	TangentID string
	AppID     string
	AppSecret string
	Page      string
	PosterID  string
	Station   string
	Arrival   bool
}

type GenerateStationQrPosterRequest

type GenerateStationQrPosterRequest struct {
	TangentID string `json:"tangentId"`
	AppID     string `json:"appId"`
	AppSecret string `json:"appSecret"`
	Page      string `json:"page"`
	PosterID  string `json:"posterId"`
	Station   string `json:"station"`
	Arrival   bool   `json:"arrival"`
}

type GenerateStationQrPosterResponse

type GenerateStationQrPosterResponse struct {
	Url string `json:"url"`
	// contains filtered or unexported fields
}

type GetCarRecordResponse

type GetCarRecordResponse struct {
	Infos      []CarRecordInfo `json:"infos"`
	TotalCount int64           `json:"totalCount"`
	PageNo     int             `json:"pageNo"`
	// contains filtered or unexported fields
}

type GetDriverScanQrRecordResponse

type GetDriverScanQrRecordResponse struct {
	Infos      []DriverScanQrRecordInfo `json:"infos"`
	TotalCount int64                    `json:"totalCount"`
	PageNo     int                      `json:"pageNo"`
	// contains filtered or unexported fields
}

type GetPassengerScanQrRecordResponse

type GetPassengerScanQrRecordResponse struct {
	Infos      []PassengerScanQrRecordInfo `json:"infos"`
	TotalCount int64                       `json:"totalCount"`
	PageNo     int                         `json:"pageNo"`
	// contains filtered or unexported fields
}

type GetPosterResponse

type GetPosterResponse struct {
	Infos      []PosterInfo `json:"infos"`
	TotalCount int64        `json:"totalCount"`
	PageNo     int          `json:"pageNo"`
	// contains filtered or unexported fields
}

type GetQrPosterResponse

type GetQrPosterResponse struct {
	Info *QrPosterInfo `json:"info"`
	// contains filtered or unexported fields
}

type GetQrPostersResponse

type GetQrPostersResponse struct {
	Infos      []QrPosterInfo `json:"infos"`
	TotalCount int64          `json:"totalCount"`
	PageNo     int            `json:"pageNo"`
	// contains filtered or unexported fields
}

type GetTencentAddrResponse

type GetTencentAddrResponse struct {
	Address string `json:"address"`
	// contains filtered or unexported fields
}

type GetUserIdentityQuery

type GetUserIdentityQuery struct {
	TangentID string `form:"tangentId" binding:"required"`
	UserID    string `form:"userId" binding:"required"`
}

type GetUserIdentityResponse

type GetUserIdentityResponse struct {
	Infos []IdentityInfo `json:"infos"`
	// contains filtered or unexported fields
}

type GetWorkerScanQrRecordResponse

type GetWorkerScanQrRecordResponse struct {
	Infos      []WorkerScanQrRecordInfo `json:"infos"`
	TotalCount int64                    `json:"totalCount"`
	PageNo     int                      `json:"pageNo"`
	// contains filtered or unexported fields
}

type IdentityInfo

type IdentityInfo struct {
	Identification uint8 `json:"identification"`
	Primary        bool  `json:"primary"`
}

func GetUserIdentity

func GetUserIdentity(tangentID string, userID string) ([]IdentityInfo, error)

type PassengerScanQrParams

type PassengerScanQrParams struct {
	Name                          string
	IDCard                        string
	UserID                        string
	Phone                         string
	Temperature                   float64
	QrID                          string
	Address                       string
	Longitude                     float64
	Latitude                      float64
	WithChild                     string
	WithOld                       string
	WearMask                      bool
	OutsideProvinceSojournHistory bool
	BeenEpidemicArea              bool
	YunCheng                      bool
	NucleicAcids                  []string
}

type PassengerScanQrRecordInfo

type PassengerScanQrRecordInfo struct {
	ID                            string    `json:"id"`
	Name                          string    `json:"name"`
	IDCard                        string    `json:"IDCard"`
	Phone                         string    `json:"phone"`
	Temperature                   float64   `json:"temperature"`
	Address                       string    `json:"address"`
	Longitude                     float64   `json:"longitude"`
	Latitude                      float64   `json:"latitude"`
	WithChild                     string    `json:"withChild"`
	WithOld                       string    `json:"withOld"`
	ScanTime                      string    `json:"scanTime"`
	WearMask                      bool      `json:"wearMask"`
	OutsideProvinceSojournHistory bool      `json:"outsideProvinceSojournHistory"`
	BeenEpidemicArea              bool      `json:"beenEpidemicArea"`
	YunCheng                      bool      `json:"yunCheng"`
	NucleicAcids                  []PicInfo `json:"nucleicAcids"`
	ScanType                      uint8     `json:"scanType"`
}

func GetPassengerScanQrRecord

func GetPassengerScanQrRecord(userID string, name string, idCard string, scanStartTime string, scanEndTime string,
	driverScanRecordID string, pageNo int, pageSize int) ([]PassengerScanQrRecordInfo, int64, error)

type PassengerScanQrRequest

type PassengerScanQrRequest struct {
	Name                          string   `json:"name" binding:"required"`
	IDCard                        string   `json:"idCard" binding:"required"`
	Phone                         string   `json:"phone" binding:"required"`
	UserID                        string   `json:"userId"`
	Temperature                   float64  `json:"temperature" binding:"required"`
	QrID                          string   `json:"qrId" binding:"required"`
	Address                       string   `json:"address" binding:"required"`
	Longitude                     float64  `json:"longitude" binding:"required"`
	Latitude                      float64  `json:"latitude" binding:"required"`
	WithChild                     string   `json:"withChild" binding:"required"`
	WithOld                       string   `json:"withOld" binding:"required"`
	WearMask                      bool     `json:"wearMask" binding:"required"`
	OutsideProvinceSojournHistory bool     `json:"outsideProvinceSojournHistory" binding:"required"`
	BeenEpidemicArea              bool     `json:"beenEpidemicArea" binding:"required"`
	YunCheng                      bool     `json:"yunCheng" binding:"required"`
	NucleicAcids                  []string `json:"nucleicAcids" binding:"required"`
}

type PicInfo

type PicInfo struct {
	Url     string `json:"url"`
	ObjName string `json:"objName"`
}

type PosterInfo

type PosterInfo struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Url  string `json:"url"`
}

func GetPoster

func GetPoster(name string, pageNo int, pageSize int) ([]PosterInfo, int64, error)

type QrPosterInfo

type QrPosterInfo struct {
	ID          string `json:"id"`
	Type        uint8  `json:"type"`
	PlateNumber string `json:"plateNumber"`
	OriginPlace string `json:"originPlace"`
	Terminus    string `json:"terminus"`
	StationName string `json:"stationName"`
	PosterID    string `json:"posterId"`
	Url         string `json:"url"`
	TangentID   string `json:"tangentId"`
}

func GetQrPoster

func GetQrPoster(id string) (*QrPosterInfo, error)

func GetQrPosters

func GetQrPosters(tangentID string, station string, t uint8, pageNo int, pageSize int) ([]QrPosterInfo, int64, error)

type SavePosterRequest

type SavePosterRequest struct {
	Name    string `json:"name" binding:"required"`
	ObjName string `json:"objName" binding:"required"`
}

type UpdatePosterRequest

type UpdatePosterRequest struct {
	ID      string `json:"id"`
	ObjName string `json:"objName"`
	Name    string `json:"name"`
}

type UpdateQrPosterRequest

type UpdateQrPosterRequest struct {
	ID          string `json:"id"`
	PlateNumber string `json:"plateNumber"`
	OriginPlace string `json:"originPlace"`
	Terminus    string `json:"terminus"`
	StationName string `json:"stationName"`
	PosterID    string `json:"posterId"`
	TangentID   string `json:"tangentId"`
}

type UploadNucleicAcidRequest

type UploadNucleicAcidRequest struct {
	Photo *multipart.FileHeader `form:"photo"`
}

type UploadNucleicAcidResponse

type UploadNucleicAcidResponse struct {
	Url     string `json:"url"`
	ObjName string `json:"objName"`
	// contains filtered or unexported fields
}

type UploadPosterRequest

type UploadPosterRequest struct {
	Poster *multipart.FileHeader `form:"poster"`
}

type UploadPosterResponse

type UploadPosterResponse struct {
	ObjName string `json:"objName"`
	Url     string `json:"url"`
	// contains filtered or unexported fields
}

type UploadSuperviseDisinfectPhotoResponse

type UploadSuperviseDisinfectPhotoResponse struct {
	Url     string `json:"url"`
	ObjName string `json:"objName"`
	// contains filtered or unexported fields
}

type WorkerScanQrParams

type WorkerScanQrParams struct {
	Name                          string
	Phone                         string
	IDCard                        string
	UserID                        string
	Temperature                   float64
	Address                       string
	Longitude                     float64
	Latitude                      float64
	YunCheng                      bool
	QrID                          string
	WearMask                      bool
	OutsideProvinceSojournHistory bool
	BeenEpidemicArea              bool
	NucleicAcids                  []string
}

type WorkerScanQrRecordInfo

type WorkerScanQrRecordInfo struct {
	ID                            string    `json:"id"`
	Name                          string    `json:"name"`
	Phone                         string    `json:"phone"`
	IDCard                        string    `json:"idCard"`
	Temperature                   float64   `json:"temperature"`
	StationName                   string    `json:"stationName"`
	Address                       string    `json:"address"`
	Longitude                     float64   `json:"longitude"`
	Latitude                      float64   `json:"latitude"`
	ScanTime                      string    `json:"scanTime"`
	YunCheng                      bool      `json:"yunCheng"`
	WearMask                      bool      `json:"wearMask"`
	OutsideProvinceSojournHistory bool      `json:"outsideProvinceSojournHistory"`
	BeenEpidemicArea              bool      `json:"beenEpidemicArea"`
	NucleicAcids                  []PicInfo `json:"nucleicAcids"`
	ScanType                      uint8     `json:"scanType"`
	OnDuty                        bool      `json:"onDuty"`
}

func GetWorkerScanQrRecord

func GetWorkerScanQrRecord(userID string, name string, idCard string, scanStartTime string, scanEndTime string,
	stationName string, pageNo int, pageSize int) ([]WorkerScanQrRecordInfo, int64, error)

type WorkerScanQrRequest

type WorkerScanQrRequest struct {
	Name                          string   `json:"name"`
	Phone                         string   `json:"phone"`
	UserID                        string   `json:"userId"`
	IDCard                        string   `json:"idCard"`
	Temperature                   float64  `json:"temperature"`
	Address                       string   `json:"address"`
	Longitude                     float64  `json:"longitude"`
	Latitude                      float64  `json:"latitude"`
	YunCheng                      bool     `json:"yunCheng"`
	QrID                          string   `json:"qrId"`
	WearMask                      bool     `json:"wearMask"`
	OutsideProvinceSojournHistory bool     `json:"outsideProvinceSojournHistory"`
	BeenEpidemicArea              bool     `json:"beenEpidemicArea"`
	NucleicAcids                  []string `json:"nucleicAcids"`
	OnDuty                        bool     `json:"onDuty"`
}

Jump to

Keyboard shortcuts

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