history.go 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. package models
  2. import "time"
  3. type SoftInfo struct {
  4. ReqNo string `json:"reqNo"`
  5. ComName string `json:"comName"`
  6. ComNsrsbh string `json:"comNsrsbh"`
  7. SoftWareName string `json:"softWareName"`
  8. Period string `json:"period"`
  9. ZtBeginPeriod string
  10. UserName string `json:"userName"`
  11. Password string `json:"password"`
  12. OrgCode string `json:"orgCode"`
  13. OldParam string `json:"oldParam"` //是否采集停报客户 是/否
  14. Result Result
  15. }
  16. type HisSubject struct {
  17. Period string `json:"period"` // 账期
  18. Type int `json:"type"` // 类型:1-月度,2-年度
  19. SubjectCode string `json:"subjectCode"` // 科目编码
  20. SubjectName string `json:"subjectName"` // 科目名称
  21. PeriodBeginIn float64 `json:"periodBeginIn"` // 期初余额-借方
  22. PeriodBeginOut float64 `json:"periodBeginOut"` // 期初余额-贷方
  23. PeriodInt float64 `json:"periodInt"` // 本期发生额-借方
  24. PeriodOut float64 `json:"periodOut"` // 本期发生额-贷方
  25. PeriodEndIn float64 `json:"periodEndIn"` // 期末余额-借方
  26. PeriodEndOut float64 `json:"periodEndOut"` // 期末余额-贷方
  27. YearInt float64 `json:"yearInt"` // 本期发生额-借方
  28. YearOut float64 `json:"yearOut"` // 本期发生额-贷方
  29. Status int `json:"status"` // 状态: 2-未启用,1-启用
  30. Remark string `json:"remark"` // 备注说明
  31. PeriodBeginInWb float64 `json:"periodBeginInWb"` // 期初余额-借方
  32. PeriodBeginOutWb float64 `json:"periodBeginOutWb"` // 期初余额-贷方
  33. PeriodIntWb float64 `json:"periodIntWb"` // 本期发生额-借方
  34. PeriodOutWb float64 `json:"periodOutWb"` // 本期发生额-贷方
  35. PeriodEndInWb float64 `json:"periodEndInWb"` // 期末余额-借方
  36. PeriodEndOutWb float64 `json:"periodEndOutWb"` // 期末余额-贷方
  37. YearIntWb float64 `json:"yearIntWb"` // 本年累计-借方
  38. YearOutWb float64 `json:"yearOutWb"` // 本年累计-贷方
  39. BeginCount float64 `json:"beginCount"` // 期初数量
  40. InCount float64 `json:"inCount"` // 本期发生额借方数量
  41. OutCount float64 `json:"outCount"` // 本期发生额贷方数量
  42. EndCount float64 `json:"endCount"` // 期末数量
  43. Unit string `json:"unit"` // 单位
  44. Spec string `json:"spec"` // 型号
  45. IsStock bool `json:"IsStock"` //是否是存货
  46. }
  47. type HisGdzczj struct {
  48. Period string `json:"period"` // 账期,eg:201810
  49. Xh string `json:"xh"` //序号
  50. Type string `json:"type"` // 1 固定 2 无形 3待摊 -
  51. Zcmc string `json:"zcmc"` //资产名称 -
  52. Zclb string `json:"zclb"` //资产类别 -
  53. Sl string `json:"sl"` //数量 -默认1
  54. Rzrq string `json:"rzrq"` //入账日期 -
  55. Yz string `json:"yz"` //原值 -
  56. Yjsyyf string `json:"yjsyyf"` //预计使用月份 -
  57. Czl string `json:"czl"` //残值率 -
  58. Cz string `json:"cz"` //残值(元) 原值*残值率 -
  59. Byzj string `json:"byzj"` //本月折旧(元) 可不采集
  60. Bnzj string `json:"bnzj"` //本年折旧(元) 可不采集
  61. Ljzj string `json:"ljzj"` //累计折旧(元) -期末累计折旧
  62. Jz string `json:"jz"` //净值(元) -
  63. Cbfykm string `json:"cbfykm"` //成本费用科目 折旧费用科目 -
  64. Zt string `json:"zt"` //状态 -
  65. Ljzjkm string `json:"subjectCode"` //subject_code累计折旧科目 -
  66. Created_at time.Time `json:"createdAt"` // 可不采集
  67. Created_by string `json:"createdBy"` // 可不采集
  68. Updated_at time.Time `json:"updatedAt"` // 可不采集
  69. Updated_by string `json:"updatedBy"` // 可不采集
  70. }
  71. // 暂估冲销
  72. type HisZgcx struct {
  73. Period string `json:"period"` // 账期,eg:201810
  74. //Bh string `json:"bh"` //编号
  75. Chmc string `json:"chmc"` //存货名称
  76. Gg string `json:"gg"` // 规格
  77. Dw string `json:"dw"` //单位
  78. //Fx string `json:"fx"` //方向 -
  79. //Qcsl string `json:"qcsl"` //期初数量
  80. //Qcje string `json:"qcje"` //期初金额
  81. //
  82. //Bqsl string `json:"bqsl"` //本期数量
  83. //Bqdj string `json:"bqdj"` //本期单价
  84. //Bqckj string `json:"bqckj"` //本期参考价
  85. //Bqje string `json:"bqje"` //本期金额
  86. //
  87. //Bqcxsl string `json:"bqcxsl"` //本期冲销数量
  88. //Bqcxdj string `json:"bqcxdj"` //本期冲销单价
  89. //Bqcxje string `json:"bqcxje"` //本期冲销金额
  90. Qmsl string `json:"qmsl"` //期末数量
  91. Qmje string `json:"qmje"` //期末金额 -
  92. Gsmc string `json:"gsmc"` //公司名称
  93. }
  94. type HisVoucher struct {
  95. Type int `json:"type"`
  96. CreatedAt time.Time `json:"createdAt"` // 可不采集
  97. CreatedBy uint `json:"createdBy"` // 可不采集
  98. UpdatedAt time.Time `json:"updatedAt"` // 可不采集
  99. UpdatedBy uint `json:"updatedBy"` // 可不采集
  100. FromType string `json:"fromType"` //凭证来源 // 可不采集
  101. FromId uint `json:"fromId"` //凭证来源id // 可不采集
  102. FromIds string `json:"fromIds"` //凭证来源id // 可不采集
  103. Period string `json:"period"` // 账期,eg:201810
  104. VoucherNo string `json:"voucherNo"` // 凭证号:记-1
  105. InSumAmount float64 `json:"inSumAmount"` // 借方金额合计
  106. OutSumAmount float64 `json:"outSumAmount"` // 贷方金额合计
  107. CheckUserID uint `json:"checkUserId"` // 审核人ID // 可不采集
  108. CheckDate time.Time `json:"checkDate"` // 审核日期 // 可不采集
  109. VoucherDate time.Time `json:"voucherDate"` // 日期
  110. CheckStatus int `json:"checkStatus"` // 审核状态:1-未审核,2-已审核 // 可不采集
  111. BillCount int `json:"billCount"` // 附单据张数
  112. Status int `json:"status"` // 状态:1- // 可不采集
  113. Remark string `json:"remark"` // 备注说明
  114. HisBz int `json:"hisBz"` //历史的历史标志 // 可不采集
  115. Items []HisVoucherItem `json:"items" gorm:"foreignKey:voucher_id"`
  116. }
  117. type HisVoucherItem struct {
  118. VoucherID uint `json:"voucherId"` // 凭证ID // 可不采集
  119. Type int `json:"type"` // 类型:1-收入(借), 2-支出(贷) // 可不采集
  120. Summary string `json:"summary"` // 摘要
  121. SubjectCode string `json:"subjectCode"` // 会计科目编号
  122. SubjectName string `json:"subjectName"` // 会计科目名称
  123. InAmount float64 `json:"inAmount"` // 借方金额
  124. OutAmount float64 `json:"outAmount"` // 贷方金额
  125. AffectInventory int `json:"affectInventory"` // 是否关联存货出入库:0-否,1-是 // 可不采集
  126. Price float64 `json:"price"` // 存货平均单价 关联存货时有值 // 可不采集
  127. Count float64 `json:"count"` // 存货数量 关联存货时有值
  128. Remark string `json:"remark"` // 备注说明
  129. Seq int `json:"seq"` // 排序 // 可不采集
  130. Status int `json:"status"` // 状态:1- // 可不采集
  131. Wb string `json:"wb"` //币种
  132. Rate float64 `json:"rate"` //汇率
  133. InAmountWb float64 `json:"inAmountWb"` //借方
  134. OutAmountWb float64 `json:"outAmountWb"` //贷方
  135. InventoryStrIds string `json:"inventoryStrIds"` // // 可不采集
  136. }
  137. type Employee struct {
  138. Xm string `json:"xm"` //姓名
  139. Zjlx string `json:"zjlx"` //证件类型
  140. Zjhm string `json:"zjhm"` //证件号码
  141. Xb string `json:"xb"` //性别
  142. Csrq string `json:"csrq"` //出生日期
  143. Rzsgcylx string `json:"rzsgcylx"` //任职受雇成员类型
  144. Rzsgcyrq string `json:"rzsgcyrq"` //任职受雇成员日期
  145. Lzrq string `json:"lzrq"` //离职日期
  146. Sfgd string `json:"sfgd"` //是否股东
  147. Gj string `json:"gj"` //国籍
  148. Ryzt string `json:"ryzt"` //人员状态
  149. Sfkcjcfy string `json:"sfkcjcfy"` //是否扣除减除费用 "1"是"0"否
  150. Tel string `json:"tel"` //电话
  151. }
  152. // 存货
  153. type Stock struct {
  154. Bm string `json:"bm"` //编码
  155. Mc string `json:"mc"` //名称
  156. Dw string `json:"dw"` //单位
  157. Xh string `json:"xh"` //型号
  158. Lb string `json:"lb"` //类别
  159. Km string `json:"km"` //科目
  160. Sl string `json:"sl"` //数量
  161. Je string `json:"je"` //金额
  162. }
  163. type EmInfo1 struct {
  164. Data struct {
  165. DepartmentList []struct {
  166. Id int `json:"id"`
  167. Name string `json:"name"`
  168. Category int `json:"category"`
  169. Attr struct {
  170. Standard string `json:"standard"`
  171. Unit string `json:"unit"`
  172. Type string `json:"type"`
  173. } `json:"attr"`
  174. Code string `json:"code"`
  175. IsSystem int `json:"is_system"`
  176. Sort int `json:"sort"`
  177. } `json:"departmentList"`
  178. StaffList map[string][]struct {
  179. StaffId int `json:"staff_id"`
  180. StaffName string `json:"staff_name"`
  181. CustomerId int `json:"customer_id"`
  182. DepartmentId int `json:"department_id"`
  183. Sex int `json:"sex"`
  184. Position string `json:"position"`
  185. Mobile string `json:"mobile"`
  186. Email string `json:"email"`
  187. RegisteredResidence int `json:"registered_residence"`
  188. IdCard string `json:"id_card"`
  189. StaffStatus int `json:"staff_status"`
  190. InductionTime string `json:"induction_time"`
  191. DepartureTime string `json:"departure_time"`
  192. TrialStartTime string `json:"trial_start_time"`
  193. TrialEndTime string `json:"trial_end_time"`
  194. WagesCardBank int `json:"wages_card_bank"`
  195. WagesCardBankName string `json:"wages_card_bank_name"`
  196. WagesCardNumber string `json:"wages_card_number"`
  197. AuxId int `json:"aux_id"`
  198. DelFlag int `json:"del_flag"`
  199. IsAssistant int `json:"is_assistant"`
  200. UpUser int `json:"up_user"`
  201. IdentityType int `json:"identity_type"`
  202. IdentityNumber string `json:"identity_number"`
  203. IsDisability int `json:"is_disability"`
  204. IsMartyr int `json:"is_martyr"`
  205. IsChildless int `json:"is_childless"`
  206. DisabilityNumber string `json:"disability_number"`
  207. MartyrNumber string `json:"martyr_number"`
  208. Passport string `json:"passport"`
  209. EmployeeNumber string `json:"employee_number"`
  210. EmploymentType int `json:"employment_type"`
  211. Nationality int `json:"nationality"`
  212. EntryTime string `json:"entry_time"`
  213. LeaveTime string `json:"leave_time"`
  214. PermanentAddress string `json:"permanent_address"`
  215. ContactAddress string `json:"contact_address"`
  216. BirthAddress string `json:"birth_address"`
  217. TaxpayerIdNumber string `json:"taxpayer_id_number"`
  218. PayWagesUnit string `json:"pay_wages_unit"`
  219. PayWagesUnitCode string `json:"pay_wages_unit_code"`
  220. SpouseSituation int `json:"spouse_situation"`
  221. SpouseName string `json:"spouse_name"`
  222. SpouseIdType int `json:"spouse_id_type"`
  223. SpouseIdNumber string `json:"spouse_id_number"`
  224. SpecialDeductionYear any `json:"special_deduction_year"`
  225. DepartmentName string `json:"department_name"`
  226. PositionName string `json:"position_name"`
  227. DeleteStaff int `json:"deleteStaff"`
  228. } `json:"staffList"`
  229. FeeType []string `json:"feeType"`
  230. CompanyName string `json:"companyName"`
  231. PositionList []any `json:"positionList"`
  232. } `json:"data"`
  233. Code int `json:"code"`
  234. Message string `json:"message"`
  235. }
  236. type EmInfo struct {
  237. Data struct {
  238. DepartmentList []any `json:"departmentList"`
  239. StaffList [][]struct {
  240. StaffId int `json:"staff_id"`
  241. StaffName string `json:"staff_name"`
  242. CustomerId int `json:"customer_id"`
  243. DepartmentId int `json:"department_id"`
  244. Sex int `json:"sex"`
  245. Position string `json:"position"`
  246. Mobile string `json:"mobile"`
  247. Email string `json:"email"`
  248. RegisteredResidence int `json:"registered_residence"`
  249. IdCard string `json:"id_card"`
  250. StaffStatus int `json:"staff_status"`
  251. InductionTime string `json:"induction_time"`
  252. DepartureTime string `json:"departure_time"`
  253. TrialStartTime string `json:"trial_start_time"`
  254. TrialEndTime string `json:"trial_end_time"`
  255. WagesCardBank int `json:"wages_card_bank"`
  256. WagesCardBankName string `json:"wages_card_bank_name"`
  257. WagesCardNumber string `json:"wages_card_number"`
  258. AuxId int `json:"aux_id"`
  259. DelFlag int `json:"del_flag"`
  260. IsAssistant int `json:"is_assistant"`
  261. UpUser int `json:"up_user"`
  262. IdentityType int `json:"identity_type"`
  263. IdentityNumber string `json:"identity_number"`
  264. IsDisability int `json:"is_disability"`
  265. IsMartyr int `json:"is_martyr"`
  266. IsChildless int `json:"is_childless"`
  267. DisabilityNumber string `json:"disability_number"`
  268. MartyrNumber string `json:"martyr_number"`
  269. Passport string `json:"passport"`
  270. EmployeeNumber string `json:"employee_number"`
  271. EmploymentType int `json:"employment_type"`
  272. Nationality int `json:"nationality"`
  273. EntryTime string `json:"entry_time"`
  274. LeaveTime string `json:"leave_time"`
  275. PermanentAddress string `json:"permanent_address"`
  276. ContactAddress string `json:"contact_address"`
  277. BirthAddress string `json:"birth_address"`
  278. TaxpayerIdNumber string `json:"taxpayer_id_number"`
  279. PayWagesUnit string `json:"pay_wages_unit"`
  280. PayWagesUnitCode string `json:"pay_wages_unit_code"`
  281. SpouseSituation int `json:"spouse_situation"`
  282. SpouseName string `json:"spouse_name"`
  283. SpouseIdType int `json:"spouse_id_type"`
  284. SpouseIdNumber string `json:"spouse_id_number"`
  285. SpecialDeductionYear any `json:"special_deduction_year"`
  286. DepartmentName string `json:"department_name"`
  287. PositionName string `json:"position_name"`
  288. DeleteStaff int `json:"deleteStaff"`
  289. } `json:"staffList"`
  290. FeeType []string `json:"feeType"`
  291. CompanyName string `json:"companyName"`
  292. PositionList any `json:"positionList"`
  293. } `json:"data"`
  294. Code int `json:"code"`
  295. Message string `json:"message"`
  296. }
  297. // 个税工资表
  298. type Gssalary struct {
  299. Name string `json:"name"` // 姓名
  300. FeeType string `json:"fee_type"` // 费用类型
  301. Salary float64 `json:"salary"` // 应发工资
  302. Subsidy float64 `json:"subsidy"` // 补助(其中:通讯费)
  303. Mssr string `json:"mssr"` // 免税收入
  304. DeductSbPension float64 `json:"deduct_sb_pension"` //代扣社保-养老保险
  305. DeductSbMedical float64 `json:"deduct_sb_medical"` // 代扣社保-医疗保险
  306. DeductSbUnemployment float64 `json:"deduct_sb_unemployment"` // 代扣社保-失业保险
  307. DeductSbIllness float64 `json:"deduct_sb_illness"` // 代扣社保-大病医疗
  308. DeductSbOther float64 `json:"deduct_sb_other"` // 代扣社保-其它
  309. DeductSbTotal float64 `json:"deduct_sb_total"` // 代扣社保-合计
  310. DeductHouseFund float64 `json:"deduct_house_fund"` // 代扣公积金
  311. DeductOther float64 `json:"deduct_other"` // 其他扣除
  312. DeductIncomeTax float64 `json:"deduct_income_tax"` // 代扣个税
  313. ActualSalary float64 `json:"actual_salary"` // 实发工资
  314. Remark string `json:"remark"` // 备注说明
  315. Seq string `json:"seq"` // 排序
  316. CreatedAt string `json:"created_at"`
  317. CreatedBy string `json:"created_by"`
  318. UpdatedAt string `json:"updated_at"`
  319. UpdatedBy string `json:"updated_by"`
  320. DeletedAt string `json:"deleted_at"`
  321. ChildrenEducation float64 `json:"children_education"` // 子女教育
  322. ContinuingEducation float64 `json:"continuing_education"` // 继续教育
  323. SeriousIllness float64 `json:"serious_illness"` // 大病医疗
  324. HousingLoan float64 `json:"housing_loan"` // 住房贷款信息
  325. HousingRent float64 `json:"housing_rent"` // 住房租金
  326. Support float64 `json:"support"` // 赡养老人
  327. BabyReduction float64 `json:"baby_reduction"` // 不满3岁
  328. CostReduction float64 `json:"cost_reduction"` // 减除费用每月5000
  329. IncomeTaxYear float64 `json:"income_tax_year"` // 代扣个税累计
  330. IncomeTaxLastPeriodYear float64 `json:"income_tax_last_period_year"` //代扣个税累计上月前
  331. }
  332. // 个税人员
  333. type GsRyxx struct {
  334. Name string `json:"name"` // 姓名
  335. IdType string `json:"id_type"` // 证件类型
  336. IdNo string `json:"id_no"` // 证件号码
  337. Sex int `json:"sex"` // 性别:1-男,2-女
  338. Country string `json:"country"` // 国籍(地区)
  339. Birthday string `json:"birthday"` // 出生日期
  340. Tel string `json:"tel"` // 手机号
  341. Disability int `json:"disability"` // 是否残疾:1-是,2-否
  342. Martyred int `json:"martyred"` // 是否烈属:1-是,2-否
  343. Elderly int `json:"elderly"` // 是否孤老:1-是,2-否
  344. DisabilityNo string `json:"disability_no"` // 残疾证号
  345. MartyredNo string `json:"martyred_no"` // 烈属证号
  346. IsEmployee int `json:"is_employee"` // 是否雇员:1-是,2-否
  347. Status int `json:"status"` // 人员状态:1-正常,2-非正常(非正常需要填任职受雇日期和离职日期)
  348. JoinDate string `json:"join_date"` // 入职日期/任职受雇日期
  349. DepartureDate string `json:"departure_date"` // 离职日期
  350. Stockholder int `json:"stockholder"` // 是否股东:0-否,1-是
  351. TotalStock float64 `json:"total_stock"` // 公司股本总额
  352. PersonalStock float64 `json:"personal_stock"` // 个人股本(投资)额
  353. StockPercent float64 `json:"stock_percent"` // 分配比例%
  354. PersonLoginPwd string `json:"person_login_pwd"` // 自然人登录密码
  355. Department string `json:"department"` // 部门-冗余
  356. Remark string `json:"remark"` // 备注说明
  357. ChildrenEducation float64 `json:"children_education"` // 子女教育
  358. ContinuingEducation float64 `json:"continuing_education"` // 继续教育
  359. SeriousIllness float64 `json:"serious_illness"` // 大病医疗
  360. HousingLoan float64 `json:"housing_loan"` // 住房贷款信息
  361. HousingRent float64 `json:"housing_rent"` // 住房租金
  362. Support float64 `json:"support"` // 赡养老人
  363. Time1 string `json:"time1"` // 子女教育
  364. Time2 string `json:"time2"` // 继续教育
  365. Time3 string `json:"time3"` // 大病医疗
  366. Time4 string `json:"time4"` // 住房贷款信息
  367. Time5 string `json:"time5"` // 住房租金
  368. Time6 string `json:"time6"` // '赡养老人
  369. TimeEnd1 string `json:"time_end1"` // 子女教育
  370. TimeEnd2 string `json:"time_end2"` // 继续教育
  371. TimeEnd3 string `json:"time_end3"` // 大病医疗
  372. TimeEnd4 string `json:"time_end4"` // 住房贷款信息
  373. TimeEnd5 string `json:"time_end5"` // 住房租金
  374. TimeEnd6 string `json:"time_end6"` // 赡养老人
  375. JcStatus int `json:"jc_status"` // 减除费用 1打开减除6w
  376. BabyReduction float64 `json:"baby_reduction"` // 婴幼儿减免
  377. Time7 string `json:"time7"`
  378. TimeEnd7 string `json:"time_end7"`
  379. }
  380. // // 历史软件发票信息
  381. type HisInvoice struct {
  382. TypeName string `json:"typeName"` //发票类型
  383. Summarys []HisSummary `json:"summarys"`
  384. }
  385. type HisSummary struct {
  386. TaxRate string `json:"taxRate"` //税率
  387. Tax string `json:"tax"` //税额
  388. Amount string `json:"amount"` //不含税金额
  389. Sm string `json:"sm"` //税目
  390. }
  391. // 采集规则,采集起始账期前至季度报账期间的销项发票
  392. // 起始账期认定规则,若最大末账期为202411 则起始账期为 202412,若凭证出现最后一账期为202411 则起始账期为202412
  393. // 采集账期规则,若为季度报账期则不采集,否则采集其至上个季度报账期之间的账期