Commit e3b9641e by lixinming

no message

parent 259f4c07
...@@ -341,6 +341,11 @@ function getEnterpriseIndustry(名称, 企业类型, 国标大类, 国标一类, ...@@ -341,6 +341,11 @@ function getEnterpriseIndustry(名称, 企业类型, 国标大类, 国标一类,
if (paramInCheckStr("汽车零部件制造", 企查查一类 ) || paramInCheckStr("汽车整车制造", 企查查一类 ) ) { if (paramInCheckStr("汽车零部件制造", 企查查一类 ) || paramInCheckStr("汽车整车制造", 企查查一类 ) ) {
return {industry:INDUSTRY.汽车产业, subIndustry:INDUSTRY.汽车产业}; return {industry:INDUSTRY.汽车产业, subIndustry:INDUSTRY.汽车产业};
} }
//看这里
if (paramInCheckStr("新能源", 企查查一类 ) || checkInmatch(主营业务, "新能源") ) {
return {industry:INDUSTRY.新能源, subIndustry:INDUSTRY.新能源};
}
//这里结束n
if(paramInCheckStr("医药制造", 国标一类 ) || paramInCheckStr("医药生物", 企查查大类 ) ) { if(paramInCheckStr("医药制造", 国标一类 ) || paramInCheckStr("医药生物", 企查查大类 ) ) {
if (paramInCheckStr("医药商业", 企查查一类 )) return {industry:INDUSTRY.生物医药, subIndustry:MEDICALSUB.医药商业}; if (paramInCheckStr("医药商业", 企查查一类 )) return {industry:INDUSTRY.生物医药, subIndustry:MEDICALSUB.医药商业};
else if (paramInCheckStr("医疗器械制造", 企查查一类 )) return {industry:INDUSTRY.生物医药, subIndustry:MEDICALSUB.医疗器械制造}; else if (paramInCheckStr("医疗器械制造", 企查查一类 )) return {industry:INDUSTRY.生物医药, subIndustry:MEDICALSUB.医疗器械制造};
...@@ -895,4 +900,55 @@ function itemIsPointInPolygon(point,pts){ ...@@ -895,4 +900,55 @@ function itemIsPointInPolygon(point,pts){
} else { //奇数在多边形内 } else { //奇数在多边形内
return true; return true;
} }
}; };
\ No newline at end of file
export async function test111222() {
let 企业名单 = onceSheetBecomeOfblockData('qcc_20251210.xlsx', "sheet1");
let dataList = 企业名单[0].blockData;
let 原来 = onceSheetBecomeOfblockData('企业户管库_开发区镇查看202509.xlsx', "企业户管库");
let dataList2 = 原来[0].blockData;
let enterpriseList = [dataList2[0]];
let map = {};
let testMap = {};
for (let i= 0; i < dataList.length; i++) {
let subList = dataList[i];
let type = subList[16];
if (!type) continue
let typestr = "";
let typeNum = getEnterpriseType(type);
if (typeNum == ENTERPRISETYPE.外商投资企业 || typeNum == ENTERPRISETYPE.港澳台投资企业) {
map[subList[0]] = "外资企业";
}
// if (type.indexOf("其他港澳台投资企业") > -1 || type.indexOf("港澳台投资股份有限公司" ) > -1 || type.indexOf("港澳台独资企业" ) > -1 || type.indexOf("港澳台合作经营企业" ) > -1 || type.indexOf("港澳台合资经营企业" ) > -1 || type.indexOf("中外台资经营企业" ) > -1 || type.indexOf("中外合作经营企业" ) > -1 || type.indexOf("外资企业" ) > -1 || type.indexOf("外商投资股份有限公司" ) > -1 || type.indexOf("其他外商投资企业") > -1) {
// typestr = "外资企业"
// map[subList[0]] = typestr;
// }
testMap[type] = 1;
}
for (let i = 1; i < dataList2.length; i++){
let subList = dataList2[i];
if (map[subList[0]]) {
subList.push(map[subList[0]]);
}
enterpriseList.push(subList)
};
let data = [
{
name:"sheet1",
data:enterpriseList
}
];
let buff = xlsx.build(data);
fs.writeFileSync(path.join(__dirname.substring(0,__dirname.indexOf("out")), "res", '标记企业12_10.xlsx' ), buff);
// await enterpriseData.initEnterpriseBase(enterpriseList);
console.log("企业数据导入成功");
}
\ No newline at end of file
...@@ -14,7 +14,8 @@ export enum INDUSTRY{ ...@@ -14,7 +14,8 @@ export enum INDUSTRY{
文化创意, 文化创意,
物流及仓储, 物流及仓储,
综合, 综合,
其他 = 14 其他 = 14,
新能源
} }
export enum SUBINDUSTRY { export enum SUBINDUSTRY {
......
import { dataOut } from "./biz/dataOut"; import { dataOut } from "./biz/dataOut";
import { out20251031 } from "./biz/dataSync/data"; import { out20251031 } from "./biz/dataSync/data";
import { initData } from "./biz/dataSync/dataInit"; import { initData, test111 } from "./biz/dataSync/dataInit";
import { initEnterpriseData } from "./biz/dataSync/newDataInit"; import { initEnterpriseData, test111222 } from "./biz/dataSync/newDataInit";
import { initQueue } from "./biz/labelEnterpriseList"; import { initQueue } from "./biz/labelEnterpriseList";
import { initConfig, systemConfig} from "./config/serverConfig"; import { initConfig, systemConfig} from "./config/serverConfig";
import { initDB } from "./db/mongo/dbInit"; import { initDB } from "./db/mongo/dbInit";
...@@ -23,7 +23,7 @@ async function lanuch() { ...@@ -23,7 +23,7 @@ async function lanuch() {
// await initEnterpriseData(); // await initEnterpriseData();
// await out20251031(); // await out20251031();
// await dataOut(); // await dataOut();
await test111222();
} }
......
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