Commit 068487798423b6eb528c98e055a248def0a48773
1 parent
f10a219b
Update
Showing
7 changed files
with
56 additions
and
7 deletions
src/main/java/com/bsth/entity/Cars.java
| @@ -2,6 +2,7 @@ package com.bsth.entity; | @@ -2,6 +2,7 @@ package com.bsth.entity; | ||
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.BEntity; | 3 | import com.bsth.entity.schedule.BEntity; |
| 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 5 | +import org.hibernate.annotations.Formula; | ||
| 5 | 6 | ||
| 6 | import javax.persistence.*; | 7 | import javax.persistence.*; |
| 7 | import java.io.Serializable; | 8 | import java.io.Serializable; |
| @@ -47,6 +48,10 @@ public class Cars extends BEntity implements Serializable { | @@ -47,6 +48,10 @@ public class Cars extends BEntity implements Serializable { | ||
| 47 | /** 分公司 */ | 48 | /** 分公司 */ |
| 48 | private String brancheCompany; | 49 | private String brancheCompany; |
| 49 | 50 | ||
| 51 | + /** 组合公司分公司编码 */ | ||
| 52 | + @Formula(" concat(business_code, '_', branche_company_code) ") | ||
| 53 | + private String cgsbm; | ||
| 54 | + | ||
| 50 | /** 车辆编码(TODO:在原系统里没有,这里暂时留着) */ | 55 | /** 车辆编码(TODO:在原系统里没有,这里暂时留着) */ |
| 51 | @Column(nullable = false) | 56 | @Column(nullable = false) |
| 52 | private String carCode; | 57 | private String carCode; |
| @@ -499,4 +504,12 @@ public class Cars extends BEntity implements Serializable { | @@ -499,4 +504,12 @@ public class Cars extends BEntity implements Serializable { | ||
| 499 | public void setXlmc(String xlmc) { | 504 | public void setXlmc(String xlmc) { |
| 500 | this.xlmc = xlmc; | 505 | this.xlmc = xlmc; |
| 501 | } | 506 | } |
| 507 | + | ||
| 508 | + public String getCgsbm() { | ||
| 509 | + return cgsbm; | ||
| 510 | + } | ||
| 511 | + | ||
| 512 | + public void setCgsbm(String cgsbm) { | ||
| 513 | + this.cgsbm = cgsbm; | ||
| 514 | + } | ||
| 502 | } | 515 | } |
src/main/java/com/bsth/entity/Personnel.java
| @@ -2,6 +2,7 @@ package com.bsth.entity; | @@ -2,6 +2,7 @@ package com.bsth.entity; | ||
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.BEntity; | 3 | import com.bsth.entity.schedule.BEntity; |
| 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 5 | +import org.hibernate.annotations.Formula; | ||
| 5 | 6 | ||
| 6 | import javax.persistence.*; | 7 | import javax.persistence.*; |
| 7 | 8 | ||
| @@ -39,6 +40,10 @@ public class Personnel extends BEntity { | @@ -39,6 +40,10 @@ public class Personnel extends BEntity { | ||
| 39 | private String brancheCompany; | 40 | private String brancheCompany; |
| 40 | /** 分公司编码 */ | 41 | /** 分公司编码 */ |
| 41 | private String brancheCompanyCode; | 42 | private String brancheCompanyCode; |
| 43 | + /** 组合公司分公司编码 */ | ||
| 44 | + @Formula(" concat(company_code, '_', branche_company_code) ") | ||
| 45 | + private String cgsbm; | ||
| 46 | + | ||
| 42 | /** 工号 */ | 47 | /** 工号 */ |
| 43 | @Column(nullable = false) | 48 | @Column(nullable = false) |
| 44 | private String jobCode; | 49 | private String jobCode; |
| @@ -218,4 +223,12 @@ public class Personnel extends BEntity { | @@ -218,4 +223,12 @@ public class Personnel extends BEntity { | ||
| 218 | public void setDescriptions(String descriptions) { | 223 | public void setDescriptions(String descriptions) { |
| 219 | this.descriptions = descriptions; | 224 | this.descriptions = descriptions; |
| 220 | } | 225 | } |
| 226 | + | ||
| 227 | + public String getCgsbm() { | ||
| 228 | + return cgsbm; | ||
| 229 | + } | ||
| 230 | + | ||
| 231 | + public void setCgsbm(String cgsbm) { | ||
| 232 | + this.cgsbm = cgsbm; | ||
| 233 | + } | ||
| 221 | } | 234 | } |
src/main/resources/application-dev.properties
| @@ -6,11 +6,11 @@ spring.jpa.hibernate.ddl-auto= update | @@ -6,11 +6,11 @@ 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 |
| 9 | -spring.jpa.show-sql= false | 9 | +spring.jpa.show-sql= true |
| 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver | 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 11 | -spring.datasource.url= jdbc:mysql://localhost:3306/qp_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 11 | +spring.datasource.url= jdbc:mysql://127.0.0.1:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 12 | spring.datasource.username= root | 12 | spring.datasource.username= root |
| 13 | -spring.datasource.password= root | 13 | +spring.datasource.password= |
| 14 | #DATASOURCE | 14 | #DATASOURCE |
| 15 | spring.datasource.max-active=100 | 15 | spring.datasource.max-active=100 |
| 16 | spring.datasource.max-idle=8 | 16 | spring.datasource.max-idle=8 |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/module.js
| @@ -4,7 +4,8 @@ angular.module('ScheduleApp').factory( | @@ -4,7 +4,8 @@ angular.module('ScheduleApp').factory( | ||
| 4 | 'BusInfoManageService', | 4 | 'BusInfoManageService', |
| 5 | [ | 5 | [ |
| 6 | 'BusInfoManageService_g', | 6 | 'BusInfoManageService_g', |
| 7 | - function(service) { | 7 | + 'UserPrincipal', |
| 8 | + function(service, UserPrincipal) { | ||
| 8 | 9 | ||
| 9 | /** 当前的查询条件信息 */ | 10 | /** 当前的查询条件信息 */ |
| 10 | var currentSearchCondition = { | 11 | var currentSearchCondition = { |
| @@ -36,6 +37,11 @@ angular.module('ScheduleApp').factory( | @@ -36,6 +37,11 @@ angular.module('ScheduleApp').factory( | ||
| 36 | */ | 37 | */ |
| 37 | getSearchCondition: function() { | 38 | getSearchCondition: function() { |
| 38 | currentSearchCondition.page = currentPage.uiNumber - 1; | 39 | currentSearchCondition.page = currentPage.uiNumber - 1; |
| 40 | + | ||
| 41 | + if (UserPrincipal.getGsStrs().length > 0) { | ||
| 42 | + currentSearchCondition["cgsbm_in"] = UserPrincipal.getGsStrs().join(","); | ||
| 43 | + } | ||
| 44 | + | ||
| 39 | return currentSearchCondition; | 45 | return currentSearchCondition; |
| 40 | }, | 46 | }, |
| 41 | /** | 47 | /** |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js
| @@ -4,7 +4,8 @@ angular.module('ScheduleApp').factory( | @@ -4,7 +4,8 @@ angular.module('ScheduleApp').factory( | ||
| 4 | 'DeviceInfoManageService', | 4 | 'DeviceInfoManageService', |
| 5 | [ | 5 | [ |
| 6 | 'DeviceInfoManageService_g', | 6 | 'DeviceInfoManageService_g', |
| 7 | - function(service) { | 7 | + 'UserPrincipal', |
| 8 | + function(service, UserPrincipal) { | ||
| 8 | /** 当前的查询条件信息 */ | 9 | /** 当前的查询条件信息 */ |
| 9 | var currentSearchCondition = {'isCancel_eq': false}; | 10 | var currentSearchCondition = {'isCancel_eq': false}; |
| 10 | 11 | ||
| @@ -26,6 +27,11 @@ angular.module('ScheduleApp').factory( | @@ -26,6 +27,11 @@ angular.module('ScheduleApp').factory( | ||
| 26 | }, | 27 | }, |
| 27 | getSearchCondition: function() { | 28 | getSearchCondition: function() { |
| 28 | currentSearchCondition.page = currentPage.uiNumber - 1; | 29 | currentSearchCondition.page = currentPage.uiNumber - 1; |
| 30 | + | ||
| 31 | + if (UserPrincipal.getGsStrs().length > 0) { | ||
| 32 | + currentSearchCondition["cgsbm_in"] = UserPrincipal.getGsStrs().join(","); | ||
| 33 | + } | ||
| 34 | + | ||
| 29 | return currentSearchCondition; | 35 | return currentSearchCondition; |
| 30 | }, | 36 | }, |
| 31 | getPage: function(page) { | 37 | getPage: function(page) { |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js
| @@ -4,7 +4,8 @@ angular.module('ScheduleApp').factory( | @@ -4,7 +4,8 @@ angular.module('ScheduleApp').factory( | ||
| 4 | 'EmployeeInfoManageService', | 4 | 'EmployeeInfoManageService', |
| 5 | [ | 5 | [ |
| 6 | 'EmployeeInfoManageService_g', | 6 | 'EmployeeInfoManageService_g', |
| 7 | - function(service) { | 7 | + 'UserPrincipal', |
| 8 | + function(service, UserPrincipal) { | ||
| 8 | 9 | ||
| 9 | /** 当前的查询条件信息 */ | 10 | /** 当前的查询条件信息 */ |
| 10 | var currentSearchCondition = { | 11 | var currentSearchCondition = { |
| @@ -36,6 +37,11 @@ angular.module('ScheduleApp').factory( | @@ -36,6 +37,11 @@ angular.module('ScheduleApp').factory( | ||
| 36 | */ | 37 | */ |
| 37 | getSearchCondition: function() { | 38 | getSearchCondition: function() { |
| 38 | currentSearchCondition.page = currentPage.uiNumber - 1; | 39 | currentSearchCondition.page = currentPage.uiNumber - 1; |
| 40 | + | ||
| 41 | + if (UserPrincipal.getGsStrs().length > 0) { | ||
| 42 | + currentSearchCondition["cgsbm_in"] = UserPrincipal.getGsStrs().join(","); | ||
| 43 | + } | ||
| 44 | + | ||
| 39 | return currentSearchCondition; | 45 | return currentSearchCondition; |
| 40 | }, | 46 | }, |
| 41 | /** | 47 | /** |
src/main/resources/static/pages/scheduleApp/module/common/main.js
| @@ -15,7 +15,8 @@ ScheduleApp.factory('UserPrincipal', [ | @@ -15,7 +15,8 @@ ScheduleApp.factory('UserPrincipal', [ | ||
| 15 | // 登录后获取用户公司信息 | 15 | // 登录后获取用户公司信息 |
| 16 | 16 | ||
| 17 | var gsinfos = []; // 原始返回的对象数据 | 17 | var gsinfos = []; // 原始返回的对象数据 |
| 18 | - var gsinfo_strs = []; // 拼装以后的 | 18 | + var gsinfo_strs = []; // 拼装以后的(公司代码_分公司代码) |
| 19 | + var gsinfo_strs_u = []; // 拼装以后的(分公司代码_公司代码) | ||
| 19 | 20 | ||
| 20 | $http({ | 21 | $http({ |
| 21 | method: 'GET', | 22 | method: 'GET', |
| @@ -28,6 +29,7 @@ ScheduleApp.factory('UserPrincipal', [ | @@ -28,6 +29,7 @@ ScheduleApp.factory('UserPrincipal', [ | ||
| 28 | angular.forEach(obj.children, function(obj2) { | 29 | angular.forEach(obj.children, function(obj2) { |
| 29 | var fgsbm = obj2.code; | 30 | var fgsbm = obj2.code; |
| 30 | gsinfo_strs.push(gsbm + "_" + fgsbm); | 31 | gsinfo_strs.push(gsbm + "_" + fgsbm); |
| 32 | + gsinfo_strs_u.push(fgsbm + "_" + gsbm); | ||
| 31 | }); | 33 | }); |
| 32 | }); | 34 | }); |
| 33 | 35 | ||
| @@ -39,6 +41,9 @@ ScheduleApp.factory('UserPrincipal', [ | @@ -39,6 +41,9 @@ ScheduleApp.factory('UserPrincipal', [ | ||
| 39 | return { | 41 | return { |
| 40 | getGsStrs: function() { | 42 | getGsStrs: function() { |
| 41 | return gsinfo_strs; | 43 | return gsinfo_strs; |
| 44 | + }, | ||
| 45 | + getGsStrsU: function() { | ||
| 46 | + return gsinfo_strs_u; | ||
| 42 | } | 47 | } |
| 43 | }; | 48 | }; |
| 44 | } | 49 | } |