|
@@ -209,9 +209,9 @@ module.exports = app => {
|
|
|
uid, auditConst.status.uncheck, auditConst.status.checkNo];
|
|
|
const result = await this.db.query(sql, params);
|
|
|
if (result && result.length > 0) {
|
|
|
- for (const one of result) {
|
|
|
+ for (const one of this._.uniqBy(result, 'id')) {
|
|
|
const maxOrder = await this.count({
|
|
|
- tr_id: one.id,
|
|
|
+ tr_id: one.tr_id,
|
|
|
});
|
|
|
if (one.order === maxOrder) {
|
|
|
return 1;
|
|
@@ -232,9 +232,9 @@ module.exports = app => {
|
|
|
uid, auditConst.status.uncheck, auditConst.status.checkNo];
|
|
|
const result = await this.db.query(sql, params);
|
|
|
if (result && result.length > 0) {
|
|
|
- for (const one of result) {
|
|
|
+ for (const one of this._.uniqBy(result, 'id')) {
|
|
|
const maxOrder = await this.count({
|
|
|
- tr_id: one.id,
|
|
|
+ tr_id: one.tr_id,
|
|
|
});
|
|
|
if (one.order === maxOrder) {
|
|
|
return 1;
|