|
@@ -285,27 +285,24 @@ class IndexService extends CrudService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 创新券订单/研发补贴,奖励兑现订单, 兑付成功(status=='1')
|
|
|
+ * 高企申报, 兑付成功(is_cashing=='1')
|
|
|
+ * 研发补贴/奖励兑现, 兑付成功(is_cashing==='1'),类型要区分
|
|
|
*/
|
|
|
async pac() {
|
|
|
- // 创新券兑付成功的数量
|
|
|
- const cres = await this.ctx.model.Cashing.count({ status: '1' });
|
|
|
- // 研发/奖励
|
|
|
- const rres = await this.ctx.model.RewardOrder.aggregate([
|
|
|
- { $match: { status: '1' } },
|
|
|
- {
|
|
|
- $group: {
|
|
|
- _id: '$type',
|
|
|
- count: { $sum: 1 },
|
|
|
- },
|
|
|
- },
|
|
|
+ const gq = await this.ctx.model.Declare.count({ is_cashing: '1' });
|
|
|
+ const yfjl = await this.ctx.model.Reward.aggregate([
|
|
|
+ { $match: { is_cashing: '1' } },
|
|
|
+ { $group: {
|
|
|
+ _id: '$type',
|
|
|
+ count: { $sum: 1 },
|
|
|
+ } },
|
|
|
]);
|
|
|
const arr = [
|
|
|
{ key: '奖励兑现', name: '奖励兑现' },
|
|
|
{ key: '研发补贴', name: '研发补贴' },
|
|
|
];
|
|
|
- const obj = this.setData(rres, arr);
|
|
|
- obj.push({ name: '创新券', value: cres });
|
|
|
+ const obj = this.setData(yfjl, arr);
|
|
|
+ obj.push({ name: '高企申报', value: gq });
|
|
|
return obj;
|
|
|
}
|
|
|
|