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
9b755950
Commit
9b755950
authored
Apr 23, 2025
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
48e8ceee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
41 deletions
+72
-41
admin.ts
src/biz/admin.ts
+20
-2
zhengCe.ts
src/biz/zhengCe.ts
+1
-1
dbinit.ts
src/routers/dbinit.ts
+51
-38
No files found.
src/biz/admin.ts
View file @
9b755950
...
...
@@ -193,10 +193,24 @@ export async function enterpriseManageList(enterpriseName:string, year:number, p
}
let
resInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表分页
,
TABLENAME
.
企业经营信息
,
selectParam
,
[
"mId"
,
"BI"
,
"TXP"
,
"RD"
,
"annual"
,
"quarter"
],
manyTableInfo
,
page
);
let
dataCountList
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业经营信息
,
selectParam
,
[
"eId"
],
manyTableInfo
);
let
dataCount
=
dataCountList
.
length
;
let
resData
=
[];
resInfo
.
forEach
(
info
=>
{
let
{
BI
,
mId
,
TXP
,
RD
,
annual
,
quarter
,
enterprise
}
=
info
;
let
quarterStr
=
"第一季度"
;
if
(
quarter
)
quarterStr
=
changeEnumValue
(
enumConfig
.
QUARTER
,
quarter
);
let
year
=
moment
(
annual
).
format
(
"YYYY"
);
resData
.
push
({
BI
,
mId
,
TXP
,
RD
,
annual
:
year
,
quarterStr
,
enterprise
,
yearStr
:
`
${
year
}${
quarter
}
`
});
})
resData
.
sort
(
(
a
,
b
)
=>
{
return
b
.
yearStr
-
a
.
yearStr
;
})
let
dataList
=
[];
res
Info
.
forEach
(
info
=>
{
res
Data
.
forEach
(
info
=>
{
let
{
BI
,
mId
,
TXP
,
RD
,
annual
,
quarter
,
enterprise
}
=
info
;
let
quarterStr
=
"第一季度"
;
if
(
quarter
)
quarterStr
=
changeEnumValue
(
enumConfig
.
QUARTER
,
quarter
);
...
...
@@ -324,6 +338,10 @@ export async function enterpriseFinancingList(enterpriseName:string, year:number
});
dataList
.
sort
(
(
a
,
b
)
=>
{
return
new
Date
(
b
.
investmentDate
).
valueOf
()
-
new
Date
(
a
.
investmentDate
).
valueOf
();
})
return
{
dataList
,
dataCount
:
dataList
.
length
};
}
...
...
src/biz/zhengCe.ts
View file @
9b755950
...
...
@@ -14,7 +14,7 @@ import { PolicyUpdateConfig } from "../config/eccParam/enterprise";
export
async
function
enterprisePolicyList
(
keywords
:
string
,
state
:
number
,
page
:
number
)
{
let
selectParam
:
any
=
{};
if
(
keywords
)
selectParam
.
desc
=
{
"%like%"
:
keywords
};
if
(
keywords
)
selectParam
.
title
=
{
"%like%"
:
keywords
};
let
filesList
=
[
"poId"
,
"title"
,
"source"
,
"createTimeMs"
,
"closeTimeMs"
,
"isPermanent"
,
"coverImg"
];
let
resList
=
await
selectData
(
OPERATIONALDATATYPE
.
分页查询
,
TABLENAME
.
政策表
,
selectParam
,
filesList
,
page
);
let
dataCount
=
await
selectData
(
OPERATIONALDATATYPE
.
查询数据量
,
TABLENAME
.
政策表
,
selectParam
,
null
);
...
...
src/routers/dbinit.ts
View file @
9b755950
...
...
@@ -217,62 +217,75 @@ export async function data1210(req, res) {
if
(
subList
[
31
])
{
let
enterprise_2022iprInfo
=
{
iprId
:
randomId
(
TABLEID
.
知识产权
),
eId
,
year
:
getMySqlMs
(
"2022-01-01 00:00:00"
),
number
:
subList
[
31
],
iprType
:
IPRALLTYPE
.
软件著作权
,
selectedValue
:
null
,
iprName
:
null
,
iprUrl
:
null
,
// softwareCopyrightCount:null,
// inventionPatentCount:null,
// overseasPatentCount:null,
// plantVarietyCount:null,
// icLayoutCount:null,
for
(
let
i
=
0
;
i
<
parseInt
(
subList
[
31
]);
i
++
)
{
let
enterprise_2022iprInfo
=
{
iprId
:
randomId
(
TABLEID
.
知识产权
),
eId
,
year
:
getMySqlMs
(
"2022-01-01 00:00:00"
),
number
:
1
,
iprType
:
IPRALLTYPE
.
软件著作权
,
selectedValue
:
null
,
iprName
:
null
,
iprUrl
:
null
,
// softwareCopyrightCount:null,
// inventionPatentCount:null,
// overseasPatentCount:null,
// plantVarietyCount:null,
// icLayoutCount:null,
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
知识产权
,
enterprise_2022iprInfo
,
{});
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
知识产权
,
enterprise_2022iprInfo
,
{});
}
if
(
subList
[
32
])
{
let
enterprise_2023iprInfo
=
{
iprId
:
randomId
(
TABLEID
.
知识产权
),
eId
,
year
:
getMySqlMs
(
"2023-01-01 00:00:00"
),
number
:
subList
[
32
],
iprType
:
IPRALLTYPE
.
软件著作权
,
selectedValue
:
null
,
iprName
:
null
,
iprUrl
:
null
,
// softwareCopyrightCount:null,
// inventionPatentCount:null,
// overseasPatentCount:null,
// plantVarietyCount:null,
// icLayoutCount:null,
for
(
let
i
=
0
;
i
<
parseInt
(
subList
[
32
]);
i
++
)
{
let
enterprise_2023iprInfo
=
{
iprId
:
randomId
(
TABLEID
.
知识产权
),
eId
,
year
:
getMySqlMs
(
"2023-01-01 00:00:00"
),
number
:
1
,
iprType
:
IPRALLTYPE
.
软件著作权
,
selectedValue
:
null
,
iprName
:
null
,
iprUrl
:
null
,
// softwareCopyrightCount:null,
// inventionPatentCount:null,
// overseasPatentCount:null,
// plantVarietyCount:null,
// icLayoutCount:null,
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
知识产权
,
enterprise_2023iprInfo
,
{});
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
知识产权
,
enterprise_2023iprInfo
,
{});
}
if
(
subList
[
33
])
{
for
(
let
i
=
0
;
i
<
parseInt
(
subList
[
33
]);
i
++
)
{
let
enterprise_2022patent
=
{
pId
:
randomId
(
TABLEID
.
企业专利表
),
iprId
:
randomId
(
TABLEID
.
知识产权
),
eId
,
year
:
getMySqlMs
(
"2022-01-01 00:00:00"
),
number
:
1
number
:
1
,
iprType
:
IPRALLTYPE
.
发明专利
,
selectedValue
:
null
,
iprName
:
null
,
iprUrl
:
null
,
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
企业专利表
,
enterprise_2022patent
,
{});
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
知识产权
,
enterprise_2022patent
,
{});
}
}
if
(
subList
[
34
])
{
for
(
let
i
=
0
;
i
<
parseInt
(
subList
[
34
]);
i
++
)
{
let
enterprise_2022patent
=
{
pId
:
randomId
(
TABLEID
.
企业专利表
),
iprId
:
randomId
(
TABLEID
.
知识产权
),
eId
,
year
:
getMySqlMs
(
"2022-01-01 00:00:00"
),
number
:
1
year
:
getMySqlMs
(
"2023-01-01 00:00:00"
),
number
:
1
,
iprType
:
IPRALLTYPE
.
发明专利
,
selectedValue
:
null
,
iprName
:
null
,
iprUrl
:
null
,
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
企业专利表
,
enterprise_2022patent
,
{});
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
知识产权
,
enterprise_2022patent
,
{});
}
}
...
...
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