瀏覽代碼

合同及支付/回款审批人继承

ellisran 4 小時之前
父節點
當前提交
f3f11999ae
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/service/contract_sp_audit.js

+ 2 - 2
app/service/contract_sp_audit.js

@@ -976,8 +976,8 @@ module.exports = app => {
             const tableName = cpid ? this.ctx.service.contractPay.tableName : this.ctx.service.contract.tableName;
             const joinSql = cpid ? 'ca.cpid' : 'ca.cid';
             const cpidSql = cpid ? 'AND ca.`cpid` is not null' : 'AND ca.`cpid` is null';
-            const sql = 'SELECT a.* FROM ?? as c LEFT JOIN ?? as ca ON c.`id` = ' + joinSql + ' WHERE ' + optionsSql + ' AND c.`contract_type` = ? AND c.`uid` = ? ' + cpidSql + ' AND ca.`audit_order` > 0 ORDER BY c.`create_time` DESC';
-            const sqlParam = [tableName, this.tableName, options[this.setting.type], uid];
+            const sql = 'SELECT c.* FROM ?? as c LEFT JOIN ?? as ca ON c.`id` = ' + joinSql + ' WHERE ' + optionsSql + ' AND c.`contract_type` = ? AND c.`uid` = ? ' + cpidSql + ' AND ca.`audit_order` > 0 ORDER BY c.`create_time` DESC';
+            const sqlParam = [tableName, this.tableName, options.contract_type, uid];
             return await this.db.queryOne(sql, sqlParam);
         }