history.go 22 KB

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