From 0ccb1f92fed08c6b44092f53242ccf3cc0902761 Mon Sep 17 00:00:00 2001 From: mashuai Date: Sat, 5 Jul 2025 17:57:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=90=E6=96=99=E7=AB=99=E9=80=80=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/controller/SelectController.java | 6 +++++ .../common/service/SelectService.java | 7 ++++++ .../service/impl/SelectServiceImpl.java | 22 +++++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/controller/SelectController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/controller/SelectController.java index f7eeda6f..10edd099 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/controller/SelectController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/controller/SelectController.java @@ -180,6 +180,12 @@ public class SelectController { return service.getAgreementInfoById(dto); } + @ApiOperation(value = "材料站退料往来单位id和标段工程id获取协议信息") + @PostMapping("getAgreementInfoByIdBack") + public AjaxResult getAgreementInfoByIdBack(@RequestBody SelectDto dto){ + return service.getAgreementInfoByIdBack(dto); + } + @ApiOperation(value = "在用设备类型树") @PostMapping("/getUseTypeTree") public AjaxResult getUseTypeTree(@RequestBody BackApplyInfo bean) { diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/SelectService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/SelectService.java index a00699d4..f1486309 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/SelectService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/SelectService.java @@ -241,4 +241,11 @@ public interface SelectService { * @return */ AjaxResult getUnitListLeasePerson(BmUnit bmUnit); + + /** + * 材料站退料往来单位id和标段工程id获取协议信息 + * @param dto + * @return + */ + AjaxResult getAgreementInfoByIdBack(SelectDto dto); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/impl/SelectServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/impl/SelectServiceImpl.java index 81ad82db..9b7751b5 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/impl/SelectServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/impl/SelectServiceImpl.java @@ -250,6 +250,28 @@ public class SelectServiceImpl implements SelectService { return AjaxResult.success(mapper.getUnitListLeasePerson(bmUnit)); } + /** + * 材料站退料往来单位id和标段工程id获取协议信息 + * @param dto + * @return + */ + @Override + public AjaxResult getAgreementInfoByIdBack(SelectDto dto) { + AgreementVo vo = new AgreementVo(); + try { + if (dto != null && dto.getTeamId() > 0) { + dto.setUnitId(dto.getTeamId()); + } + List list = mapper.getAgreementInfoById(dto); + if (CollectionUtils.isNotEmpty(list)) { + vo = list.get(0); + } + } catch (Exception e) { + log.error("往来单位id和标段工程id获取协议信息", e); + } + return AjaxResult.success(vo); + } + // @Override // public AjaxResult getDictByPidCbx(SelectDto dto) { // List list = new ArrayList<>();