|
@@ -1948,10 +1948,9 @@ func SpecialActivityPointsBillRoadShowReduce(log models.YanXuanActivityPointsRed
|
|
|
//return
|
|
|
var items []*models.CygxActivitySpecialTripBill
|
|
|
var itemCompanys []*models.CygxActivitySpecialPermissionPoints
|
|
|
- //mapResearcherId := make(map[int]bool)
|
|
|
+ mapOldResearcherId := make(map[string]bool)
|
|
|
for _, user := range researcherList {
|
|
|
keyBill := fmt.Sprint(user.ResearcherId, "_CID", companyId)
|
|
|
- //mapResearcherId[user.ResearcherId] = true
|
|
|
item := new(models.CygxActivitySpecialTripBill)
|
|
|
item.ActivityId = activityId
|
|
|
item.CreateTime = time.Now()
|
|
@@ -1966,6 +1965,7 @@ func SpecialActivityPointsBillRoadShowReduce(log models.YanXuanActivityPointsRed
|
|
|
item.TableSource = utils.CYGX_OBJ_ROADSHOW
|
|
|
|
|
|
if user.Status == 2 {
|
|
|
+ mapOldResearcherId[keyBill] = true
|
|
|
//如果没有扣点记录就对他们进行扣点处理
|
|
|
if mapActivityPointsBill[keyBill] == nil || mapActivityPointsBill[keyBill].DoType == 2 {
|
|
|
points := mapCompanyPoints[companyId] + billDetailed
|
|
@@ -2015,9 +2015,10 @@ func SpecialActivityPointsBillRoadShowReduce(log models.YanXuanActivityPointsRed
|
|
|
|
|
|
if len(itemsOld) > 0 {
|
|
|
for _, user := range itemsOld {
|
|
|
- //if mapResearcherId[user.ResearcherId] {
|
|
|
- // continue
|
|
|
- //}
|
|
|
+ keyBill := fmt.Sprint(user.ResearcherId, "_CID", companyId)
|
|
|
+ if mapOldResearcherId[keyBill] {
|
|
|
+ continue
|
|
|
+ }
|
|
|
item := new(models.CygxActivitySpecialTripBill)
|
|
|
item.ActivityId = activityId
|
|
|
item.CreateTime = time.Now()
|