feat(schedule): 공정표 제품유형 + 표준공정 자동생성 백엔드
- product_types 참조 테이블 + projects.product_type_id FK (tkuser 마이그레이션) - schedule_entries에 work_type_id, risk_assessment_id, source 컬럼 추가 - schedule_phases에 product_type_id 추가 (phase 오염 방지) - generateFromTemplate: tksafety 템플릿 기반 공정 자동 생성 (트랜잭션) - phase 매칭 3단계 우선순위 (전용→범용→신규) - 간트 데이터 NULL 날짜 guard 추가 - system1 startup 마이그레이션 러너 추가 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -80,4 +80,13 @@ async function remove(req, res, next) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { getAll, getActive, getById, create, update, remove };
|
||||
async function getProductTypes(req, res, next) {
|
||||
try {
|
||||
const types = await projectModel.getProductTypes();
|
||||
res.json({ success: true, data: types });
|
||||
} catch (err) {
|
||||
next(err);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { getAll, getActive, getById, create, update, remove, getProductTypes };
|
||||
|
||||
Reference in New Issue
Block a user