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
4cc09c72
Commit
4cc09c72
authored
May 04, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3.0小程序
parent
599f324c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
367 additions
and
43 deletions
+367
-43
4月导入企业数据.xlsx
res/4月导入企业数据.xlsx
+0
-0
企业信息更新202304.xlsx
res/企业信息更新202304.xlsx
+0
-0
enterprise.ts
src/biz/admin/enterprise/enterprise.ts
+2
-2
provide.ts
src/biz/admin/provide.ts
+144
-1
businessData.ts
src/biz/mobileEnterprise/businessData.ts
+121
-30
enterprise.ts
src/biz/mobileFuHuaQi/enterprise/enterprise.ts
+2
-2
enum.ts
src/config/enum.ts
+11
-0
errorEnum.ts
src/config/errorEnum.ts
+3
-1
businessdata.ts
src/data/enterprise/businessdata.ts
+1
-2
enterprise.ts
src/data/enterprise/enterprise.ts
+2
-1
replenish.ts
src/data/enterprise/replenish.ts
+9
-0
tableInit.ts
src/db/mongo/tableInit.ts
+3
-0
businessdata.ts
src/routers/enterpriseMobileClient/businessdata.ts
+36
-3
provide.ts
src/routers/provide.ts
+13
-0
public.ts
src/routers/public.ts
+20
-1
verificationParam.ts
src/util/verificationParam.ts
+0
-0
No files found.
res/4月导入企业数据.xlsx
0 → 100644
View file @
4cc09c72
File added
res/企业信息更新202304.xlsx
0 → 100644
View file @
4cc09c72
File added
src/biz/admin/enterprise/enterprise.ts
View file @
4cc09c72
...
...
@@ -49,7 +49,7 @@ export async function enterpriseList(createType:number, fuHuaQiUscc:string, indu
if
(
name
)
{
selectParam
.
name
=
{
"$regex"
:
`
${
name
}
`
};
}
selectParam
.
draftLock
=
true
;
//未提交的企业不能查看
selectParam
[
"$or"
]
=
[{
"$and"
:[{
"draftLock"
:
true
},
{
"taskId"
:{
"$ne"
:
null
}}]},
{
"$and"
:[{
"draftLock"
:
false
},
{
"taskId"
:
null
}]}]
;
//未提交的企业不能查看
/**需要用到的查询数据 */
let
usccMap
=
await
fuHuaQiData
.
findAllFuHuaQiOperationNameMap
();
//用于将孵化器uscc变成孵化器名称
...
...
@@ -115,7 +115,7 @@ export async function outPutEnterpriseData(createType:number, fuHuaQiUscc:string
selectParam
.
name
=
{
"$regex"
:
`
${
name
}
`
};
}
}
selectParam
.
draftLock
=
true
;
//匹配已经提交入库的企业
selectParam
[
"$or"
]
=
[{
"$and"
:[{
"draftLock"
:
true
},
{
"taskId"
:{
"$ne"
:
null
}}]},
{
"$and"
:[{
"draftLock"
:
false
},
{
"taskId"
:
null
}]}]
;
//未提交的企业不能查看
/**查询内容 */
let
usccMap
=
await
fuHuaQiData
.
findAllFuHuaQiOperationNameMap
();
//用于将孵化器uscc变成孵化器名称
...
...
src/biz/admin/provide.ts
View file @
4cc09c72
...
...
@@ -8,7 +8,7 @@ import * as taskData from "../../data/fuHuaQi/task";
import
*
as
enterpriseData
from
"../../data/enterprise/enterprise"
;
import
*
as
fuhuaqiData
from
"../../data/fuHuaQi/fuhuaqi"
;
import
*
as
financingData
from
"../../data/enterprise/financing"
;
import
{
CHANGEMODE
,
FUHUASTATE
,
SCOREWAYS
,
TASKTYPEENUM
}
from
"../../config/enum"
;
import
{
CHANGEMODE
,
FUHUASTATE
,
INDUSTRY
,
SCOREWAYS
,
TASKTYPEENUM
}
from
"../../config/enum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
findAllNotDisabledFuHuaQi
,
findFuHuaQiList
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
{
BizError
}
from
"../../util/bizError"
;
...
...
@@ -20,6 +20,8 @@ import * as scoreLogData from "../../data/fuHuaQi/scoreLog";
import
{
ScoreConfig
}
from
"../../config/scoreConfig"
;
import
moment
=
require
(
"moment"
);
import
*
as
sysTools
from
"../../tools/system"
;
const
xlsx
=
require
(
'node-xlsx'
);
const
path
=
require
(
'path'
);
/**
* 发放1月数据
...
...
@@ -317,4 +319,144 @@ export async function updateEnterpriseDataInfo() {
}
console
.
log
(
"补全企业密码成功"
);
}
/**
* 获取当个excel文件数据
* @param filePath
* @returns
*/
function
getExcel
(
filePath
)
{
const
workSheetsFromFile
=
xlsx
.
parse
(
filePath
);
let
sheetMap
=
{};
let
sheetList
=
[];
for
(
let
i
=
0
;
i
<
workSheetsFromFile
.
length
;
i
++
)
{
let
sheetInfo
=
workSheetsFromFile
[
i
];
sheetMap
[
sheetInfo
.
name
]
=
sheetInfo
.
data
;
sheetList
.
push
(
sheetInfo
);
}
return
{
sheetMap
,
sheetList
}
}
export
async
function
inputEnterpriseData
()
{
let
{
sheetMap
}
=
getExcel
(
path
.
join
(
__dirname
.
substring
(
0
,
__dirname
.
indexOf
(
"out"
)),
"res"
,
'4月导入企业数据.xlsx'
));
let
dataList
=
sheetMap
[
'在孵企业20233.xlsx'
];
let
fuHuaQiUsccMap
=
await
fuhuaqiData
.
findAllFuHuaQiOperationUsccMap
();
let
titleMap
=
{
"0"
:
"name"
,
//名称
"1"
:
"fuHuaQiUscc"
,
//所属孵化器
"2"
:
"uscc"
,
"4"
:
"industry"
,
//领域
"5"
:
"logonTime"
,
//注册时间
"6"
:
"firstIncubationTime"
,
//首次入伏时间
"7"
:
"timeOfImmigration"
,
//迁入时间 导入的时候不用管这个字段
"8"
:
"isNaturalPersonHolding"
,
"9"
:
"oldLogonAddress"
,
//迁入前地址
"10"
:
"logonAddress"
,
//注册地址
"11"
:
"operatingAddress"
,
//经营地址
"12"
:
"leasedArea"
,
//租赁面积(平方米)
};
let
utc
=
new
Date
();
let
titleIndexList
=
Object
.
keys
(
titleMap
);
let
addList
=
[];
dataList
.
forEach
((
subList
,
index
)
=>
{
if
(
!
index
)
return
;
//跳过表头
let
addDataInfo
:
any
=
{
draftLock
:
true
,
createTime
:
new
Date
().
valueOf
(),
enterpriseIsInPut
:
true
};
let
isJump
=
false
;
for
(
let
subI
=
0
;
subI
<
titleIndexList
.
length
;
subI
++
)
{
let
i
=
parseInt
(
titleIndexList
[
subI
]);
let
item
=
subList
[
i
];
let
key
=
titleMap
[
i
];
let
value
=
item
;
if
(
i
==
1
)
{
if
(
!
item
||
!
fuHuaQiUsccMap
[
item
])
{
isJump
=
true
;
continue
;
}
value
=
fuHuaQiUsccMap
[
item
];
}
if
(
i
==
4
)
{
value
=
INDUSTRY
[
value
];
}
if
(
i
==
8
)
{
value
=
item
==
"是"
?
true
:
false
;
}
if
(
i
==
11
||
i
==
9
||
i
==
10
)
{
value
=
[
""
,
""
,
""
,
item
];
}
if
(
i
==
5
||
i
==
6
||
i
==
7
)
{
if
(
typeof
item
==
"string"
)
{
value
=
new
Date
(
item
).
valueOf
();
}
else
{
value
=
new
Date
((
item
-
25569
)
*
86400
*
1000
+
utc
.
getTimezoneOffset
()
*
1000
*
60
).
valueOf
();
}
}
addDataInfo
[
key
]
=
value
;
}
// if (!isJump)
addList
.
push
(
addDataInfo
);
});
for
(
let
i
=
0
;
i
<
addList
.
length
;
i
++
)
{
console
.
log
(
addList
[
i
].
logonTime
);
}
await
enterpriseData
.
createEnterpriseToList
(
addList
);
console
.
log
(
"---> 企业数据 初始化成功"
,
addList
.
length
);
}
export
async
function
replaceInitEnberpriseData
()
{
let
{
sheetMap
}
=
getExcel
(
path
.
join
(
__dirname
.
substring
(
0
,
__dirname
.
indexOf
(
"out"
)),
"res"
,
'企业信息更新202304.xlsx'
));
let
dataList
=
sheetMap
[
'表格'
];
let
utc
=
new
Date
();
for
(
let
i
=
1
;
i
<
dataList
.
length
;
i
++
)
{
let
subList
=
dataList
[
i
];
let
uscc
=
subList
[
4
];
let
changeInfo
:
any
=
{
isCreate
:
subList
[
3
]
==
"新迁入"
?
false
:
true
,
industry
:
INDUSTRY
.
生物医药
,
mainBusiness
:
subList
[
6
]
||
""
,
logonTime
:
new
Date
((
subList
[
7
]
-
25569
)
*
86400
*
1000
+
utc
.
getTimezoneOffset
()
*
1000
*
60
).
valueOf
(),
firstIncubationTime
:
new
Date
((
subList
[
8
]
-
25569
)
*
86400
*
1000
+
utc
.
getTimezoneOffset
()
*
1000
*
60
).
valueOf
(),
timeOfImmigration
:
!
subList
[
9
]
?
-
1
:
new
Date
((
subList
[
9
]
-
25569
)
*
86400
*
1000
+
utc
.
getTimezoneOffset
()
*
1000
*
60
).
valueOf
(),
isNaturalPersonHolding
:
subList
[
10
]
==
"是"
,
oldLogonAddress
:
getNewAdd
(
subList
[
11
]),
logonAddress
:
getNewAdd
(
subList
[
12
]),
operatingAddress
:
getNewAdd
(
subList
[
13
]),
leasedArea
:
subList
[
14
]
};
if
(
uscc
==
"91310120MA1HQ1TA5K"
)
{
changeInfo
.
uscc
=
"91310120MA1HQ1TA5K"
;
uscc
=
"91310120ma1hq1ta5k"
;
}
let
info
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
if
(
!
info
)
continue
;
for
(
let
key
in
changeInfo
)
{
if
(
changeInfo
[
key
]
==
-
1
)
continue
;
info
[
key
]
=
changeInfo
[
key
];
}
await
info
.
save
();
}
console
.
log
(
"完成"
);
}
\ No newline at end of file
src/biz/mobileEnterprise/businessData.ts
View file @
4cc09c72
...
...
@@ -7,6 +7,9 @@
import
moment
=
require
(
"moment"
);
import
{
findBusinessDataByUsccAndYear
}
from
"../../data/enterprise/businessdata"
;
import
{
eccEnumValue
}
from
"../../util/verificationEnum"
;
import
{
BUSINESSDATATYPE
}
from
"../../config/enum"
;
import
{
findRepleishDataByTypeAndYear
,
replenishData
,
selectRepleishData
}
from
"../../data/enterprise/replenish"
;
/**
...
...
@@ -18,45 +21,58 @@ export async function getBusinessData(uscc:string) {
let
thisYear
=
new
Date
().
getFullYear
();
let
thisYearData
=
await
findBusinessDataByUsccAndYear
(
uscc
,
thisYear
);
let
lastYearData
=
await
findBusinessDataByUsccAndYear
(
uscc
,
lastYear
);
let
thisYearBusinessData
=
countBusinessData
(
thisYearData
);
let
lastYearBusinessData
=
countBusinessData
(
lastYearData
);
let
result
=
{
lastYearBI
:
lastYearBusinessData
.
BI
,
lastYearRD
:
lastYearBusinessData
.
RD
,
lastYearTXP
:
lastYearBusinessData
.
TXP
,
yearTotalBI
:
thisYearBusinessData
.
BI
,
yearTotalRD
:
thisYearBusinessData
.
RD
,
yearTotalTXP
:
thisYearBusinessData
.
TXP
};
let
thisBusinessData
=
{
RD
:
0
,
BI
:
0
,
TXP
:
0
};
thisYearData
.
forEach
(
info
=>
{
for
(
let
key
in
thisBusinessData
)
{
thisBusinessData
[
key
]
+=
info
[
key
]
||
0
;
}
});
for
(
let
key
in
result
)
{
result
[
key
].
notReported
=
!
result
[
key
].
count
;
let
result
=
{};
for
(
let
key
in
thisBusinessData
)
{
let
{
unit
,
count
}
=
countUnitData
(
thisBusinessData
[
key
]);
result
[
`this
${
key
}
`
]
=
{
unit
,
count
}
}
return
result
;
}
/**找缺失 要求是:缺一个季度就要爆红 只要提交了,就算是0也不算是缺失的数据 */
let
deletionMap
=
{
RD
:
0
,
BI
:
0
,
TXP
:
0
};
function
countBusinessData
(
dataList
)
{
let
countRD
=
0
;
let
countBI
=
0
;
let
countTXP
=
0
;
dataList
.
forEach
(
info
=>
{
countBI
+=
info
.
BI
;
countRD
+=
info
.
RD
;
countTXP
+=
info
.
TXP
;
let
lastYearData
=
await
findBusinessDataByUsccAndYear
(
uscc
,
lastYear
);
let
lastBusinessData
=
{
RD
:
0
,
BI
:
0
,
TXP
:
0
};
lastYearData
.
forEach
(
info
=>
{
for
(
let
key
in
lastBusinessData
)
{
lastBusinessData
[
key
]
+=
info
[
key
]
||
0
;
deletionMap
[
key
]
+=
1
;
}
});
let
lastYearRepleishData
=
await
selectRepleishData
(
uscc
,
lastYear
);
lastYearRepleishData
.
forEach
(
info
=>
{
if
(
info
.
type
==
BUSINESSDATATYPE
.
研发投入
)
{
lastBusinessData
.
RD
+=
info
.
value
;
deletionMap
[
"RD"
]
+=
1
;
}
if
(
info
.
type
==
BUSINESSDATATYPE
.
纳税
)
{
lastBusinessData
.
TXP
+=
info
.
value
;
deletionMap
[
"TXP"
]
+=
1
;
}
if
(
info
.
type
==
BUSINESSDATATYPE
.
营业收入
)
{
lastBusinessData
.
BI
+=
info
.
value
;
deletionMap
[
"BI"
]
+=
1
;
}
});
return
{
RD
:
countUnitData
(
countRD
),
BI
:
countUnitData
(
countBI
),
TXP
:
countUnitData
(
countTXP
),
for
(
let
key
in
lastBusinessData
)
{
let
{
unit
,
count
}
=
countUnitData
(
lastBusinessData
[
key
]);
let
deletion
=
deletionMap
[
key
]
<
4
;
result
[
`last
${
key
}
`
]
=
{
unit
,
count
,
deletion
}
}
return
result
;
}
/**
* 获取格式 将金额数据转换为金额加单位
* 单位为:元 万元 根据长度自动转换
...
...
@@ -78,3 +94,77 @@ function countUnitData(data:number) {
}
}
/**
* 补录经营数据
* @param uscc 统一信用代码
* @param quarters 补录季度
* @param type 补录类型
* @param value 值
*/
export
async
function
replenishBusinessData
(
uscc
:
string
,
type
:
number
,
data
)
{
eccEnumValue
(
"补录经营数据"
,
"type"
,
BUSINESSDATATYPE
,
type
);
let
lastYear
=
parseInt
(
moment
().
subtract
(
1
,
'year'
).
format
(
"YYYY"
)
);
let
resultData
=
[
0
,
0
,
0
,
0
];
let
lastYearData
=
await
findBusinessDataByUsccAndYear
(
uscc
,
lastYear
);
lastYearData
.
forEach
(
info
=>
{
let
addIndex
=
info
.
quarters
-
1
;
if
(
type
==
BUSINESSDATATYPE
.
研发投入
)
resultData
[
addIndex
]
+=
info
.
RD
;
if
(
type
==
BUSINESSDATATYPE
.
纳税
)
resultData
[
addIndex
]
+=
info
.
TXP
;
if
(
type
==
BUSINESSDATATYPE
.
营业收入
)
resultData
[
addIndex
]
+=
info
.
BI
;
});
/**获取上一年度补录 */
let
lastYearReplenishData
=
await
findRepleishDataByTypeAndYear
(
uscc
,
type
,
lastYear
);
lastYearReplenishData
.
forEach
(
info
=>
{
let
addIndex
=
info
.
quarters
-
1
;
resultData
[
addIndex
]
+=
info
.
value
;
});
let
checkMap
=
{};
data
.
forEach
((
val
,
index
)
=>
{
if
(
index
>
4
)
return
;
if
(
resultData
[
index
]
==
0
&&
val
>
0
)
{
checkMap
[
index
+
1
]
=
val
;
}
});
for
(
let
key
in
checkMap
)
{
let
quarters
=
parseInt
(
key
);
let
value
=
checkMap
[
key
];
await
replenishData
(
uscc
,
lastYear
,
quarters
,
type
,
value
);
}
return
{
isSuccess
:
true
};
}
/**
* 根据类型上一年度经营数据
* @param uscc 统一信用代码
*/
export
async
function
lastYearBusinessData
(
uscc
:
string
,
type
:
number
)
{
eccEnumValue
(
"补录经营数据"
,
"type"
,
BUSINESSDATATYPE
,
type
);
let
lastYear
=
parseInt
(
moment
().
subtract
(
1
,
'year'
).
format
(
"YYYY"
)
);
let
lastYearData
=
await
findBusinessDataByUsccAndYear
(
uscc
,
lastYear
);
let
resultData
=
[
0
,
0
,
0
,
0
];
lastYearData
.
forEach
(
info
=>
{
let
addIndex
=
info
.
quarters
-
1
;
if
(
type
==
BUSINESSDATATYPE
.
研发投入
)
resultData
[
addIndex
]
+=
info
.
RD
;
if
(
type
==
BUSINESSDATATYPE
.
纳税
)
resultData
[
addIndex
]
+=
info
.
TXP
;
if
(
type
==
BUSINESSDATATYPE
.
营业收入
)
resultData
[
addIndex
]
+=
info
.
BI
;
});
/**获取上一年度补录 */
let
lastYearReplenishData
=
await
findRepleishDataByTypeAndYear
(
uscc
,
type
,
lastYear
);
lastYearReplenishData
.
forEach
(
info
=>
{
let
addIndex
=
info
.
quarters
-
1
;
resultData
[
addIndex
]
+=
info
.
value
;
});
return
{
dataList
:
resultData
};
}
\ No newline at end of file
src/biz/mobileFuHuaQi/enterprise/enterprise.ts
View file @
4cc09c72
...
...
@@ -451,7 +451,7 @@ export async function replenishMyEnterpriseInPutInfo(fuHuaQiUscc:string, param)
param
.
isCreate
=
false
;
//标识此次操作是否是迁入企业并不是新注册企业
param
.
state
=
configEnum
.
FUHUASTATE
.
实体孵化
;
await
enterpriseData
.
replenishData
(
fuHuaQiUscc
,
param
);
await
enterpriseData
.
replenish
Enterprise
Data
(
fuHuaQiUscc
,
param
);
return
{
isSuccess
:
true
};
}
...
...
@@ -477,7 +477,7 @@ export async function replenishMyEnterpriseCreateInfo(fuHuaQiUscc:string, param)
param
.
isCreate
=
false
;
//标识此次操作是否是迁入企业并不是新注册企业
param
.
state
=
configEnum
.
FUHUASTATE
.
实体孵化
;
await
enterpriseData
.
replenishData
(
fuHuaQiUscc
,
param
);
await
enterpriseData
.
replenish
Enterprise
Data
(
fuHuaQiUscc
,
param
);
return
{
isSuccess
:
true
};
}
src/config/enum.ts
View file @
4cc09c72
...
...
@@ -360,3 +360,13 @@ export enum LISTINGSITUATION {
科创板
,
海外
,
}
/**
* 经营数据类型
*/
export
enum
BUSINESSDATATYPE
{
营业收入
=
1
,
研发投入
,
纳税
}
\ No newline at end of file
src/config/errorEnum.ts
View file @
4cc09c72
...
...
@@ -51,7 +51,9 @@ export enum ERRORENUM {
未提交填报数据不能修改
,
未提交填报数据
,
不在填报范围之内
,
只能删除本企业信息
只能删除本企业信息
,
不能补录已有数据
,
请正确填报数据
}
export
enum
ERRORCODEENUM
{
...
...
src/data/enterprise/businessdata.ts
View file @
4cc09c72
...
...
@@ -62,4 +62,4 @@ export async function findNotSubmitBusinessDataByTimeAndUscc(uscc:string, year:n
export
async
function
createBusinessData
(
uscc
:
string
,
year
:
number
,
quarters
:
number
,
BI
:
number
,
RD
:
number
,
TXP
:
number
)
{
let
addInfo
=
{
uscc
,
year
,
quarters
,
BI
,
RD
,
TXP
,
createTime
:
new
Date
().
valueOf
()
};
await
businessDataModel
.
create
(
addInfo
);
}
\ No newline at end of file
}
src/data/enterprise/enterprise.ts
View file @
4cc09c72
...
...
@@ -299,7 +299,7 @@ export async function updateEnterpriseState(state:number) {
* @param fuHuaQiUscc
* @param param
*/
export
async
function
replenishData
(
fuHuaQiUscc
:
string
,
param
)
{
export
async
function
replenish
Enterprise
Data
(
fuHuaQiUscc
:
string
,
param
)
{
let
addInfo
=
Object
.
assign
({
fuHuaQiUscc
,
createTime
:
new
Date
().
valueOf
()},
param
);
await
enterpriseModel
.
create
(
addInfo
);
}
...
...
@@ -308,3 +308,4 @@ export async function replenishData(fuHuaQiUscc:string, param) {
export
async
function
findStats
()
{
return
await
enterpriseModel
.
find
({
enterpriseIsInPut
:
false
});
}
src/data/enterprise/replenish.ts
View file @
4cc09c72
...
...
@@ -47,4 +47,12 @@ export async function save(throwError=false) {
export
async
function
replenishData
(
uscc
:
string
,
year
:
number
,
quarters
:
number
,
type
:
number
,
value
:
number
)
{
let
addInfo
=
{
uscc
,
year
,
quarters
,
type
,
value
,
timeMs
:
new
Date
().
valueOf
()
};
await
replenishDataModel
.
create
(
addInfo
);
}
export
async
function
selectRepleishData
(
uscc
:
string
,
year
:
number
)
{
return
await
replenishDataModel
.
find
({
uscc
,
year
});
}
export
async
function
findRepleishDataByTypeAndYear
(
uscc
:
string
,
type
:
number
,
year
:
number
)
{
return
await
replenishDataModel
.
find
({
uscc
,
type
,
year
});
}
\ No newline at end of file
src/db/mongo/tableInit.ts
View file @
4cc09c72
...
...
@@ -11,6 +11,7 @@ import * as smsPointOutModel from "../../data/fuHuaQi/smsPointOut";
import
*
as
businessdataModel
from
"../../data/enterprise/businessdata"
;
import
*
as
financingInfoModel
from
"../../data/enterprise/financingInfo"
;
import
*
as
replenishModel
from
"../../data/enterprise/replenish"
;
import
*
as
teamModel
from
"../../data/enterprise/team"
;
...
...
@@ -29,4 +30,5 @@ export async function initTable() {
businessdataModel
.
initModel
();
financingInfoModel
.
initModel
();
teamModel
.
initModel
();
replenishModel
.
initModel
();
}
\ No newline at end of file
src/routers/enterpriseMobileClient/businessdata.ts
View file @
4cc09c72
...
...
@@ -5,11 +5,13 @@
import
*
as
asyncHandler
from
'express-async-handler'
;
import
{
checkEnterpriseToken
}
from
'../../middleware/user'
;
import
*
as
businessDataBiz
from
'../../biz/mobileEnterprise/businessData'
;
import
{
eccReqParamater
}
from
'../../util/verificationParam'
;
export
function
setRouter
(
httpServer
)
{
httpServer
.
post
(
'/enterprise/businessdata/homepage'
,
checkEnterpriseToken
,
asyncHandler
(
homePageBusinessData
));
/**可修改的经营数据 */
httpServer
.
post
(
'/enterprise/businessdata/'
,
checkEnterpriseToken
,
asyncHandler
(
homePageBusinessData
));
httpServer
.
post
(
'/enterprise/businessdata/info'
,
checkEnterpriseToken
,
asyncHandler
(
lastYearBusinessData
));
httpServer
.
post
(
'/enterprise/businessdata/replenish'
,
checkEnterpriseToken
,
asyncHandler
(
replenishData
));
}
...
...
@@ -22,4 +24,36 @@ async function homePageBusinessData(req, res) {
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
businessDataBiz
.
getBusinessData
(
Uscc
);
res
.
success
(
result
);
}
\ No newline at end of file
}
/**
* 特定类型经营数据
* @param req
* @param res
*/
async
function
lastYearBusinessData
(
req
,
res
)
{
const
Uscc
=
req
.
headers
.
uscc
;
let
reqConf
=
{
type
:
'Number'
};
let
{
type
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
result
=
await
businessDataBiz
.
lastYearBusinessData
(
Uscc
,
type
);
res
.
success
(
result
);
}
/**
* 补录经营数据
* @param req
* @param res
*/
async
function
replenishData
(
req
,
res
)
{
const
Uscc
=
req
.
headers
.
uscc
;
let
reqConf
=
{
data
:
"[Number]"
,
type
:
"Number"
};
let
{
data
,
type
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
result
=
await
businessDataBiz
.
replenishBusinessData
(
Uscc
,
type
,
data
);
res
.
success
(
result
);
}
src/routers/provide.ts
View file @
4cc09c72
...
...
@@ -18,9 +18,22 @@ export function setRouter(httpServer) {
httpServer
.
post
(
'/admin/provide/data/updateadd'
,
checkInterior
,
asyncHandler
(
updateAddress
));
/**3.0 */
httpServer
.
post
(
'/admin/provide/enterprise/enterpriseinfo'
,
checkInterior
,
asyncHandler
(
enterpriseInfo
));
/**补录数据 */
httpServer
.
post
(
'/admin/provide/basedata/inputdata'
,
checkInterior
,
asyncHandler
(
inputData
));
httpServer
.
post
(
'/admin/provide/basedata/inputenterprise202304data'
,
checkInterior
,
asyncHandler
(
inputEnterprise202304Data
));
}
async
function
inputEnterprise202304Data
(
req
,
res
)
{
await
provideBiz
.
replaceInitEnberpriseData
();
res
.
success
({
isUsccess
:
true
});
}
async
function
inputData
(
req
,
res
)
{
await
provideBiz
.
inputEnterpriseData
();
res
.
success
({
isUsccess
:
true
});
}
/**
* 手动发放一月份任务
...
...
src/routers/public.ts
View file @
4cc09c72
...
...
@@ -3,7 +3,7 @@
*/
import
*
as
asyncHandler
from
'express-async-handler'
;
import
{
FUHUAQILV
,
INSTITUTIONALNATURE
,
FUHUAINDUSTRY
,
INDUSTRY
,
FUHUAQILNVESTMENTSTYLE
,
OPERATIONMODEL
,
TEAM
,
DEGREE
,
FINANCINGROUNDS
,
INSIDESTATE
,
VIRTUALCAUSE
,
MOVEOUTTYPE
,
MOVEOUTCAUSE
,
MOVEOUTCAUSECLIENT
,
MOVEOUTCAUSENOTCLIENT
,
MOVEOUTTRACE
,
ENTERPRISETEAM
,
LISTINGSITUATION
}
from
'../config/enum'
;
import
{
FUHUAQILV
,
INSTITUTIONALNATURE
,
FUHUAINDUSTRY
,
INDUSTRY
,
FUHUAQILNVESTMENTSTYLE
,
OPERATIONMODEL
,
TEAM
,
DEGREE
,
FINANCINGROUNDS
,
INSIDESTATE
,
VIRTUALCAUSE
,
MOVEOUTTYPE
,
MOVEOUTCAUSE
,
MOVEOUTCAUSECLIENT
,
MOVEOUTCAUSENOTCLIENT
,
MOVEOUTTRACE
,
ENTERPRISETEAM
,
LISTINGSITUATION
,
BUSINESSDATATYPE
}
from
'../config/enum'
;
export
function
setRouter
(
httpServer
)
{
httpServer
.
post
(
'/public/fuhuaqilv'
,
asyncHandler
(
getFuHuaQiLv
));
...
...
@@ -27,10 +27,29 @@ export function setRouter(httpServer) {
/**3.0 */
httpServer
.
post
(
'/public/enterpriseteam'
,
asyncHandler
(
initTeam
)
);
httpServer
.
post
(
'/public/listingsituation'
,
asyncHandler
(
listingSituation
)
);
httpServer
.
post
(
'/public/businessdatatype'
,
asyncHandler
(
businessDataType
)
);
}
/**
* 小程序端 经营数据类型
* @param req
* @param res
*/
function
businessDataType
(
req
,
res
)
{
let
dataList
=
[];
for
(
let
key
in
BUSINESSDATATYPE
)
{
let
anyKey
:
any
=
key
;
if
(
isNaN
(
anyKey
))
{
let
keyStr
=
key
;
dataList
.
push
({
key
:
keyStr
,
value
:
BUSINESSDATATYPE
[
key
]});
}
}
res
.
success
({
dataList
});
}
/**
* 小程序端 上市情况
* @param req
* @param res
...
...
src/util/verificationParam.ts
View file @
4cc09c72
This diff is collapsed.
Click to expand it.
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