|
@@ -74,7 +74,7 @@ func (this *CompanyApplyController) ApplyContractHistoryList() {
|
|
|
// raiPermissions = ps
|
|
|
//}
|
|
|
|
|
|
- expMap := map[int]string{0: "(3w)", 1: "(5w)"} // 买方研选价格
|
|
|
+ //expMap := map[int]string{0: "(3w)", 1: "(5w)"} // 买方研选价格
|
|
|
for i := 0; i < listLen; i++ {
|
|
|
companyContract := list[i]
|
|
|
list[i].ModifyTimeStr = companyContract.ModifyTime.Format(utils.FormatDateTime)
|
|
@@ -120,6 +120,7 @@ func (this *CompanyApplyController) ApplyContractHistoryList() {
|
|
|
// br.ErrMsg = "获取权限信息失败,Err:" + err.Error()
|
|
|
// return
|
|
|
//}
|
|
|
+ var expensiveYx int
|
|
|
hasPermissions, e := company.GetCompanyContractPermissionByCompanyContractId(companyContract.CompanyContractId)
|
|
|
if e != nil {
|
|
|
br.Msg = "获取失败"
|
|
@@ -129,6 +130,9 @@ func (this *CompanyApplyController) ApplyContractHistoryList() {
|
|
|
hasMap := make(map[int]*company.CompanyContractPermission)
|
|
|
for _, p := range hasPermissions {
|
|
|
hasMap[p.ChartPermissionId] = p
|
|
|
+ if p.ExpensiveYx > 0 {
|
|
|
+ expensiveYx = p.ExpensiveYx
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
checkItems := make([]*company.PermissionLookItem, 0)
|
|
@@ -155,7 +159,14 @@ func (this *CompanyApplyController) ApplyContractHistoryList() {
|
|
|
}
|
|
|
// 买方研选(3w/5w)
|
|
|
if n.PermissionName == utils.CHART_PERMISSION_NAME_MF_YANXUAN {
|
|
|
- n.PermissionName += expMap[match.ExpensiveYx]
|
|
|
+ if expensiveYx == 1 {
|
|
|
+ n.PermissionName += "(5w)"
|
|
|
+ } else if expensiveYx == 2 {
|
|
|
+ n.PermissionName += "(10w)"
|
|
|
+ } else if expensiveYx == 0 {
|
|
|
+ n.PermissionName += "(3w)"
|
|
|
+ }
|
|
|
+ //n.PermissionName += expMap[match.ExpensiveYx]
|
|
|
checkList = append(checkList, n.ChartPermissionId)
|
|
|
checkItems = append(checkItems, n)
|
|
|
continue
|
|
@@ -390,8 +401,8 @@ func (this *CompanyApplyController) ApplyContractDetail() {
|
|
|
}
|
|
|
permissions := make([]int, 0) // 合同权限IDs
|
|
|
checkItems := make([]*company.PermissionLookItem, 0)
|
|
|
- expMap := map[bool]string{false: "(3w)", true: "(5w)"} // 买方研选价格
|
|
|
-
|
|
|
+ //expMap := map[bool]string{false: "(3w)", true: "(5w)"} // 买方研选价格
|
|
|
+ var expensiveYx int
|
|
|
// 未选大套餐, 走老逻辑
|
|
|
if detail.RaiPackageType == 0 {
|
|
|
mapUpgrade := make(map[int]bool) // 通过合同获取所勾选的升级行业权限
|
|
@@ -400,8 +411,9 @@ func (this *CompanyApplyController) 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)
|
|
|
}
|
|
@@ -438,7 +450,12 @@ func (this *CompanyApplyController) 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]]
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -474,7 +491,12 @@ func (this *CompanyApplyController) ApplyContractDetail() {
|
|
|
continue
|
|
|
}
|
|
|
if n.ChartPermissionId == utils.CHART_PERMISSION_ID_YANXUAN {
|
|
|
- n.PermissionName += expMap[mapExpensive[n.ChartPermissionId]]
|
|
|
+ //n.PermissionName += expMap[mapExpensive[n.ChartPermissionId]]
|
|
|
+ if expensiveYx == 1 {
|
|
|
+ n.PermissionName += "(5w)"
|
|
|
+ } else if expensiveYx == 2 {
|
|
|
+ n.PermissionName += "(10w)"
|
|
|
+ }
|
|
|
}
|
|
|
if utils.InArrayByInt(permissions, n.ChartPermissionId) {
|
|
|
checkList = append(checkList, n.ChartPermissionId)
|