Commit 91456431f95942cd1b2dd09290dec01a549277c3

Authored by 徐烜
1 parent 5590fc42

PSM-17

src/main/java/com/bsth/controller/CarDeviceController.java
@@ -12,7 +12,7 @@ import java.util.Map; @@ -12,7 +12,7 @@ import java.util.Map;
12 * Created by xu on 16/6/15. 12 * Created by xu on 16/6/15.
13 */ 13 */
14 @RestController 14 @RestController
15 -@RequestMapping("carDevice") 15 +@RequestMapping("cde")
16 public class CarDeviceController extends BaseController<CarDevice, Long> { 16 public class CarDeviceController extends BaseController<CarDevice, Long> {
17 17
18 /** 18 /**
src/main/java/com/bsth/entity/CarDevice.java
1 package com.bsth.entity; 1 package com.bsth.entity;
2 2
  3 +import com.bsth.entity.sys.SysUser;
  4 +
3 import javax.persistence.*; 5 import javax.persistence.*;
4 import java.util.Date; 6 import java.util.Date;
5 7
@@ -15,17 +17,32 @@ public class CarDevice { @@ -15,17 +17,32 @@ public class CarDevice {
15 @GeneratedValue 17 @GeneratedValue
16 private Long id; 18 private Long id;
17 19
18 - /** 公司名称 */  
19 - @Column(nullable = false) 20 + /** 公司名称(留着,暂时不用) */
  21 + @Column
20 private String gsName; 22 private String gsName;
  23 +
  24 + /** 车辆id,关联bsth_c_cars */
  25 + @Column(nullable = false)
  26 + private Integer cl;
21 /** 内部编号(自编号) */ 27 /** 内部编号(自编号) */
  28 + @Column(nullable = false)
22 private String clZbh; 29 private String clZbh;
  30 +
  31 + /** 关联 bsth_c_line 主键,不做mapping */
  32 + @Column(nullable = false)
  33 + private Integer xl;
23 /** 线路名称 */ 34 /** 线路名称 */
  35 + @Column(nullable = false)
24 private String xlName; 36 private String xlName;
  37 + /** 线路编码 */
  38 + @Column(nullable = false)
  39 + private String xlBm;
25 40
26 /** 旧终端号 */ 41 /** 旧终端号 */
  42 + @Column(nullable = false)
27 private String oldDeviceNo; 43 private String oldDeviceNo;
28 /** 新终端号 */ 44 /** 新终端号 */
  45 + @Column(nullable = false)
29 private String newDeviceNo; 46 private String newDeviceNo;
30 /** 旧SIM卡号 */ 47 /** 旧SIM卡号 */
31 private String oldSimNo; 48 private String oldSimNo;
@@ -37,11 +54,24 @@ public class CarDevice { @@ -37,11 +54,24 @@ public class CarDevice {
37 /** 保修描述 */ 54 /** 保修描述 */
38 private String guaranteeDesc; 55 private String guaranteeDesc;
39 56
40 - // 创建日期 57 + /** 启用日期 */
  58 + @Column(nullable = false)
  59 + private Date qyrq;
  60 +
  61 + /** 是否删除(标记) */
  62 + @Column(nullable = false)
  63 + private Boolean isCancel = false;
  64 +
  65 + /** 创建人 */
  66 + @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  67 + private SysUser createBy;
  68 + /** 修改人 */
  69 + @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  70 + private SysUser updateBy;
  71 + /** 创建日期 */
41 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") 72 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
42 private Date createDate; 73 private Date createDate;
43 -  
44 - // 修改日期 74 + /** 修改日期 */
45 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") 75 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
46 private Date updateDate; 76 private Date updateDate;
47 77
@@ -61,6 +91,14 @@ public class CarDevice { @@ -61,6 +91,14 @@ public class CarDevice {
61 this.gsName = gsName; 91 this.gsName = gsName;
62 } 92 }
63 93
  94 + public Integer getCl() {
  95 + return cl;
  96 + }
  97 +
  98 + public void setCl(Integer cl) {
  99 + this.cl = cl;
  100 + }
  101 +
64 public String getClZbh() { 102 public String getClZbh() {
65 return clZbh; 103 return clZbh;
66 } 104 }
@@ -69,6 +107,14 @@ public class CarDevice { @@ -69,6 +107,14 @@ public class CarDevice {
69 this.clZbh = clZbh; 107 this.clZbh = clZbh;
70 } 108 }
71 109
  110 + public Integer getXl() {
  111 + return xl;
  112 + }
  113 +
  114 + public void setXl(Integer xl) {
  115 + this.xl = xl;
  116 + }
  117 +
72 public String getXlName() { 118 public String getXlName() {
73 return xlName; 119 return xlName;
74 } 120 }
@@ -77,6 +123,14 @@ public class CarDevice { @@ -77,6 +123,14 @@ public class CarDevice {
77 this.xlName = xlName; 123 this.xlName = xlName;
78 } 124 }
79 125
  126 + public String getXlBm() {
  127 + return xlBm;
  128 + }
  129 +
  130 + public void setXlBm(String xlBm) {
  131 + this.xlBm = xlBm;
  132 + }
  133 +
80 public String getOldDeviceNo() { 134 public String getOldDeviceNo() {
81 return oldDeviceNo; 135 return oldDeviceNo;
82 } 136 }
@@ -125,6 +179,22 @@ public class CarDevice { @@ -125,6 +179,22 @@ public class CarDevice {
125 this.guaranteeDesc = guaranteeDesc; 179 this.guaranteeDesc = guaranteeDesc;
126 } 180 }
127 181
  182 + public SysUser getCreateBy() {
  183 + return createBy;
  184 + }
  185 +
  186 + public void setCreateBy(SysUser createBy) {
  187 + this.createBy = createBy;
  188 + }
  189 +
  190 + public SysUser getUpdateBy() {
  191 + return updateBy;
  192 + }
  193 +
  194 + public void setUpdateBy(SysUser updateBy) {
  195 + this.updateBy = updateBy;
  196 + }
  197 +
128 public Date getCreateDate() { 198 public Date getCreateDate() {
129 return createDate; 199 return createDate;
130 } 200 }
@@ -140,4 +210,20 @@ public class CarDevice { @@ -140,4 +210,20 @@ public class CarDevice {
140 public void setUpdateDate(Date updateDate) { 210 public void setUpdateDate(Date updateDate) {
141 this.updateDate = updateDate; 211 this.updateDate = updateDate;
142 } 212 }
  213 +
  214 + public Date getQyrq() {
  215 + return qyrq;
  216 + }
  217 +
  218 + public void setQyrq(Date qyrq) {
  219 + this.qyrq = qyrq;
  220 + }
  221 +
  222 + public Boolean getIsCancel() {
  223 + return isCancel;
  224 + }
  225 +
  226 + public void setIsCancel(Boolean isCancel) {
  227 + this.isCancel = isCancel;
  228 + }
143 } 229 }
src/main/java/com/bsth/service/impl/CarDeviceServiceImpl.java
1 package com.bsth.service.impl; 1 package com.bsth.service.impl;
2 2
  3 +import com.bsth.common.ResponseCode;
3 import com.bsth.entity.CarDevice; 4 import com.bsth.entity.CarDevice;
  5 +import com.bsth.entity.schedule.rule.RerunRule;
  6 +import com.bsth.repository.CarDeviceRepository;
4 import com.bsth.service.CarDeviceService; 7 import com.bsth.service.CarDeviceService;
  8 +import org.springframework.beans.factory.annotation.Autowired;
5 import org.springframework.stereotype.Service; 9 import org.springframework.stereotype.Service;
6 10
  11 +import javax.transaction.Transactional;
  12 +import java.util.HashMap;
  13 +import java.util.Map;
  14 +
7 /** 15 /**
8 * Created by xu on 16/6/15. 16 * Created by xu on 16/6/15.
9 */ 17 */
10 @Service 18 @Service
11 public class CarDeviceServiceImpl extends BaseServiceImpl<CarDevice, Long> implements CarDeviceService { 19 public class CarDeviceServiceImpl extends BaseServiceImpl<CarDevice, Long> implements CarDeviceService {
  20 +
  21 + @Autowired
  22 + private CarDeviceRepository carDeviceRepository;
  23 +
  24 + @Transactional
  25 + @Override
  26 + public Map<String, Object> delete(Long aLong) {
  27 + // 获取作废数据
  28 + CarDevice carDevice = carDeviceRepository.findOne(aLong);
  29 +
  30 + toogleIsCancel(carDevice);
  31 +
  32 + Map<String, Object> map = new HashMap<>();
  33 + map.put("status", ResponseCode.SUCCESS);
  34 +
  35 + return map;
  36 + }
  37 +
  38 + /**
  39 + * 撤销/作废切换。
  40 + * @param rerunRule
  41 + */
  42 + private void toogleIsCancel(CarDevice carDevice) {
  43 + boolean isCancel = carDevice.getIsCancel();
  44 + if (isCancel) {
  45 + carDevice.setIsCancel(false);
  46 + } else {
  47 + carDevice.setIsCancel(true);
  48 + }
  49 + }
12 } 50 }
src/main/java/com/bsth/util/Geo/AnalySection.java
1 package com.bsth.util.Geo; 1 package com.bsth.util.Geo;
2 2
  3 +import com.bsth.util.db.DBUtils_MS;
  4 +
3 import java.sql.Connection; 5 import java.sql.Connection;
4 import java.sql.PreparedStatement; 6 import java.sql.PreparedStatement;
5 import java.sql.ResultSet; 7 import java.sql.ResultSet;
@@ -9,9 +11,7 @@ import java.util.HashMap; @@ -9,9 +11,7 @@ import java.util.HashMap;
9 import java.util.List; 11 import java.util.List;
10 import java.util.Map; 12 import java.util.Map;
11 13
12 -import org.junit.Test;  
13 -  
14 -import com.bsth.util.db.DBUtils_MS; 14 +//import org.junit.Test;
15 15
16 public class AnalySection { 16 public class AnalySection {
17 17
src/main/resources/datatools/config-dev.properties
@@ -4,11 +4,11 @@ @@ -4,11 +4,11 @@
4 datatools.kettle_properties=/datatools/kettle.properties 4 datatools.kettle_properties=/datatools/kettle.properties
5 # 2、ktr文件通用配置变量(数据库连接,根据不同的环境需要修正) 5 # 2、ktr文件通用配置变量(数据库连接,根据不同的环境需要修正)
6 #数据库ip地址 6 #数据库ip地址
7 -datatools.kvars_dbip=192.168.168.201 7 +datatools.kvars_dbip=127.0.0.1
8 #数据库用户名 8 #数据库用户名
9 datatools.kvars_dbuname=root 9 datatools.kvars_dbuname=root
10 #数据库密码 10 #数据库密码
11 -datatools.kvars_dbpwd=123456 11 +datatools.kvars_dbpwd=
12 #数据库库名 12 #数据库库名
13 datatools.kvars_dbdname=qp_control 13 datatools.kvars_dbdname=qp_control
14 14
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/detail.html
@@ -35,13 +35,6 @@ @@ -35,13 +35,6 @@
35 <form class="form-horizontal" novalidate name="myForm"> 35 <form class="form-horizontal" novalidate name="myForm">
36 <div class="form-body"> 36 <div class="form-body">
37 <div class="form-group has-success has-feedback"> 37 <div class="form-group has-success has-feedback">
38 - <label class="col-md-2 control-label">所属公司*:</label>  
39 - <div class="col-md-3">  
40 - <input type="text" class="form-control" name="gsName"  
41 - ng-model="ctrl.deviceInfoForDetail.gsName" readonly/>  
42 - </div>  
43 - </div>  
44 - <div class="form-group has-success has-feedback">  
45 <label class="col-md-2 control-label">车辆内部编号/自编号*:</label> 38 <label class="col-md-2 control-label">车辆内部编号/自编号*:</label>
46 <div class="col-md-3"> 39 <div class="col-md-3">
47 <input type="text" class="form-control" name="clZbh" 40 <input type="text" class="form-control" name="clZbh"
@@ -101,6 +94,15 @@ @@ -101,6 +94,15 @@
101 </div> 94 </div>
102 </div> 95 </div>
103 96
  97 + <div class="form-group has-success has-feedback">
  98 + <label class="col-md-2 control-label">启用日期*:</label>
  99 + <div class="col-md-3">
  100 + <input type="text" class="form-control"
  101 + name="qyrq" uib-datepicker-popup="yyyy年MM月dd日"
  102 + ng-model="ctrl.deviceInfoForDetail.qyrq" readonly/>
  103 + </div>
  104 + </div>
  105 +
104 <!-- 其他form-group --> 106 <!-- 其他form-group -->
105 107
106 </div> 108 </div>
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js
1 // 设备信息维护 service controller 等写在一起 1 // 设备信息维护 service controller 等写在一起
2 2
3 angular.module('ScheduleApp').factory('DeviceInfoManageService', ['DeviceInfoManageService_g', function(service) { 3 angular.module('ScheduleApp').factory('DeviceInfoManageService', ['DeviceInfoManageService_g', function(service) {
4 - /** 公司字典 */  
5 - var gses = [  
6 - {gsdm: "55", gsmc: "上南公司"},  
7 - {gsdm: "22", gsmc: "金高公司"},  
8 - {gsdm: "05", gsmc: "杨高公司"},  
9 - {gsdm: "26", gsmc: "南汇公司"}  
10 - ];  
11 -  
12 /** 当前的查询条件信息 */ 4 /** 当前的查询条件信息 */
13 var currentSearchCondition = {}; 5 var currentSearchCondition = {};
14 6
@@ -17,12 +9,6 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;DeviceInfoManageService&#39;, [&#39;DeviceInfoMan @@ -17,12 +9,6 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;DeviceInfoManageService&#39;, [&#39;DeviceInfoMan
17 9
18 return { 10 return {
19 /** 11 /**
20 - * 获取公司字典。  
21 - */  
22 - getGses: function() {  
23 - return gses;  
24 - },  
25 - /**  
26 * 获取查询条件信息, 12 * 获取查询条件信息,
27 * 用于给controller用来和页面数据绑定。 13 * 用于给controller用来和页面数据绑定。
28 */ 14 */
@@ -71,6 +57,14 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;DeviceInfoManageService&#39;, [&#39;DeviceInfoMan @@ -71,6 +57,14 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;DeviceInfoManageService&#39;, [&#39;DeviceInfoMan
71 */ 57 */
72 saveDetail: function(obj) { 58 saveDetail: function(obj) {
73 return service.save(obj).$promise; 59 return service.save(obj).$promise;
  60 + },
  61 + /**
  62 + * 删除信息。
  63 + * @param id 主键id
  64 + * @returns {*|Function|promise|n}
  65 + */
  66 + deleteDetail: function(id) {
  67 + return service.delete({id: id}).$promise;
74 } 68 }
75 }; 69 };
76 70
@@ -130,7 +124,39 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;DeviceInfoManageListCtrl&#39;, [&#39;DeviceInf @@ -130,7 +124,39 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;DeviceInfoManageListCtrl&#39;, [&#39;DeviceInf
130 }; 124 };
131 // 重置查询条件 125 // 重置查询条件
132 self.resetSearchCondition = function() { 126 self.resetSearchCondition = function() {
133 - return deviceInfoManageService.resetSearchCondition(); 127 + deviceInfoManageService.resetSearchCondition();
  128 + self.pageInfo.currentPage = 1;
  129 + self.pageChanaged();
  130 + };
  131 +
  132 + // 作废/撤销
  133 + self.toggleCde = function(id) {
  134 + // TODO:
  135 + deviceInfoManageService.deleteDetail(id).then(
  136 + function(result) {
  137 + if (result.message) { // 暂时这样做,之后全局拦截
  138 + alert("失败:" + result.message);
  139 + } else {
  140 + alert("成功!");
  141 +
  142 + deviceInfoManageService.getPage().then(
  143 + function(result) {
  144 + self.pageInfo.totalItems = result.totalElements;
  145 + self.pageInfo.currentPage = result.number + 1;
  146 + self.pageInfo.infos = result.content;
  147 + deviceInfoManageService.setCurrentPageNo(result.number + 1);
  148 + },
  149 + function(result) {
  150 + alert("出错啦!");
  151 + }
  152 + );
  153 + }
  154 +
  155 + },
  156 + function(result) {
  157 + alert("出错啦!" + result);
  158 + }
  159 + );
134 }; 160 };
135 161
136 }]); 162 }]);
@@ -138,20 +164,15 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;DeviceInfoManageListCtrl&#39;, [&#39;DeviceInf @@ -138,20 +164,15 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;DeviceInfoManageListCtrl&#39;, [&#39;DeviceInf
138 angular.module('ScheduleApp').controller('DeviceInfoManageFormCtrl', ['DeviceInfoManageService', '$stateParams', '$state', function(deviceInfoManageService, $stateParams, $state) { 164 angular.module('ScheduleApp').controller('DeviceInfoManageFormCtrl', ['DeviceInfoManageService', '$stateParams', '$state', function(deviceInfoManageService, $stateParams, $state) {
139 var self = this; 165 var self = this;
140 166
  167 + // 启用日期 日期控件开关
  168 + self.qyrqOpen = false;
  169 + self.qyrq_open = function() {
  170 + self.qyrqOpen = true;
  171 + };
  172 +
141 // 欲保存的busInfo信息,绑定 173 // 欲保存的busInfo信息,绑定
142 self.deviceInfoForSave = {}; 174 self.deviceInfoForSave = {};
143 175
144 - // 公司 selectedItem  
145 - self.deviceInfoForSave.gs_selected = null;  
146 - self.gses = deviceInfoManageService.getGses();  
147 - self.gs_selected_change = function($item, $model) {  
148 - self.deviceInfoForSave.gsName = $item.gsmc;  
149 - };  
150 - self.gs_selected_remove = function() {  
151 - self.deviceInfoForSave.gs_selected = null;  
152 - self.deviceInfoForSave.gsName = null;  
153 - };  
154 -  
155 // 获取传过来的id,有的话就是修改,获取一遍数据 176 // 获取传过来的id,有的话就是修改,获取一遍数据
156 var id = $stateParams.id; 177 var id = $stateParams.id;
157 if (id) { 178 if (id) {
@@ -214,7 +235,7 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;DeviceInfoManageDetailCtrl&#39;, [&#39;DeviceI @@ -214,7 +235,7 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;DeviceInfoManageDetailCtrl&#39;, [&#39;DeviceI
214 self.deviceInfoForDetail[key] = result[key]; 235 self.deviceInfoForDetail[key] = result[key];
215 } 236 }
216 237
217 - self.title = "车辆 " + self.deviceInfoForDetail.clZbh + " 详细信息"; 238 + self.title = "车辆 " + self.deviceInfoForDetail.clZbh + "设备信息";
218 }, 239 },
219 function(result) { 240 function(result) {
220 // TODO:弹出框方式以后改 241 // TODO:弹出框方式以后改
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/edit.html
1 <div class="page-head"> 1 <div class="page-head">
2 <div class="page-title"> 2 <div class="page-title">
3 - <h1>修改车辆设备信息</h1> 3 + <h1>添加车辆设备信息</h1>
4 </div> 4 </div>
5 </div> 5 </div>
6 6
@@ -33,54 +33,48 @@ @@ -33,54 +33,48 @@
33 <div class="portlet-body form"> 33 <div class="portlet-body form">
34 <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> 34 <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm">
35 <div class="form-body"> 35 <div class="form-body">
36 - <div class="form-group has-success has-feedback">  
37 - <label class="col-md-2 control-label">所属公司*:</label>  
38 - <div class="col-md-3">  
39 - <div class="input-group">  
40 - <ui-select ng-model="ctrl.deviceInfoForSave.gs_selected"  
41 - on-select="ctrl.gs_selected_change($item, $model)"  
42 - theme="bootstrap" name="gs" required>  
43 - <ui-select-match placeholder="请选择所属公司...">{{$select.selected.gsmc}}</ui-select-match>  
44 - <ui-select-choices repeat="item in ctrl.gses">  
45 - <span ng-bind="item.gsmc"></span>  
46 - </ui-select-choices>  
47 - </ui-select>  
48 - <span class="input-group-btn">  
49 - <button type="button" ng-click="ctrl.gs_selected_remove()" class="btn btn-default">  
50 - <span class="glyphicon glyphicon-trash"></span>  
51 - </button>  
52 - </span>  
53 - </div>  
54 - </div>  
55 - <!-- 隐藏块,显示验证信息 -->  
56 - <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required">  
57 - 公司必须选择  
58 - </div>  
59 - </div>  
60 36
61 <div class="form-group has-success has-feedback"> 37 <div class="form-group has-success has-feedback">
62 - <label class="col-md-2 control-label">车辆内部编号/自编号*:</label> 38 + <label class="col-md-2 control-label">线路*:</label>
63 <div class="col-md-3"> 39 <div class="col-md-3">
64 - <input type="text" class="form-control"  
65 - name="clZbh" ng-model="ctrl.deviceInfoForSave.clZbh"  
66 - required placeholder="请输入车辆内部编号/自编号"/> 40 + <sa-Select5 name="xl"
  41 + model="ctrl.deviceInfoForSave"
  42 + cmaps="{'xl': 'id', 'xlName': 'name', 'xlBm': 'lineCode'}"
  43 + dcname="xl"
  44 + icname="id"
  45 + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'xl' } | json }}"
  46 + iterobjname="item"
  47 + iterobjexp="item.name"
  48 + searchph="请输拼音..."
  49 + searchexp="this.name"
  50 + required >
  51 + </sa-Select5>
67 </div> 52 </div>
68 <!-- 隐藏块,显示验证信息 --> 53 <!-- 隐藏块,显示验证信息 -->
69 - <div class="alert alert-danger well-sm" ng-show="myForm.clZbh.$error.required">  
70 - 车辆内部编号/自编号必须填写 54 + <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required">
  55 + 线路必须选择
71 </div> 56 </div>
72 </div> 57 </div>
73 58
74 <div class="form-group has-success has-feedback"> 59 <div class="form-group has-success has-feedback">
75 - <label class="col-md-2 control-label">线路*:</label> 60 + <label class="col-md-2 control-label">车辆:</label>
76 <div class="col-md-3"> 61 <div class="col-md-3">
77 - <input type="text" class="form-control"  
78 - name="xlName" ng-model="ctrl.deviceInfoForSave.xlName"  
79 - required placeholder="请输入线路"/> 62 + <sa-Select5 name="cl"
  63 + model="ctrl.deviceInfoForSave"
  64 + cmaps="{'cl': 'id', 'clZbh': 'insideCode'}"
  65 + dcname="cl"
  66 + icname="id"
  67 + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'cl' } | json }}"
  68 + iterobjname="item"
  69 + iterobjexp="item.insideCode"
  70 + searchph="请输拼音..."
  71 + searchexp="this.insideCode"
  72 + required >
  73 + </sa-Select5>
80 </div> 74 </div>
81 <!-- 隐藏块,显示验证信息 --> 75 <!-- 隐藏块,显示验证信息 -->
82 - <div class="alert alert-danger well-sm" ng-show="myForm.xlName.$error.required">  
83 - 线路必须填写 76 + <div class="alert alert-danger well-sm" ng-show="myForm.cl.$error.required">
  77 + 车辆必须选饿
84 </div> 78 </div>
85 </div> 79 </div>
86 80
@@ -142,6 +136,28 @@ @@ -142,6 +136,28 @@
142 </div> 136 </div>
143 </div> 137 </div>
144 138
  139 + <div class="form-group has-success has-feedback">
  140 + <label class="col-md-2 control-label">启用日期*:</label>
  141 + <div class="col-md-3">
  142 + <div class="input-group">
  143 + <input type="text" class="form-control"
  144 + name="qyrq" placeholder="请选择启用日期..."
  145 + uib-datepicker-popup="yyyy年MM月dd日"
  146 + is-open="ctrl.qyrqOpen" required
  147 + ng-model="ctrl.deviceInfoForSave.qyrq" readonly/>
  148 + <span class="input-group-btn">
  149 + <button type="button" class="btn btn-default" ng-click="ctrl.qyrq_open()">
  150 + <i class="glyphicon glyphicon-calendar"></i>
  151 + </button>
  152 + </span>
  153 + </div>
  154 + </div>
  155 + <!-- 隐藏块,显示验证信息 -->
  156 + <div class="alert alert-danger well-sm" ng-show="myForm.qyrq.$error.required">
  157 + 启用日期必须选择
  158 + </div>
  159 + </div>
  160 +
145 <!-- 其他form-group --> 161 <!-- 其他form-group -->
146 162
147 </div> 163 </div>
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/form.html
@@ -33,54 +33,48 @@ @@ -33,54 +33,48 @@
33 <div class="portlet-body form"> 33 <div class="portlet-body form">
34 <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> 34 <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm">
35 <div class="form-body"> 35 <div class="form-body">
36 - <div class="form-group has-success has-feedback">  
37 - <label class="col-md-2 control-label">所属公司*:</label>  
38 - <div class="col-md-3">  
39 - <div class="input-group">  
40 - <ui-select ng-model="ctrl.deviceInfoForSave.gs_selected"  
41 - on-select="ctrl.gs_selected_change($item, $model)"  
42 - theme="bootstrap" name="gs" required>  
43 - <ui-select-match placeholder="请选择所属公司...">{{$select.selected.gsmc}}</ui-select-match>  
44 - <ui-select-choices repeat="item in ctrl.gses">  
45 - <span ng-bind="item.gsmc"></span>  
46 - </ui-select-choices>  
47 - </ui-select>  
48 - <span class="input-group-btn">  
49 - <button type="button" ng-click="ctrl.gs_selected_remove()" class="btn btn-default">  
50 - <span class="glyphicon glyphicon-trash"></span>  
51 - </button>  
52 - </span>  
53 - </div>  
54 - </div>  
55 - <!-- 隐藏块,显示验证信息 -->  
56 - <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required">  
57 - 公司必须选择  
58 - </div>  
59 - </div>  
60 36
61 <div class="form-group has-success has-feedback"> 37 <div class="form-group has-success has-feedback">
62 - <label class="col-md-2 control-label">车辆内部编号/自编号*:</label> 38 + <label class="col-md-2 control-label">线路*:</label>
63 <div class="col-md-3"> 39 <div class="col-md-3">
64 - <input type="text" class="form-control"  
65 - name="clZbh" ng-model="ctrl.deviceInfoForSave.clZbh"  
66 - required placeholder="请输入车辆内部编号/自编号"/> 40 + <sa-Select5 name="xl"
  41 + model="ctrl.deviceInfoForSave"
  42 + cmaps="{'xl': 'id', 'xlName': 'name', 'xlBm': 'lineCode'}"
  43 + dcname="xl"
  44 + icname="id"
  45 + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'xl' } | json }}"
  46 + iterobjname="item"
  47 + iterobjexp="item.name"
  48 + searchph="请输拼音..."
  49 + searchexp="this.name"
  50 + required >
  51 + </sa-Select5>
67 </div> 52 </div>
68 <!-- 隐藏块,显示验证信息 --> 53 <!-- 隐藏块,显示验证信息 -->
69 - <div class="alert alert-danger well-sm" ng-show="myForm.clZbh.$error.required">  
70 - 车辆内部编号/自编号必须填写 54 + <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required">
  55 + 线路必须选择
71 </div> 56 </div>
72 </div> 57 </div>
73 58
74 <div class="form-group has-success has-feedback"> 59 <div class="form-group has-success has-feedback">
75 - <label class="col-md-2 control-label">线路*:</label> 60 + <label class="col-md-2 control-label">车辆:</label>
76 <div class="col-md-3"> 61 <div class="col-md-3">
77 - <input type="text" class="form-control"  
78 - name="xlName" ng-model="ctrl.deviceInfoForSave.xlName"  
79 - required placeholder="请输入线路"/> 62 + <sa-Select5 name="cl"
  63 + model="ctrl.deviceInfoForSave"
  64 + cmaps="{'cl': 'id', 'clZbh': 'insideCode'}"
  65 + dcname="cl"
  66 + icname="id"
  67 + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'cl' } | json }}"
  68 + iterobjname="item"
  69 + iterobjexp="item.insideCode"
  70 + searchph="请输拼音..."
  71 + searchexp="this.insideCode"
  72 + required >
  73 + </sa-Select5>
