Commit 41032b4b by jianan

日程时间冲突从当日显示日程列表中检测2.0

parent 7e9db769
...@@ -72,7 +72,6 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService { ...@@ -72,7 +72,6 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
Long mdDropOptionId = schedule.getMdDropOptionId(); Long mdDropOptionId = schedule.getMdDropOptionId();
// 判断活动时间段是否冲突 // 判断活动时间段是否冲突
if (!CommonUtil.isNullOrBlank(taskTimeFrom) && !CommonUtil.isNullOrBlank(taskTimeEnd)) { if (!CommonUtil.isNullOrBlank(taskTimeFrom) && !CommonUtil.isNullOrBlank(taskTimeEnd)) {
// int count = scheduleTrackMapper.checkTimePeriodConflict(trackTime, taskTimeFrom, taskTimeEnd, practitionerId);
boolean isConflict = this.checkTimePeriodConflict(trackTime, taskTimeFrom, taskTimeEnd, practitionerId); boolean isConflict = this.checkTimePeriodConflict(trackTime, taskTimeFrom, taskTimeEnd, practitionerId);
if (isConflict) { if (isConflict) {
resp.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830020"))); resp.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830020")));
...@@ -132,6 +131,7 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService { ...@@ -132,6 +131,7 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
taskEndTime = schedule.getTaskTimeEnd(); taskEndTime = schedule.getTaskTimeEnd();
if (taskStartTime.compareTo(taskTimeEnd)<0 && taskEndTime.compareTo(taskTimeFrom)>0) { if (taskStartTime.compareTo(taskTimeEnd)<0 && taskEndTime.compareTo(taskTimeFrom)>0) {
isConflict = true; isConflict = true;
break;
} }
} }
return isConflict; return isConflict;
......
...@@ -109,12 +109,8 @@ ...@@ -109,12 +109,8 @@
p.mobile_no, p.mobile_no,
p.customer_id, p.customer_id,
sum(case when to_days(t.track_time) = to_days(now()) then COALESCE(t.track_score,0) else 0 end) dayScore, sum(case when to_days(t.track_time) = to_days(now()) then COALESCE(t.track_score,0) else 0 end) dayScore,
sum(case when YEARWEEK(date_format(t.track_time,'%Y-%m-%d'),1) = YEARWEEK(now(),1) sum(case when YEARWEEK(date_format(t.track_time,'%Y-%m-%d'),1) = YEARWEEK(now(),1) then COALESCE(t.track_score,0) else 0 end) weekScore,
and to_days(t.track_time) &lt;= to_days(now()) sum(case when date_format(t.track_time,'%Y-%m')=date_format(now(),'%Y-%m') then COALESCE(t.track_score,0) else 0 end) monthScore
then COALESCE(t.track_score,0) else 0 end) weekScore,
sum(case when date_format(t.track_time,'%Y-%m')=date_format(now(),'%Y-%m')
and to_days(t.track_time) &lt;= to_days(now())
then COALESCE(t.track_score,0) else 0 end) monthScore
from ag_acl_practitioner p from ag_acl_practitioner p
left join (select practitioner_id, track_time, track_score left join (select practitioner_id, track_time, track_score
from ag_mkt_schedule_task_tracking from ag_mkt_schedule_task_tracking
...@@ -122,6 +118,7 @@ ...@@ -122,6 +118,7 @@
(SELECT o.id FROM ag_md_drop_options o LEFT JOIN ag_md_drop_master m ON m.id = o.drop_master_id (SELECT o.id FROM ag_md_drop_options o LEFT JOIN ag_md_drop_master m ON m.id = o.drop_master_id
WHERE m.scenario_code = 'pep_schedule_task_others') WHERE m.scenario_code = 'pep_schedule_task_others')
and date_format(track_time,'%Y-%m')=date_format(now(),'%Y-%m') and date_format(track_time,'%Y-%m')=date_format(now(),'%Y-%m')
and to_days(track_time) &lt;= to_days(now())
) t on p.id = t.practitioner_id ) t on p.id = t.practitioner_id
where 1=1 where 1=1
and p.is_active=1 and p.is_active=1
......
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