|
|
@@ -109,21 +109,25 @@ fun downloadBomFormatIssueLog( |
|
|
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"bom_format_issue.xlsx\"") |
|
|
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"bom_format_issue.xlsx\"") |
|
|
.body(resource) |
|
|
.body(resource) |
|
|
} |
|
|
} |
|
|
|
|
|
/** FP-MTMS Version Checklist | Functions Ref. No. 15 | v1.0.0 | 2026-07-16 */ |
|
|
@PostMapping("/import-bom/format-check") |
|
|
@PostMapping("/import-bom/format-check") |
|
|
fun checkBomFormat(@RequestBody request: BomFormatCheckRequest): BomFormatCheckResponse { |
|
|
fun checkBomFormat(@RequestBody request: BomFormatCheckRequest): BomFormatCheckResponse { |
|
|
return bomService.checkBomExcelFormat(request.batchId) |
|
|
return bomService.checkBomExcelFormat(request.batchId) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** FP-MTMS Version Checklist | Functions Ref. No. 15 | v1.0.0 | 2026-07-16 */ |
|
|
@PostMapping("/import-bom/preview") |
|
|
@PostMapping("/import-bom/preview") |
|
|
fun previewImportBom(@RequestBody request: BomImportPreviewRequest): BomImportPreviewResponse { |
|
|
fun previewImportBom(@RequestBody request: BomImportPreviewRequest): BomImportPreviewResponse { |
|
|
return bomService.previewImportBom(request.batchId, request.fileNames) |
|
|
return bomService.previewImportBom(request.batchId, request.fileNames) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** FP-MTMS Version Checklist | Functions Ref. No. 15 | v1.0.0 | 2026-07-16 */ |
|
|
@PostMapping("/import-bom/revalidate") |
|
|
@PostMapping("/import-bom/revalidate") |
|
|
fun revalidateImportBomItem(@RequestBody request: BomImportRevalidateRequest): BomImportRevalidateResponse { |
|
|
fun revalidateImportBomItem(@RequestBody request: BomImportRevalidateRequest): BomImportRevalidateResponse { |
|
|
return bomService.revalidateImportBomItem(request.batchId, request.fileName, request.overrides) |
|
|
return bomService.revalidateImportBomItem(request.batchId, request.fileName, request.overrides) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** FP-MTMS Version Checklist | Functions Ref. No. 15 | v1.0.0 | 2026-07-16 */ |
|
|
@PostMapping("/import-bom/export-corrected") |
|
|
@PostMapping("/import-bom/export-corrected") |
|
|
fun exportCorrectedImportBomExcel(@RequestBody request: BomImportExportCorrectedRequest): ResponseEntity<Resource> { |
|
|
fun exportCorrectedImportBomExcel(@RequestBody request: BomImportExportCorrectedRequest): ResponseEntity<Resource> { |
|
|
// Do not put Chinese filename in Content-Disposition (Tomcat rejects non-Latin-1 headers). |
|
|
// Do not put Chinese filename in Content-Disposition (Tomcat rejects non-Latin-1 headers). |
|
|
@@ -219,12 +223,14 @@ fun downloadBomFormatIssueLog( |
|
|
return bomService.findBomSummaryByItemCode(code.trim()) |
|
|
return bomService.findBomSummaryByItemCode(code.trim()) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** FP-MTMS Version Checklist | Functions Ref. No. 17 | v1.0.0 | 2026-07-16 */ |
|
|
@GetMapping("/versions") |
|
|
@GetMapping("/versions") |
|
|
fun listBomVersions( |
|
|
fun listBomVersions( |
|
|
@RequestParam code: String, |
|
|
@RequestParam code: String, |
|
|
@RequestParam bomKind: String, |
|
|
@RequestParam bomKind: String, |
|
|
): List<BomVersionSummary> = bomService.listBomVersions(code, bomKind) |
|
|
): List<BomVersionSummary> = bomService.listBomVersions(code, bomKind) |
|
|
|
|
|
|
|
|
|
|
|
/** FP-MTMS Version Checklist | Functions Ref. No. 17 | v1.0.0 | 2026-07-16 */ |
|
|
@PostMapping("/{id}/save-as-new-version") |
|
|
@PostMapping("/{id}/save-as-new-version") |
|
|
fun saveBomAsNewVersion( |
|
|
fun saveBomAsNewVersion( |
|
|
@PathVariable id: Long, |
|
|
@PathVariable id: Long, |
|
|
@@ -236,12 +242,14 @@ fun getBomDetail(@PathVariable id: Long): BomDetailResponse { |
|
|
return bomService.getBomDetail(id) |
|
|
return bomService.getBomDetail(id) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** FP-MTMS Version Checklist | Functions Ref. No. 17 | v1.0.0 | 2026-07-16 */ |
|
|
@PostMapping("/{id}/activate-version") |
|
|
@PostMapping("/{id}/activate-version") |
|
|
fun activateBomVersion(@PathVariable id: Long): BomDetailResponse { |
|
|
fun activateBomVersion(@PathVariable id: Long): BomDetailResponse { |
|
|
return bomService.activateBomVersion(id) |
|
|
return bomService.activateBomVersion(id) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
|
|
|
* FP-MTMS Version Checklist | Functions Ref. No. 17 | v1.0.0 | 2026-07-16 |
|
|
* Edit BOM (basic fields + materials + process lines). |
|
|
* Edit BOM (basic fields + materials + process lines). |
|
|
* baseScore is recalculated on server. |
|
|
* baseScore is recalculated on server. |
|
|
*/ |
|
|
*/ |
|
|
|