80 </div> 74 </div>
81 <!-- 隐藏块,显示验证信息 --> 75 <!-- 隐藏块,显示验证信息 -->
82 - <div class="alert alert-danger well-sm" ng-show="myForm.xlName.$error.required">  
83 - 线路必须填写 76 + <div class="alert alert-danger well-sm" ng-show="myForm.cl.$error.required">
  77 + 车辆必须选饿
84 </div> 78 </div>
85 </div> 79 </div>
86 80
@@ -142,6 +136,28 @@ @@ -142,6 +136,28 @@
142 </div> 136 </div>
143 </div> 137 </div>
144 138
  139 + <div class="form-group has-success has-feedback">
  140 + <label class="col-md-2 control-label">启用日期*:</label>
  141 + <div class="col-md-3">
  142 + <div class="input-group">
  143 + <input type="text" class="form-control"
  144 + name="qyrq" placeholder="请选择启用日期..."
  145 + uib-datepicker-popup="yyyy年MM月dd日"
  146 + is-open="ctrl.qyrqOpen" required
  147 + ng-model="ctrl.deviceInfoForSave.qyrq" readonly/>
  148 + <span class="input-group-btn">
  149 + <button type="button" class="btn btn-default" ng-click="ctrl.qyrq_open()">
  150 + <i class="glyphicon glyphicon-calendar"></i>
  151 + </button>
  152 + </span>
  153 + </div>
  154 + </div>
  155 + <!-- 隐藏块,显示验证信息 -->
  156 + <div class="alert alert-danger well-sm" ng-show="myForm.qyrq.$error.required">
  157 + 启用日期必须选择
  158 + </div>
  159 + </div>
  160 +
