Commit 452103c9 authored by 赵啸非's avatar 赵啸非

修改自动考核后续服务

parent 4ca6e94d
......@@ -77,12 +77,12 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
//已反馈
//查询我已经回答过的
List<Long> feedbackIdList = answerService.find(new FeedbackAnswerQuery().staffId(context.getUser().getCustomerId())).stream().map(i -> i.getFeedbackId()).distinct().collect(Collectors.toList());
if(ObjectUtils.isEmpty(feedbackIdList)){
if (ObjectUtils.isEmpty(feedbackIdList)) {
pageAllInfo.setTotalResult(0);
model.put(PAGEINFO_KEY, pageAllInfo);
model.put(KEY_RESULT_DATA, new ArrayList<>());
parsePageInfo(model, pageAllInfo);
}else{
} else {
FeedbackQuery feedbackQuery = new FeedbackQuery();
feedbackQuery.setIdList(feedbackIdList);
feedbackQuery.setCreateTimeStart(feedbackReq.getFeedBackStartDate());
......@@ -94,10 +94,10 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
}
} else {
//未反馈
//查询我的反馈 但是还未回答的
//查询我的反馈 已经回答的
List<Long> feedbackIdList = answerService.find(new FeedbackAnswerQuery().staffId(context.getUser().getCustomerId())).stream().map(i -> i.getFeedbackId()).distinct().collect(Collectors.toList());
if(ObjectUtils.isEmpty(feedbackIdList)){
if (ObjectUtils.isEmpty(feedbackIdList)) {
//全部未反馈
FeedbackStaffQuery feedbackStaffQuery = new FeedbackStaffQuery();
feedbackStaffQuery.setStaffId(context.getUser().getCustomerId());
......@@ -113,12 +113,19 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
model.put(PAGEINFO_KEY, result.getPageInfo());
model.put(KEY_RESULT_DATA, result.getList());
parsePageInfo(model, result.getPageInfo());
}else{
} else {
FeedbackStaffQuery feedbackStaffQuery = new FeedbackStaffQuery();
feedbackStaffQuery.setFeedbackIdNotList(feedbackIdList);
feedbackStaffQuery.setStaffId(context.getUser().getCustomerId());
List<Long> unfinFeedbackList = feedbackStaffService.find(feedbackStaffQuery).stream().map(i -> i.getFeedbackId()).distinct().collect(Collectors.toList());
if (ObjectUtils.isEmpty(unfinFeedbackList)) {
//都已经反馈过了
pageAllInfo.setTotalResult(0);
model.put(PAGEINFO_KEY, pageAllInfo);
model.put(KEY_RESULT_DATA, new ArrayList<>());
parsePageInfo(model, pageAllInfo);
} else {
FeedbackQuery feedbackQuery = new FeedbackQuery();
feedbackQuery.setIdList(unfinFeedbackList);
feedbackQuery.setCreateTimeStart(feedbackReq.getFeedBackStartDate());
......@@ -129,6 +136,7 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
parsePageInfo(model, result.getPageInfo());
}
}
}
rest.setData(model);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
......@@ -154,7 +162,7 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
//如果时间已经结束 则不能再提交
FeedbackEntity feedbackEntity = feedbackService.get(req.getFeedbackId(), context);
if(ObjectUtils.isEmpty(feedbackEntity)) throw new AppException("未找到当前问卷,请联系管理员!");
if (ObjectUtils.isEmpty(feedbackEntity)) throw new AppException("未找到当前问卷,请联系管理员!");
if (DateUtil.compare(new Date(), feedbackEntity.getFeedbackTimeStart()) < 0)
throw new AppException("当前反馈问卷信息还未开始!");
if (DateUtil.compare(new Date(), feedbackEntity.getFeedbackTimeEnd()) > 0)
......
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