+ * 绩效报表(三期批2:报表引擎+接口) 前端控制器 + *
+ * + * @author ai + * @since 2026-07-28 + */ +@RestController +@RequestMapping("/zt-perf") +public class ZtPerfController { + + @Autowired + private IZtPerfReportService perfReportService; + + @Autowired + private IZtPerfConfigService perfConfigService; + + /** + * 按岗位 tab 报表数据(指标/权重/得分/数据来源/明细) + */ + @RequestMapping(value = "/report", method = RequestMethod.GET, produces = "application/json; charset=UTF-8") + public Result+ * 大型需求文档齐备核查快照表(FR-014 三期) + * 一行 = 某大型需求某月某类文档的核查结果; + * 状态流 pending(待确认)→ appealing(申诉中)→ resolved(复核完结,appealResult=pass 时回滚扣分) + *
+ * + * @author ai + * @since 2026-07-28 + */ +@Data +@EqualsAndHashCode(callSuper = false) +public class ZtDocCheck implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 状态-待确认 + */ + public static final String STATUS_PENDING = "pending"; + /** + * 状态-申诉中 + */ + public static final String STATUS_APPEALING = "appealing"; + /** + * 状态-复核完结 + */ + public static final String STATUS_RESOLVED = "resolved"; + /** + * 复核结果-通过(回滚扣分) + */ + public static final String APPEAL_PASS = "pass"; + /** + * 复核结果-驳回 + */ + public static final String APPEAL_REJECT = "reject"; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 研发需求ID(zt_story.id,大型需求=workload_index>20) + */ + private Integer storyId; + + /** + * 考核月份 yyyy-MM + */ + private String month; + + /** + * 文档类型 testCase/testReport/aiCodeReview/aiWorkLog/docUpdate + */ + private String docType; + + /** + * 是否齐备 1有 0缺失 + */ + private Integer present; + + /** + * 判定明细(命中记录说明) + */ + private String detail; + + /** + * 状态 pending/appealing/resolved + */ + private String status; + + /** + * 申诉理由 + */ + private String appealReason; + + /** + * 复核结果 pass/reject(pass 回滚扣分) + */ + private String appealResult; + + /** + * 复核备注 + */ + private String resolveRemark; + + /** + * 核查时间 + */ + private Date checkTime; + + private Date createTime; + + private Date updateTime; + + + /** + * 是否计入缺失扣分(缺失 且 非复核通过) + */ + public boolean countsAsMissing() { + return (this.present == null || this.present == 0) + && !(STATUS_RESOLVED.equals(this.status) && APPEAL_PASS.equals(this.appealResult)); + } + +} diff --git a/src/main/java/com/sa/zentao/entity/ZtFile.java b/src/main/java/com/sa/zentao/entity/ZtFile.java index 5ec43a4..17b7b3c 100644 --- a/src/main/java/com/sa/zentao/entity/ZtFile.java +++ b/src/main/java/com/sa/zentao/entity/ZtFile.java @@ -29,6 +29,9 @@ public class ZtFile implements Serializable { private String pathname; + //附件访问链接 + private String url; + //文件名 private String title; //后缀 diff --git a/src/main/java/com/sa/zentao/entity/ZtMeeting.java b/src/main/java/com/sa/zentao/entity/ZtMeeting.java index b2e9045..7f18e99 100644 --- a/src/main/java/com/sa/zentao/entity/ZtMeeting.java +++ b/src/main/java/com/sa/zentao/entity/ZtMeeting.java @@ -73,4 +73,9 @@ public class ZtMeeting implements Serializable { private String result; private String meetingAfter; + /** + * 会议纪要MD访问链接(最新一份) + */ + private String url; + } diff --git a/src/main/java/com/sa/zentao/entity/ZtPerfConfig.java b/src/main/java/com/sa/zentao/entity/ZtPerfConfig.java new file mode 100644 index 0000000..63ae16c --- /dev/null +++ b/src/main/java/com/sa/zentao/entity/ZtPerfConfig.java @@ -0,0 +1,69 @@ +package com.sa.zentao.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + *+ * 绩效指标规则配置表(三期,prd §7.5 九岗位算分模型) + * 一行 = 某岗位某指标项;rule_json 存规则参数(type: linear/threshold/manual) + *
+ * + * @author ai + * @since 2026-07-28 + */ +@Data +@EqualsAndHashCode(callSuper = false) +public class ZtPerfConfig implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 岗位编码(projectManager/productManager/backendDev/tester/uiEngineer/opsEngineer 等) + */ + private String role; + + /** + * 指标编码(与 PerfIndicatorCalculator.key() 对应) + */ + private String itemKey; + + /** + * 指标名称 + */ + private String itemName; + + /** + * 权重(0~1,加分项为0) + */ + private BigDecimal weight; + + /** + * 规则参数JSON(type=linear/threshold/manual) + */ + private String ruleJson; + + /** + * 是否启用(加分项可配开关) + */ + private Integer enabled; + + private String createUser; + + private Date createTime; + + private String updateUser; + + private Date updateTime; + + +} diff --git a/src/main/java/com/sa/zentao/entity/ZtStory.java b/src/main/java/com/sa/zentao/entity/ZtStory.java index effffcf..87d99e3 100644 --- a/src/main/java/com/sa/zentao/entity/ZtStory.java +++ b/src/main/java/com/sa/zentao/entity/ZtStory.java @@ -240,4 +240,49 @@ public class ZtStory implements Serializable { * 测试人员 */ private String testUser; + /** + * PRD文档访问链接 + */ + @TableField("prd_url") + private String prdUrl; + /** + * 代码审查报告访问链接 + */ + @TableField("code_review_url") + private String codeReviewUrl; + /** + * 工作日志访问链接 + */ + @TableField("work_log_url") + private String workLogUrl; + /** + * AI项目文档更新记录访问链接(CHG-046) + */ + @TableField("ai_doc_update_url") + private String aiDocUpdateUrl; + /** + * 测试用例访问链接 + */ + @TableField("test_case_url") + private String testCaseUrl; + /** + * 测试报告模版下载访问链接 + */ + @TableField("test_report_download_url") + private String testReportDownloadUrl; + /** + * 测试报告提交访问链接 + */ + @TableField("test_report_submit_url") + private String testReportSubmitUrl; + /** + * 其他测试文档访问链接 + */ + @TableField("test_other_url") + private String testOtherUrl; + /** + * 审查状态 pass/reject + */ + @TableField("code_review_status") + private String codeReviewStatus; } diff --git a/src/main/java/com/sa/zentao/entity/ZtStoryExpand.java b/src/main/java/com/sa/zentao/entity/ZtStoryExpand.java index a10da64..fb242af 100644 --- a/src/main/java/com/sa/zentao/entity/ZtStoryExpand.java +++ b/src/main/java/com/sa/zentao/entity/ZtStoryExpand.java @@ -48,6 +48,11 @@ public class ZtStoryExpand implements Serializable { */ private String aiEfficiencyCoefficient; + /** + * AI参与率(只存不算,口径待定) + */ + private String aiParticipationRate; + /** * 评估工时 */ @@ -115,4 +120,10 @@ public class ZtStoryExpand implements Serializable { */ private String testPerson; + /** + * AI框架验收指标(Given/When/Then,MD 文本;框架经 saveOrUpdate 上传, + * 与老验收标准 zt_storyspec.verify 互不干扰——CHG-022) + */ + private String acceptanceCriteria; + } diff --git a/src/main/java/com/sa/zentao/entity/ZtUser.java b/src/main/java/com/sa/zentao/entity/ZtUser.java index 417949b..ae5ea8e 100644 --- a/src/main/java/com/sa/zentao/entity/ZtUser.java +++ b/src/main/java/com/sa/zentao/entity/ZtUser.java @@ -126,6 +126,9 @@ public class ZtUser implements Serializable { private UserType userType; + //开发方向(CHG-038,仅 user_type=KFZ 有效):frontend=前端 / backend=后端,NULL 按后端口径 + private String devDirection; + private String productIds; @TableField(exist = false) diff --git a/src/main/java/com/sa/zentao/enums/FileTypes.java b/src/main/java/com/sa/zentao/enums/FileTypes.java index 673eb30..53a3674 100644 --- a/src/main/java/com/sa/zentao/enums/FileTypes.java +++ b/src/main/java/com/sa/zentao/enums/FileTypes.java @@ -13,6 +13,14 @@ public enum FileTypes { feedbackStory("feedbackStory", "问题反馈"), ywTask("ywTask", "运维任务"), meeting("meeting", "会议"), + aiCodeReview("aiCodeReview", "代码审查报告"), + aiWorkLog("aiWorkLog", "工作日志"), + aiDocUpdate("aiDocUpdate", "AI项目文档更新记录"), + storyPrd("storyPrd", "需求文档"), + testCase("testCase", "测试用例"), + testReport("testReport", "测试报告模版"), + testReportSubmit("testReportSubmit", "测试报告提交"), + testOther("testOther", "其他测试文档"), ; @EnumValue diff --git a/src/main/java/com/sa/zentao/mapper/ZtDocCheckMapper.java b/src/main/java/com/sa/zentao/mapper/ZtDocCheckMapper.java new file mode 100644 index 0000000..87c61f0 --- /dev/null +++ b/src/main/java/com/sa/zentao/mapper/ZtDocCheckMapper.java @@ -0,0 +1,16 @@ +package com.sa.zentao.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.sa.zentao.entity.ZtDocCheck; + +/** + *+ * Mapper 接口 + *
+ * + * @author ai + * @since 2026-07-28 + */ +public interface ZtDocCheckMapper extends BaseMapper+ * Mapper 接口 + *
+ * + * @author ai + * @since 2026-07-28 + */ +public interface ZtPerfConfigMapper extends BaseMapper+ * 文档齐备核查入参(FR-014 三期):generateDocCheck 用 month; + * docCheckAppeal 用 storyId/month/docType/reason;docCheckAppealResolve 另加 pass/remark + *
+ * + * @author ai + * @since 2026-07-28 + */ +@Data +@EqualsAndHashCode(callSuper = false) +public class ZtDocCheckQo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 月份 yyyy-MM + */ + private String month; + + /** + * 需求ID + */ + private Integer storyId; + + /** + * 文档类型 testCase/testReport/aiCodeReview/aiWorkLog/docUpdate + */ + private String docType; + + /** + * 申诉理由 + */ + private String reason; + + /** + * 复核是否通过 + */ + private Boolean pass; + + /** + * 复核备注 + */ + private String remark; +} diff --git a/src/main/java/com/sa/zentao/qo/ZtPerfQo.java b/src/main/java/com/sa/zentao/qo/ZtPerfQo.java new file mode 100644 index 0000000..ffdf6da --- /dev/null +++ b/src/main/java/com/sa/zentao/qo/ZtPerfQo.java @@ -0,0 +1,66 @@ +package com.sa.zentao.qo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 绩效报表/评分/申诉/配置 请求参数(三期批2 /zt-perf) + * + * @author ai + * @since 2026-07-28 + */ +@Data +public class ZtPerfQo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 配置维护时为 zt_perf_config.id;申诉复核时为申诉 id(account@month#序号) + */ + private String id; + + /** + * 月份 yyyy-MM + */ + private String month; + + /** + * 岗位 + */ + private String role; + + private String account; + + private String itemKey; + + /** + * 人工评分分值 0~100 + */ + private Double score; + + private String remark; + + /** + * 申诉原因 + */ + private String reason; + + /** + * 复核结果:upheld 维持 / overturned 撤销 + */ + private String result; + + private String reviewer; + + /** + * 配置项字段(/zt-perf/config 维护用) + */ + private String itemName; + + private Double weight; + + private String ruleJson; + + private Integer enabled; +} diff --git a/src/main/java/com/sa/zentao/service/IZtDocCheckService.java b/src/main/java/com/sa/zentao/service/IZtDocCheckService.java new file mode 100644 index 0000000..9f705e4 --- /dev/null +++ b/src/main/java/com/sa/zentao/service/IZtDocCheckService.java @@ -0,0 +1,60 @@ +package com.sa.zentao.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.sa.zentao.entity.ZtDocCheck; + +import java.util.List; +import java.util.Map; + +/** + *+ * 大型需求文档齐备核查 服务类(FR-014 三期) + *
+ * + * @author ai + * @since 2026-07-28 + */ +public interface IZtDocCheckService extends IService