145 <!-- 其他form-group --> 161 <!-- 其他form-group -->
146 162
147 </div> 163 </div>
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/index.html
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 <div class="btn-group"> 35 <div class="btn-group">
36 <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> 36 <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown">
37 <i class="fa fa-share"></i> 37 <i class="fa fa-share"></i>
38 - <span>系统工具</span> 38 + <span>数据工具</span>
39 <i class="fa fa-angle-down"></i> 39 <i class="fa fa-angle-down"></i>
40 </a> 40 </a>
41 <ul class="dropdown-menu pull-right"> 41 <ul class="dropdown-menu pull-right">
@@ -45,13 +45,6 @@ @@ -45,13 +45,6 @@
45 导出excel 45 导出excel
46 </a> 46 </a>
47 </li> 47 </li>
48 - <li class="divider"></li>  
49 - <li>  
50 - <a href="javascript:" class="tool-action">  
51 - <i class="fa fa-refresh"></i>  
52 - 刷行数据  
53 - </a>  
54 - </li>  
55 </ul> 48 </ul>
56 </div> 49 </div>
57 </div> 50 </div>
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/list.html
@@ -5,37 +5,40 @@ @@ -5,37 +5,40 @@
5 <thead> 5 <thead>
6 <tr role="row" class="heading"> 6 <tr role="row" class="heading">
7 <th style="width: 40pt;">序号</th> 7 <th style="width: 40pt;">序号</th>
8 - <th >线路名称</th>  
9 - <th>内部编号</th>  
10 - <th>创建时间</th> 8 + <th style="width: 15%;">线路名称</th>
  9 + <th style="width: 10%;">内部编号</th>
  10 + <th style="width: 100px;">启用日期</th>
