package com.zbooksoft.gdmis.controller;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.ruili.wcp.web.model.AjaxResponse;
|
import com.ruili.wcp.web.model.ErrorInfo;
|
import com.zbooksoft.gdmis.data.entity.CheckQuestion;
|
import com.zbooksoft.gdmis.service.CheckQuestionService;
|
import org.apache.shiro.authz.annotation.RequiresUser;
|
import org.slf4j.Logger;
|
import org.slf4j.LoggerFactory;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.servlet.ModelAndView;
|
|
import java.util.List;
|
|
|
/**
|
* @author 15280
|
*/
|
@Controller
|
@RequestMapping("/gdMisManage")
|
public class GdMisManageController {
|
@Autowired
|
CheckQuestionService checkQuestionService;
|
|
private static final Logger logger = LoggerFactory.getLogger(GdMisManageController.class);
|
|
|
@RequestMapping({"/selectRegion"})
|
@RequiresUser
|
public ModelAndView selectRegion(String hasSelectRegion) throws Exception {
|
|
ModelAndView mav = new ModelAndView("gh/gdMisManage/selectRegion");
|
mav.addObject("hasSelectRegion", hasSelectRegion);
|
return mav;
|
}
|
|
@RequestMapping({"/selectCheckQuestion"})
|
@RequiresUser
|
public ModelAndView selectCheckQuestion() throws Exception {
|
|
ModelAndView mav = new ModelAndView("gh/gdMisManage/selectCheckQuestion");
|
return mav;
|
}
|
|
@RequestMapping({"/getCheckQuestion"})
|
@ResponseBody
|
@RequiresUser
|
public Object getCheckQuestion(String question) {
|
try {
|
if (question != null && !question.equals("")) {
|
QueryWrapper<CheckQuestion> checkQuestionQueryWrapper = new QueryWrapper<>();
|
checkQuestionQueryWrapper.like("question", question);
|
return checkQuestionService.list(checkQuestionQueryWrapper);
|
}
|
List<CheckQuestion> checkQuestionList = checkQuestionService.list();
|
return checkQuestionList;
|
} catch (Exception e) {
|
logger.error(e.getMessage(), e);
|
return new AjaxResponse(new ErrorInfo("导入失败"), false);
|
}
|
}
|
|
@RequestMapping({"/selectMineral"})
|
@RequiresUser
|
public ModelAndView mineralSelection() throws Exception {
|
ModelAndView mav = new ModelAndView("gh/gdMisManage/selectMineral");
|
return mav;
|
}
|
|
@RequestMapping({"/selectInflectionPoint"})
|
@RequiresUser
|
public ModelAndView selectInflectionPoint() throws Exception {
|
ModelAndView mav = new ModelAndView("gh/gdMisManage/selectInflectionPoint");
|
return mav;
|
}
|
|
@RequestMapping({"/selectClassInfo"})
|
@RequiresUser
|
public ModelAndView selectClassInfo() throws Exception {
|
ModelAndView mav = new ModelAndView("gh/gdMisManage/selectClassified");
|
return mav;
|
}
|
|
|
}
|