소스 검색

材差,新增指标数据

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,
             opinion: user.opinion,
             end_time: auditors && auditors.length > 0 ? auditors[0].begin_time : null,
             end_time: auditors && auditors.length > 0 ? auditors[0].begin_time : null,
             sort: 0,
             sort: 0,
+            tp_data: this.ctx.material.tp_data,
         }, ...auditors];
         }, ...auditors];
         return result;
         return result;
     }
     }

+ 1 - 1
app/service/material_audit.js

@@ -68,7 +68,7 @@ module.exports = app => {
 
 
         async getFinalAuditGroup(materialId, times = 1) {
         async getFinalAuditGroup(materialId, times = 1) {
             const sql =
             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` ' +
                 '  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`';
                 '  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];
             const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, materialId, times];