Преглед на файлове

材差,新增指标数据

MaiXinRong преди 1 година
родител
ревизия
f370b29fa0
променени са 2 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 1 0
      app/lib/rm/material.js
  2. 1 1
      app/service/material_audit.js

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

@@ -113,6 +113,7 @@ class ReportMemoryMaterial {
             opinion: user.opinion,
             end_time: auditors && auditors.length > 0 ? auditors[0].begin_time : null,
             sort: 0,
+            tp_data: this.ctx.material.tp_data,
         }, ...auditors];
         return result;
     }

+ 1 - 1
app/service/material_audit.js

@@ -68,7 +68,7 @@ module.exports = app => {
 
         async getFinalAuditGroup(materialId, times = 1) {
             const sql =
-                'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, pa.`mobile`, pa.`telephone`, pa.`sign_path`, la.`times`, la.`mid`, Max(la.`order`) as max_order ' +
+                'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, pa.`mobile`, pa.`telephone`, pa.`sign_path`, la.`times`, la.`mid`, Max(la.`order`) as max_order, GROUP_CONCAT(la.tp_data) as tp_data ' +
                 '  FROM ?? AS la Left Join ?? AS pa On la.`aid` = pa.`id` ' +
                 '  WHERE la.`mid` = ? and la.`times` = ? GROUP BY la.`aid` ORDER BY la.`order`';
             const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, materialId, times];