From 06068dc9ecfe8b91184a7c6a7f8f5c53f4c720cb Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Wed, 8 Mar 2023 09:46:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95-=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E4=BF=9D=E5=AD=98=E6=8E=A5=E5=8F=A3=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectCertificationInventoryEOController.java | 7 +++++++ .../service/IProjectCertificationInventoryEOService.java | 7 +++++++ .../impl/ProjectCertificationInventoryEOServiceImpl.java | 9 +++++++++ 3 files changed, 23 insertions(+) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java index dadbccd26..57396b6fc 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java @@ -213,4 +213,11 @@ public class ProjectCertificationInventoryEOController extends JeroController submitTask(@RequestBody JSONObject json) { return this.projectCertificationInventoryEOService.submitTask(json); } + + @AutoLog(value = "项目库-认证清单表-批量保存") + @ApiOperation(value="项目库-认证清单表-批量保存", notes="项目库-认证清单表-批量保存") + @PostMapping(value = "/saveBatch") + public Result saveBatch(@RequestBody List projectCertificationInventoryEOList) { + return this.projectCertificationInventoryEOService.saveBatch(projectCertificationInventoryEOList); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java index c0c51c178..ff2340860 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java @@ -128,4 +128,11 @@ public interface IProjectCertificationInventoryEOService extends IService certificationInitiatingTask(JSONObject json); + + /** + * 批量保存 + * @param projectCertificationInventoryEOList + * @return + */ + Result saveBatch(List projectCertificationInventoryEOList); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index 8d8323785..370ef55f1 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -715,4 +715,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl saveBatch(List projectCertificationInventoryEOList) { + if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){ + throw new JeroBootException("无法获取需要保存的数据,请检查!"); + } + this.updateBatchById(projectCertificationInventoryEOList); + return Result.OK("保存成功!"); + } + }