Prechádzať zdrojové kódy

fix(app): 移除重复设备校验逻辑

- 删除了设备编辑接口中的重复设备检查代码-保留设备序列号、站点ID和设备类型的唯一性校验
- 简化设备更新流程,提高接口响应速度- 避免因重复校验导致的性能问题- 确保设备信息更新操作的准确性- 优化了设备管理模块的代码结构
SheepHy 3 dní pred
rodič
commit
4e25ebb41b

+ 0 - 6
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppDeviceController.java

@@ -108,12 +108,6 @@ public class AppDeviceController extends JeecgController<AppDevice, IAppDeviceSe
 	public Result<String> edit(@RequestBody AppDevice appDevice) {
 		AppSite appSite = appSiteMapper.selectById(appDevice.getSiteId());
 		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);
 		if (appDevice.getDeviceSerial() != null && appDevice.getValidateCode() != null && appDevice.getSiteId() != null) {
 			String addDevice = addDevice(appDevice.getDeviceSerial(), appDevice.getValidateCode());