浏览代码

no message

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

+ 9 - 3
controllers/company_contract.go

@@ -89,7 +89,7 @@ func (c *CompanyContractCommon) ApplyContractDetail() {
 		permissions := make([]int, 0) // 合同权限IDs
 		checkItems := make([]*company_report_permission.PermissionLookItem, 0)
 		expMap := map[bool]string{false: "(3w)", true: "(5w)"} // 买方研选价格
-
+		var expensiveYx int
 		// 未选大套餐, 走老逻辑
 		if detail.RaiPackageType == 0 {
 			mapUpgrade := make(map[int]bool) // 通过合同获取所勾选的升级行业权限
@@ -98,8 +98,9 @@ func (c *CompanyContractCommon) ApplyContractDetail() {
 				if v.IsUpgrade == 1 {
 					mapUpgrade[v.ChartPermissionId] = true
 				}
-				if v.ExpensiveYx == 1 {
+				if v.ExpensiveYx > 0 {
 					mapExpensive[v.ChartPermissionId] = true
+					expensiveYx = v.ExpensiveYx
 				}
 				permissions = append(permissions, v.ChartPermissionId)
 			}
@@ -135,7 +136,12 @@ func (c *CompanyContractCommon) ApplyContractDetail() {
 					}
 					// 买方研选
 					if p.ChartPermissionId == utils.CHART_PERMISSION_ID_YANXUAN {
-						p.PermissionName += expMap[mapExpensive[p.ChartPermissionId]]
+						if expensiveYx == 1 {
+							p.PermissionName += "(5w)"
+						} else if expensiveYx == 2 {
+							p.PermissionName += "(10w)"
+						}
+						//p.PermissionName += expMap[mapExpensive[p.ChartPermissionId]]
 					}
 				}
 			}

+ 3 - 1
services/cygx/contract_allocation.go

@@ -44,7 +44,9 @@ func HandleAllocationCompanyContractByYanXuan(companyContractId int) (err error)
 		}
 		if v.ExpensiveYx == 1 {
 			expensiveYxmoney = 5
-		} else {
+		} else if v.ExpensiveYx == 2 {
+			expensiveYxmoney = 10
+		} else{
 			expensiveYxmoney = 3
 		}
 	}