边带调试
This commit is contained in:
parent
f28814f128
commit
ecc2b30eb4
|
|
@ -141,6 +141,9 @@ public class TbBdRecordServiceImpl implements TbBdRecordService{
|
|||
if (tbBdDeviceRecord.size() > 1) {
|
||||
return AjaxResult.error("设备名称或编码与库中重复,请勿重复添加");
|
||||
}
|
||||
if (tbBdDeviceRecord.size() == 1 && !deviceRecord.getId().equals(tbBdDeviceRecord.get(0).getId())) {
|
||||
return AjaxResult.error("提交的数据中设备名称或编码与库中重复,请勿重复添加");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,6 +79,9 @@ public class TbDeviceServiceImpl implements TbDeviceService{
|
|||
if (tbDevice.size() > 1) {
|
||||
return AjaxResult.error(ExceptionEnum.NAME_DUPLICATE.getCode(), "设备名称或编码与库中重复");
|
||||
}
|
||||
if (tbDevice.size() == 1 && !tbDevice.get(0).getId().equals(record.getId())) {
|
||||
return AjaxResult.error(ExceptionEnum.NAME_DUPLICATE.getCode(), "设备名称或编码与库中重复");
|
||||
}
|
||||
}
|
||||
int result = tbDeviceMapper.updateByPrimaryKeySelective(record);
|
||||
if (result > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue