feat(est-test): 구버전 EST Plus(.est) 불러오기·저장·단가비교
- 394/565 바이트 레코드(Extended·ShortString) 읽기·쓰기, 표별 변환과 설계변경 c* 파일 - 호표 코드 매기기·품명규격으로 연결 코드 붙이기, 저장 금액 유지 - 단가비교 창(4종, 차례 짝, 합계 다름 표시, 더블클릭 이동), Ctrl+Alt+E · Ctrl+Shift+F12 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ const { importEstx, table: dbisamTable } = require("./import-estx.cjs");
|
||||
const { readXls } = require("./xls-read.cjs");
|
||||
const bookStore = require("./book-store.cjs");
|
||||
const wongaFormats = require("./wonga-formats.cjs");
|
||||
const legacyEstPlus = require("./legacy-estplus.cjs");
|
||||
const printFormat = require("./print-format.cjs");
|
||||
const pfotTemplate =
|
||||
process.env.EST_PFOT_TEMPLATE || "C:/Dasansoft/Est Plus 2/System/EstFormat/main.pfot";
|
||||
@@ -114,6 +115,7 @@ const allowed = new Set([
|
||||
"native-dongwon-check.js",
|
||||
"native-excel-files.js",
|
||||
"native-option-all.js",
|
||||
"native-estplus.js",
|
||||
"native-actions-more.js",
|
||||
"native-wonga-tools.js",
|
||||
"native-estimate-print.js",
|
||||
@@ -346,6 +348,21 @@ const server = http.createServer(async (req, res) => {
|
||||
reply(res, 200, readXls(await body(req)));
|
||||
return;
|
||||
}
|
||||
if (req.method === "POST" && url.pathname === "/api/estplus-read") {
|
||||
const name = String(url.searchParams.get("name") || "EST Plus 자료").slice(0, 200);
|
||||
reply(res, 200, legacyEstPlus.read(await body(req), name));
|
||||
return;
|
||||
}
|
||||
if (req.method === "POST" && url.pathname === "/api/estplus-compare") {
|
||||
reply(res, 200, legacyEstPlus.compare(await body(req), Number(url.searchParams.get("kind"))));
|
||||
return;
|
||||
}
|
||||
if (req.method === "POST" && url.pathname === "/api/estplus-write") {
|
||||
const project = JSON.parse((await body(req)).toString("utf8"));
|
||||
if (!project?.tables) throw Error("공사 자료 형식 오류");
|
||||
reply(res, 200, legacyEstPlus.write(project), "application/octet-stream");
|
||||
return;
|
||||
}
|
||||
if (req.method === "GET" && url.pathname === "/api/wonga-formats") {
|
||||
const index = url.searchParams.get("index");
|
||||
reply(res, 200, wongaFormats.get(url.searchParams.get("std") === "1", index ?? undefined));
|
||||
|
||||
Reference in New Issue
Block a user