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
8609f1d2
Commit
8609f1d2
authored
Feb 28, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加小数点,系统只保留两位小数
parent
6b9bef44
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
6 deletions
+19
-6
enterprise.ts
src/biz/enterprise/enterprise.ts
+1
-1
base.ts
src/biz/fuHuqQi/base.ts
+4
-0
enterprise.ts
src/data/enterprise/enterprise.ts
+1
-1
financing.ts
src/data/enterprise/financing.ts
+1
-1
verificationParam.ts
src/util/verificationParam.ts
+12
-3
No files found.
src/biz/enterprise/enterprise.ts
View file @
8609f1d2
...
...
@@ -311,7 +311,7 @@ export async function getAffiliationFuHuaQi() {
let
distinctMap
=
{};
//去重用的map对象 格式为:{uscc:name}
notDisabledList
.
forEach
(
info
=>
{
distinctMap
[
info
.
uscc
]
=
info
.
n
ame
;
distinctMap
[
info
.
uscc
]
=
info
.
operationN
ame
;
});
let
result
=
[];
...
...
src/biz/fuHuqQi/base.ts
View file @
8609f1d2
...
...
@@ -32,6 +32,10 @@ export async function homeData(uscc:string) {
data
.
enterpriseCount
=
await
findEnterpriseCountByFuHuaQiUscc
(
uscc
)
||
0
;
data
.
lv
=
changeEnumValue
(
configEnum
.
FUHUAQILV
,
dataBaseInfo
.
lv
);
data
.
institutionalNature
=
changeEnumValue
(
configEnum
.
INSTITUTIONALNATURE
,
dataBaseInfo
.
institutionalNature
);
/**截取小数位 */
data
.
incubatedAcreage
=
parseInt
(
data
.
incubatedAcreage
);
data
.
acreageTotal
=
parseInt
(
data
.
acreageTotal
);
data
.
acreagePersonalUse
=
parseInt
(
data
.
acreagePersonalUse
);
return
data
;
}
...
...
src/data/enterprise/enterprise.ts
View file @
8609f1d2
...
...
@@ -100,7 +100,7 @@ export async function findEnterpriseListByTaskId(taskId:string) {
* @param taskId 任务id 格式遵循tool中getTaskId
*/
export
async
function
updateEnterpriseDraftLock
(
taskId
:
string
)
{
return
await
enterpriseModel
.
updateMany
({
taskId
},
{
$set
:{
draftLock
:
true
}}
,
{
upsert
:
true
}
);
return
await
enterpriseModel
.
updateMany
({
taskId
},
{
$set
:{
draftLock
:
true
}});
}
...
...
src/data/enterprise/financing.ts
View file @
8609f1d2
...
...
@@ -76,7 +76,7 @@ export async function findFinancingListByTaskId(taskId:string) {
* @param taskId 任务id 格式遵循tool中getTaskId
*/
export
async
function
updateFinancingDraftLock
(
taskId
:
string
)
{
return
await
financingModel
.
updateMany
({
taskId
},
{
$set
:{
draftLock
:
true
}}
,
{
upsert
:
true
}
);
return
await
financingModel
.
updateMany
({
taskId
},
{
$set
:{
draftLock
:
true
}});
}
...
...
src/util/verificationParam.ts
View file @
8609f1d2
...
...
@@ -31,9 +31,16 @@ export function eccFormParam(name:string, keyTypeConf:object, param:object) {
}
}
else
if
(
param
[
key
])
{
let
paramType
=
typeof
param
[
key
];
switch
(
keyTypeConf
[
key
])
{
let
confType
=
keyTypeConf
[
key
].
type
;
switch
(
confType
)
{
case
'Number'
:
if
(
paramType
!=
'number'
)
isError
=
true
;
if
(
paramType
!=
'number'
)
{
isError
=
true
;
}
else
{
if
((
""
+
param
[
key
]).
indexOf
(
'.'
)
>
-
1
)
{
param
[
key
]
=
parseInt
(
`
${
param
[
key
]
*
100
}
`
)
/
100
;
}
}
break
;
case
'String'
:
if
(
paramType
!=
'string'
)
isError
=
true
;
...
...
@@ -100,7 +107,9 @@ export function eccReqParamater(conf:object, param, skipKeys?) {
let
paramType
=
typeof
param
[
key
];
switch
(
conf
[
key
])
{
case
'Number'
:
if
(
paramType
!=
'number'
)
isError
=
true
;
if
(
paramType
!=
'number'
)
{
isError
=
true
;
}
break
;
case
'String'
:
if
(
paramType
!=
'string'
)
isError
=
true
;
...
...
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