Commit d79be34218b8df20022597bb6679f4a4b54b03f5
Merge branch 'minhang' of 192.168.168.201:panzhaov5/bsth_control into
minhang
Showing
5 changed files
with
36 additions
and
7 deletions
src/main/java/com/bsth/controller/realcontrol/PageForwardingController.java
| 1 | 1 | package com.bsth.controller.realcontrol; |
| 2 | 2 | |
| 3 | +import com.bsth.entity.sys.Role; | |
| 3 | 4 | import com.bsth.entity.sys.SysUser; |
| 4 | 5 | import com.bsth.security.util.SecurityUtils; |
| 6 | +import org.slf4j.Logger; | |
| 7 | +import org.slf4j.LoggerFactory; | |
| 5 | 8 | import org.springframework.stereotype.Controller; |
| 6 | 9 | import org.springframework.web.bind.annotation.RequestMapping; |
| 7 | 10 | import org.springframework.web.servlet.ModelAndView; |
| 8 | 11 | |
| 12 | +import javax.servlet.http.HttpServletResponse; | |
| 13 | + | |
| 9 | 14 | /** |
| 10 | 15 | * 线调登入页面转发 |
| 11 | 16 | * Created by panzhao on 2017/1/21. |
| ... | ... | @@ -14,18 +19,36 @@ import org.springframework.web.servlet.ModelAndView; |
| 14 | 19 | @RequestMapping("real_control") |
| 15 | 20 | public class PageForwardingController { |
| 16 | 21 | |
| 22 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 23 | + | |
| 17 | 24 | @RequestMapping("/v2") |
| 18 | - public ModelAndView v2(){ | |
| 25 | + public ModelAndView v2(HttpServletResponse response){ | |
| 19 | 26 | ModelAndView mv = new ModelAndView(); |
| 20 | 27 | SysUser user = SecurityUtils.getCurrentUser(); |
| 21 | 28 | |
| 22 | 29 | //班次管理员 |
| 23 | 30 | if(user.getUserName().equals("bcgly")){ |
| 24 | 31 | mv.setViewName("/real_control_v2/sch_manage/sch_imitate.html"); |
| 32 | + return mv; | |
| 25 | 33 | } |
| 34 | + | |
| 35 | + try{ | |
| 36 | + //闵行运管所,直接打开地图页面 | |
| 37 | + if(user.getRoles().size() == 1){ | |
| 38 | + for(Role role : user.getRoles()){ | |
| 39 | + if(role.getCodeName().equals("MH_YGS")){ | |
| 40 | + // 直接重定向 | |
| 41 | + response.sendRedirect("/pages/mapmonitor/alone/wrap.html"); | |
| 42 | + return null; | |
| 43 | + } | |
| 44 | + } | |
| 45 | + } | |
| 46 | + }catch (Exception e){ | |
| 47 | + logger.error("", e); | |
| 48 | + } | |
| 49 | + | |
| 26 | 50 | //正常线调主页 |
| 27 | - else | |
| 28 | - mv.setViewName("/real_control_v2/main.html"); | |
| 51 | + mv.setViewName("/real_control_v2/main.html"); | |
| 29 | 52 | return mv; |
| 30 | 53 | } |
| 31 | 54 | } | ... | ... |
src/main/java/com/bsth/entity/sys/RealControAuthority.java
src/main/java/com/bsth/filter/ResourceFilter.java
src/main/resources/ms-jdbc.properties
| 1 | 1 | #ms.mysql.driver= com.mysql.jdbc.Driver |
| 2 | -#ms.mysql.url= jdbc:mysql://192.168.40.82:3306/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 2 | +#ms.mysql.url= jdbc:mysql://192.168.168.201:3306/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 3 | 3 | #ms.mysql.username= root |
| 4 | 4 | #ms.mysql.password= 123456 |
| 5 | 5 | |
| 6 | 6 | ms.mysql.driver= com.mysql.jdbc.Driver |
| 7 | -ms.mysql.url= jdbc:mysql://192.168.168.201:3306/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 7 | +ms.mysql.url= jdbc:mysql://192.168.168.171:3306/ms?useUnicode=true&characterEncoding=utf-8 | |
| 8 | 8 | ms.mysql.username= root |
| 9 | -ms.mysql.password= 123456 | |
| 10 | 9 | \ No newline at end of file |
| 10 | +ms.mysql.password= root2jsp | |
| 11 | 11 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/js/north/toolbar.js
| ... | ... | @@ -179,6 +179,12 @@ var gb_northToolbar = (function () { |
| 179 | 179 | }, |
| 180 | 180 | curr_date_schedule: function () { |
| 181 | 181 | open_modal('/real_control_v2/fragments/north/nav/curr_date_schedule.html', {}, modal_opts); |
| 182 | + }, | |
| 183 | + form_schedule_daily_qp: function () { | |
| 184 | + gb_embed_form_hanlde.open_modal_form_fragment('/pages/forms/statement/scheduleDailyQp.html', '调度工作日报表'); | |
| 185 | + }, | |
| 186 | + form_schedule_daily: function () { | |
| 187 | + gb_embed_form_hanlde.open_modal_form_fragment('/pages/forms/statement/scheduleDaily.html', '调度工作日报表'); | |
| 182 | 188 | } |
| 183 | 189 | }; |
| 184 | 190 | ... | ... |