From 584f2c40c7f7f285f5a1ab5dee596eb045803e27 Mon Sep 17 00:00:00 2001 From: hayu <1604366271@qq.com> Date: Tue, 18 Feb 2025 20:04:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E8=BD=AC=E7=94=B3=E8=AF=B7,=E7=9B=B4?= =?UTF-8?q?=E8=BD=AC=E8=AE=B0=E5=BD=95=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/ma/domain/DirectApplyUrl.java | 8 +++- .../ma/service/impl/DirectRotationImpl.java | 6 +++ .../impl/WorkSiteDirectManageImpl.java | 2 +- .../SltAgreementReduceController.java | 35 ++++++++++++++++ .../mapper/SltAgreementReduceMapper.java | 5 +++ .../service/ISltAgreementReduceService.java | 4 ++ .../impl/SltAgreementReduceServiceImpl.java | 10 +++++ .../ma/WorkSiteDirectManageMapper.xml | 5 +++ .../settlement/SltAgreementReduceMapper.xml | 40 +++++++++++++++++++ 9 files changed, 112 insertions(+), 3 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/DirectApplyUrl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/DirectApplyUrl.java index 753032bd..0aea5836 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/DirectApplyUrl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/DirectApplyUrl.java @@ -1,6 +1,8 @@ package com.bonus.material.ma.domain; import com.bonus.common.core.web.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; import lombok.EqualsAndHashCode; @@ -9,7 +11,9 @@ import lombok.EqualsAndHashCode; public class DirectApplyUrl extends BaseEntity { private String url; - public DirectApplyUrl(String s) { - this.url = s; + @JsonCreator + public DirectApplyUrl(@JsonProperty("url") String url) { + this.url = url; } + } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/DirectRotationImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/DirectRotationImpl.java index 72e2906d..5bdbca6b 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/DirectRotationImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/DirectRotationImpl.java @@ -48,6 +48,9 @@ public class DirectRotationImpl implements DirectRotationService { if (directApplyInfoDetails != null) { if (directApplyInfoDetails.getDirectApplyInfo() != null) { DirectApplyInfo directApplyInfos = directApplyInfoDetails.getDirectApplyInfo(); + if (directApplyInfos.getBackAgreementId()==directApplyInfos.getLeaseAgreementId()){ + return AjaxResult.error("申请失败,不能转入同单位同工程"); + } directApplyInfos.setCode(workSiteDirectManageService.genderLeaseCode()); directApplyInfos.setCreateTime(new Date()); List urls = new ArrayList<>(); @@ -95,6 +98,9 @@ public class DirectRotationImpl implements DirectRotationService { if (directApplyInfoDetails != null) { if (directApplyInfoDetails.getDirectApplyInfo() != null && directApplyInfoDetails.getDirectApplyInfo().getId() != null) { DirectApplyInfo directApplyInfos = directApplyInfoDetails.getDirectApplyInfo(); + if (directApplyInfos.getBackAgreementId()==directApplyInfos.getLeaseAgreementId()){ + return AjaxResult.error("申请失败,不能转入同单位同工程"); + } directApplyInfos.setUpdateTime(new Date()); List urls = new ArrayList<>(); if (directApplyInfoDetails.getDirectApplyInfo().getDirUrls() != null) { diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/WorkSiteDirectManageImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/WorkSiteDirectManageImpl.java index 556faa01..86581310 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/WorkSiteDirectManageImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/WorkSiteDirectManageImpl.java @@ -333,7 +333,7 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService { if (StringUtils.isNotBlank(directApplyInfoDetails.getId())) { DirectApplyInfo directApplyInfos = getDirectApplyInfoById(directApplyInfoDetails.getId()); directApplyInfos.setStatus("1"); - directApplyInfos.setAuditor(SecurityUtils.getLoginUser().getUsername()); + directApplyInfos.setAuditor(SecurityUtils.getUsername()); directApplyInfos.setAuditTime(DateUtils.getNowDate()); res = refuseDirectApplyInfo(directApplyInfos); } else { diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementReduceController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementReduceController.java index e13b9442..1605786e 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementReduceController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementReduceController.java @@ -60,6 +60,41 @@ public class SltAgreementReduceController extends BaseController { return success(list); } + + @ApiOperation(value = "查询协议申请机具名称") + // @RequiresPermissions("settlement:apply:list") + @GetMapping("/selectByMaType") + public AjaxResult selectByMatype(SltAgreementReduce sltAgreement) { + List list = null; + if(sltAgreement!=null){ + if (sltAgreement.getAgreementId()!=null){ + list = sltAgreementReduceService.selectByMatype(sltAgreement); + } + + }else{ + + } + + return success(list); + } + + @ApiOperation(value = "查询协议申请机具规格") + // @RequiresPermissions("settlement:apply:list") + @GetMapping("/selectByMaModel") + public AjaxResult selectByMaModel(SltAgreementReduce sltAgreement) { + List list = null; + if(sltAgreement!=null){ + if (sltAgreement.getAgreementId()!=null){ + list = sltAgreementReduceService.selectByMaModel(sltAgreement); + } + + }else{ + + } + + return success(list); + } + /** * 查询协议申请减免明细 */ diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementReduceMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementReduceMapper.java index 9c31bd62..e62bc6c5 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementReduceMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementReduceMapper.java @@ -26,4 +26,9 @@ public interface SltAgreementReduceMapper { void insertBatchReduceDetail(@Param("detailList") List detailList); List findOverlappingReductions(SltAgreementReduce detail); + + + List selectByMatype(SltAgreementReduce sltAgreement); + + List selectByMaModel(SltAgreementReduce sltAgreement); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/ISltAgreementReduceService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/ISltAgreementReduceService.java index 42a02845..f916c557 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/ISltAgreementReduceService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/ISltAgreementReduceService.java @@ -18,4 +18,8 @@ public interface ISltAgreementReduceService { List getApplyReduceList(SltAgreementReduce sltAgreement); AjaxResult addApply(SltAgreementReduce sltAgreement); + + List selectByMatype(SltAgreementReduce sltAgreement); + + List selectByMaModel(SltAgreementReduce sltAgreement); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementReduceServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementReduceServiceImpl.java index 67699400..a5ff079c 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementReduceServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementReduceServiceImpl.java @@ -75,6 +75,16 @@ public class SltAgreementReduceServiceImpl implements ISltAgreementReduceService } } + @Override + public List selectByMatype(SltAgreementReduce sltAgreement) { + return sltAgreementRecudceMapper.selectByMatype(sltAgreement); + } + + @Override + public List selectByMaModel(SltAgreementReduce sltAgreement) { + return sltAgreementRecudceMapper.selectByMaModel(sltAgreement); + } + private void initSltAgreement(SltAgreementReduce sltAgreement) { sltAgreement.setCode(generateCode()); sltAgreement.setCreateTime(new Date()); diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/WorkSiteDirectManageMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/WorkSiteDirectManageMapper.xml index e72bd298..71f5ef63 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/WorkSiteDirectManageMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/WorkSiteDirectManageMapper.xml @@ -411,6 +411,11 @@ + + +