This commit is contained in:
hongchao 2024-12-24 18:51:32 +08:00
commit 3ead6b1e33
5 changed files with 16 additions and 8 deletions

View File

@ -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<MaCodeVo> 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;

View File

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

View File

@ -92,7 +92,8 @@ public interface LeaseApplyDetailsMapper {
/**
* 根据领料任务id查询机具信息
* @param id
* @param typeId
* @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));
if (!CollectionUtils.isEmpty(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)) {
leaseApplyRequestVo.setMaCodeVoList(maCodeVoList);
detail.setMaCodeVoList(maCodeVoList);
}
}
}
});
return leaseApplyRequestVo;

View File

@ -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}
</select>
</mapper>