-แก้ไขระบบ Login Add

This commit is contained in:
x2Skyz
2025-11-21 15:00:37 +07:00
parent 2237163847
commit 02b1a6f31b
3 changed files with 27 additions and 13 deletions

View File

@@ -20,16 +20,30 @@ export class AccountingAddService {
return result
}
async getLatestAccountingSeq(database) {
// async getLatestAccountingSeq(database) {
// const sql = `
// SELECT
// actseq
// FROM ${database}.actmst
// WHERE actseq=(SELECT max(actseq) FROM ${database}.actmst)
// `
// const params = []
// const result = await this.generalService.executeQueryParam(database, sql, params);
// return result
// }
async genNum(database) {
const sql = `
SELECT
actseq
MAX(actseq) as max_seq
FROM ${database}.actmst
WHERE actseq=(SELECT max(actseq) FROM ${database}.actmst)
`
const params = []
const result = await this.generalService.executeQueryParam(database, sql, params);
return result
const aryResult = await this.generalService.executeQueryParam(database, sql, params);
const lastSeq = aryResult[0]?.max_seq || 0;
return lastSeq + 1;
}
}