year_main.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. package sb
  2. import (
  3. "database/sql/driver"
  4. "time"
  5. )
  6. type YearMain struct {
  7. ID uint `json:"id" gorm:"primary_key"`
  8. CreatedAt time.Time `json:"createdAt"`
  9. UpdatedAt time.Time `json:"updatedAt"`
  10. TableName string `json:"tableName"` // 主表表名
  11. KouStatus uint `json:"kouStatus"`
  12. SbStatus int `json:"sbStatus"`
  13. ComID uint `json:"comId"` //
  14. Period string `json:"period"` // 账期开始日期
  15. Status int8 `json:"status"` // 1 拉取可更改 2已生成报表可更改 3 已修改计算本年累计 不可更改了 3已提交申报不可更改
  16. InitStatus int8 `json:"init_status"`
  17. }
  18. type YearA101010 struct {
  19. ID uint `json:"id" gorm:"primary_key"`
  20. CreatedAt time.Time `json:"createdAt"`
  21. UpdatedAt time.Time `json:"updatedAt"`
  22. YearMainId uint `json:"yearMainId"`
  23. Type string `json:"type"`
  24. Project string `json:"project"`
  25. Amount string `json:"amount"`
  26. }
  27. type YearA100000Fb1 struct {
  28. Amount string `json:"amount"`
  29. Code string `json:"code"`
  30. CreatedAt time.Time `json:"createdAt"`
  31. Id int `json:"id"`
  32. IsCheck int `json:"isCheck"`
  33. Other string `json:"other"`
  34. Project string `json:"project"`
  35. Type string `json:"type"`
  36. UpdatedAt time.Time `json:"updatedAt"`
  37. YearMainId int `json:"yearMainId"`
  38. }
  39. type YearA100000Fb2 struct {
  40. Amount string `json:"amount"`
  41. Code string `json:"code"`
  42. CreatedAt time.Time `json:"createdAt"`
  43. Id int `json:"id"`
  44. IsCheck int `json:"isCheck"`
  45. Other string `json:"other"`
  46. Project string `json:"project"`
  47. Type string `json:"type"`
  48. UpdatedAt time.Time `json:"updatedAt"`
  49. YearMainId int `json:"yearMainId"`
  50. }
  51. type YearA102010 struct {
  52. ID uint `json:"id" gorm:"primary_key"`
  53. CreatedAt time.Time `json:"createdAt"`
  54. UpdatedAt time.Time `json:"updatedAt"`
  55. YearMainId uint `json:"yearMainId"`
  56. Type string `json:"type"`
  57. Project string `json:"project"`
  58. Amount string `json:"amount"`
  59. }
  60. type YearA104000 struct {
  61. ID uint `json:"id" gorm:"primary_key"`
  62. CreatedAt time.Time `json:"createdAt"`
  63. UpdatedAt time.Time `json:"updatedAt"`
  64. YearMainId uint `json:"yearMainId"`
  65. Type string `json:"type"`
  66. Project string `json:"project"`
  67. A1 string `json:"a1"`
  68. A2 string `json:"a2"`
  69. A3 string `json:"a3"`
  70. A4 string `json:"a4"`
  71. A5 string `json:"a5"`
  72. A6 string `json:"a6"`
  73. }
  74. type YearA105050 struct {
  75. ID uint `json:"id" gorm:"primary_key"`
  76. CreatedAt time.Time `json:"createdAt"`
  77. UpdatedAt time.Time `json:"updatedAt"`
  78. YearMainId uint `json:"yearMainId"`
  79. Type string `json:"type"`
  80. Project string `json:"project"`
  81. A1 string `json:"a1"`
  82. A2 string `json:"a2"`
  83. A3 string `json:"a3"`
  84. A4 string `json:"a4"`
  85. A5 string `json:"a5"`
  86. A6 string `json:"a6"`
  87. A7 string `json:"a7"`
  88. }
  89. type YearA105060 struct {
  90. ID uint `json:"id" gorm:"primary_key"`
  91. CreatedAt time.Time `json:"createdAt"`
  92. UpdatedAt time.Time `json:"updatedAt"`
  93. YearMainId uint `json:"yearMainId"`
  94. Type string `json:"type"`
  95. Project string `json:"project"`
  96. A1 string `json:"a1"`
  97. A2 string `json:"a2"`
  98. }
  99. type YearA105080 struct {
  100. ID uint `json:"id" gorm:"primary_key"`
  101. CreatedAt time.Time `json:"createdAt"`
  102. UpdatedAt time.Time `json:"updatedAt"`
  103. YearMainId uint `json:"yearMainId"`
  104. Type string `json:"type"`
  105. Project string `json:"project"`
  106. ProjectItem string `json:"projectItem"`
  107. A1 string `json:"a1"`
  108. A2 string `json:"a2"`
  109. A3 string `json:"a3"`
  110. A4 string `json:"a4"`
  111. A5 string `json:"a5"`
  112. A6 string `json:"a6"`
  113. A7 string `json:"a7"`
  114. A8 string `json:"a8"`
  115. A9 string `json:"a9"`
  116. }
  117. // YearA105080Fb A105080Fb28 29附表结构体
  118. type YearA105080Fb struct {
  119. ID uint `json:"id" gorm:"primary_key"`
  120. CreatedAt time.Time `json:"createdAt"`
  121. UpdatedAt time.Time `json:"updatedAt"`
  122. YearMainId uint `json:"yearMainId"`
  123. Type string `json:"type"`
  124. Project string `json:"project"`
  125. Other string `json:"other"`
  126. Code string `json:"code"`
  127. Amount string `json:"amount"`
  128. IsCheck int `json:"isCheck"`
  129. }
  130. type YearA105000 struct {
  131. ID uint `json:"id" gorm:"primary_key"`
  132. CreatedAt time.Time `json:"createdAt"`
  133. UpdatedAt time.Time `json:"updatedAt"`
  134. YearMainId uint `json:"yearMainId"`
  135. Type string `json:"type"`
  136. Project string `json:"project"`
  137. A1 string `json:"a1"`
  138. A2 string `json:"a2"`
  139. A3 string `json:"a3"`
  140. A4 string `json:"a4"`
  141. }
  142. type YearA100000 struct {
  143. ID uint `json:"id" gorm:"primary_key"`
  144. CreatedAt time.Time `json:"createdAt"`
  145. UpdatedAt time.Time `json:"updatedAt"`
  146. YearMainId uint `json:"yearMainId"`
  147. Type string `json:"type"`
  148. Project string `json:"project"`
  149. ProjectItem string `json:"projectItem"`
  150. Amount string `json:"amount"`
  151. }
  152. type YearA107040 struct {
  153. ID uint `json:"id" gorm:"primary_key"`
  154. CreatedAt time.Time `json:"createdAt"`
  155. UpdatedAt time.Time `json:"updatedAt"`
  156. YearMainId uint `json:"yearMainId"`
  157. Type string `json:"type"`
  158. Project string `json:"project"`
  159. Amount string `json:"amount"`
  160. }
  161. type YearA106000 struct {
  162. ID uint `json:"id" gorm:"primary_key"`
  163. CreatedAt time.Time `json:"createdAt"`
  164. UpdatedAt time.Time `json:"updatedAt"`
  165. YearMainId uint `json:"yearMainId"`
  166. Type string `json:"type"`
  167. Project string `json:"project"`
  168. A1 string `json:"a1"`
  169. A2 string `json:"a2"`
  170. A3 string `json:"a3"`
  171. A4 string `json:"a4"`
  172. A5 string `json:"a5"`
  173. A6 string `json:"a6"`
  174. A7 string `json:"a7"`
  175. A8 string `json:"a8"`
  176. A9 string `json:"a9"`
  177. A10 string `json:"a10"`
  178. A11 string `json:"a11"`
  179. A12 string `json:"a12"`
  180. }
  181. type YearA106000Copy1 struct {
  182. ID uint `json:"id" gorm:"primary_key"`
  183. CreatedAt time.Time `json:"createdAt"`
  184. UpdatedAt time.Time `json:"updatedAt"`
  185. ComId uint `json:"comId"`
  186. Type string `json:"type"`
  187. Project string `json:"project"`
  188. A1 string `json:"a1"`
  189. A2 string `json:"a2"`
  190. A3 string `json:"a3"`
  191. A4 string `json:"a4"`
  192. A5 string `json:"a5"`
  193. A6 string `json:"a6"`
  194. A7 string `json:"a7"`
  195. A8 string `json:"a8"`
  196. A9 string `json:"a9"`
  197. A10 string `json:"a10"`
  198. A11 string `json:"a11"`
  199. A12 string `json:"a12"`
  200. Period string `json:"period"`
  201. }
  202. type YearSelect struct {
  203. ID uint `json:"id" gorm:"primary_key"`
  204. CreatedAt time.Time `json:"createdAt"`
  205. UpdatedAt time.Time `json:"updatedAt"`
  206. YearMainId uint `json:"yearMainId"`
  207. TableName string `json:"tableName"` // 主表表名
  208. Type string `json:"type"`
  209. Project string `json:"project"`
  210. Status int `json:"status"`
  211. Sort int `json:"sort"`
  212. Selects int `json:"selects"`
  213. }
  214. type YearA000000Gd struct {
  215. ID uint `json:"id" gorm:"primary_key"`
  216. CreatedAt time.Time `json:"createdAt"`
  217. UpdatedAt time.Time `json:"updatedAt"`
  218. YearMainId uint `json:"yearMainId"`
  219. GdName string `json:"gdName"`
  220. GdType string `json:"gdType"`
  221. GdNo string `json:"gdNo"`
  222. Bl float64 `json:"bl"`
  223. Amount float64 `json:"amount"`
  224. Country string `json:"country"`
  225. }
  226. type YearA000000Type string
  227. func (ct *YearA000000Type) Scan(value interface{}) error {
  228. *ct = YearA000000Type(value.([]byte))
  229. return nil
  230. }
  231. func (ct YearA000000Type) Value() (driver.Value, error) {
  232. return string(ct), nil
  233. }
  234. const (
  235. Y YearA000000Type = "Y"
  236. N YearA000000Type = "N"
  237. )
  238. type YearA000000 struct {
  239. ID uint `json:"id" gorm:"primary_key"`
  240. CreatedAt time.Time `json:"createdAt"`
  241. UpdatedAt time.Time `json:"updatedAt"`
  242. YearMainId uint `json:"yearMainId"`
  243. A101 string `json:"a101"`
  244. A102 float64 `json:"a102"`
  245. A103 float64 `json:"a103"`
  246. A104 int `json:"a104"`
  247. A105 string `json:"a105"`
  248. A106 string `json:"a106"`
  249. A107 string `json:"a107"`
  250. A108 string `json:"a108"`
  251. A109 string `json:"a109"`
  252. A110 string `json:"a110"`
  253. A201 string `json:"a201"`
  254. A202 string `json:"a202"`
  255. A2031 string `json:"a2031"`
  256. A20321 string `json:"a20321"`
  257. A20322 string `json:"a20322"`
  258. A204 string `json:"a204"`
  259. A205 string `json:"a205"`
  260. A206 string `json:"a206"`
  261. A207 string `json:"a207"`
  262. A208 string `json:"a208"`
  263. A209 string `json:"a209"`
  264. A21001 string `json:"a21001"`
  265. A21002 string `json:"a21002"`
  266. A21003 string `json:"a21003"`
  267. A21004 string `json:"a21004"`
  268. A210num01 string `json:"a210num01"`
  269. A210num02 string `json:"a210num02"`
  270. A21101 string `json:"a21101"`
  271. A21102 string `json:"a21102"`
  272. A21103 string `json:"a21103"`
  273. A21104 string `json:"a21104"`
  274. A212 string `json:"a212"`
  275. A213 string `json:"a213"`
  276. A214 string `json:"a214"`
  277. A215 string `json:"a215"`
  278. A216 string `json:"a216"`
  279. A217 string `json:"a217"`
  280. A218 string `json:"a218"`
  281. A219 string `json:"a219"`
  282. A220 string `json:"a220"`
  283. A221 string `json:"a221"`
  284. A222 string `json:"a222"`
  285. A223 string `json:"a223"`
  286. A224 string `json:"a224"`
  287. }
  288. type YearZcfz struct {
  289. ID uint `json:"id" gorm:"primary_key"`
  290. CreatedAt time.Time `json:"createdAt"`
  291. UpdatedAt time.Time `json:"updatedAt"`
  292. YearMainID uint `json:"yearMainID"` //
  293. Type float64 `json:"type"` // 对应资产负债表行次字段 不标准
  294. Zcxmmc string `json:"zcxmmc"` // 流动资产
  295. QmyeZc float64 `json:"qmyeZc"` // 期末余额
  296. NcyeZc float64 `json:"ncyeZc"` // 年初余额
  297. Qyxmmc string `json:"qyxmmc"` // 流动负债
  298. QmyeQy float64 `json:"qmyeQy"` // 期末余额
  299. NcyeQy float64 `json:"ncyeQy"` // 年初余额
  300. }
  301. type YearLrb struct {
  302. ID uint `json:"id" gorm:"primary_key"`
  303. CreatedAt time.Time `json:"createdAt"`
  304. UpdatedAt time.Time `json:"updatedAt"`
  305. YearMainID uint `json:"yearMainID"`
  306. Project string `json:"project"`
  307. Type float64 `json:"type"`
  308. YearTotal float64 `json:"yearTotal"`
  309. LastYearTotal float64 `json:"lastYearTotal"`
  310. }
  311. type YearXjllb struct {
  312. ID uint `json:"id" gorm:"primary_key"`
  313. CreatedAt time.Time `json:"createdAt"`
  314. UpdatedAt time.Time `json:"updatedAt"`
  315. YearMainID uint `json:"yearMainID"`
  316. Project string `json:"project"`
  317. Type float64 `json:"type"`
  318. YearTotal float64 `json:"yearTotal"`
  319. LastYearTotal float64 `json:"lastYearTotal"`
  320. }