Commit dab713b8 by Leo Zheng

修改获取全天游客数量策略

parent 4738ff88
......@@ -34,6 +34,10 @@ export class totalVisitorFlowStrategy extends abstractDataStrategyLeft {
private getTotalVisitorByDay(data: any, date: string) {
const visitorCount: Map<string, number> = new Map();
visitorCount.set('total', 0);
visitorCount.set('老人', 0);
visitorCount.set('儿童', 0);
visitorCount.set('学生', 0);
visitorCount.set('其他', 0);
data.forEach(row => {
const rowDate = excelSerialToJSDate(row['游玩时间']);
......
......@@ -76,7 +76,7 @@ export abstract class abstractDataStrategyRight implements dataStrategy {
const rowDate = excelSerialToJSDate(row['创建时间']);
const rowYear = rowDate.getFullYear();
if (rowYear === year) {
if (rowYear == year) {
count.set(row[target], count.get(row[target]) + 1);
}
});
......
......@@ -6,7 +6,7 @@ let fs = require('fs');
async function lanuch() {
/**初始化xml文件配置 */
await initConfig();
httpServer.createServer( systemConfig.port );
httpServer.createServer( systemConfig.port, systemConfig.host );
console.log('This indicates that the server is started successfully.');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment