Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
Project
Project
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
方斌
51business
Commits
3ee78c5c
Commit
3ee78c5c
authored
May 08, 2019
by
李尚科
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://t-git.51gjj.com/fangbin/51business
parents
d883dd78
6e587fdd
Pipeline
#7146
passed with stage
in 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
Export20190425.js
app/controller/house/Export20190425.js
+6
-4
No files found.
app/controller/house/Export20190425.js
View file @
3ee78c5c
...
...
@@ -74,6 +74,7 @@ class Export20190425 extends Controller {
let
mysqlData
=
await
ctx
.
realestateModel
.
NewHouse
.
findAll
(
filter
);
let
ret
=
[];
let
reterr
=
[];
let
errorId
=
[];
if
(
mysqlData
.
length
>
0
)
{
for
(
let
i
in
mysqlData
)
{
let
data
=
{
...
...
@@ -92,7 +93,7 @@ class Export20190425 extends Controller {
decorationType
:
mysqlData
[
i
].
decoration_type
||
0
,
description
:
mysqlData
[
i
].
description
||
''
,
openDate
:
mysqlData
[
i
].
open_date
,
dueDate
:
(
mysqlData
[
i
].
due_date
===
undefined
||
mysqlData
[
i
].
due_date
===
"0000-00-00 00:00:00"
||
mysqlData
[
i
].
due_date
===
'Invalid date'
)
?
null
:
mysqlData
[
i
].
due_date
,
dueDate
:
(
mysqlData
[
i
].
due_date
===
undefined
||
mysqlData
[
i
].
due_date
===
'Invalid date'
)
?
null
:
mysqlData
[
i
].
due_date
,
landArea
:
mysqlData
[
i
].
land_area
,
houseArea
:
mysqlData
[
i
].
house_area
,
areaRatio
:
mysqlData
[
i
].
area_ratio
,
...
...
@@ -108,16 +109,17 @@ class Export20190425 extends Controller {
state
:
mysqlData
[
i
].
state
,
remark
:
mysqlData
[
i
].
remark
||
''
,
}
ctx
.
logger
.
info
(
JSON
.
stringify
(
data
));
//
ctx.logger.info(JSON.stringify(data));
let
temp
=
await
ctx
.
helper
.
send_request
(
this
.
config
.
HOUSE_SERVICE_API
+
'/v1/newhouse/'
,
data
,
{
method
:
'POST'
});
if
(
temp
.
status
===
201
)
{
ret
.
push
(
temp
);
}
else
{
reterr
.
push
(
mysqlData
[
i
]);
errorId
.
push
(
mysqlData
[
i
].
id
);
reterr
.
push
(
temp
);
}
}
}
ctx
.
success
({
retL
:
ret
.
length
,
fl
:
mysqlData
.
length
,
error
:
reterr
});
ctx
.
success
({
retL
:
ret
.
length
,
fl
:
mysqlData
.
length
,
error
Id
:
errorId
,
error
:
reterr
});
}
...
...
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