common.go 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // Copyright 2019 autocareai.com. All rights reserved.
  2. // Use of this source code is governed by autocareai.com.
  3. package handle
  4. import (
  5. "gadm-ods/apis"
  6. "gadm-ods/consts"
  7. "gadm-ods/impl/analysis"
  8. )
  9. // 处理函数的声明
  10. type Handler func(*apis.OdsMessage) ([]map[string]string, error)
  11. type ParasHandler func(string) ([]map[string]string, error)
  12. type ProviderLogTask struct {
  13. OnlineFunction Handler
  14. ParasFunction ParasHandler
  15. }
  16. // 声明在线任务
  17. var OdsOnlineTaskMap = map[string]ProviderLogTask{
  18. /*consts.SOURCEODS1: {analysis.HandleOnlineOds1, analysis.ParasOds1},
  19. consts.SOURCEODS5: {analysis.HandleOnlineOds5, analysis.ParasOds5},
  20. consts.SOURCEODS6: {analysis.HandleOnlineOds6, analysis.ParasOds6},
  21. consts.SOURCEODS7: {analysis.HandleOnlineOds7, analysis.ParasOds7},
  22. consts.SOURCEODS8: {analysis.HandleOnlineOds8, analysis.ParasOds8},
  23. consts.SOURCEODS9: {analysis.HandleOnlineOds9, analysis.ParasOds9},
  24. consts.SOURCEODS10: {analysis.HandleOnlineOds10, analysis.ParasOds10},
  25. consts.SOURCEODS11: {analysis.HandleOnlineOds11, analysis.ParasOds11},
  26. consts.SOURCEODS12: {analysis.HandleOnlineOds12, analysis.ParasOds12},
  27. consts.SOURCEODS13: {analysis.HandleOnlineOds13, analysis.ParasOds13},*/
  28. //consts.SOURCEODS1: {analysis.HandleOnlineOds1, analysis.ParasOds1},
  29. //consts.SOURCEODS2: {analysis.HandleOnlineOds2, analysis.ParasOds2},
  30. consts.SOURCEODS3: {analysis.HandleOnlineOds3, analysis.ParasOds3},
  31. consts.SOURCEODS4: {analysis.HandleOnlineOds4, analysis.ParasOds4},
  32. consts.SOURCEODS8: {analysis.HandleOnlineOds8, analysis.ParasOds8},
  33. //consts.SOURCEODS5: {analysis.HandleOnlineOds5, analysis.ParasOds5},
  34. //consts.SOURCEODS6: {analysis.HandleOnlineOds6, analysis.ParasOds6},
  35. //consts.SOURCEODS7: {analysis.HandleOnlineOds7, analysis.ParasOds7},
  36. /*consts.SOURCEODS16: {analysis.HandleOnlineOds16, analysis.ParasOds16},
  37. consts.SOURCEODS17: {analysis.HandleOnlineOds17, analysis.ParasOds12},
  38. consts.SOURCEODS18: {analysis.HandleOnlineOds18, analysis.ParasOds18},
  39. consts.SOURCEODS19: {analysis.HandleOnlineOds19, analysis.ParasOds19},*/
  40. }
  41. // 声明数据源编码到源编码映射
  42. var ProviderApiCodeToSoucreCodeMap = map[string]string{
  43. /*consts.CXYVIOLATION: consts.SOURCEODS1,
  44. consts.ZQYPLATEVEHICLE: consts.SOURCEODS2,
  45. consts.ZQYVINVEHICLE: consts.SOURCEODS3,
  46. consts.ZQYINSUREDATE: consts.SOURCEODS4,
  47. consts.SPYDEFINEVIN: consts.SOURCEODS5,
  48. consts.SPYVINNEW: consts.SOURCEODS16,
  49. consts.SPYTWODATE: consts.SOURCEODS6,
  50. consts.SPYTWODATE2: consts.SOURCEODS6,
  51. consts.SPYTRANSFERRECORD: consts.SOURCEODS7,
  52. consts.SPYINSUREDATE: consts.SOURCEODS8,
  53. consts.SPYTRANSFERBYVIN: consts.SOURCEODS9,
  54. consts.SPYTWOELEMENTVERIFY: consts.SOURCEODS10,
  55. consts.DRVVEHICLEOWNERVERIFY: consts.SOURCEODS11,
  56. consts.DRVVEHICLEOWNERVERIFYBAK: consts.SOURCEODS11,
  57. consts.ZCRKTWOELEMENTVERIFY: consts.SOURCEODS12,
  58. consts.ZCRKTWOELEMENTVERIFY2: consts.SOURCEODS17,
  59. consts.ZJCVEHICLEOWNER: consts.SOURCEODS13,*/
  60. //consts.DYIDCERTVERIFY: consts.SOURCEODS1,
  61. //consts.CDBDTWOELEMENTVERIFY: consts.SOURCEODS2,
  62. consts.ZRTWOELEMENTVERIFYNATIONAL: consts.SOURCEODS3,
  63. consts.ZRVEHICLEVIN: consts.SOURCEODS4,
  64. consts.ZRVEHICLEFIVE: consts.SOURCEODS4,
  65. consts.ZRVEHICLEINFO: consts.SOURCEODS8,
  66. //consts.DYXW: consts.SOURCEODS5,
  67. //consts.DYXL: consts.SOURCEODS6,
  68. //consts.DYXLALL: consts.SOURCEODS7,
  69. /*consts.ZCRKENGINENO: consts.SOURCEODS18,
  70. consts.ZCRKBYVIN: consts.SOURCEODS19,*/
  71. }