1.修复bug,平台删除设备的bug
This commit is contained in:
gaoben 2021-05-19 10:22:49 +08:00
parent 997f024cdb
commit a794fd4f66
4 changed files with 12 additions and 16 deletions

View File

@ -137,18 +137,14 @@ public class SysDeviceController {
@RequiresPermissions("sys:device")
@ApiOperation(value = "删除")
public R delete(@RequestBody Long[] deviceIds){
//删除同步人员
for(Long devId: deviceIds) {
TenDeviceEntity deviceEntity = tenDeviceService.getById(devId);
if(deviceEntity!=null){
return R.error("设备已绑定运营商正在使用,请联系运营商先删除");
SysDeviceEntity sysDeviceEntity = sysDeviceService.getById(devId);
TenDeviceEntity tenDeviceEntity = tenDeviceService.findBySn(sysDeviceEntity.getSn());
if (tenDeviceEntity != null) {
return R.error("设备:"+sysDeviceEntity.getSn()+" 已绑定运营商,请联系运营商先删除");
}
}
sysDeviceService.removeByIds(Arrays.asList(deviceIds));
return R.ok();
}

View File

@ -393,8 +393,8 @@ public class XaApi {
//伟丰花园610113600000000005977 欧风园610113600000000004538
//西安文理学院610113630000000010348 绿地花都610113610000000017653
String xqid = "610113600000000004538";
// String address = getAddress(xqid, appid, appsecret);
// System.out.println(address);
String address = getAddress(xqid, appid, appsecret);
System.out.println(address);
//6.2 获取数据对接接口---------------------------------------------------------------------------
@ -420,7 +420,7 @@ public class XaApi {
//6.3.2 实有人口信息----------------------------------------------------------------------------
// syncPerson();
//6.3.9 车辆出入记录-------------------------------------------------------------
processRecordCarEnter();
// processRecordCarEnter();
}

View File

@ -3,7 +3,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
druid:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.50.232:3306/cell_db_0427?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
url: jdbc:mysql://192.168.50.232:3306/cell_db_0511?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
username: user
password: user@server001
initial-size: 10

View File

@ -78,7 +78,7 @@ global:
opt_dir: opt
db_bak:
db_filepath: db_bak
db_name: cell_db_0427
db_name: cell_db_0511
db_username: root
db_password: root
db_host: localhost