From 022052d82b65b9b8f0bd677d3073f8146d64b70f Mon Sep 17 00:00:00 2001 From: mashuai Date: Tue, 24 Dec 2024 18:50:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/lease/domain/LeaseApplyDetails.java | 5 +++++ .../lease/domain/vo/LeaseApplyRequestVo.java | 2 -- .../lease/mapper/LeaseApplyDetailsMapper.java | 3 ++- .../service/impl/LeaseApplyInfoServiceImpl.java | 13 ++++++++----- .../material/lease/LeaseApplyDetailsMapper.xml | 1 + 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java index 96e45247..82c1fc2b 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java @@ -1,12 +1,14 @@ package com.bonus.material.lease.domain; import com.bonus.common.core.annotation.Excel; +import com.bonus.material.back.domain.vo.MaCodeVo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; import com.bonus.common.core.web.domain.BaseEntity; import java.math.BigDecimal; +import java.util.List; /** * 领料任务详细对象 lease_apply_details @@ -94,6 +96,9 @@ public class LeaseApplyDetails extends BaseEntity { private String keyword; + @ApiModelProperty(value = "编码类型集合") + private List maCodeVoList; + public LeaseApplyDetails(Long id, Long parentId, Long typeId, BigDecimal preNum, BigDecimal auditNum, BigDecimal alNum, String status, Long companyId) { this.id = id; this.parentId = parentId; diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseApplyRequestVo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseApplyRequestVo.java index a16b6a8f..69665a50 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseApplyRequestVo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseApplyRequestVo.java @@ -32,6 +32,4 @@ public class LeaseApplyRequestVo extends BaseEntity { @ApiModelProperty(value = "领料-机具规格详情列表") private List leaseApplyDetailsList; - private List maCodeVoList; - } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseApplyDetailsMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseApplyDetailsMapper.java index 4c652e21..b45699eb 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseApplyDetailsMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseApplyDetailsMapper.java @@ -92,7 +92,8 @@ public interface LeaseApplyDetailsMapper { /** * 根据领料任务id查询机具信息 * @param id + * @param typeId * @return */ - List getCodeList(Long id); + List getCodeList(@Param("id") Long id, @Param("typeId") Long typeId); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java index 28b66d88..c2645a79 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java @@ -78,12 +78,15 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { List details = leaseApplyDetailsMapper.selectLeaseApplyDetailsList(new LeaseApplyDetails(info.getId(), keyword)); if (!CollectionUtils.isEmpty(details)) { leaseApplyRequestVo.setLeaseApplyDetailsList(details); + for (LeaseApplyDetails detail : details) { + // 获取编码详情 + List maCodeVoList = leaseApplyDetailsMapper.getCodeList(id, detail.getTypeId()); + if (!CollectionUtils.isEmpty(maCodeVoList)) { + detail.setMaCodeVoList(maCodeVoList); + } + } } - // 获取编码详情 - List maCodeVoList = leaseApplyDetailsMapper.getCodeList(id); - if (!CollectionUtils.isEmpty(maCodeVoList)) { - leaseApplyRequestVo.setMaCodeVoList(maCodeVoList); - } + }); return leaseApplyRequestVo; diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyDetailsMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyDetailsMapper.xml index 076b4269..584962f6 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyDetailsMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyDetailsMapper.xml @@ -267,5 +267,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND mt1.del_flag = '0' WHERE lod.parent_id = #{id} + and mt.type_id = #{typeId}