|
@@ -277,7 +277,6 @@ func UpdateContractRegister(item *ContractRegister, updateCols []string, service
|
|
|
sql = `DELETE FROM contract_service_amount WHERE contract_register_id = ?`
|
|
|
tx.Exec(sql, item.ContractRegisterId)
|
|
|
|
|
|
-
|
|
|
// 新增合同服务
|
|
|
//nowTime := time.Now().Local()
|
|
|
for i := 0; i < len(serviceDetail); i++ {
|
|
@@ -348,11 +347,11 @@ type ContractRegisterDetailReq struct {
|
|
|
// ContractRegisterDetail-合同登记详情
|
|
|
type ContractRegisterDetail struct {
|
|
|
*ContractRegisterItem
|
|
|
- ServiceList []*ContractServiceAndDetail `json:"service_list" description:"合同服务及详情"`
|
|
|
- InvoiceList []*ContractInvoiceItem `json:"invoice_list" description:"开票信息"`
|
|
|
- PaymentList []*ContractInvoiceItem `json:"payment_list" description:"到款信息"`
|
|
|
- Logs []*ContractRegisterLogItem `json:"logs" description:"登记日志"`
|
|
|
- ServiceAmountList []*ContractServiceAmountItem `json:"service_amount_list" description:"合同套餐金额"`
|
|
|
+ ServiceList []*ContractServiceAndDetail `json:"service_list" description:"合同服务及详情"`
|
|
|
+ InvoiceList []*ContractInvoiceItem `json:"invoice_list" description:"开票信息"`
|
|
|
+ PaymentList []*ContractInvoiceItem `json:"payment_list" description:"到款信息"`
|
|
|
+ Logs []*ContractRegisterLogItem `json:"logs" description:"登记日志"`
|
|
|
+ ServiceAmountList []*ContractServiceAmountItem `json:"service_amount_list" description:"合同套餐金额"`
|
|
|
}
|
|
|
|
|
|
// GetContractRegisterItemById 获取合同登记信息
|
|
@@ -484,8 +483,7 @@ func CreateImportContractRegister(item *ContractRegister, serviceList []*Contrac
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-func GetContractInfoByRegisterIds(registerIds []int) (list []ContractRegister,err error) {
|
|
|
+func GetContractInfoByRegisterIds(registerIds []int) (list []ContractRegister, err error) {
|
|
|
err = global.DEFAULT_MYSQL.Model(ContractRegister{}).
|
|
|
Where("is_deleted = 0 AND contract_register_id in ?", registerIds).
|
|
|
Find(&list).Error
|
|
@@ -539,13 +537,13 @@ func CreateContractRegisterAndServicesAndPayMent(item *ContractRegister, service
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-type CheckContractNameReq struct {
|
|
|
+type CheckContractNameReq struct {
|
|
|
CompanyName string `json:"company_name" form:"company_name" description:"客户名称"`
|
|
|
StartDate string `json:"start_date" form:"start_date" description:"合同开始日期"`
|
|
|
EndDate string `json:"end_date" form:"end_date" description:"合同结束日期"`
|
|
|
+ SellerIds string `json:"seller_ids" form:"seller_ids" binding:"required" description:"CRM系统-销售ID"`
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-type CheckContractNameResp struct {
|
|
|
- Exist int `json:"exist" description:"是否存在相似的合同:0不存在,1存在"`
|
|
|
-}
|
|
|
+type CheckContractNameResp struct {
|
|
|
+ Exist int `json:"exist" description:"是否存在相似的合同:0不存在,1存在"`
|
|
|
+}
|