|
@@ -543,10 +543,10 @@ func GetChartPermissionSpecialSurplusByCompany(companyId int) (userType int, tri
|
|
|
func ActivitySpecialCompanyApproval(companyId int, companyName string) (err error) {
|
|
|
userType, packageType, _, _, _ := GetUserType(companyId)
|
|
|
// 获取继承点数
|
|
|
- inheritList, e := cygx.GetCygxActivitySpecialInheritPointsByCompanyId(companyId)
|
|
|
- if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
- err = errors.New("GetCygxActivitySpecialInheritPointsByCompanyId, Err: " + e.Error())
|
|
|
- }
|
|
|
+ //inheritList, e := cygx.GetCygxActivitySpecialInheritPointsByCompanyId(companyId)
|
|
|
+ //if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
+ // err = errors.New("GetCygxActivitySpecialInheritPointsByCompanyId, Err: " + e.Error())
|
|
|
+ //}
|
|
|
chartNameMap := map[string]int{utils.YI_YAO_NAME: 0, utils.XIAO_FEI_NAME: 0, utils.KE_JI_NAME: 0, utils.ZHI_ZAO_NAME: 0}
|
|
|
|
|
|
itemBill := new(cygx.CygxActivitySpecialTripBill)
|
|
@@ -559,18 +559,18 @@ func ActivitySpecialCompanyApproval(companyId int, companyName string) (err erro
|
|
|
if userType == 2 {
|
|
|
packageTypeMap := map[int]int{1: 16, 2: 10}
|
|
|
totalTrip := packageTypeMap[packageType]
|
|
|
- if len(inheritList) > 0 {
|
|
|
- for _, v := range inheritList {
|
|
|
- if v.ChartPermissionId == 0 {
|
|
|
- itemBill.BillDetailed = totalTrip + v.Points
|
|
|
- } else {
|
|
|
- itemBill.BillDetailed = totalTrip
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- itemBill.BillDetailed = totalTrip
|
|
|
- }
|
|
|
-
|
|
|
+ //if len(inheritList) > 0 {
|
|
|
+ // for _, v := range inheritList {
|
|
|
+ // if v.ChartPermissionId == 0 {
|
|
|
+ // itemBill.BillDetailed = totalTrip + v.Points
|
|
|
+ // } else {
|
|
|
+ // itemBill.BillDetailed = totalTrip
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //} else {
|
|
|
+ // itemBill.BillDetailed = totalTrip
|
|
|
+ //}
|
|
|
+ itemBill.BillDetailed = totalTrip
|
|
|
itemBill.Total = strconv.Itoa(itemBill.BillDetailed) + "次"
|
|
|
if totalTrip == 10 {
|
|
|
itemBill.Content = "45w大套餐转正"
|
|
@@ -618,9 +618,9 @@ func ActivitySpecialCompanyApproval(companyId int, companyName string) (err erro
|
|
|
}
|
|
|
}
|
|
|
// 通过继承获得的加点
|
|
|
- for _, v := range inheritList {
|
|
|
- mapInheritChartName[v.ChartPermissionName] = v.Points
|
|
|
- }
|
|
|
+ //for _, v := range inheritList {
|
|
|
+ // mapInheritChartName[v.ChartPermissionName] = v.Points
|
|
|
+ //}
|
|
|
for k, _ := range chartNameMap {
|
|
|
if _, ok := mapChartName[k]; ok {
|
|
|
if inherit, ok2 := mapInheritChartName[k]; ok2 {
|