Commit 4a0cb0233b165a865d6825db2fc92778f981e13f

Authored by 徐烜
1 parent 8d2489a9

Update

src/main/java/com/bsth/service/schedule/impl/CarConfigInfoServiceImpl.java
... ... @@ -36,12 +36,14 @@ public class CarConfigInfoServiceImpl extends BServiceImpl<CarConfigInfo, Long>
36 36 throw new ScheduleException("线路未选择");
37 37 } else {
38 38 // param.put("xl.id_eq", carConfigInfo.getXl().getId());
  39 + param.put("isCancel_eq", false);
39 40 if (carConfigInfo.getCl() == null || carConfigInfo.getCl().getId() == null) {
40 41 throw new ScheduleException("车辆未选择");
41 42 } else {
42 43 param.put("cl.id_eq", carConfigInfo.getCl().getId());
43   - if (!CollectionUtils.isEmpty(list(param))) {
44   - throw new ScheduleException("车辆已经配置在" + carConfigInfo.getXl().getName() + "线路中!");
  44 + List<CarConfigInfo> carConfigInfos = list(param);
  45 + if (!CollectionUtils.isEmpty(carConfigInfos)) {
  46 + throw new ScheduleException("车辆已经配置在" + carConfigInfos.get(0).getXl().getName() + "线路中!");
45 47 }
46 48 }
47 49 }
... ...
src/main/java/com/bsth/service/schedule/impl/EmployeeConfigInfoServiceImpl.java
... ... @@ -34,12 +34,15 @@ public class EmployeeConfigInfoServiceImpl extends BServiceImpl&lt;EmployeeConfigIn
34 34 employeeConfigInfo.getXl().getName() == null) {
35 35 throw new ScheduleException("线路未选择");
36 36 } else {
  37 +// param.put("xl.id_eq", employeeConfigInfo.getXl().getId());
  38 + param.put("isCancel_eq", false);
37 39 if (employeeConfigInfo.getJsy() == null || employeeConfigInfo.getJsy().getId() == null) {
38 40 throw new ScheduleException("驾驶员未选择");
39 41 } else {
40 42 param.put("jsy.id_eq", employeeConfigInfo.getJsy().getId());
  43 + List<EmployeeConfigInfo> employeeConfigInfos = list(param);
41 44 if (!CollectionUtils.isEmpty(list(param))) {
42   - throw new ScheduleException("驾驶员已经配置在" + employeeConfigInfo.getXl().getName() + "线路中!");
  45 + throw new ScheduleException("驾驶员已经配置在" + employeeConfigInfos.get(0).getXl().getName() + "线路中!");
43 46 }
44 47 }
45 48 }
... ... @@ -59,12 +62,14 @@ public class EmployeeConfigInfoServiceImpl extends BServiceImpl&lt;EmployeeConfigIn
59 62 employeeConfigInfo.getXl().getName() == null) {
60 63 throw new ScheduleException("线路未选择");
61 64 } else {
  65 +// param.put("xl.id_eq", employeeConfigInfo.getXl().getId());
62 66 if (employeeConfigInfo.getSpy() == null || employeeConfigInfo.getSpy().getId() == null) {
63 67 throw new ScheduleException("售票员未选择");
64 68 } else {
65 69 param.put("spy.id_eq", employeeConfigInfo.getSpy().getId());
  70 + List<EmployeeConfigInfo> employeeConfigInfos = list(param);
66 71 if (!CollectionUtils.isEmpty(list(param))) {
67   - throw new ScheduleException("售票员已经配置在" + employeeConfigInfo.getXl().getName() + "线路中!");
  72 + throw new ScheduleException("售票员已经配置在" + employeeConfigInfos.get(0).getXl().getName() + "线路中!");
68 73 }
69 74 }
70 75 }
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
... ... @@ -189,7 +189,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;BusConfigService_g&#39;, [&#39;$resource&#39;, functi
189 189 return {
190 190 rest : $resource(
191 191 '/cci/:id',
192   - {order: 'xl.id,cl.insideCode,isCancel', direction: 'ASC', id: '@id_route'},
  192 + {order: 'xl.id,cl.insideCode,isCancel', direction: 'ASC', id: '@id'},
193 193 {
194 194 list: {
195 195 method: 'GET',
... ... @@ -244,7 +244,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;EmployeeConfigService_g&#39;, [&#39;$resource&#39;, f
244 244 return {
245 245 rest : $resource(
246 246 '/eci/:id',
247   - {order: 'xl.id,isCancel,dbbmFormula', direction: 'ASC', id: '@id_route'},
  247 + {order: 'xl.id,isCancel,dbbmFormula', direction: 'ASC', id: '@id'},
248 248 {
249 249 list: {
250 250 method: 'GET',
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/edit.html
... ... @@ -135,17 +135,18 @@
135 135 <div class="form-group has-success has-feedback">
136 136 <label class="col-md-2 control-label">停车场*:</label>
137 137 <div class="col-md-3">
138   - <sa-Select3 model="ctrl.busConfigForSave"
139   - name="tcd"
140   - placeholder="请输拼音..."
141   - dcvalue="{{ctrl.busConfigForSave.tcd}}"
  138 + <sa-Select5 name="tcd"
  139 + model="ctrl.busConfigForSave"
  140 + cmaps="{'tcd': 'parkName'}"
142 141 dcname="tcd"
143 142 icname="parkName"
144   - icnames="parkName"
145   - datatype="tcc"
146   - mlp="true"
  143 + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'tcc' } | json }}"
  144 + iterobjname="item"
  145 + iterobjexp="item.parkName"
  146 + searchph="请输拼音..."
  147 + searchexp="this.parkName"
147 148 required >
148   - </sa-Select3>
  149 + </sa-Select5>
149 150 </div>
150 151 <!-- 隐藏块,显示验证信息 -->
151 152 <div class="alert alert-danger well-sm" ng-show="myForm.tcd.$error.required">
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/form.html
... ... @@ -79,7 +79,7 @@
79 79 <input type="hidden" name="cl_h" ng-model="ctrl.busConfigForSave.cl.id"
80 80 remote-Validation
81 81 remotevtype="cc_cars"
82   - remotevparam="{{ {'id_eq': ctrl.busConfigForSave.id, 'xl.id_eq': ctrl.busConfigForSave.xl.id, 'xl.name_eq': ctrl.busConfigForSave.xl.name, 'cl.id_eq': ctrl.busConfigForSave.cl.id} | json}}"
  82 + remotevparam="{{ {'xl.id_eq': ctrl.busConfigForSave.xl.id, 'xl.name_eq': ctrl.busConfigForSave.xl.name, 'cl.id_eq': ctrl.busConfigForSave.cl.id} | json}}"
83 83 />
84 84 </div>
85 85 <!-- 隐藏块,显示验证信息 -->
... ... @@ -135,17 +135,18 @@
135 135 <div class="form-group has-success has-feedback">
136 136 <label class="col-md-2 control-label">停车场*:</label>
137 137 <div class="col-md-3">
138   - <sa-Select3 model="ctrl.busConfigForSave"
139   - name="tcd"
140   - placeholder="请输拼音..."
141   - dcvalue="{{ctrl.busConfigForSave.tcd}}"
  138 + <sa-Select5 name="tcd"
  139 + model="ctrl.busConfigForSave"
  140 + cmaps="{'tcd': 'parkName'}"
142 141 dcname="tcd"
143 142 icname="parkName"
144   - icnames="parkName"
145   - datatype="tcc"
146   - mlp="true"
  143 + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'tcc' } | json }}"
  144 + iterobjname="item"
  145 + iterobjexp="item.parkName"
  146 + searchph="请输拼音..."
  147 + searchexp="this.parkName"
147 148 required >
148   - </sa-Select3>
  149 + </sa-Select5>
149 150 </div>
150 151 <!-- 隐藏块,显示验证信息 -->
151 152 <div class="alert alert-danger well-sm" ng-show="myForm.tcd.$error.required">
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/module.js
... ... @@ -222,17 +222,10 @@ angular.module(&#39;ScheduleApp&#39;).controller(
222 222  
223 223 // 提交方法
224 224 self.submit = function() {
225   - if (id) {
226   - // 更新
227   - self.busConfigForSave.$save({id: id}, function() {
228   - $state.go("busConfig");
229   - });
230   - } else {
231   - // 保存
232   - self.busConfigForSave.$save(function() {
233   - $state.go("busConfig");
234   - });
235   - }
  225 + // 保存或者更新
  226 + self.busConfigForSave.$save(function() {
  227 + $state.go("busConfig");
  228 + });
236 229 };
237 230 }]);
238 231  
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/service.js
... ... @@ -3,7 +3,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;BusConfigService_g&#39;, [&#39;$resource&#39;, functi
3 3 return {
4 4 rest : $resource(
5 5 '/cci/:id',
6   - {order: 'xl.id,cl.insideCode,isCancel', direction: 'ASC', id: '@id_route'},
  6 + {order: 'xl.id,cl.insideCode,isCancel', direction: 'ASC', id: '@id'},
7 7 {
8 8 list: {
9 9 method: 'GET',
... ...
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/form.html
... ... @@ -92,7 +92,7 @@
92 92 <input type="hidden" name="jsy_h" ng-model="ctrl.employeeConfigForSave.jsy.id"
93 93 remote-Validation
94 94 remotevtype="ec_jsy"
95   - remotevparam="{{ {'id_eq': ctrl.employeeConfigForSave.id, 'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'jsy.id_eq': ctrl.employeeConfigForSave.jsy.id} | json}}"
  95 + remotevparam="{{ {'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'jsy.id_eq': ctrl.employeeConfigForSave.jsy.id} | json}}"
96 96 />
97 97 </div>
98 98 <!-- 隐藏块,显示验证信息 -->
... ... @@ -122,7 +122,7 @@
122 122 <input type="hidden" name="spy_h" ng-model="ctrl.employeeConfigForSave.spy.id"
123 123 remote-Validation
124 124 remotevtype="ec_spy"
125   - remotevparam="{{ {'id_eq': ctrl.employeeConfigForSave.id, 'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'spy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}"
  125 + remotevparam="{{ {'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'spy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}"
126 126 />
127 127 </div>
128 128 <!-- 隐藏块,显示验证信息 -->
... ...
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/module.js
... ... @@ -220,17 +220,10 @@ angular.module(&#39;ScheduleApp&#39;).controller(
220 220 self.employeeConfigForSave.spy = null;
221 221 }
222 222  
223   - if (id) {
224   - // 更新
225   - self.employeeConfigForSave.$save({id: id}, function() {
226   - $state.go("employeeConfig");
227   - });
228   - } else {
229   - // 保存
230   - self.employeeConfigForSave.$save(function() {
231   - $state.go("employeeConfig");
232   - });
233   - }
  223 + // 保存或更新
  224 + self.employeeConfigForSave.$save(function() {
  225 + $state.go("employeeConfig");
  226 + });
234 227 };
235 228 }]);
236 229  
... ...
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/service.js
... ... @@ -3,7 +3,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;EmployeeConfigService_g&#39;, [&#39;$resource&#39;, f
3 3 return {
4 4 rest : $resource(
5 5 '/eci/:id',
6   - {order: 'xl.id,isCancel,dbbmFormula', direction: 'ASC', id: '@id_route'},
  6 + {order: 'xl.id,isCancel,dbbmFormula', direction: 'ASC', id: '@id'},
7 7 {
8 8 list: {
9 9 method: 'GET',
... ...