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
2673ce08
Commit
2673ce08
authored
Mar 07, 2019
by
liboyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
75778185
c16f2a49
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
133 additions
and
11 deletions
+133
-11
TaskListApi.java
src/main/java/com/yxproject/start/api/TaskListApi.java
+37
-4
LogMapper.java
src/main/java/com/yxproject/start/mapper/LogMapper.java
+29
-2
TaskListMapper.java
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
+19
-2
TaskListService.java
...ain/java/com/yxproject/start/service/TaskListService.java
+5
-1
TaskListServiceImpl.java
...com/yxproject/start/service/impl/TaskListServiceImpl.java
+43
-2
No files found.
src/main/java/com/yxproject/start/api/TaskListApi.java
View file @
2673ce08
...
...
@@ -5,14 +5,17 @@ import com.yxproject.start.entity.TaskList.CountGajgEntity;
import
com.yxproject.start.entity.TaskList.TaskListEntity
;
import
com.yxproject.start.service.TaskListService
;
import
com.yxproject.start.utils.YXJSONResponse
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.transaction.Transactional
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -102,17 +105,47 @@ public class TaskListApi {
/**
* 生成任务单
*
* @param process 工序
* @param date 查询时间
* @param name 提交人姓名
* @param groupList 组号列表
* @param countyList 区县列表 {typeCode:1,countyCode:'123456'}
* @param resp
* @return
*/
@RequestMapping
(
"createTask"
)
public
String
queryByCountyAtACCU
(
@RequestParam
(
"process"
)
String
process
,
@RequestParam
(
"date"
)
String
date
,
@RequestParam
(
"groupList"
)
List
<
String
>
groupList
,
@RequestParam
(
"countyList"
)
String
countyList
,
HttpServletResponse
resp
){
// taskListService.selectGrouoAtACCU()
return
null
;
@Transactional
public
String
queryByCountyAtACCU
(
@RequestBody
String
str
,
HttpServletResponse
resp
){
System
.
out
.
println
(
str
);
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
str
);
String
date
=
jsonObject
.
getString
(
"date"
);
String
name
=
jsonObject
.
getString
(
"name"
);
JSONArray
jsonCounty
=
jsonObject
.
getJSONArray
(
"countyList"
);
JSONArray
jsonGroup
=
jsonObject
.
getJSONArray
(
"groupList"
);
List
<
Map
<
String
,
Object
>>
countyList
=(
List
<
Map
<
String
,
Object
>>)
jsonCounty
;
List
<
String
>
groupList
=(
List
<
String
>)
jsonGroup
;
for
(
Map
<
String
,
Object
>
map
:
countyList
){
String
typeCode
=
map
.
get
(
"typeCode"
).
toString
();
String
countyCode
=
map
.
get
(
"countyCode"
).
toString
();
List
<
Object
>
objects
=
taskListService
.
selectGroupAtACCU
(
date
,
typeCode
,
countyCode
);
//todo 保存任务单数据
boolean
b
=
taskListService
.
saveTask
(
objects
,
name
);
}
if
(
groupList
.
size
()>
0
){
//查询组号详情
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
<
Object
>
objects
=
taskListService
.
selectGroupAtACCU
(
groupNo
);
boolean
b
=
taskListService
.
saveTask
(
objects
,
name
);
}
//todo 保存任务单数据
return
"成功生成循环单"
;
}
...
...
src/main/java/com/yxproject/start/mapper/LogMapper.java
View file @
2673ce08
...
...
@@ -16,8 +16,35 @@ public interface LogMapper {
@Insert
(
""
)
public
boolean
insertAnalysisLog
();
@Select
(
""
)
public
List
<
Map
<
String
,
Object
>>
selectAnalysisLog
(
String
fileName
,
String
analysisDate
);
@Select
(
"<script> "
+
"SELECT * FROM "
+
"( "
+
"SELECT A.*, ROWNUM RN "
+
"FROM (SELECT FILE_NAME_DIC.FILE_NAME,FILE_NAME_DIC.FORM_START_TIME,"
+
"FILE_NAME_DIC.FORM_DEADLINE,PERSON_POST.LATTICE_MOUTH_INFORMATION,"
+
"FILE_NAME_DIC.ANALYSIS_DATE,FILES.RECORD_NUMBER ,"
+
"SUM(DECOdE(CARD_TYPE_ID,9,1,0)) youcount,"
+
"SUM(DECOdE(CARD_TYPE_ID,0,1,0)) PUcount "
+
"FROM FILE_NAME_DIC "
+
"LEFT JOIN PERSON_POST ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID "
+
"LEFT JOIN FILES ON FILES.ID=FILE_NAME_DIC.FILE_ID "
+
"left join PREPRO_PERSON on PREPRO_PERSON.JMSFZSLH = person_post.FIRST_WHITE "
+
"WHERE "
+
"<if test='fileName !=\"\"' >"
+
"FILE_NAME_DIC.FILE_NAME=#{fileName} "
+
"</if>"
+
"<if test='analysisDate !=\"\"' >"
+
"AND FILE_NAME_DIC.ANALYSIS_DATE = #{analysisDate} "
+
"</if>"
+
"group by FILE_NAME_DIC.FILE_NAME, FILE_NAME_DIC.FORM_START_TIME, "
+
"FILE_NAME_DIC.FORM_DEADLINE, PERSON_POST.LATTICE_MOUTH_INFORMATION, "
+
"FILE_NAME_DIC.ANALYSIS_DATE, FILES.RECORD_NUMBER"
+
")"
+
"A"
+
")"
+
"WHERE RN BETWEEN #{end} AND #{begin}"
+
"</script>"
)
public
List
<
Map
<
String
,
Object
>>
selectAnalysisLog
(
String
fileName
,
String
analysisDate
,
long
begin
,
long
end
);
@Select
(
"<script> "
+
"SELECT * FROM "
+
...
...
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
View file @
2673ce08
...
...
@@ -60,14 +60,31 @@ public interface TaskListMapper {
"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 to_char(ACC_GROUP_T.IMPORT_TIME,'yyyyMMdd')= #{date}\n"
+
"and PREPRO_PERSON.card_type_id =#{typeCode} and substr(PREPRO_PERSON.JMSFZSLH,0,6) =#{countyCode}"
)
public
List
<
Map
<
String
,
Object
>>
selectGrouoAtACCU
(
@Param
(
"date"
)
String
date
,
@Param
(
"typeCode"
)
String
typeCode
,
@Param
(
"countyCode"
)
String
countyCode
);
public
List
<
Map
<
String
,
Object
>>
selectGroupAtACCUByCountyCode
(
@Param
(
"date"
)
String
date
,
@Param
(
"typeCode"
)
String
typeCode
,
@Param
(
"countyCode"
)
String
countyCode
);
/**
* 查询组号列表
* 受理库
* @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"
+
"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"
+
" ACC_GROUP_T.group_no in #{groupNo} "
)
public
List
<
Map
<
String
,
Object
>>
selectGroupAtACCUByGroupNo
(
@Param
(
"groupNo"
)
String
groupNo
);
/**
* 生成任务单
* @param taskEntity 任务单
* @return
*/
@Insert
(
"insert into task (CARD_TYPE,COUNTY_CODE,SUBMIT_
DATE,SUBMIT_NAME) values(#{cardType},#{countyCode},#{submitDat
e},#{submitName})"
)
@Insert
(
"insert into task (CARD_TYPE,COUNTY_CODE,SUBMIT_
NAME) values(#{cardType},#{countyCod
e},#{submitName})"
)
@Options
(
useGeneratedKeys
=
true
,
keyProperty
=
"taskId"
,
keyColumn
=
"TASK_ID"
)
public
boolean
saveTask
(
TaskEntity
taskEntity
);
...
...
src/main/java/com/yxproject/start/service/TaskListService.java
View file @
2673ce08
...
...
@@ -22,7 +22,11 @@ public interface TaskListService {
public
List
<
Object
>
selectByCountyAtACCU
(
String
date
);
public
List
<
Object
>
selectGrouoAtACCU
(
String
date
,
String
typeCode
,
String
countyCode
);
public
List
<
Object
>
selectGroupAtACCU
(
String
date
,
String
typeCode
,
String
countyCode
);
public
List
<
Object
>
selectGroupAtACCU
(
String
groupNo
);
public
boolean
saveTask
(
TaskEntity
taskEntity
);
public
boolean
saveTask
(
List
<
Object
>
list
,
String
submitName
);
}
src/main/java/com/yxproject/start/service/impl/TaskListServiceImpl.java
View file @
2673ce08
package
com
.
yxproject
.
start
.
service
.
impl
;
import
com.yxproject.start.entity.GroupNoEntity
;
import
com.yxproject.start.entity.TaskEntity
;
import
com.yxproject.start.entity.TaskList.CountCountyEntity
;
import
com.yxproject.start.entity.TaskList.CountGajgEntity
;
import
com.yxproject.start.entity.TaskList.TaskListEntity
;
import
com.yxproject.start.mapper.GroupNoMapper
;
import
com.yxproject.start.mapper.TaskListMapper
;
import
com.yxproject.start.service.TaskListService
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -20,6 +22,8 @@ import java.util.Map;
public
class
TaskListServiceImpl
implements
TaskListService
{
@Autowired
private
TaskListMapper
taskListMapper
;
@Autowired
private
GroupNoMapper
groupNoMapper
;
@Override
public
List
<
CountCountyEntity
>
selectByCounty
(
String
submitDate
)
{
...
...
@@ -154,8 +158,19 @@ public class TaskListServiceImpl implements TaskListService {
* @return
*/
@Override
public
List
selectGrouoAtACCU
(
String
date
,
String
typeCode
,
String
countyCode
)
{
return
taskListMapper
.
selectGrouoAtACCU
(
date
,
typeCode
,
countyCode
);
public
List
selectGroupAtACCU
(
String
date
,
String
typeCode
,
String
countyCode
)
{
return
taskListMapper
.
selectGroupAtACCUByCountyCode
(
date
,
typeCode
,
countyCode
);
}
/**
* 查询组号信息
* 受理库
* @param groupNo 受理组号
* @return
*/
@Override
public
List
selectGroupAtACCU
(
String
groupNo
)
{
return
taskListMapper
.
selectGroupAtACCUByGroupNo
(
groupNo
);
}
/**
...
...
@@ -168,6 +183,32 @@ public class TaskListServiceImpl implements TaskListService {
return
taskListMapper
.
saveTask
(
taskEntity
);
}
/**
* 保存循环单
* @param list
* @return
*/
@Override
public
boolean
saveTask
(
List
<
Object
>
list
,
String
submitName
)
{
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
);
saveTask
(
taskEntity
);
for
(
Object
object
:
list
){
Map
<
String
,
Object
>
map
=(
Map
<
String
,
Object
>)
object
;
GroupNoEntity
groupNoEntity
=
new
GroupNoEntity
();
groupNoEntity
.
setGroupNo
(
map
.
get
(
"GROUP_NO"
)+
""
);
groupNoEntity
.
setInvalidCount
(
Long
.
valueOf
(
map
.
get
(
"INVALID_COUNT"
)+
""
));
groupNoEntity
.
setValidCount
(
Long
.
valueOf
(
map
.
get
(
"VALID_COUNT"
)+
""
));
groupNoEntity
.
setSpecialCardCount
((
long
)
0
);
groupNoEntity
.
setTaskId
(
taskEntity
.
getTaskId
());
groupNoMapper
.
saveGroupNo
(
groupNoEntity
);
}
return
true
;
}
private
String
createGroupNo
(
List
<
Integer
>
c
,
List
<
Integer
>
nsList
)
{
try
{
String
groupNo
=
""
;
...
...
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