Commit dfcb3dd9 by chenjinjing

初始化上海张江药谷公共服务平台有限公司下的所有未迁出企业密码

parent 55df0f92
import * as sysTools from "../tools/system";
import * as enterpriseData from "../data/enterprise/enterprise";
/**
* 修改企业密码为统一信用代码后六位
* @param uscc 企业统一信用代码
*/
export async function enterpriseChangePwd(uscc:string) {
let dataBaseInfo = await enterpriseData.findEnterpriseByUscc(uscc);
let pwd = uscc.slice(-6);
console.log(`已初始化企业:${uscc}, 密码:${pwd}`);
dataBaseInfo.pwd = sysTools.getPwdMd5(uscc, sysTools.md5PwdStr(pwd));
await dataBaseInfo.save();
return {isSuccess:true};
}
/**
* 匹配上海张江药谷公共服务平台有限公司
*/
export async function getFuHuaQiEnterprise() {
let dataBaseInfo = await enterpriseData.findEnterpriseList({"fuHuaQiUscc": "913101157664917120", "state":{"$ne":4 }}); //上海张江药谷公共服务平台有限公司
console.log(dataBaseInfo.length);
for (let i = 0; i < dataBaseInfo.length; i++) {
let enterpriseInfo = dataBaseInfo[i];
await enterpriseChangePwd(enterpriseInfo.uscc);
console.log();
}
return {isSuccess:true};
}
import { test, zhenDuanBaoGao, 修复重复, 补充经纬度 } from "./biz/admin/provide"; import { test, zhenDuanBaoGao, 修复重复, 补充经纬度 } from "./biz/admin/provide";
import { initPool } from "./biz/gpt/indicatorPool"; import { initPool } from "./biz/gpt/indicatorPool";
import { initOutline } from "./biz/gpt/report"; import { initOutline } from "./biz/gpt/report";
import { getFuHuaQiEnterprise } from "./biz/initPassword";
import { updateQCCDataTask } from "./biz/qccInit"; import { updateQCCDataTask } from "./biz/qccInit";
import { initSMS } from "./biz/sms"; import { initSMS } from "./biz/sms";
import { initSystemTask } from "./biz/systemTask"; import { initSystemTask } from "./biz/systemTask";
...@@ -31,6 +32,9 @@ async function lanuch() { ...@@ -31,6 +32,9 @@ async function lanuch() {
// await test(); // await test();
// await zhenDuanBaoGao(); // await zhenDuanBaoGao();
// updateQCCDataTask(); // updateQCCDataTask();
/**初始化孵化器上海张江药谷公共服务平台有限公司下所有企业密码 */
await getFuHuaQiEnterprise();
} }
......
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