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 | package com.bsth.controller.realcontrol; | 1 | package com.bsth.controller.realcontrol; |
| 2 | 2 | ||
| 3 | +import com.bsth.entity.sys.Role; | ||
| 3 | import com.bsth.entity.sys.SysUser; | 4 | import com.bsth.entity.sys.SysUser; |
| 4 | import com.bsth.security.util.SecurityUtils; | 5 | import com.bsth.security.util.SecurityUtils; |
| 6 | +import org.slf4j.Logger; | ||
| 7 | +import org.slf4j.LoggerFactory; | ||
| 5 | import org.springframework.stereotype.Controller; | 8 | import org.springframework.stereotype.Controller; |
| 6 | import org.springframework.web.bind.annotation.RequestMapping; | 9 | import org.springframework.web.bind.annotation.RequestMapping; |
| 7 | import org.springframework.web.servlet.ModelAndView; | 10 | import org.springframework.web.servlet.ModelAndView; |
| 8 | 11 | ||
| 12 | +import javax.servlet.http.HttpServletResponse; | ||
| 13 | + | ||
| 9 | /** | 14 | /** |
| 10 | * 线调登入页面转发 | 15 | * 线调登入页面转发 |
| 11 | * Created by panzhao on 2017/1/21. | 16 | * Created by panzhao on 2017/1/21. |
| @@ -14,18 +19,36 @@ import org.springframework.web.servlet.ModelAndView; | @@ -14,18 +19,36 @@ import org.springframework.web.servlet.ModelAndView; | ||
| 14 | @RequestMapping("real_control") | 19 | @RequestMapping("real_control") |
| 15 | public class PageForwardingController { | 20 | public class PageForwardingController { |
| 16 | 21 | ||
| 22 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 23 | + | ||
| 17 | @RequestMapping("/v2") | 24 | @RequestMapping("/v2") |
| 18 | - public ModelAndView v2(){ | 25 | + public ModelAndView v2(HttpServletResponse response){ |
| 19 | ModelAndView mv = new ModelAndView(); | 26 | ModelAndView mv = new ModelAndView(); |
| 20 | SysUser user = SecurityUtils.getCurrentUser(); | 27 | SysUser user = SecurityUtils.getCurrentUser(); |
| 21 | 28 | ||
| 22 | //班次管理员 | 29 | //班次管理员 |
| 23 | if(user.getUserName().equals("bcgly")){ | 30 | if(user.getUserName().equals("bcgly")){ |
| 24 | mv.setViewName("/real_control_v2/sch_manage/sch_imitate.html"); | 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 | return mv; | 52 | return mv; |
| 30 | } | 53 | } |
| 31 | } | 54 | } |
src/main/java/com/bsth/entity/sys/RealControAuthority.java
src/main/java/com/bsth/filter/ResourceFilter.java
| @@ -42,7 +42,6 @@ public class ResourceFilter extends BaseFilter { | @@ -42,7 +42,6 @@ public class ResourceFilter extends BaseFilter { | ||
| 42 | 42 | ||
| 43 | if (f.exists() && f.isFile()) { | 43 | if (f.exists() && f.isFile()) { |
| 44 | request.getRequestDispatcher("/?initFragment=" + joinParam(request)).forward(request, response); | 44 | request.getRequestDispatcher("/?initFragment=" + joinParam(request)).forward(request, response); |
| 45 | - ; | ||
| 46 | } else | 45 | } else |
| 47 | response.sendRedirect("/"); | 46 | response.sendRedirect("/"); |
| 48 | } | 47 | } |
src/main/resources/ms-jdbc.properties
| 1 | #ms.mysql.driver= com.mysql.jdbc.Driver | 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 | #ms.mysql.username= root | 3 | #ms.mysql.username= root |
| 4 | #ms.mysql.password= 123456 | 4 | #ms.mysql.password= 123456 |
| 5 | 5 | ||
| 6 | ms.mysql.driver= com.mysql.jdbc.Driver | 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 | ms.mysql.username= root | 8 | ms.mysql.username= root |
| 9 | -ms.mysql.password= 123456 | ||
| 10 | \ No newline at end of file | 9 | \ No newline at end of file |
| 10 | +ms.mysql.password= root2jsp | ||
| 11 | \ No newline at end of file | 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,6 +179,12 @@ var gb_northToolbar = (function () { | ||
| 179 | }, | 179 | }, |
| 180 | curr_date_schedule: function () { | 180 | curr_date_schedule: function () { |
| 181 | open_modal('/real_control_v2/fragments/north/nav/curr_date_schedule.html', {}, modal_opts); | 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 |