|
@@ -81,7 +81,7 @@ module.exports = app => {
|
|
|
*/
|
|
*/
|
|
|
async getAllPhasePay (tid, sort = 'ASC') {
|
|
async getAllPhasePay (tid, sort = 'ASC') {
|
|
|
const result = await this.getAllDataByCondition({
|
|
const result = await this.getAllDataByCondition({
|
|
|
- where: {tid: tid},
|
|
|
|
|
|
|
+ where: { tid: tid },
|
|
|
orders: [['phase_order', sort]],
|
|
orders: [['phase_order', sort]],
|
|
|
});
|
|
});
|
|
|
this.analysisPhasePay(result);
|
|
this.analysisPhasePay(result);
|
|
@@ -514,11 +514,11 @@ module.exports = app => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async checkStageRelaPhasePay(tid, sid) {
|
|
async checkStageRelaPhasePay(tid, sid) {
|
|
|
- if (this.ctx.stageRelaPhasePay === undefined) return;
|
|
|
|
|
|
|
+ if (this.ctx.stageRelaPhasePay !== undefined) return;
|
|
|
|
|
|
|
|
const allPhase = await this.getAllPhasePay(tid);
|
|
const allPhase = await this.getAllPhasePay(tid);
|
|
|
for (const phase of allPhase) {
|
|
for (const phase of allPhase) {
|
|
|
- if (phase.rela_stage.find(x => { return x.id === sid; })) {
|
|
|
|
|
|
|
+ if (phase.rela_stage.find(x => { return x.stage_id === sid; })) {
|
|
|
await this.doCheckPhase(phase);
|
|
await this.doCheckPhase(phase);
|
|
|
this.ctx.stageRelaPhasePay = phase;
|
|
this.ctx.stageRelaPhasePay = phase;
|
|
|
return;
|
|
return;
|