领料接口优化

This commit is contained in:
sxu 2024-11-14 16:49:33 +08:00
parent 8e4f2ba472
commit 731989a45c
1 changed files with 8 additions and 5 deletions

View File

@ -3,6 +3,7 @@ package com.bonus.material.basic.service.impl;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import com.bonus.common.biz.constant.MaterialConstants; import com.bonus.common.biz.constant.MaterialConstants;
import com.bonus.common.biz.enums.TmTaskTypeEnum; import com.bonus.common.biz.enums.TmTaskTypeEnum;
@ -45,11 +46,13 @@ public class BmAgreementInfoServiceImpl implements IBmAgreementInfoService
public BmAgreementInfo selectBmAgreementInfoByAgreementId(Long agreementId) public BmAgreementInfo selectBmAgreementInfoByAgreementId(Long agreementId)
{ {
BmAgreementInfo bmAgreementInfo = bmAgreementInfoMapper.selectBmAgreementInfoByAgreementId(agreementId); BmAgreementInfo bmAgreementInfo = bmAgreementInfoMapper.selectBmAgreementInfoByAgreementId(agreementId);
BmFileInfo bmFileInfo = new BmFileInfo(); if (Objects.nonNull(bmAgreementInfo)) {
bmFileInfo.setModelId(bmAgreementInfo.getAgreementId()); BmFileInfo bmFileInfo = new BmFileInfo();
bmFileInfo.setTaskType(TmTaskTypeEnum.TM_TASK_FACTORY_MANAGEMENT.getTaskTypeId()); bmFileInfo.setModelId(bmAgreementInfo.getAgreementId());
List<BmFileInfo> fileInfos = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo); bmFileInfo.setTaskType(TmTaskTypeEnum.TM_TASK_FACTORY_MANAGEMENT.getTaskTypeId());
bmAgreementInfo.setBmFileInfos(fileInfos); List<BmFileInfo> fileInfos = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
bmAgreementInfo.setBmFileInfos(fileInfos);
}
return bmAgreementInfo; return bmAgreementInfo;
} }