|
@@ -2,7 +2,14 @@ package cn.com.usky.iot.controller;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
import javax.annotation.Resource;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
+import cn.com.usky.iot.auth.TokenAuthBO;
|
|
|
+import cn.com.usky.iot.auth.TokenAuthService;
|
|
|
+import cn.com.usky.iot.controller.login.Constants;
|
|
|
+import cn.com.usky.iot.entity.YtiotTAdmin;
|
|
|
+import cn.com.usky.utils.HttpServletRequestUtils;
|
|
|
+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.RequestMethod;
|
|
@@ -15,473 +22,896 @@ import cn.com.usky.iot.excel.service.ExcelService;
|
|
|
@RequestMapping("/iot/excel/view")
|
|
|
public class ExcelController {
|
|
|
|
|
|
- @Resource
|
|
|
- private ExcelService excelService;
|
|
|
-
|
|
|
- private static ExcelController excelController;
|
|
|
-
|
|
|
-
|
|
|
- @PostConstruct
|
|
|
- public void init() {
|
|
|
- excelController = this;
|
|
|
- excelController.excelService = this.excelService;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- //导出
|
|
|
- @RequestMapping(value="/exportexl",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView exportexl(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.fileDormExport("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
- @RequestMapping(value="/waterexportexl",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView waterexportexl(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.waterDormExport("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
- @RequestMapping(value="/rtuexportexl",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView rtuexportexl(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.rtuDormExport("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/fireAlarmExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView fireAlarmExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.fireAlarmExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/EfireAlarmExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView EfireAlarmExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.EfireAlarmExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/waterAlarmExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView waterAlarmExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.waterAlarmExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/RTUAlarmExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView RTUAlarmExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.RTUAlarmExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/liftAlarmExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView liftAlarmExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.liftAlarmExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/Exportexl",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView Exportexl(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.DormExport("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/patrolplanExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView patrolplanExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.patrolplanExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/inspectionrecordExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView inspectionrecordExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.inspectionrecordExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/checkrecordExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView checkrecordExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.checkrecordExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/routeExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView routeExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.routeExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/inspectorsExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView inspectorsExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.inspectorsExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/patrolpointExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView patrolpointExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.patrolpointExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/qrcodeanalysisExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView qrcodeanalysisExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.qrcodeanalysisExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/maintenanceplanExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView maintenanceplanExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.maintenanceplanExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/checkrecord2Excel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView checkrecord2Excel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.checkrecord2Excel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/maintenancerecordExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView maintenancerecordExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.maintenancerecordExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/route2Excel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView route2Excel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.route2Excel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/maintenanceExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView maintenanceExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.maintenanceExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/maintenancepersonExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView maintenancepersonExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.maintenancepersonExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/qrcodeanalysis2Excel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView qrcodeanalysis2Excel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.qrcodeanalysis2Excel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/XjInspectionPointsExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView InspectionPointsExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.XjInspectionPointsExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/XjInspectionPointsExcel1",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView InspectionPointsExcel1(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.XjInspectionPointsExcel1("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- @RequestMapping(value="/XjInspectorsExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView InspectorsExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.XjInspectorsExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/XjPlanMasterExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView PlanMasterExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.XjPlanMasterExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- //巡检
|
|
|
- @RequestMapping(value="/XjPlanMasterExcel1",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView PlanMasterExcel1(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.XjPlanMasterExcel1("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value="/XjSpotOperationRecordExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView SpotOperationRecordExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.XjSpotOperationRecordExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
- //巡检
|
|
|
- @RequestMapping(value="/XjSpotOperationRecordExcel1",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView SpotOperationRecordExcel1(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.XjSpotOperationRecordExcel1("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- //巡检
|
|
|
- @RequestMapping(value="/EventProcessingExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView EventProcessingExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- String ret = excelController.excelService.EventProcessingExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 视频导出数据
|
|
|
- * @param queryJson
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping(value="/VideoAlarmExcel",method= {RequestMethod.GET,RequestMethod.POST})
|
|
|
- public ModelAndView VideoAlarmExcel(@RequestParam(value = "queryJson", required = false) String queryJson) {
|
|
|
- ModelAndView mav = new ModelAndView();
|
|
|
- mav.setViewName("return");
|
|
|
-// System.out.println(queryJson);
|
|
|
- try {
|
|
|
- //String ret = excelController.excelService.VideoAlarmExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- String ret = excelController.excelService.VideoAlarmExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
- mav.addObject("ret_str",ret);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return mav;
|
|
|
- }
|
|
|
+ @Resource
|
|
|
+ private ExcelService excelService;
|
|
|
+
|
|
|
+ private static ExcelController excelController;
|
|
|
+
|
|
|
+
|
|
|
+ @PostConstruct
|
|
|
+ public void init() {
|
|
|
+ excelController = this;
|
|
|
+ excelController.excelService = this.excelService;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private TokenAuthService tokenAuthService;
|
|
|
+
|
|
|
+
|
|
|
+ //导出
|
|
|
+ @RequestMapping(value = "/exportexl", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView exportexl(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.fileDormExport("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/waterexportexl", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView waterexportexl(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.waterDormExport("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/rtuexportexl", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView rtuexportexl(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.rtuDormExport("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/fireAlarmExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView fireAlarmExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.fireAlarmExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/EfireAlarmExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView EfireAlarmExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.EfireAlarmExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/waterAlarmExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView waterAlarmExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.waterAlarmExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/RTUAlarmExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView RTUAlarmExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.RTUAlarmExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/liftAlarmExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView liftAlarmExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.liftAlarmExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/Exportexl", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView Exportexl(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.DormExport("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/patrolplanExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView patrolplanExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.patrolplanExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/inspectionrecordExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView inspectionrecordExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.inspectionrecordExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/checkrecordExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView checkrecordExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.checkrecordExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/routeExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView routeExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.routeExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/inspectorsExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView inspectorsExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.inspectorsExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/patrolpointExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView patrolpointExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.patrolpointExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/qrcodeanalysisExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView qrcodeanalysisExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.qrcodeanalysisExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/maintenanceplanExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView maintenanceplanExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.maintenanceplanExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/checkrecord2Excel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView checkrecord2Excel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.checkrecord2Excel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/maintenancerecordExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView maintenancerecordExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.maintenancerecordExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/route2Excel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView route2Excel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.route2Excel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/maintenanceExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView maintenanceExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.maintenanceExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/maintenancepersonExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView maintenancepersonExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.maintenancepersonExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/qrcodeanalysis2Excel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView qrcodeanalysis2Excel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.qrcodeanalysis2Excel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/XjInspectionPointsExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView InspectionPointsExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.XjInspectionPointsExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/XjInspectionPointsExcel1", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView InspectionPointsExcel1(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.XjInspectionPointsExcel1("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @RequestMapping(value = "/XjInspectorsExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView InspectorsExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.XjInspectorsExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/XjPlanMasterExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView PlanMasterExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.XjPlanMasterExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ //巡检
|
|
|
+ @RequestMapping(value = "/XjPlanMasterExcel1", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView PlanMasterExcel1(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.XjPlanMasterExcel1("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/XjSpotOperationRecordExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView SpotOperationRecordExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.XjSpotOperationRecordExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ //巡检
|
|
|
+ @RequestMapping(value = "/XjSpotOperationRecordExcel1", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView SpotOperationRecordExcel1(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.XjSpotOperationRecordExcel1("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ //巡检
|
|
|
+ @RequestMapping(value = "/EventProcessingExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView EventProcessingExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ String ret = excelController.excelService.EventProcessingExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 视频导出数据
|
|
|
+ *
|
|
|
+ * @param queryJson
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/VideoAlarmExcel", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public ModelAndView VideoAlarmExcel(@RequestParam(value = "queryJson", required = false) String queryJson,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ TokenAuthBO tokenAuthBO = HttpServletRequestUtils.tokenAuthForYT(request, tokenAuthService);
|
|
|
+ boolean isAuth = tokenAuthBO.isAuthState();
|
|
|
+ if (!isAuth) {
|
|
|
+ com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
+ json.put("check", false);
|
|
|
+ json.put("errMsg", "权限错误,请重新登录");
|
|
|
+ mav.addObject("ret_str", json.toJSONString());
|
|
|
+ }
|
|
|
+ mav.setViewName("return");
|
|
|
+ //通过获取用户信息
|
|
|
+ YtiotTAdmin o = (YtiotTAdmin) tokenAuthBO.getData().get(Constants.USER_INFO);
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(queryJson);
|
|
|
+ jsonObject.put("V_LOGINNAME", o.getVLoginname());
|
|
|
+ jsonObject.put("V_PASSWORD", o.getVPassword());
|
|
|
+ try {
|
|
|
+ //String ret = excelController.excelService.VideoAlarmExcel("/var/lib/tomcat/webapps/YtIoT/",queryJson);
|
|
|
+ String ret = excelController.excelService.VideoAlarmExcel("/var/lib/tomcat/webapps/YtIoT/", jsonObject.toString());
|
|
|
+ mav.addObject("ret_str", ret);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
|
|
|
}
|