|
@@ -26,6 +26,7 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -36,6 +37,7 @@ import com.qmth.cqb.paper.dao.PaperRepo;
|
|
|
import com.qmth.cqb.paper.dto.PaperDetailExp;
|
|
|
import com.qmth.cqb.paper.dto.PaperDetailUnitExp;
|
|
|
import com.qmth.cqb.paper.dto.PaperExp;
|
|
|
+import com.qmth.cqb.paper.dto.QuestionAllTypeDto;
|
|
|
import com.qmth.cqb.paper.model.Paper;
|
|
|
import com.qmth.cqb.paper.model.PaperSearchInfo;
|
|
|
import com.qmth.cqb.paper.service.PaperService;
|
|
@@ -601,4 +603,26 @@ public class PaperController {
|
|
|
return new ResponseEntity<Object>(e.getMessage(),HttpStatus.OK);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value="传送到印刷平台", notes="传送到印刷平台")
|
|
|
+ @GetMapping(value="/sendPrint/{paperId}/{paperHtmlUrl}/{examId}")
|
|
|
+ public ResponseEntity<Object> sendPrint(HttpServletRequest request,
|
|
|
+ @PathVariable String paperId,
|
|
|
+ @PathVariable String paperHtmlUrl,
|
|
|
+ @PathVariable String examId){
|
|
|
+ AccessUser user = (AccessUser) request.getAttribute("accessUser");
|
|
|
+ if(user == null){
|
|
|
+ return new ResponseEntity<Object>(HttpStatus.NOT_FOUND);
|
|
|
+ }
|
|
|
+ String message = paperService.sendPrint(paperId,paperHtmlUrl,examId,user);
|
|
|
+ return new ResponseEntity<Object>(message,HttpStatus.OK);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value="根据试卷id查询主观题与客观题数量", notes="根据试卷id查询主观题与客观题数量")
|
|
|
+ @GetMapping(value="/questionStructure")
|
|
|
+ public Map<String, QuestionAllTypeDto> findQuestionStructure(HttpServletRequest request,@RequestParam("paperId") String paperId, @RequestHeader("user_token") String user_token) throws Exception{
|
|
|
+ AccessUser user = (AccessUser) request.getAttribute("accessUser");
|
|
|
+ Map<String, QuestionAllTypeDto> map = paperService.findQuestionStructure(paperId,user);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
}
|