diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java index 1664b1cb..a59fdf99 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java @@ -122,6 +122,20 @@ public class SltAgreementInfoController extends BaseController { unitNames.add(info.getUnitName()); projectNames.add(info.getProjectName()); SltInfoVo vo = sltAgreementInfoService.getSltInfo(info); + if (vo == null) { + vo = new SltInfoVo(); + vo.setLeaseCost(BigDecimal.ZERO); + vo.setRepairCost(BigDecimal.ZERO); + vo.setScrapCost(BigDecimal.ZERO); + vo.setLoseCost(BigDecimal.ZERO); + vo.setReductionCost(BigDecimal.ZERO); + vo.setLeaseList(Collections.emptyList()); + vo.setRepairList(Collections.emptyList()); + vo.setScrapList(Collections.emptyList()); + vo.setLoseList(Collections.emptyList()); + vo.setReductionList(Collections.emptyList()); + vo.setRelations(Collections.emptyList()); + } dataList.add(vo); if (info.getAgreementId() != null) { agreementId = info.getAgreementId(); diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java index 92a9d1d7..6b6f573c 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java @@ -131,15 +131,17 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService { List scrapList = getScrapList(info); //丢失费用列表 List loseList = getLoseList(info); + //费用减免列表 + List reductionList = getReductionList(info); if (CollectionUtils.isEmpty(leaseList) && CollectionUtils.isEmpty(repairList) - && CollectionUtils.isEmpty(scrapList) && CollectionUtils.isEmpty(loseList)) + && CollectionUtils.isEmpty(scrapList) && CollectionUtils.isEmpty(loseList) + && CollectionUtils.isEmpty(reductionList)) { return null; } - //费用减免列表 - List reductionList = getReductionList(info); + sltInfoVo.setLeaseList(leaseList); sltInfoVo.setRepairList(repairList); sltInfoVo.setScrapList(scrapList); diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml index 9975a076..a3b18619 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml @@ -811,6 +811,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bp.pro_id = #{projectId} + + and saa.create_time between #{startTime} and #{endTime} + + and saa.status = '1'