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
9e8ff74c
Commit
9e8ff74c
authored
Mar 09, 2019
by
suichenguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加余证
parent
6c885d7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
FailedCardApi.java
src/main/java/com/yxproject/start/api/FailedCardApi.java
+24
-13
No files found.
src/main/java/com/yxproject/start/api/FailedCardApi.java
View file @
9e8ff74c
package
com
.
yxproject
.
start
.
api
;
package
com
.
yxproject
.
start
.
api
;
import
com.yxproject.start.entity.TaskEntity
;
import
com.yxproject.start.entity.TaskList.TaskListEntity
;
import
com.yxproject.start.entity.TaskList.TaskListEntity
;
import
com.yxproject.start.service.FailedCardService
;
import
com.yxproject.start.service.FailedCardService
;
import
com.yxproject.start.service.TaskListService
;
import
com.yxproject.start.service.TaskListService
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -57,6 +59,7 @@ public class FailedCardApi {
...
@@ -57,6 +59,7 @@ public class FailedCardApi {
* @return
* @return
*/
*/
@RequestMapping
(
"insertFailedCard"
)
@RequestMapping
(
"insertFailedCard"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
insertFailedCard
(
@RequestBody
String
jsonStr
){
public
Boolean
insertFailedCard
(
@RequestBody
String
jsonStr
){
JSONArray
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
JSONArray
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
for
(
Object
o:
jsonarray
){
for
(
Object
o:
jsonarray
){
...
@@ -69,25 +72,33 @@ public class FailedCardApi {
...
@@ -69,25 +72,33 @@ public class FailedCardApi {
/**
/**
* 生成余证
* 生成余证
(每个余证生成一个任务单)
* @param jsonStr
* @param jsonStr
* @return
* @return
*/
*/
@RequestMapping
(
"insertRemaining"
)
@RequestMapping
(
"insertRemaining"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
insertRemaining
(
@RequestBody
String
jsonStr
){
public
Boolean
insertRemaining
(
@RequestBody
String
jsonStr
){
JSONArray
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
JSONArray
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
for
(
Object
o:
jsonarray
)
{
TaskEntity
taskEntity
=
new
TaskEntity
();
JSONObject
jsonObject
=(
JSONObject
)
o
;
List
<
Object
>
taskEntityList
=
new
ArrayList
<>();
//TODO 多张余证可以生成一张任务单 判断是否是同一个countyCode
// failedCardService.addSpecialCard(acceptNo);
for
(
Object
o:
jsonarray
)
{
// failedCardService.specialCardAdd(acceptNo);
JSONObject
jsonObject
=(
JSONObject
)
o
;
// taskListService.createTaskList(submitDate,countyCode,Gajg);
/*查询生成任务单需要的数据*/
// List<TaskListEntity> resultList= taskListService.selectACCU(submitDate,countyCode,Gajg);
Map
<
String
,
Object
>
resultMap
=
failedCardService
.
selectTaskListDate
(
jsonObject
.
getString
(
"ACCEPT_NO"
));
// taskListService.createTaskList(resultList);
String
countyCode
=
resultMap
.
get
(
"COUNTY_CODE"
).
toString
();
Long
cardType
=
(
Long
)
resultMap
.
get
(
"CARD_TYPE_ID"
);
taskEntity
.
setCountyCode
(
countyCode
);
}
taskEntity
.
setCardType
(
cardType
);
taskEntity
.
setTaskStateId
((
long
)
1
);
taskEntityList
.
add
(
taskEntity
);
taskListService
.
saveTask
(
taskEntity
);
/*特证表添加特证*/
failedCardService
.
addSpecialCard
(
jsonObject
.
getString
(
"ACCEPT_NO"
));
/*特证数+1*/
failedCardService
.
specialCardAdd
(
jsonObject
.
getString
(
"ACCEPT_NO"
));
}
return
true
;
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