package com.ld.igds.web; import com.alibaba.fastjson.JSONObject; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * 测试使用 * * @author: andy.jia * @description: * @version: * @data:2019年12月17日 */ @Controller @RequestMapping("/test") public class TestController { // // /** // * 单组织大屏跳转 // * // * @return // */ // @RequestMapping("/test/grain-detail") // public ModelAndView singleScreen() { // // 用户信息 // ModelAndView view = new ModelAndView(); // view.setViewName("test/grainDetail"); // return view; // } // // @RequestMapping("/test/print") // public ModelAndView testPrint() { // ModelAndView view = new ModelAndView(); // view.setViewName("test/demoPrint"); // return view; // } // // @RequestMapping("/test/print-check") // public ModelAndView testPrintCheck() { // ModelAndView view = new ModelAndView(); // view.setViewName("test/demoCheckPrint"); // return view; // } // // @RequestMapping("/test/inout/print/2019") // public ModelAndView testPrint2019() { // ModelAndView view = new ModelAndView(); // view.setViewName("test/print-out-2019"); // return view; // } // // @RequestMapping("/test/gas-print") // public ModelAndView testGasPrint() { // ModelAndView view = new ModelAndView(); // view.setViewName("test/demoGasPrint"); // return view; // } // // @RequestMapping("/test/demp") // public ModelAndView testDemo( // @RequestParam(name = "t", required = false) String t) { // ModelAndView view = new ModelAndView(); // // String desc = "……功能调试中……"; // // if (StringUtils.isNotEmpty(t)) { // if ("security-no".equals(t)) { // desc = "……待三维模型图绘制完成后展示……"; // } // } // view.addObject("desc", desc); // // view.setViewName("test/demo"); // return view; // } // // @RequestMapping("/test/no-access") // public ModelAndView testNoAccess( // @RequestParam(name = "t", required = false) String t) { // ModelAndView view = new ModelAndView(); // // String desc = "……您没有权限,请联系系统管理员……"; // view.addObject("desc", desc); // view.setViewName("test/demo"); // return view; // } @RequestMapping("/IDCARD") public @ResponseBody String testIDCARD( @RequestParam(name = "t", required = false) String t , HttpServletRequest request, HttpServletResponse response) { // JSONObject content= new JSONObject(); // JSONObject data = new JSONObject(); return "{\n" + " \"address\": \"xxxxxxxxxxxxxxxxxx-17\",\n" + " \"birthdate\": \"1996-12-01\",\n" + " \"cnName\": \"许彬\",\n" + " \"effectedDate\": \"2014-04-02\",\n" + " \"expiredDate\": \"2024-04-02\",\n" + " \"folk\": \"汉\",\n" + " \"idNum\": \"510000000000000000\",\n" + " \"issue\": \"安陆市公安局\",\n" + " \"nation\": \"中国\",\n" + " \"sex\": \"男\"\n" + "}\n" + "\n" + ""; } }