|
|
@@ -203,6 +203,11 @@ public class S8ManualReportService : ITransient
|
|
|
{
|
|
|
if (string.IsNullOrWhiteSpace(dto.Title)) throw new S8BizException("标题必填");
|
|
|
if (string.IsNullOrWhiteSpace(dto.SceneCode)) throw new S8BizException("场景必填");
|
|
|
+ // S8-MANUAL-REPORT-DEPT-ZERO-GUARD-1(P0-B-3):人工提报禁止 dept=0 入库。
|
|
|
+ // 字段类型 long(非空),未填默认 0;guard 命中 <=0 直接拒绝,绝不转 null/默认部门/未归属。
|
|
|
+ // 范围仅限本入口;自动建单(CreateFromWatchAsync/CreateFromHitAsync)的 ?? 0 风险归 P0-B-4。
|
|
|
+ if (dto.OccurrenceDeptId <= 0) throw new S8BizException("发生部门不能为空,请选择有效发生部门");
|
|
|
+ if (dto.ResponsibleDeptId <= 0) throw new S8BizException("处理部门不能为空,请选择有效处理部门");
|
|
|
|
|
|
// S8-SEVERITY-FOLLOW-SERIOUS-STANDARDIZE-EXEC-1:白名单接受新值(FOLLOW/SERIOUS)+ 旧值兼容;
|
|
|
// 通过 Normalize 写入 DB 一律为 FOLLOW/SERIOUS。
|