|
@@ -108,12 +108,6 @@ public class AppDeviceController extends JeecgController<AppDevice, IAppDeviceSe
|
|
|
public Result<String> edit(@RequestBody AppDevice appDevice) {
|
|
public Result<String> edit(@RequestBody AppDevice appDevice) {
|
|
|
AppSite appSite = appSiteMapper.selectById(appDevice.getSiteId());
|
|
AppSite appSite = appSiteMapper.selectById(appDevice.getSiteId());
|
|
|
appDevice.setOrgCode(appSite.getOrgCode());
|
|
appDevice.setOrgCode(appSite.getOrgCode());
|
|
|
- if (AppDeviceService.getOne(Wrappers.<AppDevice>lambdaQuery()
|
|
|
|
|
- .eq(AppDevice::getDeviceSerial, appDevice.getDeviceSerial())
|
|
|
|
|
- .eq(AppDevice::getSiteId, appDevice.getSiteId())
|
|
|
|
|
- .eq(AppDevice::getDeviceType, appDevice.getDeviceType())) != null) {
|
|
|
|
|
- return Result.error("设备已存在!");
|
|
|
|
|
- }
|
|
|
|
|
AppDeviceService.updateById(appDevice);
|
|
AppDeviceService.updateById(appDevice);
|
|
|
if (appDevice.getDeviceSerial() != null && appDevice.getValidateCode() != null && appDevice.getSiteId() != null) {
|
|
if (appDevice.getDeviceSerial() != null && appDevice.getValidateCode() != null && appDevice.getSiteId() != null) {
|
|
|
String addDevice = addDevice(appDevice.getDeviceSerial(), appDevice.getValidateCode());
|
|
String addDevice = addDevice(appDevice.getDeviceSerial(), appDevice.getValidateCode());
|