feat: 新增现场勘察派单全流程业务能力

1.  新增共享电工管理模块:包含实体、DTO、控制器、服务以及前后端API
2.  重构勘察工单实体与查询逻辑,完善工单全状态流程与字段
3.  新增勘察SOP模板与工单回执业务体系
4.  更新数据库字典与初始化脚本,补充业务数据
5.  新增勘察派单增删改查、指派、复核、催办等全流程接口
6.  修复用户服务角色关联SQL生成问题
7.  新增勘察派单前后端完整交互链路
This commit is contained in:
andyesfly committed 2026-09-15 08:50:55 +08:00
1 parent 1c83e09fa1
commit 6b00f61550
21 files changed
+4739 -388

No files matched your search

@@ -8,8 +8,38 @@ export class SurveyOrderController {
@Inject() surveyOrderService!: SurveyOrderService;
@Get("/") async list(@Query() query: any) { return this.surveyOrderService.list(query, this.ctx); }
// 以下静态路径必须声明在 /:id 之前,否则会被动态路由吞掉
@Get("/stats") async stats() { return this.surveyOrderService.stats(this.ctx); }
@Get("/sop-items") async listSopItems(@Query("templateCode") templateCode: string) {
return this.surveyOrderService.listSopItems(templateCode);
}
@Get("/quote") async quote(@Query("loopCount") loopCount: string) { return this.surveyOrderService.quote(loopCount); }
// 批量指派
@Post("/batch-assign") async batchAssign(@Body() body: any) { return this.surveyOrderService.batchAssign(body, this.ctx); }
@Get("/:id") async detail(@Param("id") id: string) { return this.surveyOrderService.detail(Number(id), this.ctx); }
@Post("/") async create(@Body() body: any) { return this.surveyOrderService.create(body, this.ctx); }
@Put("/:id") async update(@Param("id") id: string, @Body() body: any) { return this.surveyOrderService.update(Number(id), body, this.ctx); }
// 指派 / 改派共享电工
@Put("/:id/assign") async assign(@Param("id") id: string, @Body() body: any) {
return this.surveyOrderService.assign(Number(id), body, this.ctx);
}
// 技术复核:pass 归档 / reject 退回现场
@Put("/:id/review") async review(@Param("id") id: string, @Body() body: any) {
return this.surveyOrderService.review(Number(id), body, this.ctx);
}
// 催办
@Post("/:id/urge") async urge(@Param("id") id: string) { return this.surveyOrderService.urge(Number(id), this.ctx); }
// 取消工单
@Put("/:id/cancel") async cancel(@Param("id") id: string, @Body() body: any) {
return this.surveyOrderService.cancel(Number(id), body, this.ctx);
}
@Del("/:id") async delete(@Param("id") id: string) { return this.surveyOrderService.delete(Number(id), this.ctx); }
}
}