import { test, zhenDuanBaoGao, 修复重复, 补充经纬度 } from "./biz/admin/provide";
import { initPool } from "./biz/gpt/indicatorPool";
import { initOutline } from "./biz/gpt/report";
import { getFuHuaQiEnterprise } from "./biz/initPassword";
import { updateQCCDataTask } from "./biz/qccInit";
import { initSMS } from "./biz/sms";
import { initSystemTask } from "./biz/systemTask";
import { initConfig, systemConfig} from "./config/serverConfig";
import { initDB } from "./db/mongo/dbInit";
import { httpServer } from "./net/http_server";
import { initBasicData } from "./tools/dataInit";

async function lanuch() {
    /**初始化配置解析 */
    await initConfig();
    /**初始化数据库 */
    await initDB();
    /**初始化底表数据 */
    await initBasicData();
    /**初始化系统任务 */
    await initSystemTask();
    /**初始化腾讯云短信配置 */
    await initSMS();
    /**初始化指标池 */
    await initPool();
    initOutline();
    /**创建http服务 */
    httpServer.createServer(systemConfig.port);
    console.log('This indicates that the server is started successfully.');
    // await zhenDuanBaoGao();
    // await 补充经纬度();
    // await test();
    // await zhenDuanBaoGao();
    // updateQCCDataTask();

    /**初始化孵化器上海张江药谷公共服务平台有限公司下所有企业密码 */
    // await getFuHuaQiEnterprise();
}



lanuch();