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
f3583d35
Commit
f3583d35
authored
Mar 19, 2019
by
suichenguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
excel添加更改备注
parent
163f95c8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
0 deletions
+50
-0
LogApi.java
src/main/java/com/yxproject/start/api/LogApi.java
+9
-0
LogMapper.java
src/main/java/com/yxproject/start/mapper/LogMapper.java
+24
-0
LogService.java
src/main/java/com/yxproject/start/service/LogService.java
+5
-0
LogServiceImpl.java
...java/com/yxproject/start/service/impl/LogServiceImpl.java
+12
-0
No files found.
src/main/java/com/yxproject/start/api/LogApi.java
View file @
f3583d35
...
...
@@ -114,7 +114,15 @@ public class LogApi {
List
<
Map
<
String
,
Object
>>
resultList
=
logService
.
selectFileIdByUploadDate
(
printDate
);
//查询Excel文件信息
Map
<
String
,
Object
>
resultMap
=
logService
.
selectFileNameDic
(
fileId
);
//更改解析状态
logService
.
changeFileState
(
fileId
);
//查询身份数据
List
<
Map
<
String
,
Object
>>
dataList
=
logService
.
selectIdData
(
fileId
);
System
.
out
.
println
(
"0000000000000000000000000000000000"
+
dataList
);
//将身份数据插入到邮寄表中
for
(
int
i
=
0
;
i
<
dataList
.
size
();
i
++){
logService
.
insertIdData
((
String
)
dataList
.
get
(
i
).
get
(
"GMSFHM"
),(
String
)
dataList
.
get
(
i
).
get
(
"SSXQDM"
),(
String
)
dataList
.
get
(
i
).
get
(
"YXQQSRQ"
),(
String
)
dataList
.
get
(
i
).
get
(
"YXQJZRQ"
),
(
String
)
dataList
.
get
(
i
).
get
(
"JMSFZSLH"
));
}
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
resultList
.
size
();
i
++){
String
fileName
=(
BigDecimal
)(
resultList
.
get
(
i
).
get
(
"ID"
))+
""
;
...
...
@@ -124,6 +132,7 @@ public class LogApi {
resultMap
.
put
(
"commonCount"
,
countMap
.
get
(
"PUSUM"
));
resultMap
.
put
(
"postCount"
,
countMap
.
get
(
"YOUSUM"
));
result
.
add
(
resultMap
);
//生成解析表
logService
.
insertIntoAnalysis
(
fileId
,
fileName
,
String
.
valueOf
(
countMap
.
get
(
"PUSUM"
)),
String
.
valueOf
(
countMap
.
get
(
"YOUSUM"
)));
}
return
true
;
...
...
src/main/java/com/yxproject/start/mapper/LogMapper.java
View file @
f3583d35
...
...
@@ -2,6 +2,7 @@ package com.yxproject.start.mapper;
import
com.yxproject.start.entity.CountyDicEntity
;
import
org.apache.ibatis.annotations.*
;
import
org.omg.CORBA.PUBLIC_MEMBER
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -32,9 +33,19 @@ public interface LogMapper {
public
boolean
changeCardType
(
@Param
(
"printDate"
)
String
printDate
,
@Param
(
"fileId"
)
String
fileId
);
@Update
(
" update FILE_NAME_DIC set FILE_NAME_DIC.ANALYSIS_DATE = #{printDate} where file_id=#{fileId} "
)
public
boolean
insertAnalysisDate
(
@Param
(
"printDate"
)
String
printDate
,
@Param
(
"fileId"
)
String
fileId
);
/**
* 生成解析表
* @param fileDic
* @param fileId
* @param commonCardCount
* @param postCardCount
* @return
*/
@Insert
(
"INSERT INTO ANALYSIS (FILE_DIC_ID,FILE_ID,COMMON_CARD_COUNT,POST_CARD_COUNT) VALUES (#{fileDic},#{fileId},#{commonCardCount},#{postCardCount})"
)
public
boolean
insertIntoAnalysis
(
@Param
(
"fileDic"
)
String
fileDic
,
@Param
(
"fileId"
)
String
fileId
,
@Param
(
"commonCardCount"
)
String
commonCardCount
,
@Param
(
"postCardCount"
)
String
postCardCount
);
...
...
@@ -156,6 +167,19 @@ public interface LogMapper {
public
Map
<
String
,
Object
>
selectCountByCardType
(
@Param
(
"fileId"
)
String
fileId
);
//查询身份数据
@Select
(
"select PREPRO_PERSON.JMSFZSLH, PREPRO_PERSON.GMSFHM,PREPRO_PERSON.YXQQSRQ,PREPRO_PERSON.YXQJZRQ,PREPRO_PERSON.SSXQDM FROM PREPRO_PERSON "
+
"LEFT JOIN ANALYSIS ON ANALYSIS.FILE_ID = PREPRO_PERSON.FILE_ID "
+
"LEFT JOIN PERSON_POST ON ANALYSIS.FILE_DIC_ID =PERSON_POST.FILE_ID "
+
"WHERE PERSON_POST.FILE_ID=#{fileId}"
)
public
List
<
Map
<
String
,
Object
>>
selectIdData
(
@Param
(
"fileId"
)
String
fileId
);
//身份数据插入person_post
@Update
(
"UPDATE PERSON_POST SET ID_CARD=#{cardId},ACCEPT_THE_MATTER=#{issuing},BEGIN_USEFUL_LIFE=#{beginDate},VALID_PERIOD_END=#{endDate} where PERSON_POST.FIRST_WHITE=#{firstWhite}"
)
public
boolean
insertIdData
(
@Param
(
"cardId"
)
String
cardId
,
@Param
(
"issuing"
)
String
issuing
,
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"firstWhite"
)
String
firstWhite
);
/**
* 解析时更改Excel文件状态
* @param fileId
...
...
src/main/java/com/yxproject/start/service/LogService.java
View file @
f3583d35
...
...
@@ -42,4 +42,9 @@ public interface LogService {
public
String
selectByFileName
(
@Param
(
"fileName"
)
String
fileName
);
public
boolean
changeFileState
(
@Param
(
"fileId"
)
String
fileId
);
public
List
<
Map
<
String
,
Object
>>
selectIdData
(
@Param
(
"fileId"
)
String
fileId
);
public
boolean
insertIdData
(
String
cardId
,
String
issuing
,
String
beginDate
,
String
endDate
,
String
firstWhite
);
}
src/main/java/com/yxproject/start/service/impl/LogServiceImpl.java
View file @
f3583d35
...
...
@@ -119,4 +119,16 @@ public class LogServiceImpl implements LogService {
logMapper
.
changeFileState
(
fileId
);
return
false
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
selectIdData
(
String
fileId
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
logMapper
.
selectIdData
(
fileId
);
return
resultList
;
}
@Override
public
boolean
insertIdData
(
String
cardId
,
String
issuing
,
String
beginDate
,
String
endDate
,
String
firstWhite
)
{
logMapper
.
insertIdData
(
cardId
,
issuing
,
beginDate
,
endDate
,
firstWhite
);
return
true
;
}
}
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