Commit 5a0af64e authored by wdy's avatar wdy

Merge branch 'wangdingyi' into 'dev'

表单提示信息&提交表单

See merge request !154
parents 5bd7f4c2 5b22df01
......@@ -128,7 +128,7 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(carReviewTask.getId(),CarReviewTask.TYPE);
List<ReviewTaskInbox> inboxList = reviewTaskInboxMapper.findConfirmListByTaskId(carReviewTask.getId());
if (detailsList.size() != 0 && detailsList != null) {
throw new ServiceException("存在未填写的问卷,请填写完整", HttpStatus.ERROR, detailsList);
throw new ServiceException("存在未填写的表单,请填写完整", HttpStatus.ERROR, detailsList);
} else if (inboxList.size() != 0 && inboxList != null){
throw new ServiceException("存在未确认的场景变更信息,请确认", HttpStatus.ERROR);
}else {
......
......@@ -88,7 +88,7 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(systemReviewTask.getId(),SystemReviewTask.TYPE);
List<ReviewTaskInbox> inboxList = reviewTaskInboxMapper.findConfirmListByTaskId(systemReviewTask.getId());
if (detailsList.size() != 0 && detailsList != null) {
throw new ServiceException("存在未填写的问卷,请填写完整", HttpStatus.ERROR, detailsList);
throw new ServiceException("存在未填写的表单,请填写完整", HttpStatus.ERROR, detailsList);
} else if (inboxList.size() != 0 && inboxList != null){
throw new ServiceException("存在未确认的场景变更信息,请确认", HttpStatus.ERROR);
} else {
......
......@@ -5,8 +5,10 @@ import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.domain.CarReviewTask;
import com.ruoyi.domain.SystemReviewTask;
import com.ruoyi.domain.Task;
import com.ruoyi.mapper.CarReviewTaskMapper;
import com.ruoyi.mapper.ReviewDetailsMapper;
import com.ruoyi.mapper.SystemReviewTaskMapper;
import com.ruoyi.service.TaskService;
import com.ruoyi.service.TaskState;
import org.springframework.beans.factory.InitializingBean;
......@@ -16,6 +18,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Objects;
@Transactional
@Service
......@@ -33,6 +36,12 @@ public class TaskStatePending extends TaskStateAdapter implements TaskState, Ini
@Autowired
private ApplicationContext applicationContext;
@Autowired
private SystemReviewTaskMapper systemReviewTaskMapper;
@Autowired
private CarReviewTaskMapper carReviewTaskMapper;
@Override
......@@ -45,10 +54,14 @@ public class TaskStatePending extends TaskStateAdapter implements TaskState, Ini
long subTaskCount = 0;
if(task.getSystemReviewTaskId() != null) {
SystemReviewTask systemReviewTask = systemReviewTaskMapper.selectById(task.getSystemReviewTaskId());
CarReviewTask carReviewTask = carReviewTaskMapper.selectById(task.getCarReviewTaskId());
if(task.getSystemReviewTaskId() != null && !Objects.equals(systemReviewTask.getTaskStatus(), SystemReviewTask.STATUS_NEW)) {
subTaskCount = reviewDetailsMapper.count(task.getSystemReviewTaskId(), SystemReviewTask.TYPE);
}
if(task.getCarReviewTaskId() != null) {
if(task.getCarReviewTaskId() != null && !Objects.equals(carReviewTask.getTaskStatus(), CarReviewTask.TASK_STATUS_NEW)) {
subTaskCount = reviewDetailsMapper.count(task.getCarReviewTaskId(), CarReviewTask.TYPE);
}
......
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