작업계획서대로 진행

This commit is contained in:
2026-01-11 01:29:46 +09:00
parent 1b8cd8577e
commit 01bd66d524
51 changed files with 11124 additions and 273 deletions

View File

@@ -8,7 +8,10 @@ export default defineEventHandler(async (event) => {
const projectId = getRouterParam(event, 'id')
const project = await queryOne<any>(`
SELECT * FROM wr_project_info WHERE project_id = $1
SELECT p.*, b.business_name, b.business_code
FROM wr_project_info p
LEFT JOIN wr_business b ON p.business_id = b.business_id
WHERE p.project_id = $1
`, [projectId])
if (!project) {
@@ -35,6 +38,9 @@ export default defineEventHandler(async (event) => {
endDate: project.end_date,
contractAmount: project.contract_amount,
projectStatus: project.project_status,
businessId: project.business_id,
businessName: project.business_name,
businessCode: project.business_code,
createdAt: project.created_at,
updatedAt: project.updated_at,
currentPm: pm ? { employeeId: pm.employee_id, employeeName: pm.employee_name } : null,

View File

@@ -11,6 +11,7 @@ interface UpdateProjectBody {
endDate?: string
contractAmount?: number
projectStatus?: string
businessId?: number | null
}
/**
@@ -46,10 +47,11 @@ export default defineEventHandler(async (event) => {
end_date = $6,
contract_amount = $7,
project_status = $8,
business_id = $9,
updated_at = NOW(),
updated_ip = $9,
updated_email = $10
WHERE project_id = $11
updated_ip = $10,
updated_email = $11
WHERE project_id = $12
`, [
body.projectName ?? existing.project_name,
body.projectType ?? existing.project_type ?? 'SI',
@@ -59,6 +61,7 @@ export default defineEventHandler(async (event) => {
body.endDate ?? existing.end_date,
body.contractAmount ?? existing.contract_amount,
body.projectStatus ?? existing.project_status,
body.businessId !== undefined ? body.businessId : existing.business_id,
clientIp,
userEmail,
projectId