diff --git a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java index 8a455b6..d205dd7 100644 --- a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java +++ b/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"); } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/IndicatorConfigManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/IndicatorConfigManage.java index 691ecf6..b99268a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/IndicatorConfigManage.java +++ b/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 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 projectIndexList(PerformanceAppraisalListReq req) { - + UserInfoDetails user = LoginUserUtil.loginUserDetail(); + Page page = req.page(); return null; } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/mapper/PerformanceAppraisalProjectIndicatorMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/mapper/PerformanceAppraisalProjectIndicatorMapper.java new file mode 100644 index 0000000..03a900f --- /dev/null +++ b/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; + +/** + *

+ * Mapper 接口 + *

+ * + * @author CMM + * @since 2023-07-28 + */ +public interface PerformanceAppraisalProjectIndicatorMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/mapper/PerformanceAppraisalProjectIndicatorMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/performance/mapper/PerformanceAppraisalProjectIndicatorMapper.xml new file mode 100644 index 0000000..19e19bd --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/mapper/PerformanceAppraisalProjectIndicatorMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/entity/PerformanceAppraisalProjectIndicator.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/entity/PerformanceAppraisalProjectIndicator.java new file mode 100644 index 0000000..7f1e0ce --- /dev/null +++ b/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; + +/** + *

+ * + *

+ * + * @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; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/ProjectIndexVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/ProjectIndexVO.java new file mode 100644 index 0000000..427feb7 --- /dev/null +++ b/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 templateDetails; + + @ApiModelProperty("附加绩效指标详情") + private List additionalIndexDetails; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/service/IPerformanceAppraisalProjectIndicatorService.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/service/IPerformanceAppraisalProjectIndicatorService.java new file mode 100644 index 0000000..7e5f08f --- /dev/null +++ b/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; + +/** + *

+ * 服务类 + *

+ * + * @author CMM + * @since 2023-07-28 + */ +public interface IPerformanceAppraisalProjectIndicatorService extends IService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/service/impl/PerformanceAppraisalProjectIndicatorServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/service/impl/PerformanceAppraisalProjectIndicatorServiceImpl.java new file mode 100644 index 0000000..cdaece7 --- /dev/null +++ b/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; + +/** + *

+ * 服务实现类 + *

+ * + * @author CMM + * @since 2023-07-28 + */ +@Service +public class PerformanceAppraisalProjectIndicatorServiceImpl extends ServiceImpl implements IPerformanceAppraisalProjectIndicatorService { + +}