浏览代码

no message

xingzai 1 年之前
父节点
当前提交
cf934ba5aa
共有 3 个文件被更改,包括 9 次插入4 次删除
  1. 7 2
      controllers/cygx/contract_allocation.go
  2. 1 1
      models/cygx/company_contract.go
  3. 1 1
      services/cygx/contract_allocation.go

+ 7 - 2
controllers/cygx/contract_allocation.go

@@ -162,6 +162,9 @@ func (this *ContractAllocationController) CompanyContractList() {
 	var condition string
 	var pars []interface{}
 
+	condition += ` AND a.create_time >= ? AND a.create_time <= ? `
+	pars = append(pars, startDate+" 00:00:01", endDate+" 23:59:59")
+
 	//条件
 	if adminId != "" {
 		condition += ` AND c.seller_id in  (` + adminId + `) `
@@ -220,7 +223,7 @@ func (this *ContractAllocationController) CompanyContractList() {
 		var conditionAllocation string
 		var parsAllocation []interface{}
 
-		conditionAllocation = " AND  real_name = ? "
+		conditionAllocation = " AND  real_name = ? AND money != 0 "
 		parsAllocation = append(parsAllocation, researcherRealName)
 		allocationCompanyContractList, err := cygx.GetCygxAllocationCompanyContractList(conditionAllocation, parsAllocation)
 		if err != nil {
@@ -849,7 +852,8 @@ func (this *ContractAllocationController) CompanyContractStatistics() {
 	var condition string
 
 	var pars []interface{}
-
+	condition += ` AND a.create_time >= ? AND a.create_time <= ? `
+	pars = append(pars, startDate+" 00:00:01", endDate+" 23:59:59")
 	//根据当前角色来获取查询条件
 	//condition, pars = getQueryParams(condition, pars, sysUser, "c.")
 
@@ -881,6 +885,7 @@ func (this *ContractAllocationController) CompanyContractStatistics() {
 		br.ErrMsg = "获取失败,Err:" + err.Error()
 		return
 	}
+	//return
 	var companyContractIds []int
 	companyContractIdBool := make(map[int]bool)
 	for _, v := range listContract {

+ 1 - 1
models/cygx/company_contract.go

@@ -30,8 +30,8 @@ type CompanyContractResp struct {
 
 // 增量客户统计报表返回类
 type CompanyContractListResp struct {
-	List   []*CompanyContractResp
 	Paging *paging.PagingItem `description:"分页数据"`
+	List   []*CompanyContractResp
 }
 
 // 获取存量客户未续约报表列表统计数据(根据合同来展示)

+ 1 - 1
services/cygx/contract_allocation.go

@@ -137,7 +137,7 @@ func GetMapIsGrayByCompanyContractIds(companyContractIds []int) (mapResp map[int
 	return
 }
 
-//func init() {
+//func init3() {
 //	var condition string
 //	var pars []interface{}
 //	//默认只查询权益 2023-06-01 之后的合同