From 634a059e7ca25a0a542038d1ac2e7298a1ee14cd Mon Sep 17 00:00:00 2001 From: WendyYang Date: Wed, 9 Oct 2024 15:37:19 +0800 Subject: [PATCH] =?UTF-8?q?modify:=201.=20=E6=B5=81=E7=A8=8B=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E4=BF=AE=E6=94=B9;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectlib/manage/AmountApprovalManage.java | 7 ++--- .../pm/api/projectlib/manage/ProjectLibManage.java | 5 +-- .../mapper/NdProjectApprovalAmountMapper.java | 16 ---------- .../mapper/NdProjectApprovalAmountMapper.xml | 5 --- .../mapper/ProjectApprovalAmountMapper.java | 16 ++++++++++ .../mapper/ProjectApprovalAmountMapper.xml | 5 +++ .../service/INdProjectApprovalAmountService.java | 36 ---------------------- .../service/IProjectApprovalAmountService.java | 36 ++++++++++++++++++++++ .../impl/NdProjectApprovalAmountServiceImpl.java | 20 ------------ .../impl/ProjectApprovalAmountServiceImpl.java | 20 ++++++++++++ 10 files changed, 80 insertions(+), 86 deletions(-) delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/NdProjectApprovalAmountMapper.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/NdProjectApprovalAmountMapper.xml create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectApprovalAmountMapper.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectApprovalAmountMapper.xml delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/INdProjectApprovalAmountService.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectApprovalAmountService.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/NdProjectApprovalAmountServiceImpl.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/ProjectApprovalAmountServiceImpl.java diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AmountApprovalManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AmountApprovalManage.java index 9cbdd43..9332ae3 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AmountApprovalManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AmountApprovalManage.java @@ -7,12 +7,10 @@ import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.hz.pm.api.common.exception.ReturnException; import com.hz.pm.api.common.helper.UserInfoHelper; -import com.hz.pm.api.common.model.constant.BizConst; import com.hz.pm.api.common.util.DecimalUtil; import com.hz.pm.api.datascope.model.DataScopeDTO; import com.hz.pm.api.datascope.utils.DataScopeUtil; @@ -26,7 +24,7 @@ import com.hz.pm.api.projectlib.model.req.ProjectListReq; import com.hz.pm.api.projectlib.model.req.SubmitAmountApprovalReq; import com.hz.pm.api.projectlib.model.vo.AmountApprovalProgressStatisticsVO; import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; -import com.hz.pm.api.projectlib.service.INdProjectApprovalAmountService; +import com.hz.pm.api.projectlib.service.IProjectApprovalAmountService; import com.hz.pm.api.projectlib.service.IProjectService; import com.hz.pm.api.user.helper.MhUnitCache; import com.hz.pm.api.user.security.model.UserFullInfoDTO; @@ -35,7 +33,6 @@ import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.util.CollUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.assertj.core.error.ElementsShouldBeExactly; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -58,7 +55,7 @@ import java.util.stream.Collectors; @RequiredArgsConstructor public class AmountApprovalManage { - private final INdProjectApprovalAmountService projectApprovalAmountService; + private final IProjectApprovalAmountService projectApprovalAmountService; private final IProjectService projectService; private final UserInfoHelper userInfoHelper; private final MhUnitCache mhUnitCache; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java index cb82946..d510c04 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java @@ -4,7 +4,6 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; -import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.NumberUtil; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.Wrapper; @@ -15,7 +14,6 @@ import com.github.xiaoymin.knife4j.core.util.StrUtil; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.hz.pm.api.common.compare.CompareUtils; -import com.hz.pm.api.common.enumeration.CommonEnum; import com.hz.pm.api.common.enumeration.ProjectProcessType; import com.hz.pm.api.common.helper.UserInfoHelper; import com.hz.pm.api.common.model.constant.BizConst; @@ -37,7 +35,6 @@ import com.hz.pm.api.filemanage.service.INdProjectApplyBorrowService; import com.hz.pm.api.meeting.entity.domain.MeetingInnerProject; import com.hz.pm.api.meeting.entity.dto.ProjectReviewResultDTO; import com.hz.pm.api.meeting.service.IMeetingInnerProjectService; -import com.hz.pm.api.performance.model.dto.ProjectCoreBusinessDTO; import com.hz.pm.api.performance.model.entity.ProjectCoreBusinessIndicators; import com.hz.pm.api.performance.service.IProjectCoreBusinessIndicatorsService; import com.hz.pm.api.portrait.model.entity.ProjectTag; @@ -150,7 +147,7 @@ public class ProjectLibManage { private final IMhProjectService mhProjectService; private final ProjectReviewManage projectReviewManage; private final IMeetingInnerProjectService meetingInnerProjectService; - private final INdProjectApprovalAmountService projectApprovalAmountService; + private final IProjectApprovalAmountService projectApprovalAmountService; public PageVo projectLibList(ProjectListReq req) { LambdaQueryWrapper query = ProjectManageUtil.projectQuery(req); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/NdProjectApprovalAmountMapper.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/NdProjectApprovalAmountMapper.java deleted file mode 100644 index d55e41f..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/NdProjectApprovalAmountMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.hz.pm.api.projectlib.mapper; - -import com.hz.pm.api.projectlib.entity.ProjectApprovalAmount; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author WendyYang - * @since 2024-10-09 - */ -public interface NdProjectApprovalAmountMapper extends BaseMapper { - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/NdProjectApprovalAmountMapper.xml b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/NdProjectApprovalAmountMapper.xml deleted file mode 100644 index 99467ba..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/NdProjectApprovalAmountMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectApprovalAmountMapper.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectApprovalAmountMapper.java new file mode 100644 index 0000000..2fca3e9 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectApprovalAmountMapper.java @@ -0,0 +1,16 @@ +package com.hz.pm.api.projectlib.mapper; + +import com.hz.pm.api.projectlib.entity.ProjectApprovalAmount; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * Mapper 接口 + *

+ * + * @author WendyYang + * @since 2024-10-09 + */ +public interface ProjectApprovalAmountMapper extends BaseMapper { + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectApprovalAmountMapper.xml b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectApprovalAmountMapper.xml new file mode 100644 index 0000000..cf3e7ad --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectApprovalAmountMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/INdProjectApprovalAmountService.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/INdProjectApprovalAmountService.java deleted file mode 100644 index f7143b0..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/INdProjectApprovalAmountService.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.hz.pm.api.projectlib.service; - -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.service.IService; -import com.hz.pm.api.common.model.constant.BizConst; -import com.hz.pm.api.projectlib.entity.ProjectApprovalAmount; - -import java.util.List; - -/** - *

- * 服务类 - *

- * - * @author WendyYang - * @since 2024-10-09 - */ -public interface INdProjectApprovalAmountService extends IService { - - default ProjectApprovalAmount getByProjectCode(String projectCode) { - Wrapper query = Wrappers.lambdaQuery(ProjectApprovalAmount.class) - .eq(ProjectApprovalAmount::getProjectCode, projectCode) - .orderByDesc(ProjectApprovalAmount::getApprovalYear) - .last(BizConst.LIMIT_1); - return getOne(query); - } - - default List listByProjectCode(String projectCode) { - Wrapper query = Wrappers.lambdaQuery(ProjectApprovalAmount.class) - .eq(ProjectApprovalAmount::getProjectCode, projectCode) - .orderByAsc(ProjectApprovalAmount::getApprovalYear); - return list(query); - } - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectApprovalAmountService.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectApprovalAmountService.java new file mode 100644 index 0000000..8e9e53b --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectApprovalAmountService.java @@ -0,0 +1,36 @@ +package com.hz.pm.api.projectlib.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.IService; +import com.hz.pm.api.common.model.constant.BizConst; +import com.hz.pm.api.projectlib.entity.ProjectApprovalAmount; + +import java.util.List; + +/** + *

+ * 服务类 + *

+ * + * @author WendyYang + * @since 2024-10-09 + */ +public interface IProjectApprovalAmountService extends IService { + + default ProjectApprovalAmount getByProjectCode(String projectCode) { + Wrapper query = Wrappers.lambdaQuery(ProjectApprovalAmount.class) + .eq(ProjectApprovalAmount::getProjectCode, projectCode) + .orderByDesc(ProjectApprovalAmount::getApprovalYear) + .last(BizConst.LIMIT_1); + return getOne(query); + } + + default List listByProjectCode(String projectCode) { + Wrapper query = Wrappers.lambdaQuery(ProjectApprovalAmount.class) + .eq(ProjectApprovalAmount::getProjectCode, projectCode) + .orderByAsc(ProjectApprovalAmount::getApprovalYear); + return list(query); + } + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/NdProjectApprovalAmountServiceImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/NdProjectApprovalAmountServiceImpl.java deleted file mode 100644 index 22af02d..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/NdProjectApprovalAmountServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.hz.pm.api.projectlib.service.impl; - -import com.hz.pm.api.projectlib.entity.ProjectApprovalAmount; -import com.hz.pm.api.projectlib.mapper.NdProjectApprovalAmountMapper; -import com.hz.pm.api.projectlib.service.INdProjectApprovalAmountService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author WendyYang - * @since 2024-10-09 - */ -@Service -public class NdProjectApprovalAmountServiceImpl extends ServiceImpl implements INdProjectApprovalAmountService { - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/ProjectApprovalAmountServiceImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/ProjectApprovalAmountServiceImpl.java new file mode 100644 index 0000000..abcd2b4 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/ProjectApprovalAmountServiceImpl.java @@ -0,0 +1,20 @@ +package com.hz.pm.api.projectlib.service.impl; + +import com.hz.pm.api.projectlib.entity.ProjectApprovalAmount; +import com.hz.pm.api.projectlib.mapper.ProjectApprovalAmountMapper; +import com.hz.pm.api.projectlib.service.IProjectApprovalAmountService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 服务实现类 + *

+ * + * @author WendyYang + * @since 2024-10-09 + */ +@Service +public class ProjectApprovalAmountServiceImpl extends ServiceImpl implements IProjectApprovalAmountService { + +}