Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjxcxServer
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
zjxcxServer
Commits
efe8e414
Commit
efe8e414
authored
Feb 09, 2023
by
孙香冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
87c4b0da
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
73 additions
and
10 deletions
+73
-10
financing.ts
src/biz/enterprise/financing.ts
+7
-5
task.ts
src/biz/fuHuqQi/task.ts
+18
-1
ojbectResultKeyConfig.ts
src/config/ojbectResultKeyConfig.ts
+18
-0
financing.ts
src/data/enterprise/financing.ts
+1
-1
task.ts
src/data/fuHuaQi/task.ts
+11
-0
admin.ts
src/routers/admin.ts
+3
-3
fuhuaqi.ts
src/routers/fuhuaqi.ts
+15
-0
No files found.
src/biz/enterprise/financing.ts
View file @
efe8e414
...
...
@@ -7,7 +7,7 @@
import
{
FinancingParamConfig
}
from
"../../config/checkParamConfig"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
EnterpriseFinancingInfoConfig
,
EnterpriseInfoConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
EnterpriseFinancingInfoConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
createFinancing
,
deleteEnterpriseFinancing
,
findAddByName
,
findEnterpriseFinancingByUscc
,
findFinancingByName
,
findFinancingCount
,
findFinancingInfoByTaskIdAndSucc
,
findFinancingList
,
groupFindFinancing
}
from
"../../data/enterprise/financing"
;
import
{
FinancingListConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
BizError
}
from
"../../util/bizError"
;
...
...
@@ -120,15 +120,17 @@ export async function getAddByName(name:string) {
/**
* 融资企业信息列表
* @param month 数据月份 目前数据库没有该字段
* @param
fuHuaQiUscc 孵化器统一信用代码 实际参数是
所属孵化器
* @param industry 行业领域
根据孵化器信用代码查找 fuhuaqi表的领域
* @param
belongToIncubator
所属孵化器
* @param industry 行业领域
* @param fuHuaQiInvestment 孵化器是否参与投资
* @param page 页数
* @returns
*/
export
async
function
financingList
(
fuHuaQiUscc
:
string
,
fuHuaQiInvestment
:
boolean
,
page
:
number
)
{
export
async
function
financingList
(
month
:
string
,
belongToIncubator
:
string
,
industry
:
string
,
fuHuaQiInvestment
:
boolean
,
page
:
number
)
{
let
selectParam
:
any
=
{};
if
(
fuHuaQiUscc
)
selectParam
.
fuHuaQiUscc
=
fuHuaQiUscc
;
if
(
month
)
selectParam
.
month
=
month
;
if
(
belongToIncubator
)
selectParam
.
belongToIncubator
=
belongToIncubator
;
if
(
industry
)
selectParam
.
industry
=
industry
;
if
(
fuHuaQiInvestment
)
selectParam
.
fuHuaQiInvestment
=
fuHuaQiInvestment
;
let
enterpriseMap
=
await
groupFindFinancing
();
...
...
src/biz/fuHuqQi/task.ts
View file @
efe8e414
...
...
@@ -7,13 +7,14 @@
import
{
TASKTYPEENUM
}
from
"../../config/enum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
TaskListConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
findEnterpriseListByTaskId
,
updateEnterpriseDraftLock
}
from
"../../data/enterprise/enterprise"
;
import
{
findFinancingListByTaskId
,
updateFinancingDraftLock
}
from
"../../data/enterprise/financing"
;
import
{
findAllFuHuaQi
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
{
findmonthTableByTaskId
,
findmonthTableListByTaskId
}
from
"../../data/fuHuaQi/monthTable"
;
import
{
createTaskData
,
findFuHuaQiTaskByKeyAndUscc
}
from
"../../data/fuHuaQi/task"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
getTaskId
,
getTimeKey
}
from
"../../util/tools"
;
import
{
extractData
,
getTaskId
,
getTimeKey
}
from
"../../util/tools"
;
/**
...
...
@@ -108,3 +109,18 @@ export async function provideTask() {
});
}
/**
* 根据uscc查询任务信息
* @param uscc 企业统一信用代码
*/
export
async
function
getTaskByUscc
(
uscc
:
string
)
{
const
TaskId
=
getTaskId
(
uscc
);
let
dataBaseInfo
=
await
findmonthTableByTaskId
(
TaskId
);
if
(
!
dataBaseInfo
)
throw
new
BizError
(
ERRORENUM
.
未找到数据
,
`库中不存在
${
uscc
}
这个企业`
);
let
data
=
extractData
(
TaskListConfig
,
dataBaseInfo
);
return
{
data
};
}
\ No newline at end of file
src/config/ojbectResultKeyConfig.ts
View file @
efe8e414
...
...
@@ -78,6 +78,9 @@ export const EnterpriseFinancingInfoConfig = {
leasedArea
:{
key
:
"租赁面积(平方米)"
},
};
/**
* 企业融资信息 参数转换配置
*/
export
const
FinancingListConfig
=
{
name
:{
key
:
"企业名称"
},
logonAdd
:{
key
:
"注册地址"
},
...
...
@@ -91,6 +94,9 @@ export const FinancingListConfig = {
createTime
:{
key
:
"录入时间 不可修改"
},
}
/**
* 孵化器账号 参数转换配置
*/
export
const
FuHuaQiListConfig
=
{
operationName
:{
key
:
"运营机构名称 不可修改"
},
uscc
:{
key
:
"营业执照"
},
...
...
@@ -98,3 +104,15 @@ export const FuHuaQiListConfig = {
liaisonPhone
:{
key
:
"负责人"
},
personInChargePhone
:{
key
:
"负责人联系电话"
},
}
/**
* 孵化器任务信息 参数转换配置
*/
export
const
TaskListConfig
=
{
name
:{
key
:
"任务名称"
},
fuHuaQiUscc
:{
key
:
"任务所属孵化器id"
},
occupancyRate
:{
key
:
"出租率"
},
liaisonPhone
:{
key
:
"负责人"
},
createTime
:{
key
:
"创建时间"
},
}
src/data/enterprise/financing.ts
View file @
efe8e414
...
...
@@ -25,7 +25,7 @@ const financingSchema = new Schema({
year
:
String
,
//数据年份
month
:
String
,
//数据月份
industry
:[
Number
],
//领域
belongToIncubator
:
String
,
//所属孵化器
});
var
financingModel
;
...
...
src/data/fuHuaQi/task.ts
View file @
efe8e414
...
...
@@ -51,3 +51,14 @@ export async function createTaskData(uscc:string, key:string, taskId:string, typ
await
fuHuaQiTaskModel
.
create
(
addInfo
);
}
/**
* 通过任务id获取任务信息
* 支持.save方法保存对象修改
* @param taskId 任务id
* @returns {}
*/
export
async
function
findEnterpriseByUscc
(
taskId
:
string
)
{
return
await
fuHuaQiTaskModel
.
selectOnceData
({
taskId
});
}
src/routers/admin.ts
View file @
efe8e414
...
...
@@ -76,11 +76,11 @@ async function fuHuaQiBaseList(req, res) {
* @param res
*/
async
function
getFinancingList
(
req
,
res
)
{
let
reqConf
=
{
fuHuaQiUscc
:
'string'
,
fuHuaQiInvestment
:
'boolean'
,
page
:
'number'
};
let
{
fuHuaQiUscc
,
fuHuaQiInvestment
,
page
}
=
checkReqParam
(
reqConf
,
req
.
body
);
let
reqConf
=
{
month
:
'string'
,
belongToIncubator
:
'string'
,
industry
:
'string'
,
fuHuaQiInvestment
:
'boolean'
,
page
:
'number'
};
let
{
month
,
belongToIncubator
,
industry
,
fuHuaQiInvestment
,
page
}
=
checkReqParam
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
financingBiz
.
financingList
(
fuHuaQiUscc
,
fuHuaQiInvestment
,
page
);
let
result
=
await
financingBiz
.
financingList
(
month
,
belongToIncubator
,
industry
,
fuHuaQiInvestment
,
page
);
res
.
success
(
result
);
}
...
...
src/routers/fuhuaqi.ts
View file @
efe8e414
...
...
@@ -22,6 +22,7 @@ export function setRouter(httpServer) {
/**任务 */
httpServer
.
post
(
'/fuhuaqi/task/list'
,
checkFuHuaQiToken
,
asyncHandler
(
taskList
));
httpServer
.
post
(
'/fuhuaqi/task/submit'
,
checkFuHuaQiToken
,
asyncHandler
(
submitTask
));
httpServer
.
post
(
'/fuhuaqi/task/select'
,
checkFuHuaQiToken
,
asyncHandler
(
selectTaskInfo
));
/**月度报表 */
httpServer
.
post
(
'/fuhuaqi/month/addreport'
,
checkFuHuaQiToken
,
asyncHandler
(
addReport
));
httpServer
.
post
(
'/fuhuaqi/month/updatereport'
,
checkFuHuaQiToken
,
asyncHandler
(
updateReport
));
...
...
@@ -318,6 +319,20 @@ async function submitTask(req, res) {
/**
* 查询迁入企业登记信息或新建企业登录信息
* @param req
* @param res
*/
async
function
selectTaskInfo
(
req
,
res
)
{
let
reqConf
=
{
uscc
:
'String'
};
let
{
uscc
}
=
checkReqParam
(
reqConf
,
req
.
body
);
let
result
=
await
taskBiz
.
getTaskByUscc
(
uscc
);
res
.
success
(
result
);
}
/**
* 更新基础数据
* @param req
* @param res
...
...
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