Browse Source

报表,材差工料查询

MaiXinRong 2 years ago
parent
commit
d6d6b45f6a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/lib/rm/material.js

+ 1 - 1
app/lib/rm/material.js

@@ -181,7 +181,7 @@ class ReportMemoryMaterial {
                         '    msb.msg_tp, msb.msg_times, msb.msg_spread, mbh.m_up_risk, mbh.m_down_risk, msb.m_spread, msb.m_tp, mbh.pre_tp, msb.m_tax_tp, mbh.tax_pre_tp, mbh.origin, ' +
                         '    msb.remark, msb.is_summary, mbh.m_tax, mb.in_time' +
                         `  FROM ${this.ctx.service.materialStageBills.tableName} msb` +
-                        '  LEFT JOIN ' + this.ctx.service.materialBillsHistory.tableName + ' mbh ON msb.mb_id = mbh.mb_id' +
+                        '  LEFT JOIN ' + this.ctx.service.materialBillsHistory.tableName + ' mbh ON msb.mb_id = mbh.mb_id AND msb.mid = mbh.mid' +
                         '  LEFT JOIN ' + this.ctx.service.materialBills.tableName + ' mb ON msb.mb_id = mb.id ' +
                         '  LEFT JOIN ' + this.ctx.service.materialStage.tableName + ' ms ON msb.ms_id = ms.id ' +
                         '  WHERE msb.mid = ?'+