ziwen 1 年之前
父节点
当前提交
6f4968bdd7
共有 2 个文件被更改,包括 14 次插入14 次删除
  1. 3 3
      controller/contract/pre_register.go
  2. 11 11
      controller/contract/register.go

+ 3 - 3
controller/contract/pre_register.go

@@ -168,7 +168,7 @@ func (rg *PreRegisterController) Add(c *gin.Context) {
 		currencyUnit = req.List[0].CurrencyUnit
 	}
 	// 获取销售分组信息
-	sellerList, e := crmService.GetSellerDepartmentListWithGroupAndTeam()
+	sellerList, e := crmService.GetSellerDepartmentListWithEnable()
 	if e != nil {
 		resp.FailData("获取销售失败", "Err:"+e.Error(), c)
 		return
@@ -443,7 +443,7 @@ func (rg *PreRegisterController) Edit(c *gin.Context) {
 		currencyUnit = req.List[0].CurrencyUnit
 	}
 	// 获取销售分组信息
-	sellerList, e := crmService.GetSellerDepartmentListWithGroupAndTeam()
+	sellerList, e := crmService.GetSellerDepartmentListWithEnable()
 	if e != nil {
 		resp.FailData("获取销售失败", "Err:"+e.Error(), c)
 		return
@@ -991,7 +991,7 @@ func (rg *PreRegisterController) Save(c *gin.Context) {
 	}
 
 	// 获取销售分组信息
-	sellerList, e := crmService.GetSellerDepartmentListWithGroupAndTeam()
+	sellerList, e := crmService.GetSellerDepartmentListWithEnable()
 	if e != nil {
 		resp.FailData("获取销售失败", "Err:"+e.Error(), c)
 		return

+ 11 - 11
controller/contract/register.go

@@ -413,15 +413,15 @@ func (rg *RegisterController) Add(c *gin.Context) {
 		}
 
 		// 获取销售分组信息
-		sellerList, e := crmService.GetSellerDepartmentListWithGroupAndTeam()
-		if e != nil {
-			resp.FailData("获取销售失败", "Err:"+e.Error(), c)
-			return
-		}
-		sellerMap := make(map[int]*crm.SellerAdminWithGroupTeam)
-		for i := range sellerList {
-			sellerMap[sellerList[i].SellerId] = sellerList[i]
-		}
+		//sellerList, e := crmService.GetSellerDepartmentListWithGroupAndTeam()
+		//if e != nil {
+		//	resp.FailData("获取销售失败", "Err:"+e.Error(), c)
+		//	return
+		//}
+		//sellerMap := make(map[int]*crm.SellerAdminWithGroupTeam)
+		//for i := range sellerList {
+		//	sellerMap[sellerList[i].SellerId] = sellerList[i]
+		//}
 		//处理重复公司名日期等重复的开票到款记录
 		dupList, e := fms.GetDuplicateContractInvoiceDetailItemList(ob.CompanyName, req.StartDate, req.EndDate)
 		if e != nil {
@@ -1408,7 +1408,7 @@ func (rg *RegisterController) Invoice(c *gin.Context) {
 		dayDiff := item.EndDate.Sub(item.StartDate).Hours() / 24
 
 		// 获取销售分组信息
-		sellerList, e := crmService.GetSellerDepartmentListWithGroupAndTeam()
+		sellerList, e := crmService.GetSellerDepartmentListWithEnable()
 		if e != nil {
 			resp.FailData("获取销售失败", "Err:"+e.Error(), c)
 			return
@@ -2673,7 +2673,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
 	}
 
 	// 获取所有销售Map
-	sellerList, e := crmService.GetSellerDepartmentListWithGroupAndTeam()
+	sellerList, e := crmService.GetSellerDepartmentListWithEnable()
 	if e != nil {
 		resp.FailData("获取销售列表失败", "Err:"+e.Error(), c)
 		return