util

package
v0.0.0-...-41f1090 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GSHA1 = "gsha1"
	MD5   = "md5"
)

Variables

This section is empty.

Functions

func CheckIn

func CheckIn(lists []uint, id uint) bool

func CheckInStr

func CheckInStr(lists []string, id string) bool

func Decimal

func Decimal(value float64) float64

func DecimalLong

func DecimalLong(value float64, len int) float64

func DeleteInt32Slice

func DeleteInt32Slice(a []int32) []int32

func DeleteIntSlice

func DeleteIntSlice(a []string) []string

func Encrypt

func Encrypt(str string) string

func ExportExcel

func ExportExcel(titleList []string, data []map[string]interface{}, sheetName, filepath string) error

func GetArith

func GetArith(name string) inspirit.ArithEnum

func GetEmployAttribute

func GetEmployAttribute(name string) uint

func GetEmployAttributeId

func GetEmployAttributeId(name uint) string

func GetEmploySex

func GetEmploySex(name v1.SexEnum) string

func GetEmployStatus

func GetEmployStatus(name v1.StatusEnum) string

GetEmployStatus '在职状态(1:在职 2:试用期 3:实习期 4:已离职)',

func GetFloatKeyProperty

func GetFloatKeyProperty(floatRaio float64) uint

GetFloatKeyProperty 1:正向激励 2:有待提高

func GetFloatKeyType

func GetFloatKeyType(name string) uint

func GetHoursIndexByScore

func GetHoursIndexByScore(lists []*inspirit.CrewHoursIndexInfo, score float32) uint32

func GetIsGuide

func GetIsGuide(name uint) string

func GetKpiRuleByScore

func GetKpiRuleByScore(lists []*inspirit.CrewKpiRuleInfo, score uint) uint

func GetLevelAssessByScore

func GetLevelAssessByScore(lists []*inspirit.BudgetAssessInfo, score uint32) *inspirit.BudgetAssessInfo

func GetLevelConfirmByScore

func GetLevelConfirmByScore(lists []*product.LevelConfirmInfo, score uint) *product.LevelConfirmInfo

func GetListWithPage

func GetListWithPage(query *gdb.Model, page, size int32) (*gdb.Model, int32, int32, int32, error)

func GetTaskStatusChangeMsg

func GetTaskStatusChangeMsg(name, taskName, taskDesc string, before, later int) string

func GetUserRequestTypeName

func GetUserRequestTypeName(methodName uint, requestModuleLists []string) string

func Letter

func Letter(length int) []string

Letter 遍历a-z

func SetCellValue

func SetCellValue(ctx context.Context, data []map[string]interface{}, productName string, titleList []string) (string, error)

SetCellValue 保存Excel文件

Types

type ExcelDataFormat

type ExcelDataFormat struct {
	A interface{}
	B interface{}
	C interface{}
	D interface{}
	E interface{}
	F interface{}
	G interface{}
	H interface{}
	I interface{}
	J interface{}
	K interface{}
	L interface{}
	M interface{}
	N interface{}
	O interface{}
}

ExcelDataFormat excel文件处理

func ReadExcel

func ReadExcel(fileInfo multipart.File) ([]ExcelDataFormat, error)

ReadExcel .读取excel 转成切片 func ReadExcel(xlsx *excelize.File) ([]LxProduct, error) {

Jump to

Keyboard shortcuts

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