Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yuyixcx
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
yuyixcx
Commits
02f871d0
Commit
02f871d0
authored
May 15, 2025
by
Zllgogo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
8dc3f818
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
15 deletions
+35
-15
enterpriseInfo.ts
src/biz/enterpriseInfo.ts
+19
-12
enum.ts
src/config/enum/enum.ts
+11
-0
enterprise.ts
src/config/splitResult/enterprise.ts
+2
-1
enterpriseInfo.ts
src/routers/enterpriseInfo.ts
+2
-2
public.ts
src/routers/public.ts
+1
-0
No files found.
src/biz/enterpriseInfo.ts
View file @
02f871d0
...
@@ -512,16 +512,18 @@ export async function updateEnterpriseFaRenInfo(eId, param) {
...
@@ -512,16 +512,18 @@ export async function updateEnterpriseFaRenInfo(eId, param) {
* @param uscc
* @param uscc
*/
*/
export
async
function
enterpriseLeaseInfo
(
eId
)
{
export
async
function
enterpriseLeaseInfo
(
eId
)
{
let
filesList
=
[
"area"
,
"unitPrice"
,
"startTime"
,
"endTime"
,
"roomNumber"
,
"rent"
];
// let filesList = ["area", "unitPrice", "startTime", "endTime", "building", "roomNumber","rent"];
let
filesList
=
[
"area"
,
"startTime"
,
"endTime"
,
"building"
,
"roomNumber"
,
"rent"
];
let
includeConf
=
{};
let
includeConf
=
{};
includeConf
[
TABLENAME
.
租赁信息
]
=
{
colum
:
filesList
,
where
:{}
};
includeConf
[
TABLENAME
.
租赁信息
]
=
{
colum
:
filesList
,
where
:{}
};
includeConf
[
TABLENAME
.
企业孵化信息
]
=
{
colum
:[
"state"
,
"startTime"
,
"endTime"
],
where
:{}
};
// includeConf[TABLENAME.企业孵化信息] = {colum:["state", "startTime", "endTime"], where:{} };
includeConf
[
TABLENAME
.
企业孵化信息
]
=
{
colum
:[
"startTime"
,
"endTime"
],
where
:{}
};
let
enterpriseInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表单个
,
TABLENAME
.
企业基础信息表
,
{
eId
},
[
"enterpriseName"
],
includeConf
);
let
enterpriseInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表单个
,
TABLENAME
.
企业基础信息表
,
{
eId
},
[
"enterpriseName"
],
includeConf
);
let
dataInfo
:
any
=
extractData
(
EnterpriseLeaseInfoResConfig
,
enterpriseInfo
.
enterprise_leases
[
0
]);
let
dataInfo
:
any
=
extractData
(
EnterpriseLeaseInfoResConfig
,
enterpriseInfo
.
enterprise_leases
[
0
]);
dataInfo
.
enterpriseName
=
enterpriseInfo
.
enterpriseName
;
dataInfo
.
enterpriseName
=
enterpriseInfo
.
enterpriseName
;
dataInfo
.
state
=
changeEnumValue
(
enumConfig
.
FUHUASTATE
,
enterpriseInfo
.
enterprise_fuhuas
[
0
].
state
);
//
dataInfo.state = changeEnumValue(enumConfig.FUHUASTATE, enterpriseInfo.enterprise_fuhuas[0].state);
//如果 startTime 或 endTime 为空或无效,可以设置默认值或提示信息:
//如果 startTime 或 endTime 为空或无效,可以设置默认值或提示信息:
if
(
enterpriseInfo
.
enterprise_leases
)
{
if
(
enterpriseInfo
.
enterprise_leases
)
{
...
@@ -646,17 +648,19 @@ export async function deleteEnterpriseServiceInfo(eId, esId) {
...
@@ -646,17 +648,19 @@ export async function deleteEnterpriseServiceInfo(eId, esId) {
//===========================================政策速递
//===========================================政策速递
/**
/**
*
*
政策速递列表
* @param state
* @param state
* @returns
* @returns
*/
*/
export
async
function
enterprisePolicyList
(
state
)
{
export
async
function
enterprisePolicyList
(
state
,
policyType
)
{
let
filesList
=
[
"poId"
,
"title"
,
"source"
,
"createTimeMs"
,
"closeTimeMs"
,
"coverImg"
,
"isPermanent"
];
let
filesList
=
[
"poId"
,
"title"
,
"source"
,
"createTimeMs"
,
"closeTimeMs"
,
"coverImg"
,
"isPermanent"
,
"policyType"
];
let
resList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
政策表
,
{},
filesList
);
let
selectParam
:
any
=
{};
if
(
policyType
!=
enumConfig
.
POLICYTYPE
.
全部
)
selectParam
.
policyType
=
policyType
;
let
resList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
政策表
,
selectParam
,
filesList
);
let
dataList
=
[];
let
dataList
=
[];
resList
.
forEach
(
info
=>
{
resList
.
forEach
(
info
=>
{
let
{
poId
,
title
,
source
,
createTimeMs
,
closeTimeMs
,
coverImg
,
isPermanent
}
=
info
;
let
{
poId
,
title
,
source
,
createTimeMs
,
closeTimeMs
,
coverImg
,
isPermanent
,
policyType
}
=
info
;
// 判断是否为永久有效政策
// 判断是否为永久有效政策
let
formattedCreateTime
=
"-"
;
let
formattedCreateTime
=
"-"
;
if
(
isPermanent
==
1
)
formattedCreateTime
=
"永久有效"
;
if
(
isPermanent
==
1
)
formattedCreateTime
=
"永久有效"
;
...
@@ -671,7 +675,8 @@ export async function enterprisePolicyList(state) {
...
@@ -671,7 +675,8 @@ export async function enterprisePolicyList(state) {
createTimeMs
:
createTimeMs
?
moment
(
createTimeMs
).
format
(
"YYYY-MM-DD"
)
:
""
,
createTimeMs
:
createTimeMs
?
moment
(
createTimeMs
).
format
(
"YYYY-MM-DD"
)
:
""
,
closeTimeMs
:
formattedCreateTime
,
closeTimeMs
:
formattedCreateTime
,
coverImg
:
coverImg
?
JSON
.
parse
(
coverImg
)[
0
]
:
''
,
coverImg
:
coverImg
?
JSON
.
parse
(
coverImg
)[
0
]
:
''
,
isPermanent
isPermanent
,
policyType
:
changeEnumValue
(
enumConfig
.
POLICYTYPE
,
policyType
)
});
});
}
}
}
else
if
(
state
==
2
)
{
}
else
if
(
state
==
2
)
{
...
@@ -683,7 +688,8 @@ export async function enterprisePolicyList(state) {
...
@@ -683,7 +688,8 @@ export async function enterprisePolicyList(state) {
createTimeMs
:
createTimeMs
?
moment
(
createTimeMs
).
format
(
"YYYY-MM-DD"
)
:
""
,
createTimeMs
:
createTimeMs
?
moment
(
createTimeMs
).
format
(
"YYYY-MM-DD"
)
:
""
,
closeTimeMs
:
formattedCreateTime
,
closeTimeMs
:
formattedCreateTime
,
coverImg
:
coverImg
?
JSON
.
parse
(
coverImg
)[
0
]
:
''
,
coverImg
:
coverImg
?
JSON
.
parse
(
coverImg
)[
0
]
:
''
,
isPermanent
isPermanent
,
policyType
:
changeEnumValue
(
enumConfig
.
POLICYTYPE
,
policyType
)
}
);
}
);
}
}
}
}
...
@@ -696,13 +702,13 @@ export async function enterprisePolicyList(state) {
...
@@ -696,13 +702,13 @@ export async function enterprisePolicyList(state) {
export
async
function
enterprisePolicyInfo
(
poId
)
{
export
async
function
enterprisePolicyInfo
(
poId
)
{
let
filesList
=
[
"poId"
,
"desc"
,
"title"
,
"source"
,
"closeTimeMs"
,
"coverImg"
,
"isPermanent"
,
"createTimeMs"
];
let
filesList
=
[
"poId"
,
"desc"
,
"title"
,
"source"
,
"closeTimeMs"
,
"coverImg"
,
"isPermanent"
,
"createTimeMs"
,
"policyType"
];
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
政策表
,
{
poId
},
filesList
);
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
政策表
,
{
poId
},
filesList
);
if
(
!
resInfo
||
!
resInfo
.
poId
)
{
if
(
!
resInfo
||
!
resInfo
.
poId
)
{
throw
new
BizError
(
ERRORENUM
.
数据不存在
);
throw
new
BizError
(
ERRORENUM
.
数据不存在
);
}
}
let
{
closeTimeMs
,
isPermanent
}
=
resInfo
;
let
{
closeTimeMs
,
isPermanent
,
policyType
}
=
resInfo
;
// 判断是否为永久有效政策
// 判断是否为永久有效政策
let
formattedCreateTime
=
isPermanent
?
"永久有效"
:
moment
(
closeTimeMs
).
format
(
"YYYY-MM-DD"
);
let
formattedCreateTime
=
isPermanent
?
"永久有效"
:
moment
(
closeTimeMs
).
format
(
"YYYY-MM-DD"
);
...
@@ -715,6 +721,7 @@ export async function enterprisePolicyInfo(poId) {
...
@@ -715,6 +721,7 @@ export async function enterprisePolicyInfo(poId) {
closeTimeMs
:
formattedCreateTime
,
closeTimeMs
:
formattedCreateTime
,
coverImg
:
JSON
.
parse
(
resInfo
.
coverImg
),
coverImg
:
JSON
.
parse
(
resInfo
.
coverImg
),
// createTimeMs:moment(closeTimeMs).format("YYYY-MM-DD")
// createTimeMs:moment(closeTimeMs).format("YYYY-MM-DD")
policyType
:
changeEnumValue
(
enumConfig
.
POLICYTYPE
,
policyType
)
}
}
...
...
src/config/enum/enum.ts
View file @
02f871d0
...
@@ -63,6 +63,17 @@ export enum EMIGRATIONTYPE {
...
@@ -63,6 +63,17 @@ export enum EMIGRATIONTYPE {
/**
/**
* 政策类型
*/
export
enum
POLICYTYPE
{
全部
=
0
,
财政补贴
=
1
,
资质申报
=
2
,
政策扶持
=
3
,
}
/**
* 上市情况
* 上市情况
*/
*/
export
enum
LISTINGSITUATION
{
export
enum
LISTINGSITUATION
{
...
...
src/config/splitResult/enterprise.ts
View file @
02f871d0
...
@@ -48,7 +48,8 @@ export const EnterpriseFaRenInfoResConfig = {
...
@@ -48,7 +48,8 @@ export const EnterpriseFaRenInfoResConfig = {
export
const
EnterpriseLeaseInfoResConfig
=
{
export
const
EnterpriseLeaseInfoResConfig
=
{
area
:{
key
:
"租赁面积"
},
area
:{
key
:
"租赁面积"
},
unitPrice
:{
key
:
"出租单价"
},
// unitPrice:{key:"出租单价"},
building
:{
key
:
"楼号"
},
roomNumber
:{
key
:
"室号"
},
roomNumber
:{
key
:
"室号"
},
rent
:{
key
:
"每月租金"
}
rent
:{
key
:
"每月租金"
}
}
}
...
...
src/routers/enterpriseInfo.ts
View file @
02f871d0
...
@@ -55,8 +55,8 @@ export function setRouter(httpServer) {
...
@@ -55,8 +55,8 @@ export function setRouter(httpServer) {
*/
*/
async
function
policyList
(
req
,
res
)
{
async
function
policyList
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
const
UserInfo
=
req
.
userInfo
;
let
{
state
}
=
req
.
body
;
let
{
state
,
policyType
}
=
req
.
body
;
let
result
=
await
enterpriseInfoBiz
.
enterprisePolicyList
(
state
);
let
result
=
await
enterpriseInfoBiz
.
enterprisePolicyList
(
state
,
policyType
);
res
.
success
(
result
);
res
.
success
(
result
);
}
}
...
...
src/routers/public.ts
View file @
02f871d0
...
@@ -20,6 +20,7 @@ const config = {
...
@@ -20,6 +20,7 @@ const config = {
// "/public/iprtypeclient":enumConfig.IPRTYPECLIENT,// 新增知识产权类型
// "/public/iprtypeclient":enumConfig.IPRTYPECLIENT,// 新增知识产权类型
"/public/iprtypeclientqt"
:
enumConfig
.
IPRTYPECLIENTQT
,
// 新增知识产权类型
"/public/iprtypeclientqt"
:
enumConfig
.
IPRTYPECLIENTQT
,
// 新增知识产权类型
"/public/iprtypeclientzl"
:
enumConfig
.
IPRTYPECLIENTZL
,
// 新增知识产权专利
"/public/iprtypeclientzl"
:
enumConfig
.
IPRTYPECLIENTZL
,
// 新增知识产权专利
"/public/policytype"
:
enumConfig
.
POLICYTYPE
,
//政策类型
}
}
...
...
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