Commit 914ae58d authored by W_Y's avatar W_Y

代码完善

parent 69ed36a3
......@@ -31,6 +31,10 @@ public class CarReviewTask implements Serializable {
public static final String TASK_STATUS_FINISH = "FINISH";
@TableField(exist = false)
public static final String TYPE = "car";
@TableField(exist = false)
public static final String REVIEW_STATUS_NONE = "NONE";
......
......@@ -36,6 +36,10 @@ public class SystemReviewTask {
public static final String STATUS_CLOSE = "CLOSE";
@TableField(exist = false)
public static final String TYPE = "system";
/**
* 主键
*/
......
......@@ -90,11 +90,11 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
@Override
public void doConfirmReview(CarReviewTask carReviewTask) {
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(carReviewTask.getId(),"car");
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(carReviewTask.getId(),CarReviewTask.TYPE);
List<ReviewTaskInbox> inboxList = reviewTaskInboxMapper.findConfirmListByTaskId(carReviewTask.getId());
if (detailsList.size() != 0) {
if (detailsList.size() != 0 && detailsList != null) {
throw new ServiceException("存在未填写的问卷,请填写完整", HttpStatus.ERROR, detailsList);
}else if (inboxList.size() != 0 ) {
} else if (inboxList.size() != 0 && inboxList != null){
throw new ServiceException("存在未确认的场景变更信息,请确认", HttpStatus.ERROR);
}else {
// 1. 获取最新问卷
......
......@@ -72,13 +72,11 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
@Override
public void doConfirm(SystemReviewTask systemReviewTask) {
// TODO
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(systemReviewTask.getId(),"system");
System.out.println("detailsList = " + detailsList);
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(systemReviewTask.getId(),SystemReviewTask.TYPE);
List<ReviewTaskInbox> inboxList = reviewTaskInboxMapper.findConfirmListByTaskId(systemReviewTask.getId());
if (detailsList.size() != 0) {
if (detailsList.size() != 0 && detailsList != null) {
throw new ServiceException("存在未填写的问卷,请填写完整", HttpStatus.ERROR, detailsList);
} else if (inboxList.size() != 0){
} else if (inboxList.size() != 0 && inboxList != null){
throw new ServiceException("存在未确认的场景变更信息,请确认", HttpStatus.ERROR);
} else {
// 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