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
2ed268e1
Commit
2ed268e1
authored
Mar 28, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改查询受理库任务单详情
修改创建任务单详情
parent
b4d6aeaf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
38 deletions
+68
-38
TaskListApi.java
src/main/java/com/yxproject/start/api/TaskListApi.java
+27
-21
GroupNoMapper.java
src/main/java/com/yxproject/start/mapper/GroupNoMapper.java
+5
-3
TaskListMapper.java
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
+6
-4
TaskListServiceImpl.java
...com/yxproject/start/service/impl/TaskListServiceImpl.java
+28
-9
mybatis-config.xml
src/main/resources/mapper/config/mybatis-config.xml
+2
-1
No files found.
src/main/java/com/yxproject/start/api/TaskListApi.java
View file @
2ed268e1
...
...
@@ -254,32 +254,38 @@ public class TaskListApi {
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
str
);
String
date
=
jsonObject
.
getString
(
"date"
);
String
name
=
jsonObject
.
getString
(
"name"
);
JSONArray
jsonCounty
=
jsonObject
.
getJSONArray
(
"countyList"
);
//
JSONArray jsonCounty = jsonObject.getJSONArray("countyList");
JSONArray
jsonGroup
=
jsonObject
.
getJSONArray
(
"groupList"
);
List
<
Map
<
String
,
Object
>>
countyList
=
(
List
<
Map
<
String
,
Object
>>)
jsonCounty
;
if
(
countyList
.
size
()
>
0
)
{
//正常生成区县任务单
for
(
Map
<
String
,
Object
>
map
:
countyList
)
{
String
typeCode
=
map
.
get
(
"typeCode"
).
toString
();
String
countyCode
=
map
.
get
(
"countyCode"
).
toString
();
List
<
Map
<
String
,
Object
>>
objects
=
taskListService
.
selectGroupAtACCU
(
replaceDate
(
date
),
typeCode
,
countyCode
);
boolean
b
=
taskListService
.
saveTask
(
objects
,
name
,
0
+
""
);
}
}
//
List<Map<String, Object>> countyList = (List<Map<String, Object>>) jsonCounty;
//
if (countyList.size() > 0) {
//
//正常生成区县任务单
//
for (Map<String, Object> map : countyList) {
//
String typeCode = map.get("typeCode").toString();
//
String countyCode = map.get("countyCode").toString();
//
List<Map<String, Object>> objects = taskListService.selectGroupAtACCU(replaceDate(date), typeCode, countyCode);
//
boolean b = taskListService.saveTask(objects, name, 0 + "");
//
}
//
}
//生成某几个组的区县任务单
if
(
jsonGroup
.
size
()
>
0
)
{
List
<
String
>
groupList
=
(
List
<
String
>)
jsonGroup
;
//查询组号详情
String
groupNo
=
""
;
for
(
int
i
=
0
;
i
<
groupList
.
size
();
i
++)
{
if
(
i
!=
groupList
.
size
()
-
1
)
{
groupNo
=
""
+
groupNo
+
groupList
.
get
(
i
)
+
","
;
}
else
{
groupNo
=
""
+
groupNo
+
groupList
.
get
(
i
)
+
""
;
List
<
List
<
String
>>
listList
=
jsonGroup
;
for
(
List
<
String
>
groupList
:
listList
){
//查询组号详情
String
groupNo
=
""
;
for
(
int
i
=
0
;
i
<
groupList
.
size
();
i
++)
{
if
(
i
!=
groupList
.
size
()
-
1
)
{
groupNo
=
""
+
groupNo
+
groupList
.
get
(
i
)
+
","
;
}
else
{
groupNo
=
""
+
groupNo
+
groupList
.
get
(
i
)
+
""
;
}
}
List
<
Map
<
String
,
Object
>>
objects
=
taskListService
.
selectGroupAtACCU
(
groupNo
);
boolean
b
=
taskListService
.
saveTask
(
objects
,
name
,
0
+
""
);
}
List
<
Map
<
String
,
Object
>>
objects
=
taskListService
.
selectGroupAtACCU
(
groupNo
);
boolean
b
=
taskListService
.
saveTask
(
objects
,
name
,
0
+
""
);
// List<String> groupList = (List<String>) jsonGroup;
}
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"msg"
,
"成功生成任务单"
);
...
...
src/main/java/com/yxproject/start/mapper/GroupNoMapper.java
View file @
2ed268e1
...
...
@@ -46,13 +46,15 @@ public interface GroupNoMapper {
* @param groupNo 组号信息
* @return
*/
@Select
(
"select DISTINCT CARD_TYPE_DIC.card_type_id, ACC_GROUP_T.group_no ,ACC_GROUP_T.valid_count,ACC_GROUP_T.invalid_count,
county_dic.
county_code\n"
+
@Select
(
"select DISTINCT CARD_TYPE_DIC.card_type_id, ACC_GROUP_T.group_no ,ACC_GROUP_T.valid_count,ACC_GROUP_T.invalid_count,
'000000'
county_code\n"
+
"from ACC_CARD_T@ACCU_LINK \n"
+
"left join PREPRO_PERSON on PREPRO_PERSON.JMSFZSLH = acc_card_t.upload_no \n"
+
"left join ACC_GROUP_T@ACCU_LINK on substr(acc_card_t.accept_no,0,8) = ACC_GROUP_T.group_no\n"
+
"left join CARD_TYPE_DIC on PREPRO_PERSON.card_type_id = CARD_TYPE_DIC.CARD_TYPE_ID\n"
+
"left join county_dic on substr(PREPRO_PERSON.JMSFZSLH,0,6)= county_dic.COUNTY_CODE\n"
+
"where county_dic.COUNTY_CODE is not null and ACC_GROUP_T.deal_flag =3 and"
+
// "left join county_dic on substr(PREPRO_PERSON.JMSFZSLH,0,6)= county_dic.COUNTY_CODE\n" +
"where "
+
// "county_dic.COUNTY_CODE is not null and " +
"ACC_GROUP_T.deal_flag =3 and"
+
" ACC_GROUP_T.group_no in (#{groupNo} ) "
)
public
List
<
Map
<
String
,
Object
>>
selectGroupAtACCUByGroupNo
(
@Param
(
"groupNo"
)
String
groupNo
);
...
...
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
View file @
2ed268e1
...
...
@@ -35,13 +35,15 @@ public interface TaskListMapper {
* @param submitDate
* @return
*/
@Select
(
"select DISTINCT CARD_TYPE_DIC.*, ACC_GROUP_T.* ,
county_dic.*
from ACC_CARD_T@ACCU_LINK \n"
+
@Select
(
"select DISTINCT CARD_TYPE_DIC.*, ACC_GROUP_T.* ,
'000000' COUNTY_CODE,'0000' COUNTYNAME
from ACC_CARD_T@ACCU_LINK \n"
+
"left join ACC_GROUP_T@ACCU_LINK on substr(acc_card_t.accept_no,0,8) = ACC_GROUP_T.group_no\n"
+
"left join ACC_GROUP_RELATION_T@ACCU_LINK on ACC_GROUP_RELATION_T.group_no =ACC_GROUP_T.group_no\n"
+
"left join CARD_TYPE_DIC on decode(substr(ORIGINAL_NO,3,2),'99',6,substr(ORIGINAL_NO,21,1)) = CARD_TYPE_DIC.CARD_TYPE_ID\n"
+
"left join county_dic on substr(acc_card_t.upload_no,0,6)= county_dic.COUNTY_CODE\n"
+
"where county_dic.COUNTY_CODE is not null \n"
+
"and ACC_GROUP_T.group_no not in (select group_no from group_no)\n"
+
// "left join county_dic on substr(acc_card_t.upload_no,0,6)= county_dic.COUNTY_CODE\n" +
"where "
+
// "county_dic.COUNTY_CODE is not null \n" +
// "and " +
"ACC_GROUP_T.group_no not in (select group_no from group_no)\n"
+
"and to_char(ACC_GROUP_T.IMPORT_TIME,'yyyyMMdd')=#{submitDate} \n"
+
"order by ACC_GROUP_T.group_no"
)
public
List
<
Map
<
String
,
Object
>>
selectByCountyAtACCU
(
@Param
(
"submitDate"
)
String
submitDate
);
...
...
src/main/java/com/yxproject/start/service/impl/TaskListServiceImpl.java
View file @
2ed268e1
...
...
@@ -130,6 +130,7 @@ public class TaskListServiceImpl implements TaskListService {
Map
<
String
,
Object
>
typeMap
=
new
LinkedHashMap
<>();
//将查询出结果 按制证类型分成 Map
for
(
Map
o
:
maps
)
{
System
.
out
.
println
(
o
.
get
(
"GROUP_NO"
)+
"-----------"
);
// 组合JSON
if
(
typeMap
!=
null
&&
typeMap
.
containsKey
(
o
.
get
(
"CARD_TYPE"
)
+
""
))
{
List
<
Map
<
String
,
Object
>>
mapList
=
(
List
<
Map
<
String
,
Object
>>)
typeMap
.
get
(
o
.
get
(
"CARD_TYPE"
)+
""
);
...
...
@@ -145,16 +146,34 @@ public class TaskListServiceImpl implements TaskListService {
for
(
String
type
:
typeMap
.
keySet
())
{
List
<
Map
<
String
,
Object
>>
mapList
=
(
List
<
Map
<
String
,
Object
>>)
typeMap
.
get
(
type
);
Map
<
String
,
Object
>
typemap
=
new
LinkedHashMap
<>();
int
i
=
0
;
for
(
Map
<
String
,
Object
>
o
:
mapList
)
{
if
(
typemap
!=
null
&&
typemap
.
containsKey
(
o
.
get
(
"COUNTY_CODE"
)
+
""
))
{
List
<
Map
<
String
,
Object
>>
maplist
=
(
List
<
Map
<
String
,
Object
>>)
typemap
.
get
(
o
.
get
(
"COUNTY_CODE"
));
maplist
.
add
(
o
);
typemap
.
put
(
o
.
get
(
"COUNTY_CODE"
)
+
""
,
maplist
);
}
else
{
List
<
Map
<
String
,
Object
>>
maplist
=
new
ArrayList
<>();
maplist
.
add
(
o
);
typemap
.
put
(
o
.
get
(
"COUNTY_CODE"
)
+
""
,
maplist
);
}
if
(
typemap
.
containsKey
(
i
+
""
)){
List
<
Map
<
String
,
Object
>>
maplist
=
(
List
<
Map
<
String
,
Object
>>)
typemap
.
get
(
i
+
""
);
if
(
maplist
.
size
()>=
30
){
System
.
out
.
println
(
"==========="
);
i
++;
List
<
Map
<
String
,
Object
>>
maplist1
=
new
ArrayList
<>();
maplist1
.
add
(
o
);
typemap
.
put
(
i
+
""
,
maplist1
);
continue
;
}
else
{
System
.
out
.
println
(
"------------"
);
maplist
.
add
(
o
);
typemap
.
put
(
i
+
""
,
maplist
);
continue
;
}
}
else
{
System
.
out
.
println
(
"+++++++++++"
);
List
<
Map
<
String
,
Object
>>
maplist
=
new
ArrayList
<>();
maplist
.
add
(
o
);
typemap
.
put
(
i
+
""
,
maplist
);
continue
;
}
// mapList.get(i);
}
typeMap
.
put
(
type
,
typemap
);
}
...
...
src/main/resources/mapper/config/mybatis-config.xml
View file @
2ed268e1
...
...
@@ -6,6 +6,6 @@ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
<settings>
<setting
name=
"mapUnderscoreToCamelCase"
value=
"true"
/>
<setting
name=
"callSettersOnNulls"
value=
"true"
/>
<
!--<setting name="logImpl" value="STDOUT_LOGGING" />--
>
<
setting
name=
"logImpl"
value=
"STDOUT_LOGGING"
/
>
</settings>
</configuration>
\ No newline at end of file
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