summaryrefslogtreecommitdiff
path: root/lib/procurement-rfqs/services.ts
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-06-01 13:52:21 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-06-01 13:52:21 +0000
commitbac0228d21b7195065e9cddcc327ae33659c7bcc (patch)
tree8f3016ae4533c8706d0c00a605d9b1d41968c2bc /lib/procurement-rfqs/services.ts
parent2fdce8d7a57c792bba0ac36fa554dca9c9cc31e3 (diff)
(대표님) 20250601까지 작업사항
Diffstat (limited to 'lib/procurement-rfqs/services.ts')
-rw-r--r--lib/procurement-rfqs/services.ts21
1 files changed, 6 insertions, 15 deletions
diff --git a/lib/procurement-rfqs/services.ts b/lib/procurement-rfqs/services.ts
index 32048768..3816605c 100644
--- a/lib/procurement-rfqs/services.ts
+++ b/lib/procurement-rfqs/services.ts
@@ -721,6 +721,8 @@ export async function sendRfq(rfqId: number) {
rfqSendDate: true,
remark: true,
rfqSealedYn: true,
+ itemCode: true,
+ itemName: true,
},
with: {
project: {
@@ -730,13 +732,6 @@ export async function sendRfq(rfqId: number) {
name: true,
}
},
- item: {
- columns: {
- id: true,
- itemCode: true,
- itemName: true,
- }
- },
createdByUser: {
columns: {
id: true,
@@ -1654,11 +1649,7 @@ export async function getVendorQuotations(input: GetQuotationsSchema, vendorId:
offset,
limit: perPage,
with: {
- rfq: {
- with: {
- item: true, // 여기서 item 정보도 가져옴
- }
- },
+ rfq:true,
vendor: true,
}
});
@@ -1669,7 +1660,6 @@ export async function getVendorQuotations(input: GetQuotationsSchema, vendorId:
.where(finalWhere || undefined)
.then(rows => rows[0]);
- console.log(totalCount)
// 페이지 수 계산
const pageCount = Math.ceil(Number(totalCount) / perPage);
@@ -1894,7 +1884,8 @@ export async function fetchExternalRfqs() {
rfqCode,
projectId: randomProject.id,
series:seriesValue,
- itemId: randomItem.id,
+ itemCode: randomItem.itemCode || `ITEM-${Math.floor(Math.random() * 1000)}`, // itemId 대신 itemCode 사용
+ itemName: randomItem.itemName || `임의 아이템 ${Math.floor(Math.random() * 100)}`, // itemName 추가
dueDate,
rfqSendDate: null, // null로 설정/
status: "RFQ Created",
@@ -1932,7 +1923,7 @@ export async function fetchExternalRfqs() {
rfqItem: `RFQI-${Math.floor(Math.random() * 1000)}`,
prItem: `PRI-${Math.floor(Math.random() * 1000)}`,
prNo: `PRN-${Math.floor(Math.random() * 1000)}`,
- itemId: randomItem.id,
+ // itemId: randomItem.id,
materialCode,
materialCategory: "Standard",
acc: `ACC-${Math.floor(Math.random() * 100)}`,