Commit 491f144c by zhangzhencai

no message

parent b5e2dca7
......@@ -171,9 +171,10 @@ export async function getEnterpriseDetails(name, type) {
let selectParam = {};
if (name) selectParam["enterpriseName"] = {"%like%":name};
let dbList = [];
if (type.length != 0) {
for(let i=0;i<type.length;i++){
for(let i=0;i<type.length;i++) {
let manyTableInfo:any = {};
let info = type[i];
switch (info) {
......@@ -222,7 +223,19 @@ export async function getEnterpriseDetails(name, type) {
})
//toupdate 要改掉 少用语法糖
let dataList = [...new Map(dataChange.map(item => [item.eId, item])).values()];
/**
* @author: xiaoyouyou
*/
// let dataList = [...new Map(dataChange.map(item => [item.eId, item])).values()];
let dataList = [];
let map = new Map();
for (let i = 0; i < dataChange.length; i++) {
let item = dataChange[i];
if (!map.has(item.eId)) {
map.set(item.eId, true);
dataList.push(item);
}
}
return dataList;
}
......@@ -306,6 +319,9 @@ async function getQyfwhzsj() {
let 企业专利dbList = await selectData(OPERATIONALDATATYPE.查询多个, TABLENAME.企业专利表, {}, null);
企业专利dbList.forEach( info => {
/**
* @author: xiaoyouyou
*/
qyfwhzsj.企业专利 += parseInt(info.alienPatent || 0 ) ;
qyfwhzsj.企业专利 += parseInt(info.classIPatent || 0);
qyfwhzsj.企业专利 += parseInt(info.secondClassPatent || 0);
......
......@@ -87,13 +87,8 @@ export async function getZhyy() {
let fuWuQiYeTypeMap = {};//
let fuWuList = await selectData(OPERATIONALDATATYPE.查询多个, TABLENAME.企业服务表, {}, null);
// //添加日志输出以调试
// console.log("fuWuList:", fuWuList);
fuWuList.forEach(info => {
let { followUpStatus, eId, needCategory } = info;
// console.log(`Processing service record:`, info); // 记录每一条服务记录
if (followUpStatus == FOLLOWUPSTATUS.已完成) {
fuWuCount += 1;
......@@ -101,43 +96,36 @@ export async function getZhyy() {
fuWuQiYeCountMap[eId] = 0;
}
fuWuQiYeCountMap[eId] += 1;
// console.log(`Service count for enterprise ${eId} incremented to: ${fuWuQiYeCountMap[eId]}`); // 记录企业服务数变化
let needCategoryStr = changeEnumValue( NEEDCATEGORY, needCategory)
// console.log(`Converted needCategory ${needCategory} to ${needCategoryStr}`); // 记录枚举值转换
if (!fuWuQiYeTypeMap[needCategoryStr]) fuWuQiYeTypeMap[needCategoryStr] = 0;
fuWuQiYeTypeMap[needCategoryStr] += 1;
}
});
let fuWuQiYeCount = Object.keys(fuWuQiYeCountMap).length;//服务覆盖企业
// console.log("fuWuQiYeCountMap:", fuWuQiYeCountMap);
// console.log("fuWuQiYeTypeMap:", fuWuQiYeTypeMap);
let fuWuQiYeTypeList = [];
// 遍历 NEEDCATEGORY 枚举
const allNeedCategories = Object.values(NEEDCATEGORY);
/**
* @author xiaoyouyou
*/
for (let key in NEEDCATEGORY) {
let keyAny:any = NEEDCATEGORY[key];
if (isNaN(keyAny)) {
//toupdate 这里继续完善 有点小bug
}
}
allNeedCategories.forEach(category => {
const categoryStr = changeEnumValue(NEEDCATEGORY, category);
if (fuWuQiYeTypeMap[categoryStr]) {
// console.log(`Found category ${categoryStr}: ${fuWuQiYeTypeMap[categoryStr]}`);
let keyStr = key;
let serviceType = NEEDCATEGORY[key];
let value = fuWuQiYeTypeMap[keyStr] || 0;
fuWuQiYeTypeList.push({
key: categoryStr,
value: fuWuQiYeTypeMap[categoryStr] || 0
key: keyStr,
value: value
});
}
});
// // 添加日志输出以调试
// console.log("fuWuQiYeTypeList:", fuWuQiYeTypeList);
}
let 在孵企业数据 = [
{key:"在孵企业面积占比", value:"3%"},
......
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