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
779b9d09
Commit
779b9d09
authored
Feb 13, 2025
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
488d2d17
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
98 additions
and
32 deletions
+98
-32
enterpriseInfo.ts
src/biz/enterpriseInfo.ts
+79
-26
enterprise.ts
src/config/eccParam/enterprise.ts
+2
-2
enum.ts
src/config/enum/enum.ts
+12
-0
errorEnum.ts
src/config/enum/errorEnum.ts
+2
-1
enterpriseInfo.ts
src/routers/enterpriseInfo.ts
+3
-3
No files found.
src/biz/enterpriseInfo.ts
View file @
779b9d09
...
...
@@ -128,7 +128,7 @@ export async function taskList(eId:string, year, state) {
let
dataList
:
any
[]
=
[];
let
thisYear
=
new
Date
().
getFullYear
();
let
jysjFile
=
[
"BI"
,
"TXP"
,
"RD"
,
"mId"
,
"state"
];
let
jysjFile
=
[
"BI"
,
"TXP"
,
"RD"
,
"mId"
,
"state"
,
"isSubmit"
];
let
thisYearjJysjInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
eId
,
annual
:
getMySqlMs
(
`
${
thisYear
}
-01-01 00:00:00`
)},
jysjFile
);
if
(
!
thisYearjJysjInfo
||
!
thisYearjJysjInfo
.
mId
)
{
//创建新的填报任务
...
...
@@ -140,7 +140,9 @@ export async function taskList(eId:string, year, state) {
TXP
:
0
,
RD
:
0
,
createTime
:
getMySqlMs
(),
state
:
0
state
:
0
,
isSubmit
:
0
,
isUpdate
:
0
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
企业经营信息
,
itemInfo
,
{});
}
...
...
@@ -155,23 +157,25 @@ export async function taskList(eId:string, year, state) {
TXP
:
0
,
RD
:
0
,
createTime
:
getMySqlMs
(),
state
:
0
state
:
0
,
isSubmit
:
0
,
isUpdate
:
0
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
企业经营信息
,
itemInfo
,
{});
}
let
selectParam
:
any
=
{
eId
,
annual
:
getMySqlMs
(
`
${
year
}
-01-01 00:00:00`
)};
if
(
state
==
1
)
selectParam
.
state
=
0
;
else
selectParam
.
state
=
1
;
if
(
state
==
1
)
selectParam
.
isSubmit
=
0
;
else
selectParam
.
isSubmit
=
1
;
let
manageList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
企业经营信息
,
selectParam
,
jysjFile
);
manageList
.
forEach
(
info
=>
{
dataList
.
push
({
mId
:
info
.
mId
,
state
:
info
.
state
,
remaining
:
!
info
.
state
?
100
:
0
,
isSubmit
:
info
.
state
==
0
state
:
info
.
isSubmit
,
remaining
:
!
info
.
isSubmit
?
100
:
0
,
isSubmit
:
info
.
isSubmit
==
1
});
});
...
...
@@ -204,14 +208,14 @@ export async function enterpriseBaseInfo(eId) {
* @param uscc
*/
export
async
function
submitTask
(
eId
:
string
,
mId
:
string
)
{
let
filesList
=
[
"mId"
,
"
state
"
];
let
filesList
=
[
"mId"
,
"
isSubmit
"
];
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
eId
,
mId
},
filesList
);
if
(
!
resInfo
||
!
resInfo
.
mId
)
{
throw
new
BizError
(
ERRORENUM
.
数据不存在
);
}
if
(
resInfo
.
state
==
1
)
throw
new
BizError
(
ERRORENUM
.
不可重复提交
)
if
(
resInfo
.
isSubmit
==
1
)
throw
new
BizError
(
ERRORENUM
.
不可重复提交
)
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
企业经营信息
,
{
state
:
1
},
{
eId
,
mId
});
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
企业经营信息
,
{
isSubmit
:
1
},
{
eId
,
mId
});
return
{
isSuccess
:
true
};
}
...
...
@@ -373,6 +377,10 @@ export async function updateEnterpriseIPRInfo(eId, iprId, param) {
let
filesList
=
[
"year"
,
"number"
];
let
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
知识产权
,
{
iprId
,
eId
},
filesList
)
if
(
!
iprInfo
||
!
iprInfo
.
year
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
let
disIprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
知识产权
,
{
year
:
getMySqlMs
(
param
.
year
),
eId
},
[
"eId"
,
"iprId"
])
if
(
disIprInfo
&&
disIprInfo
.
eId
&&
disIprInfo
.
iprId
!=
iprId
)
throw
new
BizError
(
ERRORENUM
.
存在重复的年份数据
);
/**修改字段 */
let
changeList
=
checkChange
(
param
,
iprInfo
);
if
(
!
changeList
.
length
)
return
{
isSuccess
:
true
};
...
...
@@ -393,7 +401,10 @@ export async function updateEnterpriseIPRInfo(eId, iprId, param) {
export
async
function
createEnterpriseIPRInfo
(
eId
,
param
)
{
const
FuncName
=
"企业创建知识产权"
eccFormParam
(
FuncName
,
EnterpriseIPRUpdateConfig
,
param
);
let
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
知识产权
,
{
year
:
getMySqlMs
(
param
.
year
),
eId
},
[
"eId"
])
if
(
iprInfo
&&
iprInfo
.
eId
)
throw
new
BizError
(
ERRORENUM
.
存在重复的年份数据
);
let
addInfo
=
{
eId
,
year
:
getMySqlMs
(
param
.
year
),
...
...
@@ -461,6 +472,8 @@ export async function updateEnterprisePatentInfo(eId, pId, param) {
let
filesList
=
[
"pId"
,
"year"
,
"alienPatent"
,
"classIPatent"
,
"secondClassPatent"
,
"thirdPentent"
];
let
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业专利表
,
{
pId
,
eId
},
filesList
)
if
(
!
iprInfo
||
!
iprInfo
.
year
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
let
disInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业专利表
,
{
year
:
getMySqlMs
(
param
.
year
),
eId
},
[
"eId"
,
"pId"
])
if
(
disInfo
&&
disInfo
.
eId
&&
disInfo
.
pId
!=
pId
)
throw
new
BizError
(
ERRORENUM
.
存在重复的年份数据
);
/**修改字段 */
let
changeList
=
checkChange
(
param
,
iprInfo
);
if
(
!
changeList
.
length
)
return
{
isSuccess
:
true
};
...
...
@@ -481,6 +494,9 @@ export async function createEnterprisePatentInfo(eId, param) {
const
FuncName
=
"企业创建知识产权"
eccFormParam
(
FuncName
,
EnterprisePatentUpdateConfig
,
param
);
let
disInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业专利表
,
{
year
:
getMySqlMs
(
param
.
year
),
eId
},
[
"eId"
])
if
(
disInfo
&&
disInfo
.
eId
)
throw
new
BizError
(
ERRORENUM
.
存在重复的年份数据
);
let
addInfo
=
{
eId
,
year
:
getMySqlMs
(
param
.
year
),
...
...
@@ -708,7 +724,7 @@ export async function enterpriseTeamInfo(eId) {
tId
,
name
,
sex
:
changeEnumValue
(
enumConfig
.
SEX
,
sex
),
birth
,
birth
:
moment
(
birth
).
format
(
"YYYY-MM-DD"
)
,
degree
:
changeEnumValue
(
enumConfig
.
DEGREE
,
degree
),
graduationSchool
,
talentType
:
changeEnumValue
(
enumConfig
.
ENTERPRISETEAM
,
talentType
),
...
...
@@ -810,7 +826,7 @@ export async function enterpriseCanBaoInfo(eId) {
let
{
cId
,
annual
,
zhuanKe
,
benKe
,
yanJiuSheng
,
boShi
,
qiTa
}
=
item
;
dataList
.
push
({
cId
,
annual
,
zhuanKe
,
benKe
,
yanJiuSheng
,
boShi
,
qiTa
cId
,
annual
:
new
Date
(
annual
).
valueOf
()
,
zhuanKe
,
benKe
,
yanJiuSheng
,
boShi
,
qiTa
});
});
...
...
@@ -830,9 +846,12 @@ export async function updateEnterpriseCanBaoInfo(eId, cId, param) {
eccFormParam
(
FuncName
,
EnterpriseCanBaoUpdateConfig
,
param
);
let
filesList
=
[
"annual"
,
"zhuanKe"
,
"benKe"
,
"yanJiuSheng"
,
"boShi"
,
"qiTa"
];
let
filesList
=
[
"annual"
,
"zhuanKe"
,
"benKe"
,
"yanJiuSheng"
,
"boShi"
,
"qiTa"
,
"cId"
];
let
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
参保记录
,
{
cId
,
eId
},
filesList
);
if
(
!
iprInfo
||
!
iprInfo
.
annual
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
参保记录
,
{
eId
,
annual
:
getMySqlMs
(
param
.
annual
)},
filesList
);
if
(
resInfo
&&
resInfo
.
annual
&&
resInfo
.
cId
!=
cId
)
throw
new
BizError
(
ERRORENUM
.
不可重复添加同一年度数据
);
/**修改字段 */
param
.
annual
=
getMySqlMs
(
param
.
annual
);
...
...
@@ -903,11 +922,28 @@ export async function enterpriseFinancingInfo(eId) {
let
dataList
:
any
[]
=
[];
iprList
.
forEach
(
item
=>
{
let
{
rId
,
financingAmount
,
financingRounds
,
fuHuaQiInvestment
,
fuHuaQiInvestmentStyle
,
fuHuaQiInvestmentAmount
,
investmentDate
,
investmentInstitutionsName
,
valuation
}
=
item
;
let
{
rId
,
financingAmount
,
financingRounds
,
fuHuaQiInvestment
,
fuHuaQiInvestmentStyle
,
fuHuaQiInvestmentAmount
,
investmentDate
,
investmentInstitutionsName
,
valuation
}
=
item
;
let
info
:
any
=
{
rId
,
financingAmount
,
financingRounds
,
fuHuaQiInvestment
,
investmentDate
:
new
Date
(
investmentDate
).
valueOf
(),
investmentInstitutionsName
,
valuation
};
if
(
fuHuaQiInvestment
==
enumConfig
.
STATE
.
是
)
{
info
.
fuHuaQiInvestmentStyle
=
fuHuaQiInvestmentStyle
;
info
.
fuHuaQiInvestmentAmount
=
fuHuaQiInvestmentAmount
;
}
dataList
.
push
({
rId
,
financingAmount
,
financingRounds
,
fuHuaQiInvestment
,
fuHuaQiInvestmentStyle
,
fuHuaQiInvestmentAmount
,
investmentDate
,
investmentInstitutionsName
,
valuation
});
dataList
.
push
(
info
);
});
return
{
dataList
};
...
...
@@ -924,6 +960,12 @@ export async function updateEnterpriseFinancingInfo(eId, rId, param) {
const
FuncName
=
"企业修改融资信息"
eccFormParam
(
FuncName
,
EnterpriseFinancingUpdateConfig
,
param
);
if
(
param
.
fuHuaQiInvestment
==
enumConfig
.
STATE
.
是
)
{
if
(
!
param
.
fuHuaQiInvestmentStyle
||
!
param
.
fuHuaQiInvestmentAmount
)
throw
new
BizError
(
ERRORENUM
.
参数错误
);
}
else
{
param
.
fuHuaQiInvestmentStyle
=
0
;
param
.
fuHuaQiInvestmentAmount
=
0
;
}
let
filesList
=
[
"rId"
,
"financingAmount"
,
"financingRounds"
,
"fuHuaQiInvestment"
,
"fuHuaQiInvestmentStyle"
,
"fuHuaQiInvestmentAmount"
,
"investmentDate"
,
"investmentInstitutionsName"
,
"valuation"
];
let
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业融资
,
{
rId
,
eId
},
filesList
)
if
(
!
iprInfo
||
!
iprInfo
.
rId
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
...
...
@@ -955,9 +997,13 @@ export async function createEnterpriseFinancingInfo(eId, param) {
valuation
:
param
.
valuation
,
};
addInfo
.
fuHuaQiInvestment
=
param
.
fuHuaQiInvestment
;
if
(
param
.
fuHuaQiInvestment
)
{
if
(
param
.
fuHuaQiInvestment
==
enumConfig
.
STATE
.
是
)
{
if
(
!
param
.
fuHuaQiInvestmentStyle
||
!
param
.
fuHuaQiInvestmentAmount
)
throw
new
BizError
(
ERRORENUM
.
参数错误
);
addInfo
.
fuHuaQiInvestmentStyle
=
param
.
fuHuaQiInvestmentStyle
;
addInfo
.
fuHuaQiInvestmentAmount
=
param
.
fuHuaQiInvestmentAmount
;
}
else
{
param
.
fuHuaQiInvestmentStyle
=
"[]"
;
param
.
fuHuaQiInvestmentAmount
=
0
;
}
...
...
@@ -1022,7 +1068,7 @@ export async function enterpriseServiceList(eId) {
*/
export
async
function
enterpriseServiceInfo
(
eId
,
esId
)
{
let
filesList
=
[
"esId"
,
"needCategory"
,
"applyTime"
,
"followUpStatus"
,
"needContent"
,
"fangKui"
];
let
filesList
=
[
"esId"
,
"needCategory"
,
"applyTime"
,
"followUpStatus"
,
"needContent"
,
"fangKui"
,
"outcome"
,
"desc"
];
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业服务表
,
{
esId
,
eId
},
filesList
)
if
(
!
resInfo
||
!
resInfo
.
esId
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
...
...
@@ -1034,6 +1080,10 @@ export async function enterpriseServiceInfo(eId, esId) {
needContent
:
resInfo
.
needContent
,
dealResult
:
resInfo
.
fangKui
,
}
if
(
resInfo
.
followUpStatus
==
enumConfig
.
FOLLOWUPSTATUS
.
已完成
)
{
dataInfo
.
dealResult
=
`已处理
${
resInfo
.
outcome
?
"已解决"
:
"未解决"
}
`
;
if
(
resInfo
.
desc
)
dataInfo
.
dealResult
+=
`,
${
resInfo
.
desc
}
`
;
}
return
{
dataInfo
};
}
...
...
@@ -1148,9 +1198,9 @@ export async function enterpriseManageInfo(eId, mId) {
let
dataInfo
=
{
mId
:
resInfo
.
mId
,
annual
:
moment
(
resInfo
.
annual
).
format
(
"YYYY"
),
BI
:
resInfo
.
BI
,
TXP
:
resInfo
.
TXP
,
RD
:
resInfo
.
RD
BI
:
parseFloat
(
resInfo
.
BI
)
,
TXP
:
parseFloat
(
resInfo
.
TXP
)
,
RD
:
parseFloat
(
resInfo
.
RD
)
}
return
{
dataInfo
};
...
...
@@ -1160,14 +1210,17 @@ export async function enterpriseManageInfo(eId, mId) {
export
async
function
updateEnterpriseManageInfo
(
eId
,
mId
,
param
)
{
const
FuncName
=
"企业修改企业营收记录"
eccFormParam
(
FuncName
,
EnterpriseManageInfoUpdateConfig
,
param
);
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
eId
,
mId
},
[]);
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
eId
,
mId
},
[
"annual"
,
"mId"
]);
if
(
!
resInfo
||
!
resInfo
.
mId
)
throw
new
BizError
(
ERRORENUM
.
数据不存在
);
let
disInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
eId
,
annual
:
resInfo
.
annual
},
[
"eId"
,
"mId"
]);
if
(
disInfo
&&
disInfo
.
eId
&&
disInfo
.
mId
!=
mId
)
throw
new
BizError
(
ERRORENUM
.
不可重复添加同一年度数据
);
let
dataInfo
=
{
createTime
:
getMySqlMs
(),
BI
:
param
.
BI
,
TXP
:
param
.
TXP
,
RD
:
param
.
RD
RD
:
param
.
RD
,
isUpdate
:
enumConfig
.
STATE
.
是
}
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
企业经营信息
,
dataInfo
,
{
eId
,
mId
});
...
...
src/config/eccParam/enterprise.ts
View file @
779b9d09
...
...
@@ -96,8 +96,8 @@ export const EnterpriseFinancingUpdateConfig = {
financingAmount
:{
key
:
"Number"
},
//融资金额(万元)
financingRounds
:{
key
:
"Number"
},
//融资轮次【枚举】
fuHuaQiInvestment
:{
key
:
"Number"
},
//孵化器是否参与投资【枚举】
fuHuaQiInvestmentStyle
:{
key
:
"String"
},
//孵化器投资方式
fuHuaQiInvestmentAmount
:{
key
:
"Number"
},
//孵化器投资金额
fuHuaQiInvestmentStyle
:{
key
:
"String"
,
notMustHave
:
true
},
//孵化器投资方式
fuHuaQiInvestmentAmount
:{
key
:
"Number"
,
notMustHave
:
true
},
//孵化器投资金额
investmentDate
:{
key
:
"Number"
},
//获得投资时间
investmentInstitutionsName
:{
key
:
"String"
},
//投资机构名称
valuation
:{
key
:
"String"
},
//估值
...
...
src/config/enum/enum.ts
View file @
779b9d09
...
...
@@ -133,3 +133,14 @@ export enum FINANCINGROUNDS {
C
轮
,
C
轮以上
,
}
export
enum
STATE
{
否
=
0
,
是
=
1
}
export
enum
OUTCOME
{
未解决
=
0
,
已解决
}
\ No newline at end of file
src/config/enum/errorEnum.ts
View file @
779b9d09
...
...
@@ -25,7 +25,8 @@ export enum ERRORENUM {
账号或密码错误
,
不可重复添加同一年度数据
,
数据不存在
,
不可重复提交
不可重复提交
,
存在重复的年份数据
}
export
enum
ERRORCODEENUM
{
...
...
src/routers/enterpriseInfo.ts
View file @
779b9d09
...
...
@@ -456,8 +456,8 @@ async function patentList(req, res) {
*/
async
function
patentUpdate
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
param
,
t
Id
}
=
req
.
body
let
result
=
await
enterpriseInfoBiz
.
updateEnterprisePatentInfo
(
UserInfo
.
eId
,
t
Id
,
param
);
let
{
param
,
p
Id
}
=
req
.
body
let
result
=
await
enterpriseInfoBiz
.
updateEnterprisePatentInfo
(
UserInfo
.
eId
,
p
Id
,
param
);
res
.
success
(
result
);
}
...
...
@@ -763,8 +763,8 @@ async function homePageTask(req, res) {
async
function
homePageYear
(
req
,
res
)
{
let
result
=
{
dataList
:[
{
year
:
2023
},
{
year
:
2024
},
{
year
:
2025
},
]
};
...
...
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