소스 검색

1、重复入库检查,未录入入库检查

su-lmstack 3 년 전
부모
커밋
3ee80b6df3
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src/main/java/cn/fastfun/service/impl/AppDeviceLogServiceImpl.java

+ 6 - 0
src/main/java/cn/fastfun/service/impl/AppDeviceLogServiceImpl.java

@@ -89,8 +89,14 @@ public class AppDeviceLogServiceImpl extends JpaServiceImp<AppDeviceLog, String>
                     appDeviceLog.setOperator(utilService.getUserName());
                     save(appDeviceLog); // 记录入库日志
                 }
+                else{
+                    throw new ApiRuntimeException(p + "设备已入库,不能重复入库!");
+                }
             });
         }
+        else{
+            throw new ApiRuntimeException("设备未录入!");
+        }
     }
 
     @Override