summaryrefslogtreecommitdiff
path: root/app/api/(S-ERP)
diff options
context:
space:
mode:
Diffstat (limited to 'app/api/(S-ERP)')
-rw-r--r--app/api/(S-ERP)/(ECC)/IF_ECC_EVCP_BIDDING_PROJECT/route.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/api/(S-ERP)/(ECC)/IF_ECC_EVCP_BIDDING_PROJECT/route.ts b/app/api/(S-ERP)/(ECC)/IF_ECC_EVCP_BIDDING_PROJECT/route.ts
index a63fff40..0c36974f 100644
--- a/app/api/(S-ERP)/(ECC)/IF_ECC_EVCP_BIDDING_PROJECT/route.ts
+++ b/app/api/(S-ERP)/(ECC)/IF_ECC_EVCP_BIDDING_PROJECT/route.ts
@@ -279,6 +279,14 @@ async function saveToDatabase(data: RequestData) {
where: eq(biddingProjects.pspid, project.pspid)
});
+ // sector 값에 따라 pjtType 결정
+ let pjtType: 'SHIP' | 'HULL' | null = null;
+ if (project.sector === 'S') {
+ pjtType = 'SHIP';
+ } else if (project.sector === 'M') {
+ pjtType = 'HULL';
+ }
+
const projectValues: NewBiddingProject = {
pspid: project.pspid,
projNm: project.projNm,
@@ -296,7 +304,8 @@ async function saveToDatabase(data: RequestData) {
pmodelUom: project.pmodelUom,
txt04: project.txt04,
txt30: project.txt30,
- estmPm: project.estmPm
+ estmPm: project.estmPm,
+ pjtType: pjtType
};
if (existingProject) {