Commit d62a4b7ce241969da12da88977885ef1eaadef2f

Authored by 徐烜
1 parent 7d7859c5

设备启用日期使用服务器后台时间

src/main/java/com/bsth/service/schedule/impl/CarDeviceServiceImpl.java
... ... @@ -12,6 +12,7 @@ import org.springframework.transaction.annotation.Propagation;
12 12 import org.springframework.transaction.annotation.Transactional;
13 13 import org.springframework.util.CollectionUtils;
14 14  
  15 +import java.util.Date;
15 16 import java.util.HashMap;
16 17 import java.util.Map;
17 18  
... ... @@ -29,6 +30,8 @@ public class CarDeviceServiceImpl extends BServiceImpl<CarDevice, Long> implemen
29 30 // 查找对应的车辆基础信息,更新设备编号数据
30 31 Cars cars = carsService.findById(carDevice.getCl());
31 32 cars.setEquipmentCode(carDevice.getNewDeviceNo());
  33 + // 设备启用日期使用后台日期
  34 + carDevice.setQyrq(new Date());
32 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 164 self.submit = function() {
165 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 171 self.deviceInfoForSave.$save(function() {
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/list.html
... ... @@ -176,8 +176,8 @@
176 176 <!--class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑2 </a>-->
177 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 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 181 <a ui-sref="ttInfoDetailManage_form({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})"
182 182 class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 导入 </a>
183 183 <a href="javascript:" class="btn btn-info btn-sm" ng-click="ctrl.exportData(info.id)"> 导出 </a>
... ...