Commit 927f08f6efcbff0580f5b1ba8e30c47b2028bc3a

Authored by 徐烜
1 parent c4c70082

浦东公交计划调度功能优化

1、人员配置添加停用checkbox选项,可以查询出停用人员(后台EmployeeConfigInfo添加了一个@Formula计算驾驶员和售票员的停用情况)
src/main/java/com/bsth/entity/schedule/EmployeeConfigInfo.java
... ... @@ -54,6 +54,22 @@ public class EmployeeConfigInfo extends BEntity implements Serializable {
54 54 @Column(nullable = false)
55 55 private Boolean isCancel = false;
56 56  
  57 + /** 驾驶员停用信息 */
  58 + @Formula("(" +
  59 + "(select IFNULL(t2.destroy, 0) from bsth_c_s_ecinfo t1 left join bsth_c_personnel t2 on t1.jsy = t2.id where t1.id = id)" +
  60 + "+" +
  61 + "(select IFNULL(t2.destroy, 0) from bsth_c_s_ecinfo t1 left join bsth_c_personnel t2 on t1.spy = t2.id where t1.id = id)" +
  62 + ")")
  63 + private Integer ryDestroyStatus;
  64 +
  65 + public Integer getRyDestroyStatus() {
  66 + return ryDestroyStatus;
  67 + }
  68 +
  69 + public void setRyDestroyStatus(Integer ryDestroyStatus) {
  70 + this.ryDestroyStatus = ryDestroyStatus;
  71 + }
  72 +
57 73 public EmployeeConfigInfo() {}
58 74  
59 75 public EmployeeConfigInfo(Object id, Object xlid, Object xlname, Object jsyid, Object spyid) {
... ...
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/list.html
... ... @@ -11,7 +11,8 @@
11 11 <th style="width: 15%;">驾驶员</th>
12 12 <th >售票员工号</th>
13 13 <th >售票员</th>
14   - <th style="width: 80px;">状态</th>
  14 + <th style="width: 80px;">状态1</th>
  15 + <th style="width: 80px;">状态2</th>
15 16 <th style="width: 21%">操作</th>
16 17 </tr>
17 18 <tr role="row" class="filter">
... ... @@ -51,6 +52,11 @@
51 52 </label>
52 53 </td>
53 54 <td>
  55 + <label class="checkbox-inline">
  56 + <input type="checkbox" ng-model="ctrl.personIsDestroyCheck"/>已停用
  57 + </label>
  58 + </td>
  59 + <td>
54 60 <div class="btn-group">
55 61 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;"
56 62 ng-click="ctrl.doPage()">
... ... @@ -111,6 +117,10 @@
111 117 <span class="glyphicon glyphicon-remove" ng-if="info.isCancel == '1'"></span>
112 118 </td>
113 119 <td>
  120 + <span class="glyphicon glyphicon-ok" ng-if="info.ryDestroyStatus == 0"></span>
  121 + <span class="glyphicon glyphicon-remove" ng-if="info.ryDestroyStatus > 0"></span>
  122 + </td>
  123 + <td>
114 124 <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>-->
115 125 <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>-->
116 126 <a ui-sref="employeeConfig_detail({id: info.id})" class="btn btn-info btn-sm"> 详细 </a>
... ... @@ -147,4 +157,4 @@
147 157 </div>
148 158 </div>
149 159  
150   -</div>
151 160 \ No newline at end of file
  161 +</div>
... ...
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/module.js
... ... @@ -236,7 +236,17 @@ angular.module(&#39;ScheduleApp&#39;).controller(
236 236 self.searchCondition = function() {
237 237 return service.getSearchCondition();
238 238 };
  239 + self.personIsDestroyCheck = false; // 人员停用选择框
239 240 self.doPage = function() {
  241 + // 人员停用判定(目前只判定驾驶员)
  242 + delete self.searchCondition()['ryDestroyStatus_gt'];
  243 + delete self.searchCondition()['ryDestroyStatus_eq'];
  244 + if (self.personIsDestroyCheck) {
  245 + self.searchCondition()['ryDestroyStatus_gt'] = 0; // 选中时,true替换成1
  246 + } else {
  247 + self.searchCondition()['ryDestroyStatus_eq'] = 0;
  248 + }
  249 +
240 250 var page = EmpConfig.list(self.searchCondition(), function() {
241 251 service.getPage(page);
242 252 });
... ...