浏览代码

项目指标模版复制修改

tags/24080901
CMM 1年前
父节点
当前提交
f5c10abcaf
共有 8 个文件被更改,包括 187 次插入3 次删除
  1. +1
    -1
      ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java
  2. +10
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/IndicatorConfigManage.java
  3. +16
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/performance/mapper/PerformanceAppraisalProjectIndicatorMapper.java
  4. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/performance/mapper/PerformanceAppraisalProjectIndicatorMapper.xml
  5. +62
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/performance/model/entity/PerformanceAppraisalProjectIndicator.java
  6. +57
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/ProjectIndexVO.java
  7. +16
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/performance/service/IPerformanceAppraisalProjectIndicatorService.java
  8. +20
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/performance/service/impl/PerformanceAppraisalProjectIndicatorServiceImpl.java

+ 1
- 1
ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java 查看文件

@@ -57,7 +57,7 @@ public class GeneratorCodeKingbaseConfig {

public static void main(String[] args) {
//generate("Liuxinxin", "expert", PATH_LXX, "expert_gov_business_strip");
generate("CMM", "test", PATH_CMM, "nd_project_core_business_indicators");
generate("CMM", "test", PATH_CMM, "nd_performance_appraisal_project_indicator");
}

}

+ 10
- 2
pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/IndicatorConfigManage.java 查看文件

