diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/BmAgreementInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/BmAgreementInfoServiceImpl.java index a01e3332..f3a3478f 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/BmAgreementInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/BmAgreementInfoServiceImpl.java @@ -3,6 +3,7 @@ package com.bonus.material.basic.service.impl; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; +import java.util.Objects; import java.util.concurrent.atomic.AtomicBoolean; import com.bonus.common.biz.constant.MaterialConstants; import com.bonus.common.biz.enums.TmTaskTypeEnum; @@ -45,11 +46,13 @@ public class BmAgreementInfoServiceImpl implements IBmAgreementInfoService public BmAgreementInfo selectBmAgreementInfoByAgreementId(Long agreementId) { BmAgreementInfo bmAgreementInfo = bmAgreementInfoMapper.selectBmAgreementInfoByAgreementId(agreementId); - BmFileInfo bmFileInfo = new BmFileInfo(); - bmFileInfo.setModelId(bmAgreementInfo.getAgreementId()); - bmFileInfo.setTaskType(TmTaskTypeEnum.TM_TASK_FACTORY_MANAGEMENT.getTaskTypeId()); - List fileInfos = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo); - bmAgreementInfo.setBmFileInfos(fileInfos); + if (Objects.nonNull(bmAgreementInfo)) { + BmFileInfo bmFileInfo = new BmFileInfo(); + bmFileInfo.setModelId(bmAgreementInfo.getAgreementId()); + bmFileInfo.setTaskType(TmTaskTypeEnum.TM_TASK_AGREEMENT_MANAGEMENT.getTaskTypeId()); + List fileInfos = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo); + bmAgreementInfo.setBmFileInfos(fileInfos); + } return bmAgreementInfo; } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmAgreementInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmAgreementInfoMapper.xml index 0c8b8087..f30d202f 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmAgreementInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmAgreementInfoMapper.xml @@ -74,13 +74,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" project_id, create_by, lease_day, plan_start_time, contract_code, auth_person, phone, create_time, update_by, - update_time, remark, company_id + update_time, remark, company_id, protocol ) values (#{agreementCode,jdbcType=VARCHAR}, #{signTime,jdbcType=VARCHAR}, #{unitId,jdbcType=INTEGER}, #{projectId,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{leaseDay,jdbcType=INTEGER}, #{planStartTime,jdbcType=TIMESTAMP}, #{contractCode,jdbcType=VARCHAR}, #{authPerson,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, - #{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER} + #{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{protocol,jdbcType=VARCHAR} )