Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_beijing_auxiliary_YD
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
zhangyusheng
YX_IDENT_beijing_auxiliary_YD
Commits
257f46bb
Commit
257f46bb
authored
Mar 08, 2019
by
suichenguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
废证修改
parent
5876a9c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
FailedCardApi.java
src/main/java/com/yxproject/start/api/FailedCardApi.java
+21
-11
No files found.
src/main/java/com/yxproject/start/api/FailedCardApi.java
View file @
257f46bb
package
com
.
yxproject
.
start
.
api
;
import
com.yxproject.start.service.FailedCardService
;
import
net.sf.json.JSON
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -29,27 +34,32 @@ public class FailedCardApi {
/**
* 根据身份证号或受理号查询身份信息及组号
* @param
cardId
* @param
jsonStr
* @return
*/
@RequestMapping
(
"selectInfoByCardId"
)
public
Map
<
String
,
Object
>
selectInfoByCardId
(
String
cardId
){
Map
<
String
,
Object
>
resultMap
=
failedCardService
.
selectInfoByCardId
(
cardId
);
return
resultMap
;
public
List
<
Map
<
String
,
Object
>>
selectInfoByCardId
(
@RequestBody
String
jsonStr
){
JSONArray
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
for
(
Object
o:
jsonarray
)
{
Map
<
String
,
Object
>
resultMap
=
failedCardService
.
selectInfoByCardId
(
o
.
toString
());
resultList
.
add
(
resultMap
);
}
return
resultList
;
}
/**
* 添加废证
* @param failedCardReasonId 废证原因
* @param acceptNo 受理号
* @param taskId 任务单号
* @param initiator 发起工序
* @param note 备注
* @param jsonStr
* @return
*/
@RequestMapping
(
"insertFailedCard"
)
public
Boolean
insertFailedCard
(
String
failedCardReasonId
,
String
acceptNo
,
String
taskId
,
String
initiator
,
String
note
){
failedCardService
.
insertFailedCard
(
failedCardReasonId
,
acceptNo
,
taskId
,
initiator
,
note
);
public
Boolean
insertFailedCard
(
@RequestBody
String
jsonStr
){
JSONArray
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
for
(
Object
o:
jsonarray
){
JSONObject
jsonObject
=(
JSONObject
)
o
;
failedCardService
.
insertFailedCard
(
jsonObject
.
get
(
"failedCardReasonId"
).
toString
(),
jsonObject
.
get
(
"acceptNo"
).
toString
(),
jsonObject
.
get
(
"taskId"
).
toString
(),
jsonObject
.
get
(
"initiator"
).
toString
(),
jsonObject
.
get
(
"note"
).
toString
());
}
return
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