@@ -11,6 +11,7 @@ import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.common.constant.CommonConst;
import com.ningdatech.pmapi.common.enumeration.CommonEnum;
import com.ningdatech.pmapi.common.helper.UserInfoHelper;
import com.ningdatech.pmapi.performance.enumration.PerformanceTemplateTypeEnum;
import com.ningdatech.pmapi.performance.model.dto.PerformanceIndicatorProjectTemplateSaveDTO;
import com.ningdatech.pmapi.performance.model.dto.ProjectTemplateDetailDTO;
@@ -19,8 +20,10 @@ import com.ningdatech.pmapi.performance.model.entity.PerformanceIndicatorProject
import com.ningdatech.pmapi.performance.model.req.PerformanceAppraisalListReq;
import com.ningdatech.pmapi.performance.model.vo.ProjectIndexTemplateVO;
import com.ningdatech.pmapi.performance.model.vo.ProjectTemplateDetailVO;
import com.ningdatech.pmapi.performance.service.IPerformanceAppraisalProjectIndicatorService;
import com.ningdatech.pmapi.performance.service.IPerformanceIndicatorProjectTemplateDetailService;
import com.ningdatech.pmapi.performance.service.IPerformanceIndicatorProjectTemplateService;
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import lombok.AllArgsConstructor;
@@ -47,8 +50,8 @@ import java.util.stream.Collectors;
@AllArgsConstructor
public class IndicatorConfigManage {
private final IPerformanceIndicatorProjectTemplateService indicatorProjectTemplateService;

private final IPerformanceIndicatorProjectTemplateDetailService indicatorProjectTemplateDetailService;
private final IPerformanceAppraisalProjectIndicatorService projectIndicatorService;

/**
* 模板列表
@@ -324,6 +327,8 @@ public class IndicatorConfigManage {
newTemplate.setCreateBy(user.getUsername());
newTemplate.setUpdateOn(LocalDateTime.now());
newTemplate.setUpdateBy(user.getUsername());
// 副本ID要置空
newTemplate.setId(null);
if (indicatorProjectTemplateService.save(newTemplate)) {
// 新增指标详情
List<PerformanceIndicatorProjectTemplateDetail> projectTemplateDetails = indicatorProjectTemplateDetailService.list(Wrappers.lambdaQuery(PerformanceIndicatorProjectTemplateDetail.class)
@@ -337,6 +342,8 @@ public class IndicatorConfigManage {
newProjectTemplateDetail.setCreateBy(user.getUsername());
newProjectTemplateDetail.setUpdateOn(LocalDateTime.now());
newProjectTemplateDetail.setUpdateBy(user.getUsername());
// 新的指标ID要置空
newProjectTemplateDetail.setId(null);
indicatorProjectTemplateDetailService.save(newProjectTemplateDetail);
}
return "模版复制成功";
@@ -345,7 +352,8 @@ public class IndicatorConfigManage {
}

public PageVo<ProjectIndexTemplateVO> projectIndexList(PerformanceAppraisalListReq req) {

UserInfoDetails user = LoginUserUtil.loginUserDetail();
Page<Object> page = req.page();
return null;
}
}

+ 16
- 0
pmapi/src/main/java/com/ningdatech/pmapi/performance/mapper/PerformanceAppraisalProjectIndicatorMapper.java 查看文件

@@ -0,0 +1,16 @@
package com.ningdatech.pmapi.performance.mapper;

import com.ningdatech.pmapi.performance.model.entity.PerformanceAppraisalProjectIndicator;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
* <p>
* Mapper 接口
* </p>
*
* @author CMM
* @since 2023-07-28
*/
public interface PerformanceAppraisalProjectIndicatorMapper extends BaseMapper<PerformanceAppraisalProjectIndicator> {

}

+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/performance/mapper/PerformanceAppraisalProjectIndicatorMapper.xml 查看文件

@@ -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.ningdatech.pmapi.performance.mapper.PerformanceAppraisalProjectIndicatorMapper">

</mapper>

+ 62
- 0
pmapi/src/main/java/com/ningdatech/pmapi/performance/model/entity/PerformanceAppraisalProjectIndicator.java 查看文件

@@ -0,0 +1,62 @@
package com.ningdatech.pmapi.performance.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
* <p>
*
* </p>
*
* @author CMM
* @since 2023-07-28
*/
@TableName("nd_performance_appraisal_project_indicator")
@ApiModel(value = "NdPerformanceAppraisalProjectIndicator对象", description = "")
@Data
public class PerformanceAppraisalProjectIndicator implements Serializable {

private static final long serialVersionUID = 1L;

@ApiModelProperty("主键ID")
@TableId(type = IdType.AUTO)
private Long id;

@ApiModelProperty("指标名称")
private String indexName;

@ApiModelProperty("指标级别(1 一级、2 二级、3 三级)")
private Integer indexLevel;

@ApiModelProperty("指标分值")
private BigDecimal indexScore;

@ApiModelProperty("指标细则")
private String indexDetail;

@ApiModelProperty("评分细则")
private String gradeDetail;

@ApiModelProperty("佐证材料")
private String supportMaterial;

@ApiModelProperty("创建时间")
private LocalDateTime createOn;

@ApiModelProperty("创建人")
private String createBy;

@ApiModelProperty("更新时间")
private LocalDateTime updateOn;

@ApiModelProperty("更新人")
private String updateBy;

}

+ 57
- 0
pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/ProjectIndexVO.java 查看文件

@@ -0,0 +1,57 @@
package com.ningdatech.pmapi.performance.model.vo;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
* 绩效评价-项目指标库
* @return
* @author CMM
* @since 2023/07/28 14:45
*/
@Data
@ApiModel(value = "绩效评价项目指标库", description = "绩效评价项目指标库")
public class ProjectIndexVO implements Serializable {

private static final long serialVersionUID = 1L;

@ApiModelProperty("主键")
private Long id;

private LocalDateTime createOn;
private LocalDateTime updateOn;
private String createBy;
private String updateBy;

@ApiModelProperty("模板名称")
private String name;

@ApiModelProperty("丽水 区域code")
private String regionCode;

@ApiModelProperty("项目类型")
private Integer projectType;

@ApiModelProperty("项目年度")
private Integer projectYear;

@ApiModelProperty("建设类型 1 软件、2 硬件、3 软硬件")
private Integer constructType;

@ApiModelProperty("项目资金范围 1.500万元以下、2.500-2000万元,3.2000万元及以上")
private Integer amountRange;

@ApiModelProperty("状态 0关闭 1开启")
private Integer status;

@ApiModelProperty("绩效指标详情")
private List<ProjectTemplateDetailVO> templateDetails;

@ApiModelProperty("附加绩效指标详情")
private List<ProjectTemplateDetailVO> additionalIndexDetails;
}

+ 16
- 0
pmapi/src/main/java/com/ningdatech/pmapi/performance/service/IPerformanceAppraisalProjectIndicatorService.java 查看文件

@@ -0,0 +1,16 @@
package com.ningdatech.pmapi.performance.service;

import com.ningdatech.pmapi.performance.model.entity.PerformanceAppraisalProjectIndicator;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* <p>
* 服务类
* </p>
*
* @author CMM
* @since 2023-07-28
*/
public interface IPerformanceAppraisalProjectIndicatorService extends IService<PerformanceAppraisalProjectIndicator> {

}

+ 20
- 0
pmapi/src/main/java/com/ningdatech/pmapi/performance/service/impl/PerformanceAppraisalProjectIndicatorServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
package com.ningdatech.pmapi.performance.service.impl;

import com.ningdatech.pmapi.performance.model.entity.PerformanceAppraisalProjectIndicator;
import com.ningdatech.pmapi.performance.mapper.PerformanceAppraisalProjectIndicatorMapper;
import com.ningdatech.pmapi.performance.service.IPerformanceAppraisalProjectIndicatorService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
* <p>
* 服务实现类
* </p>
*
* @author CMM
* @since 2023-07-28
*/
@Service
public class PerformanceAppraisalProjectIndicatorServiceImpl extends ServiceImpl<PerformanceAppraisalProjectIndicatorMapper, PerformanceAppraisalProjectIndicator> implements IPerformanceAppraisalProjectIndicatorService {

}

正在加载...
取消
保存