ProjectSearch*: initial (working)

Signed-off-by: supphakitd <67319010028@technictrang.ac.th>
This commit is contained in:
2025-11-17 18:06:19 +07:00
parent e708a48075
commit 92e5f28cf1
2 changed files with 4 additions and 6 deletions

View File

@@ -29,19 +29,17 @@ export class projectSearch {
let token = req.headers.authorization?.split(' ')[1];
const decoded = verifyToken(token);
let id = decoded.id
let username = decoded.name
database = decoded.organization
let columnParams = req.query.column
var column = ""
if(columnParams == 'edit'){
column = `prjnam, prjwntbdg`
condition['prjseq'] = req.body.request.bdgseq
condition['prjseq'] = req.body.request.prjseq
} else if(columnParams == 'result' || columnParams == undefined || columnParams == ''){
column = `prjnam, prjttl`
column = `prjseq, prjnam, prjwntbdg, prjacpbdg, prjbdgcod, prjcomstt, prjacpdtm`
}
aryResult = await this.projectSearchService.getProjectSearch(database, id, column, condition);
aryResult = await this.projectSearchService.getProjectSearch(database, column, condition);
} catch (error) {
idx = 1;

View File

@@ -6,7 +6,7 @@ export class ProjectSearchService {
this.generalService = new GeneralService()
}
async getProjectSearch(database, id, column, condition) {
async getProjectSearch(database, column, condition) {
const sql = `
SELECT
${column}