Commit d62a4b7ce241969da12da88977885ef1eaadef2f
1 parent
7d7859c5
设备启用日期使用服务器后台时间
Showing
3 changed files
with
7 additions
and
3 deletions
src/main/java/com/bsth/service/schedule/impl/CarDeviceServiceImpl.java
| @@ -12,6 +12,7 @@ import org.springframework.transaction.annotation.Propagation; | @@ -12,6 +12,7 @@ import org.springframework.transaction.annotation.Propagation; | ||
| 12 | import org.springframework.transaction.annotation.Transactional; | 12 | import org.springframework.transaction.annotation.Transactional; |
| 13 | import org.springframework.util.CollectionUtils; | 13 | import org.springframework.util.CollectionUtils; |
| 14 | 14 | ||
| 15 | +import java.util.Date; | ||
| 15 | import java.util.HashMap; | 16 | import java.util.HashMap; |
| 16 | import java.util.Map; | 17 | import java.util.Map; |
| 17 | 18 | ||
| @@ -29,6 +30,8 @@ public class CarDeviceServiceImpl extends BServiceImpl<CarDevice, Long> implemen | @@ -29,6 +30,8 @@ public class CarDeviceServiceImpl extends BServiceImpl<CarDevice, Long> implemen | ||
| 29 | // 查找对应的车辆基础信息,更新设备编号数据 | 30 | // 查找对应的车辆基础信息,更新设备编号数据 |
| 30 | Cars cars = carsService.findById(carDevice.getCl()); | 31 | Cars cars = carsService.findById(carDevice.getCl()); |
| 31 | cars.setEquipmentCode(carDevice.getNewDeviceNo()); | 32 | cars.setEquipmentCode(carDevice.getNewDeviceNo()); |
| 33 | + // 设备启用日期使用后台日期 | ||
| 34 | + carDevice.setQyrq(new Date()); | ||
| 32 | return super.save(carDevice); | 35 | return super.save(carDevice); |
| 33 | } | 36 | } |
| 34 | 37 |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js
| @@ -164,7 +164,8 @@ angular.module('ScheduleApp').controller( | @@ -164,7 +164,8 @@ angular.module('ScheduleApp').controller( | ||
| 164 | self.submit = function() { | 164 | self.submit = function() { |
| 165 | console.log(self.deviceInfoForSave); | 165 | console.log(self.deviceInfoForSave); |
| 166 | // 修改逻辑,只有新增,没有修改,作废,启用日期就是保存的日期 | 166 | // 修改逻辑,只有新增,没有修改,作废,启用日期就是保存的日期 |
| 167 | - self.deviceInfoForSave.qyrq = new Date().getTime(); | 167 | + // 使用后台日期,不用前台日期 |
| 168 | + // self.deviceInfoForSave.qyrq = new Date().getTime(); | ||
| 168 | 169 | ||
| 169 | // 保存或者更新 | 170 | // 保存或者更新 |
| 170 | self.deviceInfoForSave.$save(function() { | 171 | self.deviceInfoForSave.$save(function() { |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/list.html
| @@ -176,8 +176,8 @@ | @@ -176,8 +176,8 @@ | ||
| 176 | <!--class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑2 </a>--> | 176 | <!--class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑2 </a>--> |
| 177 | <a ui-sref="ttInfoDetailManage_edit3({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name, rflag : true, lineversion : info.lineVersion})" | 177 | <a ui-sref="ttInfoDetailManage_edit3({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name, rflag : true, lineversion : info.lineVersion})" |
| 178 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑 </a> | 178 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑 </a> |
| 179 | - <a ng-click="ctrl.toTtInfoDetailAuto(info.id)" | ||
| 180 | - class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 生成 </a> | 179 | + <!--<a ng-click="ctrl.toTtInfoDetailAuto(info.id)"--> |
| 180 | + <!--class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 生成 </a>--> | ||
| 181 | <a ui-sref="ttInfoDetailManage_form({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})" | 181 | <a ui-sref="ttInfoDetailManage_form({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})" |
| 182 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 导入 </a> | 182 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 导入 </a> |
| 183 | <a href="javascript:" class="btn btn-info btn-sm" ng-click="ctrl.exportData(info.id)"> 导出 </a> | 183 | <a href="javascript:" class="btn btn-info btn-sm" ng-click="ctrl.exportData(info.id)"> 导出 </a> |