|
@@ -315,12 +315,29 @@ func (c *ApprovalCommon) Detail() {
|
|
|
c.FailWithMessage("获取失败", "获取权限信息失败,Err:"+err.Error())
|
|
|
return
|
|
|
}
|
|
|
+ // 权益主客观均选择的情况下进行合并
|
|
|
+ equityPermissionNameCount := make(map[string]int, 0)
|
|
|
for _, n := range items {
|
|
|
if _, ok := delayPermissionIdMap[n.ChartPermissionId]; ok {
|
|
|
checkList = append(checkList, n.ChartPermissionId)
|
|
|
}
|
|
|
+ equityPermissionNameCount[n.PermissionName] += 1
|
|
|
}
|
|
|
- plist.Items = items
|
|
|
+
|
|
|
+ newItems := make([]*company_report_permission.PermissionLookItem, 0)
|
|
|
+ mergedMap := make(map[string]bool, 0)
|
|
|
+ for _, n := range items {
|
|
|
+ if equityPermissionNameCount[n.PermissionName] == 2 && !mergedMap[n.PermissionName] {
|
|
|
+ newItems = append(newItems, n)
|
|
|
+ mergedMap[n.PermissionName] = true
|
|
|
+ }
|
|
|
+ if equityPermissionNameCount[n.PermissionName] == 1 {
|
|
|
+ n.PermissionName = n.Remark
|
|
|
+ newItems = append(newItems, n)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ plist.Items = newItems
|
|
|
plist.ClassifyName = v
|
|
|
plist.CheckList = checkList
|
|
|
|