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
196af140
Commit
196af140
authored
Mar 09, 2019
by
suichenguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
d626fa4c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
124 additions
and
1 deletion
+124
-1
FailedCardApi.java
src/main/java/com/yxproject/start/api/FailedCardApi.java
+52
-0
FailedCardMapper.java
...ain/java/com/yxproject/start/mapper/FailedCardMapper.java
+25
-0
PersonPostMapper.java
...ain/java/com/yxproject/start/mapper/PersonPostMapper.java
+1
-1
FailedCardService.java
...n/java/com/yxproject/start/service/FailedCardService.java
+11
-0
FailedCardServiceImpl.java
...m/yxproject/start/service/impl/FailedCardServiceImpl.java
+35
-0
No files found.
src/main/java/com/yxproject/start/api/FailedCardApi.java
View file @
196af140
...
@@ -121,4 +121,56 @@ public class FailedCardApi {
...
@@ -121,4 +121,56 @@ public class FailedCardApi {
return
true
;
return
true
;
}
}
/**
* 查询所有证件类型
* @return List
*/
@RequestMapping
(
"selectCardType"
)
public
List
<
String
>
selectCardType
(){
List
<
String
>
result
=
failedCardService
.
selectCardType
();
return
result
;
}
/**
* 生成历史回迁证
* @param jsonStr
* @return
*/
@RequestMapping
(
"insertBackCard"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
insertBackCard
(
@RequestBody
String
jsonStr
){
JSONArray
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
TaskEntity
taskEntity
=
new
TaskEntity
();
String
str2
=
null
;
for
(
int
i
=
0
;
i
<
jsonarray
.
size
();
i
++)
{
JSONObject
jsonObject
=
(
JSONObject
)
jsonarray
.
get
(
i
);
String
str
=
jsonObject
.
getString
(
"idCard"
);
if
(
i
!=
jsonarray
.
size
()
-
1
)
{
str2
+=
"'"
+
str
+
"',"
;
}
else
{
str2
+=
"'"
+
str
+
"'"
;
}
}
//查询制证库,拿到组号列表
List
<
String
>
groupList
=
failedCardService
.
selectGroupNo
(
str2
);
//生成任务单
for
(
int
i
=
0
;
i
<
groupList
.
size
();
i
++)
{
JSONObject
jsonObject
=
(
JSONObject
)
jsonarray
.
get
(
i
);
//查询生成任务单需要的数据
Map
<
String
,
Object
>
dataMap
=
failedCardService
.
selectTaskListById
(
jsonObject
.
getString
(
"idCard"
));
//TODO 会报空指针异常
String
countyCode
=
dataMap
.
get
(
"COUNTY_CODE"
).
toString
();
Long
cardType
=
(
Long
)
dataMap
.
get
(
"CARD_TYPE_ID"
);
taskEntity
.
setCountyCode
(
countyCode
);
taskEntity
.
setCardType
(
cardType
);
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"
));
}
return
true
;
}
}
}
src/main/java/com/yxproject/start/mapper/FailedCardMapper.java
View file @
196af140
...
@@ -82,8 +82,33 @@ public interface FailedCardMapper {
...
@@ -82,8 +82,33 @@ public interface FailedCardMapper {
/*历史回迁证*/
/*历史回迁证*/
/*查询所有证件类型,用于下拉框*/
@Select
(
"select CARD_TYPE from card_type_dic"
)
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
(
String
cardIdList
);
@Select
(
"select SPECIAL_CARD.SPECIAL_TYPE,prod_card_t.accept_no,subStr(prod_card_t.UPLOAD_NO,0,6),SPECIAL_CARD.INITIATOR,PREPRO_PERSON.CARD_TYPE_ID\n"
+
"from prod_card_t@prod_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}"
)
public
Map
<
String
,
Object
>
selectTaskListById
(
String
id
);
@Select
(
"select prod_group_t.valid_count,prod_group_t.invalid_count from prod_group_t@prod_link \n"
+
"where group_no=#{groupNo}"
)
public
Map
<
String
,
Object
>
selectGroupDate
(
String
groupNo
);
@Insert
(
"insert into group_no (GROUP_NO,TASK_ID,VALID_COUNT,INVALID_COUNT)values('12345678','20190308073',79,1);"
)
public
boolean
insertGroupNo
(
@Param
(
"GROUP_NO"
)
String
GROUP_NO
,
@Param
(
"TASK_ID"
)
String
TASK_ID
,
@Param
(
"VALID_COUNT"
)
long
VALID_COUNT
,
@Param
(
"INVALID_COUNT"
)
long
INVALID_COUNT
);
}
}
src/main/java/com/yxproject/start/mapper/PersonPostMapper.java
View file @
196af140
...
@@ -35,7 +35,7 @@ public interface PersonPostMapper {
...
@@ -35,7 +35,7 @@ public interface PersonPostMapper {
"SELECT A.*, ROWNUM RN "
+
"SELECT A.*, ROWNUM RN "
+
" from (SELECT * FROM PERSON_POST "
+
" from (SELECT * FROM PERSON_POST "
+
" LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID"
+
" LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID"
+
"WHERE 1=1"
+
"
WHERE 1=1"
+
" <when test='applicantName!=null'> and PERSON_POST.APPLICANT_NAME = #{applicantName} </when>"
+
" <when test='applicantName!=null'> and PERSON_POST.APPLICANT_NAME = #{applicantName} </when>"
+
" <when test='orderNumber!=null'> and PERSON_POST.ORDER_NUMBER=#{orderNumber} </when>"
+
" <when test='orderNumber!=null'> and PERSON_POST.ORDER_NUMBER=#{orderNumber} </when>"
+
" <when test='state!=null'> and PERSON_POST.STATE=#{state} </when>"
+
" <when test='state!=null'> and PERSON_POST.STATE=#{state} </when>"
+
...
...
src/main/java/com/yxproject/start/service/FailedCardService.java
View file @
196af140
...
@@ -20,4 +20,15 @@ public interface FailedCardService {
...
@@ -20,4 +20,15 @@ public interface FailedCardService {
public
boolean
addSpecialCard
(
@Param
(
"acceptNo"
)
String
acceptNo
);
public
boolean
addSpecialCard
(
@Param
(
"acceptNo"
)
String
acceptNo
);
public
Map
<
String
,
Object
>
selectTaskListDate
(
@Param
(
"acceptNo"
)
String
acceptNo
);
public
Map
<
String
,
Object
>
selectTaskListDate
(
@Param
(
"acceptNo"
)
String
acceptNo
);
public
List
<
String
>
selectCardType
();
public
List
<
String
>
selectGroupNo
(
String
idCard
);
public
Map
<
String
,
Object
>
selectTaskListById
(
@Param
(
"id"
)
String
id
);
public
Map
<
String
,
Object
>
selectGroupDate
(
String
groupNo
);
public
boolean
insertGroupNo
(
@Param
(
"GROUP_NO"
)
String
GROUP_NO
,
@Param
(
"TASK_ID"
)
String
TASK_ID
,
@Param
(
"VALID_COUNT"
)
long
VALID_COUNT
,
@Param
(
"INVALID_COUNT"
)
long
INVALID_COUNT
);
}
}
src/main/java/com/yxproject/start/service/impl/FailedCardServiceImpl.java
View file @
196af140
package
com
.
yxproject
.
start
.
service
.
impl
;
package
com
.
yxproject
.
start
.
service
.
impl
;
import
com.yxproject.start.entity.TaskEntity
;
import
com.yxproject.start.mapper.FailedCardMapper
;
import
com.yxproject.start.mapper.FailedCardMapper
;
import
com.yxproject.start.service.FailedCardService
;
import
com.yxproject.start.service.FailedCardService
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
@Service
@Service
...
@@ -54,5 +58,36 @@ public class FailedCardServiceImpl implements FailedCardService {
...
@@ -54,5 +58,36 @@ public class FailedCardServiceImpl implements FailedCardService {
return
resultList
;
return
resultList
;
}
}
@Override
public
List
<
String
>
selectCardType
()
{
List
<
String
>
resultList
=
failedCardMapper
.
selectCardType
();
return
null
;
}
@Override
public
List
<
String
>
selectGroupNo
(
String
idCard
)
{
List
<
String
>
result
=
failedCardMapper
.
selectGroupNo
(
idCard
);
return
result
;
}
@Override
public
Map
<
String
,
Object
>
selectTaskListById
(
String
id
)
{
Map
<
String
,
Object
>
resultMap
=
failedCardMapper
.
selectTaskListById
(
id
);
return
resultMap
;
}
@Override
public
Map
<
String
,
Object
>
selectGroupDate
(
String
groupNo
)
{
Map
<
String
,
Object
>
resultMap
=
failedCardMapper
.
selectGroupDate
(
groupNo
);
return
resultMap
;
}
@Override
public
boolean
insertGroupNo
(
String
GROUP_NO
,
String
TASK_ID
,
long
VALID_COUNT
,
long
INVALID_COUNT
)
{
failedCardMapper
.
insertGroupNo
(
GROUP_NO
,
TASK_ID
,
VALID_COUNT
,
INVALID_COUNT
);
return
false
;
}
}
}
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