|
@@ -95,12 +95,17 @@ public class AlgorithmFacade {
|
|
|
}
|
|
|
//操作数据
|
|
|
if (ListUtil.isNotEmpty(qcResultAlgVOList)) {
|
|
|
+ Boolean hasData = false;
|
|
|
for (QcResultAlgVO qcResultAlgVO : qcResultAlgVOList) {
|
|
|
if (qcResultAlgVO.getId().equals(algorithmVO.getOptResultAlgVO().getId())) {
|
|
|
qcResultAlgVOList.remove(qcResultAlgVO);
|
|
|
+ hasData = true;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ if (!hasData){
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "删除的条目不存在!");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//修改
|
|
@@ -110,13 +115,18 @@ public class AlgorithmFacade {
|
|
|
}
|
|
|
//操作数据
|
|
|
if (ListUtil.isNotEmpty(qcResultAlgVOList)) {
|
|
|
+ Boolean hasData = false;
|
|
|
for (QcResultAlgVO qcResultAlgVO : qcResultAlgVOList) {
|
|
|
if (qcResultAlgVO.getId().equals(algorithmVO.getOptResultAlgVO().getId())) {
|
|
|
qcResultAlgVOList.remove(qcResultAlgVO);
|
|
|
qcResultAlgVOList.add(algorithmVO.getOptResultAlgVO());
|
|
|
+ hasData = true;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ if (!hasData){
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "修改的条目不存在!");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|