feat: add report preset management API

- Implemented CRUD operations for report presets in reportPresetController.
- Added routes for listing, creating, updating, and deleting report presets.
- Ensured authentication is required for all preset operations.
- Enhanced MaterialData interface to include optional width, height, and thickness properties.
This commit is contained in:
DDD1542
2026-04-16 12:08:28 +09:00
parent 2e8350c0f6
commit 623cbc0b61
22 changed files with 1411 additions and 391 deletions

View File

@@ -90,7 +90,10 @@ export async function getList(req: AuthenticatedRequest, res: Response) {
id.id AS detail_id,
id.seq_no,
id.inbound_type AS detail_inbound_type,
wh.warehouse_name
wh.warehouse_name,
COALESCE(ii.width::text, '') AS width,
COALESCE(ii.height::text, '') AS height,
COALESCE(ii.thickness::text, '') AS thickness
FROM (
SELECT DISTINCT ON (h.company_code, h.inbound_number) h.*
FROM inbound_mng h
@@ -101,6 +104,12 @@ export async function getList(req: AuthenticatedRequest, res: Response) {
LEFT JOIN warehouse_info wh
ON im.warehouse_code = wh.warehouse_code
AND im.company_code = wh.company_code
LEFT JOIN LATERAL (
SELECT width, height, thickness FROM item_info
WHERE item_number = COALESCE(id.item_number, im.item_number)
AND company_code = im.company_code
LIMIT 1
) ii ON true
${whereClause}
ORDER BY im.created_date DESC, id.seq_no ASC
`;