|
@@ -159,7 +159,7 @@ module.exports = app => {
|
|
|
*/
|
|
|
async getCurAuditor(stageId, times = 1) {
|
|
|
const sql =
|
|
|
- 'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, pa.`mobile`, pa.`telephone`, la.`times`, la.`order`, la.`status`, la.`opinion`, la.`begin_time`, la.`end_time` ' +
|
|
|
+ 'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, pa.`mobile`, pa.`telephone`, la.`times`, la.`order`, la.`status`, la.`opinion`, la.`begin_time`, la.`end_time`, la.audit_type, la.audit_order ' +
|
|
|
' FROM ?? AS la Left Join ?? AS pa On la.`aid` = pa.`id`' +
|
|
|
' WHERE la.`sid` = ? and la.`status` = ? and la.`times` = ?';
|
|
|
const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, stageId, auditConst.status.checking, times];
|
|
@@ -168,7 +168,7 @@ module.exports = app => {
|
|
|
|
|
|
async getCurAuditors(stageId, times = 1) {
|
|
|
const sql =
|
|
|
- 'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, pa.`mobile`, pa.`telephone`, la.`times`, la.`order`, la.`status`, la.`opinion`, la.`begin_time`, la.`end_time` ' +
|
|
|
+ 'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, pa.`mobile`, pa.`telephone`, la.`times`, la.`order`, la.`status`, la.`opinion`, la.`begin_time`, la.`end_time`, la.audit_type, la.audit_order ' +
|
|
|
' FROM ?? AS la Left Join ?? AS pa On la.`aid` = pa.`id`' +
|
|
|
' WHERE la.`sid` = ? and la.`status` = ? and la.`times` = ?';
|
|
|
const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, stageId, auditConst.status.checking, times];
|
|
@@ -2004,7 +2004,7 @@ module.exports = app => {
|
|
|
const max_order = group.length > 0 && group[group.length - 1].length > 0 ? group[group.length - 1][0].audit_order : -1;
|
|
|
for (const g of group) {
|
|
|
const his = {
|
|
|
- beginYear: '', beginDate: '', beginTime: '', endYear: '', endDate: '', endTime: '',
|
|
|
+ beginYear: '', beginDate: '', beginTime: '', endYear: '', endDate: '', endTime: '', begin_time: null, end_time: null,
|
|
|
audit_type: g[0].audit_type, audit_order: g[0].audit_order,
|
|
|
auditors: g
|
|
|
};
|
|
@@ -2015,6 +2015,7 @@ module.exports = app => {
|
|
|
}
|
|
|
his.is_final = his.audit_order === max_order;
|
|
|
if (g[0].begin_time) {
|
|
|
+ his.begin_time = g[0].begin_time;
|
|
|
const beginTime = this.ctx.moment(g[0].begin_time);
|
|
|
his.beginYear = beginTime.format('YYYY');
|
|
|
his.beginDate = beginTime.format('MM-DD');
|
|
@@ -2030,6 +2031,7 @@ module.exports = app => {
|
|
|
}
|
|
|
});
|
|
|
if (end_time) {
|
|
|
+ his.end_time = end_time;
|
|
|
const endTime = this.ctx.moment(end_time);
|
|
|
his.endYear = endTime.format('YYYY');
|
|
|
his.endDate = endTime.format('MM-DD');
|