|
@@ -456,13 +456,13 @@ module.exports = app => {
|
|
|
|
|
|
const times = zone.split(' - ');
|
|
|
if (times.length !== 2) throw '选择的汇总周期无效';
|
|
|
- const beginTime = moment(times[0], 'YYYY-MM').date();
|
|
|
- const endTime = moment(times[1], 'YYYY-MM').date();
|
|
|
+ const beginTime = moment(times[0], 'YYYY-MM');
|
|
|
+ const endTime = moment(times[1], 'YYYY-MM');
|
|
|
|
|
|
const stages = await this.ctx.service.stage.getAllDataByCondition({ where: { tid: tender.id } });
|
|
|
for (const stage of stages) {
|
|
|
- const sTime = moment(stage.s_time, 'YYYY-MM').date();
|
|
|
- if (sTime >= beginTime && sTime <= endTime) {
|
|
|
+ const sTime = moment(stage.s_time, 'YYYY-MM');
|
|
|
+ if (sTime.isBetween(beginTime, endTime, null, '[]')) {
|
|
|
await this.ctx.service.stage.doCheckStage(stage);
|
|
|
await this.ctx.service.stage.checkStageGatherData(stage);
|
|
|
|