From 92b936af1e09e20fedcd90ff2662b4e1d0e633ff Mon Sep 17 00:00:00 2001 From: "1378012178@qq.com" <1378012178@qq.com> Date: Thu, 6 Nov 2025 13:37:31 +0800 Subject: [PATCH] =?UTF-8?q?pad=E7=AB=AF=EF=BC=9A=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E7=BC=96=E6=8E=92=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NuBizNuCustomerServerController.java | 127 ++++++++++++ .../INuBizNuCustomerServerService.java | 20 ++ .../NuBizNuCustomerServerServiceImpl.java | 183 ++++++++++++------ 3 files changed, 266 insertions(+), 64 deletions(-) diff --git a/nursing-unit-api/src/main/java/com/nu/modules/NuBizNuCustomerServer/controller/NuBizNuCustomerServerController.java b/nursing-unit-api/src/main/java/com/nu/modules/NuBizNuCustomerServer/controller/NuBizNuCustomerServerController.java index f04c45d..67bf998 100644 --- a/nursing-unit-api/src/main/java/com/nu/modules/NuBizNuCustomerServer/controller/NuBizNuCustomerServerController.java +++ b/nursing-unit-api/src/main/java/com/nu/modules/NuBizNuCustomerServer/controller/NuBizNuCustomerServerController.java @@ -1,7 +1,9 @@ package com.nu.modules.NuBizNuCustomerServer.controller; import com.nu.modules.NuBizNuCustomerServer.entity.DirectivePackageDto; +import com.nu.modules.NuBizNuCustomerServer.entity.NuBizNuCustomerElderTag; import com.nu.modules.NuBizNuCustomerServer.entity.NuBizNuCustomerServer; +import com.nu.modules.NuBizNuCustomerServer.entity.NuBizNuCustomerServerInstant; import com.nu.modules.NuBizNuCustomerServer.service.INuBizNuCustomerServerService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -136,4 +138,129 @@ public class NuBizNuCustomerServerController extends JeecgController addDirective(@RequestBody NuBizNuCustomerServer nuBizNuCustomerServer) { + nuBizNuCustomerServerService.addDirective(nuBizNuCustomerServer); + return Result.OK("操作成功"); + } + + /** + * PAD端编排护理流程-新增即时服务指令 + * + * @param customerServerInstant + * @return + */ + @AutoLog(value = "编排护理流程-新增即时服务指令") + @ApiOperation(value="编排护理流程-新增即时服务指令", notes="编排护理流程-新增即时服务指令") + @PostMapping(value = "/addInstant") + public Result addDirective(@RequestBody NuBizNuCustomerServerInstant customerServerInstant) { + nuBizNuCustomerServerService.addInstant(customerServerInstant); + return Result.OK("操作成功"); + } + + /** + * PAD端编排护理流程-新增情绪/体型标签 + * + * @param customerElderTag + * @return + */ + @AutoLog(value = "编排护理流程-新增情绪/体型标签") + @ApiOperation(value="编排护理流程-新增情绪/体型标签", notes="编排护理流程-新增情绪/体型标签") + @PostMapping(value = "/addElderTag") + public Result addElderTag(@RequestBody NuBizNuCustomerElderTag customerElderTag) { + nuBizNuCustomerServerService.addElderTag(customerElderTag); + return Result.OK("操作成功"); + } + + /** + * PAD端编排护理流程-删除服务指令 + * + * @param nuBizNuCustomerServer + * @return + */ + @AutoLog(value = "编排护理流程-删除服务指令") + @ApiOperation(value="编排护理流程-删除服务指令", notes="编排护理流程-删除服务指令") + @PostMapping(value = "/deleteDirective") + public Result deleteDirective(@RequestBody NuBizNuCustomerServer nuBizNuCustomerServer) { + nuBizNuCustomerServerService.deleteDirective(nuBizNuCustomerServer); + return Result.OK("操作成功"); + } + + /** + * PAD端编排护理流程-删除即时服务指令 + * + * @param customerServerInstant + * @return + */ + @AutoLog(value = "编排护理流程-删除即时服务指令") + @ApiOperation(value="编排护理流程-删除即时服务指令", notes="编排护理流程-删除即时服务指令") + @PostMapping(value = "/deleteInstant") + public Result deleteInstant(@RequestBody NuBizNuCustomerServerInstant customerServerInstant) { + nuBizNuCustomerServerService.deleteInstant(customerServerInstant); + return Result.OK("操作成功"); + } + + /** + * PAD端编排护理流程-删除情绪/体型标签 + * + * @param customerElderTag + * @return + */ + @AutoLog(value = "编排护理流程-删除情绪/体型标签") + @ApiOperation(value="编排护理流程-删除情绪/体型标签", notes="编排护理流程-删除情绪/体型标签") + @PostMapping(value = "/deleteElderTag") + public Result deleteElderTag(@RequestBody NuBizNuCustomerElderTag customerElderTag) { + nuBizNuCustomerServerService.deleteElderTag(customerElderTag); + return Result.OK("操作成功"); + } + + /** + * PAD端编排护理流程-修改服务指令 + * + * @param nuBizNuCustomerServer + * @return + */ + @AutoLog(value = "编排护理流程-修改服务指令") + @ApiOperation(value="编排护理流程-修改服务指令", notes="编排护理流程-修改服务指令") + @PostMapping(value = "/editDirective") + public Result editDirective(@RequestBody NuBizNuCustomerServer nuBizNuCustomerServer) { + nuBizNuCustomerServerService.editDirective(nuBizNuCustomerServer); + return Result.OK("操作成功"); + } + + /** + * PAD端编排护理流程-修改即时服务指令 + * + * @param customerServerInstant + * @return + */ + @AutoLog(value = "编排护理流程-修改即时服务指令") + @ApiOperation(value="编排护理流程修改除即时服务指令", notes="编排护理流程-修改即时服务指令") + @PostMapping(value = "/editInstant") + public Result editInstant(@RequestBody NuBizNuCustomerServerInstant customerServerInstant) { + nuBizNuCustomerServerService.editInstant(customerServerInstant); + return Result.OK("操作成功"); + } + + /** + * PAD端编排护理流程-修改情绪/体型标签 + * + * @param customerElderTag + * @return + */ + @AutoLog(value = "编排护理流程-修改情绪/体型标签") + @ApiOperation(value="编排护理流程-修改情绪/体型标签", notes="编排护理流程-修改情绪/体型标签") + @PostMapping(value = "/editElderTag") + public Result editElderTag(@RequestBody NuBizNuCustomerElderTag customerElderTag) { + nuBizNuCustomerServerService.editElderTag(customerElderTag); + 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 8d63549..e881577 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 @@ -1,8 +1,10 @@ package com.nu.modules.NuBizNuCustomerServer.service; import com.nu.modules.NuBizNuCustomerServer.entity.DirectivePackageDto; +import com.nu.modules.NuBizNuCustomerServer.entity.NuBizNuCustomerElderTag; import com.nu.modules.NuBizNuCustomerServer.entity.NuBizNuCustomerServer; import com.baomidou.mybatisplus.extension.service.IService; +import com.nu.modules.NuBizNuCustomerServer.entity.NuBizNuCustomerServerInstant; import java.util.List; import java.util.Map; @@ -24,4 +26,22 @@ public interface INuBizNuCustomerServerService extends IService getNcPackagelist(DirectivePackageDto directivePackageDto); + + void addDirective(NuBizNuCustomerServer nuBizNuCustomerServer); + + void addInstant(NuBizNuCustomerServerInstant customerServerInstant); + + void addElderTag(NuBizNuCustomerElderTag customerElderTag); + + void deleteDirective(NuBizNuCustomerServer nuBizNuCustomerServer); + + void deleteInstant(NuBizNuCustomerServerInstant customerServerInstant); + + void deleteElderTag(NuBizNuCustomerElderTag customerElderTag); + + void editDirective(NuBizNuCustomerServer nuBizNuCustomerServer); + + void editInstant(NuBizNuCustomerServerInstant customerServerInstant); + + void editElderTag(NuBizNuCustomerElderTag customerElderTag); } 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 a374408..dfda914 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 @@ -25,7 +25,7 @@ import java.util.*; /** * @Description: 护理单元客户配置服务指令 * @Author: yangjun - * @Date: 2025-03-31 + * @Date: 2025-03-31 * @Version: V1.0 */ @Service @@ -47,12 +47,12 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl getNclist(NuBizNuCustomerServer nuBizNuCustomerServer) { - Map resMap = new HashMap<>(); + public Map getNclist(NuBizNuCustomerServer nuBizNuCustomerServer) { + Map resMap = new HashMap<>(); //服务指令计划 QueryWrapper nuBizNuCustomerServerQueryWrapper = new QueryWrapper<>(); - nuBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getNuId()),"nu_id",nuBizNuCustomerServer.getNuId()); - nuBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getCustomerId()),"customer_id",nuBizNuCustomerServer.getCustomerId()); + nuBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getNuId()), "nu_id", nuBizNuCustomerServer.getNuId()); + nuBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getCustomerId()), "customer_id", nuBizNuCustomerServer.getCustomerId()); List groupList = baseMapper.selectList(nuBizNuCustomerServerQueryWrapper); // String groupPositioning[] = {"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23"}; // List> allList = new ArrayList<>(); @@ -120,133 +120,133 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl pdList = baseMapper.getNcDirectiveList(packageDirective); - for(NuBizNuCustomerServer pd : pdList){ + for (NuBizNuCustomerServer pd : pdList) { getNetImages(pd); } par.setDirectivesList(pdList); } - }else{ + } else { getNetImages(par); } } - resMap.put("serviceList",groupList);//服务指令计划 + resMap.put("serviceList", groupList);//服务指令计划 //即时指令 QueryWrapper instantQueryWrapper = new QueryWrapper<>(); - instantQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getNuId()),"nu_id",nuBizNuCustomerServer.getNuId()); - instantQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getCustomerId()),"customer_id",nuBizNuCustomerServer.getCustomerId()); + instantQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getNuId()), "nu_id", nuBizNuCustomerServer.getNuId()); + instantQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getCustomerId()), "customer_id", nuBizNuCustomerServer.getCustomerId()); instantQueryWrapper.orderByDesc("create_time"); List instantList = nuBizNuCustomerServerInstantService.list(instantQueryWrapper); - for(NuBizNuCustomerServerInstant pari : instantList){ - if(pari.getImmediateFile()!=null){ + for (NuBizNuCustomerServerInstant pari : instantList) { + if (pari.getImmediateFile() != null) { String immediateFile = getImageNetUrl(pari.getImmediateFile()); pari.setNetImmediateFile(immediateFile); - }else{ + } else { pari.setImmediateFile(""); pari.setNetImmediateFile(""); } - if(pari.getImmediateFileFocus()!=null){ + if (pari.getImmediateFileFocus() != null) { String immediateFileFocus = getImageNetUrl(pari.getImmediateFileFocus()); pari.setNetImmediateFileFocus(immediateFileFocus); - }else{ + } else { pari.setImmediateFileFocus(""); pari.setNetImmediateFileFocus(""); } - if(pari.getPreviewFile()!=null){ + if (pari.getPreviewFile() != null) { String previewFile = getImageNetUrl(pari.getPreviewFile()); pari.setNetPreviewFile(previewFile); - }else{ + } else { pari.setPreviewFile(""); pari.setNetPreviewFile(""); } - if(pari.getPreviewFileSmall()!=null){ + if (pari.getPreviewFileSmall() != null) { String previewFileSmall = getImageNetUrl(pari.getPreviewFileSmall()); pari.setNetPreviewFileSmall(previewFileSmall); - }else{ + } else { pari.setPreviewFileSmall(""); pari.setNetPreviewFileSmall(""); } } - resMap.put("instantList",instantList); + resMap.put("instantList", instantList); NuBizNuCustomerElderTag elderTag = new NuBizNuCustomerElderTag(); //体型标签 elderTag.setNuId(nuBizNuCustomerServer.getNuId()); elderTag.setCustomerId(nuBizNuCustomerServer.getCustomerId()); elderTag.setTagType("tx"); List bodyTagList = nuBizNuCustomerElderTagService.getElderTags(elderTag); - for(NuBizNuCustomerElderTag bt : bodyTagList){ - if(bt.getPic()!=null){ + for (NuBizNuCustomerElderTag bt : bodyTagList) { + if (bt.getPic() != null) { String pic = getImageNetUrl(bt.getPic()); bt.setNetPic(pic); - }else{ + } else { bt.setPic(""); bt.setNetPic(""); } - if(bt.getPicFocus()!=null){ + if (bt.getPicFocus() != null) { String picFocus = getImageNetUrl(bt.getPicFocus()); bt.setNetPicFocus(picFocus); - }else{ + } else { bt.setPicFocus(""); bt.setNetPicFocus(""); } } - resMap.put("bodyTagList",bodyTagList); + resMap.put("bodyTagList", bodyTagList); //情绪标签 elderTag.setTagType("qx"); List emotionTagList = nuBizNuCustomerElderTagService.getElderTags(elderTag); - for(NuBizNuCustomerElderTag et : emotionTagList){ - if(et.getPic()!=null){ + for (NuBizNuCustomerElderTag et : emotionTagList) { + if (et.getPic() != null) { String pic = getImageNetUrl(et.getPic()); et.setNetPic(pic); - }else{ + } else { et.setPic(""); et.setNetPic(""); } - if(et.getPicFocus()!=null){ + if (et.getPicFocus() != null) { String picFocus = getImageNetUrl(et.getPicFocus()); et.setNetPicFocus(picFocus); - }else{ + } else { et.setPicFocus(""); et.setNetPicFocus(""); } } - resMap.put("emotionTagList",emotionTagList); + resMap.put("emotionTagList", emotionTagList); return resMap; } - private NuBizNuCustomerServer getNetImages(NuBizNuCustomerServer par){ - if(par.getImmediateFile()!=null&&!par.getImmediateFile().equals("")){ + private NuBizNuCustomerServer getNetImages(NuBizNuCustomerServer par) { + if (par.getImmediateFile() != null && !par.getImmediateFile().equals("")) { String immediateFile = getImageNetUrl(par.getImmediateFile()); par.setNetImmediateFile(immediateFile); - }else{ + } else { par.setImmediateFile(""); par.setNetImmediateFile(""); } - if(par.getImmediateFileFocus()!=null&&!par.getImmediateFileFocus().equals("")){ + if (par.getImmediateFileFocus() != null && !par.getImmediateFileFocus().equals("")) { String immediateFileFocus = getImageNetUrl(par.getImmediateFileFocus()); par.setNetImmediateFileFocus(immediateFileFocus); - }else{ + } else { par.setImmediateFileFocus(""); par.setNetImmediateFileFocus(""); } - if(par.getPreviewFile()!=null&&!par.getPreviewFile().equals("")){ + if (par.getPreviewFile() != null && !par.getPreviewFile().equals("")) { String previewFile = getImageNetUrl(par.getPreviewFile()); par.setNetPreviewFile(previewFile); - }else{ + } else { par.setPreviewFile(""); par.setNetPreviewFile(""); } - if(par.getPreviewFileSmall()!=null&&!par.getPreviewFileSmall().equals("")){ + if (par.getPreviewFileSmall() != null && !par.getPreviewFileSmall().equals("")) { String previewFileSmall = getImageNetUrl(par.getPreviewFileSmall()); par.setNetPreviewFileSmall(previewFileSmall); - }else{ + } else { par.setPreviewFileSmall(""); par.setNetPreviewFileSmall(""); } @@ -286,12 +286,12 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl nuBizNuCustomerServerQueryWrapper = new QueryWrapper<>(); - nuBizNuCustomerServerQueryWrapper.eq("nu_id",nuId); - nuBizNuCustomerServerQueryWrapper.eq("customer_id",customerId); + nuBizNuCustomerServerQueryWrapper.eq("nu_id", nuId); + nuBizNuCustomerServerQueryWrapper.eq("customer_id", customerId); baseMapper.delete(nuBizNuCustomerServerQueryWrapper); List serverList = nuBizNuCustomerServer.getServerList(); - if(serverList.size()>0){ - for(NuBizNuCustomerServer par : serverList){ + if (serverList.size() > 0) { + for (NuBizNuCustomerServer par : serverList) { par.setNuId(nuId); par.setNuName(nuBizNuCustomerServer.getNuName()); par.setCustomerId(customerId); @@ -301,12 +301,12 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl instantQueryWrapper = new QueryWrapper<>(); - instantQueryWrapper.eq("nu_id",nuId); - instantQueryWrapper.eq("customer_id",customerId); + instantQueryWrapper.eq("nu_id", nuId); + instantQueryWrapper.eq("customer_id", customerId); nuBizNuCustomerServerInstantService.remove(instantQueryWrapper); List instantList = nuBizNuCustomerServer.getInstantList(); - if(instantList.size()>0){ - for(NuBizNuCustomerServerInstant pari : instantList){ + if (instantList.size() > 0) { + for (NuBizNuCustomerServerInstant pari : instantList) { pari.setNuId(nuId); pari.setNuName(nuBizNuCustomerServer.getNuName()); pari.setCustomerId(customerId); @@ -316,12 +316,12 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl tagQueryWrapper = new QueryWrapper<>(); - instantQueryWrapper.eq("nu_id",nuId); - instantQueryWrapper.eq("customer_id",customerId); + instantQueryWrapper.eq("nu_id", nuId); + instantQueryWrapper.eq("customer_id", customerId); nuBizNuCustomerElderTagService.remove(tagQueryWrapper); List tagList = nuBizNuCustomerServer.getTagList(); - if(tagList.size()>0){ - for(NuBizNuCustomerElderTag tg : tagList){ + if (tagList.size() > 0) { + for (NuBizNuCustomerElderTag tg : tagList) { tg.setNuId(nuId); tg.setNuName(nuBizNuCustomerServer.getNuName()); tg.setCustomerId(customerId); @@ -339,10 +339,10 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl directiveList = baseMapper.getNcDirectiveList(new NuBizNuCustomerServer()); - for(DirectivePackageDto et : list){ + for (DirectivePackageDto et : list) { List directivesList = new ArrayList<>(); - for(NuBizNuCustomerServer etd : directiveList){ - if(etd.getPackageId().equals(et.getId())){ + for (NuBizNuCustomerServer etd : directiveList) { + if (etd.getPackageId().equals(et.getId())) { getNetImages(etd); directivesList.add(etd); } @@ -352,16 +352,71 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl