Browse Source

修改年度支付计划

tags/24080901
WendyYang 10 months ago
parent
commit
10c264b604
15 changed files with 240 additions and 79 deletions
  1. +8
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DeclaredProjectManage.java
  2. +19
    -17
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DefaultDeclaredProjectManage.java
  3. +4
    -17
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/ProjectDraft.java
  4. +5
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ProjectDraftVO.java
  5. +18
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/NdProjectPaymentPlanController.java
  6. +23
    -24
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java
  7. +16
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectPaymentPlanMapper.java
  8. +5
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectPaymentPlanMapper.xml
  9. +5
    -20
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java
  10. +37
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectPaymentPlanDTO.java
  11. +48
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/ProjectPaymentPlan.java
  12. +7
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectApplicationService.java
  13. +24
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectPaymentPlanService.java
  14. +20
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/ProjectPaymentPlanServiceImpl.java
  15. +1
    -1
      hz-pm-gen/src/main/java/com/hz/pm/gen/config/CodeGen.java

+ 8
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DeclaredProjectManage.java View File

@@ -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()));
}


+ 19
- 17
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DefaultDeclaredProjectManage.java View File

@@ -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));
}
}
}
}


+ 4
- 17
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/ProjectDraft.java View File

@@ -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;

/**
* <p>
@@ -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;


+ 5
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ProjectDraftVO.java View File

@@ -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<ProjectPaymentPlanDTO> paymentPlanList;

private Long createBy;

private Long updateBy;

@ApiModelProperty("是否推送省里")


+ 18
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/NdProjectPaymentPlanController.java View File

@@ -0,0 +1,18 @@
package com.hz.pm.api.projectlib.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;

/**
* <p>
* 前端控制器
* </p>
*
* @author WendyYang
* @since 2024-02-21
*/
@Controller
@RequestMapping("/api.projectlib/ndProjectPaymentPlan")
public class NdProjectPaymentPlanController {

}

+ 23
- 24
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java View File

@@ -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<ProjectLibListItemVO> 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<ProjectPaymentPlanDTO> paymentPlans) {
Integer version = Objects.nonNull(project.getVersion()) ? project.getVersion() : 1;
projectPaymentPlanService.remove(project.getProjectCode(), version);
List<ProjectPaymentPlan> 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<ProjectApplication> 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<ProjectCoreBusinessDTO> 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);


+ 16
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectPaymentPlanMapper.java View File

@@ -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;

/**
* <p>
* Mapper 接口
* </p>
*
* @author WendyYang
* @since 2024-02-21
*/
public interface ProjectPaymentPlanMapper extends BaseMapper<ProjectPaymentPlan> {

}

+ 5
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectPaymentPlanMapper.xml View File

@@ -0,0 +1,5 @@
<?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">
<mapper namespace="com.hz.pm.api.projectlib.mapper.ProjectPaymentPlanMapper">

</mapper>

+ 5
- 20
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java View File

@@ -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<ProjectPaymentPlanDTO> 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<String,Object> dynamicForm;
private Map<String, Object> dynamicForm;

//P省级,M市级,C县(市、区)级,T乡镇(街道、办事处)级,V村(社区)级
private String baseLowestLevel;


+ 37
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectPaymentPlanDTO.java View File

@@ -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;

/**
* <p>
* ProjectPaymentPlanDTO
* </p>
*
* @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;

}

+ 48
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/ProjectPaymentPlan.java View File

@@ -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;

/**
* <p>
* 项目年度支付计划
* </p>
*
* @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;

}

+ 7
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectApplicationService.java View File

@@ -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<ProjectApplication>
.eq(ProjectApplication::getProjectId, projectId));
}

default void remove(String projectCode, Integer projectVersion) {
remove(Wrappers.lambdaQuery(ProjectApplication.class)
.eq(ProjectApplication::getProjectCode, projectCode)
.eq(ProjectApplication::getProjectVersion, projectVersion));
}

}

+ 24
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectPaymentPlanService.java View File

@@ -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;

/**
* <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));
}

}

+ 20
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/ProjectPaymentPlanServiceImpl.java View File

@@ -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;

/**
* <p>
* 服务实现类
* </p>
*
* @author WendyYang
* @since 2024-02-21
*/
@Service
public class ProjectPaymentPlanServiceImpl extends ServiceImpl<ProjectPaymentPlanMapper, ProjectPaymentPlan> implements IProjectPaymentPlanService {

}

+ 1
- 1
hz-pm-gen/src/main/java/com/hz/pm/gen/config/CodeGen.java View File

@@ -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");
}

}

Loading…
Cancel
Save