Commit 24d1609a authored by W_Y's avatar W_Y

确认问卷接口

parent 7977880e
......@@ -17,7 +17,7 @@ public interface ReviewDetailsMapper extends BaseMapper<ReviewDetails> {
* @param taskId
* @return
*/
List<ReviewDetails> findNoResult(@Param("taskId") Long taskId);
List<ReviewDetails> findNoResult(@Param("taskId") Long taskId, @Param("type") String type);
Long count (@Param("taskId")Long taskId, @Param("type")String type);
}
......@@ -90,11 +90,11 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
@Override
public void doConfirmReview(CarReviewTask carReviewTask) {
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(carReviewTask.getId());
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(carReviewTask.getId(),"car");
List<ReviewTaskInbox> inboxList = reviewTaskInboxMapper.findConfirmListByTaskId(carReviewTask.getId());
if (detailsList != null) {
if (detailsList.size() != 0) {
throw new ServiceException("存在未填写的问卷,请填写完整", HttpStatus.ERROR, detailsList);
}else if (inboxList != null ) {
}else if (inboxList.size() != 0 ) {
throw new ServiceException("存在未确认的场景变更信息,请确认", HttpStatus.ERROR);
}else {
// 1. 获取最新问卷
......
......@@ -73,11 +73,12 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
@Override
public void doConfirm(SystemReviewTask systemReviewTask) {
// TODO
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(systemReviewTask.getId());
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(systemReviewTask.getId(),"system");
System.out.println("detailsList = " + detailsList);
List<ReviewTaskInbox> inboxList = reviewTaskInboxMapper.findConfirmListByTaskId(systemReviewTask.getId());
if (detailsList != null) {
if (detailsList.size() != 0) {
throw new ServiceException("存在未填写的问卷,请填写完整", HttpStatus.ERROR, detailsList);
} else if (inboxList != null){
} else if (inboxList.size() != 0){
throw new ServiceException("存在未确认的场景变更信息,请确认", HttpStatus.ERROR);
} else {
// 1. 获取最新问卷
......
......@@ -15,7 +15,11 @@
</select>
<select id="findNoResult" resultType="com.ruoyi.domain.ReviewDetails">
SELECT * FROM t_review_details WHERE id NOT IN (SELECT review_details_id FROM t_review_details_result WHERE task_id = #{taskId})
SELECT * FROM t_review_details trd
LEFT JOIN t_review_keypoint trk ON trd.review_keypoint_id = trk.id
LEFT JOIN t_review_standard trs ON trk.review_standard_id = trs.id
WHERE trd.id NOT IN (SELECT review_details_id FROM t_review_details_result WHERE task_id = #{taskId})
AND trs.type = #{type}
</select>
<select id="count" resultType="long">
......
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