seal.go 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. package crm
  2. import (
  3. "hongze/fms_api/global"
  4. "time"
  5. )
  6. // Seal 用印结构体
  7. type Seal struct {
  8. SealId int `orm:"column(seal_id);pk"`
  9. Code string `description:"用印编号,长度32位"`
  10. UserId int `description:"申请人id"`
  11. UserName string `description:"申请人名称"`
  12. Use string `description:"用印用途,枚举值:'销售合同', '渠道合同', '付款通知函', '招投标', '战略合作协议';默认:销售合同"`
  13. CompanyName string `description:"客户名称,甲方名称,长度32位"`
  14. UseCompanyName string `description:"实际使用方客户名称,长度32位"`
  15. CreditCode string `description:"社会统一信用代码,长度64位"`
  16. ServiceType string `description:"业务类型,枚举值:'新签合同','续约合同','补充协议';默认:新签合同"`
  17. SealType string `description:"加盖印章类型,枚举值:'合同章', '公章', '法人章';默认:合同章"`
  18. Status string `description:"合同状态,枚举值:'待提交','待审批','已撤回','已审批','已驳回','已作废','已签回'"`
  19. Remark string `description:"补充内容,长度255位"`
  20. ApprovalRemark string `description:"审核备注"`
  21. FileUrl string `description:"文件附件地址"`
  22. CheckBackFileUrl string `description:"已签回的文件地址"`
  23. FileNum int `description:"文件附件份数"`
  24. ContractId int `description:"系统合同id"`
  25. IsDelete int `json:"-" description:"是否已经删除,0:未删除,1:已删除"`
  26. ApproveTime time.Time `description:"审批时间"`
  27. InvalidTime time.Time `description:"作废时间"`
  28. ModifyTime time.Time `description:"最近一次修改时间"`
  29. CreateTime time.Time `description:"添加时间"`
  30. CheckBackFileTime time.Time `description:"签回用印附件时间"`
  31. AffiliatedCompany string `description:"归属公司"`
  32. ProductId int `description:"产品id,1:ficc;2:权益"`
  33. CompanyId int `description:"客户id"`
  34. StartDate time.Time `description:"开始日期"`
  35. EndDate time.Time `description:"结束日期"`
  36. }
  37. // ContractDetail 合同详情信息(包含服务信息等)
  38. type SealDetail struct {
  39. Contract
  40. }
  41. func (Seal) TableName() string {
  42. return "seal"
  43. }
  44. // SealServiceDetailReq CRM系统合同-合同套餐及品种权限详情请求体
  45. type SealServiceDetailReq struct {
  46. ContractCode string `json:"contract_code" form:"contract_code" description:"合同编号"`
  47. }
  48. // GetContractDetailById 根据合同ID获取合同详情信息
  49. func GetSealInfoByCode(code string) (item *Seal, err error) {
  50. //detail = new(SealDetail)
  51. //item := new(Seal)
  52. query := global.MYSQL["report"].
  53. Model(Seal{}).
  54. Where("code = ?", code)
  55. err = query.Find(&item).Error
  56. if err != nil {
  57. return
  58. }
  59. return
  60. }