diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java index f69f2587..0dac353a 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java @@ -12,11 +12,10 @@ import com.bonus.common.core.web.domain.BaseEntity; * @author xsheng * @date 2024-10-16 */ - - @Data @ToString public class LeaseApplyDetails extends BaseEntity { + private static final long serialVersionUID = 1L; /** ID */ diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyInfo.java index 255659ed..0d9eb19d 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyInfo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyInfo.java @@ -148,6 +148,9 @@ public class LeaseApplyInfo extends BaseEntity { @ApiModelProperty(value = "租赁单位id") private Integer leaseUnitId; + @ApiModelProperty(value = "协议id") + private Long agreementId; + @ApiModelProperty(value = "协议号") private String agreementCode; diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java index fb892c2a..f2c94666 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java @@ -98,6 +98,9 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { */ @Override public AjaxResult insertLeaseApplyInfo(TmTaskRequestVo tmTaskRequestVo) { + if (tmTaskRequestVo.getLeaseApplyInfo() == null) { + return AjaxResult.error("请先填写领料任务信息"); + } tmTaskRequestVo.getLeaseApplyInfo().setCreateTime(DateUtils.getNowDate()); tmTaskRequestVo.getLeaseApplyInfo().setCreateBy(SecurityUtils.getUsername()); try { @@ -109,7 +112,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateBy(SecurityUtils.getUsername()); tmTaskMapper.insertTmTask(tmTask); - TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), tmTaskRequestVo.getAgreementId()); + TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), tmTaskRequestVo.getLeaseApplyInfo().getAgreementId()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);