@@ -30,14 +30,14 @@ import com.hz.pm.api.projectdeclared.service.*; | |||||
import com.hz.pm.api.projectlib.helper.ProjectHelper; | import com.hz.pm.api.projectlib.helper.ProjectHelper; | ||||
import com.hz.pm.api.projectlib.model.entity.Project; | import com.hz.pm.api.projectlib.model.entity.Project; | ||||
import com.hz.pm.api.projectlib.model.entity.ProjectInst; | import com.hz.pm.api.projectlib.model.entity.ProjectInst; | ||||
import com.hz.pm.api.projectlib.model.entity.ProjectPaymentPlan; | |||||
import com.hz.pm.api.projectlib.model.entity.ProjectAnnualPaymentPlan; | |||||
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; | import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; | ||||
import com.hz.pm.api.projectlib.model.enumeration.ProjectTypeNewEnum; | import com.hz.pm.api.projectlib.model.enumeration.ProjectTypeNewEnum; | ||||
import com.hz.pm.api.projectlib.model.enumeration.TenderStatusEnum; | import com.hz.pm.api.projectlib.model.enumeration.TenderStatusEnum; | ||||
import com.hz.pm.api.projectlib.model.req.ProjectListReq; | import com.hz.pm.api.projectlib.model.req.ProjectListReq; | ||||
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; | import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; | ||||
import com.hz.pm.api.projectlib.service.IProjectInstService; | import com.hz.pm.api.projectlib.service.IProjectInstService; | ||||
import com.hz.pm.api.projectlib.service.IProjectPaymentPlanService; | |||||
import com.hz.pm.api.projectlib.service.IProjectAnnualPaymentPlanService; | |||||
import com.hz.pm.api.projectlib.service.IProjectService; | import com.hz.pm.api.projectlib.service.IProjectService; | ||||
import com.hz.pm.api.user.security.model.UserFullInfoDTO; | import com.hz.pm.api.user.security.model.UserFullInfoDTO; | ||||
import com.hz.pm.api.user.security.model.UserInfoDetails; | import com.hz.pm.api.user.security.model.UserInfoDetails; | ||||
@@ -89,7 +89,7 @@ public class ConstructionManage { | |||||
private final IPreInsAcceptancePersonService acceptancePersonService; | private final IPreInsAcceptancePersonService acceptancePersonService; | ||||
private final ProcessInstanceService processInstanceService; | private final ProcessInstanceService processInstanceService; | ||||
private final StateMachineUtil stateMachineUtil; | private final StateMachineUtil stateMachineUtil; | ||||
private final IProjectPaymentPlanService projectPaymentPlanService; | |||||
private final IProjectAnnualPaymentPlanService projectPaymentPlanService; | |||||
private final TenderStateMachineUtil tenderStateMachineUtil; | private final TenderStateMachineUtil tenderStateMachineUtil; | ||||
/** | /** | ||||
@@ -350,7 +350,7 @@ public class ConstructionManage { | |||||
projectCodes.add(project.getProjectCode()); | projectCodes.add(project.getProjectCode()); | ||||
} | } | ||||
Map<Long, List<ProjectPaymentPlan>> paymentPlansMap = projectPaymentPlanService.listByProjectIds(projectIds); | |||||
Map<Long, List<ProjectAnnualPaymentPlan>> paymentPlansMap = projectPaymentPlanService.listByProjectIds(projectIds); | |||||
List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> { | List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> { | ||||
ProjectLibListItemVO item = new ProjectLibListItemVO(); | ProjectLibListItemVO item = new ProjectLibListItemVO(); | ||||
@@ -371,9 +371,9 @@ public class ConstructionManage { | |||||
item.setApprovalDate(w.getApprovalDate()); | item.setApprovalDate(w.getApprovalDate()); | ||||
item.setDeliveryTime(w.getDeliveryTime()); | item.setDeliveryTime(w.getDeliveryTime()); | ||||
item.setContractAmount(w.getContractAmount()); | item.setContractAmount(w.getContractAmount()); | ||||
List<ProjectPaymentPlan> paymentPlans = paymentPlansMap.getOrDefault(w.getId(), Collections.emptyList()); | |||||
List<ProjectAnnualPaymentPlan> paymentPlans = paymentPlansMap.getOrDefault(w.getId(), Collections.emptyList()); | |||||
BigDecimal totalAnnualAmount = paymentPlans.stream() | BigDecimal totalAnnualAmount = paymentPlans.stream() | ||||
.map(ProjectPaymentPlan::getAnnualPlanAmount) | |||||
.map(ProjectAnnualPaymentPlan::getAnnualPlanAmount) | |||||
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO); | .reduce(BigDecimal::add).orElse(BigDecimal.ZERO); | ||||
item.setAnnualPlanAmount(totalAnnualAmount); | item.setAnnualPlanAmount(totalAnnualAmount); | ||||
item.setTransactionTime(w.getTransactionTime()); | item.setTransactionTime(w.getTransactionTime()); | ||||
@@ -405,7 +405,7 @@ public class ConstructionManage { | |||||
projectIds.add(project.getId()); | projectIds.add(project.getId()); | ||||
} | } | ||||
Map<Long, List<ProjectPaymentPlan>> paymentPlansMap = projectPaymentPlanService.listByProjectIds(projectIds); | |||||
Map<Long, List<ProjectAnnualPaymentPlan>> paymentPlansMap = projectPaymentPlanService.listByProjectIds(projectIds); | |||||
AtomicInteger serialNumber = new AtomicInteger(0); | AtomicInteger serialNumber = new AtomicInteger(0); | ||||
collect = records.stream().map(r -> { | collect = records.stream().map(r -> { | ||||
@@ -419,9 +419,9 @@ public class ConstructionManage { | |||||
exportDTO.setDeliveryTime(r.getDeliveryTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); | exportDTO.setDeliveryTime(r.getDeliveryTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); | ||||
exportDTO.setContractAmount(r.getContractAmount()); | exportDTO.setContractAmount(r.getContractAmount()); | ||||
List<ProjectPaymentPlan> paymentPlans = paymentPlansMap.getOrDefault(r.getId(), Collections.emptyList()); | |||||
List<ProjectAnnualPaymentPlan> paymentPlans = paymentPlansMap.getOrDefault(r.getId(), Collections.emptyList()); | |||||
BigDecimal totalAnnualAmount = paymentPlans.stream() | BigDecimal totalAnnualAmount = paymentPlans.stream() | ||||
.map(ProjectPaymentPlan::getAnnualPlanAmount) | |||||
.map(ProjectAnnualPaymentPlan::getAnnualPlanAmount) | |||||
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO); | .reduce(BigDecimal::add).orElse(BigDecimal.ZERO); | ||||
exportDTO.setAnnualPlanAmount(totalAnnualAmount); | exportDTO.setAnnualPlanAmount(totalAnnualAmount); | ||||
@@ -131,7 +131,7 @@ public class ProjectLibManage { | |||||
private final IPaymentPlanService paymentPlanService; | private final IPaymentPlanService paymentPlanService; | ||||
private final ITodoService todoService; | private final ITodoService todoService; | ||||
private final IProjectCoreBusinessIndicatorsService projectCoreBusinessIndicatorsService; | private final IProjectCoreBusinessIndicatorsService projectCoreBusinessIndicatorsService; | ||||
private final IProjectPaymentPlanService projectPaymentPlanService; | |||||
private final IProjectAnnualPaymentPlanService projectPaymentPlanService; | |||||
private final IOperationService operationService; | private final IOperationService operationService; | ||||
private final IProjectTagService projectTagService; | private final IProjectTagService projectTagService; | ||||
private final ITagService tagService; | private final ITagService tagService; | ||||
@@ -158,7 +158,7 @@ public class ProjectLibManage { | |||||
projectCodes.add(project.getProjectCode()); | projectCodes.add(project.getProjectCode()); | ||||
} | } | ||||
Map<Long, List<ProjectRenewalFundDeclaration>> renewalMap = listRenewDeclarations(projectCodes); | Map<Long, List<ProjectRenewalFundDeclaration>> renewalMap = listRenewDeclarations(projectCodes); | ||||
Map<Long, List<ProjectPaymentPlan>> paymentPlansMap = projectPaymentPlanService.listByProjectIds(projectIds); | |||||
Map<Long, List<ProjectAnnualPaymentPlan>> paymentPlansMap = projectPaymentPlanService.listByProjectIds(projectIds); | |||||
List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> { | List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> { | ||||
ProjectLibListItemVO item = new ProjectLibListItemVO(); | ProjectLibListItemVO item = new ProjectLibListItemVO(); | ||||
@@ -178,9 +178,9 @@ public class ProjectLibManage { | |||||
item.setProcessStatus(w.getProcessStatus()); | item.setProcessStatus(w.getProcessStatus()); | ||||
item.setInstCode(w.getInstCode()); | item.setInstCode(w.getInstCode()); | ||||
item.setIsHigherSuperOrg(w.getIsHigherSuperOrg()); | item.setIsHigherSuperOrg(w.getIsHigherSuperOrg()); | ||||
List<ProjectPaymentPlan> paymentPlans = paymentPlansMap.getOrDefault(w.getId(), Collections.emptyList()); | |||||
List<ProjectAnnualPaymentPlan> paymentPlans = paymentPlansMap.getOrDefault(w.getId(), Collections.emptyList()); | |||||
BigDecimal totalAnnualPaymentAmount = paymentPlans.stream() | BigDecimal totalAnnualPaymentAmount = paymentPlans.stream() | ||||
.map(ProjectPaymentPlan::getAnnualPlanAmount) | |||||
.map(ProjectAnnualPaymentPlan::getAnnualPlanAmount) | |||||
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO); | .reduce(BigDecimal::add).orElse(BigDecimal.ZERO); | ||||
List<ProjectRenewalFundDeclaration> fundDeclarations = renewalMap.get(w.getId()); | List<ProjectRenewalFundDeclaration> fundDeclarations = renewalMap.get(w.getId()); | ||||
@@ -214,7 +214,7 @@ public class ProjectLibManage { | |||||
projectCodes.add(project.getProjectCode()); | projectCodes.add(project.getProjectCode()); | ||||
} | } | ||||
Map<String, List<TagVO>> projectTagMap = getProjectTags(projectCodes); | Map<String, List<TagVO>> projectTagMap = getProjectTags(projectCodes); | ||||
Map<Long, List<ProjectPaymentPlan>> paymentPlansMap = projectPaymentPlanService.listByProjectIds(projectIds); | |||||
Map<Long, List<ProjectAnnualPaymentPlan>> paymentPlansMap = projectPaymentPlanService.listByProjectIds(projectIds); | |||||
Map<Long, List<ProjectRenewalFundDeclaration>> renewalMap = listRenewDeclarations(projectCodes); | Map<Long, List<ProjectRenewalFundDeclaration>> renewalMap = listRenewDeclarations(projectCodes); | ||||
List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> { | List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> { | ||||
@@ -241,9 +241,9 @@ public class ProjectLibManage { | |||||
item.setCanPreDeclared(Boolean.TRUE); | item.setCanPreDeclared(Boolean.TRUE); | ||||
} | } | ||||
item.setApprovedAmount(w.getApprovalAmount()); | item.setApprovedAmount(w.getApprovalAmount()); | ||||
List<ProjectPaymentPlan> paymentPlans = paymentPlansMap.getOrDefault(w.getId(), Collections.emptyList()); | |||||
List<ProjectAnnualPaymentPlan> paymentPlans = paymentPlansMap.getOrDefault(w.getId(), Collections.emptyList()); | |||||
BigDecimal totalAnnualPaymentAmount = paymentPlans.stream() | BigDecimal totalAnnualPaymentAmount = paymentPlans.stream() | ||||
.map(ProjectPaymentPlan::getAnnualPlanAmount) | |||||
.map(ProjectAnnualPaymentPlan::getAnnualPlanAmount) | |||||
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO); | .reduce(BigDecimal::add).orElse(BigDecimal.ZERO); | ||||
item.setAnnualPlanAmount(totalAnnualPaymentAmount); | item.setAnnualPlanAmount(totalAnnualPaymentAmount); | ||||
item.setPrePlanProjectId(w.getPrePlanProjectId()); | item.setPrePlanProjectId(w.getPrePlanProjectId()); | ||||
@@ -695,7 +695,7 @@ public class ProjectLibManage { | |||||
List<ContractVO> contracts = constructionManage.detailContractByProjectId(projectInfo.getId()); | List<ContractVO> contracts = constructionManage.detailContractByProjectId(projectInfo.getId()); | ||||
vo.setContract(contracts); | vo.setContract(contracts); | ||||
List<ProjectPaymentPlan> paymentPlans = projectPaymentPlanService.listByProjectId(projectInfo.getId()); | |||||
List<ProjectAnnualPaymentPlan> paymentPlans = projectPaymentPlanService.listByProjectId(projectInfo.getId()); | |||||
vo.setAnnualPaymentPlans(BeanUtil.copyToList(paymentPlans, ProjectPaymentPlanDTO.class)); | vo.setAnnualPaymentPlans(BeanUtil.copyToList(paymentPlans, ProjectPaymentPlanDTO.class)); | ||||
//查询实施信息 | //查询实施信息 | ||||
@@ -882,8 +882,8 @@ public class ProjectLibManage { | |||||
private void savePaymentPlans(Project project, List<ProjectPaymentPlanDTO> paymentPlans) { | private void savePaymentPlans(Project project, List<ProjectPaymentPlanDTO> paymentPlans) { | ||||
Integer version = Objects.nonNull(project.getVersion()) ? project.getVersion() : 1; | Integer version = Objects.nonNull(project.getVersion()) ? project.getVersion() : 1; | ||||
projectPaymentPlanService.remove(project.getProjectCode(), version); | projectPaymentPlanService.remove(project.getProjectCode(), version); | ||||
List<ProjectPaymentPlan> plans = paymentPlans.stream().map(w -> { | |||||
ProjectPaymentPlan plan = BeanUtil.copyProperties(w, ProjectPaymentPlan.class); | |||||
List<ProjectAnnualPaymentPlan> plans = paymentPlans.stream().map(w -> { | |||||
ProjectAnnualPaymentPlan plan = BeanUtil.copyProperties(w, ProjectAnnualPaymentPlan.class); | |||||
plan.setProjectCode(project.getProjectCode()); | plan.setProjectCode(project.getProjectCode()); | ||||
plan.setProjectVersion(version); | plan.setProjectVersion(version); | ||||
return plan; | return plan; | ||||
@@ -8,9 +8,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
import com.google.common.collect.Lists; | import com.google.common.collect.Lists; | ||||
import com.google.common.collect.Maps; | |||||
import com.hz.pm.api.projectlib.model.entity.ProjectPaymentPlan; | |||||
import com.hz.pm.api.projectlib.service.IProjectPaymentPlanService; | |||||
import com.hz.pm.api.projectlib.model.entity.ProjectAnnualPaymentPlan; | |||||
import com.hz.pm.api.projectlib.service.IProjectAnnualPaymentPlanService; | |||||
import com.hz.pm.api.user.security.model.UserInfoDetails; | import com.hz.pm.api.user.security.model.UserInfoDetails; | ||||
import com.hz.pm.api.user.util.LoginUserUtil; | import com.hz.pm.api.user.util.LoginUserUtil; | ||||
import com.ningdatech.basic.exception.BizException; | import com.ningdatech.basic.exception.BizException; | ||||
@@ -20,8 +19,6 @@ import com.ningdatech.basic.util.CollUtils; | |||||
import com.ningdatech.basic.util.NdDateUtils; | import com.ningdatech.basic.util.NdDateUtils; | ||||
import com.hz.pm.api.common.model.constant.BizConst; | import com.hz.pm.api.common.model.constant.BizConst; | ||||
import com.hz.pm.api.common.model.constant.CommonConst; | import com.hz.pm.api.common.model.constant.CommonConst; | ||||
import com.hz.pm.api.common.model.constant.RegionConst; | |||||
import com.hz.pm.api.common.helper.RegionCacheHelper; | |||||
import com.hz.pm.api.common.util.ExcelDownUtil; | import com.hz.pm.api.common.util.ExcelDownUtil; | ||||
import com.hz.pm.api.common.util.ExcelExportStyle; | import com.hz.pm.api.common.util.ExcelExportStyle; | ||||
import com.hz.pm.api.datascope.model.DataScopeDTO; | import com.hz.pm.api.datascope.model.DataScopeDTO; | ||||
@@ -94,7 +91,7 @@ public class ProjectRenewalFundManage { | |||||
private final IGovBizProjectApproveService approveService; | private final IGovBizProjectApproveService approveService; | ||||
private final IPaymentPlanService paymentPlanService; | private final IPaymentPlanService paymentPlanService; | ||||
private final IProjectPaymentPlanService projectPaymentPlanService; | |||||
private final IProjectAnnualPaymentPlanService projectPaymentPlanService; | |||||
/** | /** | ||||
* 项目续建资金库列表 分页 | * 项目续建资金库列表 分页 | ||||
@@ -139,7 +136,7 @@ public class ProjectRenewalFundManage { | |||||
projectCodes.add(project.getProjectCode()); | projectCodes.add(project.getProjectCode()); | ||||
} | } | ||||
Map<Long, List<ProjectPaymentPlan>> paymentPlansMap = projectPaymentPlanService.listByProjectIds(projectIds); | |||||
Map<Long, List<ProjectAnnualPaymentPlan>> paymentPlansMap = projectPaymentPlanService.listByProjectIds(projectIds); | |||||
Map<Long, List<ProjectRenewalFundDeclaration>> renewalMap; | Map<Long, List<ProjectRenewalFundDeclaration>> renewalMap; | ||||
if (CollUtil.isNotEmpty(projectCodes)) { | if (CollUtil.isNotEmpty(projectCodes)) { | ||||
@@ -180,9 +177,9 @@ public class ProjectRenewalFundManage { | |||||
item.setCanPreDeclared(Boolean.TRUE); | item.setCanPreDeclared(Boolean.TRUE); | ||||
} | } | ||||
item.setApprovedAmount(w.getApprovalAmount()); | item.setApprovedAmount(w.getApprovalAmount()); | ||||
List<ProjectPaymentPlan> paymentPlans = paymentPlansMap.getOrDefault(w.getId(), Collections.emptyList()); | |||||
List<ProjectAnnualPaymentPlan> paymentPlans = paymentPlansMap.getOrDefault(w.getId(), Collections.emptyList()); | |||||
BigDecimal totalAnnualPaymentAmount = paymentPlans.stream() | BigDecimal totalAnnualPaymentAmount = paymentPlans.stream() | ||||
.map(ProjectPaymentPlan::getAnnualPlanAmount) | |||||
.map(ProjectAnnualPaymentPlan::getAnnualPlanAmount) | |||||
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO); | .reduce(BigDecimal::add).orElse(BigDecimal.ZERO); | ||||
item.setAnnualPlanAmount(totalAnnualPaymentAmount); | item.setAnnualPlanAmount(totalAnnualPaymentAmount); | ||||
@@ -237,10 +234,10 @@ public class ProjectRenewalFundManage { | |||||
vo.setAnnualPaymentAmount(renewal.getAnnualPaymentAmount()); | vo.setAnnualPaymentAmount(renewal.getAnnualPaymentAmount()); | ||||
List<AnnualAmountVO> annualAmounts = Lists.newArrayList(); | List<AnnualAmountVO> annualAmounts = Lists.newArrayList(); | ||||
List<ProjectPaymentPlan> paymentPlans = projectPaymentPlanService.listByProjectId(project.getId()); | |||||
List<ProjectAnnualPaymentPlan> paymentPlans = projectPaymentPlanService.listByProjectId(project.getId()); | |||||
BigDecimal totalAnnualPaymentAmount = paymentPlans.stream() | BigDecimal totalAnnualPaymentAmount = paymentPlans.stream() | ||||
.map(ProjectPaymentPlan::getAnnualPlanAmount) | |||||
.map(ProjectAnnualPaymentPlan::getAnnualPlanAmount) | |||||
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO); | .reduce(BigDecimal::add).orElse(BigDecimal.ZERO); | ||||
annualAmounts.add(AnnualAmountVO.builder() | annualAmounts.add(AnnualAmountVO.builder() | ||||
@@ -1,6 +1,6 @@ | |||||
package com.hz.pm.api.projectlib.mapper; | package com.hz.pm.api.projectlib.mapper; | ||||
import com.hz.pm.api.projectlib.model.entity.ProjectPaymentPlan; | |||||
import com.hz.pm.api.projectlib.model.entity.ProjectAnnualPaymentPlan; | |||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
/** | /** | ||||
@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
* @author WendyYang | * @author WendyYang | ||||
* @since 2024-02-21 | * @since 2024-02-21 | ||||
*/ | */ | ||||
public interface ProjectPaymentPlanMapper extends BaseMapper<ProjectPaymentPlan> { | |||||
public interface ProjectAnnualPaymentPlanMapper extends BaseMapper<ProjectAnnualPaymentPlan> { | |||||
} | } |
@@ -1,5 +1,5 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||
<mapper namespace="com.hz.pm.api.projectlib.mapper.ProjectPaymentPlanMapper"> | |||||
<mapper namespace="com.hz.pm.api.projectlib.mapper.ProjectAnnualPaymentPlanMapper"> | |||||
</mapper> | </mapper> |
@@ -19,9 +19,9 @@ import java.math.BigDecimal; | |||||
* @since 2024-02-21 | * @since 2024-02-21 | ||||
*/ | */ | ||||
@Data | @Data | ||||
@TableName("ND_PROJECT_PAYMENT_PLAN") | |||||
@TableName("ND_PROJECT_ANNUAL_PAYMENT_PLAN") | |||||
@ApiModel(value = "NdProjectPaymentPlan对象") | @ApiModel(value = "NdProjectPaymentPlan对象") | ||||
public class ProjectPaymentPlan implements Serializable { | |||||
public class ProjectAnnualPaymentPlan implements Serializable { | |||||
private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
@@ -0,0 +1,43 @@ | |||||
package com.hz.pm.api.projectlib.service; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | |||||
import com.hz.pm.api.projectlib.model.entity.ProjectAnnualPaymentPlan; | |||||
import com.ningdatech.basic.util.CollUtils; | |||||
import java.util.Collection; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
/** | |||||
* <p> | |||||
* 年度支付计划-服务类 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-02-21 | |||||
*/ | |||||
public interface IProjectAnnualPaymentPlanService extends IService<ProjectAnnualPaymentPlan> { | |||||
default void remove(String projectCode, Integer projectVersion) { | |||||
remove(Wrappers.lambdaQuery(ProjectAnnualPaymentPlan.class) | |||||
.eq(ProjectAnnualPaymentPlan::getProjectCode, projectCode) | |||||
.eq(ProjectAnnualPaymentPlan::getProjectVersion, projectVersion)); | |||||
} | |||||
default Map<Long, List<ProjectAnnualPaymentPlan>> listByProjectIds(Collection<Long> projectIds) { | |||||
LambdaQueryWrapper<ProjectAnnualPaymentPlan> query = Wrappers.lambdaQuery(ProjectAnnualPaymentPlan.class) | |||||
.in(ProjectAnnualPaymentPlan::getProjectId, projectIds) | |||||
.orderByAsc(ProjectAnnualPaymentPlan::getPaymentYear); | |||||
return CollUtils.group(list(query), ProjectAnnualPaymentPlan::getProjectId); | |||||
} | |||||
default List<ProjectAnnualPaymentPlan> listByProjectId(Long projectId) { | |||||
LambdaQueryWrapper<ProjectAnnualPaymentPlan> query = Wrappers.lambdaQuery(ProjectAnnualPaymentPlan.class) | |||||
.eq(ProjectAnnualPaymentPlan::getProjectId, projectId) | |||||
.orderByAsc(ProjectAnnualPaymentPlan::getPaymentYear); | |||||
return list(query); | |||||
} | |||||
} |
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.hz.pm.api.projectlib.model.entity.Project; | import com.hz.pm.api.projectlib.model.entity.Project; | ||||
import com.hz.pm.api.projectlib.model.entity.ProjectApplication; | import com.hz.pm.api.projectlib.model.entity.ProjectApplication; | ||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import com.hz.pm.api.projectlib.model.entity.ProjectPaymentPlan; | |||||
import java.util.List; | import java.util.List; | ||||
@@ -1,44 +0,0 @@ | |||||
package com.hz.pm.api.projectlib.service; | |||||
import cn.hutool.core.collection.CollUtil; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | |||||
import com.hz.pm.api.projectlib.model.entity.ProjectPaymentPlan; | |||||
import com.ningdatech.basic.util.CollUtils; | |||||
import java.util.Collection; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
/** | |||||
* <p> | |||||
* 服务类 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-02-21 | |||||
*/ | |||||
public interface IProjectPaymentPlanService extends IService<ProjectPaymentPlan> { | |||||
default void remove(String projectCode, Integer projectVersion) { | |||||
remove(Wrappers.lambdaQuery(ProjectPaymentPlan.class) | |||||
.eq(ProjectPaymentPlan::getProjectCode, projectCode) | |||||
.eq(ProjectPaymentPlan::getProjectVersion, projectVersion)); | |||||
} | |||||
default Map<Long, List<ProjectPaymentPlan>> listByProjectIds(Collection<Long> projectIds) { | |||||
LambdaQueryWrapper<ProjectPaymentPlan> query = Wrappers.lambdaQuery(ProjectPaymentPlan.class) | |||||
.in(ProjectPaymentPlan::getProjectId, projectIds) | |||||
.orderByAsc(ProjectPaymentPlan::getPaymentYear); | |||||
return CollUtils.group(list(query), ProjectPaymentPlan::getProjectId); | |||||
} | |||||
default List<ProjectPaymentPlan> listByProjectId(Long projectId) { | |||||
LambdaQueryWrapper<ProjectPaymentPlan> query = Wrappers.lambdaQuery(ProjectPaymentPlan.class) | |||||
.eq(ProjectPaymentPlan::getProjectId, projectId) | |||||
.orderByAsc(ProjectPaymentPlan::getPaymentYear); | |||||
return list(query); | |||||
} | |||||
} |
@@ -0,0 +1,20 @@ | |||||
package com.hz.pm.api.projectlib.service.impl; | |||||
import com.hz.pm.api.projectlib.model.entity.ProjectAnnualPaymentPlan; | |||||
import com.hz.pm.api.projectlib.mapper.ProjectAnnualPaymentPlanMapper; | |||||
import com.hz.pm.api.projectlib.service.IProjectAnnualPaymentPlanService; | |||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* <p> | |||||
* 服务实现类 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-02-21 | |||||
*/ | |||||
@Service | |||||
public class ProjectAnnualPaymentPlanServiceImpl extends ServiceImpl<ProjectAnnualPaymentPlanMapper, ProjectAnnualPaymentPlan> implements IProjectAnnualPaymentPlanService { | |||||
} |
@@ -1,20 +0,0 @@ | |||||
package com.hz.pm.api.projectlib.service.impl; | |||||
import com.hz.pm.api.projectlib.model.entity.ProjectPaymentPlan; | |||||
import com.hz.pm.api.projectlib.mapper.ProjectPaymentPlanMapper; | |||||
import com.hz.pm.api.projectlib.service.IProjectPaymentPlanService; | |||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* <p> | |||||
* 服务实现类 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-02-21 | |||||
*/ | |||||
@Service | |||||
public class ProjectPaymentPlanServiceImpl extends ServiceImpl<ProjectPaymentPlanMapper, ProjectPaymentPlan> implements IProjectPaymentPlanService { | |||||
} |