Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bigdatainterservice
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
曹鹏
bigdatainterservice
Commits
b3253261
Commit
b3253261
authored
May 06, 2019
by
chang_chao@founder.com.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改脑图订票信息查询接口
parent
d84d9955
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
16 deletions
+39
-16
src/main/java/com/founder/interservice/controller/DataController.java
+39
-16
No files found.
src/main/java/com/founder/interservice/controller/DataController.java
View file @
b3253261
...
@@ -694,29 +694,52 @@ public class DataController {
...
@@ -694,29 +694,52 @@ public class DataController {
@RequestMapping
(
value
=
"/queryRelationsBySfzh"
)
@RequestMapping
(
value
=
"/queryRelationsBySfzh"
)
@ResponseBody
@ResponseBody
public
JSONObject
queryRelationsBySfzh
(
String
sfzh
,
String
type
){
public
JSONObject
queryRelationsBySfzh
(
String
sfzh
,
String
caseId
,
String
caseName
){
JSONObject
resultObj
=
new
JSONObject
();
List
<
String
>
dpTypes
=
Arrays
.
asList
(
"5754"
,
"6332"
,
"4340"
);
//5754:订票编号;6332:订单号 ;4340:订座编号
JSONObject
jsonObejct
=
new
JSONObject
();
JSONObject
jsonObj
=
new
JSONObject
();
List
<
Relation
>
relationList
=
new
ArrayList
<>();
try
{
try
{
String
dpResult
=
pushWaDataService
.
pushRelations
(
caseId
,
caseName
,
""
,
sfzh
);
if
(
null
!=
dpResult
&&
dpResult
.
startsWith
(
"{"
)){
jsonObj
=
JSONObject
.
parseObject
(
dpResult
);
}
if
(
jsonObj
!=
null
){
String
dataList
=
jsonObj
.
getString
(
"data"
);
JSONArray
childrens
=
JSONObject
.
parseArray
(
dataList
);
if
(
childrens
!=
null
&&
childrens
.
size
()
>
0
){
for
(
int
i
=
0
;
i
<
childrens
.
size
();
i
++){
JSONObject
children
=
childrens
.
getJSONObject
(
i
);
if
(
dpTypes
.
contains
(
children
.
getString
(
"objectToType"
))){
Relation
relation
=
new
Relation
();
Relation
relation
=
new
Relation
();
relation
.
setObjectfromtype
(
"1"
);
relation
.
setObjecttotype
(
children
.
getString
(
"objectToType"
));
relation
.
setObjectfromvalue
(
sfzh
);
relation
.
setObjecttotypename
(
children
.
getString
(
"objectToTypeName"
));
relation
.
setObjecttotype
(
type
);
relation
.
setObjecttovalue
(
children
.
getString
(
"objectToValue"
));
List
<
Relation
>
resultList
=
dataService
.
queryRelationList
(
relation
);
relation
.
setObjectfromtype
(
children
.
getString
(
"objectFromType"
));
if
(!
resultList
.
isEmpty
()
&&
resultList
!=
null
){
relation
.
setObjectfromvalue
(
children
.
getString
(
"objectFromValue"
));
resultObj
.
put
(
"code"
,
ResultEnum
.
SUCCESS
.
getCode
());
relation
.
setObjectfromtypename
(
children
.
getString
(
"objectFromTypeName"
));
resultObj
.
put
(
"message"
,
ResultEnum
.
SUCCESS
.
getMessage
());
relation
.
setRelativetype
(
children
.
getString
(
"relativeType"
));
relation
.
setRelativetypename
(
children
.
getString
(
"relativeTypeName"
));
relation
.
setSourcename
(
children
.
getString
(
"sourceName"
));
relationList
.
add
(
relation
);
}
}
}
}
if
(!
relationList
.
isEmpty
()
&&
relationList
!=
null
){
jsonObejct
.
put
(
"code"
,
ResultEnum
.
SUCCESS
.
getCode
());
jsonObejct
.
put
(
"message"
,
ResultEnum
.
SUCCESS
.
getMessage
());
}
else
{
}
else
{
resultObj
.
put
(
"code"
,
ResultEnum
.
SUCCESS
.
getCode
());
jsonObejct
.
put
(
"code"
,
ResultEnum
.
SUCCESS
.
getCode
());
resultObj
.
put
(
"message"
,
"无数据"
);
jsonObejct
.
put
(
"message"
,
"无数据"
);
}
}
resultObj
.
put
(
"dataList"
,
resultList
);
jsonObejct
.
put
(
"dataList"
,
relationList
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
e
.
printStackTrace
();
e
.
printStackTrace
();
resultObj
.
put
(
"code"
,
ResultEnum
.
RESULT_ERROR
.
getCode
());
jsonObejct
.
put
(
"code"
,
ResultEnum
.
RESULT_ERROR
.
getCode
());
resultObj
.
put
(
"message"
,
ResultEnum
.
RESULT_ERROR
.
getMessage
());
jsonObejct
.
put
(
"message"
,
ResultEnum
.
RESULT_ERROR
.
getMessage
());
}
}
return
resultObj
;
return
jsonObejct
;
}
}
@RequestMapping
(
value
=
"/queryJdAndThxxBySfzh"
)
@RequestMapping
(
value
=
"/queryJdAndThxxBySfzh"
)
...
...
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