SNAPSHOT W7 已部署稳定态 — 凯迪ERP+OA一体化平台 (MET 73.3%)
恢复点(restore point)。别人改崩后可 git reset --hard 回到此提交。 == 此快照内容 == - 后端 oa-backend: 734 控制器 / 711 实体 (Spring Boot 3.2.5 + SQLite, 端口8091) - 前端 modern-ui/app: Vue3+Vite, 约700页 (构建产物已在 oa-backend/src/main/resources/static) - 数据库 oa-backend/data/oa.db: 含全部演示数据 (强制入库, 6.6MB) - 交接文档 go.md + go-code-reference/endpoints/entities/database.md - 多代理建设脚本 .claude/wf-*.js == 状态 == - 对 凯迪科技ERP_20260507.xlsx 合规 MET ~73.3% (PARTIAL 75: 34可建+6种子/bug+35外部硬天花板) - 安全: 5轮红队+5轮复检, default-deny分级鉴权, 连续零可利用 - W3~W7 累计补完436缺口; W8末轮(40缺口)为半成品(源码树可编译但未集成) - 运行: cd oa-backend; java -jar build/libs/oa-backend-0.1.0.jar --server.port=8091; admin/123456 == 排除(gitignore, 可再生) == node_modules / oa-backend/build / .jdks / *.log / Backup-ERP-* / 弃用的OFBiz核心(只保留modern-ui) 完整文件夹备份见同目录 Backup-ERP-20260615-191517/ (含上述全部, 仅缺 node_modules) 时间戳: 20260615-191517 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
package com.kaidi.oa.seed;
|
||||
|
||||
import com.kaidi.oa.common.Money;
|
||||
import com.kaidi.oa.domain.RdDeclPlan;
|
||||
import com.kaidi.oa.repository.RdDeclPlanRepository;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 申报服务部——年度/季度申报计划种子数据(Gap 1 [low] 补完)。
|
||||
*
|
||||
* 原缺口:rd-decl-plans 台账为 0 条数据,前端页面 rddeclplan.vue 虽已存在但列表空白。
|
||||
* 本 Seeder 在表为空时注入 4 条演示计划(跨状态:执行中/已批准/草稿/已完成),
|
||||
* 使 rddeclplan 页面首次打开即有数据可见。
|
||||
*
|
||||
* 注意:本 seeder 独立于 DataSeeder(Order=2 在 DataSeeder Order=1 之后运行),
|
||||
* 不修改 DataSeeder 的大构造函数。
|
||||
*/
|
||||
@Component
|
||||
@Order(2)
|
||||
public class RdDeclPlanSeeder implements CommandLineRunner {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(RdDeclPlanSeeder.class);
|
||||
|
||||
private final RdDeclPlanRepository planRepo;
|
||||
|
||||
public RdDeclPlanSeeder(RdDeclPlanRepository planRepo) {
|
||||
this.planRepo = planRepo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(String... args) {
|
||||
if (planRepo.count() > 0) {
|
||||
return; // 已有数据,跳过
|
||||
}
|
||||
log.info("Seeding RdDeclPlan demonstration data...");
|
||||
|
||||
// 1. 执行中:高新技术企业认定申报(主力计划)
|
||||
RdDeclPlan p1 = new RdDeclPlan();
|
||||
p1.setName("2026年度高新技术企业认定申报计划");
|
||||
p1.setPeriodType("年度");
|
||||
p1.setPlanYear(2026);
|
||||
p1.setPolicyCategory("资质类");
|
||||
p1.setProgramName("高新技术企业");
|
||||
p1.setDepartment("申报服务部");
|
||||
p1.setOwner("李申报");
|
||||
p1.setBudget(Money.of(80000.0));
|
||||
p1.setExpectedBenefit(Money.of(500000.0));
|
||||
p1.setPlanApplyDate("2026-08-01");
|
||||
p1.setPlanEndDate("2026-11-30");
|
||||
p1.setStatus("执行中");
|
||||
p1.setProgress(45);
|
||||
p1.setRemark("每三年复评一次,本次为第二轮;需财务审计报告+知识产权数量满足要求");
|
||||
p1.setCreatedAt(Instant.now());
|
||||
p1.setUpdatedAt(Instant.now());
|
||||
planRepo.save(p1);
|
||||
|
||||
// 2. 已批准:专精特新中小企业申报
|
||||
RdDeclPlan p2 = new RdDeclPlan();
|
||||
p2.setName("2026年度专精特新中小企业认定申报计划");
|
||||
p2.setPeriodType("年度");
|
||||
p2.setPlanYear(2026);
|
||||
p2.setPolicyCategory("资质类");
|
||||
p2.setProgramName("专精特新中小企业");
|
||||
p2.setDepartment("申报服务部");
|
||||
p2.setOwner("王申报");
|
||||
p2.setBudget(Money.of(30000.0));
|
||||
p2.setExpectedBenefit(Money.of(200000.0));
|
||||
p2.setPlanApplyDate("2026-09-01");
|
||||
p2.setPlanEndDate("2026-12-31");
|
||||
p2.setStatus("已批准");
|
||||
p2.setProgress(0);
|
||||
p2.setRemark("省级专精特新首次申报,需研发费用占比≥3%、知识产权≥2项");
|
||||
p2.setCreatedAt(Instant.now());
|
||||
p2.setUpdatedAt(Instant.now());
|
||||
planRepo.save(p2);
|
||||
|
||||
// 3. 草稿:研发费用加计扣除季度申请
|
||||
RdDeclPlan p3 = new RdDeclPlan();
|
||||
p3.setName("2026年Q3研发费用加计扣除预缴申请计划");
|
||||
p3.setPeriodType("季度");
|
||||
p3.setPlanYear(2026);
|
||||
p3.setPlanQuarter("Q3");
|
||||
p3.setPolicyCategory("资金类");
|
||||
p3.setProgramName("研发费用加计扣除");
|
||||
p3.setDepartment("申报服务部");
|
||||
p3.setOwner("张申报");
|
||||
p3.setBudget(Money.of(5000.0));
|
||||
p3.setExpectedBenefit(Money.of(120000.0));
|
||||
p3.setPlanApplyDate("2026-07-15");
|
||||
p3.setPlanEndDate("2026-07-31");
|
||||
p3.setStatus("草稿");
|
||||
p3.setProgress(0);
|
||||
p3.setRemark("每季度预缴税款时享受,需财务提供研发费用辅助账");
|
||||
p3.setCreatedAt(Instant.now());
|
||||
p3.setUpdatedAt(Instant.now());
|
||||
planRepo.save(p3);
|
||||
|
||||
// 4. 已完成:科技型中小企业评价(已结案)
|
||||
RdDeclPlan p4 = new RdDeclPlan();
|
||||
p4.setName("2025年度科技型中小企业评价申报计划");
|
||||
p4.setPeriodType("年度");
|
||||
p4.setPlanYear(2025);
|
||||
p4.setPolicyCategory("资质类");
|
||||
p4.setProgramName("科技型中小企业");
|
||||
p4.setDepartment("申报服务部");
|
||||
p4.setOwner("李申报");
|
||||
p4.setBudget(Money.of(10000.0));
|
||||
p4.setExpectedBenefit(Money.of(80000.0));
|
||||
p4.setPlanApplyDate("2025-05-01");
|
||||
p4.setPlanEndDate("2025-06-30");
|
||||
p4.setStatus("已完成");
|
||||
p4.setProgress(100);
|
||||
p4.setRemark("已完成在科技部门户网站填报并获评,有效期至2026年底");
|
||||
p4.setCreatedAt(Instant.now().minusSeconds(86400L * 180));
|
||||
p4.setUpdatedAt(Instant.now().minusSeconds(86400L * 30));
|
||||
planRepo.save(p4);
|
||||
|
||||
log.info("Seeded {} RdDeclPlan records.", planRepo.count());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user