yaar.go 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package common
  2. import (
  3. "git.listensoft.net/tool/jspkit/common/models"
  4. "git.listensoft.net/tool/jspkit/common/variable"
  5. "github.com/tidwall/gjson"
  6. )
  7. func GetYearSbTables(task *models.TaxTask, tables interface{}) {
  8. if ok := gjson.Get(task.Data, `a000000`).Raw; ok != "" {
  9. tables.(map[variable.SbKey]bool)[variable.A000000] = true
  10. }
  11. if ok := gjson.Get(task.Data, `a000000Gd`).Raw; ok != "" {
  12. tables.(map[variable.SbKey]bool)[variable.A000000Gd] = true
  13. }
  14. if ok := gjson.Get(task.Data, `a100000`).Raw; ok != "" {
  15. tables.(map[variable.SbKey]bool)[variable.A100000] = true
  16. }
  17. if ok := gjson.Get(task.Data, `a101010`).Raw; ok != "" {
  18. tables.(map[variable.SbKey]bool)[variable.A101010] = true
  19. }
  20. if ok := gjson.Get(task.Data, `a102010`).Raw; ok != "" {
  21. tables.(map[variable.SbKey]bool)[variable.A102010] = true
  22. }
  23. if ok := gjson.Get(task.Data, `a104000`).Raw; ok != "" {
  24. tables.(map[variable.SbKey]bool)[variable.A104000] = true
  25. }
  26. if ok := gjson.Get(task.Data, `a105000`).Raw; ok != "" {
  27. tables.(map[variable.SbKey]bool)[variable.A105000] = true
  28. }
  29. if ok := gjson.Get(task.Data, `a105050`).Raw; ok != "" {
  30. tables.(map[variable.SbKey]bool)[variable.A105050] = true
  31. }
  32. if ok := gjson.Get(task.Data, `a105060`).Raw; ok != "" {
  33. tables.(map[variable.SbKey]bool)[variable.A105060] = true
  34. }
  35. if ok := gjson.Get(task.Data, `a105080`).Raw; ok != "" {
  36. tables.(map[variable.SbKey]bool)[variable.A105080] = true
  37. }
  38. if ok := gjson.Get(task.Data, `a106000`).Raw; ok != "" {
  39. tables.(map[variable.SbKey]bool)[variable.A106000] = true
  40. }
  41. if ok := gjson.Get(task.Data, `a107010`).Raw; ok != "" {
  42. tables.(map[variable.SbKey]bool)[variable.A107010] = true
  43. }
  44. if ok := gjson.Get(task.Data, `a107040`).Raw; ok != "" {
  45. tables.(map[variable.SbKey]bool)[variable.A107040] = true
  46. }
  47. }