calc.go 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. package calc
  2. type CustomizePrice struct {
  3. Build float64 `json:"build"`
  4. BuildPrice CustomizeBuildPrice `json:"build_price"`
  5. Design float64 `json:"design"`
  6. MaterialAdd float64 `json:"material_add"`
  7. MaterialDel float64 `json:"material_del"`
  8. MaterialUpgrade float64 `json:"material_upgrade"`
  9. Manage float64 `json:"manage"`
  10. Transport float64 `json:"transport"`
  11. Sanitation float64 `json:"sanitation"`
  12. Cost float64 `json:"cost"`
  13. Total float64 `json:"total"`
  14. }
  15. type CustomizeBuildPrice struct {
  16. Direct float64 `json:"direct"`
  17. Manage float64 `json:"manage"`
  18. Transport float64 `json:"transport"`
  19. Sanitation float64 `json:"sanitation"`
  20. Total float64 `json:"total"`
  21. }
  22. type InclusivePrice struct {
  23. Diy float64 `json:"diy"`
  24. Furniture float64 `json:"furniture"`
  25. Lamp float64 `json:"lamp"`
  26. Curtain float64 `json:"curtain"`
  27. Discount float64 `json:"discount"`
  28. Total float64 `json:"total"`
  29. }
  30. type InclusiveCost struct {
  31. Diy float64 `json:"diy"`
  32. Furniture float64 `json:"furniture"`
  33. Lamp float64 `json:"lamp"`
  34. Curtain float64 `json:"curtain"`
  35. Prize float64 `json:"prize"`
  36. Deposit float64 `json:"deposit"`
  37. Appliances float64 `json:"appliances"`
  38. Total float64 `json:"total"`
  39. }
  40. type PackageBuildPrice struct {
  41. Direct float64 `json:"direct"`
  42. Manage float64 `json:"manage"`
  43. Transport float64 `json:"transport"`
  44. Sanitation float64 `json:"sanitation"`
  45. Design float64 `json:"design"`
  46. CementExtra float64 `json:"cement_extra"`
  47. TotalCost float64 `json:"total_cost"`
  48. Total float64 `json:"total"`
  49. }
  50. type PackagePrice struct {
  51. Material float64 `json:"material"`
  52. Build float64 `json:"build"`
  53. BuildPrice PackageBuildPrice `json:"build_price"`
  54. CostExtra float64 `json:"cost_extra"`
  55. FinishExtra float64 `json:"finish_extra"`
  56. Design float64 `json:"design"`
  57. Cost float64 `json:"cost"`
  58. Total float64 `json:"total"`
  59. }
  60. type PriceReturn struct {
  61. PackagePrice float64 `json:"package_price"`
  62. PackagePriceDetail string `json:"package_price_detail"`
  63. CustomizePrice float64 `json:"customize_price"`
  64. CustomizePriceDetail string `json:"customize_price_detail"`
  65. InclusivePrice float64 `json:"inclusive_price"`
  66. InclusivePriceDetail string `json:"inclusive_price_detail"`
  67. InclusiveCost float64 `json:"inclusive_cost"`
  68. InclusiveCostDetail string `json:"inclusive_cost_detail"`
  69. ToiletPrice float64 `json:"toilet_price"`
  70. ToiletPriceDetail string `json:"toilet_price_detail"`
  71. TotalPrice float64 `json:"total_price"`
  72. BaseDiscount float64 `json:"base_discount"`
  73. BaseInterestRate float64 `json:"base_interest_rate"`
  74. InterestRate float64 `json:"interest_rate"`
  75. HouseArea float64 `json:"house_area"`
  76. ProfitRate float64 `json:"ProfitRate"`
  77. Customize string `json:"content"`
  78. Param string `json:"param"`
  79. IsElevator int `json:"is_elevator"`
  80. FloorNum int `json:"floor_num"`
  81. TransportRate float64 `json:"transport_rate"`
  82. OutlinePrice OutlinePrice `json:"outline_price"`
  83. }
  84. type Outline struct {
  85. InsideScale float64 `json:"inside_scale" label:"面积比例"`
  86. AreaPrice []AreaPrice `json:"area_price" label:"面积单价" binding:"dive"`
  87. RoomNum float64 `json:"room_num" label:"基本房间数"`
  88. RoomPrice float64 `json:"room_price" label:"房间单价"`
  89. KitchenNum float64 `json:"kitchen_num" label:"基本厨房数"`
  90. KitchenPrice float64 `json:"kitchen_price" label:"厨房单价"`
  91. ToiletNum float64 `json:"toilet_num" label:"基本卫生间数"`
  92. ToiletPrice float64 `json:"toilet_price" label:"卫生间单价"`
  93. DiscountScale float64 `json:"discount_scale" label:"折扣比例"`
  94. ExtraItem []ExtraItem `json:"extra_item" label:"附加项目" binding:"dive"`
  95. }
  96. type AreaPrice struct {
  97. Area float64 `json:"area" label:"面积"`
  98. Price float64 `json:"price" label:"单价"`
  99. }
  100. type ExtraItem struct {
  101. Name string `json:"name" label:"名称"`
  102. Type int `json:"type" label:"类型"`
  103. Price float64 `json:"price" label:"单价"`
  104. }
  105. type ExtraItemPrice struct {
  106. Name string `json:"name" label:"名称"`
  107. Price float64 `json:"price" label:"价格"`
  108. }
  109. type OutlinePrice struct {
  110. Area float64 `json:"area" label:"计算面积"`
  111. AreaPrice float64 `json:"area_price" label:"面积价格"`
  112. RoomPrice float64 `json:"room_price" label:"房间价格"`
  113. KitchenPrice float64 `json:"kitchen_price" label:"厨房价格"`
  114. ToiletPrice float64 `json:"toilet_price" label:"卫生间价格"`
  115. ExtraItemPrice []ExtraItemPrice `json:"extra_item_price"`
  116. DiscountPrice float64 `json:"discount_price"`
  117. Total float64 `json:"total"`
  118. }