Enhance Item Inspection and Outbound Functionality

- Added `apply_process_name` to the item inspection controller, allowing for better clarity in process identification by joining with the `process_mng` table.
- Updated the outbound controller to include additional delivery details, such as `delivery_destination_name` and `customer_name`, with fallback logic for improved data accuracy.
- Enhanced the query logic to ensure proper handling of delivery addresses and customer information, improving the overall data retrieval process.

(TASK: ERP-XXX)
This commit is contained in:
kjs
2026-05-22 09:59:20 +09:00
parent c8994b49fc
commit 9f9be20e34
28 changed files with 781 additions and 152 deletions

View File

@@ -237,8 +237,8 @@ export async function createPkgUnitItem(
}
const result = await pool.query(
`INSERT INTO pkg_unit_item (company_code, pkg_code, item_number, pkg_qty, writer)
VALUES ($1,$2,$3,$4,$5)
`INSERT INTO pkg_unit_item (id, company_code, pkg_code, item_number, pkg_qty, writer, created_date)
VALUES (gen_random_uuid()::text, $1,$2,$3,$4,$5, NOW())
RETURNING *`,
[companyCode, pkg_code, item_number, pkg_qty, req.user!.userId]
);
@@ -513,8 +513,8 @@ export async function createLoadingUnitPkg(
}
const result = await pool.query(
`INSERT INTO loading_unit_pkg (company_code, loading_code, pkg_code, max_load_qty, load_method, writer)
VALUES ($1,$2,$3,$4,$5,$6)
`INSERT INTO loading_unit_pkg (id, company_code, loading_code, pkg_code, max_load_qty, load_method, writer, created_date)
VALUES (gen_random_uuid()::text, $1,$2,$3,$4,$5,$6, NOW())
RETURNING *`,
[companyCode, loading_code, pkg_code, max_load_qty, load_method, req.user!.userId]
);