123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- // Copyright 2019 getensh.com. All rights reserved.
- // Use of this source code is governed by getensh.com.
- package handle
- import (
- "adm-ods/apis"
- "adm-ods/consts"
- "adm-ods/impl/analysis"
- )
- // 处理函数的声明
- type Handler func(*apis.OdsMessage) ([]map[string]string, error)
- type ParasHandler func(string) ([]map[string]string, error)
- type ProviderLogTask struct {
- OnlineFunction Handler
- ParasFunction ParasHandler
- }
- // 声明在线任务
- var OdsOnlineTaskMap = map[string]ProviderLogTask{
- consts.SOURCEODS1: {analysis.HandleOnlineOds1, analysis.ParasOds1},
- consts.SOURCEODS2: {analysis.HandleOnlineOds2, analysis.ParasOds2},
- consts.SOURCEODS3: {analysis.HandleOnlineOds3, analysis.ParasOds3},
- consts.SOURCEODS4: {analysis.HandleOnlineOds4, analysis.ParasOds4},
- consts.SOURCEODS5: {analysis.HandleOnlineOds5, analysis.ParasOds5},
- consts.SOURCEODS6: {analysis.HandleOnlineOds6, analysis.ParasOds6},
- consts.SOURCEODS7: {analysis.HandleOnlineOds7, analysis.ParasOds7},
- consts.SOURCEODS8: {analysis.HandleOnlineOds8, analysis.ParasOds8},
- consts.SOURCEODS9: {analysis.HandleOnlineOds9, analysis.ParasOds9},
- consts.SOURCEODS10: {analysis.HandleOnlineOds10, analysis.ParasOds10},
- consts.SOURCEODS11: {analysis.HandleOnlineOds11, analysis.ParasOds11},
- consts.SOURCEODS12: {analysis.HandleOnlineOds12, analysis.ParasOds12},
- consts.SOURCEODS13: {analysis.HandleOnlineOds13, analysis.ParasOds13},
- consts.SOURCEODS15: {analysis.HandleOnlineOds15, analysis.ParasOds15},
- consts.SOURCEODS16: {analysis.HandleOnlineOds16, analysis.ParasOds16},
- consts.SOURCEODS17: {analysis.HandleOnlineOds17, analysis.ParasOds12},
- consts.SOURCEODS18: {analysis.HandleOnlineOds18, analysis.ParasOds18},
- }
- // 声明数据源编码到源编码映射
- var ProviderApiCodeToSoucreCodeMap = map[string]string{
- consts.CXYVIOLATION: consts.SOURCEODS1,
- consts.ZQYPLATEVEHICLE: consts.SOURCEODS2,
- consts.ZQYVINVEHICLE: consts.SOURCEODS3,
- consts.ZQYINSUREDATE: consts.SOURCEODS4,
- consts.SPYDEFINEVIN: consts.SOURCEODS5,
- consts.SPYVINNEW: consts.SOURCEODS16,
- consts.SPYTWODATE: consts.SOURCEODS6,
- consts.SPYTWODATE2: consts.SOURCEODS6,
- consts.SPYTRANSFERRECORD: consts.SOURCEODS7,
- consts.SPYINSUREDATE: consts.SOURCEODS8,
- consts.SPYTRANSFERBYVIN: consts.SOURCEODS9,
- consts.SPYTWOELEMENTVERIFY: consts.SOURCEODS10,
- consts.DRVVEHICLEOWNERVERIFY: consts.SOURCEODS11,
- consts.DRVVEHICLEOWNERVERIFYBAK: consts.SOURCEODS11,
- consts.ZCRKTWOELEMENTVERIFY: consts.SOURCEODS12,
- consts.ZCRKTWOELEMENTVERIFY2: consts.SOURCEODS17,
- consts.ZJCVEHICLEOWNER: consts.SOURCEODS13,
- consts.DYIDCERTVERIFY: consts.SOURCEODS15,
- consts.ZCRKENGINENO: consts.SOURCEODS18,
- }
|