From 19cba7f73e42983acd98eaac3b2d6669a6deb2c3 Mon Sep 17 00:00:00 2001 From: syruan <321359594@qq.com> Date: Wed, 13 Nov 2024 14:34:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E6=96=99=E7=AE=A1=E7=90=86--=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=A2=86=E6=96=99=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bonus/material/lease/domain/LeaseApplyDetails.java | 3 +-- .../java/com/bonus/material/lease/domain/LeaseApplyInfo.java | 3 +++ .../lease/service/impl/LeaseApplyInfoServiceImpl.java | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) 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);