Commit 7bdd48da6de1fd72d90738b3a38c65b52ce8af50
Merge branch 'master' of http://222.66.0.204:8090/panzhaov5/bsth_control
Showing
38 changed files
with
241 additions
and
66 deletions
src/main/java/com/bsth/controller/DictionaryController.java renamed to src/main/java/com/bsth/controller/sys/DictionaryController.java
| 1 | -package com.bsth.controller; | 1 | +package com.bsth.controller.sys; |
| 2 | 2 | ||
| 3 | import org.springframework.web.bind.annotation.RequestMapping; | 3 | import org.springframework.web.bind.annotation.RequestMapping; |
| 4 | import org.springframework.web.bind.annotation.RestController; | 4 | import org.springframework.web.bind.annotation.RestController; |
| 5 | 5 | ||
| 6 | +import com.bsth.controller.BaseController; | ||
| 6 | import com.bsth.entity.sys.Dictionary; | 7 | import com.bsth.entity.sys.Dictionary; |
| 7 | 8 | ||
| 8 | @RestController | 9 | @RestController |
src/main/java/com/bsth/controller/ModuleController.java renamed to src/main/java/com/bsth/controller/sys/ModuleController.java
| 1 | -package com.bsth.controller; | 1 | +package com.bsth.controller.sys; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | 4 | ||
| @@ -7,8 +7,9 @@ import org.springframework.web.bind.annotation.RequestMapping; | @@ -7,8 +7,9 @@ import org.springframework.web.bind.annotation.RequestMapping; | ||
| 7 | import org.springframework.web.bind.annotation.RequestParam; | 7 | import org.springframework.web.bind.annotation.RequestParam; |
| 8 | import org.springframework.web.bind.annotation.RestController; | 8 | import org.springframework.web.bind.annotation.RestController; |
| 9 | 9 | ||
| 10 | +import com.bsth.controller.BaseController; | ||
| 10 | import com.bsth.entity.sys.Module; | 11 | import com.bsth.entity.sys.Module; |
| 11 | -import com.bsth.service.ModuleService; | 12 | +import com.bsth.service.sys.ModuleService; |
| 12 | 13 | ||
| 13 | @RestController | 14 | @RestController |
| 14 | @RequestMapping("module") | 15 | @RequestMapping("module") |
src/main/java/com/bsth/controller/ResourceController.java renamed to src/main/java/com/bsth/controller/sys/ResourceController.java
| 1 | -package com.bsth.controller; | 1 | +package com.bsth.controller.sys; |
| 2 | 2 | ||
| 3 | import java.util.Map; | 3 | import java.util.Map; |
| 4 | 4 | ||
| @@ -9,8 +9,9 @@ import org.springframework.web.bind.annotation.RequestParam; | @@ -9,8 +9,9 @@ import org.springframework.web.bind.annotation.RequestParam; | ||
| 9 | import org.springframework.web.bind.annotation.RestController; | 9 | import org.springframework.web.bind.annotation.RestController; |
| 10 | 10 | ||
| 11 | import com.alibaba.fastjson.JSON; | 11 | import com.alibaba.fastjson.JSON; |
| 12 | +import com.bsth.controller.BaseController; | ||
| 12 | import com.bsth.entity.sys.Resource; | 13 | import com.bsth.entity.sys.Resource; |
| 13 | -import com.bsth.service.ResourceService; | 14 | +import com.bsth.service.sys.ResourceService; |
| 14 | 15 | ||
| 15 | @RestController | 16 | @RestController |
| 16 | @RequestMapping("resource") | 17 | @RequestMapping("resource") |
src/main/java/com/bsth/controller/RoleController.java renamed to src/main/java/com/bsth/controller/sys/RoleController.java
| 1 | -package com.bsth.controller; | 1 | +package com.bsth.controller.sys; |
| 2 | 2 | ||
| 3 | import java.util.Map; | 3 | import java.util.Map; |
| 4 | 4 | ||
| @@ -8,8 +8,9 @@ import org.springframework.web.bind.annotation.RequestMethod; | @@ -8,8 +8,9 @@ import org.springframework.web.bind.annotation.RequestMethod; | ||
| 8 | import org.springframework.web.bind.annotation.RequestParam; | 8 | import org.springframework.web.bind.annotation.RequestParam; |
| 9 | import org.springframework.web.bind.annotation.RestController; | 9 | import org.springframework.web.bind.annotation.RestController; |
| 10 | 10 | ||
| 11 | +import com.bsth.controller.BaseController; | ||
| 11 | import com.bsth.entity.sys.Role; | 12 | import com.bsth.entity.sys.Role; |
| 12 | -import com.bsth.service.RoleService; | 13 | +import com.bsth.service.sys.RoleService; |
| 13 | 14 | ||
| 14 | @RestController | 15 | @RestController |
| 15 | @RequestMapping("role") | 16 | @RequestMapping("role") |
src/main/java/com/bsth/controller/UserController.java renamed to src/main/java/com/bsth/controller/sys/UserController.java
| 1 | -package com.bsth.controller; | 1 | +package com.bsth.controller.sys; |
| 2 | 2 | ||
| 3 | import javax.servlet.http.HttpServletRequest; | 3 | import javax.servlet.http.HttpServletRequest; |
| 4 | import javax.servlet.http.HttpServletResponse; | 4 | import javax.servlet.http.HttpServletResponse; |
| @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping; | @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping; | ||
| 13 | import org.springframework.web.bind.annotation.RestController; | 13 | import org.springframework.web.bind.annotation.RestController; |
| 14 | import org.springframework.web.servlet.ModelAndView; | 14 | import org.springframework.web.servlet.ModelAndView; |
| 15 | 15 | ||
| 16 | +import com.bsth.controller.BaseController; | ||
| 16 | import com.bsth.entity.sys.SysUser; | 17 | import com.bsth.entity.sys.SysUser; |
| 17 | import com.bsth.security.util.SecurityUtils; | 18 | import com.bsth.security.util.SecurityUtils; |
| 18 | 19 |
src/main/java/com/bsth/data/BasicData.java
0 → 100644
src/main/java/com/bsth/data/DirectiveData.java
0 → 100644
src/main/java/com/bsth/data/GpsRealData.java
0 → 100644
src/main/java/com/bsth/data/ScheduleData.java
0 → 100644
src/main/java/com/bsth/entity/realcontrol/ShiftTimeConfig.java
0 → 100644
src/main/java/com/bsth/entity/sys/SessionLog.java
| @@ -40,6 +40,9 @@ public class SessionLog { | @@ -40,6 +40,9 @@ public class SessionLog { | ||
| 40 | 40 | ||
| 41 | /** 登出方式 0:主动登出, -1:其他 */ | 41 | /** 登出方式 0:主动登出, -1:其他 */ |
| 42 | private int logoutType; | 42 | private int logoutType; |
| 43 | + | ||
| 44 | + /** 登录IP */ | ||
| 45 | + private String ip; | ||
| 43 | 46 | ||
| 44 | public Integer getId() { | 47 | public Integer getId() { |
| 45 | return id; | 48 | return id; |
| @@ -88,4 +91,12 @@ public class SessionLog { | @@ -88,4 +91,12 @@ public class SessionLog { | ||
| 88 | public void setLogoutType(int logoutType) { | 91 | public void setLogoutType(int logoutType) { |
| 89 | this.logoutType = logoutType; | 92 | this.logoutType = logoutType; |
| 90 | } | 93 | } |
| 94 | + | ||
| 95 | + public String getIp() { | ||
| 96 | + return ip; | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + public void setIp(String ip) { | ||
| 100 | + this.ip = ip; | ||
| 101 | + } | ||
| 91 | } | 102 | } |
src/main/java/com/bsth/entity/sys/SignControl.java
| @@ -11,10 +11,10 @@ import javax.persistence.Table; | @@ -11,10 +11,10 @@ import javax.persistence.Table; | ||
| 11 | 11 | ||
| 12 | /** | 12 | /** |
| 13 | * | 13 | * |
| 14 | - * @ClassName: SignControl | ||
| 15 | - * @Description: TODO(进出线调记录) | 14 | + * @ClassName: SignControl |
| 15 | + * @Description: TODO(进出线调记录) | ||
| 16 | * @author PanZhao | 16 | * @author PanZhao |
| 17 | - * @date 2016年7月20日 下午4:50:50 | 17 | + * @date 2016年7月20日 下午4:50:50 |
| 18 | * | 18 | * |
| 19 | */ | 19 | */ |
| 20 | @Entity | 20 | @Entity |
| @@ -24,11 +24,67 @@ public class SignControl { | @@ -24,11 +24,67 @@ public class SignControl { | ||
| 24 | @Id | 24 | @Id |
| 25 | @GeneratedValue(strategy = GenerationType.IDENTITY) | 25 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 26 | private Integer id; | 26 | private Integer id; |
| 27 | - | ||
| 28 | - /** 登入线调时间 */ | ||
| 29 | - private Date signDate; | ||
| 30 | - | 27 | + |
| 31 | @ManyToOne | 28 | @ManyToOne |
| 32 | private SessionLog session; | 29 | private SessionLog session; |
| 30 | + | ||
| 31 | + /** 登出线调时间 */ | ||
| 32 | + private Date outDate; | ||
| 33 | + | ||
| 34 | + /** 在线时长 */ | ||
| 35 | + private Long onLineTimel; | ||
| 36 | + | ||
| 37 | + /** 0: 主调模式, 1:监控模式 */ | ||
| 38 | + private int signType; | ||
| 33 | 39 | ||
| 40 | + /** 用户名 */ | ||
| 41 | + private String userName; | ||
| 42 | + | ||
| 43 | + public Integer getId() { | ||
| 44 | + return id; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + public void setId(Integer id) { | ||
| 48 | + this.id = id; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + public SessionLog getSession() { | ||
| 52 | + return session; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + public void setSession(SessionLog session) { | ||
| 56 | + this.session = session; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + public Date getOutDate() { | ||
| 60 | + return outDate; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + public void setOutDate(Date outDate) { | ||
| 64 | + this.outDate = outDate; | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + public Long getOnLineTimel() { | ||
| 68 | + return onLineTimel; | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + public void setOnLineTimel(Long onLineTimel) { | ||
| 72 | + this.onLineTimel = onLineTimel; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + public int getSignType() { | ||
| 76 | + return signType; | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + public void setSignType(int signType) { | ||
| 80 | + this.signType = signType; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + public String getUserName() { | ||
| 84 | + return userName; | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + public void setUserName(String userName) { | ||
| 88 | + this.userName = userName; | ||
| 89 | + } | ||
| 34 | } | 90 | } |
src/main/java/com/bsth/repository/DictionaryRepository.java renamed to src/main/java/com/bsth/repository/sys/DictionaryRepository.java
| 1 | -package com.bsth.repository; | 1 | +package com.bsth.repository.sys; |
| 2 | 2 | ||
| 3 | import org.springframework.stereotype.Repository; | 3 | import org.springframework.stereotype.Repository; |
| 4 | 4 | ||
| 5 | import com.bsth.entity.sys.Dictionary; | 5 | import com.bsth.entity.sys.Dictionary; |
| 6 | +import com.bsth.repository.BaseRepository; | ||
| 6 | 7 | ||
| 7 | @Repository | 8 | @Repository |
| 8 | public interface DictionaryRepository extends BaseRepository<Dictionary, Integer>{ | 9 | public interface DictionaryRepository extends BaseRepository<Dictionary, Integer>{ |
src/main/java/com/bsth/repository/ModuleRepository.java renamed to src/main/java/com/bsth/repository/sys/ModuleRepository.java
| 1 | -package com.bsth.repository; | 1 | +package com.bsth.repository.sys; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import java.util.Set; | 4 | import java.util.Set; |
| @@ -9,6 +9,7 @@ import org.springframework.data.jpa.repository.Query; | @@ -9,6 +9,7 @@ import org.springframework.data.jpa.repository.Query; | ||
| 9 | import org.springframework.stereotype.Repository; | 9 | import org.springframework.stereotype.Repository; |
| 10 | 10 | ||
| 11 | import com.bsth.entity.sys.Module; | 11 | import com.bsth.entity.sys.Module; |
| 12 | +import com.bsth.repository.BaseRepository; | ||
| 12 | 13 | ||
| 13 | @Repository | 14 | @Repository |
| 14 | public interface ModuleRepository extends BaseRepository<Module, Integer>{ | 15 | public interface ModuleRepository extends BaseRepository<Module, Integer>{ |
src/main/java/com/bsth/repository/ResourceRepository.java renamed to src/main/java/com/bsth/repository/sys/ResourceRepository.java
| 1 | -package com.bsth.repository; | 1 | +package com.bsth.repository.sys; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | 4 | ||
| 5 | import org.springframework.stereotype.Repository; | 5 | import org.springframework.stereotype.Repository; |
| 6 | 6 | ||
| 7 | import com.bsth.entity.sys.Resource; | 7 | import com.bsth.entity.sys.Resource; |
| 8 | +import com.bsth.repository.BaseRepository; | ||
| 8 | 9 | ||
| 9 | @Repository | 10 | @Repository |
| 10 | public interface ResourceRepository extends BaseRepository<Resource, Integer> { | 11 | public interface ResourceRepository extends BaseRepository<Resource, Integer> { |
src/main/java/com/bsth/repository/RoleRepository.java renamed to src/main/java/com/bsth/repository/sys/RoleRepository.java
| 1 | -package com.bsth.repository; | 1 | +package com.bsth.repository.sys; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | import javax.transaction.Transactional; | 4 | import javax.transaction.Transactional; |
| @@ -8,6 +8,7 @@ import org.springframework.data.jpa.repository.Query; | @@ -8,6 +8,7 @@ import org.springframework.data.jpa.repository.Query; | ||
| 8 | import org.springframework.stereotype.Repository; | 8 | import org.springframework.stereotype.Repository; |
| 9 | 9 | ||
| 10 | import com.bsth.entity.sys.Role; | 10 | import com.bsth.entity.sys.Role; |
| 11 | +import com.bsth.repository.BaseRepository; | ||
| 11 | 12 | ||
| 12 | @Repository | 13 | @Repository |
| 13 | public interface RoleRepository extends BaseRepository<Role, Integer>{ | 14 | public interface RoleRepository extends BaseRepository<Role, Integer>{ |
src/main/java/com/bsth/repository/sys/SessionLogRepository.java
0 → 100644
| 1 | +package com.bsth.repository.sys; | ||
| 2 | + | ||
| 3 | +import org.springframework.stereotype.Repository; | ||
| 4 | + | ||
| 5 | +import com.bsth.entity.sys.SessionLog; | ||
| 6 | +import com.bsth.repository.BaseRepository; | ||
| 7 | + | ||
| 8 | +@Repository | ||
| 9 | +public interface SessionLogRepository extends BaseRepository<SessionLog, Integer>{ | ||
| 10 | + | ||
| 11 | +} |
src/main/java/com/bsth/repository/SysUserRepository.java renamed to src/main/java/com/bsth/repository/sys/SysUserRepository.java
| 1 | -package com.bsth.repository; | 1 | +package com.bsth.repository.sys; |
| 2 | 2 | ||
| 3 | import org.springframework.stereotype.Repository; | 3 | import org.springframework.stereotype.Repository; |
| 4 | 4 | ||
| 5 | import com.bsth.entity.sys.SysUser; | 5 | import com.bsth.entity.sys.SysUser; |
| 6 | +import com.bsth.repository.BaseRepository; | ||
| 6 | 7 | ||
| 7 | @Repository | 8 | @Repository |
| 8 | public interface SysUserRepository extends BaseRepository<SysUser, Integer>{ | 9 | public interface SysUserRepository extends BaseRepository<SysUser, Integer>{ |
src/main/java/com/bsth/security/LoginSuccessHandler.java
| 1 | package com.bsth.security; | 1 | package com.bsth.security; |
| 2 | 2 | ||
| 3 | import java.io.IOException; | 3 | import java.io.IOException; |
| 4 | +import java.util.Date; | ||
| 5 | + | ||
| 4 | import javax.servlet.ServletException; | 6 | import javax.servlet.ServletException; |
| 5 | import javax.servlet.http.HttpServletRequest; | 7 | import javax.servlet.http.HttpServletRequest; |
| 6 | import javax.servlet.http.HttpServletResponse; | 8 | import javax.servlet.http.HttpServletResponse; |
| @@ -9,6 +11,7 @@ import org.springframework.security.core.Authentication; | @@ -9,6 +11,7 @@ import org.springframework.security.core.Authentication; | ||
| 9 | import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler; | 11 | import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler; |
| 10 | 12 | ||
| 11 | import com.bsth.common.Constants; | 13 | import com.bsth.common.Constants; |
| 14 | +import com.bsth.entity.sys.SessionLog; | ||
| 12 | import com.bsth.entity.sys.SysUser; | 15 | import com.bsth.entity.sys.SysUser; |
| 13 | import com.bsth.util.IpUtils; | 16 | import com.bsth.util.IpUtils; |
| 14 | 17 | ||
| @@ -20,8 +23,11 @@ public class LoginSuccessHandler extends SavedRequestAwareAuthenticationSuccessH | @@ -20,8 +23,11 @@ public class LoginSuccessHandler extends SavedRequestAwareAuthenticationSuccessH | ||
| 20 | 23 | ||
| 21 | SysUser user = (SysUser) authentication.getPrincipal(); | 24 | SysUser user = (SysUser) authentication.getPrincipal(); |
| 22 | 25 | ||
| 23 | - System.out.println("管理员 " + user.getUserName() + " 登录"); | ||
| 24 | - System.out.println("IP :"+IpUtils.getIpAddr(request)); | 26 | + //日志 |
| 27 | + SessionLog sLog = new SessionLog(); | ||
| 28 | + sLog.setLoginDate(new Date()); | ||
| 29 | + sLog.setUser(user); | ||
| 30 | + sLog.setIp(IpUtils.getIpAddr(request)); | ||
| 25 | 31 | ||
| 26 | //session里写入用户名 | 32 | //session里写入用户名 |
| 27 | request.getSession().setAttribute(Constants.SESSION_USERNAME, user.getUserName()); | 33 | request.getSession().setAttribute(Constants.SESSION_USERNAME, user.getUserName()); |
src/main/java/com/bsth/security/SecurityMetadataSourceService.java
| @@ -16,8 +16,8 @@ import org.springframework.util.PathMatcher; | @@ -16,8 +16,8 @@ import org.springframework.util.PathMatcher; | ||
| 16 | 16 | ||
| 17 | import com.bsth.entity.sys.Resource; | 17 | import com.bsth.entity.sys.Resource; |
| 18 | import com.bsth.entity.sys.Role; | 18 | import com.bsth.entity.sys.Role; |
| 19 | -import com.bsth.service.ResourceService; | ||
| 20 | -import com.bsth.service.RoleService; | 19 | +import com.bsth.service.sys.ResourceService; |
| 20 | +import com.bsth.service.sys.RoleService; | ||
| 21 | import com.google.common.collect.ArrayListMultimap; | 21 | import com.google.common.collect.ArrayListMultimap; |
| 22 | import com.google.common.collect.Multimap; | 22 | import com.google.common.collect.Multimap; |
| 23 | 23 |
src/main/java/com/bsth/security/UserDetailServiceImpl.java
| @@ -9,7 +9,7 @@ import org.springframework.stereotype.Component; | @@ -9,7 +9,7 @@ import org.springframework.stereotype.Component; | ||
| 9 | 9 | ||
| 10 | import com.bsth.entity.sys.SecurityUser; | 10 | import com.bsth.entity.sys.SecurityUser; |
| 11 | import com.bsth.entity.sys.SysUser; | 11 | import com.bsth.entity.sys.SysUser; |
| 12 | -import com.bsth.service.SysUserService; | 12 | +import com.bsth.service.sys.SysUserService; |
| 13 | 13 | ||
| 14 | @Component | 14 | @Component |
| 15 | public class UserDetailServiceImpl implements UserDetailsService{ | 15 | public class UserDetailServiceImpl implements UserDetailsService{ |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -726,8 +726,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -726,8 +726,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 726 | 726 | ||
| 727 | //清除下一班次起点到达时间 | 727 | //清除下一班次起点到达时间 |
| 728 | ScheduleRealInfo next = ScheduleBuffer.getNext(sch); | 728 | ScheduleRealInfo next = ScheduleBuffer.getNext(sch); |
| 729 | - next.setQdzArrDateSJ(null); | ||
| 730 | - ts.add(next); | 729 | + if(null != next){ |
| 730 | + next.setQdzArrDateSJ(null); | ||
| 731 | + ts.add(next); | ||
| 732 | + } | ||
| 731 | } | 733 | } |
| 732 | 734 | ||
| 733 | sch.setRemarks(remarks); | 735 | sch.setRemarks(remarks); |
src/main/java/com/bsth/service/DictionaryService.java renamed to src/main/java/com/bsth/service/sys/DictionaryService.java
| 1 | -package com.bsth.service; | 1 | +package com.bsth.service.sys; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.sys.Dictionary; | 3 | import com.bsth.entity.sys.Dictionary; |
| 4 | +import com.bsth.service.BaseService; | ||
| 4 | 5 | ||
| 5 | public interface DictionaryService extends BaseService<Dictionary, Integer>{ | 6 | public interface DictionaryService extends BaseService<Dictionary, Integer>{ |
| 6 | 7 |
src/main/java/com/bsth/service/ModuleService.java renamed to src/main/java/com/bsth/service/sys/ModuleService.java
| 1 | -package com.bsth.service; | 1 | +package com.bsth.service.sys; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | 4 | ||
| 5 | import com.bsth.entity.sys.Module; | 5 | import com.bsth.entity.sys.Module; |
| 6 | +import com.bsth.service.BaseService; | ||
| 6 | 7 | ||
| 7 | public interface ModuleService extends BaseService<Module, Integer>{ | 8 | public interface ModuleService extends BaseService<Module, Integer>{ |
| 8 | 9 |
src/main/java/com/bsth/service/ResourceService.java renamed to src/main/java/com/bsth/service/sys/ResourceService.java
| 1 | -package com.bsth.service; | 1 | +package com.bsth.service.sys; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import java.util.Map; | 4 | import java.util.Map; |
| 5 | 5 | ||
| 6 | import com.bsth.entity.sys.Resource; | 6 | import com.bsth.entity.sys.Resource; |
| 7 | +import com.bsth.service.BaseService; | ||
| 7 | 8 | ||
| 8 | public interface ResourceService extends BaseService<Resource, Integer> { | 9 | public interface ResourceService extends BaseService<Resource, Integer> { |
| 9 | 10 |
src/main/java/com/bsth/service/RoleService.java renamed to src/main/java/com/bsth/service/sys/RoleService.java
| 1 | -package com.bsth.service; | 1 | +package com.bsth.service.sys; |
| 2 | 2 | ||
| 3 | import java.util.Map; | 3 | import java.util.Map; |
| 4 | 4 | ||
| 5 | import com.bsth.entity.sys.Role; | 5 | import com.bsth.entity.sys.Role; |
| 6 | +import com.bsth.service.BaseService; | ||
| 6 | 7 | ||
| 7 | public interface RoleService extends BaseService<Role, Integer>{ | 8 | public interface RoleService extends BaseService<Role, Integer>{ |
| 8 | 9 |
src/main/java/com/bsth/service/SysUserService.java renamed to src/main/java/com/bsth/service/sys/SysUserService.java
| 1 | -package com.bsth.service; | 1 | +package com.bsth.service.sys; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.sys.SysUser; | 3 | import com.bsth.entity.sys.SysUser; |
| 4 | +import com.bsth.service.BaseService; | ||
| 4 | 5 | ||
| 5 | public interface SysUserService extends BaseService<SysUser, Integer>{ | 6 | public interface SysUserService extends BaseService<SysUser, Integer>{ |
| 6 | 7 |
src/main/java/com/bsth/service/impl/DictionaryServiceImpl.java renamed to src/main/java/com/bsth/service/sys/impl/DictionaryServiceImpl.java
| 1 | -package com.bsth.service.impl; | 1 | +package com.bsth.service.sys.impl; |
| 2 | 2 | ||
| 3 | import org.springframework.stereotype.Service; | 3 | import org.springframework.stereotype.Service; |
| 4 | 4 | ||
| 5 | import com.bsth.entity.sys.Dictionary; | 5 | import com.bsth.entity.sys.Dictionary; |
| 6 | -import com.bsth.service.DictionaryService; | 6 | +import com.bsth.service.impl.BaseServiceImpl; |
| 7 | +import com.bsth.service.sys.DictionaryService; | ||
| 7 | 8 | ||
| 8 | @Service | 9 | @Service |
| 9 | public class DictionaryServiceImpl extends BaseServiceImpl<Dictionary, Integer> implements DictionaryService{ | 10 | public class DictionaryServiceImpl extends BaseServiceImpl<Dictionary, Integer> implements DictionaryService{ |
src/main/java/com/bsth/service/impl/ModuleServiceImpl.java renamed to src/main/java/com/bsth/service/sys/impl/ModuleServiceImpl.java
| 1 | -package com.bsth.service.impl; | 1 | +package com.bsth.service.sys.impl; |
| 2 | 2 | ||
| 3 | import java.util.ArrayList; | 3 | import java.util.ArrayList; |
| 4 | import java.util.HashMap; | 4 | import java.util.HashMap; |
| @@ -14,9 +14,10 @@ import com.bsth.common.ResponseCode; | @@ -14,9 +14,10 @@ import com.bsth.common.ResponseCode; | ||
| 14 | import com.bsth.entity.sys.Module; | 14 | import com.bsth.entity.sys.Module; |
| 15 | import com.bsth.entity.sys.Role; | 15 | import com.bsth.entity.sys.Role; |
| 16 | import com.bsth.entity.sys.SysUser; | 16 | import com.bsth.entity.sys.SysUser; |
| 17 | -import com.bsth.repository.ModuleRepository; | 17 | +import com.bsth.repository.sys.ModuleRepository; |
| 18 | import com.bsth.security.util.SecurityUtils; | 18 | import com.bsth.security.util.SecurityUtils; |
| 19 | -import com.bsth.service.ModuleService; | 19 | +import com.bsth.service.impl.BaseServiceImpl; |
| 20 | +import com.bsth.service.sys.ModuleService; | ||
| 20 | 21 | ||
| 21 | @Service | 22 | @Service |
| 22 | public class ModuleServiceImpl extends BaseServiceImpl<Module, Integer> implements ModuleService{ | 23 | public class ModuleServiceImpl extends BaseServiceImpl<Module, Integer> implements ModuleService{ |
src/main/java/com/bsth/service/impl/ResourceServiceImpl.java renamed to src/main/java/com/bsth/service/sys/impl/ResourceServiceImpl.java
| 1 | -package com.bsth.service.impl; | 1 | +package com.bsth.service.sys.impl; |
| 2 | 2 | ||
| 3 | import java.util.HashMap; | 3 | import java.util.HashMap; |
| 4 | import java.util.List; | 4 | import java.util.List; |
| 5 | import java.util.Map; | 5 | import java.util.Map; |
| 6 | 6 | ||
| 7 | +import org.slf4j.Logger; | ||
| 8 | +import org.slf4j.LoggerFactory; | ||
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | import org.springframework.stereotype.Service; | 10 | import org.springframework.stereotype.Service; |
| 9 | 11 | ||
| 10 | import com.bsth.common.ResponseCode; | 12 | import com.bsth.common.ResponseCode; |
| 11 | import com.bsth.entity.sys.Resource; | 13 | import com.bsth.entity.sys.Resource; |
| 12 | -import com.bsth.repository.ResourceRepository; | ||
| 13 | -import com.bsth.service.ResourceService; | 14 | +import com.bsth.repository.sys.ResourceRepository; |
| 15 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 16 | +import com.bsth.service.sys.ResourceService; | ||
| 14 | 17 | ||
| 15 | @Service | 18 | @Service |
| 16 | public class ResourceServiceImpl extends BaseServiceImpl<Resource, Integer> implements ResourceService{ | 19 | public class ResourceServiceImpl extends BaseServiceImpl<Resource, Integer> implements ResourceService{ |
| @@ -18,6 +21,8 @@ public class ResourceServiceImpl extends BaseServiceImpl<Resource, Integer> impl | @@ -18,6 +21,8 @@ public class ResourceServiceImpl extends BaseServiceImpl<Resource, Integer> impl | ||
| 18 | @Autowired | 21 | @Autowired |
| 19 | ResourceRepository resourceRepository; | 22 | ResourceRepository resourceRepository; |
| 20 | 23 | ||
| 24 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 25 | + | ||
| 21 | @Override | 26 | @Override |
| 22 | public Map<String, Object> saveList(List<Resource> array) { | 27 | public Map<String, Object> saveList(List<Resource> array) { |
| 23 | Map<String, Object> map = new HashMap<>(); | 28 | Map<String, Object> map = new HashMap<>(); |
src/main/java/com/bsth/service/impl/RoleServiceImpl.java renamed to src/main/java/com/bsth/service/sys/impl/RoleServiceImpl.java
| 1 | -package com.bsth.service.impl; | 1 | +package com.bsth.service.sys.impl; |
| 2 | 2 | ||
| 3 | import java.util.ArrayList; | 3 | import java.util.ArrayList; |
| 4 | import java.util.HashMap; | 4 | import java.util.HashMap; |
| @@ -14,9 +14,10 @@ import org.springframework.stereotype.Service; | @@ -14,9 +14,10 @@ import org.springframework.stereotype.Service; | ||
| 14 | import com.bsth.common.ResponseCode; | 14 | import com.bsth.common.ResponseCode; |
| 15 | import com.bsth.entity.sys.Module; | 15 | import com.bsth.entity.sys.Module; |
| 16 | import com.bsth.entity.sys.Role; | 16 | import com.bsth.entity.sys.Role; |
| 17 | -import com.bsth.repository.ModuleRepository; | ||
| 18 | -import com.bsth.repository.RoleRepository; | ||
| 19 | -import com.bsth.service.RoleService; | 17 | +import com.bsth.repository.sys.ModuleRepository; |
| 18 | +import com.bsth.repository.sys.RoleRepository; | ||
| 19 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 20 | +import com.bsth.service.sys.RoleService; | ||
| 20 | 21 | ||
| 21 | @Service | 22 | @Service |
| 22 | public class RoleServiceImpl extends BaseServiceImpl<Role, Integer> implements | 23 | public class RoleServiceImpl extends BaseServiceImpl<Role, Integer> implements |
src/main/java/com/bsth/service/impl/SysUserServiceImpl.java renamed to src/main/java/com/bsth/service/sys/impl/SysUserServiceImpl.java
| 1 | -package com.bsth.service.impl; | 1 | +package com.bsth.service.sys.impl; |
| 2 | 2 | ||
| 3 | import org.springframework.beans.factory.annotation.Autowired; | 3 | import org.springframework.beans.factory.annotation.Autowired; |
| 4 | import org.springframework.stereotype.Service; | 4 | import org.springframework.stereotype.Service; |
| 5 | 5 | ||
| 6 | import com.bsth.entity.sys.SysUser; | 6 | import com.bsth.entity.sys.SysUser; |
| 7 | -import com.bsth.repository.SysUserRepository; | ||
| 8 | -import com.bsth.service.SysUserService; | 7 | +import com.bsth.repository.sys.SysUserRepository; |
| 8 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 9 | +import com.bsth.service.sys.SysUserService; | ||
| 9 | 10 | ||
| 10 | @Service | 11 | @Service |
| 11 | public class SysUserServiceImpl extends BaseServiceImpl<SysUser, Integer> implements SysUserService{ | 12 | public class SysUserServiceImpl extends BaseServiceImpl<SysUser, Integer> implements SysUserService{ |
src/main/java/com/bsth/vehicle/gpsdata/arrival/ThreadPoolTask.java
| @@ -25,7 +25,7 @@ public class ThreadPoolTask implements Runnable { | @@ -25,7 +25,7 @@ public class ThreadPoolTask implements Runnable { | ||
| 25 | 25 | ||
| 26 | for(ScheduleRealInfo sch : allList){ | 26 | for(ScheduleRealInfo sch : allList){ |
| 27 | //停车场即起点站的进出场班次不参与匹配,烂班也不参与 | 27 | //停车场即起点站的进出场班次不参与匹配,烂班也不参与 |
| 28 | - if(!sch.isParkIsFirstStation() && sch.isDestroy()) | 28 | + if(!sch.isParkIsFirstStation() && !sch.isDestroy()) |
| 29 | alMap.put(sch.getClZbh(), sch); | 29 | alMap.put(sch.getClZbh(), sch); |
| 30 | } | 30 | } |
| 31 | 31 |
src/main/resources/application-dev.properties
| @@ -2,7 +2,7 @@ server.port=9088 | @@ -2,7 +2,7 @@ server.port=9088 | ||
| 2 | management.port= 9001 | 2 | management.port= 9001 |
| 3 | management.address= 127.0.0.1 | 3 | management.address= 127.0.0.1 |
| 4 | 4 | ||
| 5 | -spring.jpa.hibernate.ddl-auto= none | 5 | +spring.jpa.hibernate.ddl-auto= update |
| 6 | spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | 6 | spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy |
| 7 | #DATABASE | 7 | #DATABASE |
| 8 | spring.jpa.database= MYSQL | 8 | spring.jpa.database= MYSQL |
| @@ -24,7 +24,8 @@ spring.datasource.test-while-idle=true | @@ -24,7 +24,8 @@ spring.datasource.test-while-idle=true | ||
| 24 | spring.datasource.validation-query=select 1 | 24 | spring.datasource.validation-query=select 1 |
| 25 | 25 | ||
| 26 | ## | 26 | ## |
| 27 | +#222.66.0.204:5555 | ||
| 27 | ##\u5B9E\u65F6gps | 28 | ##\u5B9E\u65F6gps |
| 28 | -http.gps.real.url= http://192.168.168.201:8080/transport_server/rtgps/ | 29 | +http.gps.real.url= http://27.115.69.123:8800/transport_server/rtgps/ |
| 29 | ##\u6D88\u606F\u4E0B\u53D1 | 30 | ##\u6D88\u606F\u4E0B\u53D1 |
| 30 | -http.send.directive = http://192.168.168.201:8080/transport_server/message/ | 31 | +http.send.directive = http://192.168.168.192:8080/transport_server/message/ |
| 31 | \ No newline at end of file | 32 | \ No newline at end of file |
src/main/resources/ms-jdbc.properties
| 1 | +ms.mysql.driver= com.mysql.jdbc.Driver | ||
| 2 | +ms.mysql.url= jdbc:mysql://127.0.0.1:3306/ms?useUnicode=true&characterEncoding=utf-8 | ||
| 3 | +ms.mysql.username= root | ||
| 4 | +ms.mysql.password= panzhao | ||
| 5 | + | ||
| 1 | #ms.mysql.driver= com.mysql.jdbc.Driver | 6 | #ms.mysql.driver= com.mysql.jdbc.Driver |
| 2 | #ms.mysql.url= jdbc:mysql://192.168.168.171:3306/ms?useUnicode=true&characterEncoding=utf-8 | 7 | #ms.mysql.url= jdbc:mysql://192.168.168.171:3306/ms?useUnicode=true&characterEncoding=utf-8 |
| 3 | #ms.mysql.username= root | 8 | #ms.mysql.username= root |
| 4 | -#ms.mysql.password= root2jsp | ||
| 5 | - | ||
| 6 | -ms.mysql.driver= com.mysql.jdbc.Driver | ||
| 7 | -#ms.mysql.url= jdbc:mysql://222.66.0.204:3306/ms?useUnicode=true&characterEncoding=utf-8 | ||
| 8 | -ms.mysql.url= jdbc:mysql://192.168.168.201:3306/ms?useUnicode=true&characterEncoding=utf-8 | ||
| 9 | -ms.mysql.username= root | ||
| 10 | -ms.mysql.password= 123456 | ||
| 11 | \ No newline at end of file | 9 | \ No newline at end of file |
| 10 | +#ms.mysql.password= root2jsp | ||
| 12 | \ No newline at end of file | 11 | \ No newline at end of file |
src/main/resources/static/pages/control/line/css/lineControl.css
| @@ -99,7 +99,7 @@ | @@ -99,7 +99,7 @@ | ||
| 99 | color: white; | 99 | color: white; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | -/*.load-anim .loader{ | 102 | +.load-anim .loader{ |
| 103 | margin: auto !important; | 103 | margin: auto !important; |
| 104 | position: absolute; | 104 | position: absolute; |
| 105 | top: 0; | 105 | top: 0; |
| @@ -109,7 +109,7 @@ | @@ -109,7 +109,7 @@ | ||
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | 111 | ||
| 112 | - .load8 .loader { | 112 | +/* .load8 .loader { |
| 113 | font-size: 10px; | 113 | font-size: 10px; |
| 114 | text-indent: -9999em; | 114 | text-indent: -9999em; |
| 115 | border-top: 1.1em solid rgba(255, 255, 255, 0.2); | 115 | border-top: 1.1em solid rgba(255, 255, 255, 0.2); |
| @@ -146,7 +146,7 @@ | @@ -146,7 +146,7 @@ | ||
| 146 | } | 146 | } |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | - | 149 | + */ |
| 150 | label { | 150 | label { |
| 151 | max-width: none; | 151 | max-width: none; |
| 152 | } | 152 | } |
| @@ -157,7 +157,7 @@ label { | @@ -157,7 +157,7 @@ label { | ||
| 157 | transform: translate(-50%); | 157 | transform: translate(-50%); |
| 158 | font-size: 14px; | 158 | font-size: 14px; |
| 159 | font-family: 仿宋; | 159 | font-family: 仿宋; |
| 160 | -} */ | 160 | +} |
| 161 | body{ | 161 | body{ |
| 162 | overflow: hidden; | 162 | overflow: hidden; |
| 163 | } | 163 | } |
src/main/resources/static/pages/control/line/js/data.js
| @@ -130,7 +130,7 @@ var _data = (function(){ | @@ -130,7 +130,7 @@ var _data = (function(){ | ||
| 130 | if(sch.fcsjT > t) | 130 | if(sch.fcsjT > t) |
| 131 | break; | 131 | break; |
| 132 | 132 | ||
| 133 | - if(sch.fcsjActual == null && sch.fcsjActualTime == null) | 133 | + if(sch.fcsjActual == null && sch.fcsjActualTime == null && sch.status != -1) |
| 134 | num ++; | 134 | num ++; |
| 135 | } | 135 | } |
| 136 | } | 136 | } |
src/main/resources/static/pages/control/line/js/home.js
| @@ -87,13 +87,13 @@ var _home = (function() { | @@ -87,13 +87,13 @@ var _home = (function() { | ||
| 87 | 87 | ||
| 88 | setTimeout(function() { | 88 | setTimeout(function() { |
| 89 | // 提示文本 | 89 | // 提示文本 |
| 90 | - var promptFlag = storage.getItem('promptFlag_0810'); | 90 | + var promptFlag = storage.getItem('promptFlag_0811'); |
| 91 | if (!promptFlag) { | 91 | if (!promptFlag) { |
| 92 | - layer.alert('1、取消的下发调度指令的时间限制<br>2、驾驶员收到的指令显示为待发时间', { | 92 | + layer.alert('1、烂班不再匹配实发实达时间<br>2、调整待发后,计达时间也会相应调整', { |
| 93 | title: '更新信息', | 93 | title: '更新信息', |
| 94 | shift : 5 | 94 | shift : 5 |
| 95 | }); | 95 | }); |
| 96 | - storage.setItem('promptFlag_0810', 1); | 96 | + storage.setItem('promptFlag_0811', 1); |
| 97 | } | 97 | } |
| 98 | }, 1500); | 98 | }, 1500); |
| 99 | 99 |