设备修改校验code修改
This commit is contained in:
parent
fa02fe3406
commit
10ca189479
@ -98,7 +98,7 @@ public class SysEquipmentServiceImpl implements SysEquipmentService {
|
||||
SysUserVo sysUserVo = (SysUserVo) StpUtil.getTokenSession().get(SessionUtil.SESSION_USER_KEY);
|
||||
SysEquipmentVo oldSysEquipment = sysEquipmentMapper.queryEquipmentInfoByCode(sysEquipmentDto.getCode());
|
||||
// 判断设备编码是否存在
|
||||
if (sysEquipmentMapper.queryEquipmentByCode(sysEquipment.getCode()) > 0) {
|
||||
if (oldSysEquipment != null && sysEquipmentMapper.queryEquipmentByCode(sysEquipment.getCode()) > 0) {
|
||||
if (!oldSysEquipment.getId().equals(sysEquipmentDto.getId())) {
|
||||
throw new RuntimeException("设备编码已存在");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user