11 <th>旧设备编号</th> 11 <th>旧设备编号</th>
12 <th>新设备编号</th> 12 <th>新设备编号</th>
13 <th>旧SIM卡</th> 13 <th>旧SIM卡</th>
14 <th>新SIM卡</th> 14 <th>新SIM卡</th>
15 - <th>操作时间</th>  
16 - <th style="width: 115pt;">操作</th> 15 + <th style="width: 180px;">创建时间</th>
  16 + <th style="width: 150pt;">操作</th>
17 </tr> 17 </tr>
18 <tr role="row" class="filter"> 18 <tr role="row" class="filter">
19 <td></td> 19 <td></td>
20 <td> 20 <td>
21 - <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().xlName_like"/> 21 + <sa-Select5 name="xl"
  22 + model="ctrl.searchCondition()"
  23 + cmaps="{'xl_eq': 'id'}"
  24 + dcname="xl_eq"
  25 + icname="id"
  26 + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'xl' } | json }}"
  27 + iterobjname="item"
  28 + iterobjexp="item.name"
  29 + searchph="请输拼音..."
  30 + searchexp="this.name"
  31 + required >
  32 + </sa-Select5>
22 </td> 33 </td>
23 <td> 34 <td>
24 - <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().clZbh_like"/> 35 + <input type="text" class="form-control form-filter input-sm" ng-model="ctrl.searchCondition()['clBm_like']" placeholder="输入内部编号..."/>
25 </td> 36 </td>
26 <td></td> 37 <td></td>
27 - <td>  
28 - <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().oldDeviceNo_like"/>  
29 - </td>  
30 - <td>  
31 - <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().newDeviceNo_like"/>  
32 - </td>  
33 - <td>  
34 - <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().oldSimNo_like"/>  
35 - </td>  
36 - <td>  
37 - <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().newSimNo_like"/>  
38 - </td> 38 + <td></td>
  39 + <td></td>
  40 + <td></td>
  41 + <td></td>
