Commit 4c8feb39055b92c0ce1b743025886ca761b81577
1 parent
07243d32
1.
Showing
5 changed files
with
153 additions
and
143 deletions
src/main/java/com/bsth/Application.java
| 1 | -package com.bsth; | ||
| 2 | - | ||
| 3 | -import com.fasterxml.jackson.databind.ObjectMapper; | ||
| 4 | -import com.fasterxml.jackson.databind.SerializationFeature; | ||
| 5 | -import org.springframework.boot.SpringApplication; | ||
| 6 | -import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
| 7 | -import org.springframework.boot.builder.SpringApplicationBuilder; | ||
| 8 | -import org.springframework.boot.context.web.SpringBootServletInitializer; | ||
| 9 | -import org.springframework.context.annotation.Bean; | ||
| 10 | -import org.springframework.context.annotation.Primary; | ||
| 11 | -import org.springframework.transaction.annotation.EnableTransactionManagement; | ||
| 12 | - | ||
| 13 | -import java.util.concurrent.Executors; | ||
| 14 | -import java.util.concurrent.ScheduledExecutorService; | ||
| 15 | - | ||
| 16 | -@EnableTransactionManagement | ||
| 17 | -@SpringBootApplication | ||
| 18 | -public class Application extends SpringBootServletInitializer { | ||
| 19 | - | ||
| 20 | - public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(18); | ||
| 21 | - | ||
| 22 | - @Override | ||
| 23 | - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | ||
| 24 | - return application.sources(Application.class); | ||
| 25 | - } | ||
| 26 | - | ||
| 27 | - @Bean | ||
| 28 | - @Primary | ||
| 29 | - public ObjectMapper objectMapper() { | ||
| 30 | - ObjectMapper objectMapper = new ObjectMapper(); | ||
| 31 | - objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); | ||
| 32 | - | ||
| 33 | - return objectMapper; | ||
| 34 | - } | ||
| 35 | - | ||
| 36 | - public static void main(String[] args) throws Exception { | ||
| 37 | - SpringApplication.run(Application.class, args); | ||
| 38 | - } | 1 | +package com.bsth; |
| 2 | + | ||
| 3 | +import com.bsth.data.SystemParamCache; | ||
| 4 | +import com.fasterxml.jackson.databind.ObjectMapper; | ||
| 5 | +import com.fasterxml.jackson.databind.SerializationFeature; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.boot.SpringApplication; | ||
| 8 | +import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
| 9 | +import org.springframework.boot.builder.SpringApplicationBuilder; | ||
| 10 | +import org.springframework.boot.context.web.SpringBootServletInitializer; | ||
| 11 | +import org.springframework.context.annotation.Bean; | ||
| 12 | +import org.springframework.context.annotation.Primary; | ||
| 13 | +import org.springframework.transaction.annotation.EnableTransactionManagement; | ||
| 14 | + | ||
| 15 | +import java.util.concurrent.Executors; | ||
| 16 | +import java.util.concurrent.ScheduledExecutorService; | ||
| 17 | + | ||
| 18 | +@EnableTransactionManagement | ||
| 19 | +@SpringBootApplication | ||
| 20 | +public class Application extends SpringBootServletInitializer { | ||
| 21 | + | ||
| 22 | + public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(18); | ||
| 23 | + | ||
| 24 | + @Autowired | ||
| 25 | + private SystemParamCache systemParamCache; | ||
| 26 | + | ||
| 27 | + @Override | ||
| 28 | + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | ||
| 29 | + return application.sources(Application.class); | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + @Bean | ||
| 33 | + @Primary | ||
| 34 | + public ObjectMapper objectMapper() { | ||
| 35 | + ObjectMapper objectMapper = new ObjectMapper(); | ||
| 36 | + objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); | ||
| 37 | + | ||
| 38 | + return objectMapper; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + public static void main(String[] args) throws Exception { | ||
| 42 | + SpringApplication.run(Application.class, args); | ||
| 43 | + } | ||
| 39 | } | 44 | } |
| 40 | \ No newline at end of file | 45 | \ No newline at end of file |
src/main/java/com/bsth/controller/sys/UserController.java
| @@ -131,6 +131,7 @@ public class UserController extends BaseController<SysUser, Integer> { | @@ -131,6 +131,7 @@ public class UserController extends BaseController<SysUser, Integer> { | ||
| 131 | SecurityUtils.login(user, request); | 131 | SecurityUtils.login(user, request); |
| 132 | //session里写入用户名,webSocket连接时标识身份用 | 132 | //session里写入用户名,webSocket连接时标识身份用 |
| 133 | session.setAttribute(Constants.SESSION_USERNAME, user.getUserName()); | 133 | session.setAttribute(Constants.SESSION_USERNAME, user.getUserName()); |
| 134 | + session.setAttribute(Constants.RESOURCE_AUTHORITYS, user.getLinks()); | ||
| 134 | 135 | ||
| 135 | //获取公司权限数据 | 136 | //获取公司权限数据 |
| 136 | List<CompanyAuthority> cmyAuths = companyAuthorityService.findByUser(user); | 137 | List<CompanyAuthority> cmyAuths = companyAuthorityService.findByUser(user); |
| @@ -173,6 +174,7 @@ public class UserController extends BaseController<SysUser, Integer> { | @@ -173,6 +174,7 @@ public class UserController extends BaseController<SysUser, Integer> { | ||
| 173 | SecurityUtils.login(user, request); | 174 | SecurityUtils.login(user, request); |
| 174 | //session里写入用户名,webSocket连接时标识身份用 | 175 | //session里写入用户名,webSocket连接时标识身份用 |
| 175 | session.setAttribute(Constants.SESSION_USERNAME, user.getUserName()); | 176 | session.setAttribute(Constants.SESSION_USERNAME, user.getUserName()); |
| 177 | + session.setAttribute(Constants.RESOURCE_AUTHORITYS, user.getLinks()); | ||
| 176 | 178 | ||
| 177 | //获取公司权限数据 | 179 | //获取公司权限数据 |
| 178 | List<CompanyAuthority> cmyAuths = companyAuthorityService.findByUser(user); | 180 | List<CompanyAuthority> cmyAuths = companyAuthorityService.findByUser(user); |
src/main/java/com/bsth/filter/AuthorityFilter.java
| @@ -29,7 +29,7 @@ public class AuthorityFilter extends BaseFilter { | @@ -29,7 +29,7 @@ public class AuthorityFilter extends BaseFilter { | ||
| 29 | 29 | ||
| 30 | private final String scheduleReferer = "/real_control/v2"; | 30 | private final String scheduleReferer = "/real_control/v2"; |
| 31 | 31 | ||
| 32 | - private String[] pubUrls = new String[]{ "/sockjs/", "/pages/", "/error", "/dictionary/all", "/user/isWeakCipher", "/user/isRealName", "/user/currentUser", "/user/companyData", "/module/findByCurrentUser", "/eci/validate_get_destroy_info", "/business", "/personnel/all_py", "/companyAuthority/all", "/line/all", "/basic/refresh_person_data", "/downloadFile", "/report/lineList", "/adminUtils", "/metronic_v4.5.4", "/assets" }; | 32 | + private String[] pubUrls = new String[]{ "/sockjs/", "/pages/home.html", "/error", "/dictionary/all", "/user/isWeakCipher", "/user/isRealName", "/user/currentUser", "/user/companyData", "/module/findByCurrentUser", "/eci/validate_get_destroy_info", "/business", "/personnel/all_py", "/companyAuthority/all", "/line/all", "/basic/refresh_person_data", "/downloadFile", "/report/lineList", "/adminUtils", "/metronic_v4.5.4", "/assets" }; |
| 33 | 33 | ||
| 34 | @Override | 34 | @Override |
| 35 | public void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { | 35 | public void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { |
src/main/resources/static/pages/home.html
| 1 | -<style> | ||
| 2 | - .system_change_log{ | ||
| 3 | - background: #fff; | ||
| 4 | - color: #666; | ||
| 5 | - box-shadow: 0 5px 15px rgba(0,0,0,0.08); | ||
| 6 | - height: calc(100% + 10px); | ||
| 7 | - margin-top: -10px; | ||
| 8 | - font-size: 14px; | ||
| 9 | - padding: 10px 0 0 15px; | ||
| 10 | - overflow: auto; | ||
| 11 | - } | ||
| 12 | - .system_change_log>ul{ | ||
| 13 | - margin:0px; | ||
| 14 | - list-style:none; | ||
| 15 | - } | ||
| 16 | - | ||
| 17 | - .system_change_log>ul>li.sub_title{ | ||
| 18 | - text-indent: 0; | ||
| 19 | - } | ||
| 20 | - | ||
| 21 | - .system_change_log>ul>li.sub_title>h6{ | ||
| 22 | - font-size: 12px; | ||
| 23 | - font-family: 微软雅黑; | ||
| 24 | - color: #000; | ||
| 25 | - margin-top: 8px; | ||
| 26 | - margin-bottom: 8px; | ||
| 27 | - } | ||
| 28 | - | ||
| 29 | - .system_change_log>ul>li{ | ||
| 30 | - margin: 5px 0; | ||
| 31 | - text-indent: 25px; | ||
| 32 | - } | ||
| 33 | - | ||
| 34 | - .system_change_log .label{ | ||
| 35 | - width: 55px; | ||
| 36 | - display: inline-block; | ||
| 37 | - padding: 0 10px; | ||
| 38 | - line-height: 1.5; | ||
| 39 | - font-size: 12px; | ||
| 40 | - color: #fff; | ||
| 41 | - vertical-align: middle; | ||
| 42 | - white-space: nowrap; | ||
| 43 | - border-radius: 2px !important; | ||
| 44 | - text-transform: uppercase; | ||
| 45 | - text-align: center; | ||
| 46 | - text-indent: 3px; | ||
| 47 | - margin-right: 15px; | ||
| 48 | - } | ||
| 49 | - .system_change_log .label.s_c_add{ | ||
| 50 | - background-color: #32d296; | ||
| 51 | - } | ||
| 52 | - | ||
| 53 | - .system_change_log .label.s_c_change{ | ||
| 54 | - background-color: #1e87f0; | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - .system_change_log .label.s_c_remove{ | ||
| 58 | - background-color: #faa05a; | ||
| 59 | - } | ||
| 60 | -</style> | ||
| 61 | -<div class="system_change_log"> | ||
| 62 | - <h2 style="text-indent: 35px;margin: 10px 0 5px;">2019-08-15 更新说明 Changelog</h2> | ||
| 63 | - <br><br> | ||
| 64 | - <ul > | ||
| 65 | - <li class="sub_title"><h6>线调</h6></li> | ||
| 66 | - <li><span class="label s_c_change">修复</span>1、线路配置里的“场既是站”设置,可以设置多个停车场。</li> | ||
| 67 | - <li><span class="label s_c_change">修复</span>2、修复出场班次和首班发车无指令的问题。</li> | ||
| 68 | - <li><span class="label s_c_change">修复</span>3、修复现调中的模拟地图显示问题。</li> | ||
| 69 | - <li><span class="label s_c_change">修复</span>4、在现调中的实到时间后面加上时间差。</li> | ||
| 70 | - <li class="sub_title"><h6>计划调度</h6></li> | ||
| 71 | - <li><span class="label s_c_change">修复</span>1、时刻表导出时的文件名按照时刻表名称来如(嘉定18路20180215时刻表.xls)及其他导出文件的文件名为(线路名+表名+内容时间)。</li> | ||
| 72 | - <li class="sub_title"><h6>统计报表</h6></li> | ||
| 73 | - <li><span class="label s_c_change">新增</span>1、到离站查询报表。</li> | ||
| 74 | - <li><span class="label s_c_change">修复</span>2、临加班次备注显示在工作汇总中。</li> | ||
| 75 | - <li><span class="label s_c_change">修复</span>3、更新调度日报的排序。</li> | ||
| 76 | - <li><span class="label s_c_change">新增</span>4、在班次日报表中增加一个合计栏。</li> | ||
| 77 | - <li><span class="label s_c_change">修复</span>5、班次日报重做。</li> | ||
| 78 | - <li class="sub_title"><h6>基础信息</h6></li> | ||
| 79 | - <li><span class="label s_c_change">修复</span>1、修复基础信息设备管理的显示问题。</li> | ||
| 80 | - <li><span class="label s_c_change">修复</span>2、修复基础信息中新人员性别识别问题。</li> | ||
| 81 | - <li><span class="label s_c_change">修复</span>3、修复基础中线路站点的序号问题。</li> | ||
| 82 | - </ul> | ||
| 83 | -</div> | ||
| 84 | - | ||
| 85 | -<script type="text/javascript"> | ||
| 86 | - $.get("/user/validPWDExpired", function(msg) { | ||
| 87 | - if ("ok" === msg) { | ||
| 88 | - return; | ||
| 89 | - } | ||
| 90 | - | ||
| 91 | - var htmlText = []; | ||
| 92 | - htmlText.push("<span style='font-weight: bold; font-style: italic; '>" + msg + "</span></br>"); | ||
| 93 | - swal({ | ||
| 94 | - title: "账户密码提示", | ||
| 95 | - text: htmlText.join("</br>"), | ||
| 96 | - html: true, | ||
| 97 | - type: "warning", | ||
| 98 | - showCancelButton: true, | ||
| 99 | - cancelButtonText: "关闭", | ||
| 100 | - confirmButtonColor: "#3598dc", | ||
| 101 | - closeOnConfirm: false | ||
| 102 | - }); | ||
| 103 | - }); | ||
| 104 | -</script> | 1 | +<style> |
| 2 | + .system_change_log{ | ||
| 3 | + background: #fff; | ||
| 4 | + color: #666; | ||
| 5 | + box-shadow: 0 5px 15px rgba(0,0,0,0.08); | ||
| 6 | + height: calc(100% + 10px); | ||
| 7 | + margin-top: -10px; | ||
| 8 | + font-size: 14px; | ||
| 9 | + padding: 10px 0 0 15px; | ||
| 10 | + overflow: auto; | ||
| 11 | + } | ||
| 12 | + .system_change_log>ul{ | ||
| 13 | + margin:0px; | ||
| 14 | + list-style:none; | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + .system_change_log>ul>li.sub_title{ | ||
| 18 | + text-indent: 0; | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + .system_change_log>ul>li.sub_title>h6{ | ||
| 22 | + font-size: 12px; | ||
| 23 | + font-family: 微软雅黑; | ||
| 24 | + color: #000; | ||
| 25 | + margin-top: 8px; | ||
| 26 | + margin-bottom: 8px; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + .system_change_log>ul>li{ | ||
| 30 | + margin: 5px 0; | ||
| 31 | + text-indent: 25px; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + .system_change_log .label{ | ||
| 35 | + width: 55px; | ||
| 36 | + display: inline-block; | ||
| 37 | + padding: 0 10px; | ||
| 38 | + line-height: 1.5; | ||
| 39 | + font-size: 12px; | ||
| 40 | + color: #fff; | ||
| 41 | + vertical-align: middle; | ||
| 42 | + white-space: nowrap; | ||
| 43 | + border-radius: 2px !important; | ||
| 44 | + text-transform: uppercase; | ||
| 45 | + text-align: center; | ||
| 46 | + text-indent: 3px; | ||
| 47 | + margin-right: 15px; | ||
| 48 | + } | ||
| 49 | + .system_change_log .label.s_c_add{ | ||
| 50 | + background-color: #32d296; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + .system_change_log .label.s_c_change{ | ||
| 54 | + background-color: #1e87f0; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + .system_change_log .label.s_c_remove{ | ||
| 58 | + background-color: #faa05a; | ||
| 59 | + } | ||
| 60 | +</style> | ||
| 61 | +<div class="system_change_log"> | ||
| 62 | + <h2 style="text-indent: 35px;margin: 10px 0 5px;">2025-06-15 更新说明 Changelog</h2> | ||
| 63 | + <br><br> | ||
| 64 | + <ul > | ||
| 65 | + <li class="sub_title"><h6>线调</h6></li> | ||
| 66 | + <li><span class="label s_c_change">修复</span>1、线路配置里的“场既是站”设置,可以设置多个停车场。</li> | ||
| 67 | + <li><span class="label s_c_change">修复</span>2、修复出场班次和首班发车无指令的问题。</li> | ||
| 68 | + <li><span class="label s_c_change">修复</span>3、修复现调中的模拟地图显示问题。</li> | ||
| 69 | + <li><span class="label s_c_change">修复</span>4、在现调中的实到时间后面加上时间差。</li> | ||
| 70 | + <li class="sub_title"><h6>计划调度</h6></li> | ||
| 71 | + <li><span class="label s_c_change">修复</span>1、时刻表导出时的文件名按照时刻表名称来如(嘉定18路20180215时刻表.xls)及其他导出文件的文件名为(线路名+表名+内容时间)。</li> | ||
| 72 | + <li class="sub_title"><h6>统计报表</h6></li> | ||
| 73 | + <li><span class="label s_c_change">新增</span>1、到离站查询报表。</li> | ||
| 74 | + <li><span class="label s_c_change">修复</span>2、临加班次备注显示在工作汇总中。</li> | ||
| 75 | + <li><span class="label s_c_change">修复</span>3、更新调度日报的排序。</li> | ||
| 76 | + <li><span class="label s_c_change">新增</span>4、在班次日报表中增加一个合计栏。</li> | ||
| 77 | + <li><span class="label s_c_change">修复</span>5、班次日报重做。</li> | ||
| 78 | + <li class="sub_title"><h6>基础信息</h6></li> | ||
| 79 | + <li><span class="label s_c_change">修复</span>1、修复基础信息设备管理的显示问题。</li> | ||
| 80 | + <li><span class="label s_c_change">修复</span>2、修复基础信息中新人员性别识别问题。</li> | ||
| 81 | + <li><span class="label s_c_change">修复</span>3、修复基础中线路站点的序号问题。</li> | ||
| 82 | + </ul> | ||
| 83 | +</div> | ||
| 84 | + | ||
| 85 | +<script type="text/javascript"> | ||
| 86 | + $.get("/user/validPWDExpired", function(msg) { | ||
| 87 | + if ("ok" === msg) { | ||
| 88 | + return; | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + var htmlText = []; | ||
| 92 | + htmlText.push("<span style='font-weight: bold; font-style: italic; '>" + msg + "</span></br>"); | ||
| 93 | + swal({ | ||
| 94 | + title: "账户密码提示", | ||
| 95 | + text: htmlText.join("</br>"), | ||
| 96 | + html: true, | ||
| 97 | + type: "warning", | ||
| 98 | + showCancelButton: true, | ||
| 99 | + cancelButtonText: "关闭", | ||
| 100 | + confirmButtonColor: "#3598dc", | ||
| 101 | + closeOnConfirm: false | ||
| 102 | + }); | ||
| 103 | + }); | ||
| 104 | +</script> |
src/test/java/com/bsth/entity/sys/Module.java
| 1 | package com.bsth.entity.sys; | 1 | package com.bsth.entity.sys; |
| 2 | 2 | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| 4 | + | ||
| 3 | import javax.persistence.*; | 5 | import javax.persistence.*; |
| 4 | import java.util.Date; | 6 | import java.util.Date; |
| 5 | import java.util.LinkedHashSet; | 7 | import java.util.LinkedHashSet; |
| @@ -26,6 +28,7 @@ public class Module { | @@ -26,6 +28,7 @@ public class Module { | ||
| 26 | 28 | ||
| 27 | private String path; | 29 | private String path; |
| 28 | 30 | ||
| 31 | + @JsonIgnore | ||
| 29 | private String mappSymbol; | 32 | private String mappSymbol; |
| 30 | 33 | ||
| 31 | private boolean enable; | 34 | private boolean enable; |