forked from ttc/micro-service-api
-.
This commit is contained in:
@@ -36,7 +36,8 @@ export class transactionSearch {
|
||||
column = `trnseq, trnprjnam, trnprjseq, trnbdgcod, trncomstt`
|
||||
condition['trnseq'] = req.body.request.trnseq
|
||||
} else if(columnParams == 'result' || columnParams == undefined || columnParams == ''){
|
||||
column = `trnprjnam, trnbdgcod, ${database}.translatedtl('COMSTT', trncomstt) AS trncomstt, trnacpdtm`
|
||||
condition['trnprjseq'] = req.body.request.trnprjseq
|
||||
column = `trnseq, trnprjnam, trnbdgcod, ${database}.translatebdg(trnbdgcod) AS trnbdgnam, ${database}.translatedtl('COMSTT', trncomstt) AS trncomstt, trnexpbdg, trnacpdtm`
|
||||
}
|
||||
|
||||
aryResult = await this.transactionSearchService.getTransactionSearch(database, column, condition);
|
||||
@@ -45,7 +46,7 @@ export class transactionSearch {
|
||||
idx = 1;
|
||||
} finally {
|
||||
if (idx === 1) return sendError('เกิดข้อผิดพลาดไม่คาดคิดเกิดขึ้น', 'Unexpected error');
|
||||
if (aryResult == 0) return sendError('ไม่พบการมีอยู่ของข้อมูล', 'Cannot Find Any Data');
|
||||
// if (aryResult == 0) return sendError('ไม่พบการมีอยู่ของข้อมูล', 'Cannot Find Any Data');
|
||||
return aryResult
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user