瀏覽代碼

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