Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
36af95df
Commit
36af95df
authored
Jul 28, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
98acbefe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
10 deletions
+30
-10
InputItemController.java
.../amos/patrol/business/controller/InputItemController.java
+30
-10
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/InputItemController.java
View file @
36af95df
...
...
@@ -111,7 +111,27 @@ public class InputItemController extends AbstractBaseController {
InputItem
bo
=
inputItemService
.
queryInputItemDetail
(
itemID
);
InputItemParam
inputItemVo
=
new
InputItemParam
();
BeanUtils
.
copyProperties
(
bo
,
inputItemVo
);
inputItemVo
.
setDataJson
(
bo
.
getDataJson
()
!=
null
?
JSONObject
.
parse
(
bo
.
getDataJson
()):
null
);
if
(
inputItemVo
.
getItemType
().
equals
(
"文本"
)){
Map
<
String
,
Object
>
map
=
JSONObject
.
parseObject
(
bo
.
getDataJson
(),
Map
.
class
);
inputItemVo
.
setOkScore
(
Integer
.
valueOf
(
map
.
get
(
"OkScore"
).
toString
()));
inputItemVo
.
setNoScore
(
Integer
.
valueOf
(
map
.
get
(
"NoScore"
).
toString
()));
inputItemVo
.
setCheckType
(
map
.
get
(
"CheckType"
).
toString
());
}
else
if
(
inputItemVo
.
getItemType
().
equals
(
"数字"
)){
Map
<
String
,
Object
>
map
=
JSONObject
.
parseObject
(
bo
.
getDataJson
(),
Map
.
class
);
inputItemVo
.
setOkScore
(
Integer
.
valueOf
(
map
.
get
(
"OkScore"
).
toString
()));
inputItemVo
.
setNoScore
(
Integer
.
valueOf
(
map
.
get
(
"NoScore"
).
toString
()));
inputItemVo
.
setValidUp
(
""
.
equals
(
map
.
get
(
"ValidUp"
).
toString
())?
null
:
Integer
.
valueOf
(
map
.
get
(
"ValidUp"
).
toString
()));
inputItemVo
.
setValidDown
(
""
.
equals
(
map
.
get
(
"ValidDown"
).
toString
())?
null
:
Integer
.
valueOf
(
map
.
get
(
"ValidDown"
).
toString
()));
inputItemVo
.
setOkUp
(
""
.
equals
(
map
.
get
(
"OkUp"
).
toString
())?
null
:
Integer
.
valueOf
(
map
.
get
(
"OkUp"
).
toString
()));
inputItemVo
.
setOkDown
(
""
.
equals
(
map
.
get
(
"OkDown"
).
toString
())?
null
:
Integer
.
valueOf
(
map
.
get
(
"OkDown"
).
toString
()));
inputItemVo
.
setCheckValidUp
(
Boolean
.
valueOf
(
map
.
get
(
"CheckValidUp"
).
toString
())?
"true"
:
"false"
);
inputItemVo
.
setCheckValidDown
(
Boolean
.
valueOf
(
map
.
get
(
"CheckValidDown"
).
toString
())?
"true"
:
"false"
);
inputItemVo
.
setCheckOkUp
(
Boolean
.
valueOf
(
map
.
get
(
"CheckOkUp"
).
toString
())?
"true"
:
"false"
);
inputItemVo
.
setCheckOkDown
(
Boolean
.
valueOf
(
map
.
get
(
"CheckOkDown"
).
toString
())?
"true"
:
"false"
);
inputItemVo
.
setPrecision
(
Integer
.
valueOf
(
map
.
get
(
"Precision"
).
toString
()));
}
else
{
inputItemVo
.
setDataJson
(
bo
.
getDataJson
()
!=
null
?
JSONObject
.
parse
(
bo
.
getDataJson
()):
null
);
}
inputItemVo
.
setPictureJson
(
bo
.
getPictureJson
()!=
null
?
JSONObject
.
parse
(
bo
.
getPictureJson
()):
null
);
return
CommonResponseUtil
.
success
(
inputItemVo
);
}
...
...
@@ -453,8 +473,8 @@ public class InputItemController extends AbstractBaseController {
if
(
param
.
getItemType
().
equals
(
"文本"
)){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"OkScore"
,
param
.
getOkScore
());
map
.
put
(
"NoScore"
,
param
.
getNoScore
());
map
.
put
(
"OkScore"
,
param
.
getOkScore
()
!=
null
?
param
.
getOkScore
():
0
);
map
.
put
(
"NoScore"
,
param
.
getNoScore
()
!=
null
?
param
.
getNoScore
():
0
);
map
.
put
(
"CheckType"
,
param
.
getCheckType
());
inputItem
.
setDataJson
(
JSONObject
.
toJSONString
(
map
));
...
...
@@ -469,14 +489,14 @@ public class InputItemController extends AbstractBaseController {
}
}
else
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"OkScore"
,
param
.
getOkScore
());
map
.
put
(
"NoScore"
,
param
.
getNoScore
());
map
.
put
(
"ValidUp"
,
param
.
getValidUp
());
map
.
put
(
"ValidDown"
,
param
.
getValidDown
());
map
.
put
(
"OkUp"
,
param
.
getOkUp
());
map
.
put
(
"OkDown"
,
param
.
getOkDown
());
map
.
put
(
"OkScore"
,
param
.
getOkScore
()
!=
null
?
param
.
getOkScore
():
0
);
map
.
put
(
"NoScore"
,
param
.
getNoScore
()
!=
null
?
param
.
getNoScore
():
0
);
map
.
put
(
"ValidUp"
,
param
.
getValidUp
()
!=
null
?
param
.
getNoScore
():
""
);
map
.
put
(
"ValidDown"
,
param
.
getValidDown
()
!=
null
?
param
.
getNoScore
():
""
);
map
.
put
(
"OkUp"
,
param
.
getOkUp
()
!=
null
?
param
.
getNoScore
():
""
);
map
.
put
(
"OkDown"
,
param
.
getOkDown
()
!=
null
?
param
.
getNoScore
():
""
);
map
.
put
(
"CheckValidUp"
,
param
.
getCheckValidUp
().
equals
(
"false"
)?
false
:
true
);
map
.
put
(
"CheckValidDown"
,
param
.
getCheck
Ok
Down
().
equals
(
"false"
)?
false
:
true
);
map
.
put
(
"CheckValidDown"
,
param
.
getCheck
Valid
Down
().
equals
(
"false"
)?
false
:
true
);
map
.
put
(
"CheckOkUp"
,
param
.
getCheckOkUp
().
equals
(
"false"
)?
false
:
true
);
map
.
put
(
"CheckOkDown"
,
param
.
getCheckOkDown
().
equals
(
"false"
)?
false
:
true
);
map
.
put
(
"Precision"
,
param
.
getPrecision
());
...
...
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