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
488d2d17
Commit
488d2d17
authored
Jan 16, 2025
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
4b6797a8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
130 additions
and
10 deletions
+130
-10
serverConfig.xml
serverConfig.xml
+2
-1
enterpriseInfo.ts
src/biz/enterpriseInfo.ts
+65
-9
enterprise.ts
src/config/eccParam/enterprise.ts
+13
-0
dbEnum.ts
src/config/enum/dbEnum.ts
+1
-0
main.ts
src/main.ts
+3
-0
enterpriseInfo.ts
src/routers/enterpriseInfo.ts
+46
-0
No files found.
serverConfig.xml
View file @
488d2d17
<config>
<config>
<port>
9099
</port>
<port>
9099
</port>
<sign>
xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas
</sign>
<sign>
xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas
</sign>
<dbServer>
http://192.168.0.
105
:40012
</dbServer>
<dbServer>
http://192.168.0.
71
:40012
</dbServer>
</config>
</config>
\ No newline at end of file
src/biz/enterpriseInfo.ts
View file @
488d2d17
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* */
* */
import
{
EnterpriseAwardUpdateConfig
,
EnterpriseCanBaoUpdateConfig
,
EnterpriseFaRenInfoUpdateConfig
,
EnterpriseFinancingUpdateConfig
,
EnterpriseInfomationUpdateConfig
,
EnterpriseIPRUpdateConfig
,
EnterprisePatentUpdateConfig
,
EnterpriseQualificationUpdateConfig
,
EnterpriseServiceUpdateConfig
,
EnterpriseTeamUpdateConfig
}
from
"../config/eccParam/enterprise"
;
import
{
EnterpriseAwardUpdateConfig
,
EnterpriseCanBaoUpdateConfig
,
EnterpriseFaRenInfoUpdateConfig
,
EnterpriseFinancingUpdateConfig
,
EnterpriseInfomationUpdateConfig
,
EnterpriseIPRUpdateConfig
,
Enterprise
ManageInfoAddConfig
,
EnterpriseManageInfoUpdateConfig
,
Enterprise
PatentUpdateConfig
,
EnterpriseQualificationUpdateConfig
,
EnterpriseServiceUpdateConfig
,
EnterpriseTeamUpdateConfig
}
from
"../config/eccParam/enterprise"
;
import
{
OPERATIONALDATATYPE
,
TABLEID
,
TABLENAME
}
from
"../config/enum/dbEnum"
;
import
{
OPERATIONALDATATYPE
,
TABLEID
,
TABLENAME
}
from
"../config/enum/dbEnum"
;
import
*
as
enumConfig
from
"../config/enum/enum"
;
import
*
as
enumConfig
from
"../config/enum/enum"
;
import
{
EnterpriseBaseResConfig
,
EnterpriseFaRenInfoResConfig
,
EnterpriseInfomationResConfig
,
EnterpriseLeaseInfoResConfig
,
EnterpriseQualificationInfoResConfig
}
from
"../config/splitResult/enterprise"
;
import
{
EnterpriseBaseResConfig
,
EnterpriseFaRenInfoResConfig
,
EnterpriseInfomationResConfig
,
EnterpriseLeaseInfoResConfig
,
EnterpriseQualificationInfoResConfig
}
from
"../config/splitResult/enterprise"
;
...
@@ -1022,7 +1022,7 @@ export async function enterpriseServiceList(eId) {
...
@@ -1022,7 +1022,7 @@ export async function enterpriseServiceList(eId) {
*/
*/
export
async
function
enterpriseServiceInfo
(
eId
,
esId
)
{
export
async
function
enterpriseServiceInfo
(
eId
,
esId
)
{
let
filesList
=
[
"esId"
,
"needCategory"
,
"applyTime"
,
"followUpStatus"
,
"needContent"
];
let
filesList
=
[
"esId"
,
"needCategory"
,
"applyTime"
,
"followUpStatus"
,
"needContent"
,
"fangKui"
];
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业服务表
,
{
esId
,
eId
},
filesList
)
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业服务表
,
{
esId
,
eId
},
filesList
)
if
(
!
resInfo
||
!
resInfo
.
esId
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
if
(
!
resInfo
||
!
resInfo
.
esId
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
...
@@ -1031,7 +1031,8 @@ export async function enterpriseServiceInfo(eId, esId) {
...
@@ -1031,7 +1031,8 @@ export async function enterpriseServiceInfo(eId, esId) {
needCategory
:
resInfo
.
needCategory
,
needCategory
:
resInfo
.
needCategory
,
applyTime
:
moment
(
resInfo
.
applyTime
).
format
(
"YYYY-MM-DD"
),
applyTime
:
moment
(
resInfo
.
applyTime
).
format
(
"YYYY-MM-DD"
),
followUpStatus
:
changeEnumValue
(
enumConfig
.
FOLLOWUPSTATUS
,
resInfo
.
followUpStatus
),
followUpStatus
:
changeEnumValue
(
enumConfig
.
FOLLOWUPSTATUS
,
resInfo
.
followUpStatus
),
needContent
:
resInfo
.
needContent
needContent
:
resInfo
.
needContent
,
dealResult
:
resInfo
.
fangKui
,
}
}
return
{
dataInfo
};
return
{
dataInfo
};
...
@@ -1156,13 +1157,11 @@ export async function enterpriseManageInfo(eId, mId) {
...
@@ -1156,13 +1157,11 @@ export async function enterpriseManageInfo(eId, mId) {
}
}
export
async
function
updateEnterpriseManageInfo
(
eId
,
mId
,
param
)
{
export
async
function
updateEnterpriseManageInfo
(
eId
,
mId
,
param
)
{
let
filesList
=
[
"eId"
,
"annual"
,
"BI"
,
"TXP"
,
"RD"
];
const
FuncName
=
"企业修改企业营收记录"
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
eId
,
mId
},
filesList
);
eccFormParam
(
FuncName
,
EnterpriseManageInfoUpdateConfig
,
param
);
if
(
!
resInfo
||
!
resInfo
.
eId
)
{
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
eId
,
mId
},
[]);
throw
new
BizError
(
ERRORENUM
.
数据不存在
);
if
(
!
resInfo
||
!
resInfo
.
mId
)
throw
new
BizError
(
ERRORENUM
.
数据不存在
);
}
let
dataInfo
=
{
let
dataInfo
=
{
createTime
:
getMySqlMs
(),
createTime
:
getMySqlMs
(),
...
@@ -1177,3 +1176,60 @@ export async function updateEnterpriseManageInfo(eId, mId, param) {
...
@@ -1177,3 +1176,60 @@ export async function updateEnterpriseManageInfo(eId, mId, param) {
}
}
export
async
function
createEnterpriseManageInfo
(
eId
,
param
)
{
const
FuncName
=
"企业添加企业营收记录"
eccFormParam
(
FuncName
,
EnterpriseManageInfoAddConfig
,
param
);
let
annual
=
getMySqlMs
(
param
.
year
);
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
eId
,
annual
},
[]);
if
(
resInfo
.
annual
)
throw
new
BizError
(
ERRORENUM
.
不可重复添加同一年度数据
);
let
addInfo
=
{
mId
:
randomId
(
TABLEID
.
企业经营信息
),
eId
,
createTime
:
getMySqlMs
(),
annual
:
getMySqlMs
(
param
.
year
),
BI
:
param
.
BI
,
TXP
:
param
.
TXP
,
RD
:
param
.
RD
,
state
:
0
};
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
企业经营信息
,
addInfo
,
{});
return
{
isSuccess
:
true
};
}
export
async
function
deleteEnterpriseManageInfo
(
eId
,
mId
)
{
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
mId
,
eId
},
[])
if
(
!
resInfo
||
!
resInfo
.
mId
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
await
operationalData
(
OPERATIONALDATATYPE
.
删除
,
TABLENAME
.
企业经营信息
,
{},
{
mId
,
eId
});
return
{
isSuccess
:
true
};
}
export
async
function
enterpriseManageList
(
eId
)
{
let
filesList
=
[
"mId"
,
"annual"
,
"BI"
,
"TXP"
,
"RD"
];
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
企业经营信息
,
{
eId
},
filesList
);
if
(
!
resInfo
)
{
throw
new
BizError
(
ERRORENUM
.
数据不存在
);
}
let
dataInfo
=
[];
resInfo
.
forEach
(
info
=>
{
dataInfo
.
push
(
{
mId
:
info
.
mId
,
annual
:
moment
(
info
.
annual
).
format
(
"YYYY"
),
BI
:
info
.
BI
||
"0.00"
,
TXP
:
info
.
TXP
||
"0.00"
,
RD
:
info
.
RD
||
"0.00"
}
)
})
return
{
dataInfo
};
}
src/config/eccParam/enterprise.ts
View file @
488d2d17
...
@@ -110,3 +110,16 @@ export const EnterpriseServiceUpdateConfig = {
...
@@ -110,3 +110,16 @@ export const EnterpriseServiceUpdateConfig = {
}
}
export
const
EnterpriseManageInfoUpdateConfig
=
{
BI
:{
type
:
"Number"
},
//营业收入
TXP
:{
type
:
"Number"
},
//纳税
RD
:{
type
:
"Number"
},
//研发投入
}
export
const
EnterpriseManageInfoAddConfig
=
{
year
:{
type
:
"Number"
},
//年度
BI
:{
type
:
"Number"
},
//营业收入
TXP
:{
type
:
"Number"
},
//纳税
RD
:{
type
:
"Number"
},
//研发投入
}
src/config/enum/dbEnum.ts
View file @
488d2d17
...
@@ -40,6 +40,7 @@ export enum TABLENAME {
...
@@ -40,6 +40,7 @@ export enum TABLENAME {
}
}
export
enum
TABLEID
{
export
enum
TABLEID
{
雨艺孵化器
=
'yy'
,
企业孵化信息
=
'fh'
,
企业孵化信息
=
'fh'
,
租赁信息
=
'le'
,
租赁信息
=
'le'
,
企业用户表
=
'ur'
,
企业用户表
=
'ur'
,
...
...
src/main.ts
View file @
488d2d17
import
{
TABLEID
}
from
"./config/enum/dbEnum"
;
import
{
initConfig
,
systemConfig
}
from
"./config/serverConfig"
;
import
{
initConfig
,
systemConfig
}
from
"./config/serverConfig"
;
import
{
httpServer
}
from
"./net/http_server"
;
import
{
httpServer
}
from
"./net/http_server"
;
import
{
randomId
}
from
"./tools/system"
;
async
function
lanuch
()
{
async
function
lanuch
()
{
await
initConfig
();
await
initConfig
();
httpServer
.
createServer
(
systemConfig
.
port
);
httpServer
.
createServer
(
systemConfig
.
port
);
let
yid
=
randomId
(
TABLEID
.
雨艺孵化器
)
console
.
log
(
'This indicates that the server is started successfully.'
);
console
.
log
(
'This indicates that the server is started successfully.'
);
}
}
...
...
src/routers/enterpriseInfo.ts
View file @
488d2d17
...
@@ -72,6 +72,9 @@ export function setRouter(httpServer) {
...
@@ -72,6 +72,9 @@ export function setRouter(httpServer) {
/**企业营收 */
/**企业营收 */
httpServer
.
post
(
'/xcx/finance/revenue/info'
,
checkUser
,
asyncHandler
(
revenueInfo
));
httpServer
.
post
(
'/xcx/finance/revenue/info'
,
checkUser
,
asyncHandler
(
revenueInfo
));
httpServer
.
post
(
'/xcx/finance/revenue/update'
,
checkUser
,
asyncHandler
(
revenueUpdate
));
httpServer
.
post
(
'/xcx/finance/revenue/update'
,
checkUser
,
asyncHandler
(
revenueUpdate
));
httpServer
.
post
(
'/xcx/finance/revenue/add'
,
checkUser
,
asyncHandler
(
revenueAdd
));
httpServer
.
post
(
'/xcx/finance/revenue/del'
,
checkUser
,
asyncHandler
(
revenueDel
));
httpServer
.
post
(
'/xcx/finance/revenue/list'
,
checkUser
,
asyncHandler
(
revenueList
));
//=============政策速递
//=============政策速递
...
@@ -99,6 +102,8 @@ async function revenueInfo(req, res) {
...
@@ -99,6 +102,8 @@ async function revenueInfo(req, res) {
res
.
success
(
result
);
res
.
success
(
result
);
}
}
/**
/**
*
*
* @param req
* @param req
...
@@ -112,6 +117,47 @@ async function revenueUpdate(req, res) {
...
@@ -112,6 +117,47 @@ async function revenueUpdate(req, res) {
res
.
success
(
result
);
res
.
success
(
result
);
}
}
/**
*
* @param req
* @param res
*/
async
function
revenueAdd
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
param
}
=
req
.
body
;
let
result
=
await
enterpriseInfoBiz
.
createEnterpriseManageInfo
(
UserInfo
.
eId
,
param
);
res
.
success
(
result
);
}
/**
*
* @param req
* @param res
*/
async
function
revenueDel
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
mId
}
=
req
.
body
let
result
=
await
enterpriseInfoBiz
.
deleteEnterpriseManageInfo
(
UserInfo
.
eId
,
mId
);
res
.
success
(
result
);
}
/**
*
* @param req
* @param res
*/
async
function
revenueList
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
result
=
await
enterpriseInfoBiz
.
enterpriseManageList
(
UserInfo
.
eId
);
res
.
success
(
result
);
}
//====================================政策速递
//====================================政策速递
...
...
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