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
5cddd342
Commit
5cddd342
authored
Aug 29, 2019
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加补证
parent
07e580c0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
33 deletions
+62
-33
FailedCardApi.java
src/main/java/com/yxproject/start/api/FailedCardApi.java
+37
-17
FailedCardMapper.java
...ain/java/com/yxproject/start/mapper/FailedCardMapper.java
+12
-1
FailedCardService.java
...n/java/com/yxproject/start/service/FailedCardService.java
+3
-1
FailedCardServiceImpl.java
...m/yxproject/start/service/impl/FailedCardServiceImpl.java
+10
-14
No files found.
src/main/java/com/yxproject/start/api/FailedCardApi.java
View file @
5cddd342
...
...
@@ -144,10 +144,10 @@ public class FailedCardApi {
JSONObject
jsonObject
=
(
JSONObject
)
o
;
String
name
=
((
JSONObject
)
o
).
getString
(
"name"
);
Stri
ng
result
=
failedCardService
.
selectSpecialCard
(((
JSONObject
)
o
).
getString
(
"cardId"
));
Lo
ng
result
=
failedCardService
.
selectSpecialCard
(((
JSONObject
)
o
).
getString
(
"cardId"
));
Map
<
String
,
Object
>
idMap
;
//判断是否是特殊证件
if
(
result
!=
null
&&
result
!=
""
)
{
if
(
result
!=
0
)
{
idMap
=
failedCardService
.
selectDataById
(
jsonObject
.
getString
(
"cardId"
));
}
else
{
idMap
=
failedCardService
.
selectCountIdByCardId
(
jsonObject
.
getString
(
"cardId"
));
...
...
@@ -235,6 +235,37 @@ public class FailedCardApi {
return
result
;
}
/**
* 添加历史回迁证
*
* @param jsonStr
* @return
*/
@RequestMapping
(
"insertHistoryCard"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
insertHistoryCard
(
@RequestBody
String
jsonStr
)
{
JSONArray
jsonarray
=
new
JSONArray
();
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
for
(
Object
o
:
jsonarray
)
{
JSONObject
jsonObject
=
(
JSONObject
)
o
;
String
name
=
((
JSONObject
)
o
).
getString
(
"name"
);
String
workGroup
=
((
JSONObject
)
o
).
getString
(
"workGroup"
);
String
note
=
jsonObject
.
getString
(
"note"
);
String
failedCardReasonId
=
jsonObject
.
getString
(
"failedCardReasonId"
);
Long
result
=
failedCardService
.
selectSpecialCard
(((
JSONObject
)
o
).
getString
(
"cardId"
));
Map
<
String
,
Object
>
idMap
;
//判断是否是特殊证件
if
(
result
!=
0
)
{
idMap
=
failedCardService
.
selectDataById
(
jsonObject
.
getString
(
"cardId"
));
}
else
{
idMap
=
failedCardService
.
selectCountIdByCardId
(
jsonObject
.
getString
(
"cardId"
));
}
int
initiator
=
5
;
failedCardService
.
insertHistoryCard
(
failedCardReasonId
,
idMap
.
get
(
"ACCEPT_NO"
).
toString
(),
String
.
valueOf
(
initiator
),
note
,
workGroup
,
name
);
}
return
true
;
}
/**
* 生成历史回迁证
*
...
...
@@ -251,18 +282,10 @@ public class FailedCardApi {
try
{
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
taskEntity
=
new
TaskEntity
();
String
str2
=
""
;
String
failedCardReasonId
=
""
;
String
workGroup
=
""
;
String
note
=
""
;
String
name
=
""
;
String
str2
=
null
;
for
(
int
i
=
0
;
i
<
jsonarray
.
size
();
i
++)
{
JSONObject
jsonObject
=
(
JSONObject
)
jsonarray
.
get
(
i
);
String
str
=
jsonObject
.
getString
(
"cardId"
);
failedCardReasonId
=
jsonObject
.
getString
(
"failedCardReasonId"
);
workGroup
=
jsonObject
.
getString
(
"workGroup"
);
note
=
jsonObject
.
getString
(
"note"
);
name
=
jsonObject
.
getString
(
"name"
);
String
str
=
jsonObject
.
getString
(
"idCard"
);
if
(
i
!=
jsonarray
.
size
()
-
1
)
{
str2
+=
"'"
+
str
+
"',"
;
}
else
{
...
...
@@ -275,20 +298,17 @@ public class FailedCardApi {
for
(
int
i
=
0
;
i
<
groupList
.
size
();
i
++)
{
JSONObject
jsonObject
=
(
JSONObject
)
jsonarray
.
get
(
i
);
//查询生成任务单需要的数据
Map
<
String
,
Object
>
dataMap
=
failedCardService
.
selectTaskListById
(
jsonObject
.
getString
(
"
cardI
d"
));
Map
<
String
,
Object
>
dataMap
=
failedCardService
.
selectTaskListById
(
jsonObject
.
getString
(
"
idCar
d"
));
String
countyCode
=
dataMap
.
get
(
"COUNTY_CODE"
).
toString
();
Long
cardType
=
(
Long
)
dataMap
.
get
(
"CARD_TYPE_ID"
);
String
submitName
=(
String
)
dataMap
.
get
(
"INITIATOR"
);
taskEntity
.
setCountyCode
(
countyCode
);
taskEntity
.
setCardType
(
cardType
);
taskEntity
.
setSubmitName
(
submitName
);
taskEntity
.
setTaskStateId
((
long
)
1
);
//生成任务单
taskListService
.
saveTask
(
taskEntity
);
//生成新组号列表
Map
<
String
,
Object
>
groupDataMap
=
failedCardService
.
selectGroupDate
(
groupList
.
get
(
i
));
failedCardService
.
insertGroupNo
(
String
.
valueOf
(
groupDataMap
.
get
(
"GROUP_NO"
)),
String
.
valueOf
(
taskEntity
.
getTaskId
()),
(
Long
)
groupDataMap
.
get
(
"VALID_COUNT"
),
(
Long
)
groupDataMap
.
get
(
"INVALID_COUNT"
));
failedCardService
.
insertFailedCard
(
failedCardReasonId
,
String
.
valueOf
(
dataMap
.
get
(
"ACCEPT_NO"
)),
String
.
valueOf
(
taskEntity
.
getTaskId
()),
String
.
valueOf
(
"1"
),
note
,
workGroup
,
name
);
failedCardService
.
insertGroupNo
(
String
.
valueOf
(
groupDataMap
.
get
(
"GROUP_NO"
)),
String
.
valueOf
(
groupDataMap
.
get
(
"TASK_ID"
)),
(
Long
)
groupDataMap
.
get
(
"VALID_COUNT"
),
(
Long
)
groupDataMap
.
get
(
"INVALID_COUNT"
));
}
}
catch
(
NullPointerException
e
)
{
logger
.
error
(
"身份证号或受理号:"
+
jsonarray
);
...
...
src/main/java/com/yxproject/start/mapper/FailedCardMapper.java
View file @
5cddd342
...
...
@@ -64,6 +64,17 @@ public interface FailedCardMapper {
"WHERE PROD_CARD_T.ID_NO=#{cardId} or PROD_CARD_T.ACCEPT_NO=#{cardId}"
)
public
Map
<
String
,
Object
>
selectCountIdByCardId
(
@Param
(
"cardId"
)
String
cardId
);
/**
* 生成历史回迁证
* @param failedCardReasonId
* @param acceptNo
* @param initiator
* @param note
* @return
*/
@Insert
(
"INSERT INTO FAILED_CARD (FAILED_CARD_REASON_ID,ACCEPT_NO,STATE,INITIATOR,NOTE,work_group,name) VALUES (#{failedCardReasonId},#{acceptNo},0,#{initiator},#{note},#{workGroup},#{name})\n"
)
public
boolean
insertHistoryCard
(
@Param
(
"failedCardReasonId"
)
String
failedCardReasonId
,
@Param
(
"acceptNo"
)
String
acceptNo
,
@Param
(
"initiator"
)
String
initiator
,
@Param
(
"note"
)
String
note
,
@Param
(
"workGroup"
)
String
workGroup
,
@Param
(
"name"
)
String
name
);
/*余证*/
@Update
(
"update group_no \n"
+
"set group_no.SPECIAL_CARD_COUNT=group_no.SPECIAL_CARD_COUNT+1 \n"
+
...
...
@@ -140,7 +151,7 @@ public interface FailedCardMapper {
@Select
(
"select SPECIAL_CARD_ID from special_card \n"
+
"left join prod_card_t@PRODYD_LINK ON PROD_CARD_T.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO\n"
+
" WHERE PROD_CARD_T.ID_NO = #{id} or PROD_CARD_T.ACCEPT_NO=#{id}"
)
public
Stri
ng
selectSpecialCard
(
String
id
);
public
Lo
ng
selectSpecialCard
(
String
id
);
/**
...
...
src/main/java/com/yxproject/start/service/FailedCardService.java
View file @
5cddd342
...
...
@@ -18,6 +18,8 @@ public interface FailedCardService {
public
Map
<
String
,
Object
>
selectCountIdByCardId
(
String
cardId
);
public
boolean
insertHistoryCard
(
String
failedCardReasonId
,
String
acceptNo
,
String
initiator
,
String
note
,
String
workGroup
,
String
name
);
public
boolean
specialCardAdd
(
String
acceptNo
);
public
boolean
addSpecialCard
(
SpecialCardEntity
specialCardEntity
);
...
...
@@ -36,7 +38,7 @@ public interface FailedCardService {
public
boolean
updateFailedCardState
(
FailedCardEntity
failedCardEntity
);
public
Stri
ng
selectSpecialCard
(
String
id
);
public
Lo
ng
selectSpecialCard
(
String
id
);
public
Map
<
String
,
Object
>
selectDataById
(
String
id
);
...
...
src/main/java/com/yxproject/start/service/impl/FailedCardServiceImpl.java
View file @
5cddd342
...
...
@@ -51,6 +51,12 @@ public class FailedCardServiceImpl implements FailedCardService {
return
true
;
}
@Override
public
boolean
insertHistoryCard
(
String
failedCardReasonId
,
String
acceptNo
,
String
initiator
,
String
note
,
String
workGroup
,
String
name
)
{
failedCardMapper
.
insertHistoryCard
(
failedCardReasonId
,
acceptNo
,
initiator
,
note
,
workGroup
,
name
);
return
true
;
}
@Override
public
boolean
addSpecialCard
(
SpecialCardEntity
specialCardEntity
)
{
failedCardMapper
.
addSpecialCard
(
specialCardEntity
);
...
...
@@ -79,23 +85,13 @@ public class FailedCardServiceImpl implements FailedCardService {
@Override
public
Map
<
String
,
Object
>
selectTaskListById
(
String
id
)
{
Map
<
String
,
Object
>
resultMap
=
failedCardMapper
.
selectTaskListById
(
id
);
Map
<
String
,
Object
>
resultMap1
=
new
HashMap
<>();
resultMap1
.
put
(
"SPECIAL_TYPE"
,
Long
.
parseLong
(
resultMap
.
get
(
"SPECIAL_TYPE"
).
toString
()));
resultMap1
.
put
(
"CARD_TYPE_ID"
,
Long
.
parseLong
(
resultMap
.
get
(
"CARD_TYPE_ID"
).
toString
()));
resultMap1
.
put
(
"ACCEPT_NO"
,
resultMap
.
get
(
"ACCEPT_NO"
));
resultMap1
.
put
(
"COUNTY_CODE"
,
resultMap
.
get
(
"COUNTY_CODE"
));
resultMap1
.
put
(
"INITIATOR"
,
resultMap
.
get
(
"INITIATOR"
));
return
resultMap1
;
return
resultMap
;
}
@Override
public
Map
<
String
,
Object
>
selectGroupDate
(
String
groupNo
)
{
Map
<
String
,
Object
>
resultMap
=
failedCardMapper
.
selectGroupDate
(
groupNo
);
Map
<
String
,
Object
>
resultMap1
=
new
HashMap
<>();
resultMap1
.
put
(
"VALID_COUNT"
,
Long
.
parseLong
(
resultMap
.
get
(
"VALID_COUNT"
).
toString
()));
resultMap1
.
put
(
"INVALID_COUNT"
,
Long
.
parseLong
(
resultMap
.
get
(
"INVALID_COUNT"
).
toString
()));
resultMap1
.
put
(
"GROUP_NO"
,
groupNo
);
return
resultMap1
;
return
resultMap
;
}
@Override
...
...
@@ -132,8 +128,8 @@ public class FailedCardServiceImpl implements FailedCardService {
}
@Override
public
Stri
ng
selectSpecialCard
(
String
id
)
{
Stri
ng
result
=
failedCardMapper
.
selectSpecialCard
(
id
);
public
Lo
ng
selectSpecialCard
(
String
id
)
{
Lo
ng
result
=
failedCardMapper
.
selectSpecialCard
(
id
);
return
result
;
}
...
...
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