12345678910111213141516171819202122232425262728293031323334353637383940 |
- // Copyright 2019 getensh.com. All rights reserved.
- // Use of this source code is governed by getensh.com.
- package handle
- import (
- "adm-dws/apis"
- "adm-dws/consts"
- "adm-dws/impl/task"
- "gorm.io/gorm"
- )
- // 处理函数的声明
- type Handler func(*gorm.DB, *apis.DwsMessage, string) ([]*apis.AdsMessage, []*apis.DwsMessage, error)
- type DwsTask struct {
- Function Handler `json:"function"` //任务处理函数
- OutputSourceCode string `json:"source_code"` // 任务输出源编码
- PrimaryKeys []string `json:"primary_keys"` // 任务输出主键
- }
- var DwsTaskMap = map[int32]DwsTask{
- 10001: {task.Dws1Task, consts.SOURCEDWS1, []string{"plate_no", "plate_type"}},
- 10002: {task.Dws2Task, consts.SOURCEDWS2, []string{"plate_no", "plate_type"}},
- 10003: {task.Dws3Task, consts.SOURCEDWS3, []string{"plate_no", "plate_type"}},
- 10004: {task.Dws4Task, consts.SOURCEDWS4, []string{"plate_no"}},
- 10005: {task.Dws5Task, consts.SOURCEDWS5, []string{"vin"}},
- 10006: {task.Dws6Task, consts.SOURCEDWS6, []string{"vin"}},
- 10007: {task.Dws7Task, consts.SOURCEDWS7, []string{"vin"}},
- 10008: {task.Dws8Task, consts.SOURCEDWS8, []string{"vin"}},
- 10009: {task.Dws9Task, consts.SOURCEDWS9, []string{"vin"}},
- 10010: {task.Dws10Task, consts.SOURCEDWS10, []string{"vin"}},
- 10011: {task.Dws11Task, consts.SOURCEDWS11, nil},
- 10012: {task.Dws12Task, consts.SOURCEDWS12, nil},
- 10013: {task.Dws13Task, consts.SOURCEDWS13, []string{"thrid_style_id"}},
- 10014: {task.Dws14Task, consts.SOURCEDWS14, nil},
- 10015: {task.Dws15Task, consts.SOURCEDWS15, []string{"id_card"}},
- 10016: {task.Dws16Task, consts.SOURCEDWS16, nil},
- 10017: {task.Dws17Task, consts.SOURCEDWS17, []string{"vin"}},
- }
|