|
@@ -681,9 +681,9 @@ func (this *EnterScoreController) EnterScoreScoreOverview() {
|
|
pars = append(pars, startDate, endDate)
|
|
pars = append(pars, startDate, endDate)
|
|
}
|
|
}
|
|
|
|
|
|
- if enterScoreType == 2 {
|
|
+
|
|
- condition += ` AND enter_score_type = 2 `
|
|
+
|
|
- }
|
|
+
|
|
|
|
|
|
if keyWord != "" {
|
|
if keyWord != "" {
|
|
condition += ` AND securities_firms_name LIKE '%` + keyWord + `%' `
|
|
condition += ` AND securities_firms_name LIKE '%` + keyWord + `%' `
|
|
@@ -703,10 +703,12 @@ func (this *EnterScoreController) EnterScoreScoreOverview() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
mapenterScoreTypeCompanyIds := make(map[int]bool)
|
|
mapenterScoreTypeCompanyIds := make(map[int]bool)
|
|
|
|
+ mapenterScoreProportionTotal := make(map[int]float64)
|
|
var enterScoreIds []int
|
|
var enterScoreIds []int
|
|
mapenterScore := make(map[int]*cygx.CygxEnterScore)
|
|
mapenterScore := make(map[int]*cygx.CygxEnterScore)
|
|
for _, v := range list {
|
|
for _, v := range list {
|
|
mapenterScore[v.CompanyId] = v
|
|
mapenterScore[v.CompanyId] = v
|
|
|
|
+ mapenterScoreProportionTotal[v.CompanyId] = v.ProportionTotal
|
|
enterScoreIds = append(enterScoreIds, v.EnterScoreId)
|
|
enterScoreIds = append(enterScoreIds, v.EnterScoreId)
|
|
if v.EnterScoreType == 2 {
|
|
if v.EnterScoreType == 2 {
|
|
mapenterScoreTypeCompanyIds[v.CompanyId] = true
|
|
mapenterScoreTypeCompanyIds[v.CompanyId] = true
|
|
@@ -785,7 +787,13 @@ func (this *EnterScoreController) EnterScoreScoreOverview() {
|
|
researcherArr = append(researcherArr, v.RealName)
|
|
researcherArr = append(researcherArr, v.RealName)
|
|
mapResearcherbool[v.RealName] = true
|
|
mapResearcherbool[v.RealName] = true
|
|
}
|
|
}
|
|
- mapResearcherProportion[fmt.Sprint(v.RealName, "_", v.CompanyId)] = fmt.Sprint(v.Proportion)
|
|
+
|
|
|
|
+ if enterScoreType == 2 && !mapenterScoreTypeCompanyIds[v.CompanyId] {
|
|
|
|
+ mapResearcherProportion[fmt.Sprint(v.RealName, "_", v.CompanyId)] = utils.SubFloatToString(v.Proportion/mapenterScoreProportionTotal[v.CompanyId]*100, 2)
|
|
|
|
+ } else {
|
|
|
|
+ mapResearcherProportion[fmt.Sprint(v.RealName, "_", v.CompanyId)] = fmt.Sprint(v.Proportion)
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
mapResearcherProportionText := make(map[string][]string)
|
|
mapResearcherProportionText := make(map[string][]string)
|
|
@@ -798,7 +806,7 @@ func (this *EnterScoreController) EnterScoreScoreOverview() {
|
|
} else {
|
|
} else {
|
|
proportionText = "0"
|
|
proportionText = "0"
|
|
}
|
|
}
|
|
- if mapenterScoreTypeCompanyIds[vC.CompanyId] {
|
|
+ if mapenterScoreTypeCompanyIds[vC.CompanyId] || enterScoreType == 2 {
|
|
proportionText += "%"
|
|
proportionText += "%"
|
|
}
|
|
}
|
|
mapResearcherProportionText[vR] = append(mapResearcherProportionText[vR], proportionText)
|
|
mapResearcherProportionText[vR] = append(mapResearcherProportionText[vR], proportionText)
|
|
@@ -832,7 +840,13 @@ func (this *EnterScoreController) EnterScoreScoreOverview() {
|
|
if v.Proportion == 0 {
|
|
if v.Proportion == 0 {
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
- mapPermissionProportion[fmt.Sprint(v.ChartPermissionName, "_", v.CompanyId)] = fmt.Sprint(v.Proportion)
|
|
+
|
|
|
|
+
|
|
|
|
+ if enterScoreType == 2 && !mapenterScoreTypeCompanyIds[v.CompanyId] {
|
|
|
|
+ mapPermissionProportion[fmt.Sprint(v.ChartPermissionName, "_", v.CompanyId)] = utils.SubFloatToString(v.Proportion/mapenterScoreProportionTotal[v.CompanyId]*100, 2)
|
|
|
|
+ } else {
|
|
|
|
+ mapPermissionProportion[fmt.Sprint(v.ChartPermissionName, "_", v.CompanyId)] = fmt.Sprint(v.Proportion)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
var permissionArr []string
|
|
var permissionArr []string
|
|
@@ -854,7 +868,7 @@ func (this *EnterScoreController) EnterScoreScoreOverview() {
|
|
} else {
|
|
} else {
|
|
proportionText = "0"
|
|
proportionText = "0"
|
|
}
|
|
}
|
|
- if mapenterScoreTypeCompanyIds[vC.CompanyId] {
|
|
+ if mapenterScoreTypeCompanyIds[vC.CompanyId] || enterScoreType == 2 {
|
|
proportionText += "%"
|
|
proportionText += "%"
|
|
}
|
|
}
|
|
mapPermissionProportionText[vP] = append(mapPermissionProportionText[vP], proportionText)
|
|
mapPermissionProportionText[vP] = append(mapPermissionProportionText[vP], proportionText)
|
|
@@ -880,7 +894,14 @@ func (this *EnterScoreController) EnterScoreScoreOverview() {
|
|
var groupArr []string
|
|
var groupArr []string
|
|
mapGroupbool := make(map[string]bool)
|
|
mapGroupbool := make(map[string]bool)
|
|
for _, v := range listGroup {
|
|
for _, v := range listGroup {
|
|
- mapGroupProportion[fmt.Sprint(v.GroupName, "_", v.CompanyId)] = fmt.Sprint(v.Proportion)
|
|
+
|
|
|
|
+ if enterScoreType == 2 && !mapenterScoreTypeCompanyIds[v.CompanyId] {
|
|
|
|
+ mapGroupProportion[fmt.Sprint(v.GroupName, "_", v.CompanyId)] = utils.SubFloatToString(v.Proportion/mapenterScoreProportionTotal[v.CompanyId]*100, 2)
|
|
|
|
+ } else {
|
|
|
|
+ mapGroupProportion[fmt.Sprint(v.GroupName, "_", v.CompanyId)] = fmt.Sprint(v.Proportion)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
if mapGroupbool[v.GroupName] {
|
|
if mapGroupbool[v.GroupName] {
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
@@ -896,7 +917,7 @@ func (this *EnterScoreController) EnterScoreScoreOverview() {
|
|
} else {
|
|
} else {
|
|
proportionText = "0"
|
|
proportionText = "0"
|
|
}
|
|
}
|
|
- if mapenterScoreTypeCompanyIds[vC.CompanyId] {
|
|
+ if mapenterScoreTypeCompanyIds[vC.CompanyId] || enterScoreType == 2 {
|
|
proportionText += "%"
|
|
proportionText += "%"
|
|
}
|
|
}
|
|
mapGroupProportionText[vP] = append(mapGroupProportionText[vP], proportionText)
|
|
mapGroupProportionText[vP] = append(mapGroupProportionText[vP], proportionText)
|