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
975c81ee
Commit
975c81ee
authored
Mar 08, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加查询
parent
941eeeeb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
16 deletions
+23
-16
TaskListApi.java
src/main/java/com/yxproject/start/api/TaskListApi.java
+3
-2
TaskListMapper.java
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
+17
-12
TaskListService.java
...ain/java/com/yxproject/start/service/TaskListService.java
+1
-1
TaskListServiceImpl.java
...com/yxproject/start/service/impl/TaskListServiceImpl.java
+2
-1
No files found.
src/main/java/com/yxproject/start/api/TaskListApi.java
View file @
975c81ee
...
...
@@ -150,6 +150,7 @@ public class TaskListApi {
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
str
);
String
date
=
jsonObject
.
getString
(
"date"
);
String
name
=
jsonObject
.
getString
(
"name"
);
String
process
=
jsonObject
.
getString
(
"process"
);
JSONArray
jsonCounty
=
jsonObject
.
getJSONArray
(
"countyList"
);
JSONArray
jsonGroup
=
jsonObject
.
getJSONArray
(
"groupList"
);
List
<
Map
<
String
,
Object
>>
countyList
=(
List
<
Map
<
String
,
Object
>>)
jsonCounty
;
...
...
@@ -158,7 +159,7 @@ public class TaskListApi {
String
typeCode
=
map
.
get
(
"typeCode"
).
toString
();
String
countyCode
=
map
.
get
(
"countyCode"
).
toString
();
List
<
Object
>
objects
=
taskListService
.
selectGroupAtACCU
(
replaceDate
(
date
),
typeCode
,
countyCode
);
boolean
b
=
taskListService
.
saveTask
(
objects
,
name
);
boolean
b
=
taskListService
.
saveTask
(
objects
,
name
,
process
);
}
//生成某几个组的区县任务单
if
(
jsonGroup
.
size
()>
0
){
...
...
@@ -173,7 +174,7 @@ public class TaskListApi {
}
}
List
<
Object
>
objects
=
taskListService
.
selectGroupAtACCU
(
groupNo
);
boolean
b
=
taskListService
.
saveTask
(
objects
,
name
);
boolean
b
=
taskListService
.
saveTask
(
objects
,
name
,
process
);
}
//todo 保存任务单数据
return
"成功生成循环单"
;
...
...
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
View file @
975c81ee
...
...
@@ -40,7 +40,9 @@ public interface TaskListMapper {
"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 to_char(ACC_GROUP_T.IMPORT_TIME,'yyyyMMdd')=#{submitDate}"
)
"where county_dic.COUNTY_CODE is not null "
+
"and ACC_GROUP_T.group_no not in (select group_no from group_no)"
+
" and to_char(ACC_GROUP_T.IMPORT_TIME,'yyyyMMdd')=#{submitDate}"
)
public
List
<
Map
<
String
,
Object
>>
selectByCountyAtACCU
(
@Param
(
"submitDate"
)
String
submitDate
);
/**
...
...
@@ -58,7 +60,9 @@ public interface TaskListMapper {
"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 = #{countyCode} and to_char(ACC_GROUP_T.IMPORT_TIME,'yyyyMMdd')=#{date}"
+
"where county_dic.COUNTY_CODE = #{countyCode} and "
+
" and ACC_GROUP_T.group_no not in (select group_no from group_no) "
+
"to_char(ACC_GROUP_T.IMPORT_TIME,'yyyyMMdd')=#{date}"
+
" and PREPRO_PERSON.card_type_id = #{typeCode}"
+
") a ) where rn BETWEEN #{minNum} and #{maxNum}"
)
public
List
<
Map
<
String
,
Object
>>
selectByGroupNoAtACCU
(
@Param
(
"date"
)
String
date
,
@Param
(
"typeCode"
)
String
typeCode
,
@Param
(
"countyCode"
)
String
countyCode
,
@Param
(
"maxNum"
)
long
maxNum
,
@Param
(
"minNum"
)
long
minNum
);
...
...
@@ -122,7 +126,7 @@ public interface TaskListMapper {
* @param taskEntity 任务单
* @return
*/
@Insert
(
"insert into task (CARD_TYPE,COUNTY_CODE,SUBMIT_NAME
) values(#{cardType},#{countyCode},#{submitName
})"
)
@Insert
(
"insert into task (CARD_TYPE,COUNTY_CODE,SUBMIT_NAME
,TASK_STATE_ID) values(#{cardType},#{countyCode},#{submitName},#{taskStateId
})"
)
@Options
(
useGeneratedKeys
=
true
,
keyProperty
=
"taskId"
,
keyColumn
=
"TASK_ID"
)
public
boolean
saveTask
(
TaskEntity
taskEntity
);
...
...
@@ -194,21 +198,22 @@ public interface TaskListMapper {
public
List
<
TaskListEntity
>
selectACCU
(
@Param
(
"submitDate"
)
String
submitDate
,
@Param
(
"countyCode"
)
String
countyCode
,
@Param
(
"Gajg_dm"
)
String
Gajg
);
/**
* 生成任务单
* @param taskListEntityMap
* @return
*/
@Insert
(
"INSERT INTO TASK (CARD_TYPE,OLD_CARD_TYPE,COUNTY_CODE,TASK_STATE_ID)VALUES(1,1,#{countyCode},0)"
)
public
boolean
createTaskList
(
List
<
TaskListEntity
>
taskListEntityMap
);
//
/**
//
* 生成任务单
//
* @param taskListEntityMap
//
* @return
//
*/
//
@Insert("INSERT INTO TASK (CARD_TYPE,OLD_CARD_TYPE,COUNTY_CODE,TASK_STATE_ID)VALUES(1,1,#{countyCode},0)")
//
public boolean createTaskList(List<TaskListEntity> taskListEntityMap);
/**
*
下发任务单
*
更改任务单状态
* @param taskId
* @return
*/
//todo 更改状态
@Update
(
"UPDATE TASK SET TASK_STATE_ID=1 WHERE TASK_ID = #{taskId} "
)
public
boolean
updateState
(
@Param
(
"taskId"
)
String
taskId
);
public
boolean
updateState
(
@Param
(
"taskId"
)
String
taskId
,
@Param
(
"process"
)
String
process
,
@Param
(
"name"
)
String
name
);
}
src/main/java/com/yxproject/start/service/TaskListService.java
View file @
975c81ee
...
...
@@ -32,5 +32,5 @@ public interface TaskListService {
public
boolean
saveTask
(
TaskEntity
taskEntity
);
public
boolean
saveTask
(
List
<
Object
>
list
,
String
submitName
);
public
boolean
saveTask
(
List
<
Object
>
list
,
String
submitName
,
String
process
);
}
src/main/java/com/yxproject/start/service/impl/TaskListServiceImpl.java
View file @
975c81ee
...
...
@@ -237,12 +237,13 @@ public class TaskListServiceImpl implements TaskListService {
* @return
*/
@Override
public
boolean
saveTask
(
List
<
Object
>
list
,
String
submitName
)
{
public
boolean
saveTask
(
List
<
Object
>
list
,
String
submitName
,
String
process
)
{
Map
<
String
,
Object
>
stringObjectMap
=(
Map
<
String
,
Object
>)
list
.
get
(
0
);
TaskEntity
taskEntity
=
new
TaskEntity
();
taskEntity
.
setCardType
(
Long
.
valueOf
(
stringObjectMap
.
get
(
"CARD_TYPE_ID"
)+
""
));
taskEntity
.
setCountyCode
(
stringObjectMap
.
get
(
"COUNTY_CODE"
)+
""
);
taskEntity
.
setSubmitName
(
submitName
);
taskEntity
.
setTaskStateId
(
Long
.
valueOf
(
process
));
saveTask
(
taskEntity
);
for
(
Object
object
:
list
){
Map
<
String
,
Object
>
map
=(
Map
<
String
,
Object
>)
object
;
...
...
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