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
82853292
Commit
82853292
authored
Mar 07, 2019
by
suichenguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解析
parent
019c43ef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
15 deletions
+118
-15
LogApi.java
src/main/java/com/yxproject/start/api/LogApi.java
+39
-11
LogMapper.java
src/main/java/com/yxproject/start/mapper/LogMapper.java
+49
-4
LogService.java
src/main/java/com/yxproject/start/service/LogService.java
+7
-0
LogServiceImpl.java
...java/com/yxproject/start/service/impl/LogServiceImpl.java
+23
-0
No files found.
src/main/java/com/yxproject/start/api/LogApi.java
View file @
82853292
...
...
@@ -17,15 +17,6 @@ import java.util.Map;
public
class
LogApi
{
@Autowired
private
LogService
logService
;
@RequestMapping
(
"createAnalysisLog"
)
public
boolean
createAnalysisLog
(
HttpServletResponse
response
)
{
return
true
;
}
/**
* 查询新包生成日志
* @param newFileName 新文件名
...
...
@@ -70,13 +61,50 @@ public class LogApi {
* @return
*/
@RequestMapping
(
"selectByAnalysisLog"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
Map
<
String
,
Object
>>
selectByAnalysisLog
(
@RequestParam
(
"fileName"
)
String
fileName
,
@RequestParam
(
"analysisTime"
)
String
analysisTime
,
@RequestParam
(
"currPage"
)
String
currPage
,
@RequestParam
(
"pageSize"
)
String
pageSize
){
List
<
Map
<
String
,
Object
>>
resultList
=
logService
.
selectAnalysisLog
(
fileName
,
analysisTime
,
Long
.
valueOf
(
currPage
),
Long
.
valueOf
(
pageSize
));
List
<
Map
<
String
,
Object
>>
resultList
=
logService
.
selectAnalysisLog
(
fileName
,
replaceDate
(
analysisTime
)
,
Long
.
valueOf
(
currPage
),
Long
.
valueOf
(
pageSize
));
return
resultList
;
}
/**
* 查询解析日志总数
* @param fileName
* @param analysisTime
* @return
*/
@RequestMapping
(
"selectAnalysisLogCount"
)
public
String
selectAnalysisLogCount
(
@RequestParam
(
"fileName"
)
String
fileName
,
@RequestParam
(
"analysisTime"
)
String
analysisTime
){
String
total
=
logService
.
selectAnalysisLogCount
(
fileName
,
replaceDate
(
analysisTime
));
return
total
;
}
/**
* 根据导入时间查询解析数据
* @param uploadName
* @return
*/
@RequestMapping
(
"selectAnalysisData"
)
public
List
<
Map
<
String
,
Object
>>
selectAnalysisData
(
@RequestParam
(
"uploadName"
)
String
uploadName
){
List
<
Map
<
String
,
Object
>>
resultList
=
logService
.
selectAnalysisData
(
replaceDate
(
uploadName
));
return
resultList
;
}
/**
* 解析
* @param printDate
* @param latticeMouthInformation
* @return
*/
@RequestMapping
(
"analysis"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
analysis
(
@RequestParam
(
"printDate"
)
String
printDate
,
@RequestParam
(
"latticeMouthInformation"
)
String
latticeMouthInformation
){
logService
.
changeCardType
(
replaceDate
(
printDate
),
latticeMouthInformation
);
logService
.
insertAnalysisDate
(
replaceDate
(
printDate
),
latticeMouthInformation
);
return
true
;
}
/**
* 去除字符串中中线
...
...
src/main/java/com/yxproject/start/mapper/LogMapper.java
View file @
82853292
package
com
.
yxproject
.
start
.
mapper
;
import
com.yxproject.start.entity.CountyDicEntity
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.*
;
import
org.omg.CORBA.PUBLIC_MEMBER
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -14,6 +13,34 @@ public interface LogMapper {
@Select
(
"select distinct FILES.UPLOAD_DATE,PERSON_POST.LATTICE_MOUTH_INFORMATION,FILES.RECORD_NUMBER,FILE_NAME_DIC.FORM_START_TIME,FILE_NAME_DIC.FORM_DEADLINE\n"
+
"from PREPRO_PERSON \n"
+
"left join FILES on PREPRO_PERSON.FILE_ID =FILES.ID\n"
+
"LEFT JOIN PERSON_POST ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n"
+
"LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID\n"
+
"where FILES.CREATE_TIME = #{uploadDate}"
+
"AND FILE_NAME_DIC.STATE=0"
)
public
List
<
Map
<
String
,
Object
>>
selectAnalysisData
(
@Param
(
"uploadDate"
)
String
uploadDate
);
@Update
(
"UPDATE PREPRO_PERSON SET CARD_TYPE_ID =9 \n"
+
"WHERE JMSFZSLH = (\n"
+
"SELECT PREPRO_PERSON.JMSFZSLH \n"
+
"FROM PREPRO_PERSON \n"
+
"LEFT JOIN PERSON_POST ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n"
+
"WHERE PERSON_POST.PRINT_DATE =#{printDate} AND PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation}\n"
+
")"
)
public
boolean
changeCardType
(
@Param
(
"printDate"
)
String
printDate
,
@Param
(
"latticeMouthInformation"
)
String
latticeMouthInformation
);
@Insert
(
"INSERT INTO FILE_NAME_DIC ( FILE_NAME_DIC.ANALYSIS_DATE\n"
+
") SELECT FILE_NAME_DIC.ANALYSIS_DATE \n"
+
"FROM FILE_NAME_DIC\n"
+
"LEFT JOIN PERSON_POST ON FILE_NAME_DIC.FILE_ID = PERSON_POST.FILE_ID\n"
+
"WHERE PERSON_POST.PRINT_DATE=#{printDate} AND PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} "
)
public
boolean
insertAnalysisDate
(
@Param
(
"printDate"
)
String
printDate
,
@Param
(
"latticeMouthInformation"
)
String
latticeMouthInformation
);
@Select
(
"<script> "
+
"SELECT * FROM "
+
...
...
@@ -93,4 +120,22 @@ public interface LogMapper {
"</script>"
)
public
String
selectNewFileLogCount
(
@Param
(
"newFileName"
)
String
newFileName
,
@Param
(
"cardId"
)
String
cardId
,
@Param
(
"createDate"
)
String
createDate
,
@Param
(
"uploadCountyCode"
)
String
uploadCountyName
);
@Select
(
"<script> "
+
"SELECT COUNT(*) FROM FILE_NAME_DIC \n"
+
"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 1=1 "
+
" <if test='fileName !=\"\"' >"
+
" and NEW_FILES.NEW_FILE_NAME=#{fileName} "
+
" </if>"
+
" <if test='analysisTime != -1' >"
+
" and NEW_FILES.DWDM=#{analysisTime}"
+
" </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"
+
"</script>"
)
public
String
selectAnalysisLogCount
(
@Param
(
"fileName"
)
String
fileName
,
@Param
(
"analysisTime"
)
String
analysisTime
);
}
src/main/java/com/yxproject/start/service/LogService.java
View file @
82853292
...
...
@@ -14,6 +14,13 @@ public interface LogService {
public
List
<
Map
<
String
,
Object
>>
selectAnalysisLog
(
String
fileName
,
String
analysisDate
,
long
currPage
,
long
pageSize
);
public
String
selectAnalysisLogCount
(
String
fileName
,
String
analysisDate
);
public
List
<
CountyDicEntity
>
getCountyList
();
public
List
<
Map
<
String
,
Object
>>
selectAnalysisData
(
String
uploadDate
);
public
boolean
changeCardType
(
String
printDate
,
String
latticeMouthInformation
);
public
boolean
insertAnalysisDate
(
String
printDate
,
String
latticeMouthInformation
);
}
src/main/java/com/yxproject/start/service/impl/LogServiceImpl.java
View file @
82853292
...
...
@@ -31,9 +31,32 @@ public class LogServiceImpl implements LogService {
return
resultList
;
}
@Override
public
String
selectAnalysisLogCount
(
String
fileName
,
String
analysisDate
)
{
String
count
=
logMapper
.
selectAnalysisLogCount
(
fileName
,
analysisDate
);
return
count
;
}
@Override
public
List
<
CountyDicEntity
>
getCountyList
()
{
return
logMapper
.
getCountyListData
();
}
@Override
public
List
<
Map
<
String
,
Object
>>
selectAnalysisData
(
String
uploadDate
)
{
return
logMapper
.
selectAnalysisData
(
uploadDate
);
}
@Override
public
boolean
changeCardType
(
String
printDate
,
String
latticeMouthInformation
)
{
logMapper
.
changeCardType
(
printDate
,
latticeMouthInformation
);
return
true
;
}
@Override
public
boolean
insertAnalysisDate
(
String
printDate
,
String
latticeMouthInformation
)
{
logMapper
.
insertAnalysisDate
(
printDate
,
latticeMouthInformation
);
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