diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/sys/controller/SysDeviceController.java b/shapelight-admin/src/main/java/net/shapelight/modules/sys/controller/SysDeviceController.java index f898bdb..2d5e679 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/sys/controller/SysDeviceController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/sys/controller/SysDeviceController.java @@ -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("设备已绑定运营商正在使用,请联系运营商先删除"); + for(Long devId: deviceIds) { + SysDeviceEntity sysDeviceEntity = sysDeviceService.getById(devId); + TenDeviceEntity tenDeviceEntity = tenDeviceService.findBySn(sysDeviceEntity.getSn()); + if (tenDeviceEntity != null) { + return R.error("设备:"+sysDeviceEntity.getSn()+" 已绑定运营商,请联系运营商先删除"); } } - - sysDeviceService.removeByIds(Arrays.asList(deviceIds)); - + sysDeviceService.removeByIds(Arrays.asList(deviceIds)); return R.ok(); } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/xian/service/XaApi.java b/shapelight-admin/src/main/java/net/shapelight/modules/xian/service/XaApi.java index e9bcecb..78ac3f9 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/xian/service/XaApi.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/xian/service/XaApi.java @@ -386,15 +386,15 @@ public class XaApi { * appid: 1297164778041095 * appsecret: 22971647780410956329716477804109 * xqid: 610113600000000004538 - */ + */ String appid = "1297164778041095"; String appsecret = "22971647780410956329716477804109"; //伟丰花园: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(); } diff --git a/shapelight-admin/src/main/resources/application-dev.yml b/shapelight-admin/src/main/resources/application-dev.yml index d7842fa..dc83234 100644 --- a/shapelight-admin/src/main/resources/application-dev.yml +++ b/shapelight-admin/src/main/resources/application-dev.yml @@ -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 diff --git a/shapelight-admin/src/main/resources/application.yml b/shapelight-admin/src/main/resources/application.yml index 4deb392..b455393 100644 --- a/shapelight-admin/src/main/resources/application.yml +++ b/shapelight-admin/src/main/resources/application.yml @@ -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