|
@@ -0,0 +1,67 @@
|
|
|
+package crm
|
|
|
+
|
|
|
+import (
|
|
|
+ "hongze/fms_api/global"
|
|
|
+ "time"
|
|
|
+)
|
|
|
+
|
|
|
+// Seal 用印结构体
|
|
|
+type Seal struct {
|
|
|
+ SealId int `orm:"column(seal_id);pk"`
|
|
|
+ Code string `description:"用印编号,长度32位"`
|
|
|
+ UserId int `description:"申请人id"`
|
|
|
+ UserName string `description:"申请人名称"`
|
|
|
+ Use string `description:"用印用途,枚举值:'销售合同', '渠道合同', '付款通知函', '招投标', '战略合作协议';默认:销售合同"`
|
|
|
+ CompanyName string `description:"客户名称,甲方名称,长度32位"`
|
|
|
+ UseCompanyName string `description:"实际使用方客户名称,长度32位"`
|
|
|
+ CreditCode string `description:"社会统一信用代码,长度64位"`
|
|
|
+ ServiceType string `description:"业务类型,枚举值:'新签合同','续约合同','补充协议';默认:新签合同"`
|
|
|
+ SealType string `description:"加盖印章类型,枚举值:'合同章', '公章', '法人章';默认:合同章"`
|
|
|
+ Status string `description:"合同状态,枚举值:'待提交','待审批','已撤回','已审批','已驳回','已作废','已签回'"`
|
|
|
+ Remark string `description:"补充内容,长度255位"`
|
|
|
+ ApprovalRemark string `description:"审核备注"`
|
|
|
+ FileUrl string `description:"文件附件地址"`
|
|
|
+ CheckBackFileUrl string `description:"已签回的文件地址"`
|
|
|
+ FileNum int `description:"文件附件份数"`
|
|
|
+ ContractId int `description:"系统合同id"`
|
|
|
+ IsDelete int `json:"-" description:"是否已经删除,0:未删除,1:已删除"`
|
|
|
+ ApproveTime time.Time `description:"审批时间"`
|
|
|
+ InvalidTime time.Time `description:"作废时间"`
|
|
|
+ ModifyTime time.Time `description:"最近一次修改时间"`
|
|
|
+ CreateTime time.Time `description:"添加时间"`
|
|
|
+ CheckBackFileTime time.Time `description:"签回用印附件时间"`
|
|
|
+ AffiliatedCompany string `description:"归属公司"`
|
|
|
+ ProductId int `description:"产品id,1:ficc;2:权益"`
|
|
|
+ CompanyId int `description:"客户id"`
|
|
|
+ StartDate time.Time `description:"开始日期"`
|
|
|
+ EndDate time.Time `description:"结束日期"`
|
|
|
+}
|
|
|
+
|
|
|
+// ContractDetail 合同详情信息(包含服务信息等)
|
|
|
+type SealDetail struct {
|
|
|
+ Contract
|
|
|
+}
|
|
|
+
|
|
|
+func (Seal) TableName() string {
|
|
|
+ return "seal"
|
|
|
+}
|
|
|
+
|
|
|
+// SealServiceDetailReq CRM系统合同-合同套餐及品种权限详情请求体
|
|
|
+type SealServiceDetailReq struct {
|
|
|
+ ContractCode string `json:"contract_code" form:"contract_code" description:"合同编号"`
|
|
|
+}
|
|
|
+
|
|
|
+// GetContractDetailById 根据合同ID获取合同详情信息
|
|
|
+func GetSealInfoByCode(code string) (item *Seal, err error) {
|
|
|
+ //detail = new(SealDetail)
|
|
|
+ //item := new(Seal)
|
|
|
+ query := global.MYSQL["report"].
|
|
|
+ Model(Seal{}).
|
|
|
+ Where("code = ?", code)
|
|
|
+ err = query.Find(&item).Error
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ return
|
|
|
+}
|