pad端:服务计划编排接口

This commit is contained in:
1378012178@qq.com 2025-11-06 13:37:31 +08:00
parent 0b80db757e
commit 92b936af1e
3 changed files with 266 additions and 64 deletions

View File

@ -1,7 +1,9 @@
package com.nu.modules.NuBizNuCustomerServer.controller; package com.nu.modules.NuBizNuCustomerServer.controller;
import com.nu.modules.NuBizNuCustomerServer.entity.DirectivePackageDto; 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.NuBizNuCustomerServer;
import com.nu.modules.NuBizNuCustomerServer.entity.NuBizNuCustomerServerInstant;
import com.nu.modules.NuBizNuCustomerServer.service.INuBizNuCustomerServerService; import com.nu.modules.NuBizNuCustomerServer.service.INuBizNuCustomerServerService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -136,4 +138,129 @@ public class NuBizNuCustomerServerController extends JeecgController<NuBizNuCust
return Result.OK(pageList); return Result.OK(pageList);
} }
/**
* PAD端编排护理流程-新增服务指令
*
* @param nuBizNuCustomerServer
* @return
*/
@AutoLog(value = "编排护理流程-新增服务指令")
@ApiOperation(value="编排护理流程-新增服务指令", notes="编排护理流程-新增服务指令")
@PostMapping(value = "/addDirective")
public Result<NuBizNuCustomerServer> 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<NuBizNuCustomerServer> 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<NuBizNuCustomerServer> 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("操作成功");
}
} }

View File

@ -1,8 +1,10 @@
package com.nu.modules.NuBizNuCustomerServer.service; package com.nu.modules.NuBizNuCustomerServer.service;
import com.nu.modules.NuBizNuCustomerServer.entity.DirectivePackageDto; 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.NuBizNuCustomerServer;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.nu.modules.NuBizNuCustomerServer.entity.NuBizNuCustomerServerInstant;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -24,4 +26,22 @@ public interface INuBizNuCustomerServerService extends IService<NuBizNuCustomerS
void addBatch(NuBizNuCustomerServer nuBizNuCustomerServer); void addBatch(NuBizNuCustomerServer nuBizNuCustomerServer);
List<DirectivePackageDto> getNcPackagelist(DirectivePackageDto directivePackageDto); List<DirectivePackageDto> 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);
} }

View File

@ -25,7 +25,7 @@ import java.util.*;
/** /**
* @Description: 护理单元客户配置服务指令 * @Description: 护理单元客户配置服务指令
* @Author: yangjun * @Author: yangjun
* @Date: 2025-03-31 * @Date: 2025-03-31
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service
@ -47,12 +47,12 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
private String serverNetUrl; private String serverNetUrl;
@Override @Override
public Map<String,Object> getNclist(NuBizNuCustomerServer nuBizNuCustomerServer) { public Map<String, Object> getNclist(NuBizNuCustomerServer nuBizNuCustomerServer) {
Map<String,Object> resMap = new HashMap<>(); Map<String, Object> resMap = new HashMap<>();
//服务指令计划 //服务指令计划
QueryWrapper<NuBizNuCustomerServer> nuBizNuCustomerServerQueryWrapper = new QueryWrapper<>(); QueryWrapper<NuBizNuCustomerServer> nuBizNuCustomerServerQueryWrapper = new QueryWrapper<>();
nuBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getNuId()),"nu_id",nuBizNuCustomerServer.getNuId()); 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.getCustomerId()), "customer_id", nuBizNuCustomerServer.getCustomerId());
List<NuBizNuCustomerServer> groupList = baseMapper.selectList(nuBizNuCustomerServerQueryWrapper); List<NuBizNuCustomerServer> 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"}; // 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<Map<String,Object>> allList = new ArrayList<>(); // List<Map<String,Object>> allList = new ArrayList<>();
@ -120,133 +120,133 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
// } // }
// resMap.put("serviceList",allList);//服务指令计划 // resMap.put("serviceList",allList);//服务指令计划
for(NuBizNuCustomerServer par : groupList){ for (NuBizNuCustomerServer par : groupList) {
if(par.getIzPackage().equals("1")){ if (par.getIzPackage().equals("1")) {
String directiveId = par.getDirectiveId(); String directiveId = par.getDirectiveId();
if(directiveId!=null && !directiveId.equals("")){ if (directiveId != null && !directiveId.equals("")) {
NuBizNuCustomerServer packageDirective = new NuBizNuCustomerServer(); NuBizNuCustomerServer packageDirective = new NuBizNuCustomerServer();
packageDirective.setPackageId(directiveId); packageDirective.setPackageId(directiveId);
List<NuBizNuCustomerServer> pdList = baseMapper.getNcDirectiveList(packageDirective); List<NuBizNuCustomerServer> pdList = baseMapper.getNcDirectiveList(packageDirective);
for(NuBizNuCustomerServer pd : pdList){ for (NuBizNuCustomerServer pd : pdList) {
getNetImages(pd); getNetImages(pd);
} }
par.setDirectivesList(pdList); par.setDirectivesList(pdList);
} }
}else{ } else {
getNetImages(par); getNetImages(par);
} }
} }
resMap.put("serviceList",groupList);//服务指令计划 resMap.put("serviceList", groupList);//服务指令计划
//即时指令 //即时指令
QueryWrapper<NuBizNuCustomerServerInstant> instantQueryWrapper = new QueryWrapper<>(); QueryWrapper<NuBizNuCustomerServerInstant> instantQueryWrapper = new QueryWrapper<>();
instantQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getNuId()),"nu_id",nuBizNuCustomerServer.getNuId()); 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.getCustomerId()), "customer_id", nuBizNuCustomerServer.getCustomerId());
instantQueryWrapper.orderByDesc("create_time"); instantQueryWrapper.orderByDesc("create_time");
List<NuBizNuCustomerServerInstant> instantList = nuBizNuCustomerServerInstantService.list(instantQueryWrapper); List<NuBizNuCustomerServerInstant> instantList = nuBizNuCustomerServerInstantService.list(instantQueryWrapper);
for(NuBizNuCustomerServerInstant pari : instantList){ for (NuBizNuCustomerServerInstant pari : instantList) {
if(pari.getImmediateFile()!=null){ if (pari.getImmediateFile() != null) {
String immediateFile = getImageNetUrl(pari.getImmediateFile()); String immediateFile = getImageNetUrl(pari.getImmediateFile());
pari.setNetImmediateFile(immediateFile); pari.setNetImmediateFile(immediateFile);
}else{ } else {
pari.setImmediateFile(""); pari.setImmediateFile("");
pari.setNetImmediateFile(""); pari.setNetImmediateFile("");
} }
if(pari.getImmediateFileFocus()!=null){ if (pari.getImmediateFileFocus() != null) {
String immediateFileFocus = getImageNetUrl(pari.getImmediateFileFocus()); String immediateFileFocus = getImageNetUrl(pari.getImmediateFileFocus());
pari.setNetImmediateFileFocus(immediateFileFocus); pari.setNetImmediateFileFocus(immediateFileFocus);
}else{ } else {
pari.setImmediateFileFocus(""); pari.setImmediateFileFocus("");
pari.setNetImmediateFileFocus(""); pari.setNetImmediateFileFocus("");
} }
if(pari.getPreviewFile()!=null){ if (pari.getPreviewFile() != null) {
String previewFile = getImageNetUrl(pari.getPreviewFile()); String previewFile = getImageNetUrl(pari.getPreviewFile());
pari.setNetPreviewFile(previewFile); pari.setNetPreviewFile(previewFile);
}else{ } else {
pari.setPreviewFile(""); pari.setPreviewFile("");
pari.setNetPreviewFile(""); pari.setNetPreviewFile("");
} }
if(pari.getPreviewFileSmall()!=null){ if (pari.getPreviewFileSmall() != null) {
String previewFileSmall = getImageNetUrl(pari.getPreviewFileSmall()); String previewFileSmall = getImageNetUrl(pari.getPreviewFileSmall());
pari.setNetPreviewFileSmall(previewFileSmall); pari.setNetPreviewFileSmall(previewFileSmall);
}else{ } else {
pari.setPreviewFileSmall(""); pari.setPreviewFileSmall("");
pari.setNetPreviewFileSmall(""); pari.setNetPreviewFileSmall("");
} }
} }
resMap.put("instantList",instantList); resMap.put("instantList", instantList);
NuBizNuCustomerElderTag elderTag = new NuBizNuCustomerElderTag(); NuBizNuCustomerElderTag elderTag = new NuBizNuCustomerElderTag();
//体型标签 //体型标签
elderTag.setNuId(nuBizNuCustomerServer.getNuId()); elderTag.setNuId(nuBizNuCustomerServer.getNuId());
elderTag.setCustomerId(nuBizNuCustomerServer.getCustomerId()); elderTag.setCustomerId(nuBizNuCustomerServer.getCustomerId());
elderTag.setTagType("tx"); elderTag.setTagType("tx");
List<NuBizNuCustomerElderTag> bodyTagList = nuBizNuCustomerElderTagService.getElderTags(elderTag); List<NuBizNuCustomerElderTag> bodyTagList = nuBizNuCustomerElderTagService.getElderTags(elderTag);
for(NuBizNuCustomerElderTag bt : bodyTagList){ for (NuBizNuCustomerElderTag bt : bodyTagList) {
if(bt.getPic()!=null){ if (bt.getPic() != null) {
String pic = getImageNetUrl(bt.getPic()); String pic = getImageNetUrl(bt.getPic());
bt.setNetPic(pic); bt.setNetPic(pic);
}else{ } else {
bt.setPic(""); bt.setPic("");
bt.setNetPic(""); bt.setNetPic("");
} }
if(bt.getPicFocus()!=null){ if (bt.getPicFocus() != null) {
String picFocus = getImageNetUrl(bt.getPicFocus()); String picFocus = getImageNetUrl(bt.getPicFocus());
bt.setNetPicFocus(picFocus); bt.setNetPicFocus(picFocus);
}else{ } else {
bt.setPicFocus(""); bt.setPicFocus("");
bt.setNetPicFocus(""); bt.setNetPicFocus("");
} }
} }
resMap.put("bodyTagList",bodyTagList); resMap.put("bodyTagList", bodyTagList);
//情绪标签 //情绪标签
elderTag.setTagType("qx"); elderTag.setTagType("qx");
List<NuBizNuCustomerElderTag> emotionTagList = nuBizNuCustomerElderTagService.getElderTags(elderTag); List<NuBizNuCustomerElderTag> emotionTagList = nuBizNuCustomerElderTagService.getElderTags(elderTag);
for(NuBizNuCustomerElderTag et : emotionTagList){ for (NuBizNuCustomerElderTag et : emotionTagList) {
if(et.getPic()!=null){ if (et.getPic() != null) {
String pic = getImageNetUrl(et.getPic()); String pic = getImageNetUrl(et.getPic());
et.setNetPic(pic); et.setNetPic(pic);
}else{ } else {
et.setPic(""); et.setPic("");
et.setNetPic(""); et.setNetPic("");
} }
if(et.getPicFocus()!=null){ if (et.getPicFocus() != null) {
String picFocus = getImageNetUrl(et.getPicFocus()); String picFocus = getImageNetUrl(et.getPicFocus());
et.setNetPicFocus(picFocus); et.setNetPicFocus(picFocus);
}else{ } else {
et.setPicFocus(""); et.setPicFocus("");
et.setNetPicFocus(""); et.setNetPicFocus("");
} }
} }
resMap.put("emotionTagList",emotionTagList); resMap.put("emotionTagList", emotionTagList);
return resMap; return resMap;
} }
private NuBizNuCustomerServer getNetImages(NuBizNuCustomerServer par){ private NuBizNuCustomerServer getNetImages(NuBizNuCustomerServer par) {
if(par.getImmediateFile()!=null&&!par.getImmediateFile().equals("")){ if (par.getImmediateFile() != null && !par.getImmediateFile().equals("")) {
String immediateFile = getImageNetUrl(par.getImmediateFile()); String immediateFile = getImageNetUrl(par.getImmediateFile());
par.setNetImmediateFile(immediateFile); par.setNetImmediateFile(immediateFile);
}else{ } else {
par.setImmediateFile(""); par.setImmediateFile("");
par.setNetImmediateFile(""); par.setNetImmediateFile("");
} }
if(par.getImmediateFileFocus()!=null&&!par.getImmediateFileFocus().equals("")){ if (par.getImmediateFileFocus() != null && !par.getImmediateFileFocus().equals("")) {
String immediateFileFocus = getImageNetUrl(par.getImmediateFileFocus()); String immediateFileFocus = getImageNetUrl(par.getImmediateFileFocus());
par.setNetImmediateFileFocus(immediateFileFocus); par.setNetImmediateFileFocus(immediateFileFocus);
}else{ } else {
par.setImmediateFileFocus(""); par.setImmediateFileFocus("");
par.setNetImmediateFileFocus(""); par.setNetImmediateFileFocus("");
} }
if(par.getPreviewFile()!=null&&!par.getPreviewFile().equals("")){ if (par.getPreviewFile() != null && !par.getPreviewFile().equals("")) {
String previewFile = getImageNetUrl(par.getPreviewFile()); String previewFile = getImageNetUrl(par.getPreviewFile());
par.setNetPreviewFile(previewFile); par.setNetPreviewFile(previewFile);
}else{ } else {
par.setPreviewFile(""); par.setPreviewFile("");
par.setNetPreviewFile(""); par.setNetPreviewFile("");
} }
if(par.getPreviewFileSmall()!=null&&!par.getPreviewFileSmall().equals("")){ if (par.getPreviewFileSmall() != null && !par.getPreviewFileSmall().equals("")) {
String previewFileSmall = getImageNetUrl(par.getPreviewFileSmall()); String previewFileSmall = getImageNetUrl(par.getPreviewFileSmall());
par.setNetPreviewFileSmall(previewFileSmall); par.setNetPreviewFileSmall(previewFileSmall);
}else{ } else {
par.setPreviewFileSmall(""); par.setPreviewFileSmall("");
par.setNetPreviewFileSmall(""); par.setNetPreviewFileSmall("");
} }
@ -286,12 +286,12 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
String nuId = nuBizNuCustomerServer.getNuId(); String nuId = nuBizNuCustomerServer.getNuId();
String customerId = nuBizNuCustomerServer.getCustomerId(); String customerId = nuBizNuCustomerServer.getCustomerId();
QueryWrapper<NuBizNuCustomerServer> nuBizNuCustomerServerQueryWrapper = new QueryWrapper<>(); QueryWrapper<NuBizNuCustomerServer> nuBizNuCustomerServerQueryWrapper = new QueryWrapper<>();
nuBizNuCustomerServerQueryWrapper.eq("nu_id",nuId); nuBizNuCustomerServerQueryWrapper.eq("nu_id", nuId);
nuBizNuCustomerServerQueryWrapper.eq("customer_id",customerId); nuBizNuCustomerServerQueryWrapper.eq("customer_id", customerId);
baseMapper.delete(nuBizNuCustomerServerQueryWrapper); baseMapper.delete(nuBizNuCustomerServerQueryWrapper);
List<NuBizNuCustomerServer> serverList = nuBizNuCustomerServer.getServerList(); List<NuBizNuCustomerServer> serverList = nuBizNuCustomerServer.getServerList();
if(serverList.size()>0){ if (serverList.size() > 0) {
for(NuBizNuCustomerServer par : serverList){ for (NuBizNuCustomerServer par : serverList) {
par.setNuId(nuId); par.setNuId(nuId);
par.setNuName(nuBizNuCustomerServer.getNuName()); par.setNuName(nuBizNuCustomerServer.getNuName());
par.setCustomerId(customerId); par.setCustomerId(customerId);
@ -301,12 +301,12 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
this.saveBatch(serverList); this.saveBatch(serverList);
} }
QueryWrapper<NuBizNuCustomerServerInstant> instantQueryWrapper = new QueryWrapper<>(); QueryWrapper<NuBizNuCustomerServerInstant> instantQueryWrapper = new QueryWrapper<>();
instantQueryWrapper.eq("nu_id",nuId); instantQueryWrapper.eq("nu_id", nuId);
instantQueryWrapper.eq("customer_id",customerId); instantQueryWrapper.eq("customer_id", customerId);
nuBizNuCustomerServerInstantService.remove(instantQueryWrapper); nuBizNuCustomerServerInstantService.remove(instantQueryWrapper);
List<NuBizNuCustomerServerInstant> instantList = nuBizNuCustomerServer.getInstantList(); List<NuBizNuCustomerServerInstant> instantList = nuBizNuCustomerServer.getInstantList();
if(instantList.size()>0){ if (instantList.size() > 0) {
for(NuBizNuCustomerServerInstant pari : instantList){ for (NuBizNuCustomerServerInstant pari : instantList) {
pari.setNuId(nuId); pari.setNuId(nuId);
pari.setNuName(nuBizNuCustomerServer.getNuName()); pari.setNuName(nuBizNuCustomerServer.getNuName());
pari.setCustomerId(customerId); pari.setCustomerId(customerId);
@ -316,12 +316,12 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
} }
QueryWrapper<NuBizNuCustomerElderTag> tagQueryWrapper = new QueryWrapper<>(); QueryWrapper<NuBizNuCustomerElderTag> tagQueryWrapper = new QueryWrapper<>();
instantQueryWrapper.eq("nu_id",nuId); instantQueryWrapper.eq("nu_id", nuId);
instantQueryWrapper.eq("customer_id",customerId); instantQueryWrapper.eq("customer_id", customerId);
nuBizNuCustomerElderTagService.remove(tagQueryWrapper); nuBizNuCustomerElderTagService.remove(tagQueryWrapper);
List<NuBizNuCustomerElderTag> tagList = nuBizNuCustomerServer.getTagList(); List<NuBizNuCustomerElderTag> tagList = nuBizNuCustomerServer.getTagList();
if(tagList.size()>0){ if (tagList.size() > 0) {
for(NuBizNuCustomerElderTag tg : tagList){ for (NuBizNuCustomerElderTag tg : tagList) {
tg.setNuId(nuId); tg.setNuId(nuId);
tg.setNuName(nuBizNuCustomerServer.getNuName()); tg.setNuName(nuBizNuCustomerServer.getNuName());
tg.setCustomerId(customerId); tg.setCustomerId(customerId);
@ -339,10 +339,10 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
List<NuBizNuCustomerServer> directiveList = baseMapper.getNcDirectiveList(new NuBizNuCustomerServer()); List<NuBizNuCustomerServer> directiveList = baseMapper.getNcDirectiveList(new NuBizNuCustomerServer());
for(DirectivePackageDto et : list){ for (DirectivePackageDto et : list) {
List<NuBizNuCustomerServer> directivesList = new ArrayList<>(); List<NuBizNuCustomerServer> directivesList = new ArrayList<>();
for(NuBizNuCustomerServer etd : directiveList){ for (NuBizNuCustomerServer etd : directiveList) {
if(etd.getPackageId().equals(et.getId())){ if (etd.getPackageId().equals(et.getId())) {
getNetImages(etd); getNetImages(etd);
directivesList.add(etd); directivesList.add(etd);
} }
@ -352,16 +352,71 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
return list; return list;
} }
@Override
public void addDirective(NuBizNuCustomerServer nuBizNuCustomerServer) {
baseMapper.insert(nuBizNuCustomerServer);
//TODO 增加日志
}
@Override
public void addInstant(NuBizNuCustomerServerInstant customerServerInstant) {
nuBizNuCustomerServerInstantService.save(customerServerInstant);
//TODO 增加日志
}
@Override
public void addElderTag(NuBizNuCustomerElderTag customerElderTag) {
nuBizNuCustomerElderTagService.save(customerElderTag);
//TODO 增加日志
}
@Override
public void deleteDirective(NuBizNuCustomerServer nuBizNuCustomerServer) {
baseMapper.deleteById(nuBizNuCustomerServer);
//TODO 增加日志
}
@Override
public void deleteInstant(NuBizNuCustomerServerInstant customerServerInstant) {
nuBizNuCustomerServerInstantService.removeById(customerServerInstant);
//TODO 增加日志
}
@Override
public void deleteElderTag(NuBizNuCustomerElderTag customerElderTag) {
nuBizNuCustomerElderTagService.removeById(customerElderTag);
//TODO 增加日志
}
@Override
public void editDirective(NuBizNuCustomerServer nuBizNuCustomerServer) {
baseMapper.updateById(nuBizNuCustomerServer);
//TODO 增加日志
}
@Override
public void editInstant(NuBizNuCustomerServerInstant customerServerInstant) {
nuBizNuCustomerServerInstantService.updateById(customerServerInstant);
//TODO 增加日志
}
@Override
public void editElderTag(NuBizNuCustomerElderTag customerElderTag) {
nuBizNuCustomerElderTagService.updateById(customerElderTag);
//TODO 增加日志
}
/** /**
* 获取管理平台静态资源路径 * 获取管理平台静态资源路径
*
* @return * @return
*/ */
private void getOpeMediaAddress(){ private void getOpeMediaAddress() {
if(serverNetUrl==null||serverNetUrl.equals("")){ if (serverNetUrl == null || serverNetUrl.equals("")) {
JSONObject json = sysConfigApi.getByKey("ope_media_address"); JSONObject json = sysConfigApi.getByKey("ope_media_address");
if(json!=null){ if (json != null) {
String configValue = json.getString("configValue"); String configValue = json.getString("configValue");
if(!configValue.endsWith("/")){ if (!configValue.endsWith("/")) {
configValue += "/"; configValue += "/";
} }
serverNetUrl = configValue; serverNetUrl = configValue;
@ -369,7 +424,7 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
} }
} }
private String getImageNetUrl(String imageUrl){ private String getImageNetUrl(String imageUrl) {
getOpeMediaAddress(); getOpeMediaAddress();
return serverNetUrl + imageUrl; return serverNetUrl + imageUrl;
} }