|
@@ -1882,8 +1882,8 @@ func SpecialActivityPointsBillRoadShowReduce(log models.YanXuanActivityPointsRed
|
|
|
}
|
|
|
|
|
|
pars = make([]interface{}, 0)
|
|
|
- condition = ` AND activity_id = ? AND company_id = ? AND table_source = 'roadshow' AND researcher_id > 0 ORDER BY id DESC `
|
|
|
- pars = append(pars, activityId, companyId)
|
|
|
+ condition = ` AND activity_id = ? AND table_source = 'roadshow' AND researcher_id > 0 ORDER BY id DESC `
|
|
|
+ pars = append(pars, activityId)
|
|
|
//获取扣点的流水记录
|
|
|
activityPointsBillList, e := models.GetCygxActivitySpecialTripBill(condition, pars)
|
|
|
if e != nil && e.Error() != utils.ErrNoRow() {
|
|
@@ -1895,7 +1895,7 @@ func SpecialActivityPointsBillRoadShowReduce(log models.YanXuanActivityPointsRed
|
|
|
for _, v := range activityPointsBillList { //获取这场路演,某个研究员最后一次的扣点记录
|
|
|
if mapActivityPointsBill[v.ResearcherId] == nil {
|
|
|
mapActivityPointsBill[v.ResearcherId] = v
|
|
|
- if v.BillDetailed < 0 {
|
|
|
+ if v.BillDetailed <= 0 && v.DoType == 1 {
|
|
|
itemsOld = append(itemsOld, v)
|
|
|
}
|
|
|
}
|
|
@@ -1944,9 +1944,9 @@ func SpecialActivityPointsBillRoadShowReduce(log models.YanXuanActivityPointsRed
|
|
|
//return
|
|
|
var items []*models.CygxActivitySpecialTripBill
|
|
|
var itemCompanys []*models.CygxActivitySpecialPermissionPoints
|
|
|
- mapMeetUserId := make(map[int]bool)
|
|
|
+ //mapResearcherId := make(map[int]bool)
|
|
|
for _, user := range researcherList {
|
|
|
- mapMeetUserId[user.ResearcherId] = true
|
|
|
+ //mapResearcherId[user.ResearcherId] = true
|
|
|
item := new(models.CygxActivitySpecialTripBill)
|
|
|
item.ActivityId = activityId
|
|
|
item.CreateTime = time.Now()
|
|
@@ -1983,9 +1983,9 @@ func SpecialActivityPointsBillRoadShowReduce(log models.YanXuanActivityPointsRed
|
|
|
|
|
|
if len(itemsOld) > 0 {
|
|
|
for _, user := range itemsOld {
|
|
|
- if mapMeetUserId[user.ResearcherId] {
|
|
|
- continue
|
|
|
- }
|
|
|
+ //if mapResearcherId[user.ResearcherId] {
|
|
|
+ // continue
|
|
|
+ //}
|
|
|
item := new(models.CygxActivitySpecialTripBill)
|
|
|
item.ActivityId = activityId
|
|
|
item.CreateTime = time.Now()
|