Commit b8ecf83c by jianan

添加【其他】下标签任务,活动量分值没有对应增加

parent 73731bd5
......@@ -69,7 +69,7 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
if (!CommonUtil.isNullOrBlank(taskTimeFrom) && !CommonUtil.isNullOrBlank(taskTimeEnd)) {
int count = scheduleTrackMapper.checkTimePeriodConflict(taskTimeFrom, taskTimeEnd, practitionerId);
if (count > 0) {
resp.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("830020")));
resp.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830020")));
return resp;
}
} else {
......@@ -350,18 +350,23 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
for (ScheduleTrack schedule : scheduleList) {
if (saleOption.contains(schedule.getMdDropOptionId().intValue())) {
saleScore += schedule.getTrackScore();
continue;
}
if (RecruitOption.contains(schedule.getMdDropOptionId().intValue())) {
recruitScore += schedule.getTrackScore();
continue;
}
if (223 == schedule.getMdDropOptionId()) {
coachScore += this.calculateScheduleDisplayCount(schedule, startDate, endDate) * schedule.getTrackScore();
continue;
}
if (224 == schedule.getMdDropOptionId()) {
coachScore += this.calculateScheduleDisplayCount(schedule, startDate, endDate) * schedule.getTrackScore();
continue;
}
if (226 == schedule.getMdDropOptionId()) {
coachScore += this.calculateScheduleDisplayCount(schedule, startDate, endDate) * schedule.getTrackScore();
continue;
}
}
......@@ -528,6 +533,41 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
if (Integer.valueOf(7).equals(s.getTaskRoutineAtweek1())) {
count += CommonUtil.weekDayCount(firstDay, lastDay, 7);
}
// 判断trackTime是否在时间范围内
Date trackTime= s.getTrackTime();
if (trackTime.compareTo(firstDay)>=0 && trackTime.compareTo(lastDay)<=0) {
String week = CommonUtil.getWeekOfDate(trackTime);
Integer flag = 0;
switch (week) {
case "1":
flag = s.getTaskRoutineAtweek1();
break;
case "2":
flag = s.getTaskRoutineAtweek2();
break;
case "3":
flag = s.getTaskRoutineAtweek3();
break;
case "4":
flag = s.getTaskRoutineAtweek4();
break;
case "5":
flag = s.getTaskRoutineAtweek5();
break;
case "6":
flag = s.getTaskRoutineAtweek6();
break;
case "0":
flag = s.getTaskRoutineAtweek7();
break;
default:
break;
}
// trackTime星期与长期固定星期不重复
if (!Integer.valueOf(1).equals(flag)) {
count += 1;
}
}
return count;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment