Commit ae3823db6c98d21554c7ad300dd08b25ff19e3da

Authored by 徐烜
1 parent 3bb767d0

Update

Showing 20 changed files with 158 additions and 25 deletions
src/main/java/com/bsth/entity/Line.java
1 package com.bsth.entity; 1 package com.bsth.entity;
2 2
3 import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 3 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
  4 +import org.hibernate.annotations.Formula;
4 import org.springframework.format.annotation.DateTimeFormat; 5 import org.springframework.format.annotation.DateTimeFormat;
5 6
6 import javax.persistence.*; 7 import javax.persistence.*;
@@ -69,6 +70,10 @@ public class Line implements Serializable { @@ -69,6 +70,10 @@ public class Line implements Serializable {
69 /** 分公司 varchar length(50)*/ 70 /** 分公司 varchar length(50)*/
70 private String brancheCompany; 71 private String brancheCompany;
71 72
  73 + /** 组合公司分公司编码 */
  74 + @Formula(" concat(company, '_', branche_company) ")
  75 + private String cgsbm;
  76 +
72 /** 性质(线路类型) varchar length(50) */ 77 /** 性质(线路类型) varchar length(50) */
73 private String nature; 78 private String nature;
74 79
@@ -457,4 +462,12 @@ public class Line implements Serializable { @@ -457,4 +462,12 @@ public class Line implements Serializable {
457 public Integer getInUse() { return inUse; } 462 public Integer getInUse() { return inUse; }
458 463
459 public void setInUse(Integer inUse) { this.inUse = inUse; } 464 public void setInUse(Integer inUse) { this.inUse = inUse; }
  465 +
  466 + public String getCgsbm() {
  467 + return cgsbm;
  468 + }
  469 +
  470 + public void setCgsbm(String cgsbm) {
  471 + this.cgsbm = cgsbm;
  472 + }
460 } 473 }
src/main/java/com/bsth/repository/schedule/CarConfigInfoRepository.java
@@ -19,7 +19,9 @@ import org.springframework.stereotype.Repository; @@ -19,7 +19,9 @@ import org.springframework.stereotype.Repository;
19 @Repository 19 @Repository
20 public interface CarConfigInfoRepository extends BaseRepository<CarConfigInfo, Long> { 20 public interface CarConfigInfoRepository extends BaseRepository<CarConfigInfo, Long> {
21 21
22 - @EntityGraph(value = "carConfigInfo_xl_cl", type = EntityGraph.EntityGraphType.FETCH) 22 +// @EntityGraph(value = "carConfigInfo_xl_cl", type = EntityGraph.EntityGraphType.FETCH)
  23 + // 因为使用了in操作符,用 @EntityGraph会报错,升到hibernate 5.0.4就好了,暂时不用@EntityGraph
  24 + // Hibernate ORMHHH-9230
23 @Override 25 @Override
24 Page<CarConfigInfo> findAll(Specification<CarConfigInfo> spec, Pageable pageable); 26 Page<CarConfigInfo> findAll(Specification<CarConfigInfo> spec, Pageable pageable);
25 27
src/main/java/com/bsth/repository/schedule/EmployeeConfigInfoRepository.java
@@ -27,7 +27,9 @@ public interface EmployeeConfigInfoRepository extends BaseRepository&lt;EmployeeCon @@ -27,7 +27,9 @@ public interface EmployeeConfigInfoRepository extends BaseRepository&lt;EmployeeCon
27 @EntityGraph(value = "employeeConfigInfo_jsy_spy_xl", type = EntityGraph.EntityGraphType.FETCH) 27 @EntityGraph(value = "employeeConfigInfo_jsy_spy_xl", type = EntityGraph.EntityGraphType.FETCH)
28 List<EmployeeConfigInfo> findByXlId(Integer xlid); 28 List<EmployeeConfigInfo> findByXlId(Integer xlid);
29 29
30 - @EntityGraph(value = "employeeConfigInfo_jsy_spy_xl", type = EntityGraph.EntityGraphType.FETCH) 30 +// @EntityGraph(value = "employeeConfigInfo_jsy_spy_xl", type = EntityGraph.EntityGraphType.FETCH)
  31 + // 因为使用了in操作符,用 @EntityGraph会报错,升到hibernate 5.0.4就好了,暂时不用@EntityGraph
  32 + // Hibernate ORMHHH-9230
31 @Override 33 @Override
32 Page<EmployeeConfigInfo> findAll(Specification<EmployeeConfigInfo> spec, Pageable pageable); 34 Page<EmployeeConfigInfo> findAll(Specification<EmployeeConfigInfo> spec, Pageable pageable);
33 35
src/main/java/com/bsth/repository/schedule/GuideboardInfoRepository.java
@@ -21,7 +21,9 @@ import org.springframework.stereotype.Repository; @@ -21,7 +21,9 @@ import org.springframework.stereotype.Repository;
21 @Repository 21 @Repository
22 public interface GuideboardInfoRepository extends BaseRepository<GuideboardInfo, Long> { 22 public interface GuideboardInfoRepository extends BaseRepository<GuideboardInfo, Long> {
23 23
24 - @EntityGraph(value = "guideboardInfo_xl", type = EntityGraph.EntityGraphType.FETCH) 24 +// @EntityGraph(value = "guideboardInfo_xl", type = EntityGraph.EntityGraphType.FETCH)
  25 + // 因为使用了in操作符,用 @EntityGraph会报错,升到hibernate 5.0.4就好了,暂时不用@EntityGraph
  26 + // Hibernate ORMHHH-9230
25 @Override 27 @Override
26 Page<GuideboardInfo> findAll(Specification<GuideboardInfo> spec, Pageable pageable); 28 Page<GuideboardInfo> findAll(Specification<GuideboardInfo> spec, Pageable pageable);
27 29
src/main/java/com/bsth/repository/schedule/RerunRuleRepository.java
@@ -15,7 +15,9 @@ import org.springframework.stereotype.Repository; @@ -15,7 +15,9 @@ import org.springframework.stereotype.Repository;
15 */ 15 */
16 @Repository 16 @Repository
17 public interface RerunRuleRepository extends BaseRepository<RerunRule, Long> { 17 public interface RerunRuleRepository extends BaseRepository<RerunRule, Long> {
18 - @EntityGraph(value = "dylp", type = EntityGraph.EntityGraphType.FETCH) 18 +// @EntityGraph(value = "dylp", type = EntityGraph.EntityGraphType.FETCH)
  19 + // 因为使用了in操作符,用 @EntityGraph会报错,升到hibernate 5.0.4就好了,暂时不用@EntityGraph
  20 + // Hibernate ORMHHH-9230
19 @Override 21 @Override
20 Page<RerunRule> findAll(Specification<RerunRule> spec, Pageable pageable); 22 Page<RerunRule> findAll(Specification<RerunRule> spec, Pageable pageable);
21 23
src/main/java/com/bsth/repository/schedule/SchedulePlanRepository.java
@@ -5,7 +5,6 @@ import com.bsth.repository.BaseRepository; @@ -5,7 +5,6 @@ import com.bsth.repository.BaseRepository;
5 import org.springframework.data.domain.Page; 5 import org.springframework.data.domain.Page;
6 import org.springframework.data.domain.Pageable; 6 import org.springframework.data.domain.Pageable;
7 import org.springframework.data.jpa.domain.Specification; 7 import org.springframework.data.jpa.domain.Specification;
8 -import org.springframework.data.jpa.repository.EntityGraph;  
9 import org.springframework.stereotype.Repository; 8 import org.springframework.stereotype.Repository;
10 9
11 /** 10 /**
@@ -13,7 +12,9 @@ import org.springframework.stereotype.Repository; @@ -13,7 +12,9 @@ import org.springframework.stereotype.Repository;
13 */ 12 */
14 @Repository 13 @Repository
15 public interface SchedulePlanRepository extends BaseRepository<SchedulePlan, Long> { 14 public interface SchedulePlanRepository extends BaseRepository<SchedulePlan, Long> {
16 - @EntityGraph(value = "schedulePlan_xl", type = EntityGraph.EntityGraphType.FETCH) 15 +// @EntityGraph(value = "schedulePlan_xl", type = EntityGraph.EntityGraphType.FETCH)
  16 + // 因为使用了in操作符,用 @EntityGraph会报错,升到hibernate 5.0.4就好了,暂时不用@EntityGraph
  17 + // Hibernate ORMHHH-9230
17 @Override 18 @Override
18 Page<SchedulePlan> findAll(Specification<SchedulePlan> spec, Pageable pageable); 19 Page<SchedulePlan> findAll(Specification<SchedulePlan> spec, Pageable pageable);
19 20
src/main/java/com/bsth/repository/schedule/ScheduleRule1FlatRepository.java
@@ -18,7 +18,9 @@ import java.util.List; @@ -18,7 +18,9 @@ import java.util.List;
18 @Repository 18 @Repository
19 public interface ScheduleRule1FlatRepository extends BaseRepository<ScheduleRule1Flat, Long> { 19 public interface ScheduleRule1FlatRepository extends BaseRepository<ScheduleRule1Flat, Long> {
20 20
21 - @EntityGraph(value = "scheduleRule1Flat_xl_carconfig", type = EntityGraph.EntityGraphType.FETCH) 21 +// @EntityGraph(value = "scheduleRule1Flat_xl_carconfig", type = EntityGraph.EntityGraphType.FETCH)
  22 + // 因为使用了in操作符,用 @EntityGraph会报错,升到hibernate 5.0.4就好了,暂时不用@EntityGraph
  23 + // Hibernate ORMHHH-9230
22 @Override 24 @Override
23 Page<ScheduleRule1Flat> findAll(Specification<ScheduleRule1Flat> spec, Pageable pageable); 25 Page<ScheduleRule1Flat> findAll(Specification<ScheduleRule1Flat> spec, Pageable pageable);
24 26
src/main/java/com/bsth/repository/schedule/TTInfoRepository.java
@@ -19,7 +19,9 @@ import java.util.List; @@ -19,7 +19,9 @@ import java.util.List;
19 @Repository 19 @Repository
20 public interface TTInfoRepository extends BaseRepository<TTInfo, Long> { 20 public interface TTInfoRepository extends BaseRepository<TTInfo, Long> {
21 21
22 - @EntityGraph(value = "ttInfo_xl", type = EntityGraph.EntityGraphType.FETCH) 22 +// @EntityGraph(value = "ttInfo_xl", type = EntityGraph.EntityGraphType.FETCH)
  23 + // 因为使用了in操作符,用 @EntityGraph会报错,升到hibernate 5.0.4就好了,暂时不用@EntityGraph
  24 + // Hibernate ORMHHH-9230
23 @Override 25 @Override
24 Page<TTInfo> findAll(Specification<TTInfo> spec, Pageable pageable); 26 Page<TTInfo> findAll(Specification<TTInfo> spec, Pageable pageable);
25 27
src/main/resources/static/pages/scheduleApp/module/common/dts1/select/saSelect5.js
@@ -19,7 +19,8 @@ @@ -19,7 +19,8 @@
19 angular.module('ScheduleApp').directive('saSelect5', [ 19 angular.module('ScheduleApp').directive('saSelect5', [
20 '$timeout', 20 '$timeout',
21 '$$SearchInfoService_g', 21 '$$SearchInfoService_g',
22 - function($timeout, $$searchInfoService_g) { 22 + 'UserPrincipal',
  23 + function($timeout, $$searchInfoService_g, UserPrincipal) {
23 return { 24 return {
24 restrict: 'E', 25 restrict: 'E',
25 templateUrl: '/pages/scheduleApp/module/common/dts1/select/saSelect5Template.html', 26 templateUrl: '/pages/scheduleApp/module/common/dts1/select/saSelect5Template.html',
@@ -281,6 +282,13 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saSelect5&#39;, [ @@ -281,6 +282,13 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saSelect5&#39;, [
281 } 282 }
282 } 283 }
283 284
  285 + // 添加线路查询用的公司分公司信息
  286 + if (atype == 'xl') {
  287 + if (UserPrincipal.getGsStrs().length > 0) {
  288 + ajaxparamobj["cgsbm_in"] = UserPrincipal.getGsStrs().join(",");
  289 + }
  290 + }
  291 +
284 $$searchInfoService_g[atype].list( 292 $$searchInfoService_g[atype].list(
285 ajaxparamobj, 293 ajaxparamobj,
286 function(result) { 294 function(result) {
src/main/resources/static/pages/scheduleApp/module/common/main.js
@@ -9,6 +9,41 @@ var ScheduleApp = angular.module(&#39;ScheduleApp&#39;, [ @@ -9,6 +9,41 @@ var ScheduleApp = angular.module(&#39;ScheduleApp&#39;, [
9 'ngHandsontable' 9 'ngHandsontable'
10 ]); 10 ]);
11 11
  12 +ScheduleApp.factory('UserPrincipal', [
  13 + '$http',
  14 + function($http) {
  15 + // 登录后获取用户公司信息
  16 +
  17 + var gsinfos = []; // 原始返回的对象数据
  18 + var gsinfo_strs = []; // 拼装以后的
  19 +
  20 + $http({
  21 + method: 'GET',
  22 + url: '/user/companyData'
  23 + }).then(function(result) {
  24 + if (angular.isArray(result.data)) {
  25 + gsinfos = result;
  26 + angular.forEach(result.data, function(obj) {
  27 + var gsbm = obj.companyCode;
  28 + angular.forEach(obj.children, function(obj2) {
  29 + var fgsbm = obj2.code;
  30 + gsinfo_strs.push(gsbm + "_" + fgsbm);
  31 + });
  32 + });
  33 +
  34 + }
  35 + console.log(gsinfos);
  36 + console.log(gsinfo_strs);
  37 + });
  38 +
  39 + return {
  40 + getGsStrs: function() {
  41 + return gsinfo_strs;
  42 + }
  43 + };
  44 + }
  45 +]);
  46 +
12 /** 47 /**
13 * 用于请求通知。 48 * 用于请求通知。
14 */ 49 */
@@ -154,8 +189,15 @@ ScheduleApp.factory(&#39;settings&#39;, [&#39;$rootScope&#39;, function($rootScope) { @@ -154,8 +189,15 @@ ScheduleApp.factory(&#39;settings&#39;, [&#39;$rootScope&#39;, function($rootScope) {
154 }]); 189 }]);
155 190
156 /** Schedule App 主应用控制器 */ 191 /** Schedule App 主应用控制器 */
157 -ScheduleApp.controller('ScheduleAppController', ['$scope', function($scope) {  
158 - $scope.$on('$viewContentLoaded', function(event) {  
159 - console.log("子页面已载入:" + event);  
160 - });  
161 -}]);  
162 \ No newline at end of file 192 \ No newline at end of file
  193 +ScheduleApp.controller('ScheduleAppController', [
  194 + '$scope',
  195 + 'UserPrincipal',
  196 + function($scope, UserPrincipal) {
  197 + $scope.$on('$viewContentLoaded', function(event) {
  198 + console.log("子页面已载入:" + event);
  199 + });
  200 +
  201 + // 获取一次用户身份信息
  202 + UserPrincipal.getGsStrs();
  203 + }
  204 +]);
163 \ No newline at end of file 205 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
@@ -1324,7 +1324,8 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saSelect4&#39;, [ @@ -1324,7 +1324,8 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saSelect4&#39;, [
1324 angular.module('ScheduleApp').directive('saSelect5', [ 1324 angular.module('ScheduleApp').directive('saSelect5', [
1325 '$timeout', 1325 '$timeout',
1326 '$$SearchInfoService_g', 1326 '$$SearchInfoService_g',
1327 - function($timeout, $$searchInfoService_g) { 1327 + 'UserPrincipal',
  1328 + function($timeout, $$searchInfoService_g, UserPrincipal) {
1328 return { 1329 return {
1329 restrict: 'E', 1330 restrict: 'E',
1330 templateUrl: '/pages/scheduleApp/module/common/dts1/select/saSelect5Template.html', 1331 templateUrl: '/pages/scheduleApp/module/common/dts1/select/saSelect5Template.html',
@@ -1586,6 +1587,13 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saSelect5&#39;, [ @@ -1586,6 +1587,13 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saSelect5&#39;, [
1586 } 1587 }
1587 } 1588 }
1588 1589
  1590 + // 添加线路查询用的公司分公司信息
  1591 + if (atype == 'xl') {
  1592 + if (UserPrincipal.getGsStrs().length > 0) {
  1593 + ajaxparamobj["cgsbm_in"] = UserPrincipal.getGsStrs().join(",");
  1594 + }
  1595 + }
  1596 +
1589 $$searchInfoService_g[atype].list( 1597 $$searchInfoService_g[atype].list(
1590 ajaxparamobj, 1598 ajaxparamobj,
1591 function(result) { 1599 function(result) {
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
@@ -185,7 +185,7 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -185,7 +185,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(
185 ); 185 );
186 186
187 // 车辆配置service 187 // 车辆配置service
188 -angular.module('ScheduleApp').factory('BusConfigService_g', ['$resource', function($resource) { 188 +angular.module('ScheduleApp').factory('BusConfigService_g', ['$resource', 'UserPrincipal', function($resource, UserPrincipal) {
189 return { 189 return {
190 rest : $resource( 190 rest : $resource(
191 '/cci/:id', 191 '/cci/:id',
src/main/resources/static/pages/scheduleApp/module/core/busConfig/module.js
@@ -3,7 +3,8 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -3,7 +3,8 @@ angular.module(&#39;ScheduleApp&#39;).factory(
3 'BusConfigService', 3 'BusConfigService',
4 [ 4 [
5 'BusConfigService_g', 5 'BusConfigService_g',
6 - function(service) { 6 + 'UserPrincipal',
  7 + function(service, UserPrincipal) {
7 /** 当前的查询条件信息 */ 8 /** 当前的查询条件信息 */
8 var currentSearchCondition = {'isCancel_eq': false}; 9 var currentSearchCondition = {'isCancel_eq': false};
9 10
@@ -29,6 +30,12 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -29,6 +30,12 @@ angular.module(&#39;ScheduleApp&#39;).factory(
29 */ 30 */
30 getSearchCondition: function() { 31 getSearchCondition: function() {
31 currentSearchCondition.page = currentPage.uiNumber - 1; 32 currentSearchCondition.page = currentPage.uiNumber - 1;
  33 +
  34 + // 加公司判定
  35 + if (UserPrincipal.getGsStrs().length > 0) {
  36 + currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(",");
  37 + }
  38 +
32 return currentSearchCondition; 39 return currentSearchCondition;
33 }, 40 },
34 /** 41 /**
src/main/resources/static/pages/scheduleApp/module/core/busConfig/service.js
1 // 车辆配置service 1 // 车辆配置service
2 -angular.module('ScheduleApp').factory('BusConfigService_g', ['$resource', function($resource) { 2 +angular.module('ScheduleApp').factory('BusConfigService_g', ['$resource', 'UserPrincipal', function($resource, UserPrincipal) {
3 return { 3 return {
4 rest : $resource( 4 rest : $resource(
5 '/cci/:id', 5 '/cci/:id',
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/module.js
@@ -4,7 +4,8 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -4,7 +4,8 @@ angular.module(&#39;ScheduleApp&#39;).factory(
4 'EmployeeConfigService', 4 'EmployeeConfigService',
5 [ 5 [
6 'EmployeeConfigService_g', 6 'EmployeeConfigService_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 // 当前查询返回的信息
@@ -29,6 +30,12 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -29,6 +30,12 @@ angular.module(&#39;ScheduleApp&#39;).factory(
29 */ 30 */
30 getSearchCondition: function() { 31 getSearchCondition: function() {
31 currentSearchCondition.page = currentPage.uiNumber - 1; 32 currentSearchCondition.page = currentPage.uiNumber - 1;
  33 +
  34 + // 加公司判定
  35 + if (UserPrincipal.getGsStrs().length > 0) {
  36 + currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(",");
  37 + }
  38 +
32 return currentSearchCondition; 39 return currentSearchCondition;
33 }, 40 },
34 /** 41 /**
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/module.js
@@ -4,7 +4,8 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -4,7 +4,8 @@ angular.module(&#39;ScheduleApp&#39;).factory(
4 'GuideboardManageService', 4 'GuideboardManageService',
5 [ 5 [
6 'GuideboardManageService_g', 6 'GuideboardManageService_g',
7 - function(service) { 7 + 'UserPrincipal',
  8 + function(service, UserPrincipal) {
8 9
9 /** 当前的查询条件信息 */ 10 /** 当前的查询条件信息 */
10 var currentSearchCondition = {page: 0, 'isCancel_eq': false}; 11 var currentSearchCondition = {page: 0, 'isCancel_eq': false};
@@ -31,6 +32,12 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -31,6 +32,12 @@ angular.module(&#39;ScheduleApp&#39;).factory(
31 */ 32 */
32 getSearchCondition: function() { 33 getSearchCondition: function() {
33 currentSearchCondition.page = currentPage.uiNumber - 1; 34 currentSearchCondition.page = currentPage.uiNumber - 1;
  35 +
  36 + // 加公司判定
  37 + if (UserPrincipal.getGsStrs().length > 0) {
  38 + currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(",");
  39 + }
  40 +
34 return currentSearchCondition; 41 return currentSearchCondition;
35 }, 42 },
36 /** 43 /**
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/module.js
@@ -3,7 +3,8 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -3,7 +3,8 @@ angular.module(&#39;ScheduleApp&#39;).factory(
3 'RerunManageService', 3 'RerunManageService',
4 [ 4 [
5 'rerunManageService_g', 5 'rerunManageService_g',
6 - function(service) { 6 + 'UserPrincipal',
  7 + function(service, UserPrincipal) {
7 /** 当前的查询条件信息 */ 8 /** 当前的查询条件信息 */
8 var currentSearchCondition = {'isCancel_eq': false}; 9 var currentSearchCondition = {'isCancel_eq': false};
9 10
@@ -25,6 +26,12 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -25,6 +26,12 @@ angular.module(&#39;ScheduleApp&#39;).factory(
25 }, 26 },
26 getSearchCondition: function() { 27 getSearchCondition: function() {
27 currentSearchCondition.page = currentPage.uiNumber - 1; 28 currentSearchCondition.page = currentPage.uiNumber - 1;
  29 +
  30 + // 加公司判定
  31 + if (UserPrincipal.getGsStrs().length > 0) {
  32 + currentSearchCondition["rerunXl.cgsbm_in"] = UserPrincipal.getGsStrs().join(",");
  33 + }
  34 +
28 return currentSearchCondition; 35 return currentSearchCondition;
29 }, 36 },
30 getPage: function(page) { 37 getPage: function(page) {
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/module.js
1 -// 车辆配置管理 service controller 等写在一起 1 +// 排班计划管理 service controller 等写在一起
2 angular.module('ScheduleApp').factory( 2 angular.module('ScheduleApp').factory(
3 'SchedulePlanManageService', 3 'SchedulePlanManageService',
4 [ 4 [
5 'SchedulePlanManageService_g', 5 'SchedulePlanManageService_g',
6 - function(service) { 6 + 'UserPrincipal',
  7 + function(service, UserPrincipal) {
7 /** 当前的查询条件信息 */ 8 /** 当前的查询条件信息 */
8 var currentSearchCondition = {}; 9 var currentSearchCondition = {};
9 10
@@ -25,6 +26,12 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -25,6 +26,12 @@ angular.module(&#39;ScheduleApp&#39;).factory(
25 }, 26 },
26 getSearchCondition: function() { 27 getSearchCondition: function() {
27 currentSearchCondition.page = currentPage.uiNumber - 1; 28 currentSearchCondition.page = currentPage.uiNumber - 1;
  29 +
  30 + // 加公司判定
  31 + if (UserPrincipal.getGsStrs().length > 0) {
  32 + currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(",");
  33 + }
  34 +
28 return currentSearchCondition; 35 return currentSearchCondition;
29 }, 36 },
30 getPage: function(page) { 37 getPage: function(page) {
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/module.js
@@ -3,7 +3,8 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -3,7 +3,8 @@ angular.module(&#39;ScheduleApp&#39;).factory(
3 'ScheduleRuleManageService', 3 'ScheduleRuleManageService',
4 [ 4 [
5 'ScheduleRuleManageService_g', 5 'ScheduleRuleManageService_g',
6 - function(service) { 6 + 'UserPrincipal',
  7 + function(service, UserPrincipal) {
7 /** 当前的查询条件信息 */ 8 /** 当前的查询条件信息 */
8 var currentSearchCondition = {}; 9 var currentSearchCondition = {};
9 10
@@ -30,6 +31,12 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -30,6 +31,12 @@ angular.module(&#39;ScheduleApp&#39;).factory(
30 */ 31 */
31 getSearchCondition: function() { 32 getSearchCondition: function() {
32 currentSearchCondition.page = currentPage.uiNumber - 1; 33 currentSearchCondition.page = currentPage.uiNumber - 1;
  34 +
  35 + // 加公司判定
  36 + if (UserPrincipal.getGsStrs().length > 0) {
  37 + currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(",");
  38 + }
  39 +
33 return currentSearchCondition; 40 return currentSearchCondition;
34 }, 41 },
35 getPage: function(page) { 42 getPage: function(page) {
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/module.js
@@ -4,7 +4,8 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -4,7 +4,8 @@ angular.module(&#39;ScheduleApp&#39;).factory(
4 [ 4 [
5 'TTInfoManageService_g', 5 'TTInfoManageService_g',
6 'TimeTableDetailManageService_g', 6 'TimeTableDetailManageService_g',
7 - function(service, dservice) { 7 + 'UserPrincipal',
  8 + function(service, dservice, UserPrincipal) {
8 // 当前查询的内容条件搜索对象 9 // 当前查询的内容条件搜索对象
9 var currentSearchCondition = {page: 0, 'isCancel_eq': false}; 10 var currentSearchCondition = {page: 0, 'isCancel_eq': false};
10 // 当前查询返回的信息 11 // 当前查询返回的信息
@@ -25,6 +26,12 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -25,6 +26,12 @@ angular.module(&#39;ScheduleApp&#39;).factory(
25 }, 26 },
26 getSearchCondition: function() { 27 getSearchCondition: function() {
27 currentSearchCondition.page = currentPage.uiNumber - 1; 28 currentSearchCondition.page = currentPage.uiNumber - 1;
  29 +
  30 + // 加公司判定
  31 + if (UserPrincipal.getGsStrs().length > 0) {
  32 + currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(",");
  33 + }
  34 +
28 return currentSearchCondition; 35 return currentSearchCondition;
29 }, 36 },
30 getPage: function(page) { 37 getPage: function(page) {