39 <td></td> 42 <td></td>
40 <td> 43 <td>
41 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" 44 <button class="btn btn-sm green btn-outline filter-submit margin-bottom"
@@ -50,7 +53,7 @@ @@ -50,7 +53,7 @@
50 </tr> 53 </tr>
51 </thead> 54 </thead>
52 <tbody> 55 <tbody>
53 - <tr ng-repeat="info in ctrl.pageInfo.infos" class="odd gradeX"> 56 + <tr ng-repeat="info in ctrl.pageInfo.infos" ng-class="{odd: true, gradeX: true, danger: info.isCancel}">
54 <td> 57 <td>
55 <span ng-bind="$index + 1"></span> 58 <span ng-bind="$index + 1"></span>
56 </td> 59 </td>
@@ -61,7 +64,7 @@ @@ -61,7 +64,7 @@
61 <span ng-bind="info.clZbh"></span> 64 <span ng-bind="info.clZbh"></span>
62 </td> 65 </td>
63 <td> 66 <td>
64 - <span ng-bind="info.createDate | date:'yyyy-MM-dd HH:mm:ss'"></span> 67 + <span ng-bind="info.qyrq | date:'yyyy-MM-dd'"></span>
65 </td> 68 </td>
66 <td> 69 <td>
67 <span ng-bind="info.oldDeviceNo"></span> 70 <span ng-bind="info.oldDeviceNo"></span>
@@ -76,13 +79,15 @@ @@ -76,13 +79,15 @@
76 <span ng-bind="info.newSimNo"></span> 79 <span ng-bind="info.newSimNo"></span>
77 </td> 80 </td>
78 <td> 81 <td>
79 - <span ng-bind="info.updateDate | date:'yyyy-MM-dd HH:mm:ss'"></span> 82 + <span ng-bind="info.createDate | date:'yyyy-MM-dd HH:mm:ss'"></span>
80 </td> 83 </td>
81 <td> 84 <td>
82 <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> 85 <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>-->
83 <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> 86 <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>-->
84 <a ui-sref="deviceInfoManage_detail({id: info.id})" class="btn default blue-stripe btn-sm"> 详细 </a> 87 <a ui-sref="deviceInfoManage_detail({id: info.id})" class="btn default blue-stripe btn-sm"> 详细 </a>
85 - <a ui-sref="deviceInfoManage_edit({id: info.id})" class="btn default blue-stripe btn-sm"> 修改 </a> 88 + <a ui-sref="deviceInfoManage_edit({id: info.id})" class="btn default blue-stripe btn-sm" ng-if="info.isCancel == '0'"> 修改 </a>
  89 + <a ng-click="ctrl.toggleCde(info.id)" class="btn default blue-stripe btn-sm" ng-if="info.isCancel == '0'"> 作废 </a>
  90 + <a ng-click="ctrl.toggleCde(info.id)" class="btn default blue-stripe btn-sm" ng-if="info.isCancel == '1'"> 撤销 </a>
86 </td> 91 </td>
87 </tr> 92 </tr>
88 </tbody> 93 </tbody>
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
@@ -174,8 +174,8 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;EmployeeInfoManageService_g&#39;, [&#39;$resource @@ -174,8 +174,8 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;EmployeeInfoManageService_g&#39;, [&#39;$resource
174 // 车辆设备信息service 174 // 车辆设备信息service
175 angular.module('ScheduleApp').factory('DeviceInfoManageService_g', ['$resource', function($resource) { 175 angular.module('ScheduleApp').factory('DeviceInfoManageService_g', ['$resource', function($resource) {
176 return $resource( 176 return $resource(
177 - '/carDevice/:id',  
178 - {order: 'createDate', direction: 'DESC', id: '@id_route'}, 177 + '/cde/:id',
  178 + {order: 'xl,cl,qyrq', direction: 'DESC', id: '@id_route'},
179 { 179 {
180 list: { 180 list: {
181 method: 'GET', 181 method: 'GET',
@@ -188,6 +188,9 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;DeviceInfoManageService_g&#39;, [&#39;$resource&#39;, @@ -188,6 +188,9 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;DeviceInfoManageService_g&#39;, [&#39;$resource&#39;,
188 }, 188 },
189 save: { 189 save: {
190 method: 'POST' 190 method: 'POST'
  191 + },
  192 + delete: {
  193 + method: 'DELETE'
191 } 194 }
192 } 195 }
193 ); 196 );
src/main/resources/static/pages/scheduleApp/module/common/prj-common-ui-route-state.js
@@ -190,6 +190,8 @@ ScheduleApp.config([&#39;$stateProvider&#39;, &#39;$urlRouterProvider&#39;, function($stateProvi @@ -190,6 +190,8 @@ ScheduleApp.config([&#39;$stateProvider&#39;, &#39;$urlRouterProvider&#39;, function($stateProvi
190 name: 'deviceInfoManage_module', 190 name: 'deviceInfoManage_module',
191 insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 191 insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
192 files: [ 192 files: [
  193 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  194 + "assets/bower_components/angular-ui-select/dist/select.min.js",
193 "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js" 195 "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js"
194 ] 196 ]
195 }); 197 });