接口联调优化

This commit is contained in:
mashuai 2024-12-24 18:50:06 +08:00
parent 3954484bb3
commit 022052d82b
5 changed files with 16 additions and 8 deletions

View File

@ -1,12 +1,14 @@
package com.bonus.material.lease.domain; package com.bonus.material.lease.domain;
import com.bonus.common.core.annotation.Excel; import com.bonus.common.core.annotation.Excel;
import com.bonus.material.back.domain.vo.MaCodeVo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity; import com.bonus.common.core.web.domain.BaseEntity;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List;
/** /**
* 领料任务详细对象 lease_apply_details * 领料任务详细对象 lease_apply_details
@ -94,6 +96,9 @@ public class LeaseApplyDetails extends BaseEntity {
private String keyword; private String keyword;
@ApiModelProperty(value = "编码类型集合")
private List<MaCodeVo> maCodeVoList;
public LeaseApplyDetails(Long id, Long parentId, Long typeId, BigDecimal preNum, BigDecimal auditNum, BigDecimal alNum, String status, Long companyId) { public LeaseApplyDetails(Long id, Long parentId, Long typeId, BigDecimal preNum, BigDecimal auditNum, BigDecimal alNum, String status, Long companyId) {
this.id = id; this.id = id;
this.parentId = parentId; this.parentId = parentId;

View File

@ -32,6 +32,4 @@ public class LeaseApplyRequestVo extends BaseEntity {
@ApiModelProperty(value = "领料-机具规格详情列表") @ApiModelProperty(value = "领料-机具规格详情列表")
private List<LeaseApplyDetails> leaseApplyDetailsList; private List<LeaseApplyDetails> leaseApplyDetailsList;
private List<MaCodeVo> maCodeVoList;
} }

View File

@ -92,7 +92,8 @@ public interface LeaseApplyDetailsMapper {
/** /**
* 根据领料任务id查询机具信息 * 根据领料任务id查询机具信息
* @param id * @param id
* @param typeId
* @return * @return
*/ */
List<MaCodeVo> getCodeList(Long id); List<MaCodeVo> getCodeList(@Param("id") Long id, @Param("typeId") Long typeId);
} }

View File

@ -78,12 +78,15 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
List<LeaseApplyDetails> details = leaseApplyDetailsMapper.selectLeaseApplyDetailsList(new LeaseApplyDetails(info.getId(), keyword)); List<LeaseApplyDetails> details = leaseApplyDetailsMapper.selectLeaseApplyDetailsList(new LeaseApplyDetails(info.getId(), keyword));
if (!CollectionUtils.isEmpty(details)) { if (!CollectionUtils.isEmpty(details)) {
leaseApplyRequestVo.setLeaseApplyDetailsList(details); leaseApplyRequestVo.setLeaseApplyDetailsList(details);
} for (LeaseApplyDetails detail : details) {
// 获取编码详情 // 获取编码详情
List<MaCodeVo> maCodeVoList = leaseApplyDetailsMapper.getCodeList(id); List<MaCodeVo> maCodeVoList = leaseApplyDetailsMapper.getCodeList(id, detail.getTypeId());
if (!CollectionUtils.isEmpty(maCodeVoList)) { if (!CollectionUtils.isEmpty(maCodeVoList)) {
leaseApplyRequestVo.setMaCodeVoList(maCodeVoList); detail.setMaCodeVoList(maCodeVoList);
} }
}
}
}); });
return leaseApplyRequestVo; return leaseApplyRequestVo;

View File

@ -267,5 +267,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND mt1.del_flag = '0' AND mt1.del_flag = '0'
WHERE WHERE
lod.parent_id = #{id} lod.parent_id = #{id}
and mt.type_id = #{typeId}
</select> </select>
</mapper> </mapper>