From 0336fee1e5410f0f213badb18056cb2054e55a0a Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Wed, 2 Apr 2025 13:39:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=B9=E9=87=8F=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NuBizEmployeesServcieTagsController.java | 6 ++++-- .../NuBizNuCustomerServerController.java | 10 ++++++++++ .../service/INuBizNuCustomerServerService.java | 2 ++ .../impl/NuBizNuCustomerServerServiceImpl.java | 18 ++++++++++++++++++ 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizEmployeesInfo/controller/NuBizEmployeesServcieTagsController.java b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizEmployeesInfo/controller/NuBizEmployeesServcieTagsController.java index c864538..fda7aaa 100644 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizEmployeesInfo/controller/NuBizEmployeesServcieTagsController.java +++ b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizEmployeesInfo/controller/NuBizEmployeesServcieTagsController.java @@ -83,6 +83,7 @@ public class NuBizEmployeesServcieTagsController extends JeecgController add(@RequestBody NuBizEmployeesServcieTags nuBizEmployeesServcieTags) { nuBizEmployeesServcieTagsService.save(nuBizEmployeesServcieTags); @@ -112,12 +113,13 @@ public class NuBizEmployeesServcieTagsController extends JeecgController delete(@RequestParam(name="id",required=true) String id) { nuBizEmployeesServcieTagsService.removeById(id); return Result.OK("删除成功!"); } - + /** * 批量删除 * @@ -132,7 +134,7 @@ public class NuBizEmployeesServcieTagsController extends JeecgController addBatch(@RequestBody List serverList) { + nuBizNuCustomerServerService.addBatch(serverList); + return Result.OK("操作成功"); + } + + } diff --git a/nursing-unit-api/src/main/java/com/nu/modules/NuBizNuCustomerServer/service/INuBizNuCustomerServerService.java b/nursing-unit-api/src/main/java/com/nu/modules/NuBizNuCustomerServer/service/INuBizNuCustomerServerService.java index 3534c3b..bc9c7a9 100644 --- a/nursing-unit-api/src/main/java/com/nu/modules/NuBizNuCustomerServer/service/INuBizNuCustomerServerService.java +++ b/nursing-unit-api/src/main/java/com/nu/modules/NuBizNuCustomerServer/service/INuBizNuCustomerServerService.java @@ -19,4 +19,6 @@ public interface INuBizNuCustomerServerService extends IService serverList); } diff --git a/nursing-unit-api/src/main/java/com/nu/modules/NuBizNuCustomerServer/service/impl/NuBizNuCustomerServerServiceImpl.java b/nursing-unit-api/src/main/java/com/nu/modules/NuBizNuCustomerServer/service/impl/NuBizNuCustomerServerServiceImpl.java index 3e4b543..1509864 100644 --- a/nursing-unit-api/src/main/java/com/nu/modules/NuBizNuCustomerServer/service/impl/NuBizNuCustomerServerServiceImpl.java +++ b/nursing-unit-api/src/main/java/com/nu/modules/NuBizNuCustomerServer/service/impl/NuBizNuCustomerServerServiceImpl.java @@ -93,4 +93,22 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl serverList) { + if(serverList.size()>0){ + NuBizNuCustomerServer nuBizNuCustomerServer = serverList.get(0); + String nuId = nuBizNuCustomerServer.getNuId(); + String customerId = nuBizNuCustomerServer.getCustomerId(); + + QueryWrapper nuBizNuCustomerServerQueryWrapper = new QueryWrapper<>(); + nuBizNuCustomerServerQueryWrapper.eq("nu_id",nuId); + nuBizNuCustomerServerQueryWrapper.eq("customer_id",customerId); + baseMapper.delete(nuBizNuCustomerServerQueryWrapper); + + for(NuBizNuCustomerServer par : serverList){ + baseMapper.insert(par); + } + } + } }