|
@@ -37,7 +37,7 @@ type Seal struct {
|
|
|
ProductId int `description:"产品id,1:ficc;2:权益"`
|
|
|
CompanyId int `description:"客户id"`
|
|
|
StartDate string `description:"开始日期"`
|
|
|
- EndDate string `description:"结束日期"`
|
|
|
+ EndDate string `description:"结束日期。"`
|
|
|
}
|
|
|
|
|
|
var EnumUse = []string{"销售合同", "渠道合同", "付款通知函", "招投标", "战略合作协议", "代付合同", "总对总协议"}
|
|
@@ -64,6 +64,7 @@ func GetSealInfoByContractId(sealId int) (sealInfo *Seal, err error) {
|
|
|
// GetSealInfoByDateAndCompanyId 根据起始时间,公司ID获取合同信息
|
|
|
func GetSealInfoByDateAndCompanyId(startDate, endDate string, companyId int) (sealInfo *Seal, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
+
|
|
|
sql := `select * from seal where start_date = ? and end_date = ? AND company_id =? AND product_id = 2 order by seal_id asc limit 1 `
|
|
|
err = o.Raw(sql, startDate, endDate, companyId).QueryRow(&sealInfo)
|
|
|
return
|
|
@@ -72,6 +73,7 @@ func GetSealInfoByDateAndCompanyId(startDate, endDate string, companyId int) (se
|
|
|
// GetCountByDateAndCompanyId 根据起始时间,公司ID获取合同信息数量
|
|
|
func GetCountByDateAndCompanyId(startDate, endDate string, companyId int) (count int, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
+
|
|
|
sql := "select count(*) AS COUNT from seal where start_date = ? and end_date = ? AND company_id =? AND product_id = 2 "
|
|
|
err = o.Raw(sql, startDate, endDate, companyId).QueryRow(&count)
|
|
|
return
|
|
@@ -130,7 +132,7 @@ func GetSealCode() (code string, err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// GetSealCodeRai 生成权益合同编号
|
|
|
+// GetSealCodeRai 生成权益合同编号1
|
|
|
func GetSealCodeRai() (code string, err error) {
|
|
|
var num int
|
|
|
o := orm.NewOrm()
|
|
@@ -230,7 +232,7 @@ type SealApprovalItem struct {
|
|
|
CheckBackFileTimeStr string `description:"签回用印附件时间(字符串)"`
|
|
|
ContractCode string `description:"合同编码"`
|
|
|
AffiliatedCompany string `description:"归属公司"`
|
|
|
- ProductId int `description:"产品id,1:ficc;2:权益"`
|
|
|
+ ProductId int `description:"产品id,1:ficc;2:权益。"`
|
|
|
}
|
|
|
|
|
|
// GetSealApprovalListByWhere 获取用印审批列表-分页
|