|
@@ -91,7 +91,7 @@ public class DiagnosetrainhistoryServiceImpl extends ServiceImpl<Diagnosetrainhi
|
|
|
public void editDiagnosetrainhistory(Diagnosetrainhistory history) {
|
|
|
try {
|
|
|
List<Diagnosetrainhistory> list = getList(true,"","", history.getModel());
|
|
|
- if (list.size() <= 1 && !history.isEnable()) {
|
|
|
+ if (null != list && list.size() == 1 && !history.isEnable() && history.getId().equals(list.get(0).getId())) {
|
|
|
throw new CustomException(ResultCode.ERROR_MODEL);
|
|
|
}
|
|
|
for (Diagnosetrainhistory h : list) {
|