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
3a2b6eea
Commit
3a2b6eea
authored
Aug 28, 2019
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改补证添加
parent
c4af7197
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
25 deletions
+48
-25
FailedCardApi.java
src/main/java/com/yxproject/start/api/FailedCardApi.java
+23
-11
FailedCardMapper.java
...ain/java/com/yxproject/start/mapper/FailedCardMapper.java
+5
-5
FailedCardService.java
...n/java/com/yxproject/start/service/FailedCardService.java
+2
-2
FailedCardServiceImpl.java
...m/yxproject/start/service/impl/FailedCardServiceImpl.java
+18
-7
No files found.
src/main/java/com/yxproject/start/api/FailedCardApi.java
View file @
3a2b6eea
...
...
@@ -71,14 +71,15 @@ public class FailedCardApi {
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
for
(
Object
o
:
jsonarray
)
{
String
acceptNo
=
o
.
toString
().
replace
(
"e"
,
"E"
).
replace
(
"g"
,
"G"
).
replace
(
"l"
,
"L"
);
Map
<
String
,
Object
>
resultMap
=
failedCardService
.
selectInfoByCardId
(
acceptNo
);
List
<
Map
<
String
,
Object
>>
resultMap
=
failedCardService
.
selectInfoByCardId
(
acceptNo
);
if
(
resultMap
==
null
)
{
resultMap
=
new
LinkedHashMap
<>();
resultMap
.
put
(
"ID_NO"
,
o
.
toString
());
resultMap
.
put
(
"NAME"
,
"查无此人"
);
resultMap
.
put
(
"SEX_NO"
,
"-1"
);
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"ID_NO"
,
o
.
toString
());
map
.
put
(
"NAME"
,
"查无此人"
);
map
.
put
(
"SEX_NO"
,
"-1"
);
resultMap
.
add
(
map
);
}
resultList
.
add
(
resultMap
);
resultList
.
add
All
(
resultMap
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"身份证号或受理号:"
+
jsonarray
);
...
...
@@ -240,7 +241,7 @@ public class FailedCardApi {
* @param jsonStr
* @return
*/
@RequestMapping
(
"insert
Back
Card"
)
@RequestMapping
(
"insert
History
Card"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
insertBackCard
(
@RequestBody
String
jsonStr
,
HttpServletRequest
requ
)
{
String
remoteAddr
=
requ
.
getRemoteAddr
();
...
...
@@ -250,10 +251,18 @@ public class FailedCardApi {
try
{
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
taskEntity
=
new
TaskEntity
();
String
str2
=
null
;
String
str2
=
""
;
String
failedCardReasonId
=
""
;
String
workGroup
=
""
;
String
note
=
""
;
String
name
=
""
;
for
(
int
i
=
0
;
i
<
jsonarray
.
size
();
i
++)
{
JSONObject
jsonObject
=
(
JSONObject
)
jsonarray
.
get
(
i
);
String
str
=
jsonObject
.
getString
(
"idCard"
);
String
str
=
jsonObject
.
getString
(
"cardId"
);
failedCardReasonId
=
jsonObject
.
getString
(
"failedCardReasonId"
);
workGroup
=
jsonObject
.
getString
(
"workGroup"
);
note
=
jsonObject
.
getString
(
"note"
);
name
=
jsonObject
.
getString
(
"name"
);
if
(
i
!=
jsonarray
.
size
()
-
1
)
{
str2
+=
"'"
+
str
+
"',"
;
}
else
{
...
...
@@ -266,17 +275,20 @@ 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
(
"
idCar
d"
));
Map
<
String
,
Object
>
dataMap
=
failedCardService
.
selectTaskListById
(
jsonObject
.
getString
(
"
cardI
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
(
groupDataMap
.
get
(
"TASK_ID"
)),
(
Long
)
groupDataMap
.
get
(
"VALID_COUNT"
),
(
Long
)
groupDataMap
.
get
(
"INVALID_COUNT"
));
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
);
}
}
catch
(
NullPointerException
e
)
{
logger
.
error
(
"身份证号或受理号:"
+
jsonarray
);
...
...
src/main/java/com/yxproject/start/mapper/FailedCardMapper.java
View file @
3a2b6eea
...
...
@@ -38,7 +38,7 @@ public interface FailedCardMapper {
"left join failed_card on PROD_CARD_T.ACCEPT_NO = failed_card.ACCEPT_NO "
+
" left join FAILED_CARD_REASON_DIC on failed_card.FAILED_CARD_REASON_ID =FAILED_CARD_REASON_DIC.FAILED_CARD_REASON_ID"
+
" WHERE PROD_CARD_T.ID_NO=#{cardId} OR PROD_CARD_T.ACCEPT_NO=#{cardId}"
)
public
Map
<
String
,
Object
>
selectInfoByCardId
(
@Param
(
"cardId"
)
String
cardId
);
public
List
<
Map
<
String
,
Object
>
>
selectInfoByCardId
(
@Param
(
"cardId"
)
String
cardId
);
/**
...
...
@@ -97,9 +97,9 @@ public interface FailedCardMapper {
public
List
<
String
>
selectCardType
();
@Select
(
"select substr(ACCEPT_NO,0,8) from PROD_CARD_T where ID_NO in"
+
" (
#{cardList
}) group by substr(ACCEPT_NO,0,8)"
)
public
List
<
String
>
selectGroupNo
(
@Param
(
"cardId
List"
)
String
cardIdList
);
@Select
(
"select substr(ACCEPT_NO,0,8) from PROD_CARD_T
@PRODYD_LINK
where ID_NO in"
+
" (
${cardId
}) group by substr(ACCEPT_NO,0,8)"
)
public
List
<
String
>
selectGroupNo
(
@Param
(
"cardId
"
)
String
cardId
);
@Select
(
"select SPECIAL_CARD.SPECIAL_TYPE,prod_card_t.accept_no,subStr(prod_card_t.UPLOAD_NO,0,6) as COUNTY_CODE ,"
+
...
...
@@ -107,7 +107,7 @@ public interface FailedCardMapper {
"from prod_card_t@PRODYD_LINK\n"
+
"left join SPECIAL_CARD on prod_card_t.accept_no = SPECIAL_CARD.accept_no\n"
+
"left join PREPRO_PERSON on PREPRO_PERSON.JMSFZSLH=prod_card_t.UPLOAD_NO\n"
+
"where prod_card_t.ID_NO=#{
acceptNo
}"
)
"where prod_card_t.ID_NO=#{
id
}"
)
public
Map
<
String
,
Object
>
selectTaskListById
(
@Param
(
"id"
)
String
id
);
...
...
src/main/java/com/yxproject/start/service/FailedCardService.java
View file @
3a2b6eea
...
...
@@ -12,7 +12,7 @@ public interface FailedCardService {
public
List
<
FailedCardReasonDicEntity
>
selectFailedCardDic
();
public
Map
<
String
,
Object
>
selectInfoByCardId
(
String
cardId
);
public
List
<
Map
<
String
,
Object
>>
selectInfoByCardId
(
String
cardId
);
public
boolean
insertFailedCard
(
String
failedCardReasonId
,
String
acceptNo
,
String
taskId
,
String
initiator
,
String
note
,
String
workGroup
,
String
name
);
...
...
@@ -26,7 +26,7 @@ public interface FailedCardService {
public
List
<
String
>
selectCardType
();
public
List
<
String
>
selectGroupNo
(
String
idCar
d
);
public
List
<
String
>
selectGroupNo
(
String
cardI
d
);
public
Map
<
String
,
Object
>
selectTaskListById
(
String
id
);
...
...
src/main/java/com/yxproject/start/service/impl/FailedCardServiceImpl.java
View file @
3a2b6eea
...
...
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
...
...
@@ -26,8 +27,8 @@ public class FailedCardServiceImpl implements FailedCardService {
}
@Override
public
Map
<
String
,
Object
>
selectInfoByCardId
(
String
cardId
)
{
Map
<
String
,
Object
>
result
=
failedCardMapper
.
selectInfoByCardId
(
cardId
);
public
List
<
Map
<
String
,
Object
>>
selectInfoByCardId
(
String
cardId
)
{
List
<
Map
<
String
,
Object
>
>
result
=
failedCardMapper
.
selectInfoByCardId
(
cardId
);
return
result
;
}
...
...
@@ -69,8 +70,8 @@ public class FailedCardServiceImpl implements FailedCardService {
}
@Override
public
List
<
String
>
selectGroupNo
(
String
idCar
d
)
{
List
<
String
>
result
=
failedCardMapper
.
selectGroupNo
(
idCar
d
);
public
List
<
String
>
selectGroupNo
(
String
cardI
d
)
{
List
<
String
>
result
=
failedCardMapper
.
selectGroupNo
(
cardI
d
);
return
result
;
}
...
...
@@ -78,13 +79,23 @@ public class FailedCardServiceImpl implements FailedCardService {
@Override
public
Map
<
String
,
Object
>
selectTaskListById
(
String
id
)
{
Map
<
String
,
Object
>
resultMap
=
failedCardMapper
.
selectTaskListById
(
id
);
return
resultMap
;
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
;
}
@Override
public
Map
<
String
,
Object
>
selectGroupDate
(
String
groupNo
)
{
Map
<
String
,
Object
>
resultMap
=
failedCardMapper
.
selectGroupDate
(
groupNo
);
return
resultMap
;
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
;
}
@Override
...
...
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