Commit 0f652e37 by jianan

日程查询接口联调bug修复

parent 93004b28
......@@ -145,7 +145,7 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
QueryScheduleTrackListResponseVO resp = new QueryScheduleTrackListResponseVO();
Long practitionerId = requestVO.getPractitionerId();
String trackDate = requestVO.getTrackDate();
String trackDate = requestVO.getTrackTime();
if (StringUtils.isEmpty(trackDate) || null == practitionerId) {
resp.setCommonResult(new CommonResult(true, "经纪人id和查询时间不能为空"));
return resp;
......@@ -168,7 +168,7 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
resp.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
} catch (Exception e) {
e.printStackTrace();
resp.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800001")));
resp.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("800001")));
}
return resp;
}
......@@ -189,7 +189,7 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
Date date = CommonUtil.stringParseDate(trackDate, "yyyy-MM-dd");
String week = CommonUtil.getWeekOfDate(date);
String trackTime = CommonUtil.dateParseString(track.getTrackTime(), "yyyy-MM-dd");
int flag = 0;
Integer flag = 0;
switch (week) {
case "1":
flag = track.getTaskRoutineAtweek1();
......@@ -215,7 +215,7 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
default:
break;
}
if (trackTime.equals(trackDate) || flag == 1) {
if (trackTime.equals(trackDate) || Integer.valueOf(1).equals(flag)) {
return true;
} else {
return false;
......@@ -319,25 +319,25 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
private long calculateScheduleDisplayCount(ScheduleTrack s, Date firstDay, Date lastDay) {
long count = 0L;
if (1 == s.getTaskRoutineAtweek1()) {
if (Integer.valueOf(1).equals(s.getTaskRoutineAtweek1())) {
count += CommonUtil.weekDayCount(firstDay, lastDay, 1);
}
if (1 == s.getTaskRoutineAtweek2()) {
if (Integer.valueOf(2).equals(s.getTaskRoutineAtweek1())) {
count += CommonUtil.weekDayCount(firstDay, lastDay, 2);
}
if (1 == s.getTaskRoutineAtweek3()) {
if (Integer.valueOf(3).equals(s.getTaskRoutineAtweek1())) {
count += CommonUtil.weekDayCount(firstDay, lastDay, 3);
}
if (1 == s.getTaskRoutineAtweek4()) {
if (Integer.valueOf(4).equals(s.getTaskRoutineAtweek1())) {
count += CommonUtil.weekDayCount(firstDay, lastDay, 4);
}
if (1 == s.getTaskRoutineAtweek5()) {
if (Integer.valueOf(5).equals(s.getTaskRoutineAtweek1())) {
count += CommonUtil.weekDayCount(firstDay, lastDay, 5);
}
if (1 == s.getTaskRoutineAtweek6()) {
if (Integer.valueOf(6).equals(s.getTaskRoutineAtweek1())) {
count += CommonUtil.weekDayCount(firstDay, lastDay, 6);
}
if (1 == s.getTaskRoutineAtweek7()) {
if (Integer.valueOf(7).equals(s.getTaskRoutineAtweek1())) {
count += CommonUtil.weekDayCount(firstDay, lastDay, 7);
}
return count;
......
......@@ -5,5 +5,5 @@ import lombok.Data;
@Data
public class QueryScheduleTrackListRequestVO {
private Long practitionerId;
private String trackDate;
private String trackTime;
}
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