|
@@ -1,137 +1,35 @@
|
|
|
-/**
|
|
|
- *
|
|
|
- */
|
|
|
package com.ims.eval.controller;
|
|
|
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
-import com.ims.system.auth.ImsPreAuth;
|
|
|
+import com.ims.eval.entity.IndicatorDictionary;
|
|
|
+import com.ims.eval.service.IIndicatorDictionaryService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.ui.Model;
|
|
|
-
|
|
|
-import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-import org.springframework.http.MediaType;
|
|
|
-
|
|
|
-
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
-import java.io.IOException;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import com.ims.core.controller.WebController;
|
|
|
-import com.ims.core.utils.StringUtils;
|
|
|
-
|
|
|
-import com.ims.eval.entity.IndicatorDictionary;
|
|
|
-import com.ims.eval.service.IIndicatorDictionaryService;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
- * 指标字典表Controller
|
|
|
- * @author song
|
|
|
- * @version 2023-02-22
|
|
|
+ * <p>
|
|
|
+ * 指标字典表 前端控制器
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author wang
|
|
|
+ * @since 2023-02-26
|
|
|
*/
|
|
|
-@Controller
|
|
|
-@RequestMapping(value = "/eval/indicatorDictionary")
|
|
|
-public class IndicatorDictionaryController extends WebController<IIndicatorDictionaryService,IndicatorDictionary> {
|
|
|
+@RestController
|
|
|
+@RequestMapping("//indicator-dictionary")
|
|
|
+public class IndicatorDictionaryController {
|
|
|
|
|
|
- //@ImsPreAuth("eval:indicatorDictionary:view")
|
|
|
- @RequestMapping(value = "list")
|
|
|
- @ResponseBody
|
|
|
- public String list(IndicatorDictionary indicatorDictionary, Model model) {
|
|
|
- return "ims/ims-eval${ims_eval_suffix}/eval/indicatorDictionaryList";
|
|
|
- }
|
|
|
|
|
|
- //@ImsPreAuth("eval:indicatorDictionary:view")
|
|
|
- @RequestMapping(value = "form")
|
|
|
- public String form(IndicatorDictionary indicatorDictionary, Model model) {
|
|
|
- String formView = indicatorDictionary.getFormView();
|
|
|
- if(StringUtils.isNotBlank(formView)){
|
|
|
- return "ims/"+formView;
|
|
|
- }
|
|
|
- return "ims/ims-eval${ims_eval_suffix}/eval/indicatorDictionaryForm";
|
|
|
- }
|
|
|
-
|
|
|
- //@ImsPreAuth("eval:indicatorDictionary:view")
|
|
|
- @RequestMapping(value = "lov")
|
|
|
- public String lov(IndicatorDictionary indicatorDictionary, Model model) {
|
|
|
- return "ims/ims-eval${ims_eval_suffix}/eval/indicatorDictionaryList";
|
|
|
- }
|
|
|
-
|
|
|
- //@ImsPreAuth("eval:indicatorDictionary:view")
|
|
|
- @RequestMapping(value = "data")
|
|
|
- @ResponseBody
|
|
|
- public String getData(IndicatorDictionary indicatorDictionary, HttpServletRequest request, HttpServletResponse response, Model model) throws IOException {
|
|
|
- return super.getData(indicatorDictionary,request,response,model);
|
|
|
- }
|
|
|
+ @Autowired
|
|
|
+ private IIndicatorDictionaryService indicatorDictionaryService;
|
|
|
|
|
|
- //@ImsPreAuth("eval:indicatorDictionary:view")
|
|
|
- @RequestMapping(value = "allData")
|
|
|
- @ResponseBody
|
|
|
- public String getAllData(IndicatorDictionary indicatorDictionary, HttpServletRequest request, HttpServletResponse response, Model model) throws IOException {
|
|
|
- System.out.println("jjjjjjjjjjjjjjj");
|
|
|
- return super.getAllData(indicatorDictionary,request,response,model);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- //@ImsPreAuth("eval:indicatorDictionary:view")
|
|
|
- @RequestMapping(value = "get")
|
|
|
- @ResponseBody
|
|
|
- public String get(IndicatorDictionary indicatorDictionary, HttpServletRequest request, HttpServletResponse response, Model model) throws IOException {
|
|
|
- return super.get(indicatorDictionary,request,response,model);
|
|
|
- }
|
|
|
-
|
|
|
- //@ImsPreAuth("eval:indicatorDictionary:edit")
|
|
|
- @RequestMapping(value = "initInsert")
|
|
|
- @ResponseBody
|
|
|
- public String initInsert(IndicatorDictionary indicatorDictionary, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
|
- return super.initInsert(indicatorDictionary,request,response,model);
|
|
|
- }
|
|
|
-
|
|
|
- //@ImsPreAuth("eval:indicatorDictionary:edit")
|
|
|
- @RequestMapping(value = "checkSave")
|
|
|
- @ResponseBody
|
|
|
- public String checkSave(IndicatorDictionary indicatorDictionary, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
|
- return super.checkSave(indicatorDictionary,request,response,model);
|
|
|
- }
|
|
|
-
|
|
|
- //@ImsPreAuth("eval:indicatorDictionary:edit")
|
|
|
- @RequestMapping(value = "save")
|
|
|
- @ResponseBody
|
|
|
- public String save(IndicatorDictionary indicatorDictionary, Model model, HttpServletRequest request, HttpServletResponse response) {
|
|
|
- return super.save(indicatorDictionary,request,response,model);
|
|
|
- }
|
|
|
-
|
|
|
- //@ImsPreAuth("eval:indicatorDictionary:remove")
|
|
|
- @RequestMapping(value = "checkRemove")
|
|
|
- @ResponseBody
|
|
|
- public String checkRemove(IndicatorDictionary indicatorDictionary, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
|
- return super.checkRemove(indicatorDictionary,request,response,model);
|
|
|
- }
|
|
|
-
|
|
|
- //@ImsPreAuth("eval:indicatorDictionary:remove")
|
|
|
- @RequestMapping(value = "remove")
|
|
|
- @ResponseBody
|
|
|
- public String remove(IndicatorDictionary indicatorDictionary, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
|
- return super.remove(indicatorDictionary,request,response,model);
|
|
|
- }
|
|
|
-
|
|
|
- //@ImsPreAuth("eval:indicatorDictionary:edit")
|
|
|
- @RequestMapping(value = "import",produces=MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
- @ResponseBody
|
|
|
- public String importFile(IndicatorDictionary indicatorDictionary,MultipartFile excelFile, HttpServletRequest request, HttpServletResponse response) {
|
|
|
- return super.importFile(indicatorDictionary,excelFile,null,request,response);
|
|
|
- }
|
|
|
-
|
|
|
- //@ImsPreAuth("eval:indicatorDictionary:view")
|
|
|
- @RequestMapping(value = "export", method= RequestMethod.POST)
|
|
|
- public void exportFile(IndicatorDictionary indicatorDictionary, HttpServletRequest request, HttpServletResponse response) {
|
|
|
- super.exportFile(indicatorDictionary,request,response );
|
|
|
+ //@ImsPreAuth("eval:indicator:view")
|
|
|
+ @RequestMapping(value = "list")
|
|
|
+ public List<IndicatorDictionary> list() {
|
|
|
+ List<IndicatorDictionary> list = indicatorDictionaryService.list();
|
|
|
+ return list;
|
|
|
}
|
|
|
|
|
|
}
|