|
|
@ -167,6 +167,9 @@ public class SparePartsLedgerServiceImpl implements ISparePartsLedgerService {
|
|
|
|
if (table.getMaterialCode().isEmpty() || table.getMaterialCode() == null) {
|
|
|
|
if (table.getMaterialCode().isEmpty() || table.getMaterialCode() == null) {
|
|
|
|
return error(500, "备品备件编码不能为空!信息导入失败!");
|
|
|
|
return error(500, "备品备件编码不能为空!信息导入失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.checkSpareCodeUnique(table)) {
|
|
|
|
|
|
|
|
return AjaxResult.error("存在重复的备品备件编码"+table.getMaterialCode()+"!信息导入失败!");
|
|
|
|
|
|
|
|
}
|
|
|
|
// 备品备件名称
|
|
|
|
// 备品备件名称
|
|
|
|
if (table.getMaterialDesc().isEmpty() || table.getMaterialDesc() == null) {
|
|
|
|
if (table.getMaterialDesc().isEmpty() || table.getMaterialDesc() == null) {
|
|
|
|
return error(500, "备品备件名称不能为空!信息导入失败!");
|
|
|
|
return error(500, "备品备件名称不能为空!信息导入失败!");
|
|
|
@ -245,4 +248,20 @@ public class SparePartsLedgerServiceImpl implements ISparePartsLedgerService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return failSpareParts;
|
|
|
|
return failSpareParts;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 判断备品备件信息
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
|
|
|
public boolean checkSpareCodeUnique(SparePartsLedger sparePartsLedger) {
|
|
|
|
|
|
|
|
String spareCode = sparePartsLedgerMapper.checkSpareCodeUnique(sparePartsLedger);
|
|
|
|
|
|
|
|
if (spareCode == null) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|