From 91efabadc6c4d29ec386c06d0871d541bea0dc5d Mon Sep 17 00:00:00 2001 From: syruan <15555146157@163.com> Date: Wed, 30 Jul 2025 14:12:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=90=E6=96=99=E7=AB=99=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ClzSltAgreementInfoController.java | 9 ++++++++- .../clz/mapper/ClzSltAgreementInfoMapper.java | 3 +++ .../service/ClzSltAgreementInfoService.java | 4 ++++ .../impl/ClzSltAgreementInfoServiceImpl.java | 18 ++++++++++++++++++ .../material/clz/ClzAgreementInfoMapper.xml | 15 +++++++++++++++ 5 files changed, 48 insertions(+), 1 deletion(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/controller/ClzSltAgreementInfoController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/controller/ClzSltAgreementInfoController.java index 7ae139f8..f15a56e7 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/controller/ClzSltAgreementInfoController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/controller/ClzSltAgreementInfoController.java @@ -7,6 +7,7 @@ import com.bonus.material.basic.domain.BmProject; import com.bonus.material.clz.domain.vo.MaterialSltAgreementInfo; import com.bonus.material.clz.domain.vo.sltAgreementInfo.MaterialSltInfoVo; import com.bonus.material.clz.service.ClzSltAgreementInfoService; +import com.bonus.material.common.domain.dto.SelectDto; import com.bonus.material.settlement.domain.SltAgreementReduce; import com.bonus.material.settlement.domain.SltAgreementRelation; import com.bonus.material.task.domain.TmTask; @@ -51,12 +52,18 @@ public class ClzSltAgreementInfoController extends BaseController { return getDataTable(list); } - @ApiOperation(value = "工程下拉选根据材料站单位查询") + @ApiOperation(value = "工程下拉选根据材料站班组查询") @PostMapping("getProjectListByUnitIds") public AjaxResult getProjectListByUnitIds(@RequestBody BmProject bmProject) { return clzSltAgreementInfoService.getProjectListByUnitIds(bmProject); } + @ApiOperation(value = "往来单位id和标段工程id获取协议信息") + @PostMapping("getAgreementInfoById") + public AjaxResult getAgreementInfoById(@RequestBody SelectDto dto){ + return clzSltAgreementInfoService.getAgreementInfoById(dto); + } + @ApiOperation(value = "根据协议获取结算清单") @PostMapping("/getSltInfo") public AjaxResult getSltInfo(@RequestBody List list) { diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/mapper/ClzSltAgreementInfoMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/mapper/ClzSltAgreementInfoMapper.java index 4fdabf03..b9329325 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/mapper/ClzSltAgreementInfoMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/mapper/ClzSltAgreementInfoMapper.java @@ -3,6 +3,7 @@ package com.bonus.material.clz.mapper; import com.bonus.common.biz.domain.ProjectTreeNode; import com.bonus.material.clz.domain.vo.MaterialSltAgreementInfo; import com.bonus.material.clz.domain.vo.sltAgreementInfo.MaterialSltInfoVo; +import com.bonus.material.common.domain.vo.AgreementVo; import com.bonus.material.settlement.domain.SltAgreementReduce; import org.apache.ibatis.annotations.Param; @@ -25,6 +26,8 @@ public interface ClzSltAgreementInfoMapper { List getProjectList(int projectId); + List getAgreementInfoById(@Param("unitIds") List unitIds, @Param("projectId") int projectId); + /** * 获取租赁列表 diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/ClzSltAgreementInfoService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/ClzSltAgreementInfoService.java index 6a2967b0..45aae129 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/ClzSltAgreementInfoService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/ClzSltAgreementInfoService.java @@ -4,6 +4,7 @@ import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.material.basic.domain.BmProject; import com.bonus.material.clz.domain.vo.MaterialSltAgreementInfo; import com.bonus.material.clz.domain.vo.sltAgreementInfo.MaterialSltInfoVo; +import com.bonus.material.common.domain.dto.SelectDto; import java.util.List; @@ -35,6 +36,9 @@ public interface ClzSltAgreementInfoService { */ AjaxResult getProjectListByUnitIds(BmProject bmProject); + AjaxResult getAgreementInfoById(SelectDto dto); + + /** * 提交结算清单 * @param sltInfoVo diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/ClzSltAgreementInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/ClzSltAgreementInfoServiceImpl.java index 2cc3156b..a43bf311 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/ClzSltAgreementInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/ClzSltAgreementInfoServiceImpl.java @@ -11,6 +11,8 @@ import com.bonus.material.clz.domain.vo.MaterialSltAgreementInfo; import com.bonus.material.clz.domain.vo.sltAgreementInfo.MaterialSltInfoVo; import com.bonus.material.clz.mapper.ClzSltAgreementInfoMapper; import com.bonus.material.clz.service.ClzSltAgreementInfoService; +import com.bonus.material.common.domain.dto.SelectDto; +import com.bonus.material.common.domain.vo.AgreementVo; import com.bonus.material.settlement.domain.SltAgreementReduce; import com.bonus.material.settlement.domain.SltAgreementRelation; import org.apache.commons.collections4.CollectionUtils; @@ -165,6 +167,22 @@ public class ClzSltAgreementInfoServiceImpl implements ClzSltAgreementInfoServic return AjaxResult.success(groupList); } + @Override + public AjaxResult getAgreementInfoById(SelectDto dto) { + List vo = new ArrayList<>(); + try { + List list = clzSltAgreementInfoMapper.getAgreementInfoById(dto.getUnitIds(), Integer.parseInt(dto.getProjectId())); + if (CollectionUtils.isNotEmpty(list)) { + vo = list; + } else { + return AjaxResult.error("未找到匹配的协议信息"); + } + } catch (Exception e) { + return AjaxResult.error(e+"协议查询失败"); + } + return AjaxResult.success(vo); + } + /** * 提交结算清单 * @param sltInfoVo diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/ClzAgreementInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/ClzAgreementInfoMapper.xml index 6c0a5eb2..5a010cdd 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/ClzAgreementInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/ClzAgreementInfoMapper.xml @@ -234,4 +234,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ORDER BY level + + \ No newline at end of file