|
@@ -269,11 +269,11 @@ func GetChartPermissionSpecialSurplusByCompany(companyId int) (userType int, tri
|
|
err = errors.New("GetActivitySpecialTripCountByActivitySpecial, Err: " + e.Error())
|
|
err = errors.New("GetActivitySpecialTripCountByActivitySpecial, Err: " + e.Error())
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- // 获取继承点数
|
|
|
|
- inheritList, e := models.GetCygxActivitySpecialInheritPointsByCompanyId(companyId)
|
|
|
|
- if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
- err = errors.New("GetCygxActivitySpecialInheritPointsByCompanyId, Err: " + e.Error())
|
|
|
|
- }
|
|
|
|
|
|
+ //// 获取继承点数
|
|
|
|
+ //inheritList, e := models.GetCygxActivitySpecialInheritPointsByCompanyId(companyId)
|
|
|
|
+ //if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ // err = errors.New("GetCygxActivitySpecialInheritPointsByCompanyId, Err: " + e.Error())
|
|
|
|
+ //}
|
|
if userType == 2 {
|
|
if userType == 2 {
|
|
|
|
|
|
var tripBillNum int
|
|
var tripBillNum int
|
|
@@ -283,13 +283,13 @@ func GetChartPermissionSpecialSurplusByCompany(companyId int) (userType int, tri
|
|
//}
|
|
//}
|
|
tripBillNum += v.BillDetailed
|
|
tripBillNum += v.BillDetailed
|
|
}
|
|
}
|
|
- if len(inheritList) > 0 {
|
|
|
|
- for _, v := range inheritList {
|
|
|
|
- if v.ChartPermissionId == 0 {
|
|
|
|
- tripBillNum += v.Points
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ //if len(inheritList) > 0 {
|
|
|
|
+ // for _, v := range inheritList {
|
|
|
|
+ // if v.ChartPermissionId == 0 {
|
|
|
|
+ // tripBillNum += v.Points
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
|
|
|
|
tripRemaining = tripBillNum
|
|
tripRemaining = tripBillNum
|
|
if tripRemaining < 0 {
|
|
if tripRemaining < 0 {
|
|
@@ -345,9 +345,9 @@ func GetChartPermissionSpecialSurplusByCompany(companyId int) (userType int, tri
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 通过继承获得的加点
|
|
// 通过继承获得的加点
|
|
- for _, v := range inheritList {
|
|
|
|
- mapInheritChartName[v.ChartPermissionName] = v.Points
|
|
|
|
- }
|
|
|
|
|
|
+ //for _, v := range inheritList {
|
|
|
|
+ // mapInheritChartName[v.ChartPermissionName] = v.Points
|
|
|
|
+ //}
|
|
for k, _ := range chartNameMap {
|
|
for k, _ := range chartNameMap {
|
|
if _, ok := mapChartName[k]; ok {
|
|
if _, ok := mapChartName[k]; ok {
|
|
if inherit, ok2 := mapInheritChartName[k]; ok2 {
|
|
if inherit, ok2 := mapInheritChartName[k]; ok2 {
|