|
@@ -697,8 +697,8 @@ func (this *ContractAllocationController) CompanyContracUpdate() {
|
|
|
return
|
|
|
}
|
|
|
if mapIsGray[companyContractId] {
|
|
|
- br.Msg = "超过90天,无法修改!"
|
|
|
- br.ErrMsg = "超过90天,无法修改,companyContractId :" + strconv.Itoa(companyContractId)
|
|
|
+ br.Msg = "超过180天,无法修改!"
|
|
|
+ br.ErrMsg = "超过180天,无法修改,companyContractId :" + strconv.Itoa(companyContractId)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -783,16 +783,15 @@ func (this *ContractAllocationController) CompanyContracUpdate() {
|
|
|
item.CreateTime = time.Now()
|
|
|
item.ModifyTime = time.Now()
|
|
|
items = append(items, item)
|
|
|
+ proportionSum += v2.Proportion
|
|
|
}
|
|
|
if v.ChartPermissionName == utils.CHART_PERMISSION_NAME_MF_YANXUAN {
|
|
|
continue
|
|
|
}
|
|
|
- proportionSum += v.Proportion
|
|
|
}
|
|
|
-
|
|
|
if proportionSum > 100.5 || proportionSum < 99.5 {
|
|
|
br.Msg = "操作失败,派点填写信息错误"
|
|
|
- br.ErrMsg = "获取合同信息失败,Err:" + fmt.Sprint(proportionSum)
|
|
|
+ br.ErrMsg = "操作失败,派点填写信息错误,Err:" + fmt.Sprint(proportionSum)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -937,7 +936,7 @@ func (this *ContractAllocationController) CompanyContractStatistics() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- mapPermissionUser := make(map[string][]*cygx.AllocationRealNameStatisticsListResp)
|
|
|
+ mapPermissionUser := make(map[string][]*cygx.AllocationRealNameStatisticsListResp) //行业分组 map
|
|
|
|
|
|
for _, v := range sysUserList {
|
|
|
item := new(cygx.AllocationRealNameStatisticsListResp)
|
|
@@ -989,8 +988,8 @@ func (this *ContractAllocationController) CompanyContractStatistics() {
|
|
|
item.DepartmentProportion = "0"
|
|
|
}
|
|
|
item.DepartmentProportion += "%"
|
|
|
-
|
|
|
mapPermissionUser[k] = append(mapPermissionUser[k], item)
|
|
|
+
|
|
|
item = new(cygx.AllocationRealNameStatisticsListResp)
|
|
|
item.RealName = "平均"
|
|
|
item.TotalRelatedContract = utils.SubFloatToFloat(mapPermissionAllocation[k]/float64(lenUser), 2)
|
|
@@ -1000,7 +999,7 @@ func (this *ContractAllocationController) CompanyContractStatistics() {
|
|
|
if mapPermissionMoney[k] == 0 {
|
|
|
item.GroupProportion = ""
|
|
|
} else {
|
|
|
- item.GroupProportion = utils.SubFloatToString(1/mapPermissionMoney[k]*100, 2)
|
|
|
+ item.GroupProportion = utils.SubFloatToString(1/(float64(len(mapPermissionUser[k])-1))*100, 2)
|
|
|
}
|
|
|
if item.GroupProportion == "" {
|
|
|
item.GroupProportion = "0"
|