加保护
This commit is contained in:
parent
ef59a9c084
commit
ef283145e0
|
|
@ -97,7 +97,8 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi
|
||||||
//判断提交表单中是否存在相同编码
|
//判断提交表单中是否存在相同编码
|
||||||
for (int i = 0; i < machIneDtoList.size() - 1; i++) {
|
for (int i = 0; i < machIneDtoList.size() - 1; i++) {
|
||||||
for (int j = i + 1; j < machIneDtoList.size(); j++) {
|
for (int j = i + 1; j < machIneDtoList.size(); j++) {
|
||||||
if (machIneDtoList.get(i).getMaCode().equals(machIneDtoList.get(j).getMaCode())) {
|
if (StringUtils.isNotEmpty(machIneDtoList.get(i).getMaCode()) && StringUtils.isNotEmpty(machIneDtoList.get(j).getMaCode())
|
||||||
|
&& machIneDtoList.get(i).getMaCode().equals(machIneDtoList.get(j).getMaCode())) {
|
||||||
throw new ServiceException("列表中包含以下相同的设备编码,请修改后重新提交:" + machIneDtoList.get(i).getMaCode());
|
throw new ServiceException("列表中包含以下相同的设备编码,请修改后重新提交:" + machIneDtoList.get(i).getMaCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue