|
@@ -1266,7 +1266,7 @@ module.exports = app => {
|
|
|
|
|
|
async _gatherStageJgcl(tender, stage) {
|
|
|
const data = await this.ctx.service.stageJgcl.getStageData(stage);
|
|
|
- const preData = stage.order > 1 ? await this.ctx.service.stageJgcl.getPreStageData(stage.order) : 0;
|
|
|
+ const preData = stage.order > 1 ? await this.ctx.service.stageJgcl.getPreStageData(stage.tid, stage.order) : 0;
|
|
|
for (const d of data) {
|
|
|
const pd = this.ctx.helper._.find(preData, {uuid: d.uuid});
|
|
|
if (pd) {
|
|
@@ -1331,7 +1331,7 @@ module.exports = app => {
|
|
|
}
|
|
|
|
|
|
async _gatherStageBonus(tender, stage) {
|
|
|
- const data = await this.ctx.service.stageBonus.getEndStageData(stage.order);
|
|
|
+ const data = await this.ctx.service.stageBonus.getEndStageData(tender.id, stage.order);
|
|
|
for (const d of data) {
|
|
|
const names = this.ctx.helper._.map(d.proof_file, function (x) {
|
|
|
return x.filename + x.fileext;
|
|
@@ -1369,6 +1369,7 @@ module.exports = app => {
|
|
|
this.resultStageBonus = [];
|
|
|
const gsSetting = JSON.parse(gsDefine.setting);
|
|
|
for (const tender of gsCustom.tenders) {
|
|
|
+ console.log(tender, gsSetting.type);
|
|
|
switch (gsSetting.type) {
|
|
|
case 'month':
|
|
|
await this._gatherMonthStageBonus(tender, gsCustom.month);
|
|
@@ -1389,7 +1390,7 @@ module.exports = app => {
|
|
|
|
|
|
async _gatherStageOther(tender, stage) {
|
|
|
const data = await this.ctx.service.stageOther.getStageData(stage);
|
|
|
- const preData = stage.order > 1 ? await this.ctx.service.stageOther.getPreStageData(stage.order) : [];
|
|
|
+ const preData = stage.order > 1 ? await this.ctx.service.stageOther.getPreStageData(stage.tid, stage.order) : [];
|
|
|
for (const d of data) {
|
|
|
const pd = this.ctx.helper._.find(preData, {uuid: d.uuid});
|
|
|
if (pd) {
|
|
@@ -1448,7 +1449,7 @@ module.exports = app => {
|
|
|
|
|
|
async _gatherStageSafeProd(tender, stage) {
|
|
|
const data = await this.ctx.service.stageSafeProd.getStageData(stage);
|
|
|
- const preData = stage.order > 1 ? await this.ctx.service.stageSafeProd.getPreStageData(stage.order) : [];
|
|
|
+ const preData = stage.order > 1 ? await this.ctx.service.stageSafeProd.getPreStageData(stage.tid, stage.order) : [];
|
|
|
for (const d of data) {
|
|
|
const pd = this.ctx.helper._.find(preData, {uuid: d.uuid});
|
|
|
if (pd) {
|
|
@@ -1527,7 +1528,7 @@ module.exports = app => {
|
|
|
|
|
|
async _gatherStageTempLand(tender, stage) {
|
|
|
const data = await this.ctx.service.stageTempLand.getStageData(stage);
|
|
|
- const preData = stage.order > 1 ? await this.ctx.service.stageTempLand.getPreStageData(stage.order) : [];
|
|
|
+ const preData = stage.order > 1 ? await this.ctx.service.stageTempLand.getPreStageData(stage.tid, stage.order) : [];
|
|
|
for (const d of data) {
|
|
|
const pd = this.ctx.helper._.find(preData, {uuid: d.uuid});
|
|
|
if (pd) {
|