Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yuyiAdminServer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
yuyiAdminServer
Commits
c307bc77
Commit
c307bc77
authored
May 29, 2025
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
a769bc8a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
38 deletions
+66
-38
admin.ts
src/biz/admin.ts
+11
-3
fuhua.ts
src/biz/fuhua.ts
+13
-8
qccInit.ts
src/biz/qccInit.ts
+14
-4
zhengCe.ts
src/biz/zhengCe.ts
+1
-0
main.ts
src/main.ts
+3
-0
dbinit.ts
src/routers/dbinit.ts
+24
-23
No files found.
src/biz/admin.ts
View file @
c307bc77
...
...
@@ -753,16 +753,24 @@ export async function getiprDetails(eId:string) {
知识产权
Map
[
key
].
forEach
(
info
=>
{
let
iprUrl
=
[];
let
iprUrlList
=
JSON
.
parse
(
info
[
iprConf
[
3
]]);
let
iprUrlList
=
[];
if
(
info
[
iprConf
[
3
]])
iprUrlList
=
JSON
.
parse
(
info
[
iprConf
[
3
]]);
for
(
let
i
=
0
;
i
<
iprUrlList
.
length
;
i
++
)
{
let
url
=
`
${
systemConfig
.
imgFileUrl
}${
iprUrlList
[
i
]}
`
;
let
url
=
``
;
if
(
iprUrlList
[
i
].
indexOf
(
"http"
)
>
-
1
)
{
url
=
`
${
iprUrlList
[
i
]}
`
;
}
else
url
=
`
${
systemConfig
.
imgFileUrl
}${
iprUrlList
[
i
]}
`
;
iprUrl
.
push
(
url
);
}
let
iprTime
=
""
;
if
(
info
[
iprConf
[
2
]])
iprTime
=
moment
(
info
[
iprConf
[
2
]]).
format
(
"YYYY-MM-DD"
);
dataList
.
push
({
iprId
:
info
[
iprConf
[
0
]],
iprName
:
info
[
iprConf
[
1
]],
iprTime
:
moment
(
info
[
iprConf
[
2
]]).
format
(
"YYYY-MM-DD"
)
,
iprTime
,
iprUrl
,
timeNumber
:
new
Date
(
info
[
iprConf
[
2
]]).
valueOf
()
})
...
...
src/biz/fuhua.ts
View file @
c307bc77
...
...
@@ -241,16 +241,21 @@ export async function getOperateData(year) {
let
industryMap
=
{};
fhdbList
.
forEach
(
info
=>
{
let
{
industry
}
=
info
;
//行业领域分布
if
(
industry
)
{
let
industryList
=
JSON
.
parse
(
industry
);
for
(
let
i
=
0
;
i
<
industryList
.
length
;
i
++
)
{
let
industryStr
=
changeEnumValue
(
INDUSTRY
,
industryList
[
i
]);
if
(
!
industryMap
[
industryStr
])
industryMap
[
industryStr
]
=
0
;
industryMap
[
industryStr
]
+=
1
;
let
{
industry
,
enterprise_fuhuas
}
=
info
;
let
startYear
=
moment
(
enterprise_fuhuas
[
0
].
startTime
).
format
(
"YYYY"
);
let
endYear
=
moment
(
enterprise_fuhuas
[
0
].
endTime
).
format
(
"YYYY"
);
if
(
moment
(
startYear
).
format
(
"YYYY"
)
<=
year
&&
moment
(
endYear
).
format
(
"YYYY"
)
>=
year
)
{
//行业领域分布
if
(
industry
)
{
let
industryList
=
JSON
.
parse
(
industry
);
for
(
let
i
=
0
;
i
<
industryList
.
length
;
i
++
)
{
let
industryStr
=
changeEnumValue
(
INDUSTRY
,
industryList
[
i
]);
if
(
!
industryMap
[
industryStr
])
industryMap
[
industryStr
]
=
0
;
industryMap
[
industryStr
]
+=
1
;
}
}
}
})
for
(
let
key
in
INDUSTRY
)
{
let
anyKey
:
any
=
key
;
...
...
src/biz/qccInit.ts
View file @
c307bc77
...
...
@@ -112,6 +112,9 @@ async function 工商信息(uscc, eId) {
let
工商信息
:
any
=
await
getQcc
(
'https://api.qichacha.com/ECIInfoVerify/GetInfo'
,
query
,
header
);
//获取工商信息
let
khsfsb
=
getReqParam
(
uscc
);
let
客户身份识别
:
any
=
await
getQcc
(
'https://api.qichacha.com/CustomerDueDiligence/KYC'
,
khsfsb
.
query
,
khsfsb
.
header
);
//获取工商信息
let
pinyinName
=
getPinyinInitials
(
工商信息
.
Name
);
let
industryList
=
[];
//Industry
let
TermStart
=
moment
(
工商信息
.
TermStart
).
format
(
"YYYY-MM-DD"
);
...
...
@@ -138,9 +141,15 @@ async function 工商信息(uscc, eId) {
guanWang
=
工商信息
.
ContactInfo
.
WebSite
[
0
].
Url
||
""
;
}
let
qiYeGuiMo
=
""
;
if
(
工商信息
.
TagList
&&
工商信息
.
TagList
[
0
])
{
guanWang
=
工商信息
.
TagList
[
0
].
Name
||
""
;
if
(
客户身份识别
.
Data
&&
客户身份识别
.
Data
.
Scale
)
{
switch
(
客户身份识别
.
Data
.
Scale
)
{
case
"L"
:
qiYeGuiMo
=
"大型"
;
break
;
case
"M"
:
qiYeGuiMo
=
"中型"
;
break
;
case
"S"
:
qiYeGuiMo
=
"小型"
;
break
;
case
"XS"
:
qiYeGuiMo
=
"微型"
;
break
;
}
}
let
baseInfo
=
{
enterpriseName
:
工商信息
.
Name
,
pinyinName
,
...
...
@@ -236,7 +245,6 @@ async function 工商信息(uscc, eId) {
* 4.企查查以前有现在没有,小程序没有,不删除之前的
*/
if
(
工商信息
.
TagList
)
{
for
(
let
i
=
0
;
i
<
工商信息
.
TagList
.
length
;
i
++
)
{
let
info
=
工商信息
.
TagList
[
i
];
let
{
Type
,
Name
}
=
info
;
...
...
@@ -407,6 +415,8 @@ async function 知识产权(uscc, eId) {
let
item
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
商标
,
{
qccId
:
info
.
ID
},
[
"qccId"
]);
if
(
!
item
||
!
item
.
qccId
)
{
let
qcc
商标详情
=
await
商标详情查询
(
uscc
,
info
.
ID
);
let
imageUrl
=
[];
if
(
info
.
ImageUrl
)
imageUrl
.
push
(
info
.
ImageUrl
);
//添加新的
let
addItemInfo
:
any
=
{
tmId
:
randomId
(
TABLEID
.
商标
),
...
...
@@ -417,7 +427,7 @@ async function 知识产权(uscc, eId) {
categoryId
:
info
.
CategoryId
,
category
:
info
.
Category
,
person
:
info
.
Person
,
imageUrl
:
info
.
ImageUrl
,
imageUrl
:
JSON
.
stringify
(
imageUrl
)
,
flowStatusDesc
:
info
.
FlowStatusDesc
,
};
if
(
qcc
商标详情
.
RegDate
)
addItemInfo
.
RegDate
=
getMySqlMs
(
qcc
商标详情
.
RegDate
)
...
...
src/biz/zhengCe.ts
View file @
c307bc77
...
...
@@ -162,6 +162,7 @@ export async function enterprisePolicyUpdate(poId:string, param) {
return
{
isSuccess
:
true
};
}
export
async
function
enterprisePolicyAdd
(
param
)
{
const
FuncName
=
"添加政策表"
eccFormParam
(
FuncName
,
PolicyUpdateConfig
,
param
);
...
...
src/main.ts
View file @
c307bc77
import
{
initConfig
,
systemConfig
}
from
"./config/serverConfig"
;
import
{
initApiDataStorage
}
from
"./data/dataInterfaceWithCache"
;
import
{
httpServer
}
from
"./net/http_server"
;
async
function
lanuch
()
{
await
initConfig
();
httpServer
.
createServer
(
systemConfig
.
port
);
console
.
log
(
'This indicates that the server is started successfully.'
);
await
initApiDataStorage
();
}
...
...
src/routers/dbinit.ts
View file @
c307bc77
...
...
@@ -9,6 +9,7 @@ import { OPERATIONALDATATYPE, TABLEID, TABLENAME } from '../config/enum/dbEnum';
import
{
CHANGESTATE
,
DEGREE
,
FUHUASTATE
,
IPRALLTYPE
,
ZZMM
}
from
'../config/enum/enum'
;
import
{
operationalData
}
from
'../data/operationalData'
;
import
{
initApiDataStorage
}
from
'../data/dataInterfaceWithCache'
;
import
{
updateQCCDataTask
}
from
'../biz/qccInit'
;
const
xlsx
=
require
(
'node-xlsx'
);
const
path
=
require
(
'path'
);
const
fs
=
require
(
'fs'
);
...
...
@@ -224,23 +225,23 @@ export async function data1210(req, res) {
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
法人信息表
,
enterprise_legal_personInfo
,
{});
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
企业用户表
,
enterprise_userInfo
,
{});
if
(
qccInfo
.
canbaoYear
&&
qccInfo
.
canbaoNumber
)
{
let
enterprise_canbaoInfo
=
{
cId
:
randomId
(
TABLEID
.
参保记录
),
eId
,
annual
:
getMySqlMs
(
`
${
qccInfo
.
canbaoYear
.
match
(
/
\d
+/g
)[
0
]}
-01-01 00:00:00`
),
zhuanKe
:
0
,
benKe
:
0
,
shuoshi
:
0
,
boShi
:
0
,
boshiyishang
:
0
,
qiTa
:
qccInfo
.
canbaoNumber
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
参保记录
,
enterprise_canbaoInfo
,
{});
}
//
if(qccInfo.canbaoYear && qccInfo.canbaoNumber) {
//
let enterprise_canbaoInfo = {
//
cId:randomId(TABLEID.参保记录),
//
eId,
//
annual:getMySqlMs(`${ qccInfo.canbaoYear.match(/\d+/g)[0]}-01-01 00:00:00`),
//
zhuanKe:0,
//
benKe:0,
//
shuoshi:0,
//
boShi:0,
//
boshiyishang:0,
//
qiTa:qccInfo.canbaoNumber
//
}
//
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.参保记录, enterprise_canbaoInfo, {});
//
}
if
(
subList
[
31
])
{
//
if (subList[31]) {
// for(let i = 0; i < parseInt(subList[31]); i++) {
// let enterprise_2022iprInfo = {
// iprId:randomId(TABLEID.知识产权),
...
...
@@ -260,8 +261,8 @@ export async function data1210(req, res) {
// }
// await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.知识产权, enterprise_2022iprInfo, {});
// }
}
if
(
subList
[
32
])
{
//
}
//
if (subList[32]) {
// for(let i = 0; i < parseInt(subList[32]); i++) {
// let enterprise_2023iprInfo = {
// iprId:randomId(TABLEID.知识产权),
...
...
@@ -281,8 +282,8 @@ export async function data1210(req, res) {
// await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.知识产权, enterprise_2023iprInfo, {});
// }
}
if
(
subList
[
33
])
{
//
}
//
if (subList[33]) {
// for(let i = 0; i < parseInt(subList[33]); i++) {
// let enterprise_2022patent = {
// iprId:randomId(TABLEID.知识产权),
...
...
@@ -296,8 +297,8 @@ export async function data1210(req, res) {
// }
// await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.知识产权, enterprise_2022patent, {});
// }
}
if
(
subList
[
34
])
{
//
}
//
if (subList[34]) {
// for(let i = 0; i < parseInt(subList[34]); i++) {
// let enterprise_2022patent = {
// iprId:randomId(TABLEID.知识产权),
...
...
@@ -311,7 +312,7 @@ export async function data1210(req, res) {
// }
// await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.知识产权, enterprise_2022patent, {});
// }
}
//
}
// if (subList[35] || subList[36] || subList[37] || subList[38]) {
// let enterprise_qualification:any = {
...
...
@@ -335,7 +336,7 @@ export async function data1210(req, res) {
export
async
function
qccDatat0519
(
req
,
res
)
{
console
.
log
(
"开始清洗企查查数据"
);
// qccData();
await
initApiDataStorage
();
updateQCCDataTask
();
res
.
success
({
isSuccess
:
true
})
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment