diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/api/EleEvtFeignClient.java b/pqs-system/system-api/src/main/java/com/njcn/system/api/EleEvtFeignClient.java index 819fa5fb4..e84614a90 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/api/EleEvtFeignClient.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/api/EleEvtFeignClient.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiOperation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; /** * @author xuyang @@ -19,7 +20,9 @@ import org.springframework.web.bind.annotation.RequestBody; public interface EleEvtFeignClient { @PostMapping("/add") - @ApiOperation("新增事件拓展数据") HttpResult add(@RequestBody EleEvtParam evtParam); + @PostMapping("/delete") + HttpResult delete(@RequestParam("id") String id); + } diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/api/EleWaveFeignClient.java b/pqs-system/system-api/src/main/java/com/njcn/system/api/EleWaveFeignClient.java index 07f924540..b76ddb979 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/api/EleWaveFeignClient.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/api/EleWaveFeignClient.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiOperation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; /** * @author xuyang @@ -18,7 +19,10 @@ import org.springframework.web.bind.annotation.RequestBody; public interface EleWaveFeignClient { @PostMapping("/add") - @ApiOperation("新增波形拓展数据") HttpResult add(@RequestBody CsWaveParam waveParam); + @PostMapping("/delete") + @ApiOperation("删除波形拓展数据") + HttpResult delete(@RequestParam("id") String id); + } diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/api/fallback/EleEvtFeignClientFallbackFactory.java b/pqs-system/system-api/src/main/java/com/njcn/system/api/fallback/EleEvtFeignClientFallbackFactory.java index 1453761f0..4b68d7621 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/api/fallback/EleEvtFeignClientFallbackFactory.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/api/fallback/EleEvtFeignClientFallbackFactory.java @@ -41,6 +41,12 @@ public class EleEvtFeignClientFallbackFactory implements FallbackFactory delete(String id) { + log.error("{}异常,降级处理,异常为:{}","删除事件拓展数据",cause.toString()); + throw new BusinessException(finalExceptionEnum); + } }; } } diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/api/fallback/EleWaveFeignClientFallbackFactory.java b/pqs-system/system-api/src/main/java/com/njcn/system/api/fallback/EleWaveFeignClientFallbackFactory.java index 6ec81d190..5a2511ff3 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/api/fallback/EleWaveFeignClientFallbackFactory.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/api/fallback/EleWaveFeignClientFallbackFactory.java @@ -35,6 +35,12 @@ public class EleWaveFeignClientFallbackFactory implements FallbackFactory delete(String id) { + log.error("{}异常,降级处理,异常为:{}","删除波形拓展数据",cause.toString()); + throw new BusinessException(finalExceptionEnum); + } }; } } diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/pojo/param/CsWaveParam.java b/pqs-system/system-api/src/main/java/com/njcn/system/pojo/param/CsWaveParam.java index 6df9caffa..62fe4f7ea 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/pojo/param/CsWaveParam.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/pojo/param/CsWaveParam.java @@ -20,4 +20,6 @@ public class CsWaveParam { private String data; + private String showName; + } diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/pojo/param/EleEvtParam.java b/pqs-system/system-api/src/main/java/com/njcn/system/pojo/param/EleEvtParam.java index a80cf0483..83907748f 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/pojo/param/EleEvtParam.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/pojo/param/EleEvtParam.java @@ -22,4 +22,6 @@ public class EleEvtParam { private String data; + private String showName; + } diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/pojo/po/CsWaveParm.java b/pqs-system/system-api/src/main/java/com/njcn/system/pojo/po/CsWaveParm.java index 8c06accb5..4fe2374b1 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/pojo/po/CsWaveParm.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/pojo/po/CsWaveParm.java @@ -26,4 +26,6 @@ public class CsWaveParm { private String data; + private String showName; + } diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/pojo/po/EleEvtParm.java b/pqs-system/system-api/src/main/java/com/njcn/system/pojo/po/EleEvtParm.java index 0aabea5c3..631c8b47d 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/pojo/po/EleEvtParm.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/pojo/po/EleEvtParm.java @@ -34,4 +34,6 @@ public class EleEvtParm { private String data; + private String showName; + } diff --git a/pqs-system/system-boot/src/main/java/com/njcn/system/controller/EleEvtParmController.java b/pqs-system/system-boot/src/main/java/com/njcn/system/controller/EleEvtParmController.java index b0f990dc7..be37cc13a 100644 --- a/pqs-system/system-boot/src/main/java/com/njcn/system/controller/EleEvtParmController.java +++ b/pqs-system/system-boot/src/main/java/com/njcn/system/controller/EleEvtParmController.java @@ -17,11 +17,8 @@ import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.*; -import org.springframework.web.bind.annotation.RestController; import com.njcn.web.controller.BaseController; /** @@ -54,5 +51,18 @@ public class EleEvtParmController extends BaseController { return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); } + @PostMapping("/delete") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("删除事件拓展数据") + @ApiImplicitParam(name = "id", value = "id", required = true) + public HttpResult delete(@RequestParam String id){ + String methodDescribe = getMethodDescribe("delete"); + LogUtil.njcnDebug(log, "{},传递的id为:{}", methodDescribe,id); + eleEvtParmService.delete(id); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); + } + + + } diff --git a/pqs-system/system-boot/src/main/java/com/njcn/system/controller/EleWaveParmController.java b/pqs-system/system-boot/src/main/java/com/njcn/system/controller/EleWaveParmController.java index 5532daa8b..5fe3282a0 100644 --- a/pqs-system/system-boot/src/main/java/com/njcn/system/controller/EleWaveParmController.java +++ b/pqs-system/system-boot/src/main/java/com/njcn/system/controller/EleWaveParmController.java @@ -8,6 +8,7 @@ import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.common.utils.LogUtil; import com.njcn.system.pojo.param.CsWaveParam; +import com.njcn.system.pojo.po.EleEpdPqd; import com.njcn.system.service.IEleWaveParmService; import com.njcn.web.controller.BaseController; import io.swagger.annotations.Api; @@ -16,10 +17,7 @@ import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; /** *

@@ -51,5 +49,16 @@ public class EleWaveParmController extends BaseController { return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); } + @PostMapping("/delete") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("删除波形拓展数据") + @ApiImplicitParam(name = "id", value = "id", required = true) + public HttpResult delete(@RequestParam String id){ + String methodDescribe = getMethodDescribe("delete"); + LogUtil.njcnDebug(log, "{},传递的id为:{}", methodDescribe,id); + waveParamService.delete(id); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); + } + } diff --git a/pqs-system/system-boot/src/main/java/com/njcn/system/service/IEleEvtParmService.java b/pqs-system/system-boot/src/main/java/com/njcn/system/service/IEleEvtParmService.java index 2065a12a1..522b865d4 100644 --- a/pqs-system/system-boot/src/main/java/com/njcn/system/service/IEleEvtParmService.java +++ b/pqs-system/system-boot/src/main/java/com/njcn/system/service/IEleEvtParmService.java @@ -16,4 +16,6 @@ public interface IEleEvtParmService extends IService { void add(EleEvtParam eleEvtParam); + void delete(String id); + } diff --git a/pqs-system/system-boot/src/main/java/com/njcn/system/service/IEleWaveParmService.java b/pqs-system/system-boot/src/main/java/com/njcn/system/service/IEleWaveParmService.java index 8ec8169f0..1c8e78956 100644 --- a/pqs-system/system-boot/src/main/java/com/njcn/system/service/IEleWaveParmService.java +++ b/pqs-system/system-boot/src/main/java/com/njcn/system/service/IEleWaveParmService.java @@ -16,4 +16,6 @@ public interface IEleWaveParmService extends IService { void add(CsWaveParam waveParam); + void delete(String id); + } diff --git a/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/EleEvtParmServiceImpl.java b/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/EleEvtParmServiceImpl.java index ef2936601..3dbc0757d 100644 --- a/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/EleEvtParmServiceImpl.java +++ b/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/EleEvtParmServiceImpl.java @@ -1,5 +1,6 @@ package com.njcn.system.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.system.mapper.EleEvtParmMapper; import com.njcn.system.pojo.param.EleEvtParam; @@ -25,4 +26,11 @@ public class EleEvtParmServiceImpl extends ServiceImpl deleteWrapper = new LambdaQueryWrapper<>(); + deleteWrapper.eq(EleEvtParm::getPid,id); + this.baseMapper.delete(deleteWrapper); + } } diff --git a/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/EleWaveParmServiceImpl.java b/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/EleWaveParmServiceImpl.java index c5b93c857..39165d80a 100644 --- a/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/EleWaveParmServiceImpl.java +++ b/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/EleWaveParmServiceImpl.java @@ -1,9 +1,11 @@ package com.njcn.system.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.system.mapper.EleWaveParmMapper; import com.njcn.system.pojo.param.CsWaveParam; import com.njcn.system.pojo.po.CsWaveParm; +import com.njcn.system.pojo.po.EleEvtParm; import com.njcn.system.service.IEleWaveParmService; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; @@ -25,4 +27,11 @@ public class EleWaveParmServiceImpl extends ServiceImpl deleteWrapper = new LambdaQueryWrapper<>(); + deleteWrapper.eq(CsWaveParm::getPid,id); + this.baseMapper.delete(deleteWrapper); + } }