diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DeclaredProjectManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DeclaredProjectManage.java
index da9c266..96cf9ef 100644
--- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DeclaredProjectManage.java
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DeclaredProjectManage.java
@@ -3,6 +3,7 @@ package com.hz.pm.api.projectdeclared.manage;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
@@ -13,6 +14,7 @@ import com.baomidou.mybatisplus.core.toolkit.Assert;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
+import com.hz.pm.api.projectlib.model.dto.ProjectPaymentPlanDTO;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo;
@@ -295,6 +297,9 @@ public class DeclaredProjectManage {
if (StrUtil.isNotBlank(draft.getProjectApplicationList())) {
vo.setApplicationList(JSON.parseArray(draft.getProjectApplicationList(), ProjectApplication.class));
}
+ if (StrUtil.isNotBlank(draft.getPaymentPlans())) {
+ vo.setPaymentPlanList(JSONUtil.toList(draft.getPaymentPlans(), ProjectPaymentPlanDTO.class));
+ }
if (StrUtil.isNotBlank(draft.getDynamicForm())) {
vo.setDynamicForm(JSON.parseObject(draft.getDynamicForm(), Map.class));
}
@@ -324,6 +329,9 @@ public class DeclaredProjectManage {
if (CollUtil.isNotEmpty(projectInfo.getDynamicForm())) {
draft.setDynamicForm(JSON.toJSONString(projectInfo.getDynamicForm()));
}
+ if (CollUtil.isNotEmpty(projectInfo.getPaymentPlanList())) {
+ draft.setPaymentPlans(JSON.toJSONString(projectInfo.getPaymentPlanList()));
+ }
if (CollUtil.isNotEmpty(projectInfo.getApplicationList())) {
draft.setProjectApplicationList(JSON.toJSONString(projectInfo.getApplicationList()));
}
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DefaultDeclaredProjectManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DefaultDeclaredProjectManage.java
index 5c79d5e..7b86b3a 100644
--- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DefaultDeclaredProjectManage.java
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DefaultDeclaredProjectManage.java
@@ -1,5 +1,6 @@
package com.hz.pm.api.projectdeclared.manage;
+import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Assert;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
@@ -14,6 +15,7 @@ import com.hz.pm.api.projectdeclared.model.dto.ProjectConditionDTO;
import com.hz.pm.api.projectdeclared.model.po.DeclaredProjectStatisticsPO;
import com.hz.pm.api.projectdeclared.service.IDeclaredStatisticsService;
import com.hz.pm.api.projectlib.model.dto.ProjectDTO;
+import com.hz.pm.api.projectlib.model.dto.ProjectPaymentPlanDTO;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.service.IProjectService;
import com.hz.pm.api.user.security.model.UserFullInfoDTO;
@@ -107,23 +109,23 @@ public class DefaultDeclaredProjectManage {
.throwMessage(String.format("申报失败! 申报总金额【%s】 不等于其它申报金额 【%s】", declareAmount, totalAmount));
//判断 年度计划金额 如果开着的话
- if (Objects.nonNull(projectInfo.getAnnualPlanAmount())) {
- BigDecimal annualPlanAmount = projectInfo.getAnnualPlanAmount();
-
- VUtils.isTrue(annualPlanAmount.compareTo(BigDecimal.ZERO) <= 0)
- .throwMessage(String.format("申报失败! 年度支付总金额【%s】 不能小于等于0", annualPlanAmount));
- VUtils.isTrue(annualPlanAmount.compareTo(declareAmount) > 0)
- .throwMessage(String.format("申报失败! 年度支付总金额【%s】 不能大于申报金额 【%s】", annualPlanAmount, declareAmount));
-
- BigDecimal annualGovSuperAmount = projectInfo.getAnnualPlanGovSuperiorFinanceAmount();
- BigDecimal annualOwnSuperAmount = projectInfo.getAnnualPlanGovOwnFinanceAmount();
- BigDecimal annualBankLendingAmount = projectInfo.getAnnualPlanBankLendingAmount();
- BigDecimal annualHaveAmount = projectInfo.getAnnualPlanHaveAmount();
- BigDecimal annualOtherAmount = projectInfo.getAnnualPlanOtherAmount();
- BigDecimal totalAnnual = annualGovSuperAmount
- .add(annualOwnSuperAmount).add(annualBankLendingAmount).add(annualHaveAmount).add(annualOtherAmount);
- VUtils.isTrue(annualPlanAmount.compareTo(totalAnnual) != 0)
- .throwMessage(String.format("申报失败! 年度支付总金额【%s】 不等于其它年度支付金额 【%s】", annualPlanAmount, totalAnnual));
+ if (CollUtil.isNotEmpty(projectInfo.getPaymentPlanList())) {
+ for (ProjectPaymentPlanDTO paymentPlan : projectInfo.getPaymentPlanList()) {
+ BigDecimal annualPlanAmount = paymentPlan.getAnnualPlanAmount();
+
+ VUtils.isTrue(annualPlanAmount.compareTo(BigDecimal.ZERO) <= 0)
+ .throwMessage(String.format("申报失败! 年度支付总金额【%s】 不能小于等于0", annualPlanAmount));
+ VUtils.isTrue(annualPlanAmount.compareTo(declareAmount) > 0)
+ .throwMessage(String.format("申报失败! 年度支付总金额【%s】 不能大于申报金额 【%s】", annualPlanAmount, declareAmount));
+
+ BigDecimal annualGovSuperAmount = paymentPlan.getAnnualPlanGovSuperiorFinanceAmount();
+ BigDecimal annualOwnSuperAmount = paymentPlan.getAnnualPlanGovOwnFinanceAmount();
+ BigDecimal annualHaveAmount = paymentPlan.getAnnualPlanHaveAmount();
+ BigDecimal totalAnnual = annualGovSuperAmount.add(annualOwnSuperAmount).add(annualHaveAmount);
+ VUtils.isTrue(annualPlanAmount.compareTo(totalAnnual) != 0)
+ .throwMessage(String.format("申报失败! 年度支付总金额【%s】 不等于其它年度支付金额 【%s】", annualPlanAmount, totalAnnual));
+
+ }
}
}
}
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/ProjectDraft.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/ProjectDraft.java
index 86ebcbb..b93acc9 100644
--- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/ProjectDraft.java
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/ProjectDraft.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hz.pm.api.common.compare.Compare;
+import com.hz.pm.api.projectlib.model.dto.ProjectPaymentPlanDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
@@ -14,6 +15,7 @@ import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
+import java.util.List;
/**
*
@@ -181,23 +183,8 @@ public class ProjectDraft implements Serializable {
@ApiModelProperty("资金分配情况-第三方服务(万元)")
private BigDecimal thirdPartyAmount;
- @ApiModelProperty("年度支付计划-年度支付计划(万元)")
- private BigDecimal annualPlanAmount;
-
- @ApiModelProperty("年度支付计划-自有金额(万元)")
- private BigDecimal annualPlanHaveAmount;
-
- @ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)")
- private BigDecimal annualPlanGovOwnFinanceAmount;
-
- @ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)")
- private BigDecimal annualPlanGovSuperiorFinanceAmount;
-
- @ApiModelProperty("年度支付计划-银行贷款(万元)")
- private BigDecimal annualPlanBankLendingAmount;
-
- @ApiModelProperty("年度支付计划-其它资金(万元)")
- private BigDecimal annualPlanOtherAmount;
+ @ApiModelProperty("年度支付计划")
+ private String paymentPlans;
@ApiModelProperty("立项批复资金(万元)")
private BigDecimal approvalAmount;
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ProjectDraftVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ProjectDraftVO.java
index 41d99c6..b2d80ed 100644
--- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ProjectDraftVO.java
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ProjectDraftVO.java
@@ -3,6 +3,7 @@ package com.hz.pm.api.projectdeclared.model.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.hz.pm.api.common.compare.Compare;
+import com.hz.pm.api.projectlib.model.dto.ProjectPaymentPlanDTO;
import com.hz.pm.api.projectlib.model.entity.ProjectApplication;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -356,7 +357,11 @@ public class ProjectDraftVO implements Serializable {
@ApiModelProperty("评审清单")
private String reviewChecklist;
+ @ApiModelProperty("支付计划")
+ private List paymentPlanList;
+
private Long createBy;
+
private Long updateBy;
@ApiModelProperty("是否推送省里")
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/NdProjectPaymentPlanController.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/NdProjectPaymentPlanController.java
new file mode 100644
index 0000000..9baaacd
--- /dev/null
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/NdProjectPaymentPlanController.java
@@ -0,0 +1,18 @@
+package com.hz.pm.api.projectlib.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.stereotype.Controller;
+
+/**
+ *
+ * 前端控制器
+ *
+ *
+ * @author WendyYang
+ * @since 2024-02-21
+ */
+@Controller
+@RequestMapping("/api.projectlib/ndProjectPaymentPlan")
+public class NdProjectPaymentPlanController {
+
+}
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 576e4be..69b2350 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
@@ -49,6 +49,7 @@ import com.hz.pm.api.projectlib.handle.ProcessExecuteChainHandle;
import com.hz.pm.api.projectlib.helper.ProjectHelper;
import com.hz.pm.api.projectlib.model.constant.ProjectConstant;
import com.hz.pm.api.projectlib.model.dto.ProjectDTO;
+import com.hz.pm.api.projectlib.model.dto.ProjectPaymentPlanDTO;
import com.hz.pm.api.projectlib.model.entity.*;
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum;
import com.hz.pm.api.projectlib.model.enumeration.ProjectRenewalApprovalStatusEnum;
@@ -126,22 +127,15 @@ public class ProjectLibManage {
private final IPaymentPlanService paymentPlanService;
private final ITodoService todoService;
private final IProjectCoreBusinessIndicatorsService projectCoreBusinessIndicatorsService;
-
+ private final IProjectPaymentPlanService projectPaymentPlanService;
private final IOperationService operationService;
-
private final IProjectTagService projectTagService;
private final ITagService tagService;
-
private final ISupplierSafetyQualificationService supplierSafetyQualificationService;
-
private final IPersonSafetyInfoService personSafetyInfoService;
-
private final ApplicationHandler applicationHandler;
-
private final TaskService taskService;
-
private final UserInfoHelper userInfoHelper;
-
private final IExpertReviewService expertReviewService;
public PageVo projectLibList(ProjectListReq req) {
@@ -873,6 +867,7 @@ public class ProjectLibManage {
project.setProjectCode(projectCode);
if (projectService.save(project)) {
saveApplication(projectDto, project, null);
+ savePaymentPlans(project, projectDto.getPaymentPlanList());
}
} else {
//否则是重新提交的 新生成一个新版本的项目
@@ -890,6 +885,18 @@ public class ProjectLibManage {
}
}
+ private void savePaymentPlans(Project project, List paymentPlans) {
+ Integer version = Objects.nonNull(project.getVersion()) ? project.getVersion() : 1;
+ projectPaymentPlanService.remove(project.getProjectCode(), version);
+ List plans = paymentPlans.stream().map(w -> {
+ ProjectPaymentPlan plan = BeanUtil.copyProperties(w, ProjectPaymentPlan.class);
+ plan.setProjectCode(project.getProjectCode());
+ plan.setProjectVersion(version);
+ return plan;
+ }).collect(Collectors.toList());
+ projectPaymentPlanService.saveBatch(plans);
+ }
+
/**
* 建设方案申报项目时 保存项目信息和其它相关联的信息
*
@@ -992,7 +999,7 @@ public class ProjectLibManage {
projectService.updateById(oldProject);
projectService.reverseNewest(project.getProjectCode(), project.getId());
saveApplication(projecDto, project, isContruct);
-
+ savePaymentPlans(project, projecDto.getPaymentPlanList());
return project;
}
@@ -1543,29 +1550,21 @@ public class ProjectLibManage {
//采取批量删除 批量添加的方式
Integer version = Objects.nonNull(project.getVersion()) ? project.getVersion() : 1;
//删除当前版本的app 一般情况是没有 保险起见
- List applications = projectApplicationService.list(Wrappers.lambdaQuery(ProjectApplication.class)
- .eq(ProjectApplication::getProjectCode, project.getProjectCode())
- .eq(ProjectApplication::getProjectVersion, version));
- if (CollUtil.isNotEmpty(applications)) {
- projectApplicationService.removeBatchByIds(applications);
- }
-
+ projectApplicationService.remove(project.getProjectCode(), version);
if (isApp && CollUtil.isNotEmpty(projectDto.getApplicationList())) {
- Project finalProject = project;
projectDto.getApplicationList().forEach(application -> {
ProjectApplication projectApplication = new ProjectApplication();
BeanUtils.copyProperties(application, projectApplication);
projectApplication.setId(null);
- projectApplication.setProjectId(finalProject.getId());
- projectApplication.setProjectCode(finalProject.getProjectCode());
- projectApplication.setBuildOrgCode(finalProject.getBuildOrgCode());
- projectApplication.setBuildOrgName(finalProject.getBuildOrgName());
+ projectApplication.setProjectId(project.getId());
+ projectApplication.setProjectCode(project.getProjectCode());
+ projectApplication.setBuildOrgCode(project.getBuildOrgCode());
+ projectApplication.setBuildOrgName(project.getBuildOrgName());
projectApplication.setProjectVersion(version);
projectApplication.setIsConstruct(isConstruct);
if (StringUtils.isNotBlank(application.getRelatedExistsApplication())) {
projectApplication.setApplicationName(null);
}
-
boolean result = projectApplicationService.save(projectApplication);
// 保存应用关联的核心业务
List coreBusinessList = application.getCoreBusinessList();
@@ -1588,8 +1587,8 @@ public class ProjectLibManage {
/**
* 申报项目转化为 项目归集
*
- * @param projectCode
- * @return
+ * @param projectCode \
+ * @return \
*/
public GovBizProjectDetailVO convertToCollection(String projectCode) {
ProjectDetailVO projectDetailVO = this.detailProjectCode(projectCode);
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectPaymentPlanMapper.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectPaymentPlanMapper.java
new file mode 100644
index 0000000..c592f7c
--- /dev/null
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectPaymentPlanMapper.java
@@ -0,0 +1,16 @@
+package com.hz.pm.api.projectlib.mapper;
+
+import com.hz.pm.api.projectlib.model.entity.ProjectPaymentPlan;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ *
+ * Mapper 接口
+ *
+ *
+ * @author WendyYang
+ * @since 2024-02-21
+ */
+public interface ProjectPaymentPlanMapper extends BaseMapper {
+
+}
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectPaymentPlanMapper.xml b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectPaymentPlanMapper.xml
new file mode 100644
index 0000000..6346f93
--- /dev/null
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectPaymentPlanMapper.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java
index cfcbf65..1952ac2 100644
--- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java
@@ -21,7 +21,7 @@ import java.util.Map;
* @since 2023-02-03
*/
@Data
-@ApiModel(value = "NdProjectDto", description = "")
+@ApiModel(value = "NdProjectDto")
public class ProjectDTO implements Serializable {
private static final long serialVersionUID = 1L;
@@ -176,28 +176,13 @@ public class ProjectDTO implements Serializable {
@ApiModelProperty("资金分配情况-第三方服务(万元)")
private BigDecimal thirdPartyAmount;
- @ApiModelProperty("年度支付计划-年度支付计划(万元)")
- private BigDecimal annualPlanAmount;
-
- @ApiModelProperty("年度支付计划-自有金额(万元)")
- private BigDecimal annualPlanHaveAmount;
-
- @ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)")
- private BigDecimal annualPlanGovOwnFinanceAmount;
-
- @ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)")
- private BigDecimal annualPlanGovSuperiorFinanceAmount;
-
- @ApiModelProperty("年度支付计划-银行贷款(万元)")
- private BigDecimal annualPlanBankLendingAmount;
-
- @ApiModelProperty("年度支付计划-其它资金(万元)")
- private BigDecimal annualPlanOtherAmount;
+ @ApiModelProperty("年度支付计划")
+ private List paymentPlanList;
@ApiModelProperty("立项批复资金(万元)")
private BigDecimal approvalAmount;
- @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime annualPlanAddTime;
@ApiModelProperty("核心业务-核心业务模块")
@@ -326,7 +311,7 @@ public class ProjectDTO implements Serializable {
@ApiModelProperty("终验材料")
private String finalAcceptanceMaterials;
- private Map dynamicForm;
+ private Map dynamicForm;
//P省级,M市级,C县(市、区)级,T乡镇(街道、办事处)级,V村(社区)级
private String baseLowestLevel;
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectPaymentPlanDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectPaymentPlanDTO.java
new file mode 100644
index 0000000..c2699c3
--- /dev/null
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectPaymentPlanDTO.java
@@ -0,0 +1,37 @@
+package com.hz.pm.api.projectlib.model.dto;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ *
+ * ProjectPaymentPlanDTO
+ *
+ *
+ * @author WendyYang
+ * @since 11:36 2024/2/21
+ */
+@Data
+@ApiModel("年度支付计划")
+public class ProjectPaymentPlanDTO {
+
+ @ApiModelProperty("支付年度")
+ private Integer paymentYear;
+
+ @ApiModelProperty("年度支付计划-年度支付计划(万元)")
+ private BigDecimal annualPlanAmount;
+
+ @ApiModelProperty("年度支付计划-自有金额(万元)")
+ private BigDecimal annualPlanHaveAmount;
+
+ @ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)")
+ private BigDecimal annualPlanGovOwnFinanceAmount;
+
+ @ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)")
+ private BigDecimal annualPlanGovSuperiorFinanceAmount;
+
+}
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/ProjectPaymentPlan.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/ProjectPaymentPlan.java
new file mode 100644
index 0000000..3d4b601
--- /dev/null
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/ProjectPaymentPlan.java
@@ -0,0 +1,48 @@
+package com.hz.pm.api.projectlib.model.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ *
+ * 项目年度支付计划
+ *
+ *
+ * @author WendyYang
+ * @since 2024-02-21
+ */
+@Data
+@TableName("ND_PROJECT_PAYMENT_PLAN")
+@ApiModel(value = "NdProjectPaymentPlan对象")
+public class ProjectPaymentPlan implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "ID", type = IdType.AUTO)
+ private Long id;
+
+ @ApiModelProperty("支付年度")
+ private Integer paymentYear;
+
+ private BigDecimal annualPlanAmount;
+
+ private BigDecimal annualPlanHaveAmount;
+
+ private BigDecimal annualPlanGovOwnFinanceAmount;
+
+ private BigDecimal annualPlanGovSuperiorFinanceAmount;
+
+ @ApiModelProperty("项目编码")
+ private String projectCode;
+
+ @ApiModelProperty("项目版本")
+ private Integer projectVersion;
+
+}
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectApplicationService.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectApplicationService.java
index c154028..d9cc391 100644
--- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectApplicationService.java
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectApplicationService.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.entity.ProjectApplication;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.hz.pm.api.projectlib.model.entity.ProjectPaymentPlan;
import java.util.List;
@@ -26,4 +27,10 @@ public interface IProjectApplicationService extends IService
.eq(ProjectApplication::getProjectId, projectId));
}
+ default void remove(String projectCode, Integer projectVersion) {
+ remove(Wrappers.lambdaQuery(ProjectApplication.class)
+ .eq(ProjectApplication::getProjectCode, projectCode)
+ .eq(ProjectApplication::getProjectVersion, projectVersion));
+ }
+
}
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectPaymentPlanService.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectPaymentPlanService.java
new file mode 100644
index 0000000..3eff525
--- /dev/null
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectPaymentPlanService.java
@@ -0,0 +1,24 @@
+package com.hz.pm.api.projectlib.service;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.hz.pm.api.projectlib.model.entity.ProjectApplication;
+import com.hz.pm.api.projectlib.model.entity.ProjectPaymentPlan;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 服务类
+ *
+ *
+ * @author WendyYang
+ * @since 2024-02-21
+ */
+public interface IProjectPaymentPlanService extends IService {
+
+ default void remove(String projectCode, Integer projectVersion) {
+ remove(Wrappers.lambdaQuery(ProjectPaymentPlan.class)
+ .eq(ProjectPaymentPlan::getProjectCode, projectCode)
+ .eq(ProjectPaymentPlan::getProjectVersion, projectVersion));
+ }
+
+}
diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/ProjectPaymentPlanServiceImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/ProjectPaymentPlanServiceImpl.java
new file mode 100644
index 0000000..8fdeacf
--- /dev/null
+++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/ProjectPaymentPlanServiceImpl.java
@@ -0,0 +1,20 @@
+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;
+
+/**
+ *
+ * 服务实现类
+ *
+ *
+ * @author WendyYang
+ * @since 2024-02-21
+ */
+@Service
+public class ProjectPaymentPlanServiceImpl extends ServiceImpl implements IProjectPaymentPlanService {
+
+}
diff --git a/hz-pm-gen/src/main/java/com/hz/pm/gen/config/CodeGen.java b/hz-pm-gen/src/main/java/com/hz/pm/gen/config/CodeGen.java
index 272bc4a..dded921 100644
--- a/hz-pm-gen/src/main/java/com/hz/pm/gen/config/CodeGen.java
+++ b/hz-pm-gen/src/main/java/com/hz/pm/gen/config/CodeGen.java
@@ -55,7 +55,7 @@ public class CodeGen {
}
public static void main(String[] args) {
- generate("WendyYang", "projectlib", PATH_YYD, "mh_project_schema_target_data");
+ generate("WendyYang", "projectlib", PATH_YYD, "nd_project_payment_plan